TelegramPWA/dist/4765.e4458ea7f8b6ca33838d.js
Alexander Zinchuk 528c25718e [Build]
2026-01-13 01:18:33 +01:00

2 lines
39 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[4765],{283:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357);const a="AtWkrIxV";var r=t(20021);const s=(0,o.ph)(()=>(0,r.FD)("div",{className:"Oob7moh7",children:[(0,r.Y)("div",{className:(0,i.A)("ao0o6F_1",a)}),(0,r.FD)("div",{className:"e94nYlC4",children:[(0,r.Y)("div",{className:(0,i.A)("ANs9RCJu",a)}),(0,r.Y)("div",{className:(0,i.A)("RSn3O5Rx",a)})]})]}))},629:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357);const a={root:"eGD1rubd",widget:"EXXsQxeq",min:"C4vXj96y",mid:"nRNm3LRD",max:"LdztzMx0",filler:"kudEBJOk"};var r=t(20021);const s=(0,o.ph)(function({value:e}){return(0,r.FD)("div",{className:(0,i.A)(a.root,"Toggle"),"aria-hidden":!0,children:[(0,r.Y)("i",{className:(0,i.A)(a.filler,a[e])}),(0,r.Y)("i",{className:(0,i.A)(a.widget,a[e])})]})})},1087:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(17712),r=t(24956),s=t(20021);const l=(0,o.ph)(({id:e,name:n,options:t,selected:l,disabled:c,loadingOption:d,onChange:u,onClickAction:h,subLabelClassName:m,isLink:v,withIcon:g,subLabel:A,className:p})=>{const b=(0,o.hb)(e=>{const{value:n}=e.currentTarget;u(n,e)},[u]),C=(0,a.A)(e=>()=>{h?.(e)});return(0,s.Y)("div",{id:e,className:(0,i.A)("radio-group",p),children:t.map(e=>(0,s.Y)(r.A,{name:n,label:e.label,subLabel:A||e.subLabel,subLabelClassName:m,value:e.value,checked:e.value===l,hidden:e.hidden,isCanCheckedInDisabled:e.isCanCheckedInDisabled,disabled:c,withIcon:g,isLoading:d?d===e.value:void 0,className:e.className,onChange:b,onSubLabelClick:C(e.value),isLink:v}))})})},11124:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357);var a=t(20021);const r=(0,o.ph)(({marks:e,onChange:n,rangeCount:t})=>{const r=(0,o.li)(),s=(0,o.Kr)(()=>e.indexOf(t),[e,t]),l=(0,o.Kr)(()=>e.indexOf(t).toString(),[e,t]);return(0,o.Nf)(()=>{if(r.current){const n=s/(e.length-1)*100,t=n/2;r.current.style.setProperty("--fill-percentage",`${n}%`),r.current.style.setProperty("--thumb-offset",`${t}%`)}},[s,e]),(0,a.Y)("div",{className:"s8NMMSES",children:(0,a.Y)("form",{children:(0,a.FD)("div",{className:"i_wrxmyh",children:[(0,a.Y)("div",{className:"O7SI4r_Y",children:e.map((e,n)=>{const t=n<=s;return(0,a.Y)("div",{className:(0,i.A)("b6UDc3zh",t?"VELPJsJ0":"K8NtimIi")},e)})}),(0,a.Y)("div",{className:"bVlnaLCI",children:e.map(e=>(0,a.Y)("div",{className:(0,i.A)("AFFaq4eZ",t===e&&"cuogxYPG"),children:e},e))}),(0,a.Y)("input",{ref:r,type:"range",className:"H_rMZrqn",min:"0",max:e.length-1,value:l,onChange:t=>{const o=parseInt(t.target.value,10),i=e[o];n(i)},step:"1"})]})})})})},12933:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(87357),i=t(59030),a=t(59324),r=t(64493),s=t(20021);const l=({isShown:e,iconName:n,className:t,color:l="primary",ariaLabel:c,disabled:d,isLoading:u,onClick:h})=>{const m=(0,i.A)(),v=(0,o.A)("FloatingActionButton",e&&"revealed",t);return(0,s.Y)(r.A,{className:v,color:l,round:!0,disabled:d,onClick:e&&!d?h:void 0,ariaLabel:c,tabIndex:-1,isRtl:m.isRtl,children:(0,s.Y)(a.A,{iconName:n,isLoading:u})})}},22337:(e,n,t)=>{t.d(n,{U:()=>Y,A:()=>L});var o=t(84051),i=t(87357),a=t(52674),r=t(14680),s=t(29441),l=t(10722),c=t(26072),d=t(17712),u=t(37859),h=t(59030),m=t(34201),v=t(64493),g=t(71429),A=t(13439),p=t(86046),b=t(17142),C=t(48775),f=t(39351),N=t(96530);const w="w919CqtI";var y=t(20021);const x=(0,o.ph)((0,A.EK)(e=>{const{stars:n,ton:t}=e;return{starBalance:n?.balance,tonBalance:t?.balance,tonUsdRate:e.appConfig.tonUsdRate}})(function({starBalance:e,tonBalance:n,tonUsdRate:t,isModalOpen:o,currency:a,onCloseAnimationEnd:r}){const{openStarsBalanceModal:s}=(0,A.ko)(),l=(0,f.A)(),c="TON"===a,u=c?n:e,h=!!o&&Boolean(u),{ref:v,shouldRender:g}=(0,m.A)({isOpen:h,onCloseAnimationEnd:r,withShouldRender:!0}),x=(0,d.A)(()=>{s(c?{currency:"TON"}:{})});if(g&&u)return(0,y.FD)("div",{className:(0,i.A)("UtvP6LQ2"),ref:v,children:[(0,y.Y)("div",{children:l("ModalStarsBalanceBarDescription",c?{stars:(0,C.Ms)(l,(0,b.wD)(u.amount),{className:w})}:{stars:(0,C.U2)(l,(0,p.ZF)(l,u),{className:w})},{withNodes:!0,withMarkdown:!0})}),(0,y.FD)("div",{children:[c&&Boolean(t)&&(0,y.Y)("div",{className:"VMKBAQXy",style:"color: var(--color-text-secondary)",children:`${(0,b.Ad)((0,b.C)(u.amount,t,!0),"USD",l.code)}`}),!c&&(0,y.Y)(N.A,{isPrimary:!0,onClick:x,children:l("GetMoreStarsLinkText")})]})]})}));var k=t(3325);const Y=200,L=({dialogRef:e,title:n,className:t,contentClassName:A,headerClassName:p,isOpen:b,isSlim:C,header:f,hasCloseButton:N,hasAbsoluteCloseButton:w,absoluteCloseButtonColor:L="translucent",noBackdrop:D,noBackdropClose:M,children:E,style:S,dialogStyle:R,isLowStackPriority:T,dialogContent:B,dialogClassName:F,moreMenuItems:I,onClose:O,onCloseAnimationEnd:P,onEnter:K,withBalanceBar:$,isCondensedHeader:J,currencyInBalanceBar:q="XTR"})=>{const{ref:U,shouldRender:z}=(0,m.A)({isOpen:b,onCloseAnimationEnd:P,withShouldRender:!0}),W=(0,o.li)(),_=(0,o.li)(),H=(0,o.li)(),{isContextMenuOpen:Q,contextMenuAnchor:j,handleContextMenu:X,handleContextMenuClose:G,handleContextMenuHide:V}=(0,l.A)(_),Z=e||W,ee=(0,d.A)(()=>Z.current),ne=(0,d.A)(()=>_.current),te=(0,d.A)(()=>H.current),oe=(0,d.A)(()=>({withPortal:!0})),ie=N||w;(0,o.vJ)(()=>{if(b)return(0,r.FD)(),r.wb},[b]);const ae=(0,d.A)(e=>!!K&&(e.preventDefault(),K(),!0));(0,o.vJ)(()=>b?(0,a.A)({onEsc:O,onEnter:ae}):void 0,[b,O,ae]),(0,o.vJ)(()=>b&&U.current?(0,s.A)(U.current):void 0,[b,U]),(0,c.A)({isActive:b,onBack:O}),(0,u.A)(([e])=>(document.body.classList.toggle("has-open-dialog",Boolean(b)),(b||!b&&void 0!==e)&&(0,o.VK)(Y),()=>{document.body.classList.remove("has-open-dialog")}),[b]);const re=(0,h.A)();if(!z)return;const se=(0,i.A)("Modal",t,D&&"transparent-backdrop",C&&"slim",T&&"low-priority",$&&"with-balance-bar"),le=(0,i.A)("modal-dialog",F);return(0,y.Y)(k.A,{children:(0,y.FD)("div",{ref:U,className:se,tabIndex:-1,role:"dialog",children:[$&&(0,y.Y)(x,{isModalOpen:b,currency:q}),(0,y.FD)("div",{className:"modal-container",children:[(0,y.Y)("div",{className:"modal-backdrop",onClick:M?void 0:O}),(0,y.FD)("div",{className:le,ref:Z,style:R,children:[function(){if(f)return f;const e=ie?(0,y.Y)(v.A,{className:(0,i.A)(w&&"modal-absolute-close-button"),round:!0,color:L,size:"tiny",iconName:"close",ariaLabel:re("Close"),onClick:O}):void 0;return n?(0,y.FD)("div",{className:(0,i.A)("modal-header",p,J&&"modal-header-condensed"),children:[e,(0,y.Y)("div",{className:"modal-title",children:n})]}):e}(),Boolean(I)&&(0,y.FD)(y.FK,{children:[(0,y.Y)(v.A,{ref:_,className:"modal-more-button",round:!0,color:L,size:"tiny",iconName:"more",ariaLabel:re("AriaMoreButton"),onClick:X,onContextMenu:X}),(0,y.Y)(g.A,{ref:H,isOpen:Q,anchor:j,autoClose:!0,withPortal:!0,positionX:"right",onClose:G,onCloseAnimationEnd:V,getRootElement:ee,getTriggerElement:ne,getMenuElement:te,getLayout:oe,children:I})]}),B,(0,y.Y)("div",{className:(0,i.A)("modal-content custom-scroll",A),style:S,children:E})]})]})]})})}},22720:(e,n,t)=>{t.d(n,{A:()=>f});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),s=t(4961),l=t(10722),c=t(11217),d=t(37661),u=t(39351),h=t(17712),m=t(18276),v=t(64493),g=t(71429),A=t(24433),p=t(60859),b=t(42452),C=t(20021);const f=({ref:e,buttonRef:n,icon:t,iconClassName:f,leftElement:N,buttonClassName:w,menuBubbleClassName:y,secondaryIcon:x,secondaryIconClassName:k,rightElement:Y,className:L,style:D,children:M,disabled:E,allowDisabledClick:S,ripple:R,narrow:T,inactive:B,focus:F,destructive:I,withPrimaryColor:O,multiline:P,isStatic:K,allowSelection:$,withColorTransition:J,contextActions:q,withPortalForMenu:U,href:z,nonInteractive:W,onClick:_,clickArg:H,onMouseDown:Q,onContextMenu:j,onSecondaryIconClick:X,onDragEnter:G,onDragLeave:V})=>{let Z=(0,o.li)();e&&(Z=e);const[ee,ne,te]=(0,d.A)(),{isContextMenuOpen:oe,contextMenuAnchor:ie,handleBeforeContextMenu:ae,handleContextMenu:re,handleContextMenuClose:se,handleContextMenuHide:le}=(0,l.A)(Z,!q),ce=(0,h.A)(()=>Z.current),de=(0,h.A)(()=>Z.current.closest(".custom-scroll")),ue=(0,h.A)(()=>(U?document.querySelector("#portals"):Z.current).querySelector(".ListItem-context-menu .bubble")),he=(0,h.A)(()=>({withPortal:U})),me=(0,h.A)(e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main){if(z&&!_)return;e.preventDefault()}}),ve=(0,h.A)(e=>{if(!E||S){if(z){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main||e.button===a.w3.Auxiliary)return;_&&e.preventDefault()}_&&(_(e,H),a.TF&&!R&&(ne(),(0,i.YS)(te)))}}),{handleClick:ge,handleMouseDown:Ae}=(0,c.Q)(e=>{E&&!S||0!==e.button||!X&&!q||(e.stopPropagation(),X?X(e):re(e))}),pe=(0,h.A)(e=>{B||a.TF||(!q||e.button!==a.w3.Secondary&&_||ae(e),e.button===a.w3.Main&&(_?ve(e):re(e)))}),be=(0,u.A)(),Ce=(0,r.A)("ListItem",L,$&&"allow-selection",R&&"has-ripple",T&&"narrow",E&&"disabled",S&&"click-allowed",B&&"inactive",ie&&"has-menu-open",F&&"focus",I&&"destructive",O&&"primary",P&&"multiline",K&&"is-static",J&&"with-color-transition"),fe=z?"a":"div";return(0,C.FD)("div",{ref:Z,className:Ce,dir:be.isRtl?"rtl":void 0,style:D,onMouseDown:Q,onDragEnter:G,onDragLeave:V,children:[(0,C.FD)(fe,{className:(0,r.A)("ListItem-button",ee&&"active",w),role:K||z?void 0:"button",href:z,ref:n,rel:z?"noopener noreferrer":void 0,tabIndex:K?void 0:0,onClick:!B&&a.TF?ve:me,onMouseDown:pe,onContextMenu:j||(!B&&q?re:void 0),"aria-disabled":E||void 0,children:[!E&&!B&&R&&(0,C.Y)(b.A,{}),N,t&&(0,C.Y)(m.A,{name:t,className:(0,r.A)("ListItem-main-icon",f)}),P&&(0,C.Y)("div",{className:"multiline-item",children:M}),!P&&M,x&&(0,C.Y)(v.A,{nonInteractive:W,className:(0,r.A)("secondary-icon",k),round:!0,color:"translucent",size:"smaller",onClick:ge,onMouseDown:Ae,iconName:x}),Y]}),q&&void 0!==ie&&(0,C.Y)(g.A,{isOpen:oe,anchor:ie,getTriggerElement:ce,getRootElement:de,getMenuElement:ue,getLayout:he,className:"ListItem-context-menu with-menu-transitions",autoClose:!0,onClose:se,onCloseAnimationEnd:le,withPortal:U,bubbleClassName:y,children:q.map(e=>"isSeparator"in e?(0,C.Y)(p.A,{},e.key||"separator"):(0,C.Y)(A.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,C.Y)("span",{className:"list-item-ellipsis",children:(0,s.A)(e.title)})},e.title))})]})}},24680:(e,n,t)=>{t.d(n,{A:()=>m});var o=t(84051),i=t(57446),a=t(96454),r=t(87357),s=t(36838),l=t(39351),c=t(73767),d=t(34132),u=t(20021);const h=a.pz?450:a.Ni?400:300,m=(0,o.ph)(({tabs:e,activeTab:n,className:t,tabClassName:a,contextRootElementSelector:m,ref:v,onSwitchTab:g})=>{let A=(0,o.li)();v&&(A=v);const p=(0,c.A)(n),b=(0,l.A)();return(0,s.A)(A,void 0,!0),(0,o.vJ)(()=>{const e=A.current,{scrollWidth:t,offsetWidth:o,scrollLeft:a}=e;if(t<=o)return;const r=e.childNodes[n];if(!r)return;const{offsetLeft:s,offsetWidth:l}=r,c=s-o/2+l/2;Math.abs(c-a)<16||(0,i.A)(e,c,h)},[n]),(0,u.Y)("div",{className:(0,r.A)("TabList","no-scrollbar",t),ref:A,dir:b.isRtl?"rtl":void 0,children:e.map((e,t)=>(0,u.Y)(d.A,{title:e.title,isActive:t===n,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:p,onClick:g,clickArg:t,contextActions:e.contextActions,contextRootElementSelector:m,className:a},e.id))})})},24713:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(68292),r=t(26607);var s=t(20021);const l=(0,o.ph)(({text:e,className:n,isAlternateColor:t})=>(0,s.Y)(r.A,{className:(0,i.A)("Y3ZoW17O",t?"Lq67O2D2":"DWjOG2Ze",n),isOpen:Boolean(e),children:e&&(0,s.Y)(a.A,{text:e})}))},24956:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(39351),r=t(57474),s=t(20021);const l=(0,o.ph)(({id:e,label:n,subLabel:t,subLabelClassName:o,value:l,name:c,checked:d,disabled:u,hidden:h,isLoading:m,className:v,onlyInput:g,withIcon:A,isLink:p,onChange:b,onSubLabelClick:C,isCanCheckedInDisabled:f})=>{const N=(0,a.A)(),w=(0,i.A)("Radio",v,u&&"disabled",h&&"hidden-widget",A&&"with-icon",m&&"loading",g&&"onlyInput",Boolean(t)&&"withSubLabel",f&&"canCheckedInDisabled");return(0,s.FD)("label",{className:w,dir:N.isRtl?"rtl":void 0,children:[(0,s.Y)("input",{type:"radio",name:c,value:l,id:e,checked:d,onChange:b,disabled:u||h}),(0,s.FD)("div",{className:"Radio-main",children:[(0,s.Y)("span",{className:"label",dir:N.isRtl?"auto":void 0,children:n}),Boolean(t)&&(0,s.Y)("span",{className:(0,i.A)(o,"subLabel",p?"subLabelLink":void 0),dir:N.isRtl?"auto":void 0,onClick:p?C:void 0,children:t})]}),m&&(0,s.Y)(r.A,{})]})})},26607:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(73767),a=t(34201),r=t(20021);const s=({isOpen:e,isHidden:n,isCustom:t,id:s,className:l,onClick:c,children:d,noCloseTransition:u,shouldAnimateFirstRender:h,style:m,ref:v})=>{const g=(0,i.A)(e),A=(0,i.A)(d),p=(0,o.li)(),b=void 0===g,{ref:C,shouldRender:f}=(0,a.A)({isOpen:e&&!n,ref:v,noMountTransition:b&&!h,className:!t&&void 0,noCloseTransition:u,withShouldRender:!0});return g&&!e&&(p.current=A),(f||n)&&(0,r.Y)("div",{id:s,ref:C,className:l,onClick:c,style:m,children:e?d:p.current})}},32581:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357),i=t(59030);var a=t(20021);const r=function({children:e,className:n}){const t=(0,i.A)();return(0,a.Y)("div",{dir:t.isRtl?"rtl":void 0,className:(0,o.A)("LxlpQKLr",n),children:e})}},34132:(e,n,t)=>{t.d(n,{A:()=>b});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),s=t(41402),l=t(4961),c=t(10722),d=t(11217),u=t(17712),h=t(18276),m=t(71429),v=t(24433),g=t(60859),A=t(20021);const p="Tab--active",b=({className:e,title:n,isActive:t,isBlocked:b,badgeCount:C,isBadgeActive:f,previousActiveTab:N,contextActions:w,contextRootElementSelector:y,icon:x,clickArg:k,onClick:Y})=>{const L=(0,o.li)();(0,o.Nf)(()=>{t&&void 0===N&&L.current&&L.current.classList.add(p)},[t,N]),(0,o.vJ)(()=>{if(!t||void 0===N)return;const e=L.current,n=e.parentElement.children[N];if(!n)return void(t&&!e.classList.contains(p)&&(0,i.RK)(()=>{e.classList.add(p)}));const o=e.querySelector(".platform"),a=n.querySelector(".platform"),r=a.parentElement.offsetLeft-o.parentElement.offsetLeft,l=a.clientWidth/o.clientWidth;(0,i.RK)(()=>{a.classList.remove("animate"),o.classList.remove("animate"),o.style.transform=`translate3d(${r}px, 0, 0) scale3d(${l}, 1, 1)`,(0,i.gm)(()=>((0,s.A)(o),()=>{o.classList.add("animate"),o.style.transform="none",n.classList.remove(p),e.classList.add(p)}))})},[t,N]);const{contextMenuAnchor:D,handleContextMenu:M,handleBeforeContextMenu:E,handleContextMenuClose:S,handleContextMenuHide:R,isContextMenuOpen:T}=(0,c.A)(L,!w),{handleClick:B,handleMouseDown:F}=(0,d.Q)(e=>{!w||e.button!==a.w3.Secondary&&Y||E(e),"mousedown"===e.type&&e.button!==a.w3.Main||Y?.(k)}),I=(0,u.A)(()=>L.current),O=(0,u.A)(()=>y?L.current.closest(y):document.body),P=(0,u.A)(()=>document.querySelector("#portals").querySelector(".Tab-context-menu .bubble")),K=(0,u.A)(()=>({withPortal:!0}));return(0,A.FD)("div",{className:(0,r.A)("Tab",Y&&"Tab--interactive",e),onClick:B,onMouseDown:F,onContextMenu:M,ref:L,children:[x,(0,A.FD)("span",{className:"Tab_inner",children:["string"==typeof n?(0,l.A)(n):n,Boolean(C)&&(0,A.Y)("span",{className:(0,r.A)("badge",f&&"Tab__badge--active"),children:C}),b&&(0,A.Y)(h.A,{name:"lock-badge",className:"blocked"}),(0,A.Y)("i",{className:"platform"})]}),w&&void 0!==D&&(0,A.Y)(m.A,{isOpen:T,anchor:D,getTriggerElement:I,getRootElement:O,getMenuElement:P,getLayout:K,className:"Tab-context-menu",autoClose:!0,onClose:S,onCloseAnimationEnd:R,withPortal:!0,children:w.map(e=>"isSeparator"in e?(0,A.Y)(g.A,{},e.key||"separator"):(0,A.Y)(v.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},34396:(e,n,t)=>{t.d(n,{A:()=>A});var o=t(84051),i=t(66644),a=t(87357),r=t(76023),s=t(37661),l=t(39351),c=t(17712),d=t(14745),u=t(39751),h=t(18276),m=t(71429),v=t(24433),g=t(20021);const A=({icon:e,customIcon:n,submenuIcon:t,className:A,children:p,submenu:b,submenuClassName:C,disabled:f,destructive:N,ariaLabel:w,footer:y})=>{const x=(0,l.A)(),k=(0,o.li)(),Y=(0,o.li)(),L=(0,o.li)(),D=(0,d.A)(),M=(0,o.li)(!1),[E,S,R]=(0,s.A)(!1);(0,o._W)(()=>{clearTimeout(Y.current),clearTimeout(L.current)});const[T,B]=(0,o.J0)(),{isResizing:F}=(0,u.A)(),I=(0,c.A)(()=>{(0,i.YS)(()=>{if(!k.current)return;const e=k.current.getBoundingClientRect(),n=r.$;B({x:x.isRtl?e.left+n:e.right-n,y:e.top,width:e.width-2*n,height:e.height})})});(0,o.vJ)(()=>{E&&!F&&I()},[E,x.isRtl,I,F]);const O=(0,c.A)(()=>{clearTimeout(L.current),L.current=void 0}),P=(0,c.A)(()=>{clearTimeout(Y.current),Y.current=void 0}),K=(0,c.A)(()=>{P(),O(),L.current=window.setTimeout(()=>{L.current=void 0;const e=k.current?.closest(".bubble");e?.classList.contains("closing")||S()},150)}),$=(0,c.A)(()=>{O(),P(),Y.current=window.setTimeout(()=>{R(),Y.current=void 0},150)}),J=(0,c.A)(()=>{f||K()}),q=(0,c.A)(()=>{O(),P()}),U=(0,c.A)(()=>{$()}),z=(0,c.A)(()=>{const e=k.current?.closest(".Menu");if(e){const n=e.querySelector(".backdrop");if(n){const e=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});n.dispatchEvent(e)}}}),W=(0,c.A)(()=>{M.current||(M.current=!0,O(),P(),R(),z(),setTimeout(()=>{M.current=!1},100))}),_=(0,c.A)(()=>k.current),H=(0,c.A)(()=>document.body),Q=(0,c.A)(()=>document.getElementById(D)?.querySelector(".bubble")),j=(0,c.A)(()=>({withPortal:!0})),X=(0,c.A)(e=>{e.stopPropagation(),f||E||S()});return(0,g.Y)("div",{onMouseEnter:J,onMouseLeave:$,ref:k,children:(0,g.FD)(v.A,{icon:e,customIcon:n,className:(0,a.A)(A,"submenu"),disabled:f,destructive:N,ariaLabel:w,onClick:X,children:[p,(0,g.Y)(h.A,{name:t||(x.isRtl?"previous":"next"),className:"submenu-icon"}),T&&(0,g.Y)(m.A,{id:D,isOpen:E,className:(0,a.A)("submenu",C),anchor:T,positionX:x.isRtl?"left":"right",getTriggerElement:_,getRootElement:H,getMenuElement:Q,getLayout:j,autoClose:!0,nested:!0,withPortal:!0,footer:y,onClose:W,onMouseEnter:q,onMouseLeave:U,children:b})]})})}},35913:(e,n,t)=>{t.d(n,{A:()=>v});var o=t(84051),i=t(66644),a=t(19822),r=t(87357),s=t(87094),l=t(41257),c=t(38691),d=t(18276),u=t(20021);const h={s:42,m:48,l:54,xl:52},m=.05,v=(0,o.ph)(({progress:e=0,size:n="l",square:t,transparent:v,noCross:g,rotationOffset:A,withColor:p,onClick:b})=>{const C=(0,o.li)(),f=h[n],N=(0,l.i)(e),w=(0,c.A)(),y=(0,s.A)(C,void 0,!p);(0,o.vJ)(()=>{let e,t,o=!0,r=m;(0,a.i0)(()=>{if(!C.current)return!1;N.current!==t&&(r=Math.min(Math.max(m,t||0),1),e=Date.now(),t=N.current);const i=Math.min(Math.max(m,N.current),1),s=Math.min(1,(Date.now()-e)/600),l=a.qM.easeOutQuad(s),c=r+(i-r)*l;return function(e,n,t,o,i,a,r=!1,s){const l=n/2,c=(n-t)/2-2*a,d=s??Date.now()%2e3/2e3,u=2*Math.PI*d,h=u+2*Math.PI*i,m=e.getContext("2d");r&&(e.width=n,e.height=n,m.lineCap="round",m.strokeStyle=o,m.lineWidth=t),m.clearRect(0,0,n,n),m.beginPath(),m.arc(l,l,c,u,h),m.stroke()}(C.current,f*w,("xl"===n?3:2)*w,y??"white",c,w,o,A),o=!1,c<1},i.RK)},[N,n,f,w,A,y]);const x=(0,r.A)(`ProgressSpinner size-${n}`,v&&"transparent",t&&"square",g&&"no-cross");return(0,u.FD)("div",{className:x,onClick:b,children:[!g&&(0,u.Y)(d.A,{name:"close"}),(0,u.Y)("canvas",{ref:C,className:"ProgressSpinner_canvas",style:`width: ${f}; height: ${f}px;`})]})})},36393:(e,n,t)=>{t.d(n,{A:()=>A});var o=t(84051),i=t(63495),a=t(87357),r=t(37661),s=t(79174),l=t(39351),c=t(17712),d=t(59030),u=t(18276),h=t(64493),m=t(52745),v=t(41036),g=t(20021);const A=(0,o.ph)(({ref:e,children:n,resultsItemSelector:t,value:A,inputId:p,className:b,focused:C,isLoading:f=!1,spinnerColor:N,spinnerBackgroundColor:w,placeholder:y,disabled:x,autoComplete:k,canClose:Y,autoFocusSearch:L,hasUpButton:D,hasDownButton:M,teactExperimentControlled:E,withBackIcon:S,onChange:R,onStartBackspace:T,onReset:B,onFocus:F,onBlur:I,onClick:O,onUpClick:P,onDownClick:K,onSpinnerClick:$,onEnter:J})=>{let q=(0,o.li)();e&&(q=e);const[U,z,W]=(0,r.A)(C);(0,s.A)(q,L,W),(0,o.vJ)(()=>{q.current&&(C?q.current.focus():q.current.blur())},[C,y]);const _=(0,d.A)(),H=(0,l.A)();function Q(){z(),F?.()}const j=(0,c.A)(e=>{if("Enter"===e.key){if(J)return e.preventDefault(),void J();if(t){const e=document.querySelector(t);e&&e.focus()}}if(t&&"ArrowDown"===e.key){const e=document.querySelector(t);e&&e.focus()}"Backspace"===e.key&&0===e.currentTarget.selectionStart&&0===e.currentTarget.selectionEnd&&T?.()});return(0,g.FD)("div",{className:(0,a.A)("SearchInput",b,U&&"has-focus"),onClick:O,dir:H.isRtl?"rtl":void 0,children:[(0,g.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(!f&&!S),className:"icon-container-left",slideClassName:"icon-container-slide",children:f&&!S?(0,g.Y)(m.A,{color:N,backgroundColor:w,onClick:$}):S?(0,g.Y)(u.A,{name:"arrow-left",className:"back-icon",onClick:B}):(0,g.Y)(u.A,{name:"search",className:"search-icon"})}),(0,g.Y)("div",{children:n}),(0,g.Y)("input",{ref:q,id:p,type:"text",dir:"auto",placeholder:y||_("Search"),className:"form-control",value:A,disabled:x,autoComplete:k,spellCheck:!i.Vq&&void 0,onChange:function(e){const{currentTarget:n}=e;R(n.value),U||Q()},onFocus:Q,onBlur:function(){W(),I?.()},onKeyDown:j,teactExperimentControlled:E}),D&&(0,g.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"up",onClick:P,disabled:!P,ariaLabel:H("AriaSearchOlderResult")}),M&&(0,g.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"down",onClick:K,disabled:!K,ariaLabel:H("AriaSearchNewerResult")}),(0,g.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(f),className:"icon-container-right",slideClassName:"icon-container-slide",children:S&&f?(0,g.Y)(m.A,{color:N,backgroundColor:w,onClick:$}):(A||Y)&&B&&(0,g.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"close",onClick:B})})]})})},43434:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(39351),r=t(18276),s=t(90751),l=t(20021);const c=(0,o.ph)(({title:e,disabled:n,isForForum:t,currentAvatarBlobUrl:c,onChange:d})=>{const[u,h]=(0,o.J0)(),[m,v]=(0,o.J0)(c),g=(0,a.A)();(0,o.vJ)(()=>{v(c)},[c]);const A=(0,o.hb)(e=>{h(void 0),d(e),m&&m!==c&&URL.revokeObjectURL(m),v(URL.createObjectURL(e))},[m,c,d]),p=(0,o.hb)(()=>{h(void 0)},[]),b=(0,i.A)(m&&"filled",n&&"disabled",t&&"rounded-square");return(0,l.FD)("div",{className:"AvatarEditable",children:[(0,l.FD)("label",{className:b,role:"button",tabIndex:0,title:e||g("ChangeYourProfilePicture"),children:[(0,l.Y)("input",{type:"file",onChange:function(e){const n=e.target;n?.files?.[0]&&(h(n.files[0]),n.value="")},accept:"image/png, image/jpeg"}),(0,l.Y)(r.A,{name:"camera-add"}),m&&(0,l.Y)("img",{src:m,draggable:!1,alt:""})]}),(0,l.Y)(s.A,{file:u,onClose:p,onChange:A})]})})},46222:(e,n,t)=>{t.d(n,{A:()=>h});var o=t(84051),i=t(89925),a=t(66644),r=t(96454),s=t(95807),l=t(9718),c=t(37836),d=t(17712),u=t(20021);const h=({ref:e,style:n,className:t,items:h,itemSelector:m=".ListItem",preloadBackwards:v=20,sensitiveArea:g=800,withAbsolutePositioning:A,maxHeight:p,noScrollRestore:b=!1,noScrollRestoreOnTop:C=!1,noFastList:f,cacheBuster:N,beforeChildren:w,children:y,scrollContainerClosest:x,onLoadMore:k,onScroll:Y,onWheel:L,onClick:D,onKeyDown:M})=>{let E=(0,o.li)();e&&(E=e);const S=(0,o.li)({}),[R,T]=(0,o.Kr)(()=>k?[(0,c.sg)((e=!1)=>{k({direction:i.TN.Backwards,noScroll:e})},1e3,!0,!1),(0,c.sg)(()=>{k({direction:i.TN.Forwards})},1e3,!0,!1)]:[],[k,h]);(0,o.vJ)(()=>{const e=x?E.current.closest(x):E.current;if(!R||!e)return;if(v>0&&(!h||h.length<v))return void R(!0);const{scrollHeight:n,clientHeight:t}=e;t&&n<t&&R()},[h,R,v,x]),(0,o.Nf)(()=>{const e=x?E.current.closest(x):E.current,n=E.current;(0,a.gm)(()=>{const t=S.current;let o;if(t.listItemElements=n.querySelectorAll(m),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:n}=e,i=t.currentAnchor.getBoundingClientRect().top;o=n+(i-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}if(A||b)return;const{scrollTop:i}=e;return C&&0===i?void 0:()=>{(0,l.A)(e,o),t.isScrollTopJustUpdated=!0}})},[h,m,b,C,N,A,x]);const B=(0,d.A)(e=>{if(T&&R){const{isScrollTopJustUpdated:e,currentAnchor:n,currentAnchorTop:t}=S.current,o=S.current.listItemElements;if(e)return void(S.current.isScrollTopJustUpdated=!1);const i=o.length,a=x?E.current.closest(x):E.current,{scrollTop:r,scrollHeight:s,offsetHeight:l}=a,c=r<=(i?o[0].offsetTop:0)+g,d=(i?o[i-1].offsetTop+o[i-1].offsetHeight:s)-(r+l)<=g;let u=!1;if(c){const e=o[0];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i>t&&(S.current.currentAnchor=e,S.current.currentAnchorTop=o,u=!0,T())}}if(d){const e=o[i-1];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i<t&&(S.current.currentAnchor=e,S.current.currentAnchorTop=o,u=!0,R())}}if(!u)if(n?.offsetParent)S.current.currentAnchorTop=n.getBoundingClientRect().top;else{const e=o[0];e&&(S.current.currentAnchor=e,S.current.currentAnchorTop=e.getBoundingClientRect().top)}}Y&&Y(e)});return(0,o.Nf)(()=>{const e=x?E.current.closest(x):E.current;if(!e)return;const n=e=>B(e);return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}},[B,x]),(0,u.FD)("div",{ref:E,className:t,style:n,teactFastList:!f&&!A,onClick:D,onKeyDown:M,onWheel:L,children:[w,A&&h?.length?(0,u.Y)("div",{teactFastList:!f,style:(0,s.A)("position: relative",r.Ni&&`height: ${p}px`),children:y}):y]})}},55158:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(95807),r=t(20021);const s=(0,o.ph)(({variant:e="rectangular",animation:n="wave",width:t,height:o,forceAspectRatio:s,inline:l,className:c})=>{const d=(0,i.A)("Skeleton",e,n,c,l&&"inline"),u=t&&o?`aspect-ratio: ${t}/${o}`:void 0,h=(0,a.A)(s&&u,Boolean(t)&&`width: ${t}px`,!s&&Boolean(o)&&`height: ${o}px`);return(0,r.Y)("div",{className:d,style:h,children:l&&" "})})},55573:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(59030),i=t(64493),a=t(20021);const r=({count:e,itemName:n,itemPluralName:t,isLoading:r,onClick:s})=>{const l=(0,o.A)();return(0,a.FD)(i.A,{className:"ShowMoreButton",color:"translucent",isText:!0,isLoading:r,isRtl:l.isRtl,onClick:s,iconName:"down",children:["Show"," ",e," ","more"," ",e>1?t||`${n}s`:n]})}},60859:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357);const i={root:"h039vb1K",thin:"NGKaFgra",thick:"_BdnjPEa"};var a=t(20021);const r=({className:e,size:n="thin"})=>(0,a.Y)("div",{className:(0,o.A)(i.root,i[n],e)})},61361:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(17663),a=t(80140),r=t(32625),s=t(30857),l=t(68292),c=t(20021);const d=({endsAt:e,shouldShowZeroOnEnd:n,onEnd:t})=>{const d=(0,s.A)(),u=(0,a.Fm)(),h=u<e;if((0,r.A)(d,h?500:void 0),(0,o.vJ)(()=>{h||t?.()},[h,t]),!h&&!n)return;const m=Math.max(0,e-u),v=(0,i.QO)(m).split(":"),g=(0,c.Y)("span",{style:"font-variant-numeric: tabular-nums;",children:v.map((e,n)=>(0,c.FD)(c.FK,{children:[n>0&&":",(0,c.Y)(l.A,{text:e},n)]}))});return(0,c.Y)("span",{children:g})}},63152:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(({id:e,name:n,value:t,label:r,checked:s=!1,disabled:l,inactive:c,noAnimation:d,onChange:u,onCheck:h})=>{const m=(0,o.hb)(e=>{u&&u(e),h&&h(e.currentTarget.checked)},[u,h]),v=(0,i.A)("Switcher",l&&"disabled",c&&"inactive",d&&"no-animation");return(0,a.FD)("label",{className:v,title:r,children:[(0,a.Y)("input",{type:"checkbox",id:e,name:n,value:t,checked:s,disabled:l,onChange:m}),(0,a.Y)("span",{className:"widget"})]})})},63173:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(e=>{const{id:n,value:t,label:o,hasArrow:r,error:s,ref:l,tabIndex:c,onChange:d,children:u}=e,h=s||o,m=(0,i.A)("input-group",t&&"touched",s&&"error",h&&"with-label",r&&"with-arrow","input-group");return(0,a.FD)("div",{className:m,children:[(0,a.Y)("select",{className:"form-control",id:n,value:t||"",onChange:d,tabIndex:c,ref:l,children:u}),h&&n&&(0,a.Y)("label",{htmlFor:n,children:h})]})})},66469:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(96454),a=t(17712),r=t(64493),s=t(20021);let l,c=!0;const d=({onActivate:e,...n})=>{const t=(0,o.li)(!1),d=(0,a.A)(n=>{if(t.current=!0,c)return c=!1,void e(n);l&&(clearTimeout(l),l=void 0),l=window.setTimeout(()=>{t.current&&e(n)},200)}),u=(0,a.A)(()=>{t.current=!1}),h=(0,a.A)(n=>{t.current=!0,e(n)});return(0,s.Y)(r.A,{...n,onMouseEnter:i.TF?void 0:d,onMouseLeave:i.TF?void 0:u,onClick:i.TF?h:e})}},77561:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(87894),r=t(17712),s=t(19806),l=t(20021);const c=(0,o.ph)(({id:e,options:n,selected:t,disabled:o,nestedCheckbox:c,loadingOptions:d,isRound:u,onChange:h,onClickLabel:m,className:v})=>{const g=(0,r.A)((e,n)=>{const{value:o,checked:i}=e.currentTarget;let r;i?(r=(0,a.Am)([...t,o]),n?.forEach(e=>{r.includes(e.value)||r.push(e.value)})):(r=t.filter(e=>e!==o),n&&(r=r.filter(e=>!n.some(n=>n.value===e)))),h(r)}),A=(0,r.A)(e=>{const n=e?.filter(e=>t.includes(e.value)).length;return n>0?n:e.length});return(0,l.Y)("div",{id:e,className:(0,i.A)("radio-group",v),children:n.map(e=>(0,l.Y)(s.A,{label:e.label,subLabel:e.subLabel,value:e.value,peer:e.peer,checked:-1!==t?.indexOf(e.value),disabled:e.disabled||o,isLoading:d?-1!==d.indexOf(e.value):void 0,onChange:g,onClickLabel:m,nestedCheckbox:c,nestedCheckboxCount:A(e.nestedOptions??[]),nestedOptionList:e.nestedOptions,values:t,isRound:u}))})})},80401:(e,n,t)=>{t.d(n,{A:()=>u});var o=t(84051),i=t(87357),a=t(95807),r=t(15640),s=t(59030),l=t(18276);var c=t(20021);const d={x:0,y:0},u=(0,o.ph)(({children:e,id:n,onDrag:t,onDragEnd:u,style:h,knobStyle:m,isDisabled:v})=>{const g=(0,s.A)(),A=(0,o.li)(),[p,b]=(0,o.J0)({isDragging:!1,origin:d,translation:d}),C=e=>{e.stopPropagation(),e.preventDefault();const{x:n,y:t}=(0,r.A)(e);b({...p,isDragging:!0,origin:{x:n,y:t},width:A.current?.offsetWidth,height:A.current?.offsetHeight})},f=(0,o.hb)(e=>{const{x:o,y:i}=(0,r.A)(e),a={x:o-p.origin.x,y:i-p.origin.y};b(e=>({...e,translation:a})),t(a,n)},[n,t,p.origin.x,p.origin.y]),N=(0,o.hb)(()=>{b(e=>({...e,isDragging:!1,width:void 0,height:void 0})),u()},[u]);(0,o.vJ)(()=>{p.isDragging&&v&&b(e=>({...e,isDragging:!1,width:void 0,height:void 0}))},[v,p.isDragging]),(0,o.vJ)(()=>(p.isDragging?(window.addEventListener("touchmove",f),window.addEventListener("mousemove",f),window.addEventListener("touchend",N),window.addEventListener("touchcancel",N),window.addEventListener("mouseup",N)):(window.removeEventListener("touchmove",f),window.removeEventListener("mousemove",f),window.removeEventListener("touchend",N),window.removeEventListener("touchcancel",N),window.removeEventListener("mouseup",N),b(e=>({...e,translation:d}))),()=>{p.isDragging&&(window.removeEventListener("touchmove",f),window.removeEventListener("mousemove",f),window.removeEventListener("touchend",N),window.removeEventListener("touchcancel",N),window.removeEventListener("mouseup",N))}),[f,N,p.isDragging]);const w=(0,i.A)("kWQHzIMD",p.isDragging&&"k0c5WDAy"),y=(0,o.Kr)(()=>(0,a.A)(p.isDragging&&`transform: translate(${p.translation.x}px, ${p.translation.y}px)`,p.width?`width: ${p.width}px`:void 0,p.height?`height: ${p.height}px`:void 0,h),[h,p.height,p.isDragging,p.translation.x,p.translation.y,p.width]);return(0,c.FD)("div",{style:y,className:w,ref:A,children:[e,!v&&(0,c.Y)("div",{"aria-label":g("i18n_dragToSort"),tabIndex:0,role:"button",className:(0,i.A)("UpzQzcvs","div-button","draggable-knob"),onMouseDown:C,onTouchStart:C,style:m,children:(0,c.Y)(l.A,{name:"sort",className:"JIThxQAL"})})]})})},82497:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(39351),r=t(20021);const s=(0,o.ph)(({options:e,min:n=0,max:t=(e?e.length-1:100),step:s=1,label:l,value:c,disabled:d,readOnly:u,bold:h,className:m,renderValue:v,onChange:g,isCenteredLayout:A})=>{const p=(0,a.A)(),b=(0,o.hb)(e=>{g(Number(e.currentTarget.value))},[g]),C=(0,i.A)(m,"RangeSlider",d&&"disabled",u&&"readOnly",h&&"bold"),f=(0,o.Kr)(()=>e?c/(e.length-1)*100:(c-n)/((t-n)/s)*100,[e,c,t,n,s]);return(0,r.FD)("div",{className:C,children:[A?(0,r.Y)("div",{className:"slider-top-row",dir:p.isRtl?"rtl":void 0,children:!e&&(0,r.FD)(r.FK,{children:[(0,r.Y)("span",{className:"value-min",dir:"auto",children:n}),(0,r.Y)("span",{className:"label",dir:"auto",children:v?v(c):c}),(0,r.Y)("span",{className:"value-max",dir:"auto",children:t})]})}):l?(0,r.FD)("div",{className:"slider-top-row",dir:p.isRtl?"rtl":void 0,children:[(0,r.Y)("span",{className:"label",dir:"auto",children:l}),!e&&(0,r.Y)("span",{className:"value",dir:"auto",children:v?v(c):c})]}):void 0,(0,r.FD)("div",{className:"slider-main",children:[(0,r.Y)("div",{className:"slider-fill-track",style:`width: ${f}%`}),(0,r.Y)("input",{min:n,max:t,value:c,step:s,type:"range",className:"RangeSlider__input",onChange:b}),e&&(0,r.Y)("div",{className:"slider-options",children:e.map((e,n)=>(0,r.Y)("div",{className:(0,i.A)("slider-option",n===c&&"active"),onClick:()=>g(n),children:e}))})]})]})})},90751:(e,n,t)=>{t.d(n,{A:()=>f});var o=t(84051),i=t(101),a=t(39351),r=t(95807),s=t(15640),l=t(87679),c=t(43336),d=t(76023),u=t(17712),h=t(39751),m=t(64493),v=t(82497);var g=t(20021);const A=.125*d.$,p=2*d.$,b=(0,o.ph)(({onChange:e,image:n,maxOutputSize:t,minOutputSize:i})=>{const[a,d]=(0,o.J0)({x:0,y:0}),[b,C]=(0,o.J0)(100),f=(0,o.li)(!1),N=(0,o.li)({x:0,y:0}),w=(0,o.li)({x:0,y:0}),{width:y}=(0,h.A)(),x=Math.min(400,y-2*p),k=n?Math.max(x/n.width,x/n.height):1,Y=k*b/100,L=(0,o.Kr)(()=>n?{width:n.width*Y,height:n.height*Y}:{width:0,height:0},[n,Y]),D=(e,n,t)=>{const o=x/2,i=t.width/2,a=t.height/2,r=Math.max(0,i-o),s=Math.max(0,a-o);return{x:(0,c.qE)(e,-r,r),y:(0,c.qE)(n,-s,s)}},M=e=>{f.current=!0,N.current=(0,s.A)(e),w.current={...a},document.addEventListener("mousemove",E),document.addEventListener("touchmove",E),document.addEventListener("mouseup",S),document.addEventListener("touchend",S)},E=(0,u.A)(e=>{if("touches"in e&&e.touches.length>1)return;if(!f.current)return;const{x:n,y:t}=(0,s.A)(e),o=n-N.current.x,i=t-N.current.y,a=D(w.current.x+o,w.current.y+i,L);d(a)}),S=(0,u.A)(()=>{f.current=!1,document.removeEventListener("mousemove",E),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",S),document.removeEventListener("touchend",S)}),R=(0,u.A)(e=>{const t=k*e/100,o={width:n.width*t,height:n.height*t},i=e/b,r=D(a.x*i,a.y*i,o);C(e),d(r)});if(!n)return;const T=(x-L.width)/2+a.x,B=(x-L.height)/2+a.y,F=(0,r.A)(`width: ${L.width}px`,`height: ${L.height}px`,`left: ${T}px`,`top: ${B}px`),I=(0,r.A)(`width: ${L.width}px`,`height: ${L.height}px`,`left: ${T-A}px`,`top: ${B-A}px`);return(0,g.FD)("div",{children:[(0,g.FD)("div",{className:"r_2tKzuI",style:(0,r.A)(`width: ${x}px`,`height: ${x}px`),children:[(0,g.Y)("img",{src:n.src,className:"caUABR3p",style:F,draggable:!1,onMouseDown:M,onTouchStart:M,alt:"",role:"presentation"}),(0,g.Y)("div",{className:"gR8q967h"}),(0,g.Y)("div",{className:"m_d02kUd",children:(0,g.Y)("img",{src:n.src,className:"nJUDgVTD",style:I,draggable:!1,alt:"",role:"presentation"})})]}),(0,g.FD)("div",{className:"_YQbrXkD",children:[(0,g.Y)(v.A,{className:"s73_IyYI",min:100,max:200,value:b,onChange:R}),(0,g.Y)(m.A,{className:"M0r9Gw03",round:!0,color:"primary",iconName:"check",onClick:()=>{if(!n)return;const o=x/Y,r=n.width/2-o/2-a.x/Y,s=n.height/2-o/2-a.y/Y,c=Math.min(t,Math.max(i,o)),d=document.createElement("canvas");d.width=c,d.height=c,d.getContext("2d").drawImage(n,r,s,o,o,0,0,c,c),d.toBlob(n=>{n&&e((0,l.ti)(n,"avatar.jpg"))},"image/jpeg")},ariaLabel:"Crop"})]})]})});var C=t(22337);const f=(0,o.ph)(({file:e,onChange:n,onClose:t})=>{const o=(0,a.A)(),{image:r}=(0,i.A)(e),s=Boolean(e)&&Boolean(r);return(0,g.Y)(C.A,{isOpen:s,onClose:t,title:o("CropperTitle"),className:"CropModal",hasCloseButton:!0,isCondensedHeader:!0,children:(0,g.Y)(b,{onChange:n,image:r,maxOutputSize:1024,minOutputSize:256})})})},91356:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(52844),a=t(90751);var r=t(20021);const s=(0,o.ph)(({onChange:e,inputRef:n})=>{const[t,s]=(0,o.J0)(),l=(0,o.hb)(n=>{s(void 0),e(n)},[e]),c=(0,o.hb)(()=>{s(void 0)},[]),d=(0,o.hb)(()=>{(0,i.p)("image/png, image/jpeg",e=>{const n=e.target;n?.files?.[0]&&s(n.files[0])},!0)},[]);return(0,r.FD)(r.FK,{children:[(0,r.Y)("input",{ref:n,className:"axfkbhWJ",onClick:d}),(0,r.Y)(a.A,{file:t,onClose:c,onChange:l})]})})},94079:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(66644),a=t(63495),r=t(87357),s=t(17712),l=t(59030),c=t(20021);const d=(0,o.ph)(({ref:e,id:n,className:t,value:d,label:u,error:h,success:m,disabled:v,readOnly:g,placeholder:A,autoComplete:p,inputMode:b,maxLength:C,maxLengthIndicator:f,tabIndex:N,onChange:w,onInput:y,onKeyPress:x,onKeyDown:k,onBlur:Y,onPaste:L,noReplaceNewlines:D})=>{let M=(0,o.li)();e&&(M=e);const E=(0,l.A)(),S=h||m||u,R=(0,r.A)("input-group",d&&"touched",h?"error":m&&"success",v&&"disabled",g&&"disabled",S&&"with-label",t),T=(0,s.A)(e=>{(0,i.RK)(()=>{e.style.height="0",(0,i.gm)(()=>{const n=e.scrollHeight;return()=>{e.style.height=`${n}px`}})})});(0,o.Nf)(()=>{const e=M.current;e&&T(e)},[]);const B=(0,o.hb)(e=>{const n=e.currentTarget;if(!D){const e=n.selectionEnd;n.value=n.value.replace(/\n/g," "),n.selectionEnd=e}T(n),w?.(e)},[D,w]);return(0,c.FD)("div",{className:R,dir:E.isRtl?"rtl":void 0,children:[(0,c.Y)("textarea",{ref:M,className:"form-control",id:n,dir:"auto",value:d||"",tabIndex:N,placeholder:A,maxLength:C,autoComplete:p,spellCheck:!a.Vq&&void 0,inputMode:b,disabled:v,readOnly:g,onChange:B,onInput:y,onKeyPress:x,onKeyDown:k,onBlur:Y,onPaste:L,"aria-label":S}),S&&(0,c.Y)("label",{htmlFor:n,children:S}),f&&(0,c.Y)("div",{className:"max-length-indicator",children:f})]})})},94189:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(87357),a=t(10328),r=t(39351),s=t(64493),l=t(22337),c=t(20021);const d=(0,o.ph)(({isOpen:e,title:n,noDefaultTitle:t,header:d,text:u,textParts:h,confirmLabel:m,confirmIsDestructive:v,isConfirmDisabled:g,isOnlyConfirm:A,areButtonsInColumn:p,className:b,children:C,confirmHandler:f,onClose:N,onCloseAnimationEnd:w})=>{const y=(0,r.A)(),x=(0,o.li)(),k=(0,o.hb)(e=>{-1===e&&f()},[f]),Y=(0,a.A)(x,e,k,".Button");return(0,c.FD)(l.A,{className:(0,i.A)("confirm",b),title:n||(t?void 0:y("Telegram")),header:d,isOpen:e,onClose:N,onCloseAnimationEnd:w,children:[u&&u.split("\\n").map(e=>(0,c.Y)("p",{children:e})),h||C,(0,c.FD)("div",{className:p?"dialog-buttons-column":"dialog-buttons mt-2",ref:x,onKeyDown:Y,children:[(0,c.Y)(s.A,{className:"confirm-dialog-button",isText:!0,onClick:f,color:v?"danger":"primary",disabled:g,children:m||y("GeneralConfirm")}),!A&&(0,c.Y)(s.A,{className:"confirm-dialog-button",isText:!0,onClick:N,children:y("Cancel")})]})]})})},98028:(e,n,t)=>{t.d(n,{A:()=>p});var o=t(84051),i=t(96454),a=t(87357),r=t(10722),s=t(11217),l=t(37661),c=t(17712),d=t(72167),u=t(18276),h=t(71429),m=t(24433),v=t(60859);const g={folder:"r_wWhyY_","no-page-transitions":"WddG2sPd",noPageTransitions:"WddG2sPd",inner:"k59cp8Xp",title:"GfrkwlNw",icon:"Ehg2aEWm",badge:"XwWX8ZRp","badge-active":"JrMkpoeL",badgeActive:"JrMkpoeL",blocked:"xqOTsTUl",active:"y8ZeQOsX"};var A=t(20021);const p=({className:e,title:n,isActive:t,isBlocked:p,badgeCount:b,isBadgeActive:C,contextActions:f,contextRootElementSelector:N,icon:w,clickArg:y,onClick:x})=>{const k=(0,o.li)(),[Y,L,D]=(0,l.A)(),{contextMenuAnchor:M,handleContextMenu:E,handleBeforeContextMenu:S,handleContextMenuClose:R,handleContextMenuHide:T,isContextMenuOpen:B}=(0,r.A)(k,!f),{handleClick:F,handleMouseDown:I}=(0,s.Q)(e=>{!f||e.button!==i.w3.Secondary&&x||S(e),"mousedown"===e.type&&e.button!==i.w3.Main||x?.(y)}),O=(0,c.A)(()=>k.current),P=(0,c.A)(()=>N?k.current.closest(N):document.body),K=(0,c.A)(()=>document.querySelector(`.${g.contextMenu} .bubble`)),$=(0,c.A)(()=>({withPortal:!0}));return(0,A.FD)("div",{className:(0,a.A)(g.folder,t&&g.active,e),onClick:F,onMouseDown:I,onContextMenu:E,onMouseEnter:L,onMouseLeave:D,ref:k,children:[(0,A.FD)("div",{className:g.icon,children:[(0,A.Y)(d.A,{emoji:"string"==typeof w?w:void 0,customEmojiId:"object"==typeof w?w.documentId:void 0,shouldAnimate:Y}),Boolean(b)&&(0,A.Y)("span",{className:(0,a.A)(g.badge,C&&g.badgeActive),children:b})]}),(0,A.Y)("span",{className:g.inner,children:(0,A.FD)("div",{className:g.title,children:[p&&(0,A.Y)(u.A,{name:"lock-badge",className:g.blocked}),n]})}),f&&void 0!==M&&(0,A.Y)(h.A,{isOpen:B,anchor:M,getTriggerElement:O,getRootElement:P,getMenuElement:K,getLayout:$,className:g.contextMenu,autoClose:!0,onClose:R,onCloseAnimationEnd:T,withPortal:!0,children:f.map(e=>"isSeparator"in e?(0,A.Y)(v.A,{},e.key||"separator"):(0,A.Y)(m.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}}}]);
//# sourceMappingURL=4765.e4458ea7f8b6ca33838d.js.map