PageSourceSearch

https://static.boosty.to/js/index.B9su_v3B.js

js boosty.to collected 2026-10-01 07:16:07 UTC 10,486 bytes, 1 lines download raw bytes

1import{d as B,u as H,l as O,i as Q,f as A,j as t,c as C}from"./vendor.CrY80Nml.js";import{bd as V,b as q,g6 as Y,bb as M,eH as tt,cX as et,d as ot,bj as st,j as F,g7 as R,a8 as y,a9 as nt,c6 as U,g8 as ct,g9 as at,c7 as it,ga as rt,gb as lt,ad as dt,gc as ut,af as pt,gd as mt,ge as D,gf as gt,I as ht,o as _t,O as P,C as xt,gg as At,gh as St}from"./app.dzbmMYEY.js";import"./icons.C_MsxUgD.js";const Tt=B.getTranslation("@founder/common/containers.Settings.SettingsExternalApps.hooks.useDiscordConnect"),ft=async(e,o)=>{const s=V(e);return{providerUrl:await s.urlTemplate({isExternalAccountLink:!0,currentUrl:o}),redirectUri:s.redirectUri}},Bt=e=>{const{isMobile:o,isWidget:s,isFromStreams:c}=e;return o&&!s&&!c},z=e=>(e==null?void 0:e.errorMessage)??"",Nt=(e,o)=>{const{projectName:s}=o;return(e==null?void 0:e.status)===400?B.getParametrizedText(Tt.discordServerInUse,{projectName:s}):z(e)},It={width:600,height:750},Ct=()=>{const{isMobile:e,isWidget:o,isFromStreams:s,projectName:{latinCapitalized:c}}=F(),r=H(),{showAlert:d}=q(),{openWindow:l}=Y(),p=Bt({isMobile:e,isWidget:o,isFromStreams:s}),m=async u=>{const{providerCode:T,windowSize:f,getErrorText:g}=u,{providerUrl:x,redirectUri:k}=await ft(T,window.location.toString());if(p){window.location.assign(x);return}const N=tt(),I=()=>{N&&st(N)};try{await l({url:x,redirectUrl:k,...f}),I(),await r(O.thunkToAction(et.action)())}catch(v){I();const a=g(v);a&&d({type:ot.ERROR,text:a})}};return{connectToDiscord:async()=>m({providerCode:M.Discord,getErrorText:z}),connectToDiscordBot:async()=>m({providerCode:M.DiscordBot,windowSize:It,getErrorText:u=>Nt(u,{projectName:c})})}},kt=B.getTranslation("@founder/common/containers.Settings.SettingsExternalApps.hooks.useSettingsExternalApps"),vt=()=>{const{isMobile:e,externalApps:{telegram:o,max:s}}=F(),c=H(),{showPopup:r,closePopup:d}=Q.useOverlayPopups(),{connectToDiscord:l,connectToDiscordBot:p}=Ct(),{url:m}=R("telegram",e),{url:_}=R("max",e&&y(nt.MAX)),h=A(U("telegram")),u=A(ct),T=A(U("discord")),f=A(at),g=A(it),x=A(rt),k=A(U("max")),N=A(lt("max")),{isBlogger:I}=dt(),v=()=>c(O.thunkToAction(ut.action)()),a=w=>()=>{const{id:L}=r({type:pt.CONFIRM,data:{description:B.getParametrizedText(kt.disconnectConfirmationText,{externalApp:w}),onConfirm:async()=>{await c(O.thunkToAction(mt.action)({type:w})),d(L)}}})},$={telegram:m,max:_},j=w=>L=>{if(L.preventDefault(),e){D($[w]);return}r({type:gt[w]})},X=()=>{D(o.bots.chat.url)},Z=()=>{D(o.bots.posting.url)},G=()=>{D(s.bots.chat.url)},W={discord:T,telegram:h,max:k},J={discord:f,telegram:u,max:N},K={discord:l,telegram:j("telegram"),max:j("max")};return{isBlogger:I,hasAccount:W,userName:J,hasDiscordServer:g,discordServerName:x,connectToApp:K,connectToDiscordBot:p,openTelegramChatBot:X,openTelegramPostingBot:Z,openMaxChatBot:G,disconnectFromApp:a,disconnectDiscordServer:v}},wt="StatusTag-scss--module_root_NO3kU",jt="StatusTag-scss--module_dot_nudZL",Dt="StatusTag-scss--module_text_et0px",bt="StatusTag-scss--module_connected_1SX9K",Et="StatusTag-scss--module_fadeIn_VZ3CO",$t="StatusTag-scss--module_fadeOut_CpYU5",Lt="StatusTag-scss--module_dropdownAnimationFadeIn_e899h",Ut="StatusTag-scss--module_flashing_FCDBE",Ot="StatusTag-scss--module_loading_6yuw5",Pt="StatusTag-scss--module_rotating_NpJ9s",Ft="StatusTag-scss--module_growIn_-zy9y",Mt="StatusTag-scss--module_closeLock_-iVtn",Rt="StatusTag-scss--module_shakeLock_rOpYk",Ht="StatusTag-scss--module_flashToHighlight_C0ja0",yt="StatusTag-scss--module_flash_SlhbF",b={root:wt,dot:jt,text:Dt,connected:bt,fadeIn:Et,fadeOut:$t,dropdownAnimationFadeIn:Lt,flashing:Ut,loading:Ot,rotating:Pt,growIn:Ft,closeLock:Mt,shakeLock:Rt,flashToHighlight:Ht,flash:yt},zt=e=>{const{className:o,isConnected:s,text:c}=e;return t.jsxs("div",{className:C(b.root,{[b.connected]:s},o),children:[t.jsx("span",{className:b.dot}),t.jsx("span",{className:b.text,children:c})]})},Xt="AppSection-scss--module_root_Mn1C7",Zt="AppSection-scss--module_header_SDBxU",Gt="AppSection-scss--module_left_3irG7",Wt="AppSection-scss--module_icon_32nNG",Jt="AppSection-scss--module_titleBlock_AXWeY",Kt="AppSection-scss--module_titleRow_zpInh",Qt="AppSection-scss--module_title_7E23Q",Vt="AppSection-scss--module_userName_Msa53",qt="AppSection-scss--module_description_MRBM8",Yt="AppSection-scss--module_actions_ExDxi",te="AppSection-scss--module_tutorialLink_cup40",ee="AppSection-scss--module_actionButton_kZNJw",oe="AppSection-scss--module_dangerButton_wALFq",se="AppSection-scss--module_fadeIn_UCZzO",ne="AppSection-scss--module_fadeOut_sKXMQ",ce="AppSection-scss--module_dropdownAnimationFadeIn_UsMMX",ae="AppSection-scss--module_flashing_Gxjpc",ie="AppSection-scss--module_loading_XB5CJ",re="AppSection-scss--module_rotating_hg3JN",le="AppSection-scss--module_growIn_8b6A9",de="AppSection-scss--module_closeLock_LkPNc",ue="AppSection-scss--module_shakeLock_QwQiX",pe="AppSection-scss--module_flashToHighlight_JgGql",me="AppSection-scss--module_flash_qADN2",i={root:Xt,header:Zt,left:Gt,icon:Wt,titleBlock:Jt,titleRow:Kt,title:Qt,userName:Vt,description:qt,actions:Yt,tutorialLink:te,actionButton:ee,dangerButton:oe,fadeIn:se,fadeOut:ne,dropdownAnimationFadeIn:ce,flashing:ae,loading:ie,rotating:re,growIn:le,closeLock:de,shakeLock:ue,flashToHighlight:pe,flash:me},ge=e=>{const{className:o,icon:s,title:c,userName:r,description:d,isConnected:l,statusText:p,connectButtonText:m,disconnectButtonText:_,tutorialButtonText:h,tutorialUrl:u,children:T,onConnectClick:f,onDisconnectClick:g}=e,x=!!(h&&u);return t.jsxs("div",{className:C(i.root,o),children:[t.jsxs("div",{className:i.header,children:[t.jsxs("div",{className:i.left,children:[t.jsx(ht,{glyph:s,className:i.icon}),t.jsxs("div",{className:i.titleBlock,children:[t.jsxs("div",{className:i.titleRow,children:[t.jsx("span",{className:i.title,children:c}),t.jsx(zt,{isConnected:l,text:p})]}),l&&r&&t.jsx("span",{className:i.userName,children:r}),d&&t.jsx("span",{className:i.description,children:d})]})]}),t.jsxs("div",{className:i.actions,children:[x&&t.jsx(_t,{to:u,target:"_blank",rel:"noopener noreferrer",noStyles:!0,className:i.tutorialLink,children:t.jsx(P,{type:"button",className:i.actionButton,children:h})}),l?t.jsx(P,{type:"button",className:C(i.actionButton,i.dangerButton),onClick:g,children:_}):t.jsx(xt,{type:"button",className:i.actionButton,onClick:f,children:m})]})]}),T]})},he="AppSectionItem-scss--module_root_Z4Trg",_e="AppSectionItem-scss--module_content_iACnA",xe="AppSectionItem-scss--module_header_B2eTT",Ae="AppSectionItem-scss--module_title_ZUep-",Se="AppSectionItem-scss--module_handle_PZvkP",Te="AppSectionItem-scss--module_description_GmD4o",fe="AppSectionItem-scss--module_button_OApgS",Be="AppSectionItem-scss--module_dangerButton_8DyYd",Ne="AppSectionItem-scss--module_fadeIn_KuKe1",Ie="AppSectionItem-scss--module_fadeOut_iOL5q",Ce="AppSectionItem-scss--module_dropdownAnimationFadeIn_zskgH",ke="AppSectionItem-scss--module_flashing_X1-aA",ve="AppSectionItem-scss--module_loading_Jv1t2",we="AppSectionItem-scss--module_rotating_xB1c6",je="AppSectionItem-scss--module_growIn_fVdIc",De="AppSectionItem-scss--module_closeLock_SlPfa",be="AppSectionItem-scss--module_shakeLock_txn0h",Ee="AppSectionItem-scss--module_flashToHighlight_Q74j0",$e="AppSectionItem-scss--module_flash_cGTfo",S={root:he,content:_e,header:xe,title:Ae,handle:Se,description:Te,button:fe,dangerButton:Be,fadeIn:Ne,fadeOut:Ie,dropdownAnimationFadeIn:Ce,flashing:ke,loading:ve,rotating:we,growIn:je,closeLock:De,shakeLock:be,flashToHighlight:Ee,flash:$e},E=e=>{const{className:o,title:s,handle:c,description:r,buttonText:d,isDanger:l,onButtonClick:p}=e;return t.jsxs("div",{className:C(S.root,o),children:[t.jsxs("div",{className:S.content,children:[t.jsxs("div",{className:S.header,children:[t.jsx("span",{className:S.title,children:s}),c&&t.jsx("span",{className:S.handle,children:c})]}),t.jsx("div",{className:S.description,children:r})]}),t.jsx(P,{type:"button",className:C(S.button,{[S.dangerButton]:l}),onClick:p,children:d})]})},Le="SettingsExternalApps-scss--module_root_T5t0x",Ue={root:Le},n=B.getTranslation("@founder/common/containers.Settings.SettingsExternalApps"),Oe=e=>{const{isBlogger:o,hasDiscordServer:s,discordServerName:c,hasAccount:r,userName:d,classNames:l={},connectToDiscordBot:p,connectToApp:m,disconnectDiscordServer:_,disconnectFromApp:h,openTelegramChatBot:u,openTelegramPostingBot:T,openMaxChatBot:f}=e,{externalApps:g,projectName:{latinCapitalized:x}}=F(),k=s?B.getParametrizedText(n.discord.serverBot.titleConnected,{serverName:c??""}):n.discord.serverBot.title,N=s?n.buttonText.disconnect:n.buttonText.connect,I=()=>
1{if(s){_();return}p()},v=a=>{switch(a){case"telegram":return t.jsxs(t.Fragment,{children:[t.jsx(E,{title:n.telegram.chatBot.title,handle:g.telegram.bots.chat.handle,description:n.telegram.chatBot.description,buttonText:n.buttonText.open,onButtonClick:u}),t.jsx(E,{title:n.telegram.postingBot.title,handle:g.telegram.bots.posting.handle,description:B.getParametrizedText(n.telegram.postingBot.description,{projectName:x}),buttonText:n.buttonText.open,onButtonClick:T})]});case"max":return t.jsx(E,{title:n.max.chatBot.title,handle:g.max.bots.chat.handle,description:n.max.chatBot.description,buttonText:n.buttonText.open,onButtonClick:f});case"discord":return t.jsx(E,{title:k,description:n.discord.serverBot.description,buttonText:N,isDanger:s,onButtonClick:I});default:return null}};return t.jsx("div",{className:C(Ue.root,l.root),children:At.map(({key:a,app:$,feature:j})=>y(j)&&t.jsx(ge,{icon:St[a],title:n[a].title,userName:d[a],description:o?void 0:n[a].subscriberDescription,isConnected:r[a],statusText:r[a]?n.status.connected:n.status.disconnected,connectButtonText:n.buttonText.connect,disconnectButtonText:n.buttonText.disconnect,tutorialButtonText:o?n.buttonText.tutorial:void 0,tutorialUrl:o?g[a].tutorialUrl:void 0,onConnectClick:m[a],onDisconnectClick:h($),children:o&&v(a)},a))})},Pe="SettingsExternalApps-scss--module_root_KLFzV",Fe={root:Pe},ye=()=>{const{isBlogger:e,hasAccount:o,userName:s,hasDiscordServer:c,discordServerName:r,connectToApp:d,connectToDiscordBot:l,openTelegramChatBot:p,openTelegramPostingBot:m,openMaxChatBot:_,disconnectDiscordServer:h,disconnectFromApp:u}=vt();return t.jsx(Oe,{isBlogger:e,hasAccount:o,userName:s,hasDiscordServer:c,discordServerName:r,classNames:{root:Fe.root},connectToApp:d,connectToDiscordBot:l,openTelegramChatBot:p,openTelegramPostingBot:m,openMaxChatBot:_,disconnectFromApp:u,disconnectDiscordServer:h})};export{ye as SettingsExternalApps};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.