1import{a9 as D,H as K,p as c,bj as de,bk as pe,a4 as Q,d as W,ba as me,aq as he,a as te,bE as fe,c as o,k as a,N as M,j as e,l as b,i as s,P as w,f as $,E as ve,g as z,aZ as se,B as G,a6 as be,aw as _e,O,z as C,e as y,a3 as R,bF as xe,bG as ge,n as ye,m as ke,q as le,ar as ce,aB as we,w as F,t as ie,o as ue,y as H,L as Ce,r as V,bH as q,M as $e,b6 as Ae,as as Se,bt as ae,a8 as ee}from"./xYyMbIF_.js";import{U as Me}from"./CcdGI3wf.js";import{B as Te}from"./BMg06mBM.js";import{U as je}from"./DmfCDfpK.js";import{B as ze}from"./O6nK__rm.js";import{S as re}from"./BUkhEil7.js";import{F as Ue}from"./DQd-DnAs.js";import{L as Le}from"./Bf1FJ9jE.js";import{C as Pe}from"./BegILgHM.js";import{C as Be}from"./Rl_DbSdw.js";import{T as Ee}from"./j-xfXrV2.js";import{F as Fe,I as Ne}from"./Dlq0aB_Z.js";import{L as ne}from"./6rLotC0c.js";import{E as Ie}from"./Dzhh7esW.js";import{u as Re}from"./Bx5vKVGo.js";import{u as Oe}from"./BFo7PvGo.js";const De=D("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);const We=D("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]);const He=D("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const qe=D("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);const Ge=D("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Ve=D("waypoints",[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]]);function Ke(){const g=K(),r=Q();return{groups:c(()=>{const n=[{label:"",items:[{label:"Dashboard",to:"/",icon:qe,implemented:!0}]},{label:"Connect",items:[...g.isCompanyAccount?[]:[{label:"Personal Profile",to:"/account/profile",icon:Me,implemented:!0}],...g.isCompanyAccount?[{label:"Team Profile",to:"/account/profile",icon:Te,implemented:!0}]:[],...g.isCompanyAccount?[{label:"Team Members",to:"/account/team-members",icon:je,implemented:!0}]:[],{label:"Contacts",to:"/contacts",icon:ze,implemented:!0},...g.featureEnabled("application_collections_profile")?[{label:"Collections",to:"/collections",icon:We,implemented:!0}]:[],{label:"Find Heroes",to:"/search/hero",icon:re,implemented:!0},{label:"Messages",to:"/messages",icon:de,implemented:!0},{label:"Notifications",to:"/notifications",icon:pe,implemented:!0}]},{label:"Work",items:[...g.showFindWork?[{label:"Find Work",to:"/find-work",icon:re,implemented:!0}]:[],{label:"Projects",to:"/projects",icon:Ue,implemented:!0},{label:"Tasks",to:"/tasks",icon:Le,implemented:!0},...g.featureEnabled("application_dedicated_files_area")?[{label:"Files",to:"/files",icon:He,implemented:!0}]:[],...g.canManageCurrentAccount?[{label:"Quotes",to:"/quotes",icon:Pe,implemented:!0}]:[],...g.canManageCurrentAccount?[{label:"Payments",to:"/payments/transactions",icon:Be,implemented:!0}]:[]]}];return g.featureEnabled("challenger_revival")&&n.push({label:"Grow",items:[{label:"Challenger",to:"/challenger/play",icon:Ee,implemented:!0},{label:"Leaderboard",to:"/challenger/leaderboard",icon:De,implemented:!0}]}),g.isAdmin&&n.push({label:"Admin",items:[{label:"Admin Panel",to:r.public.adminUrl||"",icon:Ge,implemented:!!r.public.adminUrl,external:!0},{label:"Asset Traversal",to:"/admin/asset-traversal",icon:Ve,implemented:!0}]}),n})}}const Qe={class:"flex min-h-0 flex-1 flex-col overflow-y-auto p-5"},Xe={class:"flex items-center justify-between border-b border-[color:var(--color-border)] pb-5"},Ye={class:"space-y-3 pt-4"},Ze={key:0,class:"px-4 pb-0.5 text-[11px] font-semibold uppercase tracking-[0.2em] text-[color:var(--color-text-muted)]"},Je=["href"],et={class:"text-sm font-medium"}
1,tt={class:"text-sm font-medium"},ot={key:0,class:"ml-auto inline-flex min-w-[1.2rem] items-center justify-center rounded-full bg-[color:var(--color-accent)] px-1.5 py-0.5 text-[10px] font-semibold leading-none text-white"},st={key:2,class:"flex items-center gap-3 rounded-xl px-4 py-2 text-[color:var(--color-text-muted)] opacity-45"},at={class:"text-sm font-medium"},rt={class:"space-y-4"},nt=["src"],lt=["src"],ct={class:"space-y-3"},it={key:0,class:"px-4 pb-0.5 text-[11px] font-semibold uppercase tracking-[0.2em] text-[color:var(--color-text-muted)]"},ut=["href","title"],dt={key:0,class:"text-sm font-medium"},pt={key:0,class:"text-sm font-medium"},mt=["title"],ht={key:0,class:"text-sm font-medium"},ft={class:"space-y-3"},vt={class:"space-y-1"},bt=W({__name:"AppShellSidebar",setup(g){const r=Q(),_=me(),n=he(),A=te(),l=fe(),{groups:T}=Ke(),x=c(()=>n.count.value),i=c(()=>x.value>99?"99+":String(x.value)),m=c(()=>String(r.public.cdnUrl??"https://cdn.cghero.com").replace(/\/$/,"")),d=c(()=>`${m.value}/logos/cghero_square_dark.png?thumb`),P=c(()=>`${m.value}/logos/cghero_square_light.png?size=thumb`);function p(S){return S&&(S.startsWith("/")?S:`/${S}`).replace(/\/+$/,"")||"/"}function U(S){if(!S)return!1;const h=p(A.path),k=p(S);if(k==="/")return h==="/";const E=h.split("/")[1]||"",L=k.split("/")[1]||"";return E!==L?!1:h===k||h.startsWith(`${k}/`)}function N(S,h){return`${S||"root"}:${h.label}:${h.to||"pending"}:${h.external?"external":"internal"}:${h.implemented?"live":"pending"}`}function B(){l.closeMobileSidebar()}return(S,h)=>{const k=ve,E=_e,L=xe;return o(),a(M,null,[e(l).mobileOpen.value?(o(),a("div",{key:0,class:"fixed inset-0 z-40 bg-black/50 lg:hidden",onClick:h[0]||(h[0]=(...u)=>e(l).closeMobileSidebar&&e(l).closeMobileSidebar(...u))})):b("",!0),s("aside",{class:w(["fixed left-0 top-0 z-50 flex h-screen w-full max-w-[42rem] flex-col overflow-hidden border-r border-[color:var(--color-border)] bg-[color:var(--color-panel-solid)] transition-transform duration-200 lg:hidden",e(l).mobileOpen.value?"translate-x-0":"-translate-x-full"])},[s("div",Qe,[s("div",Xe,[$(k,{to:"/",class:"flex items-center",onClick:B},{default:z(()=>[$(se,{class:"h-9 w-auto"})]),_:1}),$(e(G),{type:"button",variant:"ghost",size:"icon",class:"app-strong-dark-hover rounded-full text-[color:var(--color-text-muted)] hover:bg-[color:var(--color-surface-strong)] hover:text-[color:var(--color-text)]",onClick:e(l).closeMobileSidebar},{default:z(()=>[$(e(be),{class:"size-4"}),h[1]||(h[1]=s("span",{class:"sr-only"},"Close navigation",-1))]),_:1},8,["onClick"])]),$(E,null,{default:z(()=>[s("nav",Ye,[(o(!0),a(M,null,O(e(T),u=>(o(),a("section",{key:`mobile-${u.label||"root"}`,class:w(u.label?"space-y-1 pt-2":"space-y-1")},[u.label?(o(),a("p",Ze,C(u.label),1)):b("",!0),(o(!0),a(M,null,O(u.items,t=>(o(),a(M,{key:`mobile-${N(u.label,t)}`},[t.implemented&&t.external?(o(),a("a",{key:0,href:t.to,target:"_blank",rel:"noreferrer",class:"flex items-center gap-3 rounded-xl px-4 py-2 text-[color:var(--color-text-muted)] transition hover:bg-[color:var(--color-panel-muted)] hover:text-[color:var(--color-text)]",onClick:B},[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),s("span",et,C(t.label),1)],8,Je)):t.implemented&&t.to?(o(),y(k,{key:1,to:t.to,class:w(["app-sidebar-link items-center gap-3 px-4",U(t.to)?"app-sidebar-link-active":"app-sidebar-link-inactive"]),onClick:B},{default:z(()=>[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),s("span",tt,C(t.label),1),t.label==="Messages"&&e(x)>0?(o(),a("span",ot,C(e(i)),1)):b("",!0)]),_:2},1032,["to","class"])):(o(),a("div",st,[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),s("span",at,C(t.label),1)]))],64))),128))],2))),128))])]),_:1})])],2),s("aside",{class:w(["hidden min-h-[calc(100svh-4rem)] flex-col justify-between border-r border-[color:var(--color-border)] bg-[color:var(--color-panel)] p-5 transition-[width,padding] duration-200 lg:flex",e(l).open.value?"w-72":"w-20 px-3"])},[s("div",rt,[s("div",{class:w(["border-b border-[color:var(--color-border)] pb-5",e(l).open.value?"space-y-3":"flex justify-center"])},[$(k,{to:"/",class:"flex items-center"},{default:z(()=>[e(l).open.value?(o(),y(se,{key:0,class:"h-9 w-auto"})):(o(),y(L,{key:1,tag:"span",class:"inline-flex h-10 w-10 overflow-hidden rounded-xl"},{default:z(()=>[e(_).value==="dark"?(o(),a("img",{key:0,src:e(P),alt:"CGHERO",class:"h-full w-full object-cover"},null,8,nt)):(o(),a("img",{key:1,src:e(d),alt:"CGHERO",class:"h-full w-full object-cover"},null,8,lt))]),_:1}))]),_:1})],2),$(E,null,{fallback:z(()=>[s("div",ft,[s("section",vt,[(o(),a(M,null,O(8,u=>s("div",{key:`sidebar-skeleton-${u}`,class:w(["flex rounded-xl py-2",e(l).open.value?"items-center gap-3 px-4":"items-center justify-center px-0"])},[h[2]||(h[2]=s("div",{class:"size-4 shrink-0 rounded-full bg-[color:var(--color-panel-muted)] animate-pulse"},null,-1)),e(l).open.value?(o(),a("div",{key:0,class:w(["h-4 rounded-full bg-[color:var(--color-panel-muted)] animate-pulse",u%3===0?"w-24":u%2===0?"w-28":"w-20"])},null,2)):b("",!0)],2)),64))])])]),default:z(()=>[s("nav",ct,[(o(!0),a(M,null,O(e(T),u=>(o(),a("section",{key:u.label||"root",class:w(u.label?"space-y-1 pt-2":"space-y-1")},[e(l).open.value&&u.label?(o(),a("p",it,C(u.label),1)):b("",!0),(o(!0),a(M,null,O(u.items,t=>(o(),a(M,{key:N(u.label,t)},[t.implemented&&t.external?(o(),a("a",{key:0,href:t.to,target:"_blank",rel:"noreferrer",class:w(["flex rounded-xl py-2 transition",e(l).open.value?"items-center gap-3 px-4":"items-center justify-center px-0","text-[color:var(--color-text-muted)] hover:bg-[color:var(--color-panel-muted)] hover:text-[color:var(--color-text)]"]),title:e(l).open.value?void 0:t.label},[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),e(l).open.value?(o(),a("span",dt,C(t.label),1)):b("",!0)],10,ut)):t.implemented&&t.to?(o(),y(k,{key:1,to:t.to,class:w(["app-sidebar-link",e
1(l).open.value?"items-center gap-3 px-4":"items-center justify-center px-0",U(t.to)?"app-sidebar-link-active":"app-sidebar-link-inactive"]),title:e(l).open.value?void 0:t.label},{default:z(()=>[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),e(l).open.value?(o(),a("span",pt,C(t.label),1)):b("",!0),t.label==="Messages"&&e(x)>0?(o(),a("span",{key:1,class:w(["inline-flex min-w-[1.2rem] items-center justify-center rounded-full bg-[color:var(--color-accent)] px-1.5 py-0.5 text-[10px] font-semibold leading-none text-white",e(l).open.value?"ml-auto":"absolute -right-1 -top-1"])},C(e(i)),3)):b("",!0)]),_:2},1032,["to","class","title"])):(o(),a("div",{key:2,class:w(["flex rounded-xl py-2 text-[color:var(--color-text-muted)] opacity-45",e(l).open.value?"items-center gap-3 px-4":"items-center justify-center px-0"]),title:e(l).open.value?void 0:`${t.label} (coming soon)`},[(o(),y(R(t.icon),{class:"size-4 shrink-0"})),e(l).open.value?(o(),a("span",ht,C(t.label),1)):b("",!0)],10,mt))],64))),128))],2))),128))])]),_:1})]),h[3]||(h[3]=s("div",null,null,-1))],2)],64)}}}),_t=Object.assign(bt,{__name:"ShellAppShellSidebar"}),xt={class:"border-t border-[color:var(--color-border)] bg-[color:var(--color-background)] px-6 pb-4 pt-4 sm:px-8"},gt={class:"mx-auto w-full max-w-[1600px]"},yt={class:"text-center text-sm font-semibold text-[color:var(--color-text)] md:text-left"},kt=["href"],wt={class:"mt-3 flex flex-col items-center justify-between gap-3 text-center md:flex-row md:text-left"},Ct={class:"flex items-center gap-4 text-sm text-[color:var(--color-text-muted)]"},$t=["href"],At=["href"],St=["href"],Mt={class:"flex items-center gap-2"},Tt=["href","aria-label"],jt={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",class:"size-4",viewBox:"0 0 16 16"},zt={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"size-4",viewBox:"0 0 24 24","aria-hidden":"true"},Ut=W({__name:"AppShellFooter",setup(g){const r=K(),_=Q(),n=c(()=>String(_.public.frontendUrl||"https://cghero.com").replace(/\/+$/,"")),A={discord:"https://discord.gg/qjUaaHpFck",linkedin:"https://www.linkedin.com/company/cghero/",instagram:"https://www.instagram.com/cgherofreelance",twitter:"https://x.com/cghero",facebook:"https://www.facebook.com/CGHeroFreelance"},l={linkedin:ne,instagram:Ne,twitter:ne,facebook:Fe};function T(i){const m=r.appConfig,d=m.urls??{},p=(m.company??{}).social??{};return i==="discord"&&typeof d.discord_invite=="string"&&d.discord_invite?d.discord_invite:typeof p[i]=="string"&&p[i]?p[i]:A[i]}const x=c(()=>Object.keys(A).map(i=>({key:i,href:T(i),icon:i==="discord"?null:l[i]})));return(i,m)=>(o(),a("footer",xt,[s("div",gt,[s("p",yt,[s("a",{href:e(n),class:"underline-offset-4 hover:underline"}," CG Hero Ltd ",8,kt),m[0]||(m[0]=s("span",{class:"mx-1"},"©",-1)),m[1]||(m[1]=s("span",{class:"text-xs font-medium text-[color:var(--color-text-muted)]"}," Registered in England & Wales: 10283663, VAT: GB287310593 ",-1))]),s("div",wt,[s("ul",Ct,[s("li",null,[s("a",{href:`${e(n)}/contact-us`,target:"_blank",rel:"noopener noreferrer",class:"underline-offset-4 hover:text-[color:var(--color-text)] hover:underline"}," Support ",8,$t)]),s("li",null,[s("a",{href:`${e(n)}/terms-of-service`,target:"_blank",rel:"noopener noreferrer",class:"underline-offset-4 hover:text-[color:var(--color-text)] hover:underline"}," Terms ",8,At)]),s("li",null,[s("a",{href:`${e(n)}/privacy-policy`,target:"_blank",rel:"noopener noreferrer",class:"underline-offset-4 hover:text-[color:var(--color-text)] hover:underline"}," Privacy ",8,St)])]),s("div",Mt,[(o(!0),a(M,null,O(e(x),d=>(o(),a("a",{key:d.key,href:d.href,target:"_blank",rel:"noopener noreferrer",class:"inline-flex size-9 items-center justify-center rounded-full border border-[color:var(--color-border)] text-[color:var(--color-text-muted)] transition hover:border-[color:var(--color-accent)] hover:text-[color:var(--color-text)]","aria-label":d.key},[d.key==="discord"?(o(),a("svg",jt,[...m[2]||(m[2]=[s("path",{d:"M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0 8 8 0 0 0-.412-.833.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085 8 8 0 0 1-1.249.594.05.05 0 0 0-.03.03.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.2 13.2 0 0 0 4.001-2.02.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612"},null,-1)])])):d.key==="twitter"?(o(),a("svg",zt,[...m[3]||(m[3]=[s("path",{d:"M18.901 1.153h3.68l-8.039 9.19L24 22.847h-7.406l-5.8-7.584-6.63 7.584H.48l8.6-9.83L0 1.154h7.594l5.243 6.932zM17.61 20.645h2.04L6.486 3.24H4.298z"},null,-1)])])):(o(),y(R(d.icon),{key:2,class:"size-4"}))],8,Tt))),128))])])])]))}}),Lt=Object.assign(Ut,{__name:"ShellAppShellFooter"}),Pt={key:0,class:"fixed inset-0 z-[170] flex items-center justify-center bg-black/55 px-4 py-8",role:"dialog","aria-modal":"true","aria-label":"External link warning"},Bt=W({__name:"ExternalLinkInterstitialModal",setup(g){const{isOpen:r,destinationUrl:_,cancelExternalNavigation:n,continueExternalNavigation:A}=ge();return(l,T)=>e(r)?(o(),a("div",Pt,[$(Ie,{"destination-url":e(_),onContinue:e(A),onBack:e(n)},null,8,["destination-url","onContinue","onBack"])])):b("",!0)}}
1),Et=Object.assign(Bt,{__name:"ShellExternalLinkInterstitialModal"}),Ft={key:0,class:"fixed inset-x-0 bottom-0 z-[140] px-3 pb-3 sm:px-5 sm:pb-5"},Nt={class:"mx-auto w-full max-w-3xl rounded-2xl border border-[color:var(--color-border)] bg-[color:var(--color-panel)] p-3 shadow-[0_12px_30px_var(--color-shadow)]"},It={class:"mb-2 flex items-center justify-between gap-3 text-xs text-[color:var(--color-text-muted)]"},Rt={class:"truncate"},Ot={class:"h-2 overflow-hidden rounded-full bg-[color:var(--color-panel-muted)]"},Dt={class:"mt-2 text-xs text-[color:var(--color-text-muted)]"},Wt=W({__name:"FileDownloadProgressBar",setup(g){const r=Re(),_=c(()=>r.activeDownloads.value),n=c(()=>r.fileName.value),A=c(()=>r.currentItem.value),l=c(()=>r.totalItems.value),T=c(()=>r.percent.value);return(x,i)=>(o(),y(ke,{to:"body"},[e(_)>0?(o(),a("div",Ft,[s("div",Nt,[s("div",It,[s("span",Rt," Downloading "+C(e(n)),1),s("span",null,C(e(A))+"/"+C(e(l)),1)]),s("div",Ot,[s("div",{class:"h-full rounded-full bg-[color:var(--color-accent)] transition-all",style:ye({width:`${e(T)}%`})},null,4)]),s("p",Dt,C(e(T))+"% ",1)])])):b("",!0)]))}}),Ht=Object.assign(Wt,{__name:"FilesFileDownloadProgressBar"}),qt={key:0,class:"fixed inset-0 z-[120] flex items-center justify-center bg-black/55 px-4 py-8",role:"dialog","aria-modal":"true","aria-label":"Updated terms of service"},Gt={class:"w-full max-w-2xl rounded-3xl border border-[color:var(--color-border)] bg-[color:var(--color-panel)] p-6 shadow-[0_18px_44px_var(--color-shadow)]"},Vt={class:"text-center text-2xl font-semibold text-[color:var(--color-text)]"},Kt={key:0,class:"mt-4 text-center text-sm text-[color:var(--color-text-muted)]"},Qt={key:1,class:"mt-3 text-center text-sm font-medium text-[color:var(--color-warning-foreground,var(--color-text))]"},Xt={class:"mt-6 flex flex-wrap items-center justify-center gap-3"},Yt=["href"],Zt="terms_updated",Jt=W({__name:"TermsAcceptanceModal",setup(g){const r=le(),_=K(),n=$e(),A=te(),l=ce().$echo??we(null),T=Q(),x=V(!1),i=V(!1),m=V(!1),d=c(()=>`${T.public.frontendUrl||"https://cghero.com"}/terms-of-service`),P=c(()=>A.path==="/auth"||A.path.startsWith("/auth/")),p=c(()=>!!r.user?.is_impersonating),U=c(()=>{const t=_.currentAccount?.id??r.user?.individual_account_id;return t==null||String(t).trim()===""?null:String(t)}),N=Oe(n,U);function B(t){const f=String(t??"").trim();if(!f)return null;const I=Date.parse(f);return Number.isFinite(I)?I:null}const S=c(()=>{const t=B(_.appConfig?.terms_updated_at);return t===null?1:Math.floor(t/1e3)}),h=c(()=>{if(!r.isAuthenticated||P.value)return!1;const t=r.user;if(!t)return!1;if(typeof t.has_accepted_terms=="boolean")return t.has_accepted_terms===!1;const f=B(t.accepted_terms_at),I=B(_.appConfig?.terms_updated_at);return I!==null?f===null||f<I:f===null});F(h,t=>{if(!t){m.value=!1,i.value=!1;return}i.value=!(p.value&&m.value)},{immediate:!0});async function k(t){U.value&&await N.record(Zt,t,S.value)}F(i,t=>{t&&!p.value&&k("seen").catch(f=>{q(f,{tags:{area:"terms-notice",action:"seen"}})})},{immediate:!0}),F(U,()=>{U.value&&N.load().catch(t=>{q(t,{tags:{area:"terms-notice",action:"load"}})})},{immediate:!0});async function E(){if(!(x.value||p.value)){x.value=!0;try{await r.acceptLatestTerms();try{await k("actioned")}catch(t){q(t,{tags:{area:"terms-notice",action:"actioned"}})}i.value=!1}catch(t){q(t,{tags:{area:"terms-acceptance",impersonating:String(p.value)},extra:{route:A.fullPath,userId:r.user?.id??null,userHashid:r.user?.hashid??null,hasAcceptedTerms:r.user?.has_accepted_terms??null,acceptedTermsAt:r.user?.accepted_terms_at??null,termsUpdatedAt:_.appConfig?.terms_updated_at??null}}),console.error("Failed to accept latest terms.",t)}finally{x.value=!1}}}function L(){p.value&&(m.value=!0,i.value=!1)}function u(){l.value&&l.value.join("platform").listen("User\\PlatformUpdatedTerms",()=>{p.value||(m.value=!1,i.value=!0)})}return ie(()=>{u()}),F(l,u),ue(()=>{l.value?.leave("platform")}),(t,f)=>e(i)?(o(),a("div",qt,[s("div",Gt,[s("h3",Vt,C(e(p)?"Updated Terms Not Accepted":"We've Updated Our Terms"),1),e(p)?b("",!0):(o(),a("p",Kt," To continue using CGHERO, you'll need to review and accept our updated Terms of Service. The
1se changes ensure a better experience for our community. ")),e(p)?(o(),a("p",Qt,[...f[0]||(f[0]=[H(" This user has not accepted the latest terms yet.",-1),s("br",null,null,-1),H(" Acceptance is disabled while impersonating. ",-1)])])):b("",!0),s("div",Xt,[e(p)?b("",!0):(o(),a("a",{key:0,href:e(d),target:"_blank",rel:"noopener noreferrer"},[$(e(G),{type:"button",variant:"outline",class:"rounded-full"},{default:z(()=>[...f[1]||(f[1]=[H(" View Terms of Service ",-1)])]),_:1})],8,Yt)),e(p)?(o(),y(e(G),{key:1,type:"button",class:"rounded-full",variant:"outline",onClick:L},{default:z(()=>[...f[2]||(f[2]=[H(" Dismiss ",-1)])]),_:1})):(o(),y(e(G),{key:2,type:"button",class:"rounded-full",disabled:e(x),onClick:E},{default:z(()=>[e(x)?(o(),y(e(Ce),{key:0,class:"mr-2 size-4 animate-spin"})):b("",!0),f[3]||(f[3]=H(" Accept ",-1))]),_:1},8,["disabled"]))])])])):b("",!0)}}),eo=Object.assign(Jt,{__name:"AuthTermsAcceptanceModal"}),to={class:"min-h-screen bg-[color:var(--color-background)]"},oo={key:1,class:"flex min-h-screen w-full justify-center"},so={class:"min-w-0 flex-1"},ao={key:1,class:"fixed inset-0 z-[200] flex min-h-screen items-center justify-center bg-[color:var(--color-background)] p-6 sm:p-8"},ko=W({__name:"default",setup(g){const r=le(),_=K(),n=te(),A=Ae(),l=ce(),T=Se("messages:threads-cache",()=>({})),x=V(!1),i=c(()=>{const j=r.user?._id;return j!=null?String(j):""}),m=c(()=>_.currentAccount?.id?String(_.currentAccount.id):""),d=c(()=>l.$echo?.value??null);let P=null,p=null;const U=c(()=>n.path==="/welcome/in-review"||n.path==="/welcome/in-review/creator"),N=c(()=>r.isAuthenticated&&A.shouldApplyClientOnboardingGate()&&(n.path==="/account/settings"||n.path==="/account/security"||n.path==="/account/notifications"||n.path==="/account/payment")),B=c(()=>n.path.startsWith("/unsubscribe/")),S=c(()=>n.path.startsWith("/auth/")||n.path==="/hire"||n.path.startsWith("/hire/")||B.value||n.path==="/auth/verify-email"||U.value||N.value),h=c(()=>n.path.startsWith("/auth/")||n.path==="/hire"||n.path.startsWith("/hire/")||n.path.startsWith("/unsubscribe/")||n.path.startsWith("/welcome/")),k=c(()=>S.value||!x.value&&h.value),E=c(()=>n.path.startsWith("/messages")),L=c(()=>!k.value),u=c(()=>L.value&&r.status==="authenticated"&&!!(r.user?.email_verified_at||r.user?.is_impersonating)),t=c(()=>L.value&&!u.value);function f(){if(n.path.startsWith("/auth/"))return;const v=new URL("/auth/login",window.location.origin);v.searchParams.set("redirect",n.fullPath),window.location.replace(v.toString())}function I(){T.value={}}function oe(){I(),r.refreshUnreadMessagesCount().catch(()=>{})}function X(){P&&d.value&&d.value.leave(P),P=null}function Y(){p&&d.value&&d.value.leave(p),p=null}function Z(){if(!d.value||r.status!=="authenticated"||!i.value){X();return}const v=`user-threads.${i.value}`;P!==v&&(X(),d.value.join(v).listen("Thread\\ThreadMessageAdded",oe),P=v)}function J(){if(!d.value||r.status!=="authenticated"||!m.value){Y();return}const v=`account-threads.${m.value}`;p!==v&&(Y(),d.value.join(v).listen("Thread\\ThreadMessageAdded",oe),p=v)}return ie(()=>{requestAnimationFrame(()=>{x.value=!0,L.value&&r.status==="guest"&&f()})}),F([x,()=>r.status,()=>n.fullPath],([v,j])=>{v&&L.value&&j==="guest"&&f()},{flush:"post"}),F([()=>r.status,()=>r.user?.id],([v,j])=>{_.loadConfig().catch(()=>{}),!(v!=="authenticated"||!j)&&(_.loadProductFeatures().catch(()=>{}),r.user?.unread_messages_count===void 0&&r.refreshUnreadMessagesCount().catch(()=>{}),Z(),J())},{immediate:!0}),F(i,()=>{Z()}),F(m,()=>{J()}),F(d,()=>{Z(),J()}),ue(()=>{X(),Y()}),(v,j)=>(o(),a("div",to,[s("main",{class:w(e(L)?"flex min-h-screen":"min-h-screen")},[e(k)?(o(),a(M,{key:0},[e(U)||e(N)?(o(),a(M,{key:0},[$(ae,{"show-logo":!0,"hide-sidebar-toggle":!0}),s("div",{class:w(["mx-auto min-h-[calc(100svh-4rem)] w-full max-w-[1600px] p-6 sm:p-8",e(U)?"flex items-center justify-center":""])},[ee(v.$slots,"default")],2)],64)):(o(),a("div",oo,[ee(v.$slots,"default")]))],64)):(o(),a(M,{key:1},[e(u)?(o(),a(M,{key:0},[$(_t),s("section",so,[$(ae),s("div",{class:w(["min-h-[calc(100svh-4rem)] bg-[color:var(--color-background)] sm:p-8",e(E)?"p-0":"p-6"])},[ee(v.$slots,"default")],2),e(E)?b("",!0):(o(),y(Lt,{key:0}))]),j[0]||(j[0]=s("div",{id:"statusBarContainer"},null,-1)),$(Ht),$(eo),$(Et)],64)):b("",!0),e(t)?(o(),a("div",ao,[...j[1]||(j[1]=[s("div",{class:"h-10 w-10 animate-spin rounded-full border-2 border-zinc-300 border-t-[color:var(--color-brand)]"},null,-1)])])):b("",!0)],64))],2)]))}});
1export{ko as default};
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.