2 lines
9.5 KiB
JavaScript
2 lines
9.5 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[5985],{1455(t,e,r){r.d(e,{A:()=>s});var n=r(84051);function s(t,e,r){const s=(0,n.li)(t);if(e){if(r?.length){const e={};for(const n of r)e[n]=t[n];s.current={...s.current,...e}}}else s.current=t;return s.current}},10722(t,e,r){r.d(e,{A:()=>c});var n=r(84051),s=r(61433),a=r(66644),i=r(96454),o=r(17712);function u(t){t.stopImmediatePropagation(),t.preventDefault(),t.stopPropagation()}const c=(t,e,r,c,p,d)=>{const[l,f]=(0,n.J0)(!1),[m,y]=(0,n.J0)(void 0),[g,h]=(0,n.J0)(void 0),v=(0,o.A)(t=>{e||2!==t.button||(0,a.RK)(()=>{(0,s.YM)(t.target,"no-selection")})}),I=(0,o.A)(t=>{(0,a.RK)(()=>{(0,s.HW)(t.target,"no-selection")}),e||r&&t.target.matches("a[href]")||(t.preventDefault(),t.stopPropagation(),m||(f(!0),y({x:t.clientX,y:t.clientY}),h(t.target)))}),b=(0,o.A)(()=>{f(!1)}),T=(0,o.A)(()=>{y(void 0)});return(0,n.vJ)(()=>{if(e||!i.TF||c||p&&!p())return;const n=t.current;if(!n)return;let s;const a=()=>{s&&(clearTimeout(s),s=void 0)},o=t=>{e||(d&&t.stopPropagation(),a(),s=window.setTimeout(()=>(t=>{a();const{clientX:e,clientY:n,target:s}=t.touches[0];m||r&&s.matches("a[href]")||(document.addEventListener("touchend",t=>{i.pz&&i._7&&setTimeout(()=>{document.removeEventListener("mousedown",u,{capture:!0}),document.removeEventListener("click",u,{capture:!0})},100),u(t)},{once:!0,capture:!0}),i._7&&i.pz&&(document.addEventListener("mousedown",u,{once:!0,capture:!0}),document.addEventListener("click",u,{once:!0,capture:!0})),f(!0),y({x:e,y:n}))})(t),200))};return n.addEventListener("touchstart",o,{passive:!0}),n.addEventListener("touchcancel",a,!0),n.addEventListener("touchend",a,!0),n.addEventListener("touchmove",a,{passive:!0}),()=>{a(),n.removeEventListener("touchstart",o),n.removeEventListener("touchcancel",a,!0),n.removeEventListener("touchend",a,!0),n.removeEventListener("touchmove",a)}},[m,e,c,t,r,p,d]),{isContextMenuOpen:l,contextMenuAnchor:m,contextMenuTarget:g,handleBeforeContextMenu:v,handleContextMenu:I,handleContextMenuClose:b,handleContextMenuHide:T}}},14680(t,e,r){r.d(e,{FD:()=>s,ZJ:()=>i,wb:()=>a});let n=0;function s(){n+=1}function a(){n-=1}function i(){return n>0}},29441(t,e,r){function n(t){function e(e){if("Tab"!==e.key)return;e.preventDefault(),e.stopPropagation();const r=Array.from(t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(!r.length)return;const n=r.findIndex(t=>t.isSameNode(document.activeElement));let s=0;n>=0&&(s=e.shiftKey?n>0?n-1:r.length-1:n<r.length-1?n+1:0),r[s].focus()}return document.addEventListener("keydown",e,!1),()=>{document.removeEventListener("keydown",e,!1)}}r.d(e,{A:()=>n})},37859(t,e,r){r.d(e,{A:()=>s});var n=r(84051);const s=(t,e,r)=>{const s=(0,n.li)();return(0,n.Nf)(()=>{const r=s.current;return s.current=e,t(r||[])},e,r)}},72730(t,e,r){r.d(e,{A:()=>o});var n=r(84051),s=r(46536);const a=".Modal.with-balance-bar",i=(0,s.h)();function o(t,e){const[r,s]=(0,n.J0)(!0);return(0,n.vJ)(()=>{if(!e)return;const r=()=>{s(function(t){if(!t)return!0;const e=t.closest(a);if(!e)return!0;const r=document.querySelectorAll(a);if(r.length<=1)return!0;let n,s=-1/0;return r.forEach(t=>{const e=parseInt(getComputedStyle(t).zIndex,10)||0;e>=s&&(s=e,n=t)}),e===n}(t.current))};r();const n=i.addCallback(r);return i.runCallbacks(),()=>{n(),i.runCallbacks()}},[e,t]),r}},86046(t,e,r){r.d(e,{D5:()=>m,HT:()=>u,M6:()=>f,MA:()=>c,Pc:()=>p,ZF:()=>l,hk:()=>d,j6:()=>y,jA:()=>o});var n=r(31481),s=r(27102),a=r(17142),i=r(11597);function o(t,e){if("slug"===e.type)return e;if("stargiftResale"===e.type){const{slug:r,peerId:n}=e,s=(0,i.PVB)(t,n);if(!s)return;return{type:"stargiftResale",slug:r,peer:s,currency:e.currency}}if("stargift"===e.type){const{peerId:r,shouldHideName:n,giftId:s,message:a,shouldUpgrade:o}=e,u=(0,i.PVB)(t,r);if(!u)return;return{type:"stargift",peer:u,shouldHideName:n,giftId:s,message:a,shouldUpgrade:o}}if("starsgift"===e.type){const{userId:r,stars:n,amount:s,currency:a}=e,o=(0,i.mBe)(t,r);if(!o)return;return{type:"stars",purpose:{type:"starsgift",user:o,stars:n,amount:s,currency:a}}}if("stars"===e.type){const{stars:r,amount:n,currency:s,spendPurposePeerId:a}=e;return{type:"stars",purpose:{type:"stars",stars:r,amount:n,currency:s,spendPurposePeer:a?(0,i.PVB)(t,a):void 0}}}if("chatInviteSubscription"===e.type){const{hash:t}=e;return{type:"chatInviteSubscription",hash:t}}if("message"===e.type){const r=(0,i.hds)(t,e.chatId);if(!r)return;return{type:"message",chat:r,messageId:e.messageId}}if("premiumGiftStars"===e.type){const{months:r,userId:n,message:s}=e,a=(0,i.mBe)(t,n);if(!a)return;return{type:"premiumGiftStars",months:r,message:s,user:a}}if("giftcode"===e.type){const{userIds:r,boostChannelId:n,amount:s,currency:a,option:o,message:u}=e;return{type:"giveaway",option:o,purpose:{type:"giftcode",amount:s,currency:a,users:r.map(e=>(0,i.mBe)(t,e)).filter(Boolean),boostChannel:n?(0,i.hds)(t,n):void 0,message:u}}}if("starsgiveaway"===e.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:a,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:p,prizeDescription:d,stars:l,users:f}=e,m=(0,i.hds)(t,r);if(!m)return;const y=n?.map(e=>(0,i.hds)(t,e)).filter(Boolean);return{type:"starsgiveaway",purpose:{type:"starsgiveaway",amount:s,currency:a,chat:m,additionalChannels:y,untilDate:o,areWinnersVisible:u,countries:c,isOnlyForNewSubscribers:p,prizeDescription:d,stars:l,users:f}}}if("giveaway"===e.type){const{chatId:r,additionalChannelIds:n,amount:s,currency:a,option:o,untilDate:u,areWinnersVisible:c,countries:p,isOnlyForNewSubscribers:d,prizeDescription:l}=e,f=(0,i.hds)(t,r);if(!f)return;const m=n?.map(e=>(0,i.hds)(t,e)).filter(Boolean);return{type:"giveaway",option:o,purpose:{type:"giveaway",amount:s,currency:a,chat:f,additionalChannels:m,untilDate:u,areWinnersVisible:c,countries:p,isOnlyForNewSubscribers:d,prizeDescription:l}}}if("stargiftUpgrade"===e.type){const{inputSavedGift:r,shouldKeepOriginalDetails:n}=e,s=u(t,r);if(!s)return;return{type:"stargiftUpgrade",inputSavedGift:s,shouldKeepOriginalDetails:n}}if("stargiftTransfer"===e.type){const{inputSavedGift:r,recipientId:n}=e,s=u(t,r),a=(0,i.PVB)(t,n);if(!s||!a)return;return{type:"stargiftTransfer",inputSavedGift:s,recipient:a}}if("stargiftDropOriginalDetails"===e.type){const{inputSavedGift:r}=e,n=u(t,r);if(!n)return;return{type:"stargiftDropOriginalDetails",inputSavedGift:n}}if("stargiftPrepaidUpgrade"===e.type){const{peerId:r,hash:n}=e,s=(0,i.PVB)(t,r);if(!s)return;return{type:"stargiftPrepaidUpgrade",peer:s,hash:n}}if("stargiftAuctionBid"===e.type){const{giftId:r,bidAmount:n,peerId:s,message:a,shouldHideName:o,isUpdateBid:u}=e;return{type:"stargiftAuctionBid",giftId:r,bidAmount:n,peer:s?(0,i.PVB)(t,s):void 0,message:a,shouldHideName:o,isUpdateBid:u}}}function u(t,e){if("user"===e.type)return e;if("chat"===e.type){const r=(0,i.hds)(t,e.chatId);if(!r)return;return{type:"chat",chat:r,savedId:e.savedId}}}function c(t){return"peer"!==t.peer.type||Boolean(t.isPostsSearch)}function p(t){const{peer:e}=t,r=t.amount.currency===n.ykW;return t.isPostsSearch?{avatarIcon:"search",isCustomPeer:!0,title:"",peerColorId:5}:"appStore"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.AppleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.AppleTopUp.Subtitle",peerColorId:5}:"playMarket"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.GoogleTopUp.Title",subtitleKey:"Stars.Intro.Transaction.GoogleTopUp.Subtitle",peerColorId:3}:"fragment"===e.type?r?{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Gift.Received.Title",subtitleKey:"Stars.Intro.Transaction.Gift.UnknownUser",customPeerAvatarColor:"#000000"}:{avatarIcon:"fragment",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.FragmentTopUp.Title",subtitleKey:"Stars.Intro.Transaction.FragmentTopUp.Subtitle",customPeerAvatarColor:"#000000"}:"premiumBot"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Title",subtitleKey:"Stars.Intro.Transaction.PremiumBotTopUp.Subtitle",peerColorId:1,withPremiumGradient:!0}:"ads"===e.type?{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramAds.Title",subtitleKey:"Stars.Intro.Transaction.TelegramAds.Subtitle",peerColorId:2}:"api"===e.type?{avatarIcon:"bots",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.TelegramBotApi.Title",subtitleKey:"Stars.Intro.Transaction.TelegramBotApi.Subtitle",peerColorId:4}:{avatarIcon:"star",isCustomPeer:!0,titleKey:"Stars.Intro.Transaction.Unsupported.Title",subtitleKey:"Stars.Intro.Transaction.Unsupported.Title",peerColorId:0}}function d(t,e){if(e.currency===n.OUy){const r=e.amount+e.nanos/1e9;return r<0?`- ${t.number(Math.abs(r))}`:`+ ${t.number(r)}`}if(e.currency===n.ykW){const r=(0,a.wD)(e.amount),n=Math.abs(r);return r<0?`- ${t.preciseNumber(n)}`:`+ ${t.preciseNumber(n)}`}}function l(t,e){return t.number(e.amount+e.nanos/1e9)}function f(t){const{action:e}=t.content;if("giftStars"===e?.type){const{transactionId:r,stars:s}=e;return{id:r,amount:{currency:n.OUy,amount:s,nanos:0},peer:{type:"peer",id:t.isOutgoing?t.chatId:t.senderId||t.chatId},date:t.date,isGift:!0,isMyGift:t.isOutgoing||void 0}}if("giftTon"===e?.type){const{transactionId:r,cryptoAmount:s}=e;return{id:r,amount:{currency:n.ykW,amount:s},peer:{type:"fragment"},date:t.date,isGift:!0,isMyGift:t.isOutgoing||void 0}}}function m(t){const{action:e}=t.content;if("prizeStars"!==e?.type)return;const{transactionId:r,stars:s,boostPeerId:a}=e;return{id:r,amount:{currency:n.OUy,amount:s,nanos:0},peer:{type:"peer",id:a},date:t.date,giveawayPostId:t.id}}function y(t,e){return(0,s.Lz)(t,e)}}}]);
|
|
//# sourceMappingURL=5985.6957dbfe60ba74760f4b.js.map
|