1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60066,84624],{528:(e,t,a)=>{"use strict";a.d(t,{T:()=>o});var r=a(95155);a(12115);var n=a(63366),i=a(54158),s=a(64269);let l={xs:"h-6 w-6 ".concat(i.s$),sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base",xl:"h-16 w-16 text-lg"};function o(e){let{src:t,name:a,size:o="md",className:d,ring:c=!0}=e,u=function(e){var t,a;if(!e)return"";let r=e.trim().split(/\s+/).filter(Boolean);return 0===r.length?"":1===r.length?r[0].slice(0,2).toUpperCase():"".concat(null!=(t=r[0][0])?t:"").concat(null!=(a=r[1][0])?a:"").toUpperCase()}(a);return(0,r.jsxs)(n.bL,{"data-slot":"mp-avatar",className:(0,s.cn)(i.wG,"relative flex shrink-0 select-none bg-mp-surface-elevated",c&&"ring-1 ring-mp-border",l[o],d),children:[t?(0,r.jsx)(n._V,{src:t,alt:a?"".concat(a):"",referrerPolicy:"no-referrer",className:"aspect-square h-full w-full object-cover"}):null,(0,r.jsx)(n.H4,{delayMs:300*!!t,className:"flex h-full w-full items-center justify-center font-semibold uppercase text-mp-muted-foreground",children:u||(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-mp-border","aria-hidden":!0})})]})}},3290:(e,t,a)=>{"use strict";a.d(t,{e:()=>d,f:()=>o});var r=a(95155),n=a(18726),i=a(64269);let s={sm:"size-5",md:"size-8"},l={sm:20,md:32};function o(e){let{label:t,size:a="md",tone:o="auto",variant:d="circle",className:c}=e;return"matrix"===d?(0,r.jsx)(n.y,{variant:"matrix",tone:o,size:l[a],className:c,"aria-label":t}):(0,r.jsx)(n.y,{tone:o,className:(0,i.cn)(s[a],c),"aria-label":t})}function d(e){let{label:t,className:a,tone:n="auto"}=e;return(0,r.jsx)("div",{className:(0,i.cn)("flex min-h-[calc(100dvh-var(--mp-app-topbar-h))] w-full items-center justify-center",a),children:(0,r.jsx)(o,{label:t,tone:n,variant:"matrix"})})}},6017:(e,t,a)=>{"use strict";a.d(t,{e:()=>h});var r=a(95155),n=a(52619),i=a.n(n),s=a(49537),l=a(50712),o=a(22441),d=a(97525),c=a(54158),u=a(64269);function m(e){let{href:t,onClick:a,analyticsAction:n,icon:l,title:o,body:m,selected:f=!1,selectMode:p=!1}=e,h=(0,u.cn)("group flex h-full min-h-[11.5rem] w-full cursor-pointer flex-col p-3.5 text-left no-underline mp-focus sm:min-h-[13rem] sm:p-5","rounded-xl border bg-mp-surface transition-[transform,box-shadow,border-color,background-color] duration-200",f?"border-mp-foreground bg-mp-accent-subtle shadow-[var(--mp-shadow-surface)]":"border-mp-border hover:border-mp-border-strong hover:bg-mp-surface-elevated hover:shadow-[var(--mp-shadow-surface)] sm:hover:-translate-y-0.5"),x=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-mp-accent-subtle text-mp-accent sm:size-11 sm:rounded-xl",children:l}),(0,r.jsxs)("span",{className:"mt-3 min-w-0 sm:mt-4",children:[(0,r.jsx)("span",{className:"block text-sm font-semibold leading-snug text-mp-foreground sm:text-[0.9375rem]",children:o}),(0,r.jsx)("span",{className:(0,u.cn)(c.uS,"mt-1 block text-xs leading-snug sm:text-[0.8125rem]"),children:m})]}),(0,r.jsxs)("span",{className:"mt-auto inline-flex items-center gap-1 pt-4 text-xs font-medium text-mp-muted-foreground transition-colors group-hover:text-mp-foreground",children:[p?f?"Selected":"Select":"Continue",(0,r.jsx)(s.A,{className:"size-3.5 transition-transform duration-200 group-hover:translate-x-0.5","aria-hidden":!0})]})]});return(0,r.jsx)(d.GF,{className:"h-full border-0 bg-transparent p-0 shadow-none",children:t?(0,r.jsx)(i(),{href:t,className:h,onClick:a,"data-analytics-action":n,children:x}):(0,r.jsx)("button",{type:"button",className:h,onClick:a,"aria-pressed":p?f:void 0,"data-analytics-action":n,children:x})})}function f(e){let{href:t,onClick:a,analyticsAction:n,icon:l,title:o,body:d,selected:m=!1,selectMode:f=!1}=e,p=(0,u.cn)("group flex min-h-16 w-full items-center gap-3 text-left no-underline mp-focus","rounded-xl border bg-mp-surface p-4","transition-[background-color,border-color] duration-200",m?"border-mp-foreground bg-mp-accent-subtle":"border-mp-border hover:bg-mp-surface-elevated"),h=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-mp-accent-subtle text-mp-accent",children:l}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-mp-foreground",children:o}),(0,r.jsx)("span",{className:(0,u.cn)(c.uS,"mt-0.5 block text-xs sm:text-sm"),children:d})]}),(0,r.jsx)(s.A,{className:"size-4 shrink-0 text-mp-subtle-foreground transition-transform duration-200 group-hover:translate-x-0.5","aria-hidden":!0})]});return t?(0,r.jsx)(i(),{href:t,className:p,onClick:a,"data-analytics-action":n,children:h}):(0,r.jsx)("button",{type:"button",className:p,onClick:a,"aria-pressed":f?m:void 0,"data-analytics-action":n,children:h})}function p(){return(0,r.jsxs)("div",{className:"relative flex items-center py-1","aria-hidden":!0,
1children:[(0,r.jsx)("span",{className:"h-px flex-1 bg-mp-border"}),(0,r.jsx)("span",{className:"px-3 text-xs text-mp-subtle-foreground",children:"or"}),(0,r.jsx)("span",{className:"h-px flex-1 bg-mp-border"})]})}function h(e){let{clientHref:t,creatorHref:a,onClient:n,onCreator:i,variant:s="default",selected:d=null,onSelect:c}=e,u=!!c,h=u?void 0:t,x=u?void 0:a,g=()=>{c?c("client"):null==n||n()},b=()=>{c?c("creator"):null==i||i()};return"featured"===s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1 lg:hidden",children:[(0,r.jsx)(f,{href:h,onClick:g,analyticsAction:"marketplace_join_choose_client",icon:(0,r.jsx)(l.A,{className:"size-5","aria-hidden":!0}),title:"I need video made",body:"Post a brief and pick from open bids",selected:"client"===d,selectMode:u}),(0,r.jsx)(p,{}),(0,r.jsx)(f,{href:x,onClick:b,analyticsAction:"marketplace_join_choose_creator",icon:(0,r.jsx)(o.A,{className:"size-5","aria-hidden":!0}),title:"I create video",body:"Bid on briefs from brands",selected:"creator"===d,selectMode:u})]}),(0,r.jsxs)("div",{className:"hidden grid-cols-2 gap-4 lg:grid",children:[(0,r.jsx)(m,{href:h,onClick:g,analyticsAction:"marketplace_join_choose_client",icon:(0,r.jsx)(l.A,{className:"size-5 sm:size-6","aria-hidden":!0}),title:"I need video made",body:"Post a brief and pick from open bids",selected:"client"===d,selectMode:u}),(0,r.jsx)(m,{href:x,onClick:b,analyticsAction:"marketplace_join_choose_creator",icon:(0,r.jsx)(o.A,{className:"size-5 sm:size-6","aria-hidden":!0}),title:"I create video",body:"Bid on briefs from brands",selected:"creator"===d,selectMode:u})]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(f,{href:h,onClick:g,analyticsAction:"marketplace_join_choose_client",icon:(0,r.jsx)(l.A,{className:"size-5","aria-hidden":!0}),title:"I need video made",body:"Post a brief and pick from open bids",selected:"client"===d,selectMode:u}),(0,r.jsx)(f,{href:x,onClick:b,analyticsAction:"marketplace_join_choose_creator",icon:(0,r.jsx)(o.A,{className:"size-5","aria-hidden":!0}),title:"I create video",body:"Bid on briefs from brands",selected:"creator"===d,selectMode:u})]})}},6259:(e,t,a)=>{"use strict";a.d(t,{SQ:()=>m,_2:()=>f,lp:()=>p,mB:()=>h,rI:()=>c,ty:()=>u});var r=a(95155),n=a(12115),i=a(37738),s=a(63263),l=a(72251),o=a(75797),d=a(64269);let c=i.bL,u=i.l9;i.YJ,i.ZL,i.Pb,i.z6,n.forwardRef((e,t)=>{let{className:a,inset:n,children:l,...o}=e;return(0,r.jsxs)(i.ZP,{ref:t,className:(0,d.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",a),...o,children:[l,(0,r.jsx)(s.A,{className:"ml-auto"})]})}).displayName=i.ZP.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.G5,{ref:t,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-base ease-smooth data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",a),...n})}).displayName=i.G5.displayName;let m=n.forwardRef((e,t)=>{let{className:a,sideOffset:n=4,...s}=e;return(0,r.jsx)(i.ZL,{children:(0,r.jsx)(i.UC,{ref:t,sideOffset:n,className:(0,d.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-base ease-smooth data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",a),...s})})});m.displayName=i.UC.displayName;let f=n.forwardRef((e,t)=>
1{let{className:a,inset:n,variant:s="default",...l}=e;return(0,r.jsx)(i.q7,{ref:t,"data-variant":s,className:(0,d.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8","destructive"===s&&"text-destructive focus:bg-destructive/10 focus:text-destructive",a),...l})});f.displayName=i.q7.displayName,n.forwardRef((e,t)=>{let{className:a,children:n,checked:s,...o}=e;return(0,r.jsxs)(i.H_,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),checked:s,...o,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(i.VF,{children:(0,r.jsx)(l.A,{className:"h-4 w-4"})})}),n]})}).displayName=i.H_.displayName,n.forwardRef((e,t)=>{let{className:a,children:n,...s}=e;return(0,r.jsxs)(i.hN,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...s,children:[(0,r.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,r.jsx)(i.VF,{children:(0,r.jsx)(o.A,{className:"h-2 w-2 fill-current"})})}),n]})}).displayName=i.hN.displayName;let p=n.forwardRef((e,t)=>{let{className:a,inset:n,...s}=e;return(0,r.jsx)(i.JU,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",a),...s})});p.displayName=i.JU.displayName;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.wv,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",a),...n})});h.displayName=i.wv.displayName},11647:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var r=a(95155);a(12115);var n=a(32467),i=a(83101),s=a(64269);let l=(0,i.F)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-destructive-foreground [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",info:"border-transparent bg-info text-info-foreground [a&]:hover:bg-info/90 focus-visible:ring-info/20 dark:focus-visible:ring-info/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:a,asChild:i=!1,...o}=e,d=i?n.DX:"span";return(0,r.jsx)(d,{"data-slot":"badge",className:(0,s.cn)(l({variant:a}),t),...o})}},12175:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r=a(95155),n=a(3998),i=a(26615),s=a(64269);let l=function(e){let{className:t,...a}=e;return(0,r.jsx)(n.$n,{variant:"ghost",size:"icon","aria-label":"Close",className:(0,s.cn)("rounded-sm opacity-70 hover:opacity-100",t),...a,children:(0,r.jsx)(i.A,{className:"h-4 w-4"})})}},13399:(e,t,a)=>{"use strict";a.d(t,{K:()=>u});var r=a(95155);a(12115);var n=a(77133),i=a(9018),s=a(85514),l=a(96059),o=a(45748),d=a(54158),c=a(64269);function u(e){let{value:t,onValueChange:a,options:o,id:u,name:f,disabled:p,placeholder:h,className:x,contentClassName:g,size:b="default","aria-label":v}=e;return(0,r.jsxs)(n.bL,{value:t,onValueChange:a,disabled:p,name:f,children:[(0,r.jsxs)(n.l9,{id:u,"aria-label":v,"data-slot":"mp-select",className:(0,
1c.cn)("flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg border border-mp-border bg-mp-surface px-3 text-left text-sm text-mp-foreground","shadow-none transition-shadow duration-200","mp-focus","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-mp-subtle-foreground","sm"===b?d.cM:d.xI,x),children:[(0,r.jsx)(n.WT,{placeholder:h}),(0,r.jsx)(n.In,{asChild:!0,children:(0,r.jsx)(i.A,{className:"h-4 w-4 shrink-0 text-mp-subtle-foreground","aria-hidden":!0})})]}),(0,r.jsx)(n.ZL,{children:(0,r.jsxs)(n.UC,{position:"popper",sideOffset:6,className:(0,c.cn)("marketplace-tokens z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] overflow-hidden","rounded-xl border border-mp-border bg-mp-surface text-mp-foreground shadow-[var(--mp-shadow-elevated)]",g),children:[(0,r.jsx)(n.PP,{className:"flex h-6 items-center justify-center text-mp-subtle-foreground",children:(0,r.jsx)(s.A,{className:"h-4 w-4","aria-hidden":!0})}),(0,r.jsx)(n.LM,{className:"p-1",children:o.map(e=>"group"in e?(0,r.jsxs)(n.YJ,{children:[(0,r.jsx)(n.JU,{className:(0,c.cn)(d.AC,"px-3 py-1.5"),children:e.group}),e.options.map(e=>(0,r.jsx)(m,{option:e},e.value))]},e.group):(0,r.jsx)(m,{option:e},e.value))}),(0,r.jsx)(n.wn,{className:"flex h-6 items-center justify-center text-mp-subtle-foreground",children:(0,r.jsx)(l.A,{className:"h-4 w-4","aria-hidden":!0})})]})})]})}function m(e){let{option:t}=e;return(0,r.jsxs)(n.q7,{value:t.value,disabled:t.disabled,className:(0,c.cn)("relative flex min-h-10 cursor-pointer select-none items-center gap-2 rounded-lg py-2 pl-3 pr-9 text-sm outline-none","data-[highlighted]:bg-mp-surface-elevated data-[highlighted]:text-mp-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),children:[(0,r.jsx)(n.p4,{children:t.label}),(0,r.jsx)(n.VF,{className:"absolute right-3 flex items-center",children:(0,r.jsx)(o.A,{className:"h-4 w-4 text-mp-accent","aria-hidden":!0})})]})}},15320:(e,t,a)=>{"use strict";a.d(t,{YD:()=>m,YQ:()=>p,cs:()=>u,kb:()=>x,sD:()=>f,uM:()=>h,yT:()=>c});var r=a(12115),n=a(24880);let i={creators:[],services:[],portfolio:[],loading:!0,error:null},s=null,l=new Set;function o(){for(let e of Array.from(l))e()}async function d(){if(s)return void await s;s=(async()=>{try{let e=await fetch("/api/marketplace/catalog"),t=await e.json().catch(()=>null);if(!e.ok||"object"!=typeof t||null===t){i={creators:[],services:[],portfolio:[],loading:!1,error:"Could not load creators."},o();return}let a=Reflect.get(t,"creators"),r=Reflect.get(t,"services"),n=Reflect.get(t,"portfolio");i={creators:Array.isArray(a)?a:[],services:Array.isArray(r)?r:[],portfolio:Array.isArray(n)?n:[],loading:!1,error:null},o()}catch(e){i={creators:[],services:[],portfolio:[],loading:!1,error:"Could not load creators."},o()}finally{s=null}})(),await s}function c(e){var t;let a=null==(t=null==e?void 0:e.enabled)||t,[n,s]=(0,r.useState)(i);return(0,r.useEffect)(()=>{if(!a)return;let e=()=>s({...i});return l.add(e),d(),e(),()=>{l.delete(e)}},[a]),n}function u(){return s=null,i={...i,loading:!0,error:null},o(),d()}function m(e){return i.creators.find(t=>t.id===e)}function f(e){return i.portfolio.filter(t=>t.creatorId===e)}function p(e){var t;return null!=(t=i.portfolio.find(t=>t.creatorId===e&&t.isFeatured))?t:i.portfolio.find(t=>t.creatorId===e)}function h(e,t){e&&(0,n.ls)(t)&&(i={...i,portfolio:i.portfolio.map(a=>a.id===e?{...a,thumbnailUrl:t}:a)},o())}let x=d},15760:(e,t,a)=>{"use strict";a.d(t,{MarketplaceChrome:()=>tO});var r=a(95155),n=a(12115),i=a(20063),s=a(35027),l=a(13570),o=a(76545),d=a(83669),c=a(26349),u=a(89161),m=a(65590),f=a(54158),p=a(16137),h=a(5157);function x(e){let{children:t}=e,a=(0,i.usePathname)(),x=(0,i.useRouter)(),{user:g,loading:b}=(0,l.A)(),v=(0,n.useRef)(g);(0,n.useEffect)(()=>{v.current=g},[g]);let j=(0,n.useRef)(a);(0,n.useEffect)(()=>{j.current=a},[a]);let[w,y]=(0,n.useState)("checking"),[N,k]=(0,n.useState)(0),C=(0,n.useCallback)(()=>{y("checking"),k(e=>e+1)},[]),A=(0,m.aW)(a,"/dashboard")||(0,m.aW)(a,"/projects/new");return((0,n.useEffect)(()=>{if(!A)return void y("allowed");if(b)return void y("checking");let e=!1;return(async()=>{try{let t=v.current;if(t){let[a,r]=await Promise.all([(0,u.Wu)(t),(0,c.So)(t),(0,c.$n)(t)]);if(e)return;if("ok"===a.state&&"creator"===a.locked){y("checking"),x.replace((0,u.So)("creator"));return}if("ok"===r.state){if(r.profile.complete)return void y("allowed")}else if((0,d.c9)((0,d.PD)()))return void y("allowed");else if("unreachable"===r.state)return void y("unreachable")}else if((0,d.c9)((0,d.PD)()))return void y("allowed");let a="".concat(j.current).concat(window.location.search);if(y("checking"),(0,d.F9)(a),!v.current)return void x.replace((0,o.ym)(a));if((0,o.od)()){(0,o.cI)(a),x.replace(m.fq.onboarding);return}x.replace(m.fq.clientSetup)}catch(t){console.error("Client setup access check failed:",t),e||y("unreachable")}})(),()=>{e=!0}},[N,A,x,b,null==g?void 0:g.uid]),A)?"unreachable"===w?(0,r.jsx)("div",{className:f.mI,children:(0,r.jsx)(s.W,{title:"Could not check your profile",description:p.H,onRetry:C})}):b||"allowed"!==w?(0,r.jsx)(h.e,{}):(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(r.Fragment,{children:t})}
1var g=a(55678),b=a(9652),v=a(1377);function j(e){let{children:t}=e,a=(0,i.usePathname)(),d=(0,i.useRouter)(),{user:c,loading:x}=(0,l.A)(),j=(0,n.useRef)(c);(0,n.useEffect)(()=>{j.current=c},[c]);let w=(0,n.useRef)(a);(0,n.useEffect)(()=>{w.current=a},[a]);let[y,N]=(0,n.useState)("checking"),[k,C]=(0,n.useState)(0),A=(0,n.useCallback)(()=>{N("checking"),C(e=>e+1)},[]),S=(0,m.aW)(a,"/creator")&&!(0,m.aW)(a,"/creator/onboarding");return((0,n.useEffect)(()=>{if(!S)return void N("allowed");if(x)return void N("checking");let e=!1;return(async()=>{try{let t=j.current;if(t){let[a,r]=await Promise.all([(0,u.Wu)(t),(0,v.U)(t),(0,b.kf)(t)]);if(e)return;if("ok"===a.state&&"client"===a.locked){N("checking"),d.replace((0,u.So)("client"));return}if("ok"===r.state){if(r.status.verified)return void N("allowed");if((0,o.od)()){(0,o.cI)("".concat(w.current).concat(window.location.search)),N("checking"),d.replace(m.fq.onboarding);return}N("checking"),d.replace(m.fq.creatorOnboarding);return}if("unreachable"===r.state)return void N("unreachable")}if((0,g.DM)((0,g.w2)()))return void N("allowed");if(!e){if(t&&(0,o.od)()){(0,o.cI)("".concat(w.current).concat(window.location.search)),N("checking"),d.replace(m.fq.onboarding);return}N("checking"),d.replace(m.fq.creatorOnboarding)}}catch(t){console.error("Creator dashboard access check failed:",t),e||N("unreachable")}})(),()=>{e=!0}},[k,x,S,d,null==c?void 0:c.uid]),S)?"unreachable"===y?(0,r.jsx)("div",{className:f.mI,children:(0,r.jsx)(s.W,{title:"Could not check your creator profile",description:p.H,onRetry:A})}):"allowed"!==y?(0,m.uS)(a)?(0,r.jsx)(h.ListingGateLoading,{}):(0,r.jsx)(h.e,{}):(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(r.Fragment,{children:t})}var w=a(52619),y=a.n(w),N=a(78207),k=a(57218),C=a(27094),A=a(10610),S=a(22441),z=a(41715),D=a(41808),_=a(64269);let I=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(D.uB,{ref:t,className:(0,_.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",a),...n})});I.displayName=D.uB.displayName;let P=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:(0,r.jsx)(D.uB.Input,{ref:t,className:(0,_.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-placeholder-foreground disabled:cursor-not-allowed",a),...n})})});P.displayName=D.uB.Input.displayName;let E=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(D.uB.List,{ref:t,className:(0,_.cn)("max-h-60 overflow-y-auto overflow-x-hidden overscroll-contain",a),...n})});E.displayName=D.uB.List.displayName;let R=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(D.uB.Empty,{ref:t,className:(0,_.cn)("py-6 text-center text-sm",a),...n})});R.displayName=D.uB.Empty.displayName;let q=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(D.uB.Group,{ref:t,className:(0,_.cn)("overflow-hidden p-1 text-foreground",a),...n})});q.displayName=D.uB.Group.displayName;let L=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(D.uB.Item,{ref:t,className:(0,_.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",a),...n})});L.displayName=D.uB.Item.displayName;let M=e=>{let{className:t,...a}=e;return(0,r.jsx)("span",{className:(0,_.cn)("ml-auto text-xs tracking-widest text-muted-foreground",t),...a})};M.displayName="CommandShortcut";var F=a(25723),U=a(49260),W=a(15320),T=a(50366),B=a(33128);function K(e,t,a){var r,n;let i=t.toLowerCase().split(/\s+/).filter(Boolean);if(0===i.length)return 1;let s=(null!=(r=e.split("â£")[0])?r:"").toLowerCase(),l="".concat(s," ").concat(null!=(n=null==a?void 0:a.join(" "))?n:"").toLowerCase().split(/[\s.,;:!?()[\]{}"'/\\|&+·ââ-]+/);return i.every(e=>l.some(t=>t.startsWith(e)))?s.startsWith(i[0])?1:.5:0}function O(e){let{mode:t,nav:a,homeHref:i,query:s,onSelect:l}=e,{clientProjects:o,creatorJobs:d}=(0,B.rF)(),c=(0,W.yT)({enabled:"client"===t}),u=(0,n.useMemo)(()=>{let e=new Set([m.fq.projectNew]),t=[];for(let r of[...a.sections.flatMap(e=>
1e.items),...a.overflow])e.has(r.href)||(e.add(r.href),t.push({id:"page-".concat(r.id),label:r.label,href:r.href,icon:r.icon}));return t},[a]),f=(0,n.useMemo)(()=>{let e=[];return"client"===t&&e.push({id:"new-project",label:"Post a brief",href:m.fq.projectNew,icon:k.A,keywords:["new","project","hire"]}),e.push({id:"tour",label:"Take the tour",href:(0,T.Y1)(i),icon:C.A,keywords:["help","guide"]}),e},[t,i]),p=(0,n.useMemo)(()=>("creator"===t?d:o).slice(0,50).map(e=>{var a;return{id:"project-".concat(e.id),label:e.title||"Untitled project",href:"creator"===t?m.fq.creatorWorkspace(e.id):m.fq.project(e.id),icon:A.A,hint:null==(a=e.hiredCreator)?void 0:a.displayName}}),[t,o,d]),h=(0,n.useMemo)(()=>"client"===t?c.creators.slice(0,s.trim()?50:6).map(e=>({id:"creator-".concat(e.id),label:e.displayName,href:m.fq.creatorPublic(e.id),icon:S.A,hint:e.specialization!==e.displayName?e.specialization:void 0,keywords:e.specializations})):[],[t,c.creators,s]),x=[{heading:"Actions",entries:f},{heading:"Go to",entries:u},{heading:"creator"===t?"Your jobs":"Your projects",entries:p},{heading:"Creators",entries:h}];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R,{className:"py-10 text-mp-muted-foreground",children:"No matches."}),x.map(e=>e.entries.length>0?(0,r.jsx)(q,{heading:e.heading,className:"px-2 py-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-mp-subtle-foreground",children:e.entries.map(e=>{var t;let a=e.icon;return(0,r.jsxs)(L,{value:"".concat(e.label," ").concat(null!=(t=e.hint)?t:""," â£").concat(e.id),keywords:e.keywords,onSelect:()=>l(e),className:"min-h-11 cursor-pointer gap-3 rounded-lg px-2 text-mp-foreground aria-selected:bg-mp-surface-elevated aria-selected:text-mp-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-mp-muted-foreground",children:[a?(0,r.jsx)(a,{"aria-hidden":!0}):null,(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.label}),e.hint?(0,r.jsx)("span",{className:"max-w-[40%] truncate text-xs text-mp-subtle-foreground",children:e.hint}):null]},e.id)})},e.heading):null)]})}function J(e){let{mode:t,nav:a,homeHref:s,wide:l=!1}=e,o=(0,i.useRouter)(),d=function(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t(/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent))},[]),e}
1(),[c,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(""),h=(0,n.useRef)(null);(0,n.useEffect)(()=>{let e=e=>{"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)&&!e.altKey&&(e.preventDefault(),u(e=>(e?p(""):(0,U.n)("mp_app_nav","command_palette_shortcut"),!e)))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]);let x=e=>{u(e),e||p("")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{ref:h,type:"button",onClick:()=>{u(!0),(0,U.n)("mp_app_nav","command_palette_button")},"aria-label":"Search","aria-keyshortcuts":"Meta+K Control+K",className:(0,_.cn)("mp-focus flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-full text-mp-muted-foreground transition-colors duration-fast ease-smooth hover:bg-mp-surface-elevated hover:text-mp-foreground","md:h-9 md:justify-start md:gap-2 md:rounded-lg md:border md:border-mp-border md:bg-mp-surface md:px-3 md:hover:border-mp-border-strong md:hover:bg-mp-surface",l?"md:h-11 md:w-full md:max-w-xl lg:h-10":"md:w-56 lg:w-72"),children:[(0,r.jsx)(z.A,{className:"size-5 md:size-4","aria-hidden":!0}),(0,r.jsx)("span",{className:"hidden flex-1 text-left text-sm md:inline",children:"Search"}),(0,r.jsx)("kbd",{className:(0,_.cn)("hidden rounded border border-mp-border bg-mp-background px-1.5 py-0.5 font-sans text-mp-muted-foreground md:inline",f.qp),children:d?"âK":"Ctrl K"})]}),(0,r.jsx)(F.Qr,{open:c,onOpenChange:x,children:(0,r.jsxs)(F.pi,{onCloseAutoFocus:e=>{var t;e.preventDefault(),null==(t=h.current)||t.focus()},className:"top-[12vh] w-[min(40rem,calc(100vw-2rem))] max-w-none translate-y-0 sm:w-[min(40rem,calc(100vw-2rem))] sm:max-w-none",children:[(0,r.jsx)(F.Sb,{className:"sr-only",children:"Search Mindbase"}),(0,r.jsx)(F.uF,{className:"sr-only",children:"Jump to a page, project or creator. Use the arrow keys to move and Enter to open."}),(0,r.jsxs)(I,{className:"rounded-none bg-transparent text-mp-foreground [&_[cmdk-input-wrapper]]:border-mp-border [&_[cmdk-input-wrapper]_svg]:hidden",loop:!0,filter:K,children:[(0,r.jsx)(P,{value:m,onValueChange:p,placeholder:"Search pages, projects, creatorsâ¦",className:"h-14 text-base text-mp-foreground placeholder:text-mp-subtle-foreground md:text-sm"}),(0,r.jsx)(E,{className:"max-h-[min(60vh,28rem)] pb-2",children:c?(0,r.jsx)(O,{mode:t,nav:a,homeHref:s,query:m,onSelect:e=>{x(!1),(0,U.n)("mp_app_nav","command_palette:".concat(e.id.split("-")[0])),o.push(e.href)}}):null}),(0,r.jsxs)("div",{className:"hidden items-center gap-4 border-t border-mp-border px-4 py-2 text-xs text-mp-subtle-foreground md:flex",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)(M,{className:"ml-0 mr-1 tracking-normal text-mp-muted-foreground",children:"ââ"}),"move"]}),(0,r.jsxs)("span",{children:[(0,r.jsx)(M,{className:"ml-0 mr-1 tracking-normal text-mp-muted-foreground",children:"âµ"}),"open"]}),(0,r.jsxs)("span",{children:[(0,r.jsx)(M,{className:"ml-0 mr-1 tracking-normal text-mp-muted-foreground",children:"esc"}),"close"]})]})]})]})})]})}var H=a(86693),V=a(92824),G=a(13533),Y=a(50090),X=a(28702),Z=a(49128),Q=a(72019),$=a(99200),ee=a(50519);let et=[{id:"projects",label:"Work",items:[{id:"home",label:"Dashboard",href:function(e){return 0,m.fq.dashboard}("all"),icon:G.A},{id:"inbox",label:"Inbox",href:m.fq.clientInbox,icon:Y.A,badgeKey:"messageUnread"}]},{id:"create",label:"Hire",items:[{id:"new",label:"New project",href:m.fq.projectNew,icon:X.A},{id:"explore",label:"Explore creators",href:m.fq.explore,icon:z.A}]}],ea=[{id:"work",label:"Work",items:[{id:"home",label:"Dashboard",href:function(e){return 0,m.fq.creatorDashboard}("all"),icon:G.A},{id:"inbox",label:"Inbox",href:m.fq.creatorInbox,icon:Y.A,badgeKey:"messageUnread"}]},{id:"find",label:"Find work",items:[{id:"briefs",label:"Open briefs",href:m.fq.creatorDiscover,icon:A.A},{id:"quotes",label:"Your bids",href:m.fq.creatorProposals,icon:Z.A}]},{id:"money",label:"Money",items:[{id:"earnings",label:"Earnings",href:m.fq.creatorEarnings,icon:Q.A}]},{id:"profile",label:"Your profile",items:ee.eW.map((e,t)=>({id:"manage-".concat(e.id),label:e.label,href:e.href,icon:0===t?$.A:void 0,nested:t>0}))}],er=[{id:"home",label:"Home",href:m.fq.dashboard,icon:G.A},{id:"inbox",label:"Inbox",href:m.fq.clientInbox,icon:Y.A,badgeKey:"messageUnread"},{id:"new",label:"New",href:m.fq.projectNew,icon:X.A,primary:!0}
1],en=[{id:"how",label:"How it works",href:m.fq.howItWorks,icon:Z.A}],ei=[{id:"home",label:"Home",href:m.fq.creatorDashboard,icon:G.A},{id:"briefs",label:"Briefs",href:m.fq.creatorDiscover,icon:A.A},{id:"inbox",label:"Inbox",href:m.fq.creatorInbox,icon:Y.A,badgeKey:"messageUnread"},{id:"earnings",label:"Pay",href:m.fq.creatorEarnings,icon:Q.A}],es=[{id:"how",label:"How it works",href:m.fq.howItWorks,icon:Z.A}];function el(e){return"creator"===e?{sections:ea,mobile:ei,overflow:es}:{sections:et,mobile:er,overflow:en}}function eo(e,t,a){var r,n;let i=null!=(n=t.split("?")[0])?n:t,s=function(e){let t=e.split("?")[1];return t?new URLSearchParams(t).get("filter"):null}(t),l=null!=(r=null==a?void 0:a.get("filter"))?r:null;return null!==s?e===i&&("all"===s?!l||"all"===l:l===s):i===m.fq.dashboard?e===m.fq.dashboard&&!l:i===m.fq.clientOrders?e===m.fq.clientOrders:i===m.fq.clientInbox?e===m.fq.clientInbox:i===m.fq.creatorDashboard?e===m.fq.creatorDashboard&&!l:i===m.fq.creatorOrders?e===m.fq.creatorOrders:i===m.fq.creatorInbox?e===m.fq.creatorInbox:t===m.fq.home||t===m.fq.explore?e===t:t===m.fq.projectNew?(0,m.aW)(e,"/projects/new"):(0,m.aW)(e,i)}var ed=a(28239);function ec(e){var t;return null!=(t=e.split("?")[0])?t:e}function eu(e,t){var a;return"messageUnread"===e.badgeKey&&null!=(a=null==t?void 0:t.messageUnread)?a:0}function em(e){let{sections:t,pathname:a,searchParams:n,variant:i,onNavigate:s,badgeCounts:l}=e;return"rail"===i?(0,r.jsx)(r.Fragment,{children:t.map(e=>(0,r.jsxs)(ed.Cn,{children:[(0,r.jsx)(ed.jj,{children:e.label}),(0,r.jsx)(ed.rQ,{children:(0,r.jsx)(ed.wZ,{children:(function(e){let t=[];for(let a of e){if(a.nested){let e=ec(a.href),r=t.findIndex(t=>ec(t.parent.href)===e);r>=0?t[r].children.push(a):t.length>0?t[0].children.push(a):t.push({parent:a,children:[]});continue}t.push({parent:a,children:[]})}return t})(e.items).map(e=>{let{parent:t,children:i}=e,o=eo(a,t.href,n),d=t.icon,c=eu(t,l);return(0,r.jsxs)(ed.FX,{children:[(0,r.jsx)(ed.Uj,{asChild:!0,isActive:o,tooltip:t.label,className:"cursor-pointer",children:(0,r.jsxs)(y(),{href:t.href,"aria-current":o?"page":void 0,"aria-label":c>0?"".concat(t.label,", ").concat(c," unread"):t.label,onClick:()=>{(0,U.n)("mp_app_nav",t.id),null==s||s()},children:[d?(0,r.jsx)(d,{"aria-hidden":!0}):null,(0,r.jsx)("span",{children:t.label})]})}),c>0?(0,r.jsx)(ed.vo,{children:c>99?"99+":c}):null,i.length>0?(0,r.jsx)(ed.q9,{children:i.map(e=>{let t=eo(a,e.href,n);return(0,r.jsx)(ed.Fg,{children:(0,r.jsx)(ed.Cp,{asChild:!0,isActive:t,size:"sm",children:(0,r.jsx)(y(),{href:e.href,"aria-current":t?"page":void 0,className:"cursor-pointer no-underline",onClick:()=>{(0,U.n)("mp_app_nav",e.id),null==s||s()},children:(0,r.jsx)("span",{children:e.label})})})},e.id)})}):null]},t.id)})})})]},e.id))}):(0,r.jsx)("div",{className:"flex flex-col gap-4",children:t.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:(0,_.cn)(f.AC,"mb-2 px-3"),children:e.label}),(0,r.jsx)("div",{className:"flex flex-col gap-0.5",children:e.items.map(e=>{let t=eo(a,e.href,n),i=e.icon,o=eu(e,l);return(0,r.jsxs)(y(),{href:e.href,"aria-current":t?"page":void 0,"aria-label":o>0?"".concat(e.label,", ").concat(o," unread"):e.label,onClick:()=>{(0,U.n)("mp_app_nav",e.id),null==s||s()},className:(0,_.cn)(f.u4,e.nested&&f.XQ,t&&f.I0),children:[i?(0,r.jsx)(i,{className:"size-5 shrink-0","aria-hidden":!0}):e.nested?(0,r.jsx)("span",{className:(0,_.cn)("size-1.5 shrink-0 rounded-full",t?"bg-mp-accent":"bg-mp-border"),"aria-hidden":!0}):null,(0,r.jsx)("span",{className:(0,_.cn)("min-w-0 flex-1",e.nested&&"text-xs"),children:e.label}),o>0?(0,r.jsx)(V.MarketplaceBadge,{variant:"default",className:"min-w-5 justify-center px-1.5",children:o>99?"99+":o}):null]},e.id)})})]},e.id))})}var ef=a(29632),ep=a(33885),eh=a(51915),ex=a(65361),eg=a(42589),eb=a(9018),ev=a(98558),ej=a(528),ew=a(71869),ey=a(90308),eN=a(14585),ek=a(60901),eC=a(28849);let eA="flex min-h-11 cursor-pointer items-center gap-2 rounded-lg px-3 text-sm font-medium text-mp-foreground no-underline hover:bg-mp-surface-elevated";function eS(e){var t;let{mode:a,variant:s,onNavigate:d}=e,c=(0,i.useRouter)(),{user:p}
1=(0,l.A)(),[h,x]=(0,n.useState)(!1),[g,b]=(0,n.useState)(!1),v=(0,ey.f)(p),j=(null==p?void 0:p.displayName)||(null==p||null==(t=p.email)?void 0:t.split("@")[0])||"My account",w=!!p;(0,n.useEffect)(()=>{let e=!1;return(async()=>{if(!p){e||b(!1);return}let t=await (0,u.Wu)(p);e||b("ok"===t.state&&"client"===t.locked)})(),()=>{e=!0}},[null==p?void 0:p.uid]);let N=()=>{x(!1),null==d||d()},k=async()=>{(0,U.n)("mp_app_nav","logout"),N(),(0,o.cb)(),(0,ek.T)();try{w&&await (0,ep.CI)(eN.auth)}catch(e){}"ios"===localStorage.getItem("devicePlatform")&&(0,eC.Vm)(),c.replace(m.fq.home)},A=[{href:v,label:"Workspace",event:"workspace",icon:(0,r.jsx)(G.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})},{href:m.fq.account,label:"Account",event:"account",icon:(0,r.jsx)(S.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})},{href:m.fq.accountSettings,label:"Settings",event:"settings",icon:(0,r.jsx)(eh.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})},{href:(0,T.Y1)(v),label:"Take the tour",event:"tour",icon:(0,r.jsx)(C.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})}];"creator"===a?A.push({href:m.fq.creatorProfile,label:"Profile",event:"profile",icon:(0,r.jsx)($.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})}):g||A.push({href:m.fq.creatorOnboarding,label:"Become a creator",event:"become-creator",icon:(0,r.jsx)(ex.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0})});let z=e=>()=>{(0,U.n)("mp_app_nav",e),N()},D=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:(0,_.cn)(f.AC,"mb-1.5"),children:"Currency"}),(0,r.jsx)(ev.z,{className:"w-full [&>select]:w-full"})]}),I=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(ew.Gm,{children:[(0,r.jsx)("span",{className:"block truncate text-sm font-medium text-mp-foreground",children:j}),(null==p?void 0:p.email)?(0,r.jsx)("span",{className:"mt-0.5 block truncate text-xs font-normal",children:p.email}):null]}),A.map(e=>(0,r.jsx)(ew.J0,{asChild:!0,children:(0,r.jsxs)(y(),{href:e.href,className:"no-underline",onClick:z(e.event),children:[e.icon,e.label]})},e.href)),(0,r.jsx)(ew.J6,{className:"bg-mp-border"}),(0,r.jsx)(ew.L4,{children:D}),(0,r.jsx)(ew.J6,{className:"bg-mp-border"}),(0,r.jsxs)(ew.J0,{onSelect:()=>void k(),children:[(0,r.jsx)(eg.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0}),"Log out"]})]});return"list"===s?(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[A.map(e=>(0,r.jsxs)(y(),{href:e.href,className:eA,onClick:z(e.event),children:[e.icon,e.label]},e.href)),(0,r.jsx)("div",{className:"my-1 border-t border-mp-border",role:"separator"}),(0,r.jsx)("div",{className:"px-3 py-2",children:D}),(0,r.jsx)("div",{className:"my-1 border-t border-mp-border",role:"separator"}),(0,r.jsxs)("button",{type:"button",className:(0,_.cn)(eA,"w-full text-left"),onClick:()=>void k(),children:[(0,r.jsx)(eg.A,{className:"h-5 w-5 shrink-0","aria-hidden":!0}),"Log out"]})]}):"sidebar"===s?(0,r.jsx)(ez,{open:h,onOpenChange:x,name:j,email:null==p?void 0:p.email,photoURL:null==p?void 0:p.photoURL,children:I}):(0,r.jsxs)(ew.cg,{open:h,onOpenChange:x,children:[(0,r.jsx)(ew.uR,{asChild:!0,children:(0,r.jsx)("button",{type:"button","aria-label":"Account menu",className:"flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-[var(--mp-avatar-radius)] lg:size-10 border border-mp-border bg-mp-surface-elevated text-mp-foreground transition-colors hover:bg-mp-surface mp-focus",children:(0,r.jsx)(ej.T,{src:null==p?void 0:p.photoURL,name:j,size:"md",ring:!1,className:"bg-transparent text-mp-foreground"})})}),(0,r.jsx)(ew.bW,{side:"bottom",align:"end",sideOffset:8,collisionPadding:12,children:I})]})}function ez(e){let{open:t,onOpenChange:a,name:n,email:i,photoURL:s,children:l}=e,{isMobile:o}=(0,ed.cL)();return(0,r.jsx)(ed.wZ,{children:(0,r.jsx)(ed.FX,{children:(0,r.jsxs)(ew.cg,{open:t,onOpenChange:a,children:[(0,r.jsx)(ew.uR,{asChild:!0,children:(0,r.jsxs)(ed.Uj,{size:"lg",tooltip:"Account",className:"cursor-pointer data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground","aria-label":"Account menu",children:[(0,r.jsx)(ej.T,{src:s,name:n,size:"sm",ring:!1,className:"rounded-md bg-sidebar-accent text-sidebar-foreground"}),(0,r.jsxs)("span",{className:"grid min-w-0 flex-1 text-left text-sm leading-tight",children:[(0,r.jsx)("span",{className:"truncate font-medium",children:n}),i?(0,r.jsx)("span",{className:"truncate text-xs text-sidebar-foreground
1/70",children:i}):null]}),(0,r.jsx)(eb.A,{className:"ml-auto","aria-hidden":!0})]})}),(0,r.jsx)(ew.bW,{className:"w-[--radix-dropdown-menu-trigger-width] min-w-56",side:o?"bottom":"right",align:"end",sideOffset:4,children:l})]})})})}var eD=a(17730),e_=a(86832);function eI(e){let{mode:t,homeHref:a,nav:n,pathname:i,searchParams:s,workspace:l,workspaceSections:o,currentSection:d,badgeCounts:c}=e;return(0,r.jsx)("div",{className:"mp-app-sidebar hidden h-full lg:block",children:(0,r.jsxs)(ed.Bx,{collapsible:"icon",enableMobile:!1,className:"mp-app-rail border-r-0",children:[(0,r.jsx)(ed.Gh,{children:(0,r.jsx)(ed.wZ,{children:(0,r.jsx)(ed.FX,{children:(0,r.jsx)(ed.Uj,{size:"lg",asChild:!0,tooltip:"Workspace home",className:"cursor-pointer",children:(0,r.jsxs)(y(),{href:a,"aria-label":"Workspace home",children:[(0,r.jsx)(eD.x,{tone:"onDark",size:"mark",className:"hidden group-data-[collapsible=icon]:block"}),(0,r.jsx)(eD.x,{tone:"onDark",size:"rail",className:"group-data-[collapsible=icon]:hidden"})]})})})})}),(0,r.jsx)(ed.Yv,{children:l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ed.Cn,{children:(0,r.jsx)(ed.rQ,{children:(0,r.jsx)(ed.wZ,{children:(0,r.jsx)(ed.FX,{children:(0,r.jsx)(ed.Uj,{asChild:!0,tooltip:"Home",className:"cursor-pointer",children:(0,r.jsxs)(y(),{href:a,children:[(0,r.jsx)(ef.A,{"aria-hidden":!0}),(0,r.jsx)("span",{children:"Home"})]})})})})})}),(0,r.jsx)(ed.GX,{}),(0,r.jsxs)(ed.Cn,{children:[(0,r.jsx)(ed.jj,{children:"This project"}),(0,r.jsx)(ed.rQ,{children:(0,r.jsx)(ed.wZ,{"data-tour":"app-sections",children:o.map(e=>{let t=e.icon,a=(0,e_.wf)(l.basePath,e.id),n=e.id===d;return(0,r.jsx)(ed.FX,{children:(0,r.jsx)(ed.Uj,{asChild:!0,isActive:n,tooltip:e.label,className:"cursor-pointer",children:(0,r.jsxs)(y(),{href:a,"aria-current":n?"page":void 0,onClick:()=>(0,U.n)("mp_workspace_section",e.id),children:[(0,r.jsx)(t,{"aria-hidden":!0}),(0,r.jsx)("span",{children:e.label})]})})},e.id)})})})]})]}):(0,r.jsx)(em,{sections:n.sections,pathname:i,searchParams:s,variant:"rail",badgeCounts:c})}),(0,r.jsx)(ed.CG,{children:(0,r.jsx)(eS,{mode:t,variant:"sidebar"})}),(0,r.jsx)(ed.jM,{})]})})}var eP=a(15279),eE=a(61438),eR=a(51797),eq=a(45415),eL=a(31936);function eM(e){let{user:t,className:a,compact:i=!1}
1=e,[s,l]=(0,n.useState)("default");(0,n.useEffect)(()=>{(0,eL.qr)().then(e=>{l(e)})},[]);let o=(0,n.useCallback)(async()=>{if(t&&"loading"!==s&&"unsupported"!==s&&"denied"!==s){l("loading");try{let e=await (0,eL.R0)(t);"enabled"===e?l("enabled"):"denied"===e?l("denied"):"unsupported"===e?l("unsupported"):l("default")}catch(e){l("default")}}},[s,t]),d=(0,n.useCallback)(async()=>{if(!t)return void l("default");try{await (0,eL.S9)(t)}catch(e){}l("default")},[t]);return"unsupported"===s?null:(0,r.jsxs)(eq.uK,{type:"button",variant:"ghost",size:i?"icon":"sm",className:(0,_.cn)(!i&&"gap-1.5 text-xs",i&&"rounded-full",a),disabled:"loading"===s||"denied"===s,"aria-label":"denied"===s?"Notifications blocked in browser settings":"enabled"===s?"Disable browser notifications":"Enable browser notifications",onClick:()=>void("enabled"===s?d():o()),title:"denied"===s?"Notifications blocked in browser settings":"enabled"===s?"Disable browser notifications":"Enable browser notifications for messages and updates",children:["enabled"===s?(0,r.jsx)(eR.A,{className:"h-5 w-5 text-mp-accent","aria-hidden":!0}):(0,r.jsx)(eE.A,{className:"h-5 w-5","aria-hidden":!0}),i?null:"enabled"===s?"Alerts on":"Alerts off"]})}var eF=a(40508),eU=a(63892),eW=a(17774);let eT=[{id:"all",label:"All"},{id:"unread",label:"Unread"}];function eB(e){let{items:t,unreadCount:a,loading:n,error:i,filter:s,mode:o,live:d=!1,connectionMode:c,onFilterChange:u,onMarkAllRead:m,onRetry:p,onOpenItem:h,fullHeight:x=!1}=e,{user:g}=(0,l.A)(),b="unread"===s?t.filter(e=>!e.readAt):t,v=(0,eU._Q)(b);return(0,r.jsxs)("div",{className:(0,_.cn)("flex min-h-0 flex-col",x&&"h-full"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-mp-border px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-mp-foreground",children:"Notifications"}),d?(0,r.jsxs)("span",{className:(0,_.cn)(f.s$,"inline-flex items-center gap-1 rounded-full bg-mp-success/10 px-2 py-0.5 font-semibold uppercase tracking-wide text-mp-success"),children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-mp-success","aria-hidden":!0}),"Live"]}):"polling"===c?(0,r.jsx)("span",{className:(0,_.cn)(f.s$,"rounded-full bg-mp-surface-elevated px-2 py-0.5 font-medium text-mp-subtle-foreground"),children:"Syncing"}):null,a>0?(0,r.jsx)("span",{className:(0,_.cn)(f.dj,"rounded-full bg-mp-accent px-2 py-0.5 font-semibold text-white"),children:a>99?"99+":a}):null]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,r.jsx)(eM,{user:g,compact:!0}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:0===a,className:(0,_.cn)("rounded-md px-2 py-1 text-xs font-medium transition-colors",0===a?"cursor-not-allowed text-mp-subtle-foreground opacity-50":"cursor-pointer text-mp-accent hover:bg-mp-accent-subtle"),children:"Mark all read"})]})]}),(0,r.jsx)("div",{className:"border-b border-mp-border px-3 py-2",children:(0,r.jsx)(eF.b,{"aria-label":"Filter notifications",value:s,onValueChange:u,options:eT.map(e=>({value:e.id,label:"unread"===e.id&&a>0?"".concat(e.label," \xb7 ").concat(a):e.label}))})}),(0,r.jsx)("div",{className:(0,_.cn)("min-h-0 flex-1 overflow-y-auto overscroll-contain",!x&&"max-h-[min(26rem,60vh)]"),children:n&&0===t.length?(0,r.jsx)("ul",{className:"space-y-1 p-3","aria-hidden":!0,children:[0,1,2].map(e=>(0,r.jsxs)("li",{className:"flex gap-3 rounded-lg p-2",children:[(0,r.jsx)(eW.t,{className:"h-9 w-9 shrink-0 rounded-full"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2 py-1",children:[(0,r.jsx)(eW.t,{className:"h-3 w-1/2"}),(0,r.jsx)(eW.t,{className:"h-3 w-4/5"})]})]},e))}):i&&0===t.length?(0,r.jsxs)("div",{className:"px-6 py-10 text-center",children:[(0,r.jsx)("p",{className:"text-sm text-mp-muted-foreground",children:"Could not load notifications."}),(0,r.jsx)("button",{type:"button",onClick:p,className:"mt-3 cursor-pointer rounded-md border border-mp-border px-3 py-1.5 text-xs font-medium text-mp-foreground hover:bg-mp-surface-elevated",children:"Try again"})]}):0===b.length?(0,r.jsxs)("div",{className:"px-6 py-10 text-center",children:[(0,r.jsx)(eE.A,{className:"mx-auto h-8 w-8 text-mp-subtle-foreground","aria-hidden":!0}),(0,r.jsx)("p",{className:"mt-3 text-sm font-medium text-mp-foreground",children:"unread"===s?"Nothing unread":"No notifications yet"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-mp-muted-foreground",children:"unread"===s?"You are all caught up.":"Bids, deliveries and payments show up here. Turn on browser alerts above to get updates when you are away."})]}):v.map(e=>(0,r.jsxs)("section",{"aria-label":e.label,children:[(0,r.jsx)("h3",{className:(0,_.cn)(f.AC,"sticky top-0 z-10 bg-mp-background/95 px-4 py-1.5 backdrop-blur"),children:e.label}),(0,r.jsx)("ul",{children:e.items.map(e=>{let{icon:t,tone:a}=(0,eU.if)(e.type),n=!e.readAt;return(0,r.jsx)("li",{children:(0,r.jsxs)(y(),{href:(0,eU.Pq)(e,o),onClick:()=>h(e),className:(0,_.cn)("flex min-h-11 cursor-pointer gap-3 px-4 py-3 no-underline transition-colors hover:bg-mp-surface-elevated",
1n&&"bg-mp-accent-subtle"),children:[(0,r.jsx)("span",{className:(0,_.cn)("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",eU.MS[a]),children:(0,r.jsx)(t,{className:"h-5 w-5","aria-hidden":!0})}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("span",{className:"flex items-baseline gap-2",children:[(0,r.jsx)("span",{className:(0,_.cn)("flex-1 truncate text-sm text-mp-foreground",n?"font-semibold":"font-medium"),children:e.title}),(0,r.jsx)("time",{dateTime:e.createdAt,className:(0,_.cn)(f.dj,"shrink-0"),children:(0,eU.kV)(e.createdAt)})]}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs leading-relaxed text-mp-muted-foreground",children:e.body})]}),n?(0,r.jsx)("span",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-mp-accent","aria-label":"Unread"}):null]})},e.id)})})]},e.label))})]})}var eK=a(68725),eO=a(26333),eJ=a(8687),eH=a(66718);function eV(){var e;let{user:t}=(0,l.A)(),a=null!=(e=(0,i.usePathname)())?e:"",s=(0,eH.a)(),o=(0,m.uu)(a),{notifications:d,unreadCount:c,loading:u,error:p,mode:h,refresh:x,markAllRead:g,markRead:b}=(0,eJ.wD)(),[v,j]=(0,n.useState)(!1),[w,y]=(0,n.useState)("all"),N=e=>{j(e),e&&x()},k=(0,n.useCallback)(e=>{j(!1),e.readAt||b(e.id)},[b]);if(!t)return null;let C=c>0?"Notifications, ".concat(c," unread"):"Notifications",A="live"===h,S=e=>(0,r.jsx)(eB,{items:d,unreadCount:c,loading:u,error:p,filter:w,mode:o,live:A,connectionMode:h,onFilterChange:y,onMarkAllRead:g,onRetry:()=>void x(),onOpenItem:k,fullHeight:e}),z=(0,r.jsxs)("button",{type:"button","aria-label":C,"aria-expanded":v,className:(0,_.cn)("relative flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-full","text-mp-muted-foreground transition-colors hover:bg-mp-surface-elevated hover:text-mp-foreground","mp-focus"),children:[(0,r.jsx)(eP.A,{className:"h-5 w-5","aria-hidden":!0}),A?(0,r.jsx)("span",{className:"absolute right-1.5 top-1.5 h-2 w-2 rounded-full bg-mp-success ring-2 ring-mp-background","aria-hidden":!0}):null,c>0?(0,r.jsx)("span",{className:(0,_.cn)(f.s$,"absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-mp-accent px-1 font-bold leading-none text-white"),children:c>9?"9+":c}):null]});return s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>N(!v),"aria-label":C,"aria-expanded":v,className:(0,_.cn)("relative flex h-10 w-10 shrink-0 cursor-pointer items-center justify-center rounded-full","text-mp-muted-foreground transition-colors hover:bg-mp-surface-elevated hover:text-mp-foreground"),children:[(0,r.jsx)(eP.A,{className:"h-5 w-5","aria-hidden":!0}),A?(0,r.jsx)("span",{className:"absolute right-1.5 top-1.5 h-2 w-2 rounded-full bg-mp-success ring-2 ring-mp-background","aria-hidden":!0}):null,c>0?(0,r.jsx)("span",{className:(0,_.cn)(f.s$,"absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-mp-accent px-1 font-bold leading-none text-white"),children:c>9?"9+":c}):null]}),(0,r.jsx)(eK._s,{open:v,onOpenChange:N,children:(0,r.jsxs)(eK.zj,{className:"marketplace-tokens h-[85vh] border-mp-border bg-mp-background p-0",children:[(0,r.jsx)(eK.gk,{className:"sr-only",children:"Notifications"}),(0,r.jsx)("div",{className:"min-h-0 flex-1 pb-[env(safe-area-inset-bottom)]",children:S(!0)})]})})]}):(0,r.jsxs)(eO.AM,{open:v,onOpenChange:N,children:[(0,r.jsx)(eO.Wv,{asChild:!0,children:z}),(0,r.jsx)(eO.hl,{side:"bottom",align:"end",sideOffset:8,collisionPadding:16,className:"marketplace-root w-[min(24rem,calc(100vw-2rem))] overflow-hidden rounded-xl border-mp-border bg-mp-background p-0 shadow-lg","aria-label":"Notifications",children:S(!1)})]})}var eG=a(25725),eY=a(32467),eX=a(63263);a(20146);let eZ=n.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...a})});eZ.displayName="Breadcrumb";let eQ=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("ol",{ref:t,className:(0,_.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",a),...n})});eQ.displayName="BreadcrumbList";let e$=n.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,r.jsx)("li",{ref:t,className:(0,_.cn)("inline-flex items-center gap-1.5",a),...n})});e$.displayName="BreadcrumbItem";let e0=n.forwardRef((e,t)=>{let{asChild:a,className:n,...i}=e,s=a?eY.DX:"a";return(0,r.jsx)(s,{ref:t,className:(0,_.cn)("transition-colors hover:text-foreground",n),...i})});e0.displayName="BreadcrumbLink";let e1=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,_.cn)("font-normal text-foreground",a),...n})});e1.displayName="BreadcrumbPage";let e5=e=>{let{children:t,className:a,...n}=e;return(0,r.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,_.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5",a),...n,children:null!=t?t:(0,r.jsx)(eX.A,{})})};e5.displayName="BreadcrumbSeparator";var e2=a(57405),e4=a(70622);function e9(e){let{items:t,sections:a,pathname:i,searchParams:s,sectionLinks:l,mode:o,badgeCounts:d}=e,[c,u]=(0,n.useState)(!1);return(0,r.jsxs)(eK._s,{open:c,onOpenChange:u,children:[(0,r.jsx)(eK.Uz,{asChild:!0,children:(0,r.jsxs)("button",{type:"button","data-tour":l.length>0?"app-sections":void 0,className:(0,_.cn)("flex min-h-12 flex-1 cursor-pointer flex-col items-center justify-center gap-0.5 text-mp-subtle-foreground",f.qp),"aria-label":"More",children:[(0,r.jsx)(N.A,{className:"h-6 w-6","aria-hidden":!0}),"More"]})}),(0,r.jsxs)(eK.zj,{className:"marketplace-root border-mp-border bg-mp-background",children:[(0,r.jsx)(eK.BE,{children:(0,r.jsx)(eK.gk,{children:"More"})}),(0,r.jsxs)("nav",{className:"flex flex-col gap-1 px-4 pb-[calc(1rem+env(safe-area-inset-bottom))]","aria-label":"More",children:[l.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:(0,_.cn)(f.AC,"px-3 pb-1"),children:"This project"}),l.map(e=>(0,r.jsx)(y(),{href:e.href,"aria-current":e.current?"page":void 0,onClick:()=>u(!1),className:(0,_.cn)(f.u4,e.current&&f.I0),children:e.label},e.href))]}):null,(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)(em,{sections:a,pathname:i,searchParams:s,variant:"drawer",onNavigate:()=>u(!1),badgeCounts:d})}),t.map(e=>{let t=e.icon,a=eo(i,e.href,s);return(0,r.jsxs)(y(),{href:e.href,"aria-current":a?"page":void 0,onClick:()=>{u(!1),(0,U.n)("mp_app_nav",e.id)},className:(0,_.cn)(f.u4,a&&f.I0),children:[t?(0,r.jsx)(t,{className:"size-5 shrink-0","aria-hidden":!0}):null,e.label]},e.id)}),(0,r.jsx)("p",{className:(0,_.cn)(f.AC,"px-3 pb-1 pt-3"),children:"Session"}),(0,r.jsx)(eS,{mode:o,variant:"list",onNavigate:()=>u(!1)})]})]})]})}function e3(e){var t,a;let{children:s}=e,o=(0,i.usePathname)(),d=(0,i.useSearchParams)(),{user:c}=(0,l.A)(),p=(0,eJ.Wy)(),h=(0,m.uu)(o),x=el(h),g=(0,e_.aI)(o),b="creator"===h?m.fq.creatorDashboard:m.fq.dashboard,v="creator"===h?"Creator":"Client",j=(0,n.useMemo)(()=>{var e;return{messageUnread:null!=(e=null==p?void 0:p.notifications.filter(e=>"message_received"===e.type&&!e.readAt).length)?e:0}},[null==p?void 0:p.notifications]),w=d.get("section"),N=g&&(0,e_.QV)(w,g.role)?w:e_.gL,C=g?(0,e_.zz)(g.role):[],A=g?C.map(e=>({href:(0,e_.wf)(g.basePath,e.id),label:e.label,current:e.id===N})):[],S=function(e,t,a){let r=null;for(let n of e)for(let e of n.items)eo(t,e.href,a)&&(r=e);return r}(x.sections,o,d),z=C.find(e=>e.id===N),D=g?null!=(t=null==z?void 0:z.label)?t:"This project":null!=(a=null==S?void 0:S.label)?a:"Home";return(0,n.useEffect)(()=>{c&&(0,B.bu)(c)},[null==c?void 0:c.uid]),(0,n.useEffect)(()=>{let e=!1;return(async()=>{if(c){let t=await (0,u.Wu)(c);if(e)return;if("ok"===t.state&&t.locked)return(0,e4.RC)(t.locked)}e||(0,e4.RC)(h)})(),()=>{e=!0}},[h,null==c?void 0:c.uid]),(0,r.jsx)(H.zP,{children:(0,r.jsxs)(ed.GB,{className:"flex h-full min-h-0 flex-1 overflow-hidden",children:[(0,r.jsx)(eI,{mode:h,homeHref:b,nav:x,pathname:o,searchParams:d,workspace:g,workspaceSections:C,currentSection:N,badgeCounts:j}),(0,r.jsxs)(ed.sF,{id:"main-content",className:"min-h-0 overflow-hidden bg-mp-background","data-tour":"app-work",children:[(0,r.jsxs)("header",{className:"mp-app-topbar z-40 flex h-[var(--mp-app-topbar-h)] shrink-0 items-center justify-between gap-3 px-3 lg:px-4","data-tour":"app-rail",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,r.jsx)(ed.x2,{className:"hidden cursor-pointer text-mp-muted-foreground hover:text-mp-foreground lg:inline-flex",onClick:()=>(0,U.n)("mp_app_nav","sidebar_toggle")}),(0,r.jsx)(e2.fy,{orientation:"vertical",className:"hidden h-4 lg:block"}),(0,r.jsx)(y(),{href:b,className:"inline-flex py-1 lg:hidden","aria-label":"Workspace home",children:(0,r.jsx)(eD.x,{size:"rail"})}),(0,r.jsx)(eZ,{className:"hidden min-w-0 lg:block",children:(0,r.jsxs)(eQ,{children:[(0,r.jsx)(e$,{children:(0,r.jsx)(e0,{asChild:!0,children:(0,r.jsx)(y(),{href:b,className:"no-underline",children:v})})}),g?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e5,{}),(0,r.jsx)(e$,{children:(0,r.jsx)(e1,{className:"truncate text-mp-muted-foreground",children:"This project"})})]}):null,(0,r.jsx)(e5,{}),(0,r.jsx)(e$,{children:(0,r.jsx)(e1,{className:"truncate",children:D})})]})})]}),(0,r.jsxs)("div",{className:"ml-auto flex items-center gap-1 sm:gap-2","aria-label":"Account utilities",children:[(0,r.jsx)(H.SO,{}),(0,r.jsx)(J,{mode:h,nav:x,homeHref:b}),"client"!==h||(0,m.aW)(o,m.fq.projectNew)?null:(0,r.jsxs)(eq.I3,{href:m.fq.projectNew,size:"sm",className:"hidden lg:inline-flex",onClick:()=>(0,U.n)("mp_app_nav","topbar_new_project"),children:[(0,r.jsx)(k.A,{className:"size-4","aria-hidden":!0}),"New project"]}),(0,r.jsx)(eV,{}),(0,r.jsx)("div",{className:"lg:hidden",children:(0,r.jsx)(eS,{mode:h,variant:"topbar"})})]})]}),(0,r.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto pb-[calc(4rem+env(safe-area-inset-bottom))] lg:pb-0",children:(0,r.jsx)(eG.c.Provider,{value:N,children:s})})]}),(0,r.jsxs)("nav",{className:"mp-app-bottom-nav fixed inset-x-0 bottom-0 z-50 flex h-16 items-stretch pb-[env(safe-area-inset-bottom)] lg:hidden","aria-label":"Primary",children:[x.mobile.map(e=>{var t;let a=e.icon,n=eo(o,e.href,d),i="messageUnread"===e.badgeKey&&null!=(t=j.messageUnread)?t:0;return(0,r.jsxs)(y(),{href:e.href,"aria-current":n?"page":void 0,"aria-label":i>0?"".concat(e.label,", ").concat(i," unread"):e.label,onClick:()=>(0,U.n)("mp_app_nav",e.id),className:(0,_.cn)("flex min-h-12 flex-1 flex-col items-center justify-center gap-0.5 no-underline",f.qp,e.primary||n?"text-mp-accent":"text-mp-subtle-foreground"),children:[(0,r.jsxs)("span",{className:"relative inline-flex",children:[a?(0,r.jsx)(a,{className:(0,_.cn)("size-6",e.primary&&"size-7"),"aria-hidden":!0}):null,i>0?(0,r.jsx)("span",{className:(0,_.cn)("absolute -right-2 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-mp-warning px-0.5 text-mp-foreground",f.qp),"aria-hidden":!0,
1children:i>99?"99+":i}):null]}),e.label]},e.id)}),(0,r.jsx)(e9,{items:x.overflow,sections:x.sections,pathname:o,searchParams:d,sectionLinks:A,mode:h,badgeCounts:j})]})]})})}function e6(e){let{children:t}=e;return(0,r.jsx)(n.Suspense,{fallback:(0,r.jsx)("div",{className:"flex min-h-0 flex-1","aria-hidden":!0}),children:(0,r.jsx)(e3,{children:t})})}var e8=a(96987),e7=a(3290);let te=["/dashboard","/creator","/account","/marketplace-admin","/onboarding"];function tt(e){let{label:t}=e;return(0,r.jsx)(e7.e,{label:t})}function ta(e){let{children:t}=e,{user:a,loading:s}=(0,l.A)(),d=(0,i.usePathname)(),c=(0,i.useRouter)(),{openMarketplaceAuth:u}=(0,e8.o)(),f=te.some(e=>(0,m.aW)(d,e))||!(!d.startsWith("/projects/")||d.startsWith("/projects/new"))&&(/\/(setup|workspace|complete|edit)\/?$/.test(d)||/\/proposals\/.+/.test(d)||/^\/projects\/[^/]+\/?$/.test(d)),p=!(!d.startsWith("/projects/")||d.startsWith("/projects/new"))&&(/\/matching\/?$/.test(d)||/\/quotes\/?$/.test(d)),h=!s&&!a&&f&&!p&&(0,o.HC)();return((0,n.useEffect)(()=>{if(!s&&!a&&f&&!p){if((0,o.HC)())return void c.replace(m.fq.home);let e="".concat(d).concat(window.location.search),t=(0,o.GC)(d);(0,o.HQ)({kind:t,next:e}),u({kind:t,next:e}),c.replace(m.fq.home)}},[s,a,f,p,d,c,u]),(0,n.useEffect)(()=>{(!f||p||a)&&(0,o._l)()},[f,p,a]),h&&f&&!p)?(0,r.jsx)(tt,{label:"Signing out"}):s||a||!f||p?(0,r.jsx)(r.Fragment,{children:t}):null}var tr=a(18720),tn=a(18447);function ti(){var e;let{user:t,loading:a}=(0,l.A)(),r=(0,n.useRef)(t),i=null!=(e=null==t?void 0:t.uid)?e:null;return(0,n.useEffect)(()=>{r.current=t},[t]),(0,n.useEffect)(()=>{if(a||!i)return;let e=r.current;if(!e||e.uid!==i||function(e){let t=e.providerData.map(e=>e.providerId);return t.includes("google.com")&&!t.includes("password")}(e))return;let t=!1,n=async()=>{if(!t)try{let e=await (0,tn.pI)(),a=r.current;if(t||!a||a.uid!==i||e.unenforced||e.valid)return;(0,U.n)("mp_auth_session_expired","email-proof"),await (0,ep.CI)(eN.auth),tr.toast.message("Sign in again",{description:"Itâs been a couple of weeks â confirm your email with a code."})}catch(e){console.error("[MarketplaceSessionExpiry] proof check failed",e)}};n();let s=window.setInterval(()=>{n()},9e5);return()=>{t=!0,window.clearInterval(s)}},[a,i]),null}function ts(){let e=(0,i.useRouter)(),t=(0,i.usePathname)(),{user:a,loading:r}=(0,l.A)(),s=(0,n.useRef)(a),d=(0,n.useRef)(t);(0,n.useEffect)(()=>{s.current=a},[a]),(0,n.useEffect)(()=>{d.current=t},[t]);let c=(0,m.DJ)(t)||(0,m.s6)(t);return(0,n.useEffect)(()=>{if(r||c)return;let a=s.current;if(!a)return;let n=!1;return(async()=>{var r;let i=await (0,u.Wu)(a);if(n||d.current!==t||(0,m.s6)(d.current)||(0,m.DJ)(d.current)||(null==(r=s.current)?void 0:r.uid)!==a.uid)return;if("ok"===i.state&&i.locked)return(0,o.fT)();let l=!!(0,o.od)(),c=d.current===m.fq.home;("ok"===i.state&&!i.locked&&c||l)&&(l||(0,o.cI)(null),e.replace(m.fq.onboarding))})(),()=>{n=!0}},[r,c,t,e,null==a?void 0:a.uid]),null}a(88708);var tl=a(88464),to=a(63843),td=a(83809);let tc=[{label:"Explore",href:"/explore"},{label:"How it works",href:"/how-it-works"},{label:"For creators",href:"/for-creators"},{label:"Learn",href:td.DN,external:!0}],tu=[{label:"Explore",href:"/explore"},{label:"How it works",href:"/how-it-works"},{label:"For creators",href:"/for-creators"},{label:"AI Filmmaking Community",href:"/filmmaking-community"},{label:"Join",href:"/join"},{label:"Log in",href:"/login"},{label:"Create a project",href:"/projects/new"}],tm=[{label:"AI Training Program",href:td.DN,external:!0},{label:"Workshops",href:"".concat(td.DN,"#workshops"),external:!0},{label:"Resources",href:"".concat(td.DN,"#resources"),external:!0}],tf=[{label:"Join",href:"/join"},{label:"Log in",href:"/login"},{label:"Create a project",href:"/projects/new"}],tp=[{label:"Privacy Policy",href:"/privacy-policy"},{label:"Terms of Service",href:"/terms-of-use"},{label:"Cancellation & Refund",href:"/cancellation-refund"}];function th(e){let{link:t,className:a,onClick:n,children:i,"aria-current":s}=e;return t.external?(0,r.jsx)("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:a,onClick:n,children:null!=i?i:t.label}):(0,r.jsx)(y(),{href:t.href,className:a,onClick:n,"aria-current":s,children:null!=i?i:t.label})}function tx(){return(0,r.jsxs)("footer",{className:f.JT,children:[(0,r.jsxs)("div",{className:"mx-auto grid max-w-[1440px] gap-12 px-4 py-16 md:grid-cols-5 md:px-8 lg:px-12 lg:py-20",children:[(0,r.jsxs)("div",{className:"md:col-span-1",children:[(0,r.jsx)(y(),{href:"/",className:"inline-block transition-opacity hover:opacity-90","aria-label":"Mindbase home",children:(0,r.jsx)(eD.x,{size:"footer",tone
1:"onDark"})}),(0,r.jsx)("p",{className:(0,_.cn)(f.Ny,"mt-4 max-w-xs text-sm"),children:"A marketplace for video production, connecting brands with editors, reel creators, motion designers and AI video specialists."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:f.N1,children:"Product"}),(0,r.jsx)("ul",{className:"mt-5 space-y-2.5",children:tu.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(th,{link:e,className:f.Nj})},e.href))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:f.N1,children:"Learn"}),(0,r.jsx)("ul",{className:"mt-5 space-y-2.5",children:tm.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(th,{link:e,className:f.Nj})},e.href))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:f.N1,children:"Company"}),(0,r.jsx)("ul",{className:"mt-5 space-y-2.5",children:tf.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(th,{link:e,className:f.Nj})},e.href))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:f.N1,children:"Legal"}),(0,r.jsx)("ul",{className:"mt-5 space-y-2.5",children:tp.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(th,{link:e,className:f.Nj})},e.href))})]})]}),(0,r.jsx)("div",{className:"border-t border-mp-stage-foreground/10 px-4 py-6 md:px-8 lg:px-12",children:(0,r.jsxs)("div",{className:"mx-auto flex max-w-[1440px] flex-col items-center justify-between gap-3 sm:flex-row",children:[(0,r.jsxs)("p",{className:"text-center text-xs text-mp-stage-muted",children:["\xa9 ",2026," ",to.mH,". All rights reserved."]}),(0,r.jsx)(ev.z,{tone:"onDark"})]})})]})}var tg=a(24108),tb=a(80342),tv=a(41112),tj=a(45945),tw=a(40116),ty=a(49537),tN=a(67546),tk=a(73605),tC=a(27063);let tA=[{id:"all",label:"All creators",href:m.fq.explore,query:""},...td.QG.map(e=>({id:e.type,label:e.title,href:"".concat(m.fq.explore,"?q=").concat(encodeURIComponent(e.exploreQuery)),query:e.exploreQuery}))];function tS(){var e;let t=(0,i.usePathname)(),a=(0,i.useSearchParams)(),s=t===m.fq.explore,l=(null!=(e=a.get("q"))?e:"").trim().toLowerCase(),o=(0,n.useRef)(null);return(0,n.useEffect)(()=>{var e;let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;null==(e=o.current)||e.scrollIntoView({inline:"center",block:"nearest",behavior:t?"auto":"smooth"})},[t,l]),(0,r.jsx)("div",{className:(0,_.cn)(f.VX,"border-b border-mp-border"),children:(0,r.jsx)("nav",{"aria-label":"Categories",className:(0,_.cn)(f.Vq,"-ml-3 flex items-center gap-1 overflow-x-auto overscroll-x-contain py-2 [scrollbar-width:none] max-md:pr-6 max-md:[mask-image:linear-gradient(to_right,black_85%,transparent)] [&::-webkit-scrollbar]:hidden"),children:tA.map(e=>{let t=s&&l===e.query.toLowerCase();return(0,r.jsx)(y(),{href:e.href,ref:t?o:void 0,"aria-current":t?"page":void 0,onClick:()=>(0,U.n)("mp_category_strip",e.id),className:(0,_.cn)("mp-focus inline-flex min-h-11 shrink-0 items-center whitespace-nowrap rounded-full px-3 text-sm font-medium transition-colors duration-fast ease-smooth lg:min-h-9",t?"bg-mp-foreground text-mp-background":"text-mp-muted-foreground hover:bg-mp-surface-elevated hover:text-mp-foreground"),children:e.label},e.id)})})})}let tz={Explore:z.A,"How it works":ex.A,"For creators":tv.A,Learn:tj.A},tD="mp-focus flex min-h-12 items-center gap-3 rounded-xl px-2 py-1.5 text-base font-semibold text-mp-foreground transition-colors duration-fast ease-smooth hover:bg-mp-surface-elevated",t_="bg-mp-surface-elevated",tI="flex size-9 shrink-0 items-center justify-center rounded-lg border border-mp-border bg-mp-surface text-mp-foreground";function tP(e){var t;let{variant:a="marketing",transparent:s=!1,tone:d="onLight",className:c}=e,u=(0,i.usePathname)(),p=(0,i.useRouter)(),{user:h}=(0,l.A)(),{openMarketplaceAuth:x}=(0,e8.o)(),[g,b]=(0,n.useState)(!1),[v,j]=(0,n.useTransition)(),w=(0,ey.f)(h),N="onDark"===d,k=(0,tl.E)(),C=k&&"marketing"===a&&!N,A=w.startsWith("/creator")?"creator":"client",z=(0,n.useMemo)(()=>el(A),[A]),D="creator"===A?m.fq.creatorInbox:m.fq.clientInbox,I=(0,eJ.Wy)(),P=null!=(t=null==I?void 0:I.notifications.filter(e=>"message_received"===e.type&&!e.readAt).length)?t:0,E=u===m.fq.login,R=(0,m.DJ)(u)&&u!==m.fq.login,q=(0,m.DJ)(u),L=(0,m.uu)(u),M=e=>u===e||"/"!==e&&u.startsWith("".concat(e,"/")),F=e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||u===w||u.startsWith("".concat(w,"/"))||(e.preventDefault(),b(!1),j(()=>{p.push(w)}))},U=e=>N?(0,_.cn)("rounded-lg px-3 py-2 text-sm font-medium transition-colors duration-200",e?"text-white":"text-white/70 hover:text-white"):(0,_.cn)("rounded-lg px-3 py-2 text-sm font-medium transition-colors duration-200",e?"text-mp-foreground":"text-mp-muted-foreground hover:text-mp-foreground");return(0,r.jsxs)("header",{className:(0,_.cn)("z-50 border-0 shadow-none",s?"bg-transparent":"sticky top-0 bg-mp-background",s&&"sticky top-0",c),children:[(0,r.jsx)("div",{className:f.VX,children:(0,r.jsxs)("div",{className:(0,_.cn)(f.Vq,"flex h-[var(--mp-nav-h)] items-center justify-between gap-4"),children:[(0,r.jsx)(y(),{href:"/",className:"shrink-0 transition-opacity hover:opacity-90","aria-label":"Mindbase home",children:(0,r.jsx)(eD.x,{tone:d})}),C?(0,r.jsx)("div",{className:"flex min-w-0 flex-1 justify-end md:justify-center md:px-4 lg:px-8",children:(0,r.jsx)(J,{mode:A,nav:z,homeHref:w,wide:!0})}):null,"marketing"===a&&!C&&(0,r.jsx)("nav",{className:"hidden items-center gap-1 lg:flex lg:gap-2","aria-label":"Main",children:tc.map(e=>(0,r.jsx)(th,{link:e,className:U(!e.external&&M(e.href))},e.href))}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[q||k?null:(0,r.jsx)(ev.z,{quiet
1:!0,tone:N?"onDark":"light",className:"hidden lg:inline-flex"}),k?(0,r.jsxs)("div",{className:"flex items-center gap-1 sm:gap-2","aria-label":"Account utilities",children:[C?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(y(),{href:m.fq.explore,"aria-current":M(m.fq.explore)?"page":void 0,className:(0,_.cn)("hidden lg:inline-flex",U(M(m.fq.explore))),children:"Explore"})}):null,(0,r.jsx)(eq.I3,{href:w,variant:C?"ghost":"secondary",size:"sm",className:(0,_.cn)("hidden lg:inline-flex",N&&"border-white/25 bg-white/10 text-white hover:bg-white/15"),prefetch:!0,"aria-busy":v,onClick:F,children:v?"Openingâ¦":C?"Dashboard":"Workspace"}),C&&"client"===A?(0,r.jsx)(eq.I3,{href:m.fq.projectNew,size:"sm",className:"hidden lg:inline-flex",children:"Post a brief"}):null,C?(0,r.jsxs)(y(),{href:D,"aria-label":P>0?"Inbox, ".concat(P," unread"):"Inbox",className:"mp-focus relative flex size-11 shrink-0 items-center justify-center rounded-full text-mp-muted-foreground transition-colors duration-fast ease-smooth hover:bg-mp-surface-elevated hover:text-mp-foreground lg:size-10",children:[(0,r.jsx)(Y.A,{className:"size-5","aria-hidden":!0}),P>0?(0,r.jsx)("span",{className:"absolute right-1 top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-mp-foreground px-1 text-[length:var(--mp-text-micro)] font-semibold leading-none text-mp-background","aria-hidden":!0,children:P>99?"99+":P}):null]}):null,(0,r.jsx)(eV,{}),(0,r.jsx)(eS,{mode:C?A:L,variant:"topbar"})]}):(0,r.jsxs)(r.Fragment,{children:[E?null:(0,r.jsx)(eq.I3,{href:m.fq.login,variant:"ghost",size:"sm",className:(0,_.cn)("hidden lg:inline-flex",N&&"text-white/80 hover:bg-white/10 hover:text-white"),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),x({kind:"login"}))},children:"Log in"}),R?null:(0,r.jsx)(eq.I3,{href:m.fq.join,variant:N?"secondary":"primary",size:"sm",className:(0,_.cn)("hidden lg:inline-flex",N&&"border-white/25 bg-white text-black hover:bg-white/90"),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),x({kind:"join"}))},children:"Join"})]}),"flow"===a?(0,r.jsx)(y(),{href:"/",className:(0,_.cn)("hidden rounded-lg px-3 py-2 text-sm font-medium transition-colors lg:inline",N?"text-white/70 hover:text-white":"text-mp-muted-foreground hover:text-mp-foreground"),children:"Exit"}):null,(0,r.jsxs)(tC.cj,{open:g,onOpenChange:b,children:[(0,r.jsx)(tC.CG,{asChild:!0,className:"lg:hidden",children:(0,r.jsx)(eq.uK,{variant:"ghost",size:"icon",className:N?"text-white hover:bg-white/10":"text-mp-foreground","aria-label":"Open menu",children:g?(0,r.jsx)(tg.A,{className:"h-6 w-6"}):(0,r.jsx)(tb.A,{className:"h-6 w-6"})})}),(0,r.jsxs)(tC.h,{side:"right",className:"marketplace-root flex w-[min(100vw,22rem)] flex-col gap-0 border-mp-border bg-mp-background p-0 text-mp-foreground",children:[(0,r.jsx)(tC.qp,{className:"sr-only",children:"Menu"}),(0,r.jsx)("div",{className:"flex h-16 shrink-0 items-center border-b border-mp-border px-5",children:(0,r.jsx)(eD.x,{})}),(0,r.jsx)("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-4","aria-label":"Mobile",children:(0,r.jsxs)("ul",{className:"flex flex-col gap-1",children:[tc.map((e,t)=>{var a;let n=!e.external&&M(e.href),i=null!=(a=tz[e.label])?a:ex.A;return(0,r.jsx)("li",{"data-mp-list-item":"",style:(0,tk.v6)(t),children:(0,r.jsxs)(th,{link:e,onClick:()=>b(!1),"aria-current":n?"page":void 0,className:(0,_.cn)(tD,n&&t_),children:[(0,r.jsx)("span",{className:(0,_.cn)(tI,n&&"bg-mp-foreground text-mp-background"),children:(0,r.jsx)(i,{className:"size-5","aria-hidden":!0})}),(0,r.jsx)("span",{className:"flex-1",children:e.label}),e.external?(0,r.jsx)(tw.A,{className:"size-4 text-mp-subtle-foreground","aria-hidden":!0}):(0,r.jsx)(ty.A,{className:"size-4 text-mp-subtle-foreground","aria-hidden":!0})]})},e.href)}),k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("li",{"data-mp-list-item":"",style:(0,tk.v6)(tc.length),className:"mt-3 border-t border-mp-border pt-3",children:(0,r.jsxs)(y(),{href:w,prefetch:!0,"aria-busy":v,onClick:F,"aria-current":u===w?"page":void 0,className:(0,_.cn)(tD,u===w&&t_),children:[(0,r.jsx)("span",{className:tI,children:(0,r.jsx)(tN.A,{className:"size-5","aria-hidden":!0})}),(0,r.jsx)("span",{className:"flex-1",children:v?"Openingâ¦":"Dashboard"}),(0,r.jsx)(ty.A,{className:"size-4 text-mp-subtle-foreground","aria-hidden":!0})]})}),(0,r.jsx)("li",{"data-mp-list-item":"",style:(0,tk.v6)(tc.length+1),children:(0,r.jsxs)(y(),{href:D,onClick:()=>b(!1),"aria-current":u===D?"page":void 0,className:(0,_.cn)(tD,u===D&&t_),children:[(0,r.jsx)("span",{className:tI,children:(0,r.jsx)(Y.A,{className:"size-5","aria-hidden":!0})}),(0,r.jsx)("span",{className:"flex-1",children:"Inbox"}),P>0?(0,r.jsxs)("span",{className:"rounded-full bg-mp-foreground px-2 py-0.5 text-xs font-semibold tabular-nums text-mp-background",children:[P>99?"99+":P,(0,r.jsx)("span",{className:"sr-only",children:" unread"})]}):null,(0,r.jsx)(ty.A,{className:"size-4 text-mp-subtle-foreground","aria-hidden":!0})]})}),(0,r.jsx)("li",{"data-mp-list-item":"",style:(0,tk.v6)(tc.length+2),children:(0,r.jsxs)(y(),{href:m.fq.account,onClick:()=>b(!1),className:tD,children:[(0,r.jsx)("span",{className:tI,children:(0,r.jsx)(S.A,{className:"size-5","aria-hidden":!0})}),(0,r.jsx)("span",{className:"flex-1",children:"Account"}),(0,r.jsx)(ty.A,{className:"size-4 text-mp-subtle-foreground","aria-hidden":!0})]})})]}):null]})}),(0,r.jsxs)("div",{className:"flex shrink-0 flex-col gap-2 border-t border-mp-border px-4 pb-[max(1rem,env(safe-area-inset-bottom))] pt-4",children:[q||k?null:(0,r.jsx)(ev.z,{}),"flow"===a?(0,r.jsx)(eq.I3,{href:"/",variant:"ghost",className:"w-full",onClick:()=>b(!1),children:"Exit"}):null,k?null:(0,r.jsxs)(r.Fragment,{children:[R?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eq.I3,{href:(0,o.WH)(),variant:"primary",className:"w-full",onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),b(!1),x({kind:"join-client"}))},children:"Join as a client"}),(0,r.jsx)(eq.I3,{href:(0,o.bD)(),variant:"secondary",className:"w-full",onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),b(!1),x({kind:"join-creator"}))},children:"Join as a creator"})]}),E?null:(0,r.jsx)(eq.I3,{href:m.fq.login,variant:"ghost",className:"w-full",onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),b(!1),x({kind:"login"}))},children:"Already have an account? Log in"})]})]})]})]})]})]})}),C?(0,r.jsx)(n.Suspense,{fallback:null,children:(0,r.jsx)(tS,{})}):null]})}function tE(e){let{children:t,variant:a="marketing",showNav:s=!0,show
1Footer:l=!0,className:o,dataChrome:d}=e,c=null!=d?d:"workspace"===a?"app":a,u=(0,i.usePathname)(),m=(0,tl.E)(),f="/"===u&&"marketing"===a&&!m,[p,h]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!f)return;let e=()=>h(window.scrollY>24);return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[f]),(0,n.useEffect)(()=>{if("app"!==c)return;let e=document.documentElement;return e.classList.add("mp-app-lock"),()=>{e.classList.remove("mp-app-lock")}},[c]),(0,r.jsxs)("div",{className:(0,_.cn)("marketplace-root flex flex-col","app"===c?"min-h-0 flex-1 overflow-hidden":(0,_.cn)("min-h-svh","marketing"===c&&"h-auto shrink-0"),o),"data-mp-chrome":c,children:[(0,r.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-[100] focus:rounded-lg focus:bg-mp-accent focus:px-4 focus:py-2 focus:text-white",children:"Skip to main content"}),s&&(0,r.jsx)(tP,{variant:a,transparent:f&&!p,tone:f&&!p?"onDark":"onLight",className:f?"-mb-[var(--mp-nav-h)] transition-colors duration-200":void 0}),"workspace"===a?t:(0,r.jsx)("main",{id:"main-content",className:(0,_.cn)("flex flex-1 flex-col","flow"===a&&"min-h-0"),children:t}),l&&"marketing"===a&&(0,r.jsx)(tx,{})]})}var tR=a(15240),tq=a(43569),tL=a(72643);function tM(e){return"".concat("marketplace:push-ask-dismiss:v2:").concat(e)}function tF(e){try{localStorage.setItem(tM(e),"1")}catch(e){}}function tU(){var e;let{user:t,loading:a}=(0,l.A)(),s=null!=(e=(0,i.usePathname)())?e:"",[o,d]=(0,n.useState)("hidden"),c=!(0,m.sZ)(s)||(0,m.DJ)(s)||(0,m.s6)(s),u=(0,n.useCallback)((e,t)=>{e&&(tF(e),t&&(0,eL.Nh)(e)),d("hidden")},[]);(0,n.useEffect)(()=>{if(a||!t||c||function(e){try{return"1"===localStorage.getItem(tM(e))}catch(e){return!1}}(t.uid)||(0,eL.gU)(t.uid))return void d("hidden");let e=function(){if("undefined"==typeof navigator)return!1;let e=navigator.userAgent;return!!/iPad|iPhone|iPod/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1}(),r=!!window.matchMedia("(display-mode: standalone)").matches||!0===navigator.standalone;if(e&&!r){let e=window.setTimeout(()=>d("ios-install"),800);return()=>window.clearTimeout(e)}if(!("Notification"in window)||"default"!==Notification.permission)return void u(t.uid,!0);let n=window.setTimeout(()=>d("allow"),1200);return()=>window.clearTimeout(n)},[a,t,c,u]);let p=(0,n.useCallback)(()=>{u(null==t?void 0:t.uid,!0)},[null==t?void 0:t.uid,u]),h=(0,n.useCallback)(async()=>{if(t){tF(t.uid);try{let e=await (0,eL.R0)(t);"enabled"===e||"denied"===e||"unavailable"===e?(0,eL.Nh)(t.uid):"undefined"!=typeof Notification&&"default"!==Notification.permission&&(0,eL.Nh)(t.uid)}catch(e){}d("hidden")}},[t]);return"hidden"===o?null:(0,r.jsx)("div",{className:(0,_.cn)("marketplace-tokens relative z-30 w-full shrink-0 border-b border-mp-border","bg-mp-accent-subtle font-[family-name:var(--font-mp-body)] text-mp-foreground"),children:(0,r.jsx)(tL.Es,{role:"status",variant:"info",className:(0,_.cn)("rounded-none border-0 bg-transparent px-0 py-0 shadow-none","[&>svg]:hidden [&>svg~*]:pl-0 [&>svg+div]:translate-y-0"),children:(0,r.jsx)("div",{className:f.VX,children:(0,r.jsxs)("div",{className:(0,_.cn)(f.Vq,"flex items-center gap-3 py-2.5 sm:gap-4"),children:["ios-install"===o?(0,r.jsx)(tR.A,{className:"size-5 shrink-0 text-mp-accent","aria-hidden":!0}):(0,r.jsx)(eR.A,{className:"size-5 shrink-0 text-mp-accent","aria-hidden":!0}),(0,r.jsx)("p",{className:(0,_.cn)(f.lZ,"min-w-0 flex-1 text-mp-foreground"),children:"ios-install"===o?"On iPhone, add Mindbase to your Home Screen (Share â Add to Home Screen), open that icon, then allow alerts.":"Turn on browser alerts for messages and project updates when this tab is closed."}),"allow"===o?(0,r.jsx)(eq.uK,{type:"button",size:"sm",variant:"solid",className:"min-h-11 shrink-0",onClick:()=>void h(),children:"Allow"}):null,(0,r.jsx)(eq.uK,{type:"button",size:"icon",variant:"ghost",className:"size-11 shrink-0",onClick:p,"aria-label":"Dismiss",children:(0,r.jsx)(tq.A,{className:"size-5","aria-hidden":!0})})]})})})})}function tW(){var e;let{user:t,loading:a}=(0,l.A)(),r=null!=(e=(0,i.usePathname)())?e:"",s=(0,n.useRef)(null),o=(0,m.DJ)(r)||(0,m.s6)(r);return(0,n.useEffect)(()=>
1{if(a||!t||o||s.current===t.uid)return;let e=!1,r=window.setTimeout(()=>{(async()=>{if(!e){s.current=t.uid;try{await (0,eL.Rc)(t)}catch(e){}}})()},1500);return()=>{e=!0,window.clearTimeout(r)}},[a,t,o]),null}function tT(){return(0,r.jsx)(tr.Toaster,{theme:"light",className:"toaster group marketplace-tokens",position:"top-center",expand:!1,closeButton:!0,duration:5e3,toastOptions:{classNames:{toast:"group toast group-[.toaster]:border-mp-border group-[.toaster]:bg-mp-surface group-[.toaster]:text-mp-foreground group-[.toaster]:shadow-lg group-[.toaster]:rounded-xl",title:"group-[.toast]:font-semibold group-[.toast]:text-mp-foreground",description:"group-[.toast]:text-mp-muted-foreground group-[.toast]:text-sm",closeButton:"group-[.toast]:border-mp-border group-[.toast]:bg-mp-surface group-[.toast]:text-mp-muted-foreground"}}})}var tB=a(37758);let tK="mp_signed_in";function tO(e){let{children:t,signedInHint:a=!1}=e,s=(0,i.usePathname)(),{user:o,loading:d}=(0,l.A)(),c=(0,m.sZ)(s),u=(0,m.Rd)(s),f=(0,m.s6)(s);return(0,n.useEffect)(()=>{d||function(e){if("undefined"==typeof document)return;let t="https:"===window.location.protocol?"; Secure":"";document.cookie=e?"".concat(tK,"=1; Path=/; Max-Age=").concat(2592e3,"; SameSite=Lax").concat(t):"".concat(tK,"=; Path=/; Max-Age=0; SameSite=Lax").concat(t)}(!!o)},[d,o]),(0,n.useEffect)(()=>c?void 0:"/explore"===s||s.startsWith("/creators/")||!window.matchMedia("(max-width: 767px)").matches?void(0,W.kb)():(0,tB.B)(()=>{(0,W.kb)()}),[c,s]),(0,r.jsx)(e8.w,{children:(0,r.jsxs)(tl._.Provider,{value:d?a:!!o,children:[(0,r.jsx)(ti,{}),(0,r.jsxs)(eJ.i6,{children:[(0,r.jsx)(tW,{}),c?(0,r.jsx)(tE,{variant:"workspace",showNav:!1,showFooter:!1,dataChrome:"app",children:(0,r.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:[(0,r.jsx)(tU,{}),(0,r.jsx)(ta,{children:(0,r.jsx)(e6,{children:(0,r.jsx)(j,{children:(0,r.jsx)(x,{children:t})})})})]})}):(0,r.jsx)(tE,{variant:u?"flow":"marketing",showFooter:!u,showNav:!f,children:(0,r.jsx)(ta,{children:(0,r.jsx)(x,{children:t})})}),(0,r.jsx)(tT,{}),(0,r.jsx)(ts,{})]})]})})}},16137:(e,t,a)=>{"use strict";a.d(t,{H:()=>r,f:()=>n});let r="Check your connection and try again.",n={account:"Loading your account",bid:"Loading bid",bids:"Loading bids",brief:"Loading brief",creator:"Loading creator",creators:"Loading creators",earnings:"Loading your earnings",inbox:"Loading inbox",openBriefs:"Loading open briefs",orders:"Loading orders",project:"Loading project",proposal:"Loading proposal",work:"Loading your work",workspace:"Loading workspace",yourBids:"Loading your bids",yourProjects:"Loading your projects"}},17730:(e,t,a)=>{"use strict";a.d(t,{x:()=>l});var r=a(95155),n=a(54158),i=a(49734),s=a(64269);function l(e){let{className:t,size:a="nav",tone:l="onLight"}=e;if("mark"===a)return(0,r.jsx)("img",{src:i.vr[l],alt:"",width:32,height:32,className:(0,s.cn)("size-8 rounded-md object-contain",t),draggable:!1});let o=i.Pk[l];return(0,r.jsx)("img",{src:o.src,alt:"",width:o.width,height:o.height,className:(0,s.cn)(n.VQ,"footer"===a&&n.i4,"rail"===a&&n.VO,t),draggable:!1})}},18332:(e,t,a)=>{"use strict";a.d(t,{Fc:()=>o,TN:()=>c,XL:()=>d});var r=a(95155),n=a(12115),i=a(83101),s=a(64269);let l=(0,i.F)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=n.forwardRef((e,t)=>{let{className:a,variant:n,...i}=e;return(0,r.jsx)("div",{ref:t,role:"alert",className:(0,s.cn)(l({variant:n}),a),...i})});o.displayName="Alert";let d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("h5",{ref:t,className:(0,s.cn)("mb-1 font-medium leading-none tracking-tight",a),...n})});d.displayName="AlertTitle";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("text-sm [&_p]:leading-relaxed",a),...n})});c.displayName="AlertDescription"},18726:(e,t,a)=>{"use strict";a.d(t,{y:()=>p});var r=a(95155),n=a(92033),i=a(64269),s=a(12115);let l=(0,s.lazy)(()=>Promise.all([a.e(20459),a.e(99443)]).then(a.bind(a,99443)).then(e=>({default:e.DotmSquare3})));function o(e){return Math.max(2,Math.round(.14*e))}function d(e){let{size:t,className:a}=e,n=o(t),s=Math.max(0,(t-5*n)/4);
1return(0,r.jsx)("span",{"aria-hidden":!0,className:(0,i.cn)("inline-grid shrink-0 grid-cols-5 place-items-center",a),style:{width:t,height:t,gap:s},children:Array.from({length:25},(e,t)=>(0,r.jsx)("span",{className:"rounded-full bg-current opacity-15",style:{width:n,height:n}},t))})}function c(e){let{size:t=32,className:a,"aria-label":n="Loading",role:c="status"}=e;return(0,r.jsx)("div",{role:c,"aria-label":n,className:(0,i.cn)("inline-flex shrink-0",a),children:(0,r.jsx)("div",{"aria-hidden":!0,className:"inline-flex",children:(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)(d,{size:t}),children:(0,r.jsx)(l,{size:t,dotSize:o(t),ariaLabel:n})})})})}let u={auto:"text-muted-foreground",onLight:"text-foreground/55",onDark:"text-white",inherit:"text-current"};function m(e){let{className:t,size:a,toneClass:s,...l}=e;return(0,r.jsxs)("div",{className:(0,i.cn)("relative inline-flex shrink-0 size-4",s,t),style:null!=a?{width:a,height:a}:void 0,...l,children:[(0,r.jsx)("div",{className:"absolute inset-0 rotate-180",children:(0,r.jsx)(n.A,{"aria-hidden":!0,className:"size-full animate-spin opacity-20"})}),(0,r.jsx)(n.A,{"aria-hidden":!0,className:"relative size-full animate-spin"})]})}function f(e){let{className:t,size:a=24,toneClass:n,...s}=e;return(0,r.jsx)("svg",{height:a,width:a,preserveAspectRatio:"xMidYMid",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",className:(0,i.cn)("inline-block shrink-0",n,t),...s,children:(0,r.jsx)("path",{d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",fill:"none",stroke:"currentColor",strokeDasharray:"205.271142578125 51.317785644531256",strokeLinecap:"round",strokeWidth:"10",style:{transform:"scale(0.8)",transformOrigin:"50px 50px"},children:(0,r.jsx)("animate",{attributeName:"stroke-dashoffset",dur:"2s",keyTimes:"0;1",repeatCount:"indefinite",values:"0;256.58892822265625"})})})}function p(e){let{className:t,tone:a="auto",variant:n="circle-filled",size:s,"aria-label":l="Loading",role:o="status"}=e,d=u[a],p={role:o,"aria-label":l};return"matrix"===n?(0,r.jsx)(c,{className:(0,i.cn)(d,t),size:s,...p}):"infinite"===n?(0,r.jsx)(f,{className:t,size:s,toneClass:d,...p}):(0,r.jsx)(m,{className:t,size:s,toneClass:d,...p})}},24880:(e,t,a)=>{"use strict";a.d(t,{IS:()=>s,ls:()=>l});let r=/\.(jpe?g|png|webp|gif|avif|heic)(\?|$)/i,n=/\.(mp4|mov|webm|m4v|mkv|avi)(\?|$)/i,i=/\/marketplace\/(portfolio|drafts|projects)\//i;function s(e){let t=e.trim();return!!t&&(!!t.startsWith("data:video/")||!(t.startsWith("data:image/")||r.test(t)||/_poster\./i.test(t))&&!!(n.test(t)||i.test(t)))}function l(e){let t=null==e?void 0:e.trim();if(!(!t||s(t))&&(t.startsWith("data:image/")||r.test(t)||/_poster\./i.test(t)||!i.test(t)&&!n.test(t)))return t}},25723:(e,t,a)=>{"use strict";a.d(t,{Fy:()=>d,Qr:()=>l,Sb:()=>c,Xe:()=>f,Y7:()=>m,pi:()=>o,uF:()=>u});var r=a(95155);a(12115);var n=a(51834),i=a(54158),s=a(64269);let l=n.lG;function o(e){let{className:t,overlayClassName:a,...i}=e;return(0,r.jsx)(n.Cf,{...i,animation:"none",overlayClassName:(0,s.cn)("mp-dialog-overlay",a),className:(0,s.cn)("mp-dialog-content marketplace-tokens flex flex-col gap-0 p-0 sm:p-0","min-h-0 overflow-hidden rounded-mp-xl border-mp-border bg-mp-background text-mp-foreground","shadow-[var(--mp-shadow-elevated)]",t)})}function d(e){let{className:t,...a}=e;return(0,r.jsx)(n.c7,{className:(0,s.cn)("space-y-1 border-b border-mp-border p-4 pr-12 text-left",t),...a})}function c(e){let{className:t,...a}=e;return(0,r.jsx)(n.L3,{className:(0,s.cn)(i.Zu,t),...a})}function u(e){let{className:t,...a}=e;return(0,r.jsx)(n.rr,{className:(0,s.cn)(i.uS,t),...a})}function m(e){let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)("min-h-0 flex-1 overflow-y-auto p-4",t),...a})}function f(e){let{className:t,...a}=e;return(0,r.jsx)(n.Es,{className:(0,s.cn)("gap-2 border-t border-mp-border p-4",t),...a})}},25725:(e,t,a)=>{"use strict";a.d(t,{K:()=>s,c:()=>i});var r=a(12115),n=a(86832);let i=(0,r.createContext)(n.gL);function s(){return(0,r.useContext)(i)}},26333:(e,t,a)=>{"use strict";a.d(t,{AM:()=>l,Wv:()=>o,hl:()=>d});var r=a(95155),n=a(12115),i=a(31138),s=a(64269);let l=i.bL,o=i.l9,d=n.forwardRef((e,t)=>
1{let{className:a,align:n="center",sideOffset:l=4,...o}=e;return(0,r.jsx)(i.ZL,{children:(0,r.jsx)(i.UC,{ref:t,align:n,sideOffset:l,className:(0,s.cn)("z-50 w-72 max-w-[calc(100vw-2rem)] rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-none duration-base ease-smooth data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...o})})});d.displayName=i.UC.displayName},27063:(e,t,a)=>{"use strict";a.d(t,{CG:()=>p,Fm:()=>j,XW:()=>w,cj:()=>c,h:()=>v,kN:()=>h,qp:()=>y});var r=a(95155),n=a(12115),i=a(93409),s=a(83101),l=a(64269),o=a(12175),d=a(58752);let c=i.bL;function u(e,t){return n.Children.toArray(e).some(e=>{if(!n.isValidElement(e))return!1;if(t(e))return!0;let a=e.props.children;return!!a&&u(a,t)})}function m(e){var t;return(null==(t=e.type)?void 0:t.displayName)===i.hE.displayName}function f(e){var t;return(null==(t=e.type)?void 0:t.displayName)===i.VY.displayName}let p=i.l9,h=i.bm,x=i.ZL,g=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.hJ,{className:(0,l.cn)("fixed inset-0 z-50 bg-background/50 dark:bg-background/70 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n,ref:t})});g.displayName=i.hJ.displayName;let b=(0,s.F)("fixed z-50 gap-4 bg-card p-4 shadow-2xl transition ease-smooth data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-base data-[state=open]:duration-slow",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),v=n.forwardRef((e,t)=>{let{side:a="right",className:n,children:s,hideCloseButton:c=!1,overlayClassName:p,...h}=e,v=u(s,m),j=u(s,f),w="aria-describedby"in h;return(0,r.jsxs)(x,{children:[(0,r.jsx)(g,{className:p}),(0,r.jsxs)(i.UC,{ref:t,className:(0,l.cn)(b({side:a}),n),...h,...!j&&!w?{"aria-describedby":void 0}:{},children:[v?null:(0,r.jsx)(d.s,{children:(0,r.jsx)(i.hE,{children:"Sheet"})}),s,!c&&(0,r.jsx)(i.bm,{asChild:!0,children:(0,r.jsx)(o.A,{className:"absolute right-4 top-4"})})]})]})});v.displayName=i.UC.displayName;let j=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-2 text-left",t),...a})};j.displayName="SheetHeader";let w=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,l.cn)("flex flex-row gap-2 pb-safe-bottom",t),...a})};w.displayName="SheetFooter";let y=n.forwardRef((e,t)=>{let{className:a,children:n,...s}=e;return(0,r.jsx)(i.hE,{asChild:!0,...s,children:(0,r.jsx)("h3",{ref:t,className:(0,l.cn)("text-lg font-semibold text-foreground",a),children:n})})});y.displayName=i.hE.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.VY,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",a),...n})}).displayName=i.VY.displayName},28239:(e,t,a)=>{"use strict";a.d(t,{Bx:()=>N,Yv:()=>_,CG:()=>z,Cn:()=>I,rQ:()=>E,jj:()=>P,Gh:()=>S,sF:()=>A,wZ:()=>R,vo:()=>F,Uj:()=>M,FX:()=>q,q9:()=>U,Cp:()=>T,Fg:()=>W,GB:()=>y,jM:()=>C,GX:()=>D,x2:()=>k,cL:()=>w});var r=a(95155),n=a(12115),i=a(32467),s=a(83101),l=a(84945),o=a(66718),d=a(64269),c=a(3998),u=a(6
15142),m=a(86259),f=a(27063),p=a(20243),h=a(78340);let x=h.Kq,g=h.bL,b=h.l9,v=n.forwardRef((e,t)=>{let{className:a,sideOffset:n=4,...i}=e;return(0,r.jsx)(h.UC,{ref:t,sideOffset:n,className:(0,d.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md duration-fast ease-smooth animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a),...i})});v.displayName=h.UC.displayName;let j=n.createContext(null);function w(){let e=n.useContext(j);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}let y=n.forwardRef((e,t)=>{let{defaultOpen:a=!0,open:i,onOpenChange:s,className:l,style:c,children:u,...m}=e,f=(0,o.a)(),[p,h]=n.useState(!1),[g,b]=n.useState(a),v=null!=i?i:g,w=n.useCallback(e=>{let t="function"==typeof e?e(v):e;s?s(t):b(t),document.cookie="".concat("sidebar_state","=").concat(t,"; path=/; max-age=").concat(604800)},[s,v]),y=n.useCallback(()=>{if("boolean"==typeof f)return f?h(e=>!e):w(e=>!e)},[f,w,h]);n.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[y]);let N=v?"expanded":"collapsed",k=n.useMemo(()=>({state:N,open:v,setOpen:w,isMobile:f||!1,openMobile:p,setOpenMobile:h,toggleSidebar:y}),[N,v,w,f,p,h,y]);return(0,r.jsx)(j.Provider,{value:k,children:(0,r.jsx)(x,{delayDuration:0,children:(0,r.jsx)("div",{style:{"--sidebar-width":"16rem","--sidebar-width-icon":"3rem",...c},className:(0,d.cn)("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",l),ref:t,...m,children:u})})})});y.displayName="SidebarProvider";let N=n.forwardRef((e,t)=>{let{side:a="left",variant:n="sidebar",collapsible:i="offcanvas",enableMobile:s=!0,className:l,children:o,...c}=e,{isMobile:u,state:m,openMobile:p,setOpenMobile:h}=w();return"none"===i?(0,r.jsx)("div",{className:(0,d.cn)("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",l),ref:t,...c,children:o}):u?s?(0,r.jsx)(f.cj,{open:p,onOpenChange:h,...c,children:(0,r.jsxs)(f.h,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] overflow-y-auto bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:a,children:[(0,r.jsx)(f.Fm,{children:(0,r.jsx)(f.qp,{className:"sr-only",children:"Navigation"})}),(0,r.jsx)("div",{className:"flex min-h-full w-full flex-col",children:o})]})}):null:(0,r.jsxs)("div",{ref:t,className:"group peer hidden md:block text-sidebar-foreground","data-state":m,"data-collapsible":"collapsed"===m?i:"","data-variant":n,"data-side":a,children:[(0,r.jsx)("div",{className:(0,d.cn)("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===n||"inset"===n?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,r.jsx)("div",{className:(0,d.cn)("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex","left"===a?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===n||"inset"===n?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]",l),...c,children:(0,r.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});N.displayName="Sidebar";let k=n.forwardRef((e,t)=>
1{let{className:a,onClick:n,...i}=e,{toggleSidebar:s}=w();return(0,r.jsxs)(c.$n,{ref:t,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:(0,d.cn)("h-7 w-7",a),onClick:e=>{null==n||n(e),s()},...i,children:[(0,r.jsx)(l.A,{}),(0,r.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});k.displayName="SidebarTrigger";let C=n.forwardRef((e,t)=>{let{className:a,...n}=e,{toggleSidebar:i}=w();return(0,r.jsx)("button",{ref:t,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:(0,d.cn)("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...n})});C.displayName="SidebarRail";let A=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("main",{ref:t,className:(0,d.cn)("relative flex min-h-svh flex-1 flex-col bg-background overflow-x-hidden","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...n})});A.displayName="SidebarInset",n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(u.p,{ref:t,"data-sidebar":"input",className:(0,d.cn)("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...n})}).displayName="SidebarInput";let S=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"header",className:(0,d.cn)("flex flex-col gap-2 p-2",a),...n})});S.displayName="SidebarHeader";let z=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"footer",className:(0,d.cn)("flex flex-col gap-2 p-2",a),...n})});z.displayName="SidebarFooter";let D=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(m.w,{ref:t,"data-sidebar":"separator",className:(0,d.cn)("mx-2 w-auto bg-sidebar-border",a),...n})});D.displayName="SidebarSeparator";let _=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"content",className:(0,d.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...n})});_.displayName="SidebarContent";let I=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"group",className:(0,d.cn)("relative flex w-full min-w-0 flex-col p-2",a),...n})});I.displayName="SidebarGroup";let P=n.forwardRef((e,t)=>{let{className:a,asChild:n=!1,...s}=e,l=n?i.DX:"div";return(0,r.jsx)(l,{ref:t,"data-sidebar":"group-label",className:(0,d.cn)("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...s})});P.displayName="SidebarGroupLabel",n.forwardRef((e,t)=>{let{className:a,asChild:n=!1,...s}=e,l=n?i.DX:"button";return(0,r.jsx)(l,{ref:t,"data-sidebar":"group-action",className:(0,d.cn)("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...s})}).displayName="SidebarGroupAction";let E=n.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"group-content",className:(0,d.cn)("w-full text-sm",a),...n})});E.displayName="SidebarGroupContent";let R=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("ul",{ref:t,"data-sidebar":"menu",className:(0,d.cn)("flex w-full min-w-0 flex-col gap-1",a),...n})});R.displayName="SidebarMenu";let q=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("li",{ref:t,"data-sidebar":"menu-item",className:(0,d.cn)("group/menu-item relative",a),...n})});q.displayName="SidebarMenuItem";let L=(0,s.F)("peer/menu-button flex w-full items-center gap-2.5 overflow-hidden rounded-md px-3 py-2 text-left text-base outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent focus-visible:ring-2 active:bg-sidebar-accent disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-bold data-[active=true]:text-sidebar-primary data-[state=open]:hover:bg-sidebar-accent group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-9 text-base",sm:"h-8 text-sm",lg:"h-12 text-base group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),M=n.forwardRef((e,t)=>{let{asChild:a=!1,isActive:n=!1,variant:s="default",size:l="default",tooltip:o,className:c,...u}=e,m=a?i.DX:"button",{isMobile:f,state:p}=w(),h=(0,r.jsx)(m,{ref:t,"data-sidebar":"menu-button","data-size":l,"data-active":n,className:(0,d.cn)(L({variant:s,size:l}),c),...u});return o?("string"==typeof o&&(o={children:o}),(0,r.jsxs)(g,{children:[(0,r.jsx)(b,{asChild:!0,children:h}),(0,r.jsx)(v,{side:"right",align:"center",hidden:"collapsed"!==p||f,...o})]})):h});M.displayName="SidebarMenuButton",n.forwardRef((e,t)=>{let{className:a,asChild:n=!1,showOnHover:s=!1,...l}=e,o=n?i.DX:"button";return(0,r.jsx)(o,{ref:t,"data-sidebar":"menu-action",className:(0,d.cn)("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",s&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",a),...l})}).displayName="SidebarMenuAction";let F=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)("div",{ref:t,"data-sidebar":"menu-badge",className:(0,d.cn)("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...n})});F.displayName="SidebarMenuBadge",n.forwardRef((e,t)=>{let{className:a,showIcon:i=!1,...s}=e,l=n.useMemo(()=>"".concat(Math.floor(40*Math.random())+50,"%"),[]);return(0,r.jsxs)("div",{ref:t,"data-sidebar":"menu-skeleton",className:(0,d.cn)("rounded-md h-8 flex gap-2 px-2 items-center",a),...s,children:[i&&(0,r.jsx)(p.E,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,r.jsx)(p.E,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})}).displayName="SidebarMenuSkeleton";let U=n.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,r.jsx)("ul",{ref:t,"data-sidebar":"menu-sub",className:(0,d.cn)("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...n})});U.displayName="SidebarMenuSub";let W=n.forwardRef((e,t)=>{let{...a}=e;return(0,r.jsx)("li",{ref:t,...a})});W.displayName="SidebarMenuSubItem";let T=n.forwardRef((e,t)=>{let{asChild:a=!1,size:n="md",isActive:s,className:l,...o}=e,c=a?i.DX:"a";return(0,r.jsx)(c,{ref:t,"data-sidebar":"menu-sub-button","data-size":n,"data-active":s,className:(0,d.cn)("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===n&&"text-xs","md"===n&&"text-sm","group-data-[collapsible=icon]:hidden",l),...o})});T.displayName="SidebarMenuSubButton"},28870:(e,t,a)=>{"use strict";a.d(t,{Bi:()=>i,EB:()=>n,H9:()=>r});let r=[{code:"IN",name:"India",dial:"+91",phoneDigits:10},{code:"AE",name:"United Arab Emirates",dial:"+971",phoneDigits:9},{code:"SG",name:"Singapore",dial:"+65",phoneDigits:8},{code:"US",name:"United States",dial:"+1",phoneDigits:10},{code:"GB",name:"United Kingdom",dial:"+44",phoneDigits:10},{code:"AU",name:"Australia",dial:"+61",phoneDigits:9},{code:"CA",name:"Canada",dial:"+1",phoneDigits:10},{code:"DE",name:"Germany",dial:"+49",phoneDigits:10},{code:"FR",name:"France",dial:"+33",phoneDigits:9},{code:"NL",name:"Netherlands",dial:"+31",phoneDigits:9},{code:"IE",name:"Ireland",dial:"+353",phoneDigits:9},{code:"ES",name:"Spain",dial:"+34",phoneDigits:9},{code:"IT",name:"Italy",dial:"+39",phoneDigits:10},{code:"PT",name:"Portugal",dial:"+351",phoneDigits:9},{code:"PL",name:"Poland",dial:"+48",phoneDigits:9},{code:"SE",name:"Sweden",dial:"+46",phoneDigits:9},{code:"NO",name:"Norway",dial:"+47",phoneDigits:8},{code:"DK",name:"Denmark",dial:"+45",phoneDigits:8},{code:"CH",name:"Switzerland",dial:"+41",phoneDigits:9},{code:"JP",name:"Japan",dial:"+81",phoneDigits:10},{code:"KR",name:"South Korea",dial:"+82",phoneDigits:10},{code:"ID",name:"Indonesia",dial:"+62",phoneDigits:11},{code:"MY",name:"Malaysia",dial:"+60",phoneDigits:10},{code:"TH",name:"Thailand",dial:"+66",phoneDigits:9},{code:"PH",name:"Philippines",dial:"+63",phoneDigits:10},{code:"VN",name:"Vietnam",dial:"+84",phoneDigits:9},{code:"BD",name:"Bangladesh",dial:"+880",phoneDigits:10},{code:"PK",name:"Pakistan",dial:"+92",phoneDigits:10},{code:"LK",name:"Sri Lanka",dial:"+94",phoneDigits:9},{code:"NP",name:"Nepal",dial:"+977",phoneDigits:10},{code:"ZA",name:"South Africa",dial:"+27",phoneDigits:9},{code:"NG",name:"Nigeria",dial:"+234",phoneDigits:10},{code:"KE",name:"Kenya",dial:"+254",phoneDigits:9},{code:"BR",name:"Brazil",dial:"+55",phoneDigits:11},{code:"MX",name:"Mexico",dial:"+52",phoneDigits:10},{code:"NZ",name:"New Zealand",dial:"+64",phoneDigits:9}];function n(e){return r.find(t=>t.code===e)}function i(e){var t,a;return null!=(a=null==(t=n(e))?void 0:t.name)?a:e}},31936:(e,t,a)=>{"use strict";a.d(t,{Nh:()=>s,R0:()=>d,Rc:()=>u,S9:()=>c,gU:()=>i,qr:()=>o});var r=a(48466);function n(e){return"".concat("marketplace:push-auto-prompted:v2:").concat(e)}function i(e){try{return"1"===localStorage.getItem(n(e))}catch(e){return!0}}function s(e){try{localStorage.setItem(n(e),"1")}catch(e){}}async function l(){var e;return"undefined"!=typeof navigator&&"serviceWorker"in navigator?null!=(e=await navigator.serviceWorker.getRegistration("/sw-marketplace.js"))?e:await navigator.serviceWorker.register("/sw-marketplace.js",{scope:"/"}):null}async function o(){if(!("Notification"in window)||!("serviceWorker"in navigator))return"unsupported";if("denied"===Notification.permission)return"denied";let e=await navigator.serviceWorker.getRegistration("/sw-marketplace.js");return(e?await e.pushManager.getSubscription():null)&&"granted"===Notification.permission?"enabled":"default"}async function d(e){if(!("Notification"in window)||!("serviceWorker"
1in navigator))return"unsupported";if("denied"===Notification.permission)return"denied";let t=Notification.permission;if("default"===t&&(t=await Notification.requestPermission()),"granted"!==t)return"denied"===t?"denied":"default";let a=await fetch("/api/marketplace/push/subscribe"),n=await a.json();if(!n.publicKey)return"unavailable";let i=await l();if(!i)return"unavailable";let s=await i.pushManager.getSubscription(),o=null!=s?s:await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),a=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(a),n=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)n[e]=r.charCodeAt(e);return n}(n.publicKey)});return await fetch("/api/marketplace/push/subscribe",{method:"POST",headers:await (0,r.qs)(e),body:JSON.stringify(o.toJSON())}),"enabled"}async function c(e){var t;let a=null!=(t=await navigator.serviceWorker.getRegistration("/sw-marketplace.js"))?t:null,n=a?await a.pushManager.getSubscription():null;n&&(await fetch("/api/marketplace/push/subscribe",{method:"DELETE",headers:await (0,r.qs)(e),body:JSON.stringify({endpoint:n.endpoint})}),await n.unsubscribe())}async function u(e){if(i(e.uid))return;if(!("Notification"in window)||!("serviceWorker"in navigator)||"denied"===Notification.permission)return void s(e.uid);if("granted"===Notification.permission){s(e.uid);try{await d(e)}catch(e){}return}let t="default";try{t=await Notification.requestPermission()}catch(e){return}if("default"!==t&&(s(e.uid),"granted"===t))try{await d(e)}catch(e){}}},35027:(e,t,a)=>{"use strict";a.d(t,{W:()=>d});var r=a(95155),n=a(88125),i=a(45415),s=a(67073),l=a(54158),o=a(64269);function d(e){let{title:t="Something went wrong",description:a="Please try again or go back.",retryLabel:d="Try again",onRetry:c,className:u,illustrated:m=!1}=e;return(0,r.jsxs)("div",{className:(0,o.cn)(l.EE,"flex flex-col items-center p-8 text-center md:p-12",u),children:[m?(0,r.jsx)(s.A,{name:"error"}):(0,r.jsx)(n.A,{className:"h-10 w-10 text-mp-warning","aria-hidden":!0}),(0,r.jsx)("h3",{className:(0,o.cn)(l.ps,"mt-4"),children:t}),(0,r.jsx)("p",{className:(0,o.cn)(l.rW,"mt-2 max-w-md"),children:a}),c&&(0,r.jsx)(i.uK,{variant:"secondary",className:"mt-6",onClick:c,children:d})]})}},37758:(e,t,a)=>{"use strict";function r(){let{allowPhones:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||!e&&window.matchMedia("(max-width: 767px)").matches)return!1;let t=navigator.connection;return(null==t||!t.saveData)&&(null==t?void 0:t.effectiveType)!=="slow-2g"&&(null==t?void 0:t.effectiveType)!=="2g"}function n(e){let t=window;if("function"==typeof t.requestIdleCallback){let a=t.requestIdleCallback(e,{timeout:2500});return()=>{var e;return null==(e=t.cancelIdleCallback)?void 0:e.call(t,a)}}let a=window.setTimeout(e,1200);return()=>window.clearTimeout(a)}a.d(t,{B:()=>n,s:()=>r})},40508:(e,t,a)=>{"use strict";a.d(t,{b:()=>s});var r=a(95155);a(12115);var n=a(83413),i=a(64269);function s(e){let{value:t,onValueChange:a,options:s,className:l,itemClassName:o,"aria-label":d}=e;return(0,r.jsx)(n.bL,{type:"single",value:t,onValueChange:e=>{e&&a(e)},"aria-label":d,role:"radiogroup","data-slot":"mp-segmented",className:(0,i.cn)("flex items-center gap-1",l),children:s.map(e=>(0,r.jsx)(n.q7,{value:e.value,className:(0,i.cn)("cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium transition-colors","text-mp-muted-foreground hover:bg-mp-surface-elevated hover:text-mp-foreground","mp-focus","data-[state=on]:bg-mp-foreground data-[state=on]:text-mp-background",o),children:e.label},e.value))})}},45210:(e,t,a)=>{"use strict";a.d(t,{MarketplaceCurrencyProvider:()=>c,y:()=>u});var r=a(95155),n=a(12115),i=a(70839);function s(e){if("undefined"!=typeof document){document.cookie=(0,i.v3)(e);try{localStorage.setItem("user-country-code",(0,i.el)(e))}catch(e){}window.dispatchEvent(new CustomEvent(i.zF,{detail:e}))}}function l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var o=a(49260);let d=(0,n.createContext)(null);function c(e){let{initialCurrency:t,initialFx:a,geoCurrency:c,children:u}
1=e,[m,f]=(0,n.useState)(t),[p,h]=(0,n.useState)(a);(0,n.useEffect)(()=>{let e=function(){if("undefined"==typeof document)return null;let e=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("".concat(i.PD,"=")));return e?(0,i.kp)(e.slice(i.PD.length+1)):null}();return e?void f(e):c?void f(c):void f((0,i.sG)())},[c]),(0,n.useEffect)(()=>{let e=e=>{let t="detail"in e?e.detail:null;(0,i.HO)(t)&&f(t)};return window.addEventListener(i.zF,e),()=>window.removeEventListener(i.zF,e)},[]),(0,n.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await fetch("/api/marketplace/fx",{cache:"no-store"});if(!t.ok)return;let a=await t.json();!e&&function(e){if(!l(e))return!1;let t=e.inrPerUsd;if("number"!=typeof t||!Number.isFinite(t)||t<50||t>200||!l(e.usdRates))return!1;let a=e.usdRates.USD,r=e.usdRates.INR;if(1!==a||"number"!=typeof r||!Number.isFinite(r)||r<50||r>200)return!1;for(let t of i.KT){let a=e.usdRates[t];if("number"!=typeof a||!Number.isFinite(a)||a<=0)return!1}return!0}(a)&&h(a)}catch(e){}};t();let a=window.setInterval(()=>void t(),9e5);return()=>{e=!0,window.clearInterval(a)}},[]);let x=(0,n.useCallback)(e=>{f(e),s(e),(0,o.n)("mp_currency_change",e)},[]),g=(0,n.useMemo)(()=>({currency:m,inrPerUsd:p.inrPerUsd,fx:p,setCurrency:x,format:e=>(0,i.xX)(e,m,p),formatPaise:e=>(0,i.dG)(e,m,p),formatUsdCents:(e,t)=>(0,i.bN)(e,m,p,t)}),[m,p,x]);return(0,r.jsx)(d.Provider,{value:g,children:u})}function u(){let e=(0,n.useContext)(d);if(!e){let e=(0,i.ao)((0,i.zn)());return{currency:"USD",inrPerUsd:e.inrPerUsd,fx:e,setCurrency:s,format:t=>(0,i.xX)(t,"USD",e),formatPaise:t=>(0,i.dG)(t,"USD",e),formatUsdCents:(t,a)=>(0,i.bN)(t,"USD",e,a)}}return e}},49734:(e,t,a)=>{"use strict";a.d(t,{Pk:()=>r,vr:()=>n});let r={onLight:{src:"/marketplace/mindbase-wordmark.png",width:845,height:180},onDark:{src:"/marketplace/mindbase-lockup-on-dark.png",width:851,height:180}},n={onLight:"/icons/mindbase-mark.png",onDark:"/icons/mindbase-mark-on-dark.png"}},50366:(e,t,a)=>{"use strict";a.d(t,{WE:()=>n,Y1:()=>s,bj:()=>r,g5:()=>l,pG:()=>i,zq:()=>o});let r="marketplace:guided-tour:v1",n="marketplace:dashboard-tour:v1",i="tour";function s(e){return"".concat(e).concat(e.includes("?")?"&":"?").concat(i,"=1")}let l=[{id:"next",title:"Your next step",body:"The one thing that moves your projects forward right now: posting a brief, reviewing bids, or checking a new cut.",target:'[data-tour="dash-next"]'},{id:"stats",title:"Filter your work",body:'Tap a count to see only those projects. "Needs your attention" is anything waiting on you.',target:'[data-tour="dash-stats"]'},{id:"work",title:"Every project, most urgent first",body:"Open a project to see bids, chat with the creator, and review cuts. Payment stays in escrow until you approve.",target:'[data-tour="dash-work"]'},{id:"rail",title:"Your workspace bar",body:"Dashboard, inbox and hiring live here. Account and settings are under your avatar.",target:'[data-tour="app-rail"]'}],o=[{id:"next",title:"Your next step",body:"The one thing that moves your work forward right now: finishing your profile, bidding, or delivering a cut.",target:'[data-tour="dash-next"]'},{id:"strength",title:"Profile strength",body:"Two short stages unlock bidding. The extras below them are what clients compare when they pick a bid.",target:'[data-tour="dash-strength"]'},{id:"stats",title:"Filter your work",body:"Tap a count to see only bids, active jobs, or open briefs you can bid on.",target:'[data-tour="dash-stats"]'},{id:"work",title:"Jobs and bids, most urgent first",body:"Open a job to see the brief, chat with the client, and upload versions.",target:'[data-tour="dash-work"]'}]},50519:(e,t,a)=>{"use strict";a.d(t,{dZ:()=>i,eW:()=>n,vo:()=>s});var r=a(65590);let n=[{id:"profile",label:"Edit profile",href:r.fq.creatorProfile,description:"What brands see on your profile."},{id:"capabilities",label:"Capabilities",href:r.fq.creatorCapabilities,description:"The work types, languages and skills brands can filter on."},{id:"portfolio",label:"Portfolio",href:r.fq.creatorPortfolio,description:"Finished samples brands judge before they pick a bid."},{id:"availability",label:"Rates & availability",href:r.fq.creatorAvailability,description:"Your starting price, typical delivery time and whether you want new work."}];function i(e){var t,a;return null!=(a=null==(t=n.find(t=>
1t.id===e))?void 0:t.label)?a:e}function s(e){var t,a;return null!=(a=null==(t=n.find(t=>t.id===e))?void 0:t.description)?a:"What brands see on your profile."}},51834:(e,t,a)=>{"use strict";a.d(t,{Cf:()=>x,Es:()=>b,L3:()=>v,c7:()=>g,lG:()=>d,rr:()=>j,zM:()=>f});var r=a(95155),n=a(12115),i=a(93409),s=a(64269),l=a(12175),o=a(58752);let d=i.bL;function c(e,t){return n.Children.toArray(e).some(e=>{if(!n.isValidElement(e))return!1;if(t(e))return!0;let a=e.props.children;return!!a&&c(a,t)})}function u(e){var t;return(null==(t=e.type)?void 0:t.displayName)===i.hE.displayName}function m(e){var t;return(null==(t=e.type)?void 0:t.displayName)===i.VY.displayName}let f=i.l9,p=i.ZL;i.bm;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.hJ,{ref:t,className:(0,s.cn)("fixed inset-0 z-50 bg-black/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n})});h.displayName=i.hJ.displayName;let x=n.forwardRef((e,t)=>{let{className:a,children:n,variant:d="default",animation:f="default",hideCloseButton:x=!1,closeButtonClassName:g,overlayClassName:b,zIndex:v,...j}=e,w=c(n,u),y=c(n,m),N="aria-describedby"in j,k=v?{zIndex:v}:void 0,C=v?{zIndex:v}:void 0;return(0,r.jsxs)(p,{children:[(0,r.jsx)(h,{className:b,style:C}),(0,r.jsxs)(i.UC,{ref:t,style:k,className:(0,s.cn)("fixed z-50 grid gap-4 bg-card p-4 sm:p-6 shadow-xl border sm:rounded-xl","fullscreen"===d?"inset-0 translate-x-0 translate-y-0 w-screen h-screen max-w-none max-h-none rounded-none border-0":"left-[50%] top-[50%] -translate-x-1/2 -translate-y-1/2 gap-4 border p-4 sm:p-6 rounded-xl transition-[height,width] duration-300 ease-in-out",(()=>{switch(f){case"none":return"";case"fade":return"data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out";case"slide":return"data-[state=open]:animate-dialog-slide-in data-[state=closed]:animate-dialog-slide-out";default:return"duration-base ease-smooth data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]"}})(),(()=>{switch(d){case"mobile":return"w-[calc(100vw-2rem)] max-w-md mx-auto sm:w-full sm:max-w-2xl";case"fullscreen":return"";default:return"w-[calc(100vw-2rem)] max-w-lg mx-auto sm:w-full"}})(),a),...j,...!y&&!N?{"aria-describedby":void 0}:{},children:[w?null:(0,r.jsx)(o.s,{children:(0,r.jsx)(i.hE,{children:"Dialog"})}),n,!x&&(0,r.jsx)(i.bm,{asChild:!0,children:(0,r.jsx)(l.A,{className:(0,s.cn)("absolute right-4 top-4",g)})})]})]})});x.displayName=i.UC.displayName;let g=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)("flex flex-col space-y-1.5 text-left",t),...a})};g.displayName="DialogHeader";let b=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a})};b.displayName="DialogFooter";let v=n.forwardRef((e,t)=>{let{className:a,children:n,...l}=e;return(0,r.jsx)(i.hE,{asChild:!0,...l,children:(0,r.jsx)("h3",{ref:t,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",a),children:n})})});v.displayName=i.hE.displayName;let j=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i.VY,{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",a),...n})});j.displayName=i.VY.displayName},55245:(e,t,a)=>{"use strict";a.d(t,{p:()=>n,v:()=>r});let r=["reel_creator","editor","ai_creator","higgsfield_expert","motion_designer","full_production"];function n(e){return"string"==typeof e&&r.includes(e)}},55678:(e,t,a)=>{"use strict";a.d(t,{$o:()=>J,By:()=>f,DM:()=>U,G3:()=>g,GE:()=>S,I0:()=>O,Id:()=>B,L:()=>d,Nn:()=>C,PN:()=>y,Qp:()=>H,c_:()=>K,gR:()=>F,g_:()=>L,hh:()=>M,iN:()=>b,ix:()=>E,pd:()=>u,tI:()=>v,vl:()=>W,w2:()=>k,xV:()=>I,xx:()=>m,z4:()=>N,zK:()=>T});var r=a(28870),n=a(70839),i=a(93906),s=a(65590),l=a(24880),o=a(55245);let d="marketplace:creator-account",c="marketplace:creator-setup-next",u=600,m=80,f=8,p=["profile","work","portfolio","review"],h={profile:"Profile",work:"Your work",portfolio:"Portfolio",review:"Review"},x=["welcome","profile","about","expertise","sample","ready"],g=[{id:"you",label:"You"},{id:"work",label:"Work"},{id:"portfolio",label:"Portfolio"}];function b(e){return"expertise"===e?"work":"sample"===e||"ready"===e?"portfolio":"you"}
1function v(){return{photoDataUrl:"",photoFileName:"",displayName:"",title:"",countryCode:"IN",city:"",bio:"",languages:[],skills:[],capabilities:[],phoneNational:"",phoneVerified:!1,payoutKind:"",upiId:"",bankAccount:"",bankIfsc:"",bankHolder:"",offerTitle:"",startingPrice:"",deliveryDays:"",acceptingWork:!0,portfolioFileName:"",portfolioUrl:"",portfolioItems:[],verifiedAt:null,completedAt:null}}function j(e){return"object"==typeof e&&null!==e}function w(e){return"string"==typeof e?e:""}function y(e,t){var a,r;let n=t.slice(0,f),i=n[0];return{...e,portfolioItems:n,portfolioFileName:null!=(a=null==i?void 0:i.fileName)?a:"",portfolioUrl:null!=(r=null==i?void 0:i.url)?r:""}}function N(e){var t,a;let r=v();if(!j(e))return r;let n=Array.isArray(e.capabilities)?e.capabilities.filter(o.p):[],s="upi"===e.payoutKind||"bank"===e.payoutKind||"stripe"===e.payoutKind?e.payoutKind:"",d=w(e.portfolioFileName),c=w(e.portfolioUrl),u=function(e,t,a){let r=[];if(Array.isArray(e))for(let t of e){if(!j(t))continue;let e=w(t.fileName),a=w(t.url);if(!e&&!a)continue;let n=(0,l.ls)(w(t.thumbnailUrl));if(r.push({fileName:e,url:a,...n?{thumbnailUrl:n}:{}}),r.length>=f)break}return 0===r.length&&(t||a)&&r.push({fileName:t,url:a}),r}(e.portfolioItems,d,c),m=u[0];return{...r,photoDataUrl:w(e.photoDataUrl),photoFileName:w(e.photoFileName),displayName:w(e.displayName),title:w(e.title),countryCode:w(e.countryCode)||"IN",city:w(e.city),bio:w(e.bio),languages:function(e){if(!Array.isArray(e))return[];let t=new Set,a=[];for(let r of e){if(!j(r)||!(0,i.w4)(r.code)||t.has(r.code))continue;let e=(0,i.mY)(r.proficiency)?r.proficiency:"fluent";t.add(r.code),a.push({code:r.code,proficiency:e})}return a}(e.languages),skills:function(e){if(!Array.isArray(e))return[];let t=new Set,a=[];for(let r of e){if(!j(r)||!(0,i.pd)(r.id)||t.has(r.id))continue;let e=(0,i.aI)(r.level)?r.level:"intermediate";t.add(r.id),a.push({id:r.id,level:e})}return a}(e.skills),capabilities:n,phoneNational:w(e.phoneNational).replace(/\D/g,""),phoneVerified:!0===e.phoneVerified,payoutKind:s,upiId:w(e.upiId),bankAccount:w(e.bankAccount).replace(/\D/g,""),bankIfsc:w(e.bankIfsc).toUpperCase(),bankHolder:w(e.bankHolder),offerTitle:w(e.offerTitle),startingPrice:w(e.startingPrice),deliveryDays:w(e.deliveryDays),acceptingWork:!1!==e.acceptingWork,portfolioItems:u,portfolioFileName:null!=(t=null==m?void 0:m.fileName)?t:"",portfolioUrl:null!=(a=null==m?void 0:m.url)?a:"",verifiedAt:"string"==typeof e.verifiedAt?e.verifiedAt:null,completedAt:"string"==typeof e.completedAt?e.completedAt:null}}function k(){try{let e=localStorage.getItem(d);return e?N(JSON.parse(e)):v()}catch(e){return v()}}function C(e){try{localStorage.setItem(d,JSON.stringify(e))}catch(t){try{localStorage.setItem(d,JSON.stringify({...e,photoDataUrl:""}))}catch(e){}}}let A=/^https:\/\/\S+$/i;function S(e){let t=(0,r.Bi)(e.countryCode);return e.city&&t?"".concat(e.city,", ").concat(t):e.city||t}function z(e){return e.photoDataUrl||e.photoFileName?null:"Add a photo of you, or your studio logo."}function D(e){return e.displayName.trim().length<2?"Enter the name clients will see.":e.displayName.trim().length>80?"Keep the display name under 80 characters.":null}function _(e){return(0,r.EB)(e.countryCode)?null:"Select the country you work from."}function I(e){return e.bio.trim().length<40?"Write at least 40 characters on what you make and who you make it for.":e.bio.trim().length>u?"Keep the description under ".concat(u," characters."):null}function P(e){return 0===e.capabilities.length?"Pick at least one kind of work you take.":null}function E(e){let t=function(e){let t=Number.parseFloat(e.replace(/,/g,"").replace(/[^\d.]/g,""));return Number.isFinite(t)&&t>0?t:NaN}(e.startingPrice),a=(0,n.EN)(e.countryCode),r=Number.isFinite(t)?(0,n.hq)(t,a,(0,n.ao)()):0;if(!Number.isFinite(t)||r<n.lP)return"Enter a starting price of at least $5 (or the equivalent in ".concat(a,").");let i=Number.parseInt(e.deliveryDays.replace(/\D/g,""),10);return!Number.isFinite(i)||i<1||i>90?"Enter a typical delivery time between 1 and 90 days.":null}function R(e){let t=e.url.trim();return A.test(t)||t.startsWith("data:video/")}function q(e){return e.portfolioItems.some(R)?null:"Upload one sample, or paste an https link to a video."}function L(e,t){switch(e){case"welcome":case"ready":return null;case"profile":var a;return null!=(a=z(t))?a:D(t);case"about":return _(t);case"expertise":return P(t);case"sample":return q(t);default:return"Complete this step to continue."}}function M(e,t){switch(e){case"profile":var a,r;return null!=(r=null!=(a=z(t))?a:D(t))?r:_(t);case"work":return P(t);case"portfolio":return q(t);case"review":if(!U(t))return"Complete your profile to open the dashboard.";return null;default:return"Complete this step to continue."}}function F(e){for(let t of x){if("welcome"===t){if(!e.displayName.trim()&&!e.photoFileName)return"welcome";continue}if("ready"===t)break;
1if("sample"===t){if(L("sample",e))return"sample";continue}if(L(t,e))return t}return"ready"}function U(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k();return null===M("profile",e)&&e.capabilities.length>0}function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k();return U(e)&&null===M("work",e)&&null===M("portfolio",e)}function T(e){var t;let a=p.filter(e=>"review"!==e).map(t=>({step:t,label:h[t],done:null===M(t,e)})),r=a.filter(e=>e.done).length,n=r===a.length;return{items:a,doneCount:r,total:a.length,next:null!=(t=a.find(e=>!e.done))?t:null,complete:n}}function B(e){let t=T(e).next;return t?"portfolio"===t.step&&U(e)?s.fq.creatorPortfolio:s.fq.creatorOnboarding:s.fq.creatorDashboard}function K(e){try{sessionStorage.setItem(c,e)}catch(e){}}function O(){try{let e=sessionStorage.getItem(c);return sessionStorage.removeItem(c),e}catch(e){return null}}function J(e){var t;let a=new Date().toISOString(),r={...e,verifiedAt:null!=(t=e.verifiedAt)?t:a};return C(r),r}function H(e){var t;let a=new Date().toISOString(),r={...e,verifiedAt:null!=(t=e.verifiedAt)?t:a,completedAt:a};return C(r),r}},58752:(e,t,a)=>{"use strict";a.d(t,{s:()=>r});let r=a(78202).bL},66718:(e,t,a)=>{"use strict";a.d(t,{a:()=>s});var r=a(12115);let n="(max-width: ".concat(767,"px)");function i(){return"function"==typeof window.matchMedia?window.matchMedia(n).matches:window.innerWidth<768}function s(){let[e,t]=r.useState(i);return r.useEffect(()=>{if("function"==typeof window.matchMedia){let e=window.matchMedia(n),a=()=>t(e.matches);return a(),e.addEventListener("change",a),()=>e.removeEventListener("change",a)}let e=()=>t(window.innerWidth<768);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}},67073:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(95155),n=a(64269);let i={inboxEmpty:"/marketplace/illustrations/inbox-empty.svg",searchEmpty:"/marketplace/illustrations/search-empty.svg",findWork:"/marketplace/illustrations/find-work.svg",waiting:"/marketplace/illustrations/waiting.svg",firstProject:"/marketplace/illustrations/first-project.svg",error:"/marketplace/illustrations/error.svg"};function s(e){let{name:t,className:a}=e;return(0,r.jsx)("img",{src:i[t],alt:"","aria-hidden":!0,width:1024,height:768,loading:"lazy",decoding:"async",draggable:!1,className:(0,n.cn)("pointer-events-none h-32 w-auto select-none md:h-40",a)})}},68725:(e,t,a)=>{"use strict";a.d(t,{BE:()=>f,I6:()=>x,Uz:()=>o,_s:()=>l,cp:()=>c,gk:()=>h,tb:()=>p,zj:()=>m});var r=a(95155),n=a(12115),i=a(83161),s=a(64269);let l=e=>{let{shouldScaleBackground:t=!0,...a}=e;return(0,r.jsx)(i._s.Root,{shouldScaleBackground:t,...a})};l.displayName="Drawer";let o=i._s.Trigger,d=i._s.Portal,c=i._s.Close,u=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i._s.Overlay,{ref:t,className:(0,s.cn)("fixed inset-0 z-50 bg-black/50 dark:bg-black/70 backdrop-blur-sm",a),...n})});u.displayName=i._s.Overlay.displayName;let m=n.forwardRef((e,t)=>{let{className:a,children:n,overlayClassName:l,...o}=e;return(0,r.jsxs)(d,{children:[(0,r.jsx)(u,{className:l}),(0,r.jsxs)(i._s.Content,{ref:t,className:(0,s.cn)("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-2xl border border-border-subtle bg-surface-overlay shadow-2xl",a),...o,children:[(0,r.jsx)("div",{"aria-hidden":!0,className:"mx-auto mt-3 h-1.5 w-10 shrink-0 rounded-full bg-muted-foreground/25"}),n]})]})});m.displayName="DrawerContent";let f=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)("grid gap-1.5 p-4 text-center sm:text-left",t),...a})};f.displayName="DrawerHeader";let p=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,s.cn)("mt-auto flex flex-col gap-2 p-4 pb-safe-bottom",t),...a})};p.displayName="DrawerFooter";let h=n.forwardRef((e,t)=>{let{className:a,children:n,...l}=e;return(0,r.jsx)(i._s.Title,{asChild:!0,...l,children:(0,r.jsx)("h3",{ref:t,className:(0,s.cn)("text-lg font-semibold leading-none tracking-tight",a),children:n})})});h.displayName=i._s.Title.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(i._s.Description,{ref:t,className:(0,s.cn)("text-sm text-muted-foreground",a),...n})});x.displayName=i._s.Description.displayName},71869:(e,t,a)=>{"use strict";a.d(t,{Gm:()=>u,J0:()=>c,J6:()=>o,L4:()=>m,bW:()=>d,cg:()=>s,uR:()=>l});var r=a(95155);a(12115);var n=a(6259),i=a(64269);let s=n.rI,l=n.ty,o=n.mB;function d(e){let{className:t,...a}=e;return(0,r.jsx)(n.SQ,{className:(0,i.cn)("marketplace-tokens min-w-56 rounded-xl border-mp-border bg-mp-surface p-2 text-mp-foreground","shadow-[var(--mp-shadow-elevated)]",t),...a})}function c(e){let{className:t,variant:a,...s}=e;return(0,r.jsx)(n._2,{variant:a,className:(0,i.cn)("min-h-11 cursor-pointer gap-2 rounded-lg px-3 text-sm font-medium","destructive"===a?void 0:"text-mp-foreground focus:bg-mp-surface-elevated focus:text-mp-foreground","[&_svg]:size-5 [&_svg]:shrink-0 [&_svg]:text-mp-muted-foreground focus:[&_svg]:text-mp-foreground","transition-colors duration-fast ease-smooth",t),...s})}function u(e){let{className:t,...a}=e;return(0,r.jsx)(n.lp,{className:(0,i.cn)("truncate px-3 py-2 text-xs font-medium text-mp-subtle-foreground",t),...a})}function m(e){let{className:t,children:a,...s}=e;return(0,r.jsx)(n._2,{onSelect:e=>e.preventDefault(),onKeyDown:e=>e.stopPropagation(),className:(0,i.cn)("cursor-default flex-col items-stretch gap-1.5 rounded-lg px-3 py-2","focus:bg-transparent data-[highlighted]:bg-transparent",t),...s,children:a})}},72643:(e,t,a)=>{"use strict";a.d(t,{Es:()=>o});var r=a(95155),n=a(18332),i=a(64269);let s={info:"border-mp-border bg-mp-surface text-mp-foreground",success:"border-mp-success/30 bg-mp-success/5 text-mp-foreground [&>svg]:text-mp-success",warning:"border-mp-warning/30 bg-mp-warning/5 text-mp-foreground [&>svg]:text-mp-warning",danger:"border-destructive/40 bg-destructive/5 text-mp-foreground [&>svg]:text-destructive"}
1,l={info:"text-mp-accent",success:"text-mp-success",warning:"text-mp-warning",danger:"text-destructive"};function o(e){let{variant:t="info",icon:a,title:o,action:d,compact:c=!1,className:u,children:m,...f}=e;return(0,r.jsxs)(n.Fc,{variant:"danger"===t?"destructive":"default",className:(0,i.cn)(s[t],c&&"flex min-w-0 w-full max-w-full flex-row items-center gap-2 px-3 py-2 [&>svg]:static [&>svg]:inset-auto [&>svg]:size-4 [&>svg~*]:pl-0 [&>svg+div]:translate-y-0",u),...f,children:[a?(0,r.jsx)(a,{className:(0,i.cn)(c?"size-4":"h-5 w-5",l[t]),"aria-hidden":!0}):null,(o||d)&&(0,r.jsxs)("div",{className:"mb-1 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[o?(0,r.jsx)(n.XL,{className:"text-mp-foreground",children:o}):null,d?(0,r.jsx)("div",{className:"shrink-0",children:d}):null]}),m?(0,r.jsx)(n.TN,{className:c&&"danger"===t?"text-sm font-medium text-destructive":"text-mp-muted-foreground",children:m}):null]})}},73387:(e,t,a)=>{"use strict";a.d(t,{JR:()=>n,f0:()=>i});let r="G-YSHJ4PDENS",n=e=>{"function"==typeof window.gtag&&r&&window.gtag("config",r,{page_path:e})},i=e=>{let{action:t,category:a,label:n,value:i}=e;"function"==typeof window.gtag&&r&&window.gtag("event",t,{event_category:a,event_label:n,value:i})}},73605:(e,t,a)=>{"use strict";a.d(t,{MB:()=>l,gN:()=>d,v6:()=>o});var r=a(95155),n=a(8751),i=a(12115);let s={section:{y:12,duration:.4},list:{y:8,duration:.32}};function l(e){let[t,a]=(0,i.useState)("idle");return((0,i.useEffect)(()=>{if(!e)return void a("idle");a("enter");let t=window.setTimeout(()=>a("settled"),960);return()=>window.clearTimeout(t)},[e]),e)?"idle"===t?"enter":t:"idle"}function o(e){return{"--mp-row-i":String(Math.min(Math.max(e,0),12))}}function d(e){let{children:t,index:a=0,className:i,as:l="div",mode:o="inView",density:d="section"}=e,c=n.P[l],{y:u,duration:m}=s[d],f={duration:m,ease:[.22,1,.36,1],delay:Math.min(.06*a,.24)};return"mount"===o?(0,r.jsx)(c,{"data-mp-reveal":"",className:i,initial:{opacity:0,y:u},animate:{opacity:1,y:0},transition:f,children:t}):(0,r.jsx)(c,{"data-mp-reveal":"",className:i,initial:{opacity:0,y:u},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.2,margin:"0px 0px -80px 0px"},transition:f,children:t})}},83669:(e,t,a)=>{"use strict";a.d(t,{F9:()=>j,GI:()=>o,PD:()=>m,RH:()=>w,UT:()=>d,YN:()=>u,c9:()=>b,f1:()=>s,q5:()=>f,rW:()=>l,rt:()=>v,uB:()=>n,uE:()=>g,z8:()=>p});var r=a(28870);let n="marketplace:client-account",i="marketplace:client-setup-next",s=600,l=[{id:"you",label:"You"},{id:"place",label:"Location"}];function o(e){return"location"===e||"ready"===e?"place":"you"}function d(){return{photoDataUrl:"",photoFileName:"",displayName:"",companyName:"",countryCode:"IN",city:"",about:"",website:"",completedAt:null}}function c(e){return"string"==typeof e?e:""}function u(e){let t=d();return"object"!=typeof e||null===e?t:{...t,photoDataUrl:c(e.photoDataUrl),photoFileName:c(e.photoFileName),displayName:c(e.displayName),companyName:c(e.companyName),countryCode:c(e.countryCode)||"IN",city:c(e.city),about:c(e.about),website:c(e.website),completedAt:"string"==typeof e.completedAt?e.completedAt:null}}function m(){try{let e=localStorage.getItem(n);return e?u(JSON.parse(e)):d()}catch(e){return d()}}function f(e){try{localStorage.setItem(n,JSON.stringify(e))}catch(t){try{localStorage.setItem(n,JSON.stringify({...e,photoDataUrl:""}))}catch(e){}}}function p(e){let t=(0,r.Bi)(e.countryCode);return e.city&&t?"".concat(e.city,", ").concat(t):e.city||t}function h(e){return e.displayName.trim().length<2?"Enter the name creators will see.":e.displayName.trim().length>80?"Keep the display name under 80 characters.":null}function x(e){return(0,r.EB)(e.countryCode)?null:"Select the country you hire from."}function g(e,t){switch(e){case"welcome":case"ready":return null;case"profile":return h(t);case"location":return x(t);default:return"Complete this step to continue."}}function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m();return null===h(e)&&null===x(e)}function v(e){var t;let a={...e,completedAt:null!=(t=e.completedAt)?t:new Date().toISOString()};return f(a),a}function j(e){try{sessionStorage.setItem(i,e)}catch(e){}}function w(){try{let e=sessionStorage.getItem(i);return sessionStorage.removeItem(i),e}catch(e){return null}}},86693:(e,t,a)=>{"use strict";a.d(t,{SO:()=>o,Sc:()=>d,zP:()=>l});var r=a(95155),n=a(12115);let i=(0,n.createContext)(null),s=(0,n.createContext)(null);function l(e){let{children:t}
1=e,[a,l]=(0,n.useState)(null);return(0,r.jsx)(i.Provider,{value:l,children:(0,r.jsx)(s.Provider,{value:a,children:t})})}function o(){let e=(0,n.useContext)(s);return e?(0,r.jsx)("div",{className:"flex min-w-0 items-center gap-0.5","aria-label":"Page actions",children:e}):null}function d(e){let{children:t}=e,a=(0,n.useContext)(i);return(0,n.useLayoutEffect)(()=>{if(a)return a(t),()=>a(null)},[a,t]),null}},88464:(e,t,a)=>{"use strict";a.d(t,{E:()=>i,_:()=>n});var r=a(12115);let n=(0,r.createContext)(!1);function i(){return(0,r.useContext)(n)}},88708:()=>{},90308:(e,t,a)=>{"use strict";a.d(t,{f:()=>d});var r=a(12115),n=a(20063),i=a(76545),s=a(70622),l=a(89161),o=a(65590);function d(e){let[t,a]=(0,r.useState)(o.fq.onboarding),d=(0,n.useRouter)();return(0,r.useEffect)(()=>{var t;let r=!1,n=null!=(t=(0,s.jM)())?t:(0,i.D$)();if(n?a((0,s.uD)(n)):e?a(o.fq.onboarding):a(o.fq.home),e)return(async()=>{let t=await (0,l.Wu)(e);if(r)return;if("ok"===t.state&&t.locked)return a((0,l.So)(t.locked));let n=(0,i.D$)();if(n){(0,s.RC)(n),a((0,s.uD)(n));return}a(o.fq.onboarding)})(),()=>{r=!0}},[null==e?void 0:e.uid]),(0,r.useEffect)(()=>{e&&t!==o.fq.home&&t!==o.fq.onboarding&&d.prefetch(t)},[t,d,e]),t}},92824:(e,t,a)=>{"use strict";a.d(t,{MarketplaceBadge:()=>s});var r=a(95155);a(12115);var n=a(11647),i=a(64269);function s(e){let{className:t,variant:a="secondary",...s}=e;return(0,r.jsx)(n.E,{variant:"accent"===a?"info":null!=a?a:"secondary",className:(0,i.cn)("text-xs font-medium",t),...s})}},93045:(e,t,a)=>{"use strict";a.d(t,{ProjectCreationProvider:()=>u,E:()=>m});var r=a(95155),n=a(12115),i=a(13570),s=a(88179),l=a(48466);let o=null;async function d(e){if(o&&(clearTimeout(o),o=null),e)try{await fetch("/api/marketplace/projects/draft",{method:"DELETE",headers:await (0,l.qs)(e)})}catch(e){}}let c=(0,n.createContext)(null);function u(e){let{children:t}=e,{user:a}=(0,i.A)(),l=(0,n.useRef)(a);(0,n.useEffect)(()=>{l.current=a},[a]);
1let[o,u]=(0,n.useState)(null),[m,f]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(0,s.nr)(),(0,s.C_)();let e=(0,s.Ml)();e&&u(e),h(!0)},[]),(0,n.useEffect)(()=>{a&&d(a)},[null==a?void 0:a.uid]);let x=(0,n.useCallback)(e=>{u(t=>({...t,...e}))},[]),g=(0,n.useCallback)(e=>{u(e)},[]),b=(0,n.useCallback)(()=>{u(null),(0,s.nr)(),d(l.current),f(null)},[]),v=(0,n.useMemo)(()=>({draft:o,entryMode:m,setEntryMode:f,setDraft:x,replaceDraft:g,resetDraft:b,draftHydrated:p}),[o,m,x,g,b,p]);return(0,r.jsx)(c.Provider,{value:v,children:t})}function m(){let e=(0,n.useContext)(c);if(!e)throw Error("useProjectCreation must be used within ProjectCreationProvider");return e}},93906:(e,t,a)=>{"use strict";a.d(t,{$V:()=>r,B7:()=>o,PP:()=>n,QD:()=>s,aI:()=>m,hV:()=>l,mN:()=>i,mY:()=>c,pd:()=>u,w4:()=>d});let r=["basic","conversational","fluent","native"],n={basic:"Basic",conversational:"Conversational",fluent:"Fluent",native:"Native / bilingual"},i=[{code:"en",label:"English"},{code:"hi",label:"Hindi"},{code:"bn",label:"Bengali"},{code:"ta",label:"Tamil"},{code:"te",label:"Telugu"},{code:"mr",label:"Marathi"},{code:"gu",label:"Gujarati"},{code:"pa",label:"Punjabi"},{code:"ur",label:"Urdu"},{code:"es",label:"Spanish"},{code:"fr",label:"French"},{code:"de",label:"German"},{code:"pt",label:"Portuguese"},{code:"ar",label:"Arabic"},{code:"zh",label:"Mandarin"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"it",label:"Italian"},{code:"nl",label:"Dutch"},{code:"ru",label:"Russian"}],s=["beginner","intermediate","expert"],l={beginner:"Beginner",intermediate:"Intermediate",expert:"Expert"},o=[{id:"premiere",label:"Premiere Pro"},{id:"after_effects",label:"After Effects"},{id:"final_cut",label:"Final Cut Pro"},{id:"davinci",label:"DaVinci Resolve"},{id:"capcut",label:"CapCut"},{id:"photoshop",label:"Photoshop"},{id:"illustrator",label:"Illustrator"},{id:"cinema4d",label:"Cinema 4D"},{id:"blender",label:"Blender"},{id:"runway",label:"Runway"},{id:"kling",label:"Kling"},{id:"midjourney",label:"Midjourney"},{id:"color",label:"Color grading"},{id:"sound",label:"Sound design"},{id:"motion",label:"Motion graphics"},{id:"script",label:"Scriptwriting"},{id:"storyboard",label:"Storyboarding"},{id:"thumbnail",label:"Thumbnails"}];function d(e){return"string"==typeof e&&i.some(t=>t.code===e)}function c(e){return"string"==typeof e&&r.includes(e)}function u(e){return"string"==typeof e&&o.some(t=>t.id===e)}function m(e){return"string"==typeof e&&s.includes(e)}},96987:(e,t,a)=>{"use strict";a.d(t,{w:()=>C,o:()=>N});var r=a(95155),n=a(12115),i=a(20063),s=a(51834),l=a(6017),o=a(52619),d=a.n(o),c=a(63843),u=a(64269);function m(e){let{title:t,description:a,asideLine:i="Brief to final cut, in one place.",asideImage:l="/marketplace/categories/talking-head-poster.jpg",children:o,altAction:m,hideCloseButton:f=!1,onPointerDownOutside:p,onInteractOutside:h,onEscapeKeyDown:x}=e,g=(0,n.useRef)(null);return(0,r.jsx)(s.Cf,{ref:g,tabIndex:-1,hideCloseButton:f,className:(0,u.cn)("marketplace-root mp-auth-dialog gap-0 overflow-hidden rounded-2xl border-mp-border bg-mp-surface p-0 shadow-[var(--mp-shadow-elevated)]","max-h-[90dvh] w-[calc(100vw-1.5rem)] max-w-lg sm:max-w-3xl md:max-w-4xl"),closeButtonClassName:"right-3 top-3 z-20 text-mp-foreground sm:right-4 sm:top-4",onPointerDownOutside:p,onInteractOutside:h,onEscapeKeyDown:x,onOpenAutoFocus:e=>{var t;e.preventDefault(),null==(t=g.current)||t.focus()},children:(0,r.jsxs)("div",{className:"grid max-h-[90dvh] md:grid-cols-2",children:[(0,r.jsxs)("aside",{className:"relative hidden min-h-[28rem] overflow-hidden md:block",children:[(0,r.jsx)("img",{src:l,alt:"",className:"absolute inset-0 size-full object-cover"}),(0,r.jsx)("div",{className:"mp-auth-scrim","aria-hidden":!0}),(0,r.jsxs)("div",{className:"absolute inset-x-0 bottom-0 flex flex-col gap-6 p-8 lg:p-10",children:[(0,r.jsx)("p",{className:"text-lg font-semibold tracking-tight text-mp-stage-foreground",children:c.Az}),(0,r.jsx)("blockquote",{className:"flex flex-col gap-2",children:(0,r.jsxs)("p",{className:"text-[1.25rem] font-medium leading-snug tracking-[-0.02em] text-mp-stage-foreground",children:["â",i,"â"]}
1)})]})]}),(0,r.jsx)("div",{className:"flex min-h-0 flex-col justify-center overflow-y-auto px-6 py-8 sm:px-10 sm:py-10",children:(0,r.jsxs)("div",{className:"mx-auto flex w-full max-w-sm flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 text-center",children:[(0,r.jsx)(s.L3,{className:"text-2xl font-semibold tracking-tight text-mp-foreground",children:t}),(0,r.jsx)(s.rr,{className:"text-sm text-mp-muted-foreground",children:a})]}),o,m?(0,r.jsx)("p",{className:"text-center text-sm text-mp-muted-foreground",children:m}):null,(0,r.jsxs)("p",{className:"px-2 text-center text-xs leading-relaxed text-mp-subtle-foreground",children:["By continuing you agree to ",c.Az,"'s"," ",(0,r.jsx)(d(),{href:"/terms-of-use",className:"underline underline-offset-4 hover:text-mp-foreground",children:"Terms of Use"})," ","and"," ",(0,r.jsx)(d(),{href:"/privacy-policy",className:"underline underline-offset-4 hover:text-mp-foreground",children:"Privacy Policy"}),"."]})]})})]})})}var f=a(75592),p=a(13570),h=a(49260),x=a(76545),g=a(83669),b=a(55678),v=a(89161),j=a(65590);function w(e){var t;let a=(0,x.ew)(e);if(!a)return null;let r=null!=(t=a.split(/[?#]/)[0])?t:"";return"/filmmaking-community"===r||r.startsWith("/filmmaking-community/")?a:null}let y=(0,n.createContext)(null);function N(){let e=(0,n.useContext)(y);if(!e)throw Error("useMarketplaceAuthModal must be used inside MarketplaceAuthModalProvider");return e}let k={login:{title:"Welcome back",description:"Sign in to continue."},join:{title:"Create an account",description:"Choose how you want to use Mindbase."},"join-client":{title:"Create an account",description:"Join as a client."},"join-creator":{title:"Create an account",description:"Join as a creator."}};function C(e){let{children:t}=e,a=(0,i.useRouter)(),o=(0,i.usePathname)(),{user:d,loading:c}
1=(0,p.A)(),u=(0,n.useRef)(d),N=(0,n.useRef)(!1),[C,A]=(0,n.useState)(!1),[S,z]=(0,n.useState)("login"),[D,_]=(0,n.useState)(null),[I,P]=(0,n.useState)(null);(0,n.useEffect)(()=>{u.current=d},[d]),(0,n.useEffect)(()=>{d||(N.current=!1)},[d]);let E=(0,n.useCallback)(e=>{var t,a,r;z(null!=(t=null==e?void 0:e.kind)?t:"login"),_(null!=(a=null==e?void 0:e.next)?a:(0,x.U7)()),P(null!=(r=null==e?void 0:e.email)?r:null),A(!0)},[]),R=(0,n.useCallback)(()=>A(!1),[]),q=(0,n.useCallback)(e=>{A(e),e||d||(0,x.OR)()},[d]),L=(0,n.useCallback)(()=>{var e,t;if(N.current)return;let r=u.current;if(!r)return;N.current=!0;let n=(0,x.RS)();(0,x.OR)();let i=null!=(e=null==n?void 0:n.kind)?e:"join"===S?"login":S,s=null!=(t=null==n?void 0:n.next)?t:D;if("join-client"===i&&s&&(0,g.F9)(s),"join-creator"===i&&s&&(0,b.c_)(s),A(!1),(0,h.n)("mp_auth_modal_success",i),"join-client"===i||"join-creator"===i){(0,x.fT)(),a.replace((0,x.Lp)(i,s));return}(async()=>{let e=await (0,v.Wu)(r);if("ok"===e.state&&e.locked){var t,n;(0,x.fT)();let r=(0,v.So)(e.locked),i=null!=(n=null!=(t=(0,x.co)(e.locked,s))?t:w(s))?n:r;a.replace(i);return}let i=w(s);if(i){(0,x.fT)(),a.replace(i);return}(0,x.cI)(s),(0,h.n)("mp_post_auth_intent","login"),a.replace(j.fq.onboarding)})()},[S,D,a]);(0,n.useEffect)(()=>{!(c||!d||(0,j.DJ)(o))&&(0,x.RS)()&&L()},[c,null==d?void 0:d.uid,o,L]),(0,n.useEffect)(()=>{if(c||d||(0,j.DJ)(o))return;let e=(0,x.RS)();e&&(z(e.kind),_(e.next),A(!0))},[c,d,o]);let M=e=>{z(e),(0,x.HQ)({kind:e,next:D}),(0,h.n)("mp_auth_modal_role",e)},F=(0,n.useMemo)(()=>({openMarketplaceAuth:E,closeMarketplaceAuth:R}),[E,R]),U=k[S];return(0,r.jsxs)(y.Provider,{value:F,children:[t,(0,r.jsx)(s.lG,{open:C,onOpenChange:q,children:(0,r.jsx)(m,{title:U.title,description:U.description,altAction:"login"===S?(0,r.jsxs)(r.Fragment,{children:["Don't have an account?"," ",(0,r.jsx)("button",{type:"button",onClick:()=>z("join"),className:"cursor-pointer font-semibold text-mp-foreground underline underline-offset-4 hover:text-mp-foreground/80",children:"Sign up"})]}):(0,r.jsxs)(r.Fragment,{children:["Already have an account?"," ",(0,r.jsx)("button",{type:"button",onClick:()=>z("login"),className:"cursor-pointer font-semibold text-mp-foreground underline underline-offset-4 hover:text-mp-foreground/80",children:"Log in"})]}),children:"join"===S?(0,r.jsx)(l.e,{onClient:()=>M("join-client"),onCreator:()=>M("join-creator")}):(0,r.jsx)(f.W,{kind:S,next:D,email:I,onAuthenticated:()=>L()})})})]})}},98558:(e,t,a)=>{"use strict";a.d(t,{z:()=>o});var r=a(95155),n=a(70839),i=a(64269),s=a(45210),l=a(13399);function o(e){let{tone:t="light",quiet:a=!1,className:o,id:d,onChosen:c}=e,{currency:u,setCurrency:m}=(0,s.y)();return(0,r.jsx)("div",{className:(0,i.cn)("inline-flex items-center gap-2",o),children:(0,r.jsx)(l.K,{id:d,value:u,onValueChange:e=>{let t=(0,n.kp)(e);t&&(m(t),null==c||c())},"aria-label":"Display currency",className:(0,i.cn)("w-auto max-w-full bg-transparent font-medium",a?"h-8 min-h-8 border-0 px-1.5":"h-11 min-h-11 px-2.5","onDark"===t?"border-mp-stage-foreground/20 text-mp-stage-foreground":a?"text-mp-muted-foreground hover:text-mp-foreground":"border-mp-border text-mp-foreground"),options:(0,n.HC)().map(e=>({group:e.label,options:e.codes.map(e=>({value:e,label:n.MB[e]}))}))})})}}}]);
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.