1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b3957d15-b0c2-434f-9d5f-47bb873d2e0a",e._sentryDebugIdIdentifier="sentry-dbid-b3957d15-b0c2-434f-9d5f-47bb873d2e0a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2562],{27460:(e,t,a)=>{a.d(t,{$g:()=>r,Vn:()=>s,w7:()=>i});let s=[{slug:"free",name:"Free",blurb:"A home for your references and the boards they become.",monthly:0,annual:0,trialDays:0,seatCap:1,features:["Unlimited saves and boards","Gallery, Editorial, Collage & Schedule","Standard Vade-branded sharing","3 optional AI compositions / month"]},{slug:"solo",name:"Solo",blurb:"For independent designers ready to share their work.",monthly:12,annual:120,trialDays:7,seatCap:1,highlighted:!0,features:["50 optional AI compositions / month","PDF export in all four layouts","Custom studio branding","Everything in Free"]},{slug:"studio",name:"Studio",blurb:"For teams with a shared library and higher volume.",monthly:29,annual:290,trialDays:7,seatCap:5,features:["Unlimited AI compositions (fair use)","Up to 5 team seats + shared library","PDF export & studio-branded shares","Everything in Solo"]}],i=Object.freeze(s.reduce((e,t)=>(e[t.slug]=t,e),{}));function r(e){return 0===e?"Free":`\xa3${e}`}},42562:(e,t,a)=>{a.r(t),a.d(t,{SettingsPage:()=>L});var s=a(95155),i=a(47538),r=a(73321),n=a(12115),l=a(22356),c=a(90934),o=a(21952);let d={hidden:{},visible:{transition:{staggerChildren:.08,delayChildren:.1}}},m={hidden:{opacity:0,y:12},visible:{opacity:1,y:0,transition:{duration:.7,ease:[.22,.61,.36,1]}}};var u=a(62097),p=a(27460);function x({numeral:e,kicker:t,title:a,description:r,headerRight:n,children:l,animate:c=!0,id:o}){let d=(0,s.jsxs)("section",{id:o,className:"border hairline bg-bg-card p-7 md:p-10",style:{scrollMarginTop:"6rem"},children:[(0,s.jsxs)("header",{className:"mb-7 grid grid-cols-[44px_1fr] gap-5 md:grid-cols-[80px_1fr] md:gap-8",children:[(0,s.jsx)("span",{className:"display-italic text-accent",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96',fontSize:"var(--fs-28)",lineHeight:1},children:e}),(0,s.jsxs)("div",{className:"flex items-start justify-between gap-5",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"kicker mb-2",children:t}),(0,s.jsxs)("h2",{className:"display-italic text-[clamp(1.5rem,2.5vw,2rem)] leading-[1.1]",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96'},children:[a,(0,s.jsx)("span",{className:"text-accent",children:"."})]}),r&&(0,s.jsx)("p",{className:"caption mt-3 max-w-md text-[13px] leading-[1.55]",children:r})]}),n&&(0,s.jsx)("div",{className:"flex flex-shrink-0 items-center gap-3",children:n})]})]}),(0,s.jsx)("div",{className:"md:pl-[88px]",children:l})]});return c?(0,s.jsx)(i.P.div,{variants:m,children:d}):d}function h({subscription:e,isLoading:t,error:a}){let[i,r]=(0,n.useState)(!1),[c,o]=(0,n.useState)(null),d=e?.provider==="stripe"&&!["expired","cancelled","unpaid","paused","incomplete"].includes(e.status),m=async()=>{r(!0),o(null);try{let{url:e}=await l.FH.getBillingPortal();window.location.assign(e)}catch(e){o(e instanceof Error?e.message:"Billing portal is unavailable"),r(!1)}},u=e?.tier??"free",g=p.w7[u]?.name??"Free",b=e?.ends_at??e?.renews_at;return(0,s.jsxs)(x,{numeral:"IV.",kicker:"Billing",title:"Subscription & receipts",description:"Stripe Managed Payments handles checkout and tax; purchases are sold through Onelink.",headerRight:d?(0,s.jsx)("button",{type:"button",disabled:i,onClick:()=>void m(),className:"ghost-link text-[13px] disabled:cursor-wait disabled:opacity-60",children:i?"Openingâ¦":"Manage billing â"}):void 0,id:"billing",children:[t?(0,s.jsx)("p",{className:"caption text-[13px]",children:"Loading billingâ¦"}):a?(0,s.jsx)("p",{className:"caption text-[13px]",role:"alert",children:"Unable to load billing details."}):(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"hairline border bg-bg-elev p-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"Subscription"}),(0,s.jsx)("div",{className:"display-italic text-[32px] leading-none text-text",children:g}),(0,s.jsxs)("dl",{className:"mt-5 space-y-2 text-[13px]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("dt",{className:"text-text-muted",children:"Status"}
1),(0,s.jsx)("dd",{className:"capitalize text-text",children:e?.status==="inactive"?"Free":e?.status.replace("_"," ")})]}),e?.billing_period&&(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("dt",{className:"text-text-muted",children:"Billing"}),(0,s.jsx)("dd",{className:"capitalize text-text",children:e.billing_period})]}),b&&(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("dt",{className:"text-text-muted",children:e?.ends_at?"Access until":"Renews"}),(0,s.jsx)("dd",{className:"text-text",children:new Date(b).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]})]}),(0,s.jsxs)("div",{className:"hairline border bg-bg-elev p-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"Payment & receipts"}),d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-[14px] text-text",children:"Managed securely by Stripe and Onelink"}),(0,s.jsx)("p",{className:"caption mt-3 text-[13px] leading-relaxed",children:"Open the secure billing portal to update your payment method, download receipts, switch plan or cancel."})]}):(0,s.jsx)("p",{className:"caption text-[13px]",children:"No payment method on file. Choose Solo or Studio to start a trial."})]})]}),c&&(0,s.jsx)("p",{className:"mt-4 text-[13px] text-accent",role:"alert",children:c})]})}let g="image/png,image/jpeg,image/svg+xml";function b({organization:e}){let t=(0,o.Ue)(),[a,i]=(0,n.useState)(e.brand_title??""),[r,d]=(0,n.useState)(e.brand_logo_url??null),[m,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1),[f,v]=(0,n.useState)(null),y=(0,n.useRef)(null),j=(0,n.useRef)(null);async function N(e){if(v(null),!g.split(",").includes(e.type))return void v("Use PNG, JPG, or SVG.");if(e.size>2097152)return void v("File too large. Max 2MB.");h(!0);try{let a=await l.FH.uploadBrandLogo(e);(0,c.setCache)(c.CacheKeys.myOrg,a,t),d(a.brand_logo_url??null)}catch(e){v(e instanceof Error?e.message:"Failed to upload logo.")}finally{h(!1)}}async function k(){v(null),h(!0);try{let e=await l.FH.deleteBrandLogo();(0,c.setCache)(c.CacheKeys.myOrg,e,t),d(null)}catch(e){v(e instanceof Error?e.message:"Failed to clear logo.")}finally{h(!1)}}return(0,n.useEffect)(()=>{d(e.brand_logo_url??null)},[e.brand_logo_url]),(0,n.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]),(0,s.jsxs)(x,{numeral:"II.",kicker:"Brand",title:"How you appear to clients",description:"Optional. Used on shared moodboards and PDF exports â not on the in-app chrome. Leave empty to use your studio name and Clerk logo.",id:"brand",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"brand-title",className:"label mb-2 block leading-none",children:"Brand title"}),(0,s.jsx)("input",{id:"brand-title",type:"text",value:a,onChange:a=>{var s;i(s=a.target.value),v(null),j.current&&clearTimeout(j.current),j.current=setTimeout(async()=>{if(t!==(0,o.getQueryIdentity)())return;let a=e.brand_title??"";if(s.trim()!==a){u(!0);try{let e=await l.FH.patchMyOrganization({brand_title:s.trim()});(0,c.setCache)(c.CacheKeys.myOrg,e,t)}catch(e){v(e instanceof Error?e.message:"Failed to save title.")}finally{u(!1)}}},800)},placeholder:e.name,maxLength:120,className:"w-full border hairline bg-paper px-3 py-2 text-[15px] text-ink outline-none focus:border-[var(--ink-2)]"}),(0,s.jsx)("p",{className:"caption mt-2 text-[12px]",children:m?"Savingâ¦":a.trim()?"This name appears on shared moodboards.":`Falls back to "${e.name}" when empty.`})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"label mb-2 block leading-none",children:"Brand logo"}),(0,s.jsxs)("div",{className:"flex items-center gap-4 border hairline bg-paper p-4",style:{minHeight:"88px"},children:[r?(0,s.jsx)("img",{src:r,alt:"Brand logo",className:"h-14 w-14 flex-shrink-0 object-contain",style:{background:"var(--paper-tint)"}}):(0,s.jsx)("div",{className:"flex h-14 w-14 flex-shrink-0 items-center justify-center text-[var(--ink-3)]",style:{background:"var(--paper-tint)",fontSize:"11px",letterSpacing:"0.12em",textTransform:"uppercase"},children:"None"}),(0,s.jsxs)("div",{className:"flex-1 text-[12px] text-[var(--ink-2)]",children:[(0,s.jsx)("p",{children:"PNG, JPG, SVG. Up to 2MB."}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:()=>y.current?.click(),disabled:p,className:"text-link text-[12px] disabled:opacity-50",children:p?"Uploadingâ¦":r?"Replace":"Upload"}),r&&!p&&(0,s.jsx)("button",{type:"button",onClick:k,className:"ghost-link text-[12px]",children:"Clear"})]})]}),(0,s.jsx)("input",{ref:y,type:"file",accept:g,hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&N(t),e.target.value=""}})]})]})]}),f&&(0,s.jsx)("p",{className:"caption mt-4 text-[12px]",style:{color:"var(--accent)"},role:"alert",children:f})]})}var f=a(15205);function v(){let{organization:e,membership:t}=(0,f.Z5)(),{signOut:a}
1=(0,f.ho)(),[i,r]=(0,n.useState)(!1),[c,o]=(0,n.useState)(""),[d,m]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null),h=t?.role??"",g="org:admin"===h||"admin"===h,b=e?.name??"",v=b.length>0&&c.trim().toLowerCase()===b.trim().toLowerCase();async function y(){if(v&&!d){m(!0),p(null);try{await l.FH.deleteMyOrganizationData(c),await a({redirectUrl:"/sign-in"})}catch(e){p(e instanceof Error?e.message:"Delete failed."),m(!1)}}}function j(){d||(r(!1),o(""),p(null))}return(0,s.jsxs)(x,{numeral:"VII",kicker:"Danger zone",title:"Delete this studio",description:g?"Hard-deletes the studio and all of its data. Cancel any paid subscription in Billing first so no future payment can be collected. Cannot be undone.":"Only an admin can delete the studio. Ask one of your studio admins if you need this.",children:[(0,s.jsx)("button",{type:"button",onClick:()=>r(!0),disabled:!g,className:"rounded-full border border-[var(--accent)] px-4 py-2 text-xs font-medium uppercase tracking-wider text-[var(--accent)] transition hover:bg-[var(--accent)] hover:text-paper disabled:cursor-not-allowed disabled:opacity-40",children:"Delete studio data"}),i&&(0,s.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":"Confirm studio deletion",className:"fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-ink/70 p-6",onClick:j,children:(0,s.jsxs)("div",{className:"w-full max-w-md border border-[var(--hairline-strong)] bg-paper p-7",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("h3",{className:"display-italic mb-3 text-[1.5rem] leading-tight text-ink",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96'},children:["Delete ",(0,s.jsx)("span",{className:"text-[var(--accent)]",children:b||"studio"}),"?"]}),(0,s.jsxs)("p",{className:"caption mb-5 text-[13px] leading-[1.55]",children:["This permanently deletes every save, collection, moodboard, and project under this studio. Other studios you belong to are unaffected. Any paid subscription must be cancelled first. To confirm, type ",(0,s.jsx)("strong",{children:b})," below."]}),(0,s.jsx)("input",{type:"text",value:c,onChange:e=>o(e.target.value),autoFocus:!0,className:"mb-3 w-full border border-[var(--hairline-strong)] bg-paper px-3 py-2 text-sm text-ink outline-none focus:border-ink",placeholder:b}),u&&(0,s.jsx)("p",{className:"caption mb-3 text-[12px]",style:{color:"var(--accent)"},children:u}),(0,s.jsxs)("div",{className:"flex justify-end gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:j,disabled:d,className:"text-xs uppercase tracking-wider text-[var(--ink-3)] transition hover:text-ink disabled:cursor-not-allowed",children:"Cancel"}),(0,s.jsx)("button",{type:"button",onClick:y,disabled:!v||d,className:"rounded-full border border-[var(--accent)] bg-[var(--accent)] px-4 py-2 text-xs font-medium uppercase tracking-wider text-paper transition hover:bg-[var(--accent-dark)] disabled:cursor-not-allowed disabled:opacity-40",children:d?"Deletingâ¦":"Delete forever"})]})]})})]})}function y(){let{organization:e,membership:t,memberships:a,invitations:i}=(0,f.Z5)({memberships:{pageSize:20},invitations:{status:["pending"],pageSize:20}}),r=t?.role==="org:admin",c=a?.count??0,d=(0,o.Ue)(),[m,u]=(0,n.useState)(null),[p,h]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=new AbortController;return u(null),h(null),l.FH.getSeatState(e.signal).then(u).catch(t=>{e.signal.aborted||h(t instanceof Error?t.message:"Seat verification unavailable.")}),()=>e.abort()},[d,c,i?.count]),(0,s.jsxs)(x,{numeral:"V.",kicker:"Members",title:"Your team",description:r?"Invite teammates, manage roles, share the same library.":"Everyone here shares the same library, collections, and projects.",id:"members",children:[(0,s.jsx)("p",{className:"caption",role:p||m?.over_limit?"status":void 0,children:p||(m?`${m.members} members and ${m.pending} pending invitations \xb7 ${m.limit} plan seats. ${m.over_limit?"Existing members are retained. Remove excess members or upgrade before inviting.":""}`:"Verifying plan seatsâ¦")}),r&&e&&m?.can_invite&&(0,s.jsx)(j,{onInvited:()=>{i?.revalidate?.()}}),(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsxs)("div",{className:"kicker mb-3",children:[c," member",1===c?"":"s"]}),a?.isLoading?(0,s.jsx)("p",{className:"caption text-[13px]",children:"Loading membersâ¦"}):a?.data&&a.data.length>0?(0,s.jsx)("ul",{className:"space-y-1",children:a.data.map(e=>(0,s.jsxs)("li",{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-4 border-t hairline py-3 text-[13px] first:border-t-0 first:pt-0",children:[(0,s.jsxs)("span",{className:"min-w-0 break-words text-text",children:[e.publicUserData?.f
1irstName||e.publicUserData?.identifier," ",(0,s.jsx)("span",{className:"text-text-muted",children:e.publicUserData?.identifier})]}),(0,s.jsx)("span",{className:"kicker text-text-muted",children:N(e.role)}),r&&e.publicUserData?.userId!==t?.publicUserData?.userId&&(0,s.jsx)("button",{type:"button",className:"ghost-link text-[12px]",onClick:async()=>{await e.destroy(),a?.revalidate?.()},children:"Remove"}),(!r||e.publicUserData?.userId===t?.publicUserData?.userId)&&(0,s.jsx)("span",{})]},e.id))}):(0,s.jsx)("p",{className:"caption text-[13px]",children:"No members yet."})]}),i?.data&&i.data.length>0&&(0,s.jsxs)("div",{className:"mt-8 border-t hairline pt-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"Pending invitations"}),(0,s.jsx)("ul",{className:"space-y-1",children:i.data.map(e=>(0,s.jsxs)("li",{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-4 border-t hairline py-3 text-[13px] first:border-t-0 first:pt-0",children:[(0,s.jsx)("span",{className:"min-w-0 break-words text-text",children:e.emailAddress}),(0,s.jsx)("span",{className:"kicker text-text-muted",children:N(e.role)}),r&&(0,s.jsx)("button",{type:"button",className:"ghost-link text-[12px]",onClick:async()=>{await e.revoke(),i?.revalidate?.()},children:"Revoke"}),!r&&(0,s.jsx)("span",{})]},e.id))})]})]})}function j({onInvited:e}){let[t,a]=(0,n.useState)(""),[i,r]=(0,n.useState)("org:member"),[c,o]=(0,n.useState)(!1),[d,m]=(0,n.use
1State)(null),[u,p]=(0,n.useState)(!1);async function x(s){if(s.preventDefault(),t.trim()){o(!0),m(null),p(!1);try{await l.FH.inviteMember(t.trim(),i),a(""),p(!0),e()}catch(e){m(e instanceof Error?e.message:"Failed to send invitation.")}finally{o(!1)}}}return(0,s.jsxs)("form",{onSubmit:x,className:"grid grid-cols-1 gap-3 sm:grid-cols-[minmax(0,1fr)_auto_auto] sm:items-center sm:gap-3",children:[(0,s.jsx)("input",{type:"email","aria-label":"Teammate email",required:!0,placeholder:"[email protected]",value:t,onChange:e=>a(e.target.value),disabled:c,className:"hairline border bg-bg-elev px-4 py-3 text-[14px] text-text placeholder:text-text-dim focus:border-accent focus:outline-none"}),(0,s.jsxs)("select",{"aria-label":"Teammate role",value:i,onChange:e=>r(e.target.value),disabled:c,className:"hairline border bg-bg-elev px-3 py-3 text-[13px] text-text focus:border-accent focus:outline-none",children:[(0,s.jsx)("option",{value:"org:member",children:"Member"}),(0,s.jsx)("option",{value:"org:admin",children:"Admin"})]}),(0,s.jsx)("button",{type:"submit",disabled:c,className:"brutal-download inline-flex items-center justify-center gap-2",style:{opacity:c?.5:1,cursor:c?"wait":"pointer"},children:c?"Sendingâ¦":"Invite â"}),d&&(0,s.jsx)("p",{className:"caption sm:col-span-3",style:{color:"var(--accent)"},role:"alert",children:d}),u&&!d&&(0,s.jsx)("p",{className:"caption sm:col-span-3 text-text-muted",children:"Invitation sent. Theyâll get an email from Clerk."})]})}function N(e){return"org:admin"===e?"Admin":"org:member"===e?"Member":e.replace(/^org:/,"")}var k=a(15317),w=a(98607);function S({usage:e,subscription:t,subscriptionLoading:a}){let[i,r]=(0,n.useState)(!1),l=e?.tier??"free",c=k.g[l]??l,o=t?.status;return(0,s.jsxs)(x,{numeral:"III.",kicker:"Plan & usage",title:"What youâre on",description:"Switch tiers, top up, or just see how much youâve used this month.",headerRight:(0,s.jsx)("button",{type:"button",onClick:()=>r(e=>!e),className:"ghost-link text-[13px]",children:i?"Hide plans â":"See plans â"}),id:"plan",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,s.jsx)(C,{tierName:c,status:o,loading:a,subscription:t}),(0,s.jsx)(F,{usage:e})]}),"free"===l&&(0,s.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-3 border-t hairline pt-6",children:[(0,s.jsxs)("span",{className:"caption text-[13px]",children:["Solo starts at ",(0,p.$g)(p.w7.solo.monthly),"/month and unlocks 50 moodboards, PDF export & branded shares."]}),(0,s.jsx)("button",{type:"button",onClick:()=>r(!0),className:"brutal-download inline-flex items-center gap-2",children:"Compare plans â"})]}),i&&(0,s.jsx)("div",{className:"mt-8 border-t hairline pt-8",children:(0,s.jsx)(w.a,{variant:"settings",subscription:t,subscriptionLoading:a})})]})}function C({tierName:e,status:t,loading:a,subscription:i}){let r=i?.renews_at;return(0,s.jsxs)("div",{className:"hairline border bg-bg-elev p-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"Current plan"}),(0,s.jsx)("div",{className:"display-italic text-[clamp(2rem,4vw,2.75rem)] leading-[1] text-text",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96'},children:e}),(0,s.jsx)("div",{className:"mt-4 space-y-1 text-[13px] text-text-muted",children:a?(0,s.jsx)("span",{className:"caption",children:"Loading subscriptionâ¦"}):(0,s.jsxs)(s.Fragment,{children:[t&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"kicker mr-2",children:"Status"}),(0,s.jsx)("span",{style:{color:"active"===t?"var(--text)":"var(--accent)"},children:t})]}),r&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"kicker mr-2",children:"Renews"}),(0,s.jsx)("span",{children:new Date(r).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]})})]})}function F({usage:e}){if(!e)return(0,s.jsxs)("div",{className:"hairline border bg-bg-elev p-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"This month"}),(0,s.jsx)("p",{className:"caption",children:"Loading usageâ¦"})]});let t=null===e.quota,a=e.used,i=e.reserved??0,r=a+i,n=e.quota??0,l=t||0===n?0:Math.min(100,r/n*100),c=!t&&r>=n,o=!t&&!c&&r>=Math.max(1,Math.floor(.8*n));return(0,s.jsxs)("div",{className:"hairline border bg-bg-elev p-6",children:[(0,s.jsx)("div",{className:"kicker mb-3",children:"This month"}),(0,s.jsx)("div",{className:"display-italic text-[clamp(2rem,4vw,2.75rem)] leading-[1] text-text",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96',color:c||o?"var(--accent)":void 0},children:t?"Unlimited":`${a} / ${n}`}),(0,s.jsxs)("div",{className:"mt-2 text-[13px] text-text-muted",children:[a," used \xb7 ",i," reserved \xb7 UTC month ",e.period]}),!t&&(0,s.jsx)("div",{className:"mt-5 h-1 w-full bg-border",children:(0,s.jsx)("div",{className:"h-full transition-[width] duration-500",style:{width:`${l}%`,backgroundColor:c||o?"var(--accent)":"var(--text-muted)"}})})]})}var _=a(98500),D=a.n(_);function z(){let{user:e,isLoaded:t}
1=(0,f.Jd)(),a=e?.fullName||[e?.firstName,e?.lastName].filter(Boolean).join(" ").trim();return(0,s.jsx)(x,{numeral:"VI.",kicker:"Profile",title:"You",description:"Your identity in VADE. Avatar and email come straight from your account.",headerRight:(0,s.jsx)(D(),{href:"/user-profile",className:"ghost-link text-[13px]",children:"Manage account â"}),children:(0,s.jsxs)("div",{className:"flex flex-col gap-5 sm:flex-row sm:items-center sm:gap-8",children:[e?.imageUrl?(0,s.jsx)("img",{src:e.imageUrl,alt:a||e.primaryEmailAddress?.emailAddress||"Profile",className:"h-20 w-20 object-cover"}):(0,s.jsx)("div",{className:"hairline grid h-20 w-20 place-items-center border bg-bg-elev",children:(0,s.jsx)("span",{className:"kicker text-text-dim",children:"No photo"})}),(0,s.jsx)("div",{className:"flex flex-1 flex-col gap-1",children:t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"display-italic text-[1.5rem] leading-[1.1] text-text",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96'},children:a||e?.primaryEmailAddress?.emailAddress}),(0,s.jsx)("span",{className:"caption text-[13px]",children:e?.primaryEmailAddress?.emailAddress})]}):(0,s.jsx)("p",{className:"caption text-[13px]",children:"Loadingâ¦"})}),(0,s.jsx)(f.ct,{children:(0,s.jsx)("button",{type:"button",className:"ghost-link text-[13px]",children:"Sign out â"})})]})})}function I({currentId:e,currentName:t}){let{isLoaded:a,setActive:i,userMemberships:r}=(0,f.D_)({userMemberships:{infinite:!0,pageSize:20}}),[l,c]=(0,n.useState)(!1),[o,d]=(0,n.useState)(null),m=new Map((r.data??[]).map(e=>[e.organization.id,e.organization.name]));async function u(t){if(i&&t!==e&&!l&&m.has(t)){c(!0),d(null);try{await i({organization:t})}catch{d("Could not switch studio. Check your connection and try again.")}finally{c(!1)}}}async function p(e=!1){d(null);try{e?await r.revalidate?.():await r.fetchNext?.()}catch{d("Could not load studios. Please retry.")}}return m.has(e)||m.set(e,t),(0,s.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"label mb-2 block",children:"Active studio"}),(0,s.jsx)("select",{className:"w-full min-w-0 border hairline bg-paper px-3 py-2 text-[14px]",value:e,disabled:!a||l,onChange:e=>void u(e.target.value),children:[...m].map(([e,t])=>(0,s.jsx)("option",{value:e,children:t},e))})]}),(!a||r.isLoading||l)&&(0,s.jsx)("p",{className:"caption",role:"status",children:l?"Switching studioâ¦":"Loading studiosâ¦"}),(o||r.error)&&(0,s.jsxs)("div",{role:"alert",className:"caption",children:[(0,s.jsx)("p",{children:o||"Could not load studios. Please retry."}),(0,s.jsx)("button",{className:"ghost-link",type:"button",onClick:()=>void p(!0),children:"Retry studios"})]}),r.hasNextPage&&(0,s.jsx)("button",{className:"ghost-link text-[13px]",type:"button",disabled:r.isFetching||l,onClick:()=>void p(),children:r.isFetching?"Loading studiosâ¦":"Load more studios"})]})}function O({organization:e,onAudienceChanged:t,onSourcingChanged:a}){let{organization:i,memberships:r}=(0,f.Z5)({memberships:{pageSize:1}}),c=r?.count??null,[o,d]=(0,n.useState)(!1),[m,u]=(0,n.useState)(null);async function p(e){d(!0),u(null);try{a(await l.FH.patchMyOrganization({sourcing_enabled:e}))}catch(e){u(e instanceof Error?e.message:"Could not update sourcing preference.")}finally{d(!1)}}async function h(a){if(e.audience!==a){d(!0),u(null);try{let e=await l.FH.patchMyOrganization({audience:a});t(e.audience??a)}catch(e){u(e instanceof Error?e.message:"Failed to update audience.")}finally{d(!1)}}}return(0,s.jsxs)(x,{numeral:"I.",kicker:"Studio",title:"Your studio",description:i?`${i.name} \xb7 ${null===c?"â¦":c} member${1===c?"":"s"}`:"Set up your studio to invite teammates.",children:[(0,s.jsx)(I,{currentId:e.id,currentName:i?.name||e.name}),(0,s.jsx)(T,{label:"Organisation name",value:i?.name||"â"}),(0,s.jsx)(T,{label:"Audience",value:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(A,{label:"Solo",active:"solo"===e.audience,disabled:o,onClick:()=>h("solo")}),(0,s.jsx)(A,{label:"Studio",active:"studio"===e.audience,disabled:o,onClick:()=>h("studio")}
1)]}),(0,s.jsx)("p",{className:"caption text-[12px]",children:"This describes how you work. Your paid plan sets the seat limit; choose Studio in Plan & usage for up to five members."})]})}),(0,s.jsx)(T,{label:"Sourcing workspace",value:(0,s.jsxs)("label",{className:"flex items-start gap-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:e.sourcing_enabled,disabled:o,onChange:e=>void p(e.target.checked),className:"mt-[3px]"}),(0,s.jsx)("span",{children:"Show project schedules and specifications. All saved references stay in your library."})]})}),e.sourcing_enabled&&(0,s.jsx)(D(),{href:"/projects",className:"text-link",children:"Open sourcing workspace â"}),m&&(0,s.jsx)("p",{className:"caption mt-4",style:{color:"var(--accent)"},role:"alert",children:m})]})}function T({label:e,value:t}){return(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 border-t hairline py-5 first:border-t-0 first:pt-0 sm:grid-cols-[180px_1fr] sm:gap-6",children:[(0,s.jsx)("div",{className:"kicker",children:e}),(0,s.jsx)("div",{className:"text-[14px] text-text",children:t})]})}function A({label:e,active:t,disabled:a,onClick:i}){return(0,s.jsx)("button",{type:"button",onClick:i,disabled:a||t,className:"hairline border px-4 py-2 text-[13px] transition-colors",style:{borderColor:t?"var(--accent)":void 0,color:t?"var(--accent)":"var(--text-muted)",cursor:a||t?"default":"pointer",opacity:a&&!t?.5:1},children:e})}function L(){let e=(0,o.Ue)(),t=(0,r.useSearchParams)(),{data:a,error:m}=(0,c.useCachedFetch)({key:c.CacheKeys.myOrg,fetcher:e=>l.FH.getMyOrganization(e)}),{data:p,error:x}=(0,c.useCachedFetch)({key:c.CacheKeys.moodboardUsage,fetcher:e=>l.FH.getMoodboardUsage(e)}),{data:g,isLoading:f,error:j,refresh:N}=(0,u.w)();(0,n.useEffect)(()=>{if("success"!==t.get("checkout"))return;let e=[1e3,3e3,6e3].map(e=>window.setTimeout(()=>void N(),e));return()=>e.forEach(window.clearTimeout)},[N,t]);let k=m||x,w=!!(a&&p);return k&&!w?(0,s.jsx)("div",{className:"hairline border bg-bg-card p-8",role:"alert",style:{color:"var(--accent)"},children:k.message}):a&&p?(0,s.jsxs)(i.P.div,{variants:d,initial:"hidden",animate:"visible",className:"flex flex-col gap-6 md:gap-8",children:[(0,s.jsx)(O,{organization:a,onAudienceChanged:function(t){a&&(0,c.setCache)(c.CacheKeys.myOrg,{...a,audience:t},e)},onSourcingChanged:function(t){(0,c.setCache)(c.CacheKeys.myOrg,t,e)}}),(0,s.jsx)(b,{organization:a}),(0,s.jsx)(S,{usage:p,subscription:g,subscriptionLoading:f}),(0,s.jsx)(h,{subscription:g,isLoading:f,error:j}),(0,s.jsx)(y,{}),(0,s.jsx)(z,{}),(0,s.jsx)(v,{})]}):(0,s.jsx)("p",{className:"caption",children:"Loading settingsâ¦"})}},62097:(e,t,a)=>{a.d(t,{w:()=>r});var s=a(22356),i=a(90934);function r(e=!0){let{data:t,loading:a,error:n,revalidate:l}=(0,i.useCachedFetch)({key:i.CacheKeys.billingSubscription,fetcher:e=>s.FH.getBillingSubscription(e),enabled:e});return{data:t??null,isLoading:a,error:n,refresh:l}}},98607:(e,t,a)=>{a.d(t,{a:()=>u});var s=a(95155),i=a(15205),r=a(94514),n=a(98500),l=a.n(n),c=a(12115),o=a(22356),d=a(27460),m=a(62097);function u({variant:e="settings",subscription:t,subscriptionLoading:a}){let{isSignedIn:r}=(0,i.As)(),n=(0,m.w)(!!r&&void 0===t),l=void 0===t?n.data:t,o=void 0===t?n.isLoading:!!a,[h,g]=(0,c.useState)("month"),b=r?l?.tier??null:null,f=l?.provider==="stripe"&&!["expired","cancelled","unpaid","paused","incomplete"].includes(l.status);return(0,s.jsxs)("div",{className:"marketing"===e?"mx-auto w-full max-w-[1100px]":"w-full",children:[(0,s.jsx)(p,{period:h,onChange:g}),(0,s.jsx)("p",{className:"mt-4 text-[13px] text-text md:hidden",children:"Unlimited ordinary boards on every plan. Free and Solo: 1 seat. Studio: up to 5 seats. Solo and Studio include PDF export."}),(0,s.jsx)("div",{className:"mt-6 grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:d.Vn.map(e=>(0,s.jsx)(x,{plan:e,period:h,isCurrent:e.slug===b,isSignedIn:!!r,hasManagedSubscription:f,billingLoading:o},e.slug))}),(0,s.jsx)("p",{className:"caption mt-3 text-[12px]",children:"Optional AI composition allowances reset on the first day of each UTC calendar month. Creating and arranging ordinary boards does not use this allowance."}),(0,s.jsxs)("p",{className:"caption mt-6 text-[12px]",children:["Prices displayed in GBP. Tax is calculated at checkout. Cancel any time from ",(0,s.jsx)("span",{className:"text-[var(--text)]",children:"Settings â Billing"}),"."]}),(0,s.jsx)("p",{className:"caption mt-2 text-[12px]",children:"Studio shares one library across up to 5 designers. Invite or remove teammates any time from your studio settings; seats are billed by plan, not per head."})]})}function p({period:e,onChange:t}){return(0,s.jsx)("div",{className:"inline-flex border hairline",role:"tablist","aria-label":"Billing period",children:["month","annual"].map(a=>(0,s.jsxs)("button",{type:"button",role:"tab","aria-selected":e===a,onClick:()=>t(a),className:"px-4 py-2 text-[12px] uppercase tracking-[0.14em] transition",style:{background:e===a?"var(--text, #1d1a17)":"transparent",color:e===a?"var(--bg, #f8f5ee)":"var(--text, var(--ink-2, #4a433c))"},children:["month"===a?"Monthly":"Annual","annual"===a&&(0,s.jsx)("span",{className:"ml-2 text-[10px]",style:{color:"inherit"},children:"save 16.7%"})]},a))})}function x({plan:e,period:t,isCurrent:a,isSignedIn:i,hasManagedSubscription:n,billingLoading:c}){let o="month"===t?e.monthly:Number((e.annual/12).toFixed(2)),m=0===e.monthly?null:"month"===t?"per month":`${(0,d.$g)(e.annual)} billed annually`;return(0,s.jsxs)("article",{className:"hairline border flex flex-col p-6",style:{background:e.highlighted?"var(--bg-elev, var(--paper-tint, #f2ede1))":"transparent",borderColor:e.highlighted?"var(--accent, #b85c3a)":"var(--border, var(--hairline, #e3dccc))"},children:[(0,s.jsxs)("header",{className:"mb-5 flex items-baseline justify-between gap-3",children:[(0,s.jsx)("h3",{className:"display-italic text-[24px] leading-none",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96',color:"var(--text, var(--ink, #1d1a17))"},children:e.name}),e.highlighted&&(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-[0.14em]",style:{color:"var(--accent, #b85c3a)"},children:"For independent designers"})]}),(0,s.jsxs)("div",{className:"mb-2 flex items-baseline gap-2",children:[(0,s.jsx)("span",{className:"display-italic text-[36px] leading-none",style:{fontVariationSettings:'"SOFT" 40, "opsz" 96',color:"var(--text, var(--ink, #1d1a17))"},children:(0,d.$g)(o)}),e.monthly>0&&(0,s.jsx)("span",{className:"text-[12px]",style:{color:"var(--text, var(--ink-2, #4a433c))"},children:"/ mo"})]}),(0,s.jsx)("p",{className:"mb-5 text-[12px]",style:{color:"var(--text, var(--ink-2, #4a433c))"},children:m??"forever"}),(0,s.jsx)("p",{className:"mb-5 text-[13px] leading-snug",style:{color:"var(--text, var(--ink-2, #4a433c))"},children:e.blurb}),(0,s.jsx)("ul",{className:"mb-6 space-y-2.5 text-[13px]",children:e.features.map(e=>(0,s.jsxs)("li",{className:"flex items-start gap-2",style:{color:"var(--text, var(--ink-2, #4a433c))"},children:[(0,s.jsx)(r.A,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0",style:{color:"var(--accent, #b85c3a)"}}),(0,s.jsx)("span",{children:e})]},e))}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsx)("div",{children:a?(0,s.jsx)("div",{className:"border hairline w-full px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em]",style:{borderColor:"var(--border, var(--hairline, #e3dccc))",color:"var(--text, var(--ink-2, #4a433c))"},children:"Current plan"}):"free"===e.slug?i?(0,s.jsx)("div",{className:"border hairline w-full px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em]",style:{borderColor:"var(--border, var(--hairline, #e3dccc))",color:"var(--text, var(--ink-2, #4a433c))"},children:"Always free"}):(0,s.jsx)(l(),{href:"/sign-up?redirect_url=%2Fsettings%23plan",className:"border w-full block px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em] transition",style:{background:"var(--text, #1d1a17)",color:"var(--bg, #f8f5ee)",borderColor:"var(--text, #1d1a17)"},children:"Start free"}):i?c?(0,s.jsx)("div",{className:"border hairline w-full px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em]",style:{color:"var(--text-muted)"},children:"Loading billingâ¦"}):n?(0,s.jsx)(l(),{href:"/settings#billing",className:"border w-full block px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em] transition",style:{background:"var(--text, #1d1a17)",color:"var(--bg, #f8f5ee)",borderColor:"var(--text, #1d1a17)"},children:"Manage in billing"}):(0,s.jsx)(h,{plan:e,period:t}):(0,s.jsx)(l(),{href:"/sign-up?redirect_url=%2Fsettings%23plan",className:"border w-full block px-4 py-2.5 text-center text-[12px] uppercase tracking-[0.14em] transition",style:{background:"var(--text, #1d1a17)",color:"var(--bg, #f8f5ee)",borderColor:e.highlighted?"var(--accent, #b85c3a)":"var(--text, #1d1a17)"},children:e.trialDays>0?`Try ${e.name} free`:`Choose ${e.name}`})})]})}function h({plan:e,period:t}){let[a,i]=(0,c.useState)(!1),[r,n]=(0,c.useState)(null);if("free"===e.slug)return null;let l=e.slug,d=async()=>{i(!0),n(null);try{let{url:e}
1=await o.FH.createBillingCheckout(l,t);window.location.assign(e)}catch(e){n(e instanceof Error?e.message:"Checkout is unavailable"),i(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>void d(),className:"border w-full px-4 py-2.5 text-[12px] uppercase tracking-[0.14em] transition disabled:cursor-wait disabled:opacity-60",style:{background:"var(--text, #1d1a17)",color:"var(--bg, #f8f5ee)",borderColor:e.highlighted?"var(--accent, #b85c3a)":"var(--text, #1d1a17)"},children:a?"Opening checkoutâ¦":e.trialDays>0?`Start ${e.trialDays}-day trial`:`Choose ${e.name}`}),r&&(0,s.jsx)("p",{className:"mt-2 text-[12px]",role:"alert",style:{color:"var(--accent)"},children:r})]})}}}]);
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.