"use strict";(self.webpackChunkmofsl_stocomo_web=self.webpackChunkmofsl_stocomo_web||[]).push([[8044],{32143(e,s,n){n.r(s),n.d(s,{default:()=>rs});var a=n(20975),i=n(98020),t=n(78220),l=n(80436),c=n(68197),r=n(42414),o=n(93668),d=n(5607),m=n(31305),h=n(82993),u=n(36128),x=n(12450),p=n(89449),j=n(16118),b=n(30493),f=n(16653),v=n(37081),y=n(51822);var g=n(52041),E=n(31696);const N={REALTIME:{POST_CREATE:"REALTIME:POST_CREATE",POST_DELETE:"REALTIME:POST_DELETE",POST_LIKE:"REALTIME:POST_LIKE",POST_COMMENT_ADD:"REALTIME:POST_COMMENT_ADD",POST_COMMENT_REMOVE:"REALTIME:POST_COMMENT_REMOVE",POST_COMMENT_REACTION_UPDATE:"REALTIME:POST_COMMENT_REACTION_UPDATE",GROUP_UPDATE:"REALTIME:GROUP_UPDATE",SECTION_UPDATE:"REALTIME:SECTION_UPDATE",KARMAPOINT_INCREMENT:"REALTIME:KARMAPOINT_INCREMENT",USER_BLOCKED:"user-blocked"},LOGOUT:"LOGOUT"};function A({socket:e,addToastWithAction:s,addNewNotification:n,community:i,chats:l,setChats:o}){const d=(0,j.ut)(),[m,h]=(0,a.useState)(window.location.pathname.split("/")[2]),u=i?i.id:null,x=null==i?void 0:i.myRole;t.b6.listen((e,s)=>{h(e.pathname.split("/")[2])}),(0,a.useEffect)(()=>{if(e&&d){const a=S(e,T,{token:d,communityId:u}),i=S(e,w),t=S(e,I,{addToastWithAction:s,addNewNotification:n}),l=e=>{};e.on("connect",a),e.on("live-call:start",e=>{c.M.dispatch((0,f.c2)(e.liveCall))}),e.on("live-call:end",e=>{c.M.dispatch((0,f.Yf)(e.liveCall))}),e.on("registered-user",i),e.on("notification",t),e.on("test",l);const r=function(e){const s=[{eventName:N.REALTIME.POST_CREATE,handler:e=>{N.REALTIME.POST_CREATE,c.M.dispatch((0,g.IY)(e.sectionId,e.postId))}},{eventName:N.REALTIME.POST_DELETE,handler:e=>{N.REALTIME.POST_DELETE}},{eventName:N.REALTIME.POST_LIKE,handler:e=>{var s;N.REALTIME.POST_LIKE,c.M.dispatch((0,y.qH)(e)),c.M.dispatch((s=e,async(e,n)=>{const{postDetail:a,auth:i}=n(),t={...a.post},{user:l,increment:c,postId:r,sectionId:o,groupId:d}=s;t&&t.id===r&&i.id!==l.id&&(t.likes+=c,t.likeCount+=c,e((0,v.zM)(t)))}))}},{eventName:N.REALTIME.POST_COMMENT_ADD,handler:e=>{var s;N.REALTIME.POST_COMMENT_ADD,c.M.dispatch((0,y.Im)(e)),c.M.dispatch((s=e,async(e,n)=>{const{postDetail:a,auth:i}=n(),t={...a.post},{postId:l,sectionId:c,groupId:r,postCommentId:o,comment:d}=s,{createdBy:m}=d;t&&t.id===l&&i.id!==m.id&&(t.latestComment=d,Array.isArray(t.comments)&&t.comments.unshift(d),e((0,v.zM)(t)))}))}},{eventName:N.REALTIME.POST_COMMENT_REMOVE,handler:e=>{var s;N.REALTIME.POST_COMMENT_REMOVE,c.M.dispatch((0,y.F9)(e)),c.M.dispatch((s=e,async(e,n)=>{const{postDetail:a,auth:i}=n(),t={...a.post},{postId:l,sectionId:c,groupId:r,postCommentId:o}=s;var d,m;t&&t.id===l&&((null===(d=t.latestComment)||void 0===d?void 0:d.id)===o&&(t.latestComment=null),(null===(m=t.comments)||void 0===m?void 0:m.find(e=>e.id===o))&&(t.commentCount=t.commentCount-1,t.comments=t.comments.filter(e=>e.id!==o)),e((0,v.zM)(t)))}))}},{eventName:N.REALTIME.POST_COMMENT_REACTION_UPDATE,handler:e=>{var s;N.REALTIME.POST_COMMENT_REACTION_UPDATE,c.M.dispatch((0,y.Lj)(e)),c.M.dispatch((s=e,async(e,n)=>{const{postDetail:a,auth:i}=n(),t={...a.post},{postId:l,sectionId:c,groupId:r,postCommentId:o,reaction:d,user:m}=s;if(t&&t.id===l&&i.id!==m.id){var h,u;(null===(h=t.latestComment)||void 0===h?void 0:h.id)===o&&(t.latestComment=(0,y.cG)(t.latestComment,d,m));const s=null===(u=t.comments)||void 0===u?void 0:u.findIndex(e=>e.id===o);s>-1&&(t.comments[s]=(0,y.cG)(t.comments[s],d,m)),e((0,v.zM)(t))}}))}},{eventName:N.REALTIME.GROUP_UPDATE,handler:e=>{N.REALTIME.GROUP_UPDATE}},{eventName:N.REALTIME.SECTION_UPDATE,handler:e=>{N.REALTIME.SECTION_UPDATE}},{eventName:N.REALTIME.KARMAPOINT_INCREMENT,handler:e=>{N.REALTIME.KARMAPOINT_INCREMENT;const{activityType:s,points:n}=e;c.M.dispatch((0,b.AL)(n,s))}},{eventName:N.LOGOUT,handler:e=>{E.A.logout()}},{eventName:N.USER_BLOCKED,handler:e=>{E.A.logout()}}];for(const n of s)e.on(n.eventName,n.handler),M("Registered "+n.eventName+" listener.");return s.length,s}(e);return()=>{e.off("connect",a),e.off("registered-user",i),e.off("notification",t),e.off("test",l),function(e,s=[]){for(const n of s)e.off(n.eventName,n.handler)}(e,r)}}},[e]),(0,a.useEffect)(()=>{if(e){const s=S(e,C,{chats:l,setChats:o,userId:m}),n=S(e,k,{chats:l,setChats:o,userId:m});if(void 0===l)return;return l.forEach(n=>{void 0!==n&&e.on(`direct-message:${n.id}:message-received`,s)}),e.on("direct-message:new-chat",n),()=>{l.forEach(n=>{void 0!==n&&e.off(`direct-message:${n.id}:message-received`,s)}),e.off("direct-message:new-chat",n)}}},[e,m,l]),(0,a.useEffect)(()=>{if(e&&u){const s=S(e,(e,s)=>{c.M.dispatch((0,r.Km)({...i,newUserCount:i.newUserCount?i.newUserCount:0+s.count}))});return e.on(`community:${u}:user-count-change`,s),()=>{e.off(`community:${u}:user-count-change`,s)}}},[e,m,u,x])}const S=(e,s,n={})=>a=>{["development","uat"].includes("production");try{s(e,a,n)}catch(e){}},T=(e,s,n)=>{e.emit("register-user",{token:n.token,communityId:n.communityId})},w=(e,s,n)=>{},I=(e,s,n)=>{var a,i,c;n.addToastWithAction({title:null==s||null===(a=s.notification)||void 0===a?void 0:a.title,message:null==s||null===(i=s.notification)||void 0===i||null===(c=i.post)||void 0===c?void 0:c.title,type:p.lm.info,time:5e3,onClick:e=>{var n,a;null!==(n=s.notification.post)&&void 0!==n&&n.id&&t.b6.push((0,l.w2)(null===(a=s.notification.post)||void 0===a?void 0:a.id));e()}})},C=(e,{message:s},{chats:n,setChats:a,userId:i})=>{if(n.find(e=>e.id===s.sender.id)&&i!==s.sender.id){const e=n.find(e=>e.id===s.sender.id);e.unreadMessageCount=e.unreadMessageCount?e.unreadMessageCount+1:1,a([...n])}},k=(e,{message:s},{chats:n,setChats:a,userId:i})=>{s.sender.id===i&&window.location.reload();const t=(0,j.mZ)();if(n.find(e=>e.id===s.sender.id||e.id===s.receiver.id)){if(i!==s.sender.id&&s.sender.id!==t){const e=n.find(e=>e.id===s.sender.id);e.unreadMessageCount=e.unreadMessageCount?e.unreadMessageCount+1:1,a([...n])}}else a([...n,{...s.sender.id!==t?s.sender:s.receiver,unreadMessageCount:s.sender.id!==t?1:0}])};function M(e,s){}var P=n(96621),O=n(26914),_=n(98130),R=n(94714),z=n(41374),D=n(92082),L=n(88614),q=n(83380),U=n(97843),$=n(63710),G=n(62391);function F({community:e}){if(!e||"admin"!==e.myRole)return null;const s=(0,$.A)(new Date,new Date(e.createdAt)),n=(0,$.A)(new Date(e.planExpiryDate),new Date);return isNaN(n)||n>15||s>15?null:(0,G.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 h-16 border border-border bg-card p-4 text-center font-semibold shadow-inner sm:h-12",style:{zIndex:200},children:[(0,G.jsxs)("span",{children:["You are on a free Trail period for Start Plan. ",n," days left in trial."]}),(0,G.jsxs)("span",{className:"cursor-pointer text-primary",onClick:()=>{window.location.href=l.s},children:[" ","Upgrade the plan"," "]}),"or"," ",(0,G.jsx)("span",{className:"",children:(0,G.jsx)("a",{href:"https://calendly.com/anil-pensil/pensil-demo",className:"cursor-pointer text-primary",children:"Schedule a demo"})})]})}function K({community:e}){const[s,n]=(0,a.useState)(!0);return(0,G.jsx)(G.Fragment,{})}var V=n(72783),W=n.n(V),B=n(24968),Y=n(65186),H=n(62144);function J({user:e,community:s,active:n=!1}){const{analyticsService:i}=(0,Y.W)(),[t,l]=(0,a.useState)(!1);return(0,G.jsx)("a",{href:`https://${(0,j.IT)(s)}`,onClick:n=>{n.preventDefault(),i.track("select-community",{},n=>{window.location.href=`https://${(0,j.IT)(s)}?token=${e.token}`})},title:`${s.name}: ${(0,j.IT)(s)}`,className:W()("CommunityButton mb-4 flex h-12 w-12 cursor-pointer rounded hover:shadow-lg",{active:n}),children:s.logo&&!t?(0,G.jsx)("img",{loading:"lazy",src:s.logo,className:"mr-2 h-12 w-12 flex-shrink-0 rounded",alt:s.name+" Logo",onError:e=>{l(!0)}}):(0,G.jsx)("svg",{className:"h-12 w-12 flex-shrink-0 rounded bg-card",style:{backgroundColor:"#028FDB",color:"white"},children:(0,G.jsx)("text",{x:"50%",y:"50%",fontSize:"21",fontWeight:"bold",textAnchor:"middle",fill:"white",dominantBaseline:"middle",children:(c=s.name,c.split(" ").map(e=>e[0]).slice(0,2).join("").toUpperCase())})})});var c}const X=(0,p.wj)((0,m.Ng)(e=>({community:e.community,user:e.auth}))(function({user:e,community:s,addToast:n,isVisible:i=!1,setSidebarIgnoresCommunitySwitcher:t=e=>{}}){const[l,c]=(0,a.useState)(!1),[r,o]=(0,a.useState)([]);return(0,a.useEffect)(()=>{e&&(c(!0),B.BE.getSubscribedCommunity(e).then(e=>{o(e.communities),c(!1)}).catch(e=>{n("Could not fetch communities!","",p.lm.danger)}))},[]),(0,a.useEffect)(()=>{t(r.length<2)},[r.length,t]),l?(0,G.jsx)("div",{className:"SideCommunitySwitcher rounded",children:(0,G.jsx)("div",{className:"w-full animate-pulse",children:(0,G.jsx)("div",{className:"h-screen w-full bg-card"})})}):(0,G.jsx)("div",{className:W()("SideCommunitySwitcher rounded bg-card",{open:i}),children:(0,G.jsxs)("div",{className:"sidecommunity-list rounded bg-card",children:[r.length>0?r.map(n=>(0,G.jsx)(J,{user:e,active:n.id===s.id,community:n},n.id)):(0,G.jsx)("div",{className:"mb-4 w-96 rounded p-4"}),(0,G.jsx)("a",{href:`https://app${j.pD}`,title:`${s.name}: ${(0,j.IT)(s)}`,className:W()("CommunityButton theme-bg-disable mb-4 flex h-12 w-12 cursor-pointer items-center justify-center rounded hover:shadow-lg"),children:(0,G.jsx)(H.A,{icon:"plus",size:"lg",className:"text-secondary-foreground/80"})})]})})}));var Z=n(47867);function Q({community:e}){var s,n,a,i;const t=null!==(s=null==e||null===(n=e.configurables)||void 0===n?void 0:n.COMMUNITY_DEFAULT_FONT_LINK)&&void 0!==s?s:"",l=null!==(a=null==e||null===(i=e.configurables)||void 0===i?void 0:i.COMMUNITY_DEFAULT_FONT_NAME)&&void 0!==a?a:"";return(0,G.jsx)(Z.A,{style:[{cssText:`\n body {\n font-family: ${l?`"${l}", `:""}"Nunito", sans-serif !important; ;\n }\n `}],children:t?(0,G.jsx)("link",{href:encodeURI(t),rel:"stylesheet"}):""})}var ee=n(16906);const se=function(){return(0,G.jsx)("div",{className:"Header h-12 w-screen border-b border-border bg-card md:w-auto","aria-busy":"true",children:(0,G.jsxs)("div",{className:"header-container h-12 px-3 md:px-6",children:[(0,G.jsxs)("div",{className:"flex h-12 items-center space-x-2",children:[(0,G.jsx)(ee.EA,{variant:"rect",w:42,h:42}),(0,G.jsx)(ee.EA,{variant:"text",w:72,h:16,className:"hidden sm:block",delay:1})]}),(0,G.jsxs)("div",{className:"OtherOptions flex place-content-end items-center space-x-3",children:[(0,G.jsx)(ee.EA,{variant:"rect",w:20,h:20,delay:1}),(0,G.jsx)(ee.EA,{variant:"rect",w:20,h:20,className:"hidden sm:block",delay:2}),(0,G.jsx)(ee.EA,{variant:"rect",w:20,h:20,className:"hidden sm:block",delay:3}),(0,G.jsx)(ee.EA,{variant:"rect",w:20,h:20,className:"hidden sm:block",delay:4}),(0,G.jsx)(ee.EA,{variant:"circle",w:36,h:36,className:"!ml-4",delay:5})]})]})})};function ne({rows:e=4,startDelay:s=0}){return(0,G.jsx)("div",{className:"group-link-holder py-2",children:Array.from({length:e},(e,n)=>(0,G.jsx)("div",{className:"sidebar-heading-holder mx-2 flex items-center rounded px-4 py-1",children:(0,G.jsxs)("div",{className:"flex w-full items-center space-x-3 pr-3",children:[(0,G.jsx)(ee.EA,{variant:"rect",w:20,h:20,delay:s+n}),(0,G.jsx)(ee.EA,{variant:"text",h:10,w:["62%","78%","54%","70%"][n%4],delay:s+n})]})},n))})}function ae({items:e=3,startDelay:s=0}){return(0,G.jsxs)("div",{className:"mb-2 flex flex-col py-2 pt-0",children:[(0,G.jsx)(ee.EA,{variant:"text",w:"48%",h:12,delay:s,className:"ml-2 mb-1"}),Array.from({length:e},(e,n)=>(0,G.jsxs)("div",{className:"mb-3 flex h-8 items-center pl-2",children:[(0,G.jsx)(ee.EA,{variant:"rect",w:21,h:21,delay:s+n+1}),(0,G.jsx)(ee.EA,{variant:"text",h:10,w:["66%","52%","74%"][n%3],delay:s+n+1,className:"ml-2"})]},n))]})}function ie(){return(0,G.jsx)("div",{className:"Sidebar","aria-busy":"true",children:(0,G.jsxs)("div",{className:"sidebar-content select-none overflow-y-auto border-r border-border bg-card p-2",children:[(0,G.jsx)(ne,{rows:4}),(0,G.jsxs)("div",{className:"group-links px-2",children:[(0,G.jsx)(ae,{items:3,startDelay:4}),(0,G.jsx)(ae,{items:2,startDelay:8})]})]})})}function te({cards:e=3,titleBar:s=!0}){return(0,G.jsxs)("div",{className:"flex w-full min-w-0 flex-col",role:"status","aria-busy":"true","aria-label":"Loading",children:[s?(0,G.jsxs)("div",{className:"flex h-16 w-full items-center justify-between border-b border-border bg-card px-5",children:[(0,G.jsx)(ee.EA,{variant:"text",w:112,h:14}),(0,G.jsx)(ee.EA,{variant:"rect",w:104,h:30,radius:999})]}):null,(0,G.jsx)("div",{className:"mx-auto my-6 w-full min-w-0 px-2 md:max-w-[var(--app-shell-feed)] lg:px-[var(--app-shell-gutter)]",children:Array.from({length:e},(e,s)=>(0,G.jsxs)("div",{className:"mb-4 rounded-xl bg-card p-5",children:[(0,G.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,G.jsx)(ee.EA,{variant:"circle",w:42,h:42,delay:3*s}),(0,G.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,G.jsx)(ee.EA,{variant:"text",w:124,h:10,delay:3*s+1}),(0,G.jsx)(ee.EA,{variant:"text",w:72,h:8,delay:3*s+2})]})]}),(0,G.jsx)(ee.EA,{variant:"text",w:"90%",h:10,delay:3*s+1}),(0,G.jsx)(ee.EA,{variant:"text",w:"72%",h:10,delay:3*s+2,className:"mt-2"}),(0,G.jsx)(ee.EA,{variant:"text",w:"45%",h:10,delay:3*s+3,className:"mt-2"})]},s))})]})}var le=n(72822),ce=n(47760);const re=[{communityId:"649e8f19cfd83dc4c97479c0",communityName:"Diskusjoner",communityDomain:"adnan.pensil.in",googleAdsenseId:"ca-pub-3456762661974715",googleAdSlotId:"7126302351"},{communityId:"649e8f19cfd83dc4c97479c0",communityName:"Diskusjoner",communityDomain:"www.diskusjoner.no",googleAdsenseId:"ca-pub-3456762661974715",googleAdSlotId:"7126302351"},{communityId:"60868502af8027342aa13315",communityName:"Tech - 1",communityDomain:"tech-1.pensil.in",googleAdsenseId:"ca-pub-3456762661974715",googleAdSlotId:"7126302351"},{communityId:"627e504b164ff3b288962852",communityName:"Tech - 1",communityDomain:"tech-1.pensil.so",googleAdsenseId:"ca-pub-3456762661974715",googleAdSlotId:"7126302351"}].find(e=>e.communityDomain===window.location.hostname);var oe=n(57405),de=n(68709),me=n(3005),he=n(77826),ue=n(16478),xe=n(96569),pe=n(33076);function je({label:e="Link",link:s="/settings",eventName:n="",external:a=!1,premium:i={isPremiumAvailable:!0,unAvailableInTrial:!1},icon:t="address-book"}){const l=window.location.pathname===s,{analyticsService:c}=(0,Y.W)(),r=(0,ue.G)(e=>e.community),o=(0,$.A)(new Date(r.planExpiryDate),new Date(r.createdAt))<15,d=i.unAvailableInTrial&&o;return(0,G.jsx)(pe.A,{isAvailable:i.isPremiumAvailable,isCommunityOnFreeTrial:d,unAvailableInTrial:i.unAvailableInTrial,children:a?(0,G.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:W()("my-1 flex items-center whitespace-nowrap p-2",{"rounded bg-primary text-primary-foreground":l,"text-secondary-foreground/85 hover:bg-accent":!l}),children:[(0,G.jsxs)("span",{className:"flex flex-row items-center gap-1",children:[(0,G.jsx)(H.A,{icon:t,className:"mr-2"}),e]}),(0,G.jsx)(xe.A,{isAvailable:i.isPremiumAvailable,isCommunityOnFreeTrial:d,className:"ml-auto"})]}):(0,G.jsxs)(he.N_,{to:!i.isPremiumAvailable||d?"#":s,onClick:e=>{n&&c.track(n)},className:W()("flex items-center whitespace-nowrap p-2",{"rounded bg-primary text-primary-foreground":l,"text-secondary-foreground/85 hover:bg-accent":!l}),children:[(0,G.jsxs)("span",{className:"flex flex-row items-center gap-1",children:[(0,G.jsx)(H.A,{icon:t,className:"mr-2"}),e]}),(0,G.jsx)(xe.A,{isAvailable:i.isPremiumAvailable,className:"ml-auto",isCommunityOnFreeTrial:d})]})})}const be=(0,p.wj)((0,i.y)((0,m.Ng)(e=>({user:e.auth,community:e.community,groups:e.groups,group:e.activeGroup,notifications:e.notifications,personalGroup:e.personalGroup,communityPac:e.communityPac}),e=>(0,h.zH)({updateGroups:o.$Y,updateActiveGroup:o.eP,setGroup:o.Wk,setPersonalGroup:d.iz},e))(function({user:e,community:s,isSidebarOpen:n=!1,sidebarIgnoresCommunitySwitcher:a=!1,setIsSidebarOpen:i=e=>{},communityPac:t}){return(0,G.jsx)("div",{onClick:e=>{i(!1)},className:W()("Sidebar CommunitySettingsSidebar",{open:n,"no-switcher":a||!e}),children:(0,G.jsxs)("div",{className:"sidebar-content rounded bg-card pb-5",children:[(0,G.jsxs)(he.N_,{to:"/",className:"sticky top-0 mb-2 flex items-center space-x-3 border-b border-border bg-card px-6 py-2 font-bold text-card-foreground",children:[(0,G.jsx)(H.A,{icon:"angle-left",className:"mt-1"}),(0,G.jsx)("span",{className:"font-medium",children:" Go Back to Community"})]}),(0,G.jsxs)("div",{className:"mx-4 flex flex-col gap-[1px]",children:[s&&"admin"===s.myRole?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("div",{className:"px-2 py-[8px] font-bold text-secondary-foreground",children:"Setting"}),(0,G.jsx)(je,{label:"Basic Info",link:l.KN,icon:"settings-sliders"}),(0,G.jsx)(je,{label:"Community experience ",link:l.Jj,premium:{isPremiumAvailable:null==t?void 0:t.communityCustomization,unAvailableInTrial:!1},eventName:"community-experience-selected",icon:"layers"}),(0,G.jsx)(je,{label:"Homepage",link:l.H9,eventName:"community-banner-tab-selected",icon:"picture"}),(0,G.jsx)(je,{label:"Onboarding",link:l.rr,eventName:"onboarding-tab-selected",icon:"envelope"}),(0,G.jsx)(je,{label:"Appearance",link:l.Yj,eventName:"appearance-tab-selected",icon:"opacity"}),s.configuration.isWhiteLabel?(0,G.jsx)(G.Fragment,{}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(je,{label:"Custom Domain",link:l.wQ,premium:{isPremiumAvailable:null==t?void 0:t.customDomain,unAvailableInTrial:!0},eventName:"custom-domain-tab-selected",icon:"globe"}),(0,G.jsx)(je,{label:"Billing",link:l.s,eventName:"billing-tab-selected",icon:"credit-card"}),(0,G.jsx)(je,{label:"Paywall",link:(0,l.xO)("payment"),eventName:"paywall-tab-selected",icon:"bank",premium:{isPremiumAvailable:!0,unAvailableInTrial:!0}}),(0,G.jsx)(je,{label:"Zapier Integration",link:"https://zapier.com/developer/public-invite/144858/e26a0bc7a1e8522ead31720c407fd4ed/",external:!0,premium:{isPremiumAvailable:null==t?void 0:t.zapierIntegration,unAvailableInTrial:!1},icon:"link"}),(0,G.jsx)(je,{label:"API Keys",link:l.uR,premium:{isPremiumAvailable:null==t?void 0:t.apiKeysAccess,unAvailableInTrial:!0},eventName:"api-keys-tab-selected",icon:"key"})]}),(0,G.jsx)(je,{label:"Leaderboard",link:(0,l.VQ)(),premium:{isPremiumAvailable:null==t?void 0:t.leaderboard,unAvailableInTrial:!1},eventName:"leaderboard-tab-selected",icon:"trophy"}),(0,G.jsx)(je,{label:"Embedded Channels",link:l.Ws,premium:{isPremiumAvailable:null==t?void 0:t.embedSection,unAvailableInTrial:!0},eventName:"embed-channel-tab-selected-in-settings",icon:"notebook"})]}):(0,G.jsx)(G.Fragment,{}),(0,G.jsx)("div",{className:"px-2 py-[8px] font-bold text-secondary-foreground",children:"Account"}),(0,G.jsx)(je,{label:"Profile",link:l.qM,eventName:"edit-profile-tab-selected",icon:"user"}),(0,G.jsx)(je,{label:"Verification",link:l.aL,icon:"shield-check"}),(0,G.jsx)(je,{label:"Notification Centre",link:l.Uh,eventName:"notification-center-tab-selected",icon:"bell"}),"user"===(null==s?void 0:s.myRole)&&(0,G.jsx)(je,{label:"Membership",link:l._z,eventName:"membership-tab-selected",icon:"gem"})]})]})})})));var fe=n(19328),ve=n(93591);const ye=a.lazy(()=>n.e(2256).then(n.bind(n,82256)).then(e=>({default:e.ProfileUpdate}))),ge=a.lazy(()=>Promise.all([n.e(2087),n.e(9426),n.e(7807),n.e(1686)]).then(n.bind(n,75246))),Ee=a.lazy(()=>Promise.all([n.e(7807),n.e(71)]).then(n.bind(n,20568))),Ne=a.lazy(()=>n.e(8535).then(n.bind(n,48535)).then(e=>({default:e.CreateCommunityPage}))),Ae=a.lazy(()=>Promise.all([n.e(9426),n.e(8952)]).then(n.bind(n,68952)).then(e=>({default:e.NotificationPage}))),Se=a.lazy(()=>Promise.resolve().then(n.bind(n,92250))),Te=a.lazy(()=>n.e(1923).then(n.bind(n,91923))),we=a.lazy(()=>n.e(2731).then(n.bind(n,62731))),Ie=a.lazy(()=>n.e(8881).then(n.bind(n,78881))),Ce=a.lazy(()=>Promise.all([n.e(3120),n.e(1145)]).then(n.bind(n,1145))),ke=a.lazy(()=>n.e(9110).then(n.bind(n,49110))),Me=a.lazy(()=>Promise.resolve().then(n.bind(n,98874))),Pe=a.lazy(()=>Promise.resolve().then(n.bind(n,38545))),Oe=a.lazy(()=>n.e(6218).then(n.bind(n,56218))),_e=a.lazy(()=>n.e(6081).then(n.bind(n,28462))),Re=a.lazy(()=>Promise.all([n.e(2087),n.e(9426),n.e(6064)]).then(n.bind(n,45913))),ze=a.lazy(()=>n.e(8163).then(n.bind(n,48163))),De=a.lazy(()=>Promise.all([n.e(2087),n.e(9030)]).then(n.bind(n,59030))),Le=a.lazy(()=>n.e(3293).then(n.bind(n,23293))),qe=a.lazy(()=>n.e(7266).then(n.bind(n,97266))),Ue=a.lazy(()=>Promise.all([n.e(3120),n.e(4345)]).then(n.bind(n,54345))),$e=a.lazy(()=>n.e(1677).then(n.bind(n,21677))),Ge=a.lazy(()=>n.e(4324).then(n.bind(n,14324))),Fe=a.lazy(()=>n.e(5026).then(n.bind(n,5026))),Ke=a.lazy(()=>n.e(9276).then(n.bind(n,69276))),Ve=a.lazy(()=>n.e(7968).then(n.bind(n,67968))),We=a.lazy(()=>n.e(4159).then(n.bind(n,44159))),Be=a.lazy(()=>Promise.resolve().then(n.bind(n,97676))),Ye=a.lazy(()=>n.e(7702).then(n.bind(n,7702))),He=a.lazy(()=>n.e(4043).then(n.bind(n,84043))),Je=a.lazy(()=>n.e(4268).then(n.bind(n,14268))),Xe=a.lazy(()=>Promise.resolve().then(n.bind(n,41111))),Ze=a.lazy(()=>Promise.resolve().then(n.bind(n,82175))),Qe=a.lazy(()=>n.e(7062).then(n.bind(n,97062))),es=a.lazy(()=>n.e(4817).then(n.bind(n,74817))),ss=a.lazy(()=>Promise.all([n.e(9010),n.e(2824),n.e(1158),n.e(6857)]).then(n.bind(n,41968))),ns=a.lazy(()=>Promise.all([n.e(9010),n.e(2824),n.e(1158),n.e(5196)]).then(n.bind(n,64504))),as=a.lazy(()=>n.e(3061).then(n.bind(n,23061))),is=a.lazy(()=>n.e(960).then(n.bind(n,60960))),ts=a.lazy(()=>Promise.all([n.e(3120),n.e(687)]).then(n.bind(n,90687))),ls=a.lazy(()=>n.e(5350).then(n.bind(n,65350))),cs=a.lazy(()=>n.e(993).then(n.bind(n,10993)));const rs=(0,p.wj)((0,m.Ng)(e=>({socket:e.socket,notifications:e.notifications,groups:e.groups,personalGroup:e.personalGroup,isLoadingGroups:e.isLoadingGroups,chats:e.directMessages.users,notificationCentre:e.notificationCentre,community:e.community,subscriptions:e.subscriptionsPlan,mySubscription:e.mySubscription}),e=>(0,h.zH)({setChats:z.RN,getAllDirectChats:z.OX},e))(function({user:e,community:s,socket:n,notifications:m,groups:h,personalGroup:b,isLoadingGroups:f,chats:v,setChats:y,addNewNotification:g,addToast:N,addToastWithAction:S,notificationCentre:T,getAllDirectChats:w,subscriptionsPlan:I,mySubscription:C}){var k;const[M,z]=(0,a.useState)(!1),[$,V]=(0,a.useState)(!1),[W,H]=(0,a.useState)(!1),[J,Z]=(0,a.useState)(window.location.pathname),[ee,ne]=(0,a.useState)(!1),[ae,he]=(0,a.useState)(!1),[ue,xe]=(0,a.useState)(!1),[pe,je]=(0,a.useState)(!0),{baseColumnClass:rs,setBaseLayout:os}=(0,a.useContext)(ce.h6),{analyticsService:ds}=(0,Y.W)(),ms=null==s?void 0:s.id,hs=null!==(k=null==e?void 0:e.token)&&void 0!==k?k:null,{data:us}=(0,le.h$)(ms,hs),{data:xs}=(0,le.lC)(hs?void 0:ms),ps=null!=us?us:xs;(0,a.useEffect)(()=>{null!=ps&&ps.groups&&(c.M.dispatch((0,o.$Y)(ps.groups)),c.M.dispatch((0,o.JK)(!1)))},[ps]),(0,a.useEffect)(()=>{var e,s,n;us&&(c.M.dispatch((0,L.dA)(null!==(e=us.unreadNotificationsCount)&&void 0!==e?e:0,null!==(s=us.unreadMessagesCount)&&void 0!==s?s:0,null!==(n=us.unreadSectionNotificationsCount)&&void 0!==n?n:{})),ne(!0))},[us]),(0,a.useEffect)(()=>{os()},[s,e]);const js=new URLSearchParams(window.location.search),bs=js.get("action"),[fs,vs]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const e=()=>{xe(window.innerWidth<=982)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,a.useEffect)(()=>{Z(window.location.pathname)},[js]),(0,a.useEffect)(()=>{const e=setTimeout(()=>{c.M.dispatch((0,q.q)(new u.Ay(P.C)))},100);return()=>clearTimeout(e)},[]),a.useEffect(()=>{const e=re;e&&e.googleAdsenseId&&(0,j.k0)(`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${e.googleAdsenseId}`,"google-adsense-script",!0,!0).then(e=>{})},[]),(0,a.useEffect)(()=>{const e=setTimeout(()=>{c.M.dispatch((0,de.GT)()),c.M.dispatch((0,de._O)())},3e3);return()=>clearTimeout(e)},[]),A({socket:n,addNewNotification:g,addToastWithAction:S,community:s,chats:v,setChats:y}),(0,a.useEffect)(()=>{e&&(O.r.identify(e.id),O.r.people.set({$email:e.email,$name:e.name,$mobile:e.mobile,$avatar:e.picture}))},[e]),(0,a.useEffect)(()=>{if(s){if(!T.preferences){setTimeout(()=>c.M.dispatch((0,D.vx)()),2e3)}}else b||c.M.dispatch((0,d.I8)());if(!ee){const{auth:s}=c.M.getState();var e,n,a;if(s)c.M.dispatch((0,L.dA)(null!==(e=s.unreadNotificationsCount)&&void 0!==e?e:0,null!==(n=s.unreadMessagesCount)&&void 0!==n?n:0,null!==(a=s.unreadSectionNotificationsCount)&&void 0!==a?a:{})),ne(!0)}},[s,h,b,m,I]),(0,a.useEffect)(()=>{s&&e&&("autosub"===bs?(je(!0),B.BE.getCommunityById(e,ms).then(({community:s})=>{s.joined?(c.M.dispatch((0,r.Km)(s)),je(!1)):B.BE.joinCommunity(e,s.id).then(({community:e})=>{ds.track("subscribe-community",{communityPlan:e.plan?e.plan.planType:"free"}),c.M.dispatch((0,r.Km)(e)),N("Subscribed to "+e.name)}).catch(e=>{N("Could not subscribe to "+s.name,"",p.lm.danger)}).finally(()=>je(!1))}).catch(e=>{je(!1)})):je(!1))},[ms,null==e?void 0:e.id,bs]),(0,a.useEffect)(()=>{if(ms){const e=setTimeout(()=>c.M.dispatch((0,oe.OE)()),2e3);return()=>clearTimeout(e)}},[ms]),(0,a.useEffect)(()=>{if(!U.A.hasValue(null==I?void 0:I.subscriptions)){const e=setTimeout(()=>c.M.dispatch((0,R.X4)()),2e3);return()=>clearTimeout(e)}},[null==I?void 0:I.subscriptions]),(0,a.useEffect)(()=>{if(w(),!U.A.hasValue(C)){const e=setTimeout(()=>c.M.dispatch((0,_.Ke)()),2500);return()=>clearTimeout(e)}},[e]),(0,G.jsxs)("div",{className:"AuthApp",children:[(0,G.jsx)(Q,{community:s}),(0,G.jsx)(K,{community:s}),(0,G.jsx)(i.Ix,{history:t.b6,children:(0,G.jsxs)(x.A,{children:[e?(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(G.Fragment,{}),children:(0,G.jsx)(ye,{})}):(0,G.jsx)(G.Fragment,{}),!J.startsWith("/course/view/")&&(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(se,{}),children:(0,G.jsx)(ge,{action:bs,isSidebarOpen:ae,setIsSidebarOpen:he})}),null!==(null==s?void 0:s.planType)?(0,G.jsx)("div",{children:(0,G.jsx)(ve.g,{children:(0,G.jsxs)("div",{className:s?`AppContainer w-full ${rs} ${window.location.pathname.includes("/g")}`:"",children:[(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(ie,{}),children:s&&(0,G.jsxs)(G.Fragment,{children:[e&&!s.isCommunitySwitcherDisabled?(0,G.jsx)(X,{community:s,isVisible:ae,setSidebarIgnoresCommunitySwitcher:vs}):null,window.location.pathname.startsWith("/settings")&&e?(0,G.jsx)(be,{isSidebarOpen:ae,setIsSidebarOpen:he,sidebarIgnoresCommunitySwitcher:fs}):window.location.pathname.startsWith("/direct-message")?ue&&(0,G.jsx)(Ee,{sidebarIgnoresCommunitySwitcher:fs,isSidebarOpen:ae,setIsSidebarOpen:he}):window.location.pathname.startsWith("/course/view/")?(0,G.jsx)(G.Fragment,{}):(0,G.jsx)(Ee,{sidebarIgnoresCommunitySwitcher:fs,isSidebarOpen:ae,setIsSidebarOpen:he,isCreateGroupModalVisible:M,setIsCreateGroupModalVisible:z,isCreateSectionModalVisible:$,setIsCreateSectionModalVisible:V,setIsPersonalSpace:H,isPersonalSpace:W})]})}),(0,G.jsxs)(i.dO,{children:[(0,G.jsx)(i.qh,{path:"/",exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:s?(0,G.jsx)(Re,{}):(0,G.jsx)(De,{})})}),(0,G.jsx)(i.qh,{path:l.vV,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Me,{isCreateSectionModalVisible:$,setIsCreateSectionModalVisible:V,setIsPersonalSpace:H})})}),(0,G.jsx)(i.qh,{path:l.tm,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Me,{isCreateSectionModalVisible:$,setIsCreateSectionModalVisible:V,setIsPersonalSpace:H})})}),(0,G.jsx)(i.qh,{path:l.nf,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Me,{isCreateSectionModalVisible:$,setIsCreateSectionModalVisible:V,setIsPersonalSpace:H})})}),(0,G.jsx)(i.qh,{path:l.PG,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Pe,{})})}),(0,G.jsx)(i.qh,{path:l.Nr,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Pe,{})})}),(0,G.jsx)(i.qh,{path:l.jD,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ls,{community:s})})}),(0,G.jsx)(i.qh,{path:l.zv,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Se,{})})}),(0,G.jsx)(i.qh,{path:l.gI,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ae,{})})}),(0,G.jsx)(i.qh,{path:l.fz,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(as,{})})}),(0,G.jsx)(i.qh,{path:l.Rq,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ne,{})})}),(0,G.jsx)(i.qh,{path:l.JA,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Oe,{})})}),(0,G.jsx)(i.qh,{path:l.w6,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ns,{})})}),(0,G.jsx)(i.qh,{path:l.kX,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ss,{})})}),(0,G.jsx)(i.qh,{path:l.aO,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ke,{})})}),(0,G.jsx)(i.qh,{path:l.qC,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Qe,{})})}),(0,G.jsx)(i.qh,{path:l.Id,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Xe,{})})}),(0,G.jsx)(i.qh,{path:l.ip,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ss,{})})}),(0,G.jsx)(i.qh,{path:l.Ze,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(es,{})})}),(0,G.jsx)(i.qh,{path:"/nfts",exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(is,{})})}),(0,G.jsx)(i.qh,{path:l.$T,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ie,{})})}),(0,G.jsx)(i.qh,{path:"/login",exact:!0,children:(0,G.jsx)(i.rd,{to:"/"+window.location.search})}),(0,G.jsx)(i.qh,{path:l.pP,exact:!0,children:(0,G.jsx)(i.rd,{to:"/"+window.location.search})}),(0,G.jsx)(i.qh,{path:l.T$,exact:!0,children:(0,G.jsx)(i.rd,{to:"/"+window.location.search})}),(0,G.jsx)(i.qh,{path:l.aZ,children:(0,G.jsx)(i.rd,{to:"/"+window.location.search})}),(0,G.jsx)(i.qh,{path:l.PU,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(_e,{})})}),(0,G.jsx)(i.qh,{path:l.Jj,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(qe,{})})}),(0,G.jsx)(i.qh,{path:l.wQ,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ge,{})})}),(0,G.jsx)(i.qh,{path:l.s,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(we,{})})}),(0,G.jsx)(i.qh,{path:l.KN,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ue,{})})}),(0,G.jsx)(i.qh,{path:l.H9,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Le,{})})}),(0,G.jsx)(i.qh,{path:l.rr,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Je,{})})}),(0,G.jsx)(i.qh,{path:l.Yj,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ce,{})})}),(0,G.jsx)(i.qh,{path:l.Hl,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)($e,{})})}),(0,G.jsx)(i.qh,{path:l.Rz,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ve,{})})}),(0,G.jsx)(i.qh,{path:l.rU,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(cs,{})})}),(0,G.jsx)(i.qh,{path:l.rk,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Fe,{})})}),(0,G.jsx)(i.qh,{path:l.Ws,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ke,{})})}),(0,G.jsx)(i.qh,{path:l.uR,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(He,{})})}),(0,G.jsx)(i.qh,{path:l.qM,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ye,{})})}),(0,G.jsx)(i.qh,{path:l.aL,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ts,{})})}),(0,G.jsx)(i.qh,{path:l.Xk,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.Uh,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Be,{})})}),(0,G.jsx)(i.qh,{path:l._z,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(We,{})})}),(0,G.jsx)(i.qh,{path:l.GY,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.W0,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.lN,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.Kq,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.Jm,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.J8,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.k_,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(ze,{})})}),(0,G.jsx)(i.qh,{path:l.o$,exact:!0,children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Ze,{})})}),(0,G.jsx)(i.qh,{path:"*",children:(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)(Te,{})})})]})]})})}):s&&null!=s&&s.myRole&&!pe?"admin"===(null==s?void 0:s.myRole)?(0,G.jsx)(a.Suspense,{fallback:(0,G.jsx)(te,{}),children:(0,G.jsx)("div",{className:"flex min-w-[1080px] items-center justify-center",children:(0,G.jsx)(we,{})})}):(0,G.jsx)("div",{className:"flex w-full h-screen items-center justify-center",children:(0,G.jsxs)("div",{className:"flex flex-col text-center",children:[(0,G.jsxs)("p",{className:"text-lg font-bold",children:[s.name," is temporarily locked"]}),(0,G.jsx)("p",{className:"mt-1 text-sm",children:"If you’re a member of this community, please let the admin know to renew the plan to regain access."}),(0,G.jsx)("div",{className:"flex items-center justify-center",children:(0,G.jsx)(me.$,{size:14,label:"Logout",className:"mt-4 w-1/4",onClick:async()=>{await E.A.logout(s)}})})]})}):(0,G.jsx)("div",{className:"loader flex h-screen w-full items-center justify-center",children:(0,G.jsx)(fe.a,{})})]})}),(0,G.jsx)(F,{community:s})]})}))},96569(e,s,n){n.d(s,{A:()=>t});var a=n(80436),i=n(62391);function t({isAvailable:e,className:s,isCommunityOnFreeTrial:n}){return!e||n?(0,i.jsx)("button",{onClick:()=>{window.location.href=a.s},className:`rounded border border-yellow-400 bg-yellow-100 px-1 text-xs font-semibold text-yellow-900 ${s}`,children:(0,i.jsx)("div",{className:"flex items-center",onClick:e=>{e.preventDefault()},children:(0,i.jsxs)("span",{children:["🌟 ",n?"Upgrade":"Pro"]})})}):null}},33076(e,s,n){n.d(s,{A:()=>m});var a=n(20975),i=n(80436),t=n(63360),l=n(3005),c=n(91900),r=n(62391);function o({unAvailableInTrial:e,setActive:s}){return(0,r.jsxs)("div",{className:"flex select-none flex-col items-center justify-center rounded border border-border bg-card pb-6",children:[s?(0,r.jsx)("div",{className:"flex w-full justify-end",children:(0,r.jsx)(t.J,{onClick:()=>{s(!1)}})}):(0,r.jsx)("div",{className:"mt-6"}),(0,r.jsxs)("header",{className:"mx-6",children:[(0,r.jsx)("h1",{className:"text-center text-xl font-bold",children:"Upgrade your community to a paid plan to unlock"}),(0,r.jsxs)("p",{className:"text-md mb-4 mt-6 text-center",children:["To upgrade your plan,"," ",(0,r.jsx)("span",{className:"cursor-pointer text-primary",onClick:()=>{s&&s(!1),window.location.href=i.s},children:"Click here"})]})]}),(0,r.jsx)("section",{className:"w-full px-6 pb-6",children:e?(0,r.jsxs)("ul",{className:"w-full list-inside list-disc rounded border border-border bg-background px-3 py-2",children:[(0,r.jsx)("li",{children:"Start live session"}),(0,r.jsx)("li",{children:"Paywall in Settings"}),(0,r.jsx)("li",{children:"API Keys in Settings"}),(0,r.jsx)("li",{children:"Embedded Channels in Settings"}),(0,r.jsx)("li",{children:"Send bulk mail "}),(0,r.jsx)("li",{children:"Subscription"}),(0,r.jsx)("li",{children:"Custom Push notifications"}),(0,r.jsx)("li",{children:"Custom Domain"})]}):(0,r.jsxs)("ul",{className:"w-full list-inside list-disc rounded border border-border bg-background px-3 py-2",children:[(0,r.jsx)("li",{children:"Live Session"}),(0,r.jsx)("li",{children:" Custom domain "}),(0,r.jsx)("li",{children:" API access"}),(0,r.jsx)("li",{children:" Advanced analytics "}),(0,r.jsx)("li",{children:" Custom CSS"}),(0,r.jsx)("li",{children:" Single Sign-on (SSO) with WordPress and Memberful"}),(0,r.jsx)("li",{children:" 500MB limit per file attachment"}),(0,r.jsx)("li",{children:" 100GB total storage limit across all file attachments"})]})}),(0,r.jsx)("footer",{children:(0,r.jsx)(l.$,{label:"Choose Plan",onClick:()=>{s&&s(!1),window.location.href=i.s}})})]})}const d=function({active:e,setActive:s,unAvailableInTrial:n}){return(0,r.jsx)(c.a,{active:e,setActive:s,padding:!1,isDismissible:!0,className:"bg-card",children:(0,r.jsx)(o,{setActive:s,unAvailableInTrial:n})})};const m=function({isAvailable:e=!0,children:s,className:n,hideFeature:i=!1,unAvailableInTrial:t=!1,isCommunityOnFreeTrial:l}){const[c,m]=(0,a.useState)(!1);return(0,r.jsxs)("section",{className:`PremiumFeature ${n}`,onClick:s=>{e&&!l||(s.preventDefault(),s.stopPropagation(),m(!0))},children:[!e&&i?(0,r.jsx)(o,{unAvailableInTrial:t}):(0,r.jsxs)("div",{className:"relative",children:[s,!e&&(0,r.jsx)("div",{className:"Layer absolute bottom-0 left-0 right-0 top-0 z-10"})]}),(!e&&!i||l)&&(0,r.jsx)(d,{active:c,setActive:m,unAvailableInTrial:t})]})}}}]); //# sourceMappingURL=app-authapp.2f4994bd.chunk.js.map