1import{j as e}from"./client-By3tlFYA.js";import{r,ac as B,ad as D,d as H,u as w,a as I,a9 as O,aa as te,ae as ne,t as oe,m as $,f as E,af as Z}from"./index-TEHZzOO_.js";import{c as V}from"./index-DkCxcZFY.js";import{h as ie,N as re,L as y,u as X}from"./short_number-C9zm8Jg6.js";import{a5 as q,a as _,u as j,am as R,I as le,L as ce,bH as de,bI as ue,h as Y,aH as me,bJ as U,bK as T,c as ge,bL as pe,e as fe,bM as he,bN as ve,aF as _e,aG as xe,bO as be}from"./useSelectableClick-CnnB_wkC.js";import{u as Me}from"./use-gesture-react.esm-DRqc-06E.js";import{S as G}from"./add-CxOAEcXl.js";import{aa as je,ab as we,ac as ke,ad as N,W as Ne,V as Se}from"./status_quoted-CQ4Yt3Mw.js";import{S as Te}from"./bookmarks-fill-BJZqYgcx.js";import{S as ye}from"./home-fill-Coz6pq9r.js";import{S as Ce,a as Ie}from"./settings-DdL_27J2.js";import{S as Ee}from"./info-onfAZF3m.js";import{s as Le,S as Ae}from"./notifications-CvBN81-F.js";import{S as Fe}from"./notifications-CQHZPMn8.js";import{S as qe}from"./person_add-fill-D_R35QfA.js";import{S as Re}from"./person_add-D-MnufZZ.js";import{S as Pe}from"./trending_up-B8osPcfX.js";import{A as Be}from"./index-QWDKVtMr.js";import{I as C}from"./icon_with_badge-B3IjZif9.js";import{S as De}from"./search-D7KakQSY.js";import{u as J}from"./follow_button-BbSzPHKy.js";import{M as m}from"./message-CVkQtbZv.js";import{S as W}from"./tag-BoJoWhSB.js";import{S as z}from"./list_alt-DxJSZxN2.js";import"./api-CK6KC-75.js";import{g as He}from"./lists-BonJ7G9t.js";import{I as Oe}from"./hashtag-T8rSpi30.js";const $e=s=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,...s},r.createElement("path",{d:"M160-80v-560q0-33 23.5-56.5T240-720h320q33 0 56.5 23.5T640-640v560L400-200 160-80Zm80-121 160-86 160 86v-439H240v439Zm480-39v-560H280v-80h440q33 0 56.5 23.5T800-800v560h-80ZM240-640h320-320Z"})),u=({icon:s,activeIcon:a,iconComponent:n,activeIconComponent:i,text:o,to:t,href:f,method:p,badge:h,transparent:x,...b})=>{const M=ie(t!=null?t:""),l=V("column-link",{"column-link--transparent":x}),c=typeof h<"u"?e.jsx("span",{className:"column-link__badge",children:h}):null,v=n?e.jsx(q,{id:typeof s=="string"?s:"",icon:n,className:"column-link__icon"}):s,k=a!=null?a:i?e.jsx(q,{id:typeof s=="string"?s:"",icon:i,className:"column-link__icon"}):v,S=!!M;return f?e.jsxs("a",{href:f,className:l,"data-method":p,...b,children:[S?k:v,e.jsx("span",{children:o}),c]}):t?e.jsxs(re,{to:t,className:l,...b,children:[S?k:v,e.jsx("span",{children:o}),c]}):null},Ze=()=>{const s=_(t=>B?t.accounts.get(B):void 0),a=_(t=>D?t.accounts.get(D):void 0),n=j(),i=r.useCallback(t=>(t.preventDefault(),t.stopPropagation(),n(R({modalType:"CONFIRM_LOG_OUT",modalProps:{}})),!1),[n]),o=e.jsxs(y,{to:"/@".concat(s==null?void 0:s.acct),children:[s==null?void 0:s.acct,"@",H]});return e.jsxs("div",{className:"sign-in-banner",children:[e.jsx("p",{children:a?e.jsx(m,{id:"moved_to_account_banner.text",defaultMessage:"Your account {disabledAccount} is currently disabled because you moved to {movedToAccount}.",values:{disabledAccount:o,movedToAccount:e.jsx(y,{to:"/@".concat(a.acct),children:a.acct.includes("@")?a.acct:"".concat(a.acct,"@").concat(H)})}}):e.jsx(m,{id:"disabled_account_banner.text",defaultMessage:"Your account {disabledAccount} is currently disabled.",values:{disabledAccount:o}})}),e.jsx("a",{href:"/auth/edit",className:"button button--block",children:e.jsx(m,{id:"disabled_account_banner.account_settings",defaultMessage:"Account settings"})}),e.jsx("button",{type:"button",className:"button button--block button-tertiary",onClick:i,children:e.jsx(m,{id:"confirmations.logout.confirm",defaultMessage:"Log out"})})]})},Ue=s=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,...s},r.createElement("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})),Ge=s=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,...s},r.createElement("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})),Q=({children:s,to:a,icon:n,iconComponent:i,activeIconComponent:o,title:t,collapseTitle:f,expandTitle:p,loading:h})=>{const[x,b]=r.useState(!1),M=r.useId(),l=r.useCallback(()=>{b(c=>!c)},[b]);return e.jsxs("div",{className:"navigation-panel__list-panel",children:[e.jsxs("div",{className:"navigation-panel__list-panel__header",children:[e.jsx(u,{transparent:!0,to:a,icon:n,iconComponent:i,activeIconComponent:o,text:t,id:"".concat(M,"-title")}),(h||s.length>0)&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"navigation-panel__list-panel__header__sep"}),e.jsx(le,{icon:"down",expanded:x,iconComponent:h?ce:x?Ge:Ue,title:x?f:p,onClick:l,"aria-controls":"".concat(M,"-content")})]})]}),s.length>0&&x&&e.jsx("div",{className:"navigation-panel__list-panel__items",role:"region",id:"".concat(M,"-content"),"aria-labelledby":"".concat(M,"-title"),children:s})]})},L=I({followedTags:{id:"navigation_bar.followed_tags",defaultMessage:"Followed hashtags"},expand:{id:"navigation_panel.expand_followed_tags",defaultMessage:"Expand followed hashtags menu"},collapse:{id:"navigation_panel.collapse_followed_tags",defaultMessage:"Collapse followed hashtags menu"}}),We=4,ze=()=>{const s=w(),a=j(),{tags:n,stale:i,loading:o}=_(t=>t.followedTags);return r.useEffect(()=>{i&&a(de())},[a,i]),e.jsx(Q,{to:"/followed_tags",icon:"hashtag",iconComponent:W,title:s.formatMessage(L.followedTags),collapseTitle:s.formatMessage(L.collapse),exp
1andTitle:s.formatMessage(L.expand),loading:o,children:n.slice(0,We).map(t=>e.jsx(u,{transparent:!0,icon:"hashtag",iconComponent:W,text:"#".concat(t.name),to:"/tags/".concat(t.name)},t.name))})},K=s=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:24,viewBox:"0 -960 960 960",width:24,...s},r.createElement("path",{d:"M320-280q17 0 28.5-11.5T360-320q0-17-11.5-28.5T320-360q-17 0-28.5 11.5T280-320q0 17 11.5 28.5T320-280Zm0-160q17 0 28.5-11.5T360-480q0-17-11.5-28.5T320-520q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440Zm0-160q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm120 320h240v-80H440v80Zm0-160h240v-80H440v80Zm0-160h240v-80H440v80ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),A=I({lists:{id:"navigation_bar.lists",defaultMessage:"Lists"},expand:{id:"navigation_panel.expand_lists",defaultMessage:"Expand list menu"},collapse:{id:"navigation_panel.collapse_lists",defaultMessage:"Collapse list menu"}}),Ke=()=>{const s=w(),a=j(),n=_(t=>He(t)),[i,o]=r.useState(!1);return r.useEffect(()=>{o(!0),a(ue()).then(()=>(o(!1),""))},[a,o]),e.jsx(Q,{to:"/lists",icon:"list-ul",iconComponent:z,activeIconComponent:K,title:s.formatMessage(A.lists),collapseTitle:s.formatMessage(A.collapse),expandTitle:s.formatMessage(A.expand),loading:i,children:n.map(t=>e.jsx(u,{icon:"list-ul",iconComponent:z,activeIconComponent:K,text:t.title,to:"/lists/".concat(t.id),transparent:!0},t.id))})},g=I({blocks:{id:"navigation_bar.blocks",defaultMessage:"Blocked users"},domainBlocks:{id:"navigation_bar.domain_blocks",defaultMessage:"Blocked domains"},mutes:{id:"navigation_bar.mutes",defaultMessage:"Muted users"},filters:{id:"navigation_bar.filters",defaultMessage:"Muted words"},administration:{id:"navigation_bar.administration",defaultMessage:"Administration"},moderation:{id:"navigation_bar.moderation",defaultMessage:"Moderation"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},automatedDeletion:{id:"navigation_bar.automated_deletion",defaultMessage:"Automated post deleti
1on"},accountSettings:{id:"navigation_bar.account_settings",defaultMessage:"Password and security"},importExport:{id:"navigation_bar.import_export",defaultMessage:"Import and export"},privacyAndReach:{id:"navigation_bar.privacy_and_reach",defaultMessage:"Privacy and reach"}}),Ve=()=>{const s=w(),{permissions:a}=Y(),n=j(),i=r.useMemo(()=>{const o=[{href:"/filters",text:s.formatMessage(g.filters)},{to:"/mutes",text:s.formatMessage(g.mutes)},{to:"/blocks",text:s.formatMessage(g.blocks)},{to:"/domain_blocks",text:s.formatMessage(g.domainBlocks)},null,{href:"/settings/privacy",text:s.formatMessage(g.privacyAndReach)},{href:"/statuses_cleanup",text:s.formatMessage(g.automatedDeletion)},{href:"/auth/edit",text:s.formatMessage(g.accountSettings)},{href:"/settings/export",text:s.formatMessage(g.importExport)}];je(a)&&o.push(null,{href:"/admin/reports",text:s.formatMessage(g.moderation)}),we(a)&&o.push({href:"/admin/dashboard",text:s.formatMessage(g.administration)});const t=()=>{n(R({modalType:"CONFIRM_LOG_OUT",modalProps:{}}))};return o.push(null,{text:s.formatMessage(g.logout),action:t}),o},[s,n,a]);return e.jsx(me,{items:i,placement:"bottom-start",children:e.jsxs("button",{className:"column-link column-link--transparent",children:[e.jsx(q,{id:"",icon:ke,className:"column-link__icon"}),e.jsx(m,{id:"navigation_bar.more",defaultMessage:"More"})]})})},Xe=()=>{const s=j(),a=r.useCallback(()=>s(R({modalType:"CLOSED_REGISTRATIONS",modalProps:{}})),[s]);let n;const i=_(o=>{var t;return(t=o.server.getIn(["server","registrations","url"],null))!=null?t:"/auth/sign_up"});return O?e.jsxs("div",{className:"sign-in-banner",children:[e.jsx("p",{children:e.jsx("strong",{children:e.jsx(m,{id:"sign_in_banner.mastodon_is",defaultMessage:"Mastodon is the best way to keep up with what's happening."})})}),e.jsx("p",{children:e.jsx(m,{id:"sign_in_banner.follow_anyone",defaultMessage:"Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight."})}),e.jsx("a",{href:O,"data-method":"post",className:"button button--block button-tertiary",children:e.jsx(m,{id:"sign_in_banner.sso_redirect",defaultMessage:"Login or Register"})})]}):(te?n=e.jsx("a",{href:i,className:"button button--block",children:e.jsx(m,{id:"sign_in_banner.create_account",defaultMessage:"Create account"})}):n=e.jsx("button",{className:"button button--block",onClick:a,children:e.jsx(m,{id:"sign_in_banner.create_account",defaultMessage:"Create account"})}),e.jsxs("div",{className:"sign-in-banner",children:[e.jsx("p",{children:e.jsx("strong",{children:e.jsx(m,{id:"sign_in_banner.mastodon_is",defaultMessage:"Mastodon is the best way to keep up with what's happening."})})}),e.jsx("p",{children:e.jsx(m,{id:"sign_in_banner.follow_anyone",defaultMessage:"Follow anyone across the fediverse and see it all in chronological order. No algorithms, ads, or clickbait in sight."})}),n,e.jsx("a",{href:"/auth/sign_in",className:"button button--block button-tertiary",children:e.jsx(m,{id:"sign_in_banner.sign_in",defaultMessage:"Login"})})]}))},Ye=()=>{const s=j(),a=_(n=>n.trends.getIn(["tags","items"]));return r.useEffect(()=>{s(U());const n=setInterval(()=>{s(U())},900*1e3);return()=>{clearInterval(n)}},[s]),!ne||a.isEmpty()?null:e.jsx("div",{className:"navigation-panel__portal",children:e.jsxs("div",{className:"getting-started__trends",children:[e.jsx("h4",{children:e.jsx(y,{to:"/explore/tags",children:e.jsx(m,{id:"trends.trending_now",defaultMessage:"Trending now"})})}),a.take(4).map(n=>e.jsx(Oe,{hashtag:n},n.get("name")))]})})},d=I({home:{id:"tabs_bar.home",defaultMessage:"Home"},notifications:{id:"tabs_bar.notifications",defaultMessage:"Notifications"},explore:{id:"explore.title",defaultMessage:"Trending"},firehose:{id:"column.firehose",defaultMessage:"Live feeds"},firehose_singular:{id:"column.firehose_singular",defaultMessage:"Live feed"},direct:{id:"navigation_bar.direct",defaultMessage:"Private mentions"},favourites:{id:"navigation_bar.favourites",defaultMessage:"Favorites"},bookmarks:{id:"navigation_bar.bookmarks",defaultMessage:"Bookmarks"},preferences:{id:"navigation_bar.preferences",defaultMessage:"Preferences"},followsAndFollowers:{id:"navigation_bar.follows_and_followers",defaultMessage:"Follows and followers"},about:{id:"navigation_bar.about",defaultMessage:"About"},search:{id:"navigation_bar.search",defaultMessage:"Search"},searchTrends:{id:"navigation_bar.search_trends",defaultMessage:"Search / Trending"},advancedInterface:{id:"navigation_bar.advanced_interface",defaultMessage:"Open in advanced web interface"},openedInClassicInterface:{id:"navigation_bar.opened_in_classic_interface",defaultMessage:"Posts, accounts, and other specific pages are opened by default in the classic web interface."},followRequests:{id:"navigation_bar.follow_requests",defaultMessage:"Follow requests"},logout:{id:"navigation_bar.logout",defaultMessage:"Logout"},compose:{id:"tabs_bar.publish",defaultMessage:"New Post"}}),Je=()=>{const s=_(Le),a=w();return e.jsx(u,{transparent:!0,to:"/notifications",icon:e.jsx(C,{id:"bell",icon:Fe,count:s,className:"column-link__icon"}),activeIcon:e.jsx(C,{id:"bell",icon:Ae,count:s,className:"column-link__icon"}),text:a.formatMessage(d.notifications)},"notifications")},Qe=()=>{const s=w(),a=_(i=>{var o,t;return(t=(o=i.user_lists.getIn(["follow_requests","items"]))==null?void 0:o.size)!=null?t:0}),n=j();return r.useEffect(()=>{n(be())},[n]),a===0?null:e.jsx(u,{transparent:!0,to:"/follow_requests",icon:e.jsx(C,{id:"user-plus",icon:Re,count:a,className:"column-link__icon"}),activeIcon:e.jsx(C,{id:"user-plus",icon:qe,count:a,className:"column-link__icon"}),text:s.formatMessage(d.followRequests)})},es=()=>$?e.jsx("div",{className:"navigation-bar",children:e.jsx(Be,{id:$,minimal:!0,size:36})}
1):null,ss=(s,{pathname:a})=>!!s||a.startsWith("/public"),F=284,as=({multiColumn:s=!1})=>{const a=w(),{signedIn:n,permissions:i,disabledAccountId:o}=Y(),t=X(),f=J("full")&&!s;let p;return he&&(p=e.jsxs("div",{className:"switch-to-advanced",children:[a.formatMessage(d.openedInClassicInterface)," ",e.jsx("a",{href:"/deck".concat(t.pathname),className:"switch-to-advanced__toggle",children:a.formatMessage(d.advancedInterface)})]})),e.jsxs("div",{className:"navigation-panel",children:[e.jsx("div",{className:"navigation-panel__logo",children:e.jsx(y,{to:"/",className:"column-link column-link--logo",children:e.jsx(ve,{})})}),f&&e.jsx(De,{singleColumn:!0}),!s&&e.jsx(es,{}),p&&e.jsx("div",{className:"navigation-panel__banner",children:p}),e.jsxs("div",{className:"navigation-panel__menu",children:[n&&e.jsxs(e.Fragment,{children:[!s&&e.jsx(u,{to:"/publish",icon:"plus",iconComponent:G,activeIconComponent:G,text:a.formatMessage(d.compose),className:"button navigation-panel__compose-button"}),e.jsx(u,{transparent:!0,to:"/home",icon:"home",iconComponent:Ce,activeIconComponent:ye,text:a.formatMessage(d.home)})]}),oe&&e.jsx(u,{transparent:!0,to:"/explore",icon:"explore",iconComponent:Pe,text:a.formatMessage(d.explore)}),(N(n,i,E)||N(n,i,Z))&&e.jsx(u,{transparent:!0,to:N(n,i,E)?"/public/local":"/public/remote",icon:"globe",iconComponent:Ne,isActive:ss,text:a.formatMessage(N(n,i,E)&&N(n,i,Z)?d.firehose:d.firehose_singular)}),n&&e.jsxs(e.Fragment,{children:[e.jsx(Je,{}),e.jsx(Qe,{}),e.jsx("hr",{}),e.jsx(Ke,{}),e.jsx(ze,{}),e.jsx(u,{transparent:!0,to:"/favourites",icon:"star",iconComponent:xe,activeIconComponent:_e,text:a.formatMessage(d.favourites)}),e.jsx(u,{transparent:!0,to:"/bookmarks",icon:"bookmarks",iconComponent:$e,activeIconComponent:Te,text:a.formatMessage(d.bookmarks)}),e.jsx(u,{transparent:!0,to:"/conversations",icon:"at",iconComponent:Se,text:a.formatMessage(d.direct)}),e.jsx("hr",{}),e.jsx(u,{transparent:!0,href:"/settings/preferences",icon:"cog",iconComponent:Ie,text:a.formatMessage(d.preferences)}),e.jsx(Ve,{})]}),e.jsx("div",{className:"navigation-panel__legal",children:e.jsx(u,{transparent:!0,to:"/about",icon:"ellipsis-h",iconComponent:Ee,text:a.formatMessage(d.about)})}),!n&&e.jsxs("div",{className:"navigation-panel__sign-in-banner",children:[e.jsx("hr",{}),o?e.jsx(Ze,{}):e.jsx(Xe,{})]})]}),e.jsx("div",{className:"flex-spacer"}),e.jsx(Ye,{})]})},Es=()=>{const s=_(l=>l.navigation.open),a=j(),n=J("openable"),i=X(),o=r.useRef(null);r.useEffect(()=>{a(T())},[a,i]),r.useEffect(()=>{const l=v=>{o.current&&v.target===o.current&&a(T())},c=v=>{v.key==="Escape"&&a(T())};return document.addEventListener("click",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("click",l),document.removeEventListener("keyup",c)}},[a]);const t=getComputedStyle(document.body).direction!=="rtl",f=t?F:-F,[{x:p},h]=ge(()=>({x:s?0:f,onRest:{x({value:l}){l===0?a(pe()):(t?l>0:l<0)&&a(T())}}}),[s]),x=Me(({last:l,offset:[c],velocity:[v],direction:[k],cancel:S})=>{const ee=t?k:-k,P=t?c:-c;if(P<-70&&S(),l){const se=P>F/2,ae=v>.5&&ee>0;se||ae?h.start({x:f}):h.start({x:0})}else h.start({x:c,immediate:!0})},{from:()=>[p.get(),0],filterTaps:!0,bounds:t?{left:0}:{right:0},rubberband:!0,enabled:n}),b=r.useRef();r.useEffect(()=>{var l;if(s){const c=document.querySelector(".navigation-panel__menu .column-link");b.current=document.activeElement,c==null||c.focus()}else(l=b.current)==null||l.focus()},[s]);const M=n&&s;return e.jsx("div",{className:V("columns-area__panels__pane columns-area__panels__pane--start columns-area__panels__pane--navigational",{"columns-area__panels__pane--overlay":M}),ref:o,children:e.jsx(fe.div,{className:"columns-area__panels__pane__inner",...x(),style:n?{x:p}:void 0,children:e.jsx(as,{})})})};export{Es as C,as as N}; 2//# sourceMappingURL=index-ysMDU_Ri.js.map
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.