@igamingcareer/igaming-components 1.0.108 → 1.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7854,4 +7854,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
|
|
|
7854
7854
|
Defaulting to \`null\`.`}var qE=DE,pJ=OE;const bc=g.forwardRef(({className:t,value:a,...n},s)=>e.jsx(qE,{ref:s,className:pe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:e.jsx(pJ,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));bc.displayName=qE.displayName;function mJ({freelancerData:t,stats:a,onToggleVisibility:n,onEditProfile:s,onPromote:r}){const i=t.profileStrength<80?"Add portfolio & rate to unlock more leads":"Great job! Your profile is well optimized";return e.jsxs(oe,{className:"border-amber-500/30 bg-amber-500/5",children:[e.jsx(ye,{className:"pb-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ia,{className:"h-5 w-5 text-amber-500"}),e.jsx(xe,{className:"text-lg",children:"Freelancer Dashboard"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Visibility:"}),e.jsx(qt,{checked:a.visibility,onCheckedChange:n}),e.jsx(se,{variant:a.visibility?"default":"secondary",children:a.visibility?"ON":"OFF"})]})]})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Profile Strength"}),e.jsxs("span",{className:"font-medium",children:[t.profileStrength,"%"]})]}),e.jsx(bc,{value:t.profileStrength,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(Ec,{className:"h-3 w-3"}),i]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{className:"text-center p-3 bg-background rounded-lg",children:[e.jsx("div",{className:"flex items-center justify-center gap-1 text-muted-foreground mb-1",children:e.jsx($o,{className:"h-4 w-4"})}),e.jsx("p",{className:"text-2xl font-bold",children:a.viewsThisWeek}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Views this week"})]}),e.jsxs("div",{className:"text-center p-3 bg-background rounded-lg",children:[e.jsx("div",{className:"flex items-center justify-center gap-1 text-muted-foreground mb-1",children:e.jsx($a,{className:"h-4 w-4"})}),e.jsx("p",{className:"text-2xl font-bold",children:a.inquiries}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Inquiries"})]}),e.jsx("div",{className:"p-3 bg-background rounded-lg flex flex-col items-center justify-center",children:e.jsxs(T,{variant:"outline",size:"sm",onClick:r,className:"w-full",children:[e.jsx(ca,{className:"h-4 w-4 mr-1"}),"Promote"]})})]}),a.inquiries===0&&e.jsxs("div",{className:"bg-background rounded-lg p-4 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"No leads yet"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"💡 Tip: Add 3+ portfolio items to appear higher in searches"})]}),e.jsxs(T,{variant:"outline",className:"w-full",onClick:s,children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"Manage Freelancer Profile"]})]})]})}function yJ({emailVerified:t,onResend:a,onChangeEmail:n,isResending:s=!1,error:r,variant:i="inline",dismissible:o=!1,onDismiss:c}){if(t)return null;const l=i==="compact",h=i==="page",u=l?"text-sm":"text-base",p=l?"p-3":"p-5",y=l?"flex w-full flex-col gap-3":"flex w-full flex-col gap-4 md:flex-row md:items-center md:justify-between";return e.jsxs(vc,{className:`border-border bg-card ${p}`,"aria-live":"polite","aria-busy":s,children:[e.jsx(oa,{className:l?"h-4 w-4":"h-5 w-5","aria-hidden":"true"}),e.jsxs("div",{className:y,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(vL,{className:u,children:"Verify your email to continue"}),e.jsx(kc,{className:"text-muted-foreground",children:h?"Verify your email address to unlock profile editing and personalized job alerts.":"Confirm your email to unlock the rest of your iGaming profile features."}),r&&e.jsx("p",{className:"text-sm font-medium text-destructive",role:"alert",children:r})]}),e.jsxs("div",{className:l?"flex flex-col gap-2":"flex flex-col gap-2 sm:flex-row",children:[e.jsxs(T,{type:"button",size:l?"sm":"default",onClick:a,disabled:s,"aria-disabled":s,children:[s&&e.jsx(et,{className:"mr-2 h-4 w-4 animate-spin","aria-hidden":"true"}),s?"Resending":"Resend verification"]}),e.jsx(T,{type:"button",variant:"outline",size:l?"sm":"default",onClick:n,children:"Change email"})]}),o&&e.jsx(T,{type:"button",variant:"ghost",size:l?"icon":"sm",className:l?"ml-auto h-8 w-8 self-start":"ml-auto self-start",onClick:c,"aria-label":"Dismiss verification reminder",children:e.jsx(tt,{className:l?"h-4 w-4":"h-5 w-5"})})]})]})}const fJ={complete:{label:"Complete",badgeVariant:"default",Icon:Qe},pending:{label:"Pending",badgeVariant:"secondary",Icon:es},blocked:{label:"Blocked",badgeVariant:"outline",Icon:rn}},xJ=t=>{const a=t.filter(s=>s.status==="complete").length,n=t.filter(s=>s.status!=="blocked").length;return n===0?100:a/n*100};function FE({emailVerified:t,profileComplete:a,steps:n,progress:s,onActionClick:r,variant:i="full"}){const o=s??xJ(n),c=Math.min(100,Math.max(0,o)),l=n.filter(y=>y.status==="complete").length,h=n.filter(y=>y.status!=="blocked").length,u=i==="compact",p=typeof t=="boolean"||typeof a=="boolean";return e.jsxs(oe,{className:u?"rounded-xl":void 0,children:[e.jsxs(ye,{className:u?"space-y-2 pb-4":void 0,children:[e.jsx(xe,{className:u?"text-lg":void 0,children:"Onboarding progress"}),e.jsx(Te,{className:u?"text-sm":void 0,children:"Complete the steps below to unlock your full iGaming profile experience."}),p&&e.jsxs("div",{className:u?"flex flex-wrap gap-2 pt-1":"flex flex-wrap gap-2",children:[typeof t=="boolean"&&e.jsxs(se,{variant:t?"default":"outline",children:["Email ",t?"verified":"not verified"]}),typeof a=="boolean"&&e.jsxs(se,{variant:a?"default":"outline",children:["Profile ",a?"complete":"incomplete"]})]})]}),e.jsxs(le,{className:u?"space-y-4":"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[e.jsxs("span",{children:[l," of ",h," steps completed"]}),e.jsxs("span",{className:"font-medium text-foreground",children:[Math.round(c),"%"]})]}),e.jsx(bc,{value:c,"aria-label":"Onboarding progress","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(c),className:u?"h-2":void 0})]}),e.jsx("ul",{className:u?"space-y-3":"space-y-4",children:n.map(y=>{const m=fJ[y.status],f=y.status==="blocked",x=!r||f;return e.jsxs("li",{className:u?"flex flex-col gap-2 rounded-lg border border-border bg-muted/30 p-3":"flex flex-col gap-3 rounded-lg border border-border bg-muted/30 p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:u?"mt-0.5 inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background":"mt-0.5 inline-flex h-9 w-9 items-center justify-center rounded-full border border-border bg-background","aria-hidden":"true",children:e.jsx(m.Icon,{className:u?"h-4 w-4":"h-5 w-5"})}),e.jsx("div",{children:e.jsx("p",{className:u?"text-sm font-semibold":"text-base font-semibold",children:y.label})})]}),e.jsx(se,{variant:m.badgeVariant,"aria-label":`${y.label} status: ${m.label}`,children:m.label})]}),y.helperText&&e.jsx("p",{className:u?"text-xs text-muted-foreground":"text-sm text-muted-foreground",children:y.helperText}),y.nextAction&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(T,{type:"button",size:u?"sm":"default",variant:f?"outline":"default",onClick:()=>{var v;return r==null?void 0:r((v=y.nextAction)==null?void 0:v.actionId,y.id)},disabled:x,"aria-disabled":x,children:y.nextAction.label}),f&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Complete the previous step to continue."})]})]},y.id)})})]})]})}const gJ={complete:{label:"Complete",Icon:Qe,badgeVariant:"default"},pending:{label:"Pending",Icon:es,badgeVariant:"secondary"},blocked:{label:"Blocked",Icon:rn,badgeVariant:"outline"}};function vJ({steps:t,onActionClick:a,variant:n="full"}){const s=n==="compact";return e.jsx("ul",{className:pe("space-y-3",s?"text-sm":"text-base"),children:t.map(r=>{const i=gJ[r.status],o=r.status==="complete",c=r.status==="pending"&&r.nextAction,l=!a;return e.jsxs("li",{className:pe("flex flex-col gap-2 rounded-lg border border-border bg-muted/30",s?"p-3":"p-4",o&&"opacity-70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:pe("inline-flex items-center justify-center rounded-full border border-border bg-background",s?"h-8 w-8":"h-9 w-9"),"aria-hidden":"true",children:e.jsx(i.Icon,{className:s?"h-4 w-4":"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:pe("font-semibold",o?"text-muted-foreground":"text-foreground"),children:r.label}),e.jsx("span",{className:"sr-only",children:i.label}),r.helperText&&e.jsx("p",{className:pe("text-muted-foreground",s?"text-xs":"text-sm"),children:r.helperText})]})]}),e.jsx(se,{variant:i.badgeVariant,"aria-label":`${r.label} status: ${i.label}`,children:i.label})]}),c&&r.nextAction&&e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e.jsx(T,{type:"button",size:s?"sm":"default",onClick:()=>a==null?void 0:a(r.nextAction.actionId,r.id),disabled:l,"aria-disabled":l,children:r.nextAction.label})})]},r.id)})})}function Wl(t,a,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return a==null?void 0:a(r)}}function hA(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function kJ(...t){return a=>{let n=!1;const s=t.map(r=>{const i=hA(r,a);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():hA(t[r],null)}}}}function wL(...t){return g.useCallback(kJ(...t),t)}function bJ(t,a=[]){let n=[];function s(i,o){const c=g.createContext(o),l=n.length;n=[...n,o];const h=p=>{var k;const{scope:y,children:m,...f}=p,x=((k=y==null?void 0:y[t])==null?void 0:k[l])||c,v=g.useMemo(()=>f,Object.values(f));return e.jsx(x.Provider,{value:v,children:m})};h.displayName=i+"Provider";function u(p,y){var x;const m=((x=y==null?void 0:y[t])==null?void 0:x[l])||c,f=g.useContext(m);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[h,u]}const r=()=>{const i=n.map(o=>g.createContext(o));return function(c){const l=(c==null?void 0:c[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...c,[t]:l}}),[c,l])}};return r.scopeName=t,[s,wJ(r,...a)]}function wJ(...t){const a=t[0];if(t.length===1)return a;const n=()=>{const s=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((c,{useScope:l,scopeName:h})=>{const p=l(i)[`__scope${h}`];return{...c,...p}},{});return g.useMemo(()=>({[`__scope${a.scopeName}`]:o}),[o])}};return n.scopeName=a.scopeName,n}var P9=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},jJ=g[" useId ".trim().toString()]||(()=>{}),MJ=0;function CJ(t){const[a,n]=g.useState(jJ());return P9(()=>{t||n(s=>s??String(MJ++))},[t]),t||(a?`radix-${a}`:"")}function NJ(t,a){return g.useReducer((n,s)=>a[n][s]??n,t)}var jL=t=>{const{present:a,children:n}=t,s=SJ(a),r=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),i=wL(s.ref,LJ(r));return typeof n=="function"||s.isPresent?g.cloneElement(r,{ref:i}):null};jL.displayName="Presence";function SJ(t){const[a,n]=g.useState(),s=g.useRef(null),r=g.useRef(t),i=g.useRef("none"),o=t?"mounted":"unmounted",[c,l]=NJ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=_d(s.current);i.current=c==="mounted"?h:"none"},[c]),P9(()=>{const h=s.current,u=r.current;if(u!==t){const y=i.current,m=_d(h);t?l("MOUNT"):m==="none"||(h==null?void 0:h.display)==="none"?l("UNMOUNT"):l(u&&y!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),P9(()=>{if(a){let h;const u=a.ownerDocument.defaultView??window,p=m=>{const x=_d(s.current).includes(CSS.escape(m.animationName));if(m.target===a&&x&&(l("ANIMATION_END"),!r.current)){const v=a.style.animationFillMode;a.style.animationFillMode="forwards",h=u.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=v)})}},y=m=>{m.target===a&&(i.current=_d(s.current))};return a.addEventListener("animationstart",y),a.addEventListener("animationcancel",p),a.addEventListener("animationend",p),()=>{u.clearTimeout(h),a.removeEventListener("animationstart",y),a.removeEventListener("animationcancel",p),a.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[a,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function _d(t){return(t==null?void 0:t.animationName)||"none"}function LJ(t){var s,r;let a=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?t.ref:(a=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var IJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],VE=IJ.reduce((t,a)=>{const n=lt(`Primitive.${a}`),s=g.forwardRef((r,i)=>{const{asChild:o,...c}=r,l=o?n:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(l,{...c,ref:i})});return s.displayName=`Primitive.${a}`,{...t,[a]:s}},{}),AJ=g[" useInsertionEffect ".trim().toString()]||P9;function PJ({prop:t,defaultProp:a,onChange:n=()=>{},caller:s}){const[r,i,o]=_J({defaultProp:a,onChange:n}),c=t!==void 0,l=c?t:r;{const u=g.useRef(t!==void 0);g.useEffect(()=>{const p=u.current;p!==c&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,s])}const h=g.useCallback(u=>{var p;if(c){const y=RJ(u)?u(t):u;y!==t&&((p=o.current)==null||p.call(o,y))}else i(u)},[c,t,i,o]);return[l,h]}function _J({defaultProp:t,onChange:a}){const[n,s]=g.useState(t),r=g.useRef(n),i=g.useRef(a);return AJ(()=>{i.current=a},[a]),g.useEffect(()=>{var o;r.current!==n&&((o=i.current)==null||o.call(i,n),r.current=n)},[n,r]),[n,s,i]}function RJ(t){return typeof t=="function"}var gC="Popover",[HE,Mee]=bJ(gC,[uC]),hd=uC(),[TJ,ks]=HE(gC),BE=t=>{const{__scopePopover:a,children:n,open:s,defaultOpen:r,onOpenChange:i,modal:o=!1}=t,c=hd(a),l=g.useRef(null),[h,u]=g.useState(!1),[p,y]=PJ({prop:s,defaultProp:r??!1,onChange:i,caller:gC});return e.jsx(XT,{...c,children:e.jsx(TJ,{scope:a,contentId:CJ(),triggerRef:l,open:p,onOpenChange:y,onOpenToggle:g.useCallback(()=>y(m=>!m),[y]),hasCustomAnchor:h,onCustomAnchorAdd:g.useCallback(()=>u(!0),[]),onCustomAnchorRemove:g.useCallback(()=>u(!1),[]),modal:o,children:n})})};BE.displayName=gC;var $E="PopoverAnchor",DJ=g.forwardRef((t,a)=>{const{__scopePopover:n,...s}=t,r=ks($E,n),i=hd(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:c}=r;return g.useEffect(()=>(o(),()=>c()),[o,c]),e.jsx(hL,{...i,...s,ref:a})});DJ.displayName=$E;var UE="PopoverTrigger",GE=g.forwardRef((t,a)=>{const{__scopePopover:n,...s}=t,r=ks(UE,n),i=hd(n),o=wL(a,r.triggerRef),c=e.jsx(VE.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":JE(r.open),...s,ref:o,onClick:Wl(t.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:e.jsx(hL,{asChild:!0,...i,children:c})});GE.displayName=UE;var ML="PopoverPortal",[EJ,OJ]=HE(ML,{forceMount:void 0}),WE=t=>{const{__scopePopover:a,forceMount:n,children:s,container:r}=t,i=ks(ML,a);return e.jsx(EJ,{scope:a,forceMount:n,children:e.jsx(jL,{present:n||i.open,children:e.jsx(B9,{asChild:!0,container:r,children:s})})})};WE.displayName=ML;var al="PopoverContent",ZE=g.forwardRef((t,a)=>{const n=OJ(al,t.__scopePopover),{forceMount:s=n.forceMount,...r}=t,i=ks(al,t.__scopePopover);return e.jsx(jL,{present:s||i.open,children:i.modal?e.jsx(qJ,{...r,ref:a}):e.jsx(FJ,{...r,ref:a})})});ZE.displayName=al;var zJ=lt("PopoverContent.RemoveScroll"),qJ=g.forwardRef((t,a)=>{const n=ks(al,t.__scopePopover),s=g.useRef(null),r=wL(a,s),i=g.useRef(!1);return g.useEffect(()=>{const o=s.current;if(o)return AS(o)},[]),e.jsx(G9,{as:zJ,allowPinchZoom:!0,children:e.jsx(YE,{...t,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Wl(t.onCloseAutoFocus,o=>{var c;o.preventDefault(),i.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Wl(t.onPointerDownOutside,o=>{const c=o.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,h=c.button===2||l;i.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Wl(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),FJ=g.forwardRef((t,a)=>{const n=ks(al,t.__scopePopover),s=g.useRef(!1),r=g.useRef(!1);return e.jsx(YE,{...t,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,c;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(s.current||(c=n.triggerRef.current)==null||c.focus(),i.preventDefault()),s.current=!1,r.current=!1},onInteractOutside:i=>{var l,h;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const o=i.target;((h=n.triggerRef.current)==null?void 0:h.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),YE=g.forwardRef((t,a)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:h,onInteractOutside:u,...p}=t,y=ks(al,n),m=hd(n);return IS(),e.jsx(H9,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:r,onUnmountAutoFocus:i,children:e.jsx(V9,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:h,onDismiss:()=>y.onOpenChange(!1),children:e.jsx(JT,{"data-state":JE(y.open),role:"dialog",id:y.contentId,...m,...p,ref:a,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),XE="PopoverClose",VJ=g.forwardRef((t,a)=>{const{__scopePopover:n,...s}=t,r=ks(XE,n);return e.jsx(VE.button,{type:"button",...s,ref:a,onClick:Wl(t.onClick,()=>r.onOpenChange(!1))})});VJ.displayName=XE;var HJ="PopoverArrow",BJ=g.forwardRef((t,a)=>{const{__scopePopover:n,...s}=t,r=hd(n);return e.jsx(KT,{...r,...s,ref:a})});BJ.displayName=HJ;function JE(t){return t?"open":"closed"}var $J=BE,UJ=GE,GJ=WE,KE=ZE;const QE=$J,eO=UJ,CL=g.forwardRef(({className:t,align:a="center",sideOffset:n=4,...s},r)=>e.jsx(GJ,{children:e.jsx(KE,{ref:r,align:a,sideOffset:n,className:pe("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-popover-content-transform-origin]",t),...s})}));CL.displayName=KE.displayName;function tO({open:t,onOpenChange:a,emailVerified:n,profileComplete:s,steps:r,onActionClick:i,onResendVerification:o,onChangeEmail:c,isResending:l=!1,resendError:h,onDismiss:u,dismissLabel:p="I'll do this later",title:y="Welcome! Let's get you set up",description:m="Complete these steps to unlock all features and personalize your experience."}){const f=r.every(v=>v.status==="complete"),x=()=>{u==null||u(),a(!1)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{className:"max-h-[90vh] overflow-y-auto sm:max-w-xl",children:[e.jsxs(Ft,{children:[e.jsx(pt,{className:"text-xl",children:y}),e.jsx(Ra,{children:m})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[!n&&o&&c&&e.jsx(yJ,{emailVerified:n,onResend:o,onChangeEmail:c,isResending:l,error:h,variant:"compact"}),e.jsx(FE,{emailVerified:n,profileComplete:s,steps:r,onActionClick:i,variant:"compact"})]}),e.jsxs("div",{className:"flex flex-col-reverse gap-2 sm:flex-row sm:justify-between",children:[!f&&e.jsx(T,{variant:"ghost",onClick:x,children:p}),f&&e.jsx(T,{onClick:()=>a(!1),className:"w-full sm:w-auto",children:"Get started"})]})]})})}const aO=t=>{const a=[];return a.push({id:"email_verification",label:"Verify your email",status:t.email_verified?"complete":"pending",helperText:t.email_verified?`Verified on ${t.email_verified_at?new Date(t.email_verified_at).toLocaleDateString():"N/A"}`:"Check your inbox for the verification link",nextAction:t.email_verified?void 0:{label:"Resend verification",actionId:"resend_verification"}}),a.push({id:"profile_required_fields",label:"Complete your profile",status:t.profile_complete?"complete":t.email_verified?"pending":"blocked",helperText:t.profile_complete?"All required fields are filled":"Add your first name, last name, and country",nextAction:t.profile_complete||!t.email_verified?void 0:{label:"Edit profile",actionId:"edit_profile"}}),a},KN=t=>{const a=t.filter(s=>s.status==="complete").length,n=t.filter(s=>s.status!=="blocked").length;return n===0?100:Math.round(a/n*100)},WJ={emailVerified:!1,profileComplete:!1,steps:[],progress:0,showModal:!1,isDismissed:!1};function ZJ(){const[t,a]=b.useState(WJ),n=b.useCallback(()=>{a(h=>({...h,showModal:!0}))},[]),s=b.useCallback(()=>{a(h=>({...h,showModal:!1}))},[]),r=b.useCallback(()=>{a(h=>({...h,showModal:!1,isDismissed:!0}))},[]),i=b.useCallback(()=>{a(h=>({...h,isDismissed:!1}))},[]),o=b.useCallback(h=>{const u=aO(h),p=KN(u);a(y=>({...y,emailVerified:h.email_verified,profileComplete:h.profile_complete,steps:u,progress:p}))},[]),c=b.useCallback(h=>{a(u=>{const p=u.steps.map(f=>f.id===h?{...f,status:"complete",nextAction:void 0}:h==="email_verification"&&f.id==="profile_required_fields"&&f.status==="blocked"?{...f,status:"pending",nextAction:{label:"Edit profile",actionId:"edit_profile"}}:f),y=h==="email_verification"?!0:u.emailVerified,m=h==="profile_required_fields"?!0:u.profileComplete;return{...u,emailVerified:y,profileComplete:m,steps:p,progress:KN(p)}})},[]),l=t.steps.length>0&&t.steps.every(h=>h.status==="complete");return{...t,openModal:n,closeModal:s,dismissOnboarding:r,resetDismissal:i,updateFromBackend:o,markStepComplete:c,isComplete:l}}const nO=b.createContext(null);function YJ({children:t}){const a=ZJ();return e.jsx(nO.Provider,{value:a,children:t})}function sO(){const t=b.useContext(nO);if(!t)throw new Error("useOnboardingContext must be used within OnboardingProvider");return t}var XJ=t=>{switch(t){case"success":return QJ;case"info":return tK;case"warning":return eK;case"error":return aK;default:return null}},JJ=Array(12).fill(0),KJ=({visible:t,className:a})=>b.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":t},b.createElement("div",{className:"sonner-spinner"},JJ.map((n,s)=>b.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),QJ=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),eK=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),tK=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aK=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nK=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},b.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),b.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sK=()=>{let[t,a]=b.useState(document.hidden);return b.useEffect(()=>{let n=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},QN=1,rK=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let a=this.subscribers.indexOf(t);this.subscribers.splice(a,1)}),this.publish=t=>{this.subscribers.forEach(a=>a(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var a;let{message:n,...s}=t,r=typeof(t==null?void 0:t.id)=="number"||((a=t.id)==null?void 0:a.length)>0?t.id:QN++,i=this.toasts.find(c=>c.id===r),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(c=>c.id===r?(this.publish({...c,...t,id:r,title:n}),{...c,...t,id:r,dismissible:o,title:n}):c):this.addToast({title:n,...s,dismissible:o,id:r}),r},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(a=>{this.subscribers.forEach(n=>n({id:a.id,dismiss:!0}))}),this.subscribers.forEach(a=>a({id:t,dismiss:!0})),t),this.message=(t,a)=>this.create({...a,message:t}),this.error=(t,a)=>this.create({...a,message:t,type:"error"}),this.success=(t,a)=>this.create({...a,type:"success",message:t}),this.info=(t,a)=>this.create({...a,type:"info",message:t}),this.warning=(t,a)=>this.create({...a,type:"warning",message:t}),this.loading=(t,a)=>this.create({...a,type:"loading",message:t}),this.promise=(t,a)=>{if(!a)return;let n;a.loading!==void 0&&(n=this.create({...a,promise:t,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));let s=t instanceof Promise?t:t(),r=n!==void 0,i,o=s.then(async l=>{if(i=["resolve",l],b.isValidElement(l))r=!1,this.create({id:n,type:"default",message:l});else if(oK(l)&&!l.ok){r=!1;let h=typeof a.error=="function"?await a.error(`HTTP error! status: ${l.status}`):a.error,u=typeof a.description=="function"?await a.description(`HTTP error! status: ${l.status}`):a.description;this.create({id:n,type:"error",message:h,description:u})}else if(a.success!==void 0){r=!1;let h=typeof a.success=="function"?await a.success(l):a.success,u=typeof a.description=="function"?await a.description(l):a.description;this.create({id:n,type:"success",message:h,description:u})}}).catch(async l=>{if(i=["reject",l],a.error!==void 0){r=!1;let h=typeof a.error=="function"?await a.error(l):a.error,u=typeof a.description=="function"?await a.description(l):a.description;this.create({id:n,type:"error",message:h,description:u})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=a.finally)==null||l.call(a)}),c=()=>new Promise((l,h)=>o.then(()=>i[0]==="reject"?h(i[1]):l(i[1])).catch(h));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(t,a)=>{let n=(a==null?void 0:a.id)||QN++;return this.create({jsx:t(n),id:n,...a}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},sa=new rK,iK=(t,a)=>{let n=(a==null?void 0:a.id)||QN++;return sa.addToast({title:t,...a,id:n}),n},oK=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",cK=iK,lK=()=>sa.toasts,dK=()=>sa.getActiveToasts(),iN=Object.assign(cK,{success:sa.success,info:sa.info,warning:sa.warning,error:sa.error,custom:sa.custom,message:sa.message,promise:sa.promise,dismiss:sa.dismiss,loading:sa.loading},{getHistory:lK,getToasts:dK});function hK(t,{insertAt:a}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",a==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}hK(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
7855
7855
|
`);function Rd(t){return t.label!==void 0}var uK=3,pK="32px",mK="16px",uA=4e3,yK=356,fK=14,xK=20,gK=200;function Oa(...t){return t.filter(Boolean).join(" ")}function vK(t){let[a,n]=t.split("-"),s=[];return a&&s.push(a),n&&s.push(n),s}var kK=t=>{var a,n,s,r,i,o,c,l,h,u,p;let{invert:y,toast:m,unstyled:f,interacting:x,setHeights:v,visibleToasts:k,heights:w,index:j,toasts:M,expanded:N,removeToast:L,defaultRichColors:C,closeButton:S,style:I,cancelButtonStyle:A,actionButtonStyle:_,className:P="",descriptionClassName:E="",duration:q,position:$,gap:V,loadingIcon:H,expandByDefault:G,classNames:Y,icons:z,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:U}=t,[ae,D]=b.useState(null),[B,he]=b.useState(null),[W,de]=b.useState(!1),[ve,K]=b.useState(!1),[F,ie]=b.useState(!1),[ce,Ee]=b.useState(!1),[Be,it]=b.useState(!1),[Nt,bt]=b.useState(0),[nt,Ge]=b.useState(0),mt=b.useRef(m.duration||q||uA),We=b.useRef(null),At=b.useRef(null),Dt=j===0,Pt=j+1<=k,ot=m.type,J=m.dismissible!==!1,re=m.className||"",ge=m.descriptionClassName||"",Ae=b.useMemo(()=>w.findIndex(X=>X.toastId===m.id)||0,[w,m.id]),Oe=b.useMemo(()=>{var X;return(X=m.closeButton)!=null?X:S},[m.closeButton,S]),st=b.useMemo(()=>m.duration||q||uA,[m.duration,q]),$e=b.useRef(0),gt=b.useRef(0),Et=b.useRef(0),Vt=b.useRef(null),[vn,je]=$.split("-"),Le=b.useMemo(()=>w.reduce((X,ue,ke)=>ke>=Ae?X:X+ue.height,0),[w,Ae]),_e=sK(),Pe=m.invert||y,Ne=ot==="loading";gt.current=b.useMemo(()=>Ae*V+Le,[Ae,Le]),b.useEffect(()=>{mt.current=st},[st]),b.useEffect(()=>{de(!0)},[]),b.useEffect(()=>{let X=At.current;if(X){let ue=X.getBoundingClientRect().height;return Ge(ue),v(ke=>[{toastId:m.id,height:ue,position:m.position},...ke]),()=>v(ke=>ke.filter(Ce=>Ce.toastId!==m.id))}},[v,m.id]),b.useLayoutEffect(()=>{if(!W)return;let X=At.current,ue=X.style.height;X.style.height="auto";let ke=X.getBoundingClientRect().height;X.style.height=ue,Ge(ke),v(Ce=>Ce.find(ze=>ze.toastId===m.id)?Ce.map(ze=>ze.toastId===m.id?{...ze,height:ke}:ze):[{toastId:m.id,height:ke,position:m.position},...Ce])},[W,m.title,m.description,v,m.id]);let Ue=b.useCallback(()=>{K(!0),bt(gt.current),v(X=>X.filter(ue=>ue.toastId!==m.id)),setTimeout(()=>{L(m)},gK)},[m,L,v,gt]);b.useEffect(()=>{if(m.promise&&ot==="loading"||m.duration===1/0||m.type==="loading")return;let X;return N||x||U&&_e?(()=>{if(Et.current<$e.current){let ue=new Date().getTime()-$e.current;mt.current=mt.current-ue}Et.current=new Date().getTime()})():mt.current!==1/0&&($e.current=new Date().getTime(),X=setTimeout(()=>{var ue;(ue=m.onAutoClose)==null||ue.call(m,m),Ue()},mt.current)),()=>clearTimeout(X)},[N,x,m,ot,U,_e,Ue]),b.useEffect(()=>{m.delete&&Ue()},[Ue,m.delete]);function ee(){var X,ue,ke;return z!=null&&z.loading?b.createElement("div",{className:Oa(Y==null?void 0:Y.loader,(X=m==null?void 0:m.classNames)==null?void 0:X.loader,"sonner-loader"),"data-visible":ot==="loading"},z.loading):H?b.createElement("div",{className:Oa(Y==null?void 0:Y.loader,(ue=m==null?void 0:m.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":ot==="loading"},H):b.createElement(KJ,{className:Oa(Y==null?void 0:Y.loader,(ke=m==null?void 0:m.classNames)==null?void 0:ke.loader),visible:ot==="loading"})}return b.createElement("li",{tabIndex:0,ref:At,className:Oa(P,re,Y==null?void 0:Y.toast,(a=m==null?void 0:m.classNames)==null?void 0:a.toast,Y==null?void 0:Y.default,Y==null?void 0:Y[ot],(n=m==null?void 0:m.classNames)==null?void 0:n[ot]),"data-sonner-toast":"","data-rich-colors":(s=m.richColors)!=null?s:C,"data-styled":!(m.jsx||m.unstyled||f),"data-mounted":W,"data-promise":!!m.promise,"data-swiped":Be,"data-removed":ve,"data-visible":Pt,"data-y-position":vn,"data-x-position":je,"data-index":j,"data-front":Dt,"data-swiping":F,"data-dismissible":J,"data-type":ot,"data-invert":Pe,"data-swipe-out":ce,"data-swipe-direction":B,"data-expanded":!!(N||G&&W),style:{"--index":j,"--toasts-before":j,"--z-index":M.length-j,"--offset":`${ve?Nt:gt.current}px`,"--initial-height":G?"auto":`${nt}px`,...I,...m.style},onDragEnd:()=>{ie(!1),D(null),Vt.current=null},onPointerDown:X=>{Ne||!J||(We.current=new Date,bt(gt.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(ie(!0),Vt.current={x:X.clientX,y:X.clientY}))},onPointerUp:()=>{var X,ue,ke,Ce;if(ce||!J)return;Vt.current=null;let ze=Number(((X=At.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ve=Number(((ue=At.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ye=new Date().getTime()-((ke=We.current)==null?void 0:ke.getTime()),wt=ae==="x"?ze:Ve,He=Math.abs(wt)/Ye;if(Math.abs(wt)>=xK||He>.11){bt(gt.current),(Ce=m.onDismiss)==null||Ce.call(m,m),he(ae==="x"?ze>0?"right":"left":Ve>0?"down":"up"),Ue(),Ee(!0),it(!1);return}ie(!1),D(null)},onPointerMove:X=>{var ue,ke,Ce,ze;if(!Vt.current||!J||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;let Ve=X.clientY-Vt.current.y,Ye=X.clientX-Vt.current.x,wt=(ke=t.swipeDirections)!=null?ke:vK($);!ae&&(Math.abs(Ye)>1||Math.abs(Ve)>1)&&D(Math.abs(Ye)>Math.abs(Ve)?"x":"y");let He={x:0,y:0};ae==="y"?(wt.includes("top")||wt.includes("bottom"))&&(wt.includes("top")&&Ve<0||wt.includes("bottom")&&Ve>0)&&(He.y=Ve):ae==="x"&&(wt.includes("left")||wt.includes("right"))&&(wt.includes("left")&&Ye<0||wt.includes("right")&&Ye>0)&&(He.x=Ye),(Math.abs(He.x)>0||Math.abs(He.y)>0)&&it(!0),(Ce=At.current)==null||Ce.style.setProperty("--swipe-amount-x",`${He.x}px`),(ze=At.current)==null||ze.style.setProperty("--swipe-amount-y",`${He.y}px`)}},Oe&&!m.jsx?b.createElement("button",{"aria-label":te,"data-disabled":Ne,"data-close-button":!0,onClick:Ne||!J?()=>{}:()=>{var X;Ue(),(X=m.onDismiss)==null||X.call(m,m)},className:Oa(Y==null?void 0:Y.closeButton,(r=m==null?void 0:m.classNames)==null?void 0:r.closeButton)},(i=z==null?void 0:z.close)!=null?i:nK):null,m.jsx||b.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:b.createElement(b.Fragment,null,ot||m.icon||m.promise?b.createElement("div",{"data-icon":"",className:Oa(Y==null?void 0:Y.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ee():null,m.type!=="loading"?m.icon||(z==null?void 0:z[ot])||XJ(ot):null):null,b.createElement("div",{"data-content":"",className:Oa(Y==null?void 0:Y.content,(c=m==null?void 0:m.classNames)==null?void 0:c.content)},b.createElement("div",{"data-title":"",className:Oa(Y==null?void 0:Y.title,(l=m==null?void 0:m.classNames)==null?void 0:l.title)},typeof m.title=="function"?m.title():m.title),m.description?b.createElement("div",{"data-description":"",className:Oa(E,ge,Y==null?void 0:Y.description,(h=m==null?void 0:m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),b.isValidElement(m.cancel)?m.cancel:m.cancel&&Rd(m.cancel)?b.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||A,onClick:X=>{var ue,ke;Rd(m.cancel)&&J&&((ke=(ue=m.cancel).onClick)==null||ke.call(ue,X),Ue())},className:Oa(Y==null?void 0:Y.cancelButton,(u=m==null?void 0:m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,b.isValidElement(m.action)?m.action:m.action&&Rd(m.action)?b.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||_,onClick:X=>{var ue,ke;Rd(m.action)&&((ke=(ue=m.action).onClick)==null||ke.call(ue,X),!X.defaultPrevented&&Ue())},className:Oa(Y==null?void 0:Y.actionButton,(p=m==null?void 0:m.classNames)==null?void 0:p.actionButton)},m.action.label):null))};function pA(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function bK(t,a){let n={};return[t,a].forEach((s,r)=>{let i=r===1,o=i?"--mobile-offset":"--offset",c=i?mK:pK;function l(h){["top","right","bottom","left"].forEach(u=>{n[`${o}-${u}`]=typeof h=="number"?`${h}px`:h})}typeof s=="number"||typeof s=="string"?l(s):typeof s=="object"?["top","right","bottom","left"].forEach(h=>{s[h]===void 0?n[`${o}-${h}`]=c:n[`${o}-${h}`]=typeof s[h]=="number"?`${s[h]}px`:s[h]}):l(c)}),n}b.forwardRef(function(t,a){let{invert:n,position:s="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:o,className:c,offset:l,mobileOffset:h,theme:u="light",richColors:p,duration:y,style:m,visibleToasts:f=uK,toastOptions:x,dir:v=pA(),gap:k=fK,loadingIcon:w,icons:j,containerAriaLabel:M="Notifications",pauseWhenPageIsHidden:N}=t,[L,C]=b.useState([]),S=b.useMemo(()=>Array.from(new Set([s].concat(L.filter(U=>U.position).map(U=>U.position)))),[L,s]),[I,A]=b.useState([]),[_,P]=b.useState(!1),[E,q]=b.useState(!1),[$,V]=b.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=b.useRef(null),G=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=b.useRef(null),z=b.useRef(!1),te=b.useCallback(U=>{C(ae=>{var D;return(D=ae.find(B=>B.id===U.id))!=null&&D.delete||sa.dismiss(U.id),ae.filter(({id:B})=>B!==U.id)})},[]);return b.useEffect(()=>sa.subscribe(U=>{if(U.dismiss){C(ae=>ae.map(D=>D.id===U.id?{...D,delete:!0}:D));return}setTimeout(()=>{R9.flushSync(()=>{C(ae=>{let D=ae.findIndex(B=>B.id===U.id);return D!==-1?[...ae.slice(0,D),{...ae[D],...U},...ae.slice(D+1)]:[U,...ae]})})})}),[]),b.useEffect(()=>{if(u!=="system"){V(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:ae})=>{V(ae?"dark":"light")})}catch{U.addListener(({matches:D})=>{try{V(D?"dark":"light")}catch(B){console.error(B)}})}},[u]),b.useEffect(()=>{L.length<=1&&P(!1)},[L]),b.useEffect(()=>{let U=ae=>{var D,B;r.every(he=>ae[he]||ae.code===he)&&(P(!0),(D=H.current)==null||D.focus()),ae.code==="Escape"&&(document.activeElement===H.current||(B=H.current)!=null&&B.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[r]),b.useEffect(()=>{if(H.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,z.current=!1)}},[H.current]),b.createElement("section",{ref:a,"aria-label":`${M} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((U,ae)=>{var D;let[B,he]=U.split("-");return L.length?b.createElement("ol",{key:U,dir:v==="auto"?pA():v,tabIndex:-1,ref:H,className:c,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":B,"data-lifted":_&&L.length>1&&!i,"data-x-position":he,style:{"--front-toast-height":`${((D=I[0])==null?void 0:D.height)||0}px`,"--width":`${yK}px`,"--gap":`${k}px`,...m,...bK(l,h)},onBlur:W=>{z.current&&!W.currentTarget.contains(W.relatedTarget)&&(z.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||z.current||(z.current=!0,Y.current=W.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{E||P(!1)},onDragEnd:()=>P(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},L.filter(W=>!W.position&&ae===0||W.position===U).map((W,de)=>{var ve,K;return b.createElement(kK,{key:W.id,icons:j,index:de,toast:W,defaultRichColors:p,duration:(ve=x==null?void 0:x.duration)!=null?ve:y,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:f,closeButton:(K=x==null?void 0:x.closeButton)!=null?K:o,interacting:E,position:U,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,removeToast:te,toasts:L.filter(F=>F.position==W.position),heights:I.filter(F=>F.position==W.position),setHeights:A,expandByDefault:i,gap:k,loadingIcon:w,expanded:_,pauseWhenPageIsHidden:N,swipeDirections:t.swipeDirections})})):null}))});function wK({onComplete:t,onClose:a}){const{showModal:n,closeModal:s,dismissOnboarding:r,emailVerified:i,profileComplete:o,steps:c,isComplete:l}=sO(),[h,u]=b.useState(!1),[p,y]=b.useState(null),m=async()=>{u(!0),y(null),await new Promise(w=>setTimeout(w,1500)),y("We could not resend the verification email yet. Try again soon."),u(!1)},f=()=>{iN.info("Email change flow would open here")},x=(w,j)=>{if(w)switch(w){case"resend_verification":m();break;case"edit_profile":iN.info("Navigate to profile editing"),s(),a==null||a();break;default:console.log("Unknown action:",w,"for step:",j)}},v=()=>{r(),iN.info("You can complete onboarding anytime from your dashboard"),a==null||a()},k=w=>{w||(s(),l&&t?t():a==null||a())};return e.jsx(tO,{open:n,onOpenChange:k,emailVerified:i,profileComplete:o,steps:c,onActionClick:x,onResendVerification:m,onChangeEmail:f,isResending:h,resendError:p,onDismiss:v})}const jK={complete:{Icon:Qe,iconClass:"text-primary",bgClass:"bg-primary/10"},pending:{Icon:es,iconClass:"text-amber-500",bgClass:"bg-amber-500/10"},blocked:{Icon:rn,iconClass:"text-muted-foreground",bgClass:"bg-muted"}};function rO({emailVerified:t,profileComplete:a,steps:n,progress:s,onActionClick:r,onOpenFullOnboarding:i,className:o}){if(n.every(u=>u.status==="complete"))return e.jsx(oe,{className:o,children:e.jsxs(le,{className:"flex items-center gap-4 py-6",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:e.jsx(Qe,{className:"h-6 w-6 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-semibold",children:"Onboarding complete!"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You have full access to all features. Start exploring jobs and opportunities."})]})]})});const l=n.filter(u=>u.status==="complete").length,h=n.length;return e.jsxs(oe,{className:o,children:[e.jsxs(ye,{className:"pb-3",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex-1",children:[e.jsxs(xe,{className:"flex items-center gap-2 text-lg",children:[e.jsx(ra,{className:"h-5 w-5 text-amber-500"}),"Complete your setup"]}),e.jsxs(Te,{className:"mt-1",children:[l," of ",h," steps done — finish to unlock all features"]})]})}),e.jsx(bc,{value:s,className:"mt-3 h-2","aria-label":"Onboarding progress"})]}),e.jsxs(le,{className:"pt-0",children:[e.jsx("div",{className:"divide-y divide-border rounded-lg border",children:n.map(u=>{const p=jK[u.status],y=p.Icon,m=u.status==="blocked",f=u.status==="pending",x=u.nextAction&&f;return e.jsxs("div",{className:"flex items-center gap-3 p-3 first:rounded-t-lg last:rounded-b-lg",children:[e.jsx("div",{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-full ${p.bgClass}`,children:e.jsx(y,{className:`h-4 w-4 ${p.iconClass}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:u.label}),u.helperText&&e.jsx("p",{className:"text-xs text-muted-foreground",children:u.helperText})]}),x&&u.nextAction&&e.jsxs(T,{size:"sm",variant:"default",onClick:()=>r==null?void 0:r(u.nextAction.actionId,u.id),children:[u.nextAction.label,e.jsx(ka,{className:"ml-1 h-3 w-3"})]}),m&&e.jsx(se,{variant:"outline",className:"text-xs",children:"Locked"}),u.status==="complete"&&e.jsx(se,{variant:"default",className:"text-xs",children:"Done"})]},u.id)})}),i&&e.jsx(T,{variant:"link",size:"sm",className:"mt-3 h-auto p-0 text-xs",onClick:i,children:"View full onboarding details"})]})]})}function MK({userName:t,feedItems:a,alerts:n,snapshot:s,onSave:r,onApply:i,onEnroll:o,onRead:c,freelancerData:l,freelancerStats:h,isCandidateActive:u=!0,onStartFreelancerSetup:p,onFreelancerUpdate:y,onboardingSteps:m,emailVerified:f=!1,profileComplete:x=!1,onboardingProgress:v=0,onOnboardingAction:k,onOpenOnboarding:w}){const j=m&&m.length>0&&!m.every(L=>L.status==="complete"),M=L=>{switch(L){case"job":return at;case"course":return ia;case"news":return on;default:return at}},N=L=>{switch(L.type){case"job":return e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",size:"sm",onClick:()=>r(L.id),children:"Save"}),e.jsx(T,{size:"sm",onClick:()=>i(L.id),children:"Apply"})]});case"course":return e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",size:"sm",onClick:()=>r(L.id),children:"Save"}),e.jsx(T,{size:"sm",onClick:()=>o(L.id),children:"Enroll"})]});case"news":return e.jsx(T,{size:"sm",onClick:()=>c(L.id),children:"Read"});default:return null}};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"text-3xl font-bold",children:["Welcome back, ",t," 👋"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Your personalized iGaming career hub"})]}),j&&m&&e.jsx(rO,{emailVerified:f,profileComplete:x,steps:m,progress:v,onActionClick:k,onOpenFullOnboarding:w}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-4",children:[e.jsx("h3",{className:"text-xl font-semibold",children:"Your Feed"}),a.map(L=>{const C=M(L.type);return e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(C,{className:"h-5 w-5 text-primary"}),e.jsx(se,{variant:"secondary",children:L.type})]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:L.timestamp})]}),e.jsx(xe,{className:"text-lg mt-2",children:L.title}),L.company&&e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ac,{className:"h-4 w-4"}),L.company]}),L.location&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(xt,{className:"h-4 w-4"}),L.location]})]}),e.jsx(Te,{children:L.description})]}),e.jsxs(le,{children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:L.tags.map(S=>e.jsx(se,{variant:"outline",children:S},S))}),L.reason&&e.jsxs("p",{className:"text-xs text-muted-foreground mb-3 italic",children:["💡 ",L.reason]}),e.jsx("div",{className:"flex gap-2",children:N(L)})]})]},L.id)})]}),e.jsxs("div",{className:"space-y-4",children:[l&&h?e.jsx(mJ,{freelancerData:l,stats:h,onToggleVisibility:L=>y==null?void 0:y({action:"toggle-visibility",visible:L}),onEditProfile:()=>y==null?void 0:y({action:"edit-profile"}),onPromote:()=>console.log("Promote freelancer profile")}):p?e.jsx(nJ,{onStartSetup:p,isCandidateActive:u}):null,e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(ca,{className:"h-5 w-5"}),"Your iGaming Career Snapshot"]})}),e.jsx(le,{className:"space-y-3",children:s.map(L=>e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:L.label}),e.jsxs("div",{className:"text-right",children:[e.jsx("span",{className:"font-semibold",children:L.value}),L.trend&&e.jsx("span",{className:"text-xs text-green-600 ml-2",children:L.trend})]})]},L.label))})]}),e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(_a,{className:"h-5 w-5"}),"Alerts & Notifications"]})}),e.jsx(le,{className:"space-y-3",children:n.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No new alerts"}):n.map(L=>e.jsxs("div",{className:"p-3 rounded-lg bg-secondary/50 text-sm",children:[e.jsx(se,{variant:"outline",className:"mb-2",children:L.type}),e.jsx("p",{children:L.message})]},L.id))})]})]})]})]})}function CK({open:t,onClose:a,onAdded:n,existingExperience:s,onUpdated:r}){const i=new Date().getFullYear(),o=Array.from({length:40},(m,f)=>`${i-f}`),[c,l]=b.useState({title:"",company:"",startYear:"",endYear:"",isPresent:!1,location:"",summary:"",tags:""});b.useEffect(()=>{if(s){const[m,f]=s.period.split(" - ");l({title:s.title,company:s.company,startYear:m||"",endYear:f==="Present"?"":f||"",isPresent:f==="Present",location:s.location||"",summary:s.summary||"",tags:s.tags.join(", ")})}else l({title:"",company:"",startYear:"",endYear:"",isPresent:!1,location:"",summary:"",tags:""})},[s,t]);const[h,u]=b.useState(!1),p=(m,f)=>l(x=>({...x,[m]:f})),y=()=>{const m=c.isPresent?`${c.startYear} - Present`:`${c.startYear} - ${c.endYear}`,f={id:(s==null?void 0:s.id)||`temp-${Date.now()}`,title:c.title,company:c.company,period:m,summary:c.summary.trim()||void 0,location:c.location.trim()||void 0,tags:c.tags.split(",").map(x=>x.trim()).filter(Boolean)};s?r==null||r(f):n(f),l({title:"",company:"",startYear:"",endYear:"",isPresent:!1,location:"",summary:"",tags:""}),a()};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{children:[e.jsx(pt,{children:s?"Edit Work Experience":"Add Work Experience"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(Z,{children:"Title"}),e.jsx(fe,{value:c.title,onChange:m=>p("title",m.target.value)})]}),e.jsxs("div",{children:[e.jsx(Z,{children:"Company"}),e.jsx(fe,{value:c.company,onChange:m=>p("company",m.target.value)})]}),e.jsxs("div",{children:[e.jsx(Z,{children:"Location (optional)"}),e.jsx(fe,{value:c.location,onChange:m=>p("location",m.target.value),placeholder:"e.g., Malta or Remote"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(Z,{children:"Start Year"}),e.jsxs(zn,{onValueChange:m=>p("startYear",m),value:c.startYear,children:[e.jsx(pn,{children:e.jsx(qn,{placeholder:"Select year"})}),e.jsx(mn,{children:o.map(m=>e.jsx(Kt,{value:m,children:m},m))})]})]}),!c.isPresent&&e.jsxs("div",{children:[e.jsx(Z,{children:"End Year"}),e.jsxs(zn,{onValueChange:m=>p("endYear",m),value:c.endYear,children:[e.jsx(pn,{children:e.jsx(qn,{placeholder:"Select year"})}),e.jsx(mn,{children:o.map(m=>e.jsx(Kt,{value:m,children:m},m))})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{id:"present",type:"checkbox",checked:c.isPresent,onChange:m=>p("isPresent",m.target.checked),className:"w-4 h-4 accent-primary"}),e.jsx(Z,{htmlFor:"present",children:"I currently work here"})]}),e.jsxs("div",{children:[e.jsx(Z,{children:"Summary (optional)"}),e.jsx(ea,{placeholder:"e.g., Led product roadmap for iGaming platform",value:c.summary,onChange:m=>p("summary",m.target.value)})]}),e.jsxs("div",{children:[e.jsx(Z,{children:"Tags (comma-separated)"}),e.jsx(ea,{placeholder:"e.g., Product Strategy, iGaming, Agile",value:c.tags,onChange:m=>p("tags",m.target.value)})]})]}),e.jsxs(Qt,{children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(T,{onClick:y,disabled:h||!c.title||!c.company||!c.startYear||!c.isPresent&&!c.endYear,children:h?"Saving...":s?"Save Changes":"Add Experience"})]})]})})}function mA({open:t,onClose:a,onAdded:n,title:s,placeholder:r}){const[i,o]=b.useState("");b.useEffect(()=>{t||o("")},[t]);const c=()=>{i.trim()&&(n(i.trim()),o(""),a())};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{children:[e.jsx(Ft,{children:e.jsx(pt,{children:s})}),e.jsx("div",{className:"space-y-4 py-2",children:e.jsxs("div",{children:[e.jsx(Z,{children:s}),e.jsx(fe,{value:i,onChange:l=>o(l.target.value),placeholder:r||"Type and save"})]})}),e.jsxs(Qt,{children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(T,{onClick:c,disabled:!i.trim(),children:"Add"})]})]})})}const yA=["Product Management","Project Management","Agile","Scrum","Leadership","Communication","Stakeholder Management","Game Design","Data Analysis","Marketing Strategy","UX/UI Design","Regulatory Compliance","Casino Operations","Sportsbook Operations","Frontend Development","Backend Development","React","TypeScript","Python","SQL","Kubernetes","Cloud Infrastructure"];function NK({open:t,onClose:a,onAdded:n}){const[s,r]=b.useState(""),[i,o]=b.useState(yA),c=()=>{s.trim()&&(n(s.trim()),r(""),a())},l=h=>{r(h);const u=yA.filter(p=>p.toLowerCase().includes(h.toLowerCase()));o(u)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{children:[e.jsx(Ft,{children:e.jsx(pt,{children:"Add Skill"})}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"skill",children:"Skill Name"}),e.jsx(fe,{id:"skill",placeholder:"e.g. Product Strategy",value:s,onChange:h=>l(h.target.value)})]}),s&&i.length>0&&e.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:i.map(h=>e.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>{r(h)},children:h},h))})]}),e.jsxs(Qt,{children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(T,{onClick:c,disabled:!s.trim(),children:"Add Skill"})]})]})})}const fA=["Regulation","Technology","Market Trends","Responsible Gaming","Game Design","Payments","Marketing","AI in iGaming","Player Retention","Security"];function SK({open:t,onClose:a,onAdded:n}){const[s,r]=b.useState(""),[i,o]=b.useState(fA),c=()=>{s.trim()&&(n(s.trim()),r(""),a())},l=h=>{r(h),o(fA.filter(u=>u.toLowerCase().includes(h.toLowerCase())))};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{children:[e.jsx(Ft,{children:e.jsx(pt,{children:"Add Interested Topic"})}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"topic",children:"Topic"}),e.jsx(fe,{id:"topic",placeholder:"e.g. Game Design",value:s,onChange:h=>l(h.target.value)})]}),s&&i.length>0&&e.jsx("div",{className:"border rounded-md p-2 space-y-1 max-h-40 overflow-y-auto",children:i.map(h=>e.jsx("div",{className:"cursor-pointer px-2 py-1 hover:bg-muted rounded-md text-sm",onClick:()=>r(h),children:h},h))})]}),e.jsxs(Qt,{children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(T,{onClick:c,disabled:!s.trim(),children:"Add Topic"})]})]})})}const LK=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],IK=["Native","Fluent","Intermediate","Basic"];function AK({open:t,onClose:a,onAdded:n}){const[s,r]=b.useState({name:"",proficiency:""}),i=()=>{if(!s.name||!s.proficiency)return;const o={name:s.name,proficiency:s.proficiency};n(o),r({name:"",proficiency:""}),a()};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{children:[e.jsx(Ft,{children:e.jsx(pt,{children:"Add Language"})}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(Z,{children:"Language"}),e.jsxs(zn,{value:s.name,onValueChange:o=>r(c=>({...c,name:o})),children:[e.jsx(pn,{children:e.jsx(qn,{placeholder:"Select a language"})}),e.jsx(mn,{children:LK.map(o=>e.jsx(Kt,{value:o,children:o},o))})]})]}),e.jsxs("div",{children:[e.jsx(Z,{children:"Proficiency"}),e.jsxs(zn,{value:s.proficiency,onValueChange:o=>r(c=>({...c,proficiency:o})),children:[e.jsx(pn,{children:e.jsx(qn,{placeholder:"Select proficiency"})}),e.jsx(mn,{children:IK.map(o=>e.jsx(Kt,{value:o,children:o},o))})]})]})]}),e.jsxs(Qt,{children:[e.jsx(T,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(T,{onClick:i,disabled:!s.name||!s.proficiency,children:"Add"})]})]})})}function PK({profile:t,onUpdate:a,isSaving:n=!1}){var te,U,ae;const[s,r]=b.useState(t),[i,o]=b.useState(!1),[c,l]=b.useState(null);b.useState(null);const[h,u]=b.useState(null),[p,y]=b.useState(!1),[m,f]=b.useState(!1),[x,v]=b.useState(!1),[k,w]=b.useState(!1),[j,M]=b.useState(!1),[N,L]=b.useState(!1),[C,S]=b.useState({firstName:!1,lastName:!1,country:!1}),I=["Full-time","Part-time","Contract","Freelance","Internship","Temporary"],A=["English","Spanish","French","German","Italian","Portuguese","Polish","Turkish","Swedish","Norwegian","Finnish","Danish","Dutch","Japanese","Chinese","Korean"],_=()=>{c&&(r(D=>{const B={...D,workExperience:D.workExperience.filter(he=>he.id!==c)};return a({type:"profile",payload:B}),B}),l(null))},P=(D,B,he)=>{r(W=>({...W,[D]:{...W[D],[B]:he}}))},E=(D,B,he)=>{r(W=>({...W,[D]:{...W[D],[B]:he}}))},q=!((te=s.personalDetails.firstName)!=null&&te.trim()),$=!((U=s.personalDetails.lastName)!=null&&U.trim()),V=!((ae=s.personalDetails.country)!=null&&ae.trim()),H=()=>{L(!0),!(q||$||V)&&a({type:"profile",payload:s})},G=(C.firstName||N)&&q,Y=(C.lastName||N)&&$,z=(C.country||N)&&V;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Your Profile"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your professional information"})]}),e.jsx(T,{onClick:H,disabled:n,children:n?"Saving...":"Save Changes"})]}),e.jsxs(yn,{defaultValue:"personal",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[e.jsx(Fe,{value:"personal",children:"Personal"}),e.jsx(Fe,{value:"experience",children:"Experience"}),e.jsx(Fe,{value:"job-search",children:"Job Search"}),e.jsx(Fe,{value:"skills",children:"Skills"}),e.jsx(Fe,{value:"languages",children:"Languages"}),e.jsx(Fe,{value:"alerts",children:"Alerts"}),e.jsx(Fe,{value:"preferences",children:"Preferences"})]}),e.jsx(Ie,{value:"personal",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Personal Details"}),e.jsx(Te,{children:"Update your personal information"})]}),e.jsx(le,{className:"space-y-4",children:e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"firstName",children:"First Name *"}),e.jsx(fe,{id:"firstName",value:s.personalDetails.firstName??"",required:!0,className:G?"border-destructive":"",onChange:D=>P("personalDetails","firstName",D.target.value),onBlur:()=>S(D=>({...D,firstName:!0}))}),G?e.jsx("p",{className:"text-xs text-destructive",children:"First name is required."}):null]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"lastName",children:"Last Name *"}),e.jsx(fe,{id:"lastName",value:s.personalDetails.lastName??"",required:!0,className:Y?"border-destructive":"",onChange:D=>P("personalDetails","lastName",D.target.value),onBlur:()=>S(D=>({...D,lastName:!0}))}),Y?e.jsx("p",{className:"text-xs text-destructive",children:"Last name is required."}):null]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"email",children:"Email"}),e.jsx(fe,{id:"email",type:"email",value:s.personalDetails.email??"",onChange:D=>P("personalDetails","email",D.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"phone",children:"Phone"}),e.jsx(fe,{id:"phone",value:s.personalDetails.phone??"",onChange:D=>P("personalDetails","phone",D.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"city",children:"City"}),e.jsx(fe,{id:"city",value:s.personalDetails.city??"",onChange:D=>P("personalDetails","city",D.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"country",children:"Country *"}),e.jsx(fe,{id:"country",value:s.personalDetails.country??"",required:!0,className:z?"border-destructive":"",onChange:D=>P("personalDetails","country",D.target.value),onBlur:()=>S(D=>({...D,country:!0}))}),z?e.jsx("p",{className:"text-xs text-destructive",children:"Country is required."}):null]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"dob",children:"Date of Birth"}),e.jsx(fe,{id:"dob",type:"date",value:s.personalDetails.dob??"",onChange:D=>P("personalDetails","dob",D.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"address",children:"Address"}),e.jsx(fe,{id:"address",value:s.personalDetails.address??"",onChange:D=>P("personalDetails","address",D.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"nationality",children:"Nationality"}),e.jsx(fe,{id:"nationality",value:s.personalDetails.nationality??"",onChange:D=>P("personalDetails","nationality",D.target.value)})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(Z,{htmlFor:"summary",children:"Summary"}),e.jsx(fe,{id:"summary",value:s.personalDetails.summary??"",onChange:D=>P("personalDetails","summary",D.target.value)})]})]})})]})}),e.jsx(Ie,{value:"experience",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Work Experience"}),e.jsx(Te,{children:"Your iGaming industry experience"})]}),e.jsxs(le,{className:"space-y-4",children:[s.workExperience.map(D=>e.jsxs("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:[e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold",children:D.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:D.company}),e.jsx("p",{className:"text-xs text-muted-foreground",children:D.period}),D.location&&e.jsx("p",{className:"text-xs text-muted-foreground",children:D.location})]}),e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(T,{variant:"outline",size:"sm",onClick:()=>{const B=s.workExperience.find(he=>he.id===D.id);u(B||null),o(!0)},children:"Edit"}),e.jsx(T,{variant:"destructive",size:"sm",onClick:()=>l(D.id),children:"Delete"})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:D.tags.map(B=>e.jsx(se,{variant:"secondary",children:B},B))}),D.summary&&e.jsx("p",{className:"text-sm text-muted-foreground",children:D.summary})]},D.id)),e.jsx(T,{variant:"outline",className:"w-full",onClick:()=>o(!0),children:"Add Experience"})]})]})}),e.jsx(CK,{open:i,onClose:()=>{o(!1),u(null)},existingExperience:h,onAdded:D=>{r(B=>({...B,workExperience:[...B.workExperience,D]}))},onUpdated:D=>{r(B=>({...B,workExperience:B.workExperience.map(he=>he.id===D.id?D:he)}))}}),e.jsx(cl,{open:!!c,onOpenChange:()=>l(null),children:e.jsxs(uc,{children:[e.jsxs(pc,{children:[e.jsx(yc,{children:"Delete Experience"}),e.jsx(fc,{children:"Are you sure you want to delete this work experience? This action cannot be undone."})]}),e.jsxs(mc,{children:[e.jsx(gc,{children:"Cancel"}),e.jsx(xc,{onClick:_,className:"bg-destructive text-white",children:"Delete"})]})]})}),e.jsxs(Ie,{value:"job-search",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Job Search Details"}),e.jsx(Te,{children:"Define your ideal job preferences"})]}),e.jsxs(le,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Desired Roles"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.jobSearchDetails.desiredRoles.map(D=>e.jsxs(se,{variant:"secondary",children:[D,e.jsx(T,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>r(B=>({...B,jobSearchDetails:{...B.jobSearchDetails,desiredRoles:Array.from(new Set([...B.jobSearchDetails.desiredRoles,D]))}})),children:"✕"})]},D))}),e.jsx(T,{variant:"outline",size:"sm",onClick:()=>y(!0),children:"Add Role"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Preferred Locations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.jobSearchDetails.locations.map(D=>e.jsxs(se,{variant:"secondary",children:[D,e.jsx(T,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>r(B=>({...B,jobSearchDetails:{...B.jobSearchDetails,locations:B.jobSearchDetails.locations.filter(he=>he!==D)}})),children:"✕"})]},D))}),e.jsx(T,{variant:"outline",size:"sm",onClick:()=>f(!0),children:"Add Location"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Employment Type"}),e.jsxs(QE,{children:[e.jsx(eO,{asChild:!0,children:e.jsx(T,{variant:"outline",className:"w-full justify-between",children:s.jobSearchDetails.employmentType.length>0?s.jobSearchDetails.employmentType.join(", "):"Select Employment Type"})}),e.jsx(CL,{className:"w-64 p-2 space-y-2",children:I.map(D=>{const B=s.jobSearchDetails.employmentType.includes(D);return e.jsxs("div",{className:"flex items-center space-x-2",onClick:()=>r(he=>{const de=he.jobSearchDetails.employmentType.includes(D)?he.jobSearchDetails.employmentType.filter(ve=>ve!==D):[...he.jobSearchDetails.employmentType,D];return{...he,jobSearchDetails:{...he.jobSearchDetails,employmentType:de}}}),children:[e.jsx(Xt,{checked:B}),e.jsx(Z,{className:"text-sm",children:D})]},D)})})]})]})]})]}),e.jsx(mA,{open:p,onClose:()=>y(!1),title:"Add Desired Role",placeholder:"e.g. Senior Product Manager",onAdded:D=>r(B=>({...B,jobSearchDetails:{...B.jobSearchDetails,desiredRoles:[...B.jobSearchDetails.desiredRoles,D]}}))}),e.jsx(mA,{open:m,onClose:()=>f(!1),title:"Add Preferred Location",placeholder:"e.g. Malta or Remote",onAdded:D=>r(B=>({...B,jobSearchDetails:{...B.jobSearchDetails,locations:[...B.jobSearchDetails.locations,D]}}))})]}),e.jsxs(Ie,{value:"skills",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Skill Set"}),e.jsx(Te,{children:"Your professional skills and expertise"})]}),e.jsxs(le,{className:"space-y-4",children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:s.skills.map(D=>e.jsxs(se,{variant:"secondary",className:"flex items-center gap-1",children:[D,e.jsx(T,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>r(B=>({...B,skills:B.skills.filter(he=>he!==D)})),children:"✕"})]},D))}),e.jsx(T,{variant:"outline",onClick:()=>v(!0),children:"Add Skill"})]})]}),e.jsx(NK,{open:x,onClose:()=>v(!1),onAdded:D=>r(B=>({...B,skills:Array.from(new Set([...B.skills,D]))}))})]}),e.jsxs(Ie,{value:"languages",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Languages"}),e.jsx(Te,{children:"Your spoken and professional languages"})]}),e.jsxs(le,{className:"space-y-4",children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:s.languages.map((D,B)=>e.jsxs(se,{variant:"secondary",className:"flex items-center gap-1",children:[D.name," — ",D.proficiency,e.jsx(T,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>r(he=>({...he,languages:he.languages.filter((W,de)=>de!==B)})),children:"✕"})]},`${D.name}-${B}`))}),e.jsx(T,{variant:"outline",onClick:()=>M(!0),children:"Add Language"})]})]}),e.jsx(AK,{open:j,onClose:()=>M(!1),onAdded:D=>r(B=>({...B,languages:[...B.languages,D]}))})]}),e.jsx(Ie,{value:"alerts",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Alerts & Subscriptions"}),e.jsx(Te,{children:"Manage your notification preferences"})]}),e.jsxs(le,{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"job-alerts",className:"text-base",children:"Job Alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Get notified about new job matches"})]}),e.jsx(qt,{id:"job-alerts",checked:s.alerts.jobAlerts,onCheckedChange:D=>E("alerts","jobAlerts",D)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"course-alerts",className:"text-base",children:"Course Alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Updates on new courses and training"})]}),e.jsx(qt,{id:"course-alerts",checked:s.alerts.courseAlerts,onCheckedChange:D=>E("alerts","courseAlerts",D)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"news-alerts",className:"text-base",children:"News Alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Industry news and updates"})]}),e.jsx(qt,{id:"news-alerts",checked:s.alerts.newsAlerts,onCheckedChange:D=>E("alerts","newsAlerts",D)})]})]})]})}),e.jsxs(Ie,{value:"preferences",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:"Preferences"}),e.jsx(Te,{children:"Customize your platform experience"})]}),e.jsxs(le,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Interested Topics"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.preferences.topics.map(D=>e.jsxs(se,{variant:"secondary",className:"flex items-center gap-1",children:[D,e.jsx(T,{variant:"ghost",size:"sm",className:"ml-1 text-xs text-muted-foreground hover:text-destructive",onClick:()=>r(B=>({...B,preferences:{...B.preferences,topics:B.preferences.topics.filter(he=>he!==D)}})),children:"✕"})]},D))}),e.jsx(T,{variant:"outline",size:"sm",onClick:()=>w(!0),children:"Manage Topics"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"language",children:"Language"}),e.jsxs(zn,{value:s.preferences.language,onValueChange:D=>P("preferences","language",D),children:[e.jsx(pn,{id:"language",children:e.jsx(qn,{placeholder:"Select your preferred language"})}),e.jsx(mn,{children:A.map(D=>e.jsx(Kt,{value:D,children:D},D))})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"email-notif",className:"text-base",children:"Email Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive updates via email"})]}),e.jsx(qt,{id:"email-notif",checked:s.preferences.emailNotifications,onCheckedChange:D=>E("preferences","emailNotifications",D)})]})]})]}),e.jsx(SK,{open:k,onClose:()=>w(!1),onAdded:D=>r(B=>({...B,preferences:{...B.preferences,topics:Array.from(new Set([...B.preferences.topics,D]))}}))})]})]})]})}const _K=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`,xA=800;function RK({onCVChange:t,previewText:a,previewStatus:n="idle",previewErrorMessage:s}){const[r,i]=b.useState(!1),[o,c]=b.useState(null),[l,h]=b.useState(null),[u,p]=b.useState(null),[y,m]=b.useState(!1);b.useEffect(()=>()=>{l&&URL.revokeObjectURL(l)},[l]);const f=b.useMemo(()=>o?{name:o.name,size:_K(o.size),lastModified:new Date(o.lastModified).toLocaleDateString()}:null,[o]),x=async M=>{var C;const N=(C=M.target.files)==null?void 0:C[0];if(!N)return;if(N.type!=="application/pdf"){p("Only PDF files are supported.");return}l&&URL.revokeObjectURL(l);const L=URL.createObjectURL(N);c(N),h(L),m(!1),t(N)},v=()=>{l&&URL.revokeObjectURL(l),c(null),h(null),p(null),m(!1),t(null)},k=(a==null?void 0:a.replace(/\s{2,}/g," ").replace(/\n{3,}/g,`
|
|
7856
7856
|
|
|
7857
|
-
`).trim())??"",w=k.length>xA,j=y?k:w?`${k.slice(0,xA)}…`:k;return e.jsxs(It,{open:r,onOpenChange:i,children:[e.jsx(cT,{asChild:!0,children:e.jsxs(T,{children:[e.jsx(Zn,{className:"h-4 w-4 mr-2"}),"Upload CV"]})}),e.jsxs(Ct,{className:"sm:max-w-2xl",children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Upload your CV"}),e.jsx(Ra,{children:"Add a PDF so we can extract key details and keep it ready for job applications."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(fe,{type:"file",accept:"application/pdf",onChange:x}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Accepted format: PDF only. Text extraction should be handled by the host application if needed."})]}),u&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u}),o&&f&&e.jsxs("div",{className:"rounded-md border border-muted p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(as,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:f.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.size," • Updated ",f.lastModified]})]})]}),e.jsx(se,{variant:"secondary",children:"Stored"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[l&&e.jsx(T,{variant:"outline",size:"sm",asChild:!0,children:e.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:"View PDF"})}),e.jsxs(T,{variant:"destructive",size:"sm",onClick:v,children:[e.jsx(Wo,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),e.jsxs("div",{className:"rounded-md border border-muted p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"font-medium",children:"Extracted preview"}),n==="parsing"&&e.jsx(se,{variant:"outline",children:"Parsing..."})]}),n==="error"?e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:s||"Text preview is unavailable for this file."}):j?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 max-h-48 overflow-y-auto rounded-md border bg-muted/30 p-2",children:e.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:j})}),w&&e.jsx(T,{variant:"link",size:"sm",className:"px-0",onClick:()=>m(M=>!M),children:y?"Show less":"Show full text"})]}):e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Upload a PDF to preview extracted text from the host app."})]})]}),e.jsx(Qt,{children:e.jsx(T,{variant:"outline",onClick:()=>i(!1),children:"Close"})})]})]})}function TK({savedJobs:t,applications:a,recommendedJobs:n,onApply:s,onRemove:r,onUploadCV:i,cvPreviewText:o,cvPreviewStatus:c,cvPreviewErrorMessage:l,onSetAlert:h,onUpdateProfile:u}){const p=w=>({savedJobs:w.saved,recommendedJobs:w.recommended,applications:w.applications}),[y,m]=b.useState({saved:t||[],recommended:n||[],applications:a||[]});b.useEffect(()=>{m({saved:t||[],recommended:n||[],applications:a||[]})},[t,n,a]);const f=w=>{m(j=>{if(j.saved.some(L=>L.id===w.id))return j;const N={...j,saved:[...j.saved,w]};return u==null||u({type:"jobs",payload:p(N)}),N})},x=w=>{m(j=>{const M={...j,saved:j.saved.filter(N=>N.id!==w)};return u==null||u({type:"jobs",payload:p(M)}),M})},v=w=>{m(j=>{const M={...j,recommended:j.recommended.filter(N=>N.id!==w)};return u==null||u({type:"jobs",payload:p(M)}),M})},k=w=>{const j=y.recommended.find(M=>M.id===w);j&&(m(M=>{const N={...M,applications:[...M.applications,{...j,status:"Applied",appliedDate:new Date().toLocaleDateString()}]};return u==null||u({type:"jobs",payload:p(N)}),N}),s(w))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Jobs"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your job search"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{variant:"outline",onClick:h,children:"Set Job Alerts"}),e.jsx(RK,{onCVChange:i,previewText:o,previewStatus:c,previewErrorMessage:l})]})]}),e.jsxs(yn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-3",children:[e.jsxs(Fe,{value:"recommended",children:["Recommended (",y.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",y.saved.length,")"]}),e.jsxs(Fe,{value:"applications",children:[e.jsx(at,{className:"h-4 w-4 mr-2"}),"Applications (",y.applications.length,")"]})]}),e.jsx(Ie,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.recommended.map(w=>e.jsx(d9,{job:w,view:"recommended",isSaved:y.saved.some(j=>j.id===w.id),onApply:k,onSave:f,onRemove:v},w.id))})}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.saved.length===0?e.jsx(oe,{children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved jobs yet"}),e.jsx(T,{variant:"link",className:"mt-2",children:"Browse Jobs"})]})}):y.saved.map(w=>e.jsx(d9,{job:w,view:"saved",onRemove:x},w.id))})}),e.jsx(Ie,{value:"applications",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.applications.length===0?e.jsx(oe,{children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(at,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No applications yet"}),e.jsx(T,{variant:"link",className:"mt-2",children:"Start Applying"})]})}):y.applications.map(w=>e.jsx(d9,{job:w,view:"applications",onViewApplication:()=>{}},w.id))})})]})]})}function DK({enrolledCourses:t,savedCourses:a,recommendedCourses:n,certificates:s,onEnroll:r,onContinue:i,onExplore:o,onSave:c,onRemoveSaved:l,onRemoveRecommended:h}){const[u,p]=b.useState({enrolled:t||[],recommended:n||[],saved:a||[]});b.useEffect(()=>{p({enrolled:t||[],recommended:n||[],saved:a||[]})},[t,n,a]);const y=k=>r(k),m=k=>{p(w=>{if(w.saved.some(N=>N.id===k.id))return w;const M={...w,saved:[...w.saved,{...k,saved:!0}],recommended:w.recommended.map(N=>N.id===k.id?{...N,saved:!0}:N)};return c==null||c(k.id),M})},f=k=>{p(w=>{const j={...w,saved:w.saved.filter(M=>M.id!==k),recommended:w.recommended.map(M=>M.id===k?{...M,saved:!1}:M)};return l==null||l(k),j})},x=k=>{p(w=>{const j={...w,recommended:w.recommended.filter(M=>M.id!==k)};return h==null||h(k),j})},v=({course:k,view:w})=>{const j=u.saved.some(M=>M.id===k.id);return e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(xe,{className:"text-lg",children:k.title}),e.jsx(Te,{children:k.provider})]}),e.jsx(se,{variant:"outline",children:k.level})]})}),e.jsx(le,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:k.duration}),k.certificate&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Bt,{className:"h-4 w-4"}),"Certificate"]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:k.tags.map(M=>e.jsx(se,{variant:"secondary",children:M},M))}),w==="enrolled"&&k.progress!==void 0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Progress"}),e.jsxs("span",{className:"font-medium",children:[k.progress,"%"]})]}),e.jsx(bc,{value:k.progress})]}),w==="recommended"&&k.reason&&e.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["💡 ",k.reason]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[w==="enrolled"&&e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>i(k.id),children:"Continue Learning"}),w==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>y(k.id),children:"Enroll Now"}),e.jsx(T,{variant:j?"secondary":"outline",className:"sm:w-auto w-full",size:"sm",disabled:j,onClick:()=>m(k),children:j?"Saved":"Save Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>x(k.id),children:"Remove"}),!h&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove not available yet"})]}),w==="saved"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",size:"sm",onClick:()=>y(k.id),children:"Start Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>f(k.id),children:"Remove Saved"}),!l&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove from saved not available yet"})]})]})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Courses"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Advance your iGaming career"})]}),e.jsx(T,{onClick:o,children:"Explore All Courses"})]}),e.jsxs(yn,{defaultValue:"enrolled",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-4",children:[e.jsxs(Fe,{value:"enrolled",children:[e.jsx(ia,{className:"h-4 w-4 mr-2"}),"Enrolled (",u.enrolled.length,")"]}),e.jsxs(Fe,{value:"recommended",children:[e.jsx(ca,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]}),e.jsxs(Fe,{value:"certificates",children:[e.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Certificates (",s.length,")"]})]}),e.jsx(Ie,{value:"enrolled",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.enrolled.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(ia,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No enrolled courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"})]})}):u.enrolled.map(k=>e.jsx(v,{course:k,view:"enrolled"},k.id))})}),e.jsx(Ie,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(k=>e.jsx(v,{course:k,view:"recommended"},k.id))})}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"}),!c&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-2",children:"Saving courses not available yet"})]})}):u.saved.map(k=>e.jsx(v,{course:k,view:"saved"},k.id))})}),e.jsx(Ie,{value:"certificates",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:s.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(Bt,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No certificates yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Complete courses to earn certificates"})]})}):s.map(k=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10",children:e.jsx(Bt,{className:"h-6 w-6 text-accent"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(xe,{className:"text-base",children:k.title}),e.jsx(Te,{children:k.issuer}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Issued: ",k.date]})]})]})}),e.jsx(le,{children:e.jsx(T,{variant:"outline",size:"sm",className:"w-full",children:"Download Certificate"})})]},k.id))})})]})]})}function EK({recommendedNews:t,savedArticles:a,categories:n,selectedCategory:s,onRead:r,onSave:i,onRemoveSaved:o,onRemoveRecommended:c,onCategoryChange:l,onManagePreferences:h}){const[u,p]=b.useState({recommended:t||[],saved:a||[]});b.useEffect(()=>{p({recommended:t||[],saved:a||[]})},[t,a]);const y=x=>{p(v=>{if(v.saved.some(j=>j.id===x.id))return v;const w={recommended:v.recommended.map(j=>j.id===x.id?{...j,saved:!0}:j),saved:[...v.saved,{...x,saved:!0}]};return i(x.id),w})},m=x=>{p(v=>{const k={recommended:v.recommended.map(w=>w.id===x?{...w,saved:!1}:w),saved:v.saved.filter(w=>w.id!==x)};return o==null||o(x),k})},f=x=>{p(v=>{const k={...v,recommended:v.recommended.filter(w=>w.id!==x)};return c==null||c(x),k})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Stay updated with iGaming industry"})]}),e.jsxs(T,{variant:"outline",onClick:h,children:[e.jsx(nn,{className:"h-4 w-4 mr-2"}),"Preferences"]})]}),e.jsxs(yn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(fn,{children:[e.jsxs(Fe,{value:"recommended",children:[e.jsx(on,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]})]}),e.jsxs(Ie,{value:"recommended",className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.jsx(T,{variant:s==="all"?"default":"outline",size:"sm",onClick:()=>l("all"),children:"All"}),n.map(x=>e.jsx(T,{variant:s===x?"default":"outline",size:"sm",onClick:()=>l(x),children:x},x))]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(x=>e.jsx(YN,{article:x,view:"recommended",isSaved:u.saved.some(v=>v.id===x.id),onRead:r,onSave:y,onRemove:f},x.id))})]}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved articles yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:h,children:"Browse News"})]})}):u.saved.map(x=>e.jsx(YN,{article:x,view:"saved",onRead:r,onRemove:m},x.id))})})]})]})}const OK=["Malta","Remote","Gibraltar","Sweden","UK","Cyprus","Isle of Man","Curacao"],zK=["Casino Ops","Sportsbook","Compliance","Affiliate","Game Dev","Live Casino","Payments","UI/UX","Marketing","Legal","HR","Data Analytics"],qK=["Compliance","KYC/AML","Regulatory Consulting","Risk Management","Product Management","Game Development","Unity","C#","Affiliate Management","iGaming Platforms","Payment Integration"];function Rn(t,a,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return a==null?void 0:a(r)}}function gA(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function FK(...t){return a=>{let n=!1;const s=t.map(r=>{const i=gA(r,a);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():gA(t[r],null)}}}}function cc(...t){return g.useCallback(FK(...t),t)}function vC(t,a=[]){let n=[];function s(i,o){const c=g.createContext(o),l=n.length;n=[...n,o];const h=p=>{var k;const{scope:y,children:m,...f}=p,x=((k=y==null?void 0:y[t])==null?void 0:k[l])||c,v=g.useMemo(()=>f,Object.values(f));return e.jsx(x.Provider,{value:v,children:m})};h.displayName=i+"Provider";function u(p,y){var x;const m=((x=y==null?void 0:y[t])==null?void 0:x[l])||c,f=g.useContext(m);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[h,u]}const r=()=>{const i=n.map(o=>g.createContext(o));return function(c){const l=(c==null?void 0:c[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...c,[t]:l}}),[c,l])}};return r.scopeName=t,[s,VK(r,...a)]}function VK(...t){const a=t[0];if(t.length===1)return a;const n=()=>{const s=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((c,{useScope:l,scopeName:h})=>{const p=l(i)[`__scope${h}`];return{...c,...p}},{});return g.useMemo(()=>({[`__scope${a.scopeName}`]:o}),[o])}};return n.scopeName=a.scopeName,n}var HK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ll=HK.reduce((t,a)=>{const n=lt(`Primitive.${a}`),s=g.forwardRef((r,i)=>{const{asChild:o,...c}=r,l=o?n:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(l,{...c,ref:i})});return s.displayName=`Primitive.${a}`,{...t,[a]:s}},{});function BK(t){const a=t+"CollectionProvider",[n,s]=vC(a),[r,i]=n(a,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:v,children:k}=x,w=b.useRef(null),j=b.useRef(new Map).current;return e.jsx(r,{scope:v,itemMap:j,collectionRef:w,children:k})};o.displayName=a;const c=t+"CollectionSlot",l=lt(c),h=b.forwardRef((x,v)=>{const{scope:k,children:w}=x,j=i(c,k),M=cc(v,j.collectionRef);return e.jsx(l,{ref:M,children:w})});h.displayName=c;const u=t+"CollectionItemSlot",p="data-radix-collection-item",y=lt(u),m=b.forwardRef((x,v)=>{const{scope:k,children:w,...j}=x,M=b.useRef(null),N=cc(v,M),L=i(u,k);return b.useEffect(()=>(L.itemMap.set(M,{ref:M,...j}),()=>void L.itemMap.delete(M))),e.jsx(y,{[p]:"",ref:N,children:w})});m.displayName=u;function f(x){const v=i(t+"CollectionConsumer",x);return b.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const j=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((L,C)=>j.indexOf(L.ref.current)-j.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:h,ItemSlot:m},f,s]}var _9=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},$K=g[" useId ".trim().toString()]||(()=>{}),UK=0;function GK(t){const[a,n]=g.useState($K());return _9(()=>{n(s=>s??String(UK++))},[t]),a?`radix-${a}`:""}function WK(t){const a=g.useRef(t);return g.useEffect(()=>{a.current=t}),g.useMemo(()=>(...n)=>{var s;return(s=a.current)==null?void 0:s.call(a,...n)},[])}var ZK=g[" useInsertionEffect ".trim().toString()]||_9;function iO({prop:t,defaultProp:a,onChange:n=()=>{},caller:s}){const[r,i,o]=YK({defaultProp:a,onChange:n}),c=t!==void 0,l=c?t:r;{const u=g.useRef(t!==void 0);g.useEffect(()=>{const p=u.current;p!==c&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,s])}const h=g.useCallback(u=>{var p;if(c){const y=XK(u)?u(t):u;y!==t&&((p=o.current)==null||p.call(o,y))}else i(u)},[c,t,i,o]);return[l,h]}function YK({defaultProp:t,onChange:a}){const[n,s]=g.useState(t),r=g.useRef(n),i=g.useRef(a);return ZK(()=>{i.current=a},[a]),g.useEffect(()=>{var o;r.current!==n&&((o=i.current)==null||o.call(i,n),r.current=n)},[n,r]),[n,s,i]}function XK(t){return typeof t=="function"}var JK=g.createContext(void 0);function oO(t){const a=g.useContext(JK);return t||a||"ltr"}var oN="rovingFocusGroup.onEntryFocus",KK={bubbles:!1,cancelable:!0},ud="RovingFocusGroup",[eS,cO,QK]=BK(ud),[eQ,lO]=vC(ud,[QK]),[tQ,aQ]=eQ(ud),dO=g.forwardRef((t,a)=>e.jsx(eS.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(eS.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(nQ,{...t,ref:a})})}));dO.displayName=ud;var nQ=g.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:r=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:h,preventScrollOnEntryFocus:u=!1,...p}=t,y=g.useRef(null),m=cc(a,y),f=oO(i),[x,v]=iO({prop:o,defaultProp:c??null,onChange:l,caller:ud}),[k,w]=g.useState(!1),j=WK(h),M=cO(n),N=g.useRef(!1),[L,C]=g.useState(0);return g.useEffect(()=>{const S=y.current;if(S)return S.addEventListener(oN,j),()=>S.removeEventListener(oN,j)},[j]),e.jsx(tQ,{scope:n,orientation:s,dir:f,loop:r,currentTabStopId:x,onItemFocus:g.useCallback(S=>v(S),[v]),onItemShiftTab:g.useCallback(()=>w(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(S=>S+1),[]),onFocusableItemRemove:g.useCallback(()=>C(S=>S-1),[]),children:e.jsx(ll.div,{tabIndex:k||L===0?-1:0,"data-orientation":s,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:Rn(t.onMouseDown,()=>{N.current=!0}),onFocus:Rn(t.onFocus,S=>{const I=!N.current;if(S.target===S.currentTarget&&I&&!k){const A=new CustomEvent(oN,KK);if(S.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=M().filter(V=>V.focusable),P=_.find(V=>V.active),E=_.find(V=>V.id===x),$=[P,E,..._].filter(Boolean).map(V=>V.ref.current);pO($,u)}}N.current=!1}),onBlur:Rn(t.onBlur,()=>w(!1))})})}),hO="RovingFocusGroupItem",uO=g.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:r=!1,tabStopId:i,children:o,...c}=t,l=GK(),h=i||l,u=aQ(hO,n),p=u.currentTabStopId===h,y=cO(n),{onFocusableItemAdd:m,onFocusableItemRemove:f,currentTabStopId:x}=u;return g.useEffect(()=>{if(s)return m(),()=>f()},[s,m,f]),e.jsx(eS.ItemSlot,{scope:n,id:h,focusable:s,active:r,children:e.jsx(ll.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...c,ref:a,onMouseDown:Rn(t.onMouseDown,v=>{s?u.onItemFocus(h):v.preventDefault()}),onFocus:Rn(t.onFocus,()=>u.onItemFocus(h)),onKeyDown:Rn(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const k=iQ(v,u.orientation,u.dir);if(k!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let j=y().filter(M=>M.focusable).map(M=>M.ref.current);if(k==="last")j.reverse();else if(k==="prev"||k==="next"){k==="prev"&&j.reverse();const M=j.indexOf(v.currentTarget);j=u.loop?oQ(j,M+1):j.slice(M+1)}setTimeout(()=>pO(j))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:x!=null}):o})})});uO.displayName=hO;var sQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rQ(t,a){return a!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function iQ(t,a,n){const s=rQ(t.key,n);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return sQ[s]}function pO(t,a=!1){const n=document.activeElement;for(const s of t)if(s===n||(s.focus({preventScroll:a}),document.activeElement!==n))return}function oQ(t,a){return t.map((n,s)=>t[(a+s)%t.length])}var cQ=dO,lQ=uO;function dQ(t,a){return g.useReducer((n,s)=>a[n][s]??n,t)}var mO=t=>{const{present:a,children:n}=t,s=hQ(a),r=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),i=cc(s.ref,uQ(r));return typeof n=="function"||s.isPresent?g.cloneElement(r,{ref:i}):null};mO.displayName="Presence";function hQ(t){const[a,n]=g.useState(),s=g.useRef(null),r=g.useRef(t),i=g.useRef("none"),o=t?"mounted":"unmounted",[c,l]=dQ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=Td(s.current);i.current=c==="mounted"?h:"none"},[c]),_9(()=>{const h=s.current,u=r.current;if(u!==t){const y=i.current,m=Td(h);t?l("MOUNT"):m==="none"||(h==null?void 0:h.display)==="none"?l("UNMOUNT"):l(u&&y!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),_9(()=>{if(a){let h;const u=a.ownerDocument.defaultView??window,p=m=>{const x=Td(s.current).includes(CSS.escape(m.animationName));if(m.target===a&&x&&(l("ANIMATION_END"),!r.current)){const v=a.style.animationFillMode;a.style.animationFillMode="forwards",h=u.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=v)})}},y=m=>{m.target===a&&(i.current=Td(s.current))};return a.addEventListener("animationstart",y),a.addEventListener("animationcancel",p),a.addEventListener("animationend",p),()=>{u.clearTimeout(h),a.removeEventListener("animationstart",y),a.removeEventListener("animationcancel",p),a.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[a,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function Td(t){return(t==null?void 0:t.animationName)||"none"}function uQ(t){var s,r;let a=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?t.ref:(a=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var NL="Radio",[pQ,yO]=vC(NL),[mQ,yQ]=pQ(NL),fO=g.forwardRef((t,a)=>{const{__scopeRadio:n,name:s,checked:r=!1,required:i,disabled:o,value:c="on",onCheck:l,form:h,...u}=t,[p,y]=g.useState(null),m=cc(a,v=>y(v)),f=g.useRef(!1),x=p?h||!!p.closest("form"):!0;return e.jsxs(mQ,{scope:n,checked:r,disabled:o,children:[e.jsx(ll.button,{type:"button",role:"radio","aria-checked":r,"data-state":kO(r),"data-disabled":o?"":void 0,disabled:o,value:c,...u,ref:m,onClick:Rn(t.onClick,v=>{r||l==null||l(),x&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})}),x&&e.jsx(vO,{control:p,bubbles:!f.current,name:s,value:c,checked:r,required:i,disabled:o,form:h,style:{transform:"translateX(-100%)"}})]})});fO.displayName=NL;var xO="RadioIndicator",gO=g.forwardRef((t,a)=>{const{__scopeRadio:n,forceMount:s,...r}=t,i=yQ(xO,n);return e.jsx(mO,{present:s||i.checked,children:e.jsx(ll.span,{"data-state":kO(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:a})})});gO.displayName=xO;var fQ="RadioBubbleInput",vO=g.forwardRef(({__scopeRadio:t,control:a,checked:n,bubbles:s=!0,...r},i)=>{const o=g.useRef(null),c=cc(o,i),l=rC(n),h=iC(a);return g.useEffect(()=>{const u=o.current;if(!u)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const f=new Event("click",{bubbles:s});m.call(u,n),u.dispatchEvent(f)}},[l,n,s]),e.jsx(ll.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vO.displayName=fQ;function kO(t){return t?"checked":"unchecked"}var xQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],kC="RadioGroup",[gQ,Cee]=vC(kC,[lO,yO]),bO=lO(),wO=yO(),[vQ,kQ]=gQ(kC),jO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,name:s,defaultValue:r,value:i,required:o=!1,disabled:c=!1,orientation:l,dir:h,loop:u=!0,onValueChange:p,...y}=t,m=bO(n),f=oO(h),[x,v]=iO({prop:i,defaultProp:r??null,onChange:p,caller:kC});return e.jsx(vQ,{scope:n,name:s,required:o,disabled:c,value:x,onValueChange:v,children:e.jsx(cQ,{asChild:!0,...m,orientation:l,dir:f,loop:u,children:e.jsx(ll.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":c?"":void 0,dir:f,...y,ref:a})})})});jO.displayName=kC;var MO="RadioGroupItem",CO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,disabled:s,...r}=t,i=kQ(MO,n),o=i.disabled||s,c=bO(n),l=wO(n),h=g.useRef(null),u=cc(a,h),p=i.value===r.value,y=g.useRef(!1);return g.useEffect(()=>{const m=x=>{xQ.includes(x.key)&&(y.current=!0)},f=()=>y.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",f)}},[]),e.jsx(lQ,{asChild:!0,...c,focusable:!o,active:p,children:e.jsx(fO,{disabled:o,required:i.required,checked:p,...l,...r,name:i.name,ref:u,onCheck:()=>i.onValueChange(r.value),onKeyDown:Rn(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:Rn(r.onFocus,()=>{var m;y.current&&((m=h.current)==null||m.click())})})})});CO.displayName=MO;var bQ="RadioGroupIndicator",NO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,...s}=t,r=wO(n);return e.jsx(gO,{...r,...s,ref:a})});NO.displayName=bQ;var SO=jO,LO=CO,wQ=NO;const tS=g.forwardRef(({className:t,...a},n)=>e.jsx(SO,{className:pe("grid gap-2",t),...a,ref:n}));tS.displayName=SO.displayName;const Nc=g.forwardRef(({className:t,...a},n)=>e.jsx(LO,{ref:n,className:pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e.jsx(wQ,{className:"flex items-center justify-center",children:e.jsx(es,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Nc.displayName=LO.displayName;const jQ=t=>{let a=0;return t.headline&&(a+=20),t.bio&&t.bio.length>=100&&(a+=20),t.primarySkills&&t.primarySkills.length>=3&&(a+=20),(t.hourlyRateMin||t.hourlyRateMax)&&(a+=15),t.availability&&(a+=10),t.portfolioItems&&t.portfolioItems.length>0&&(a+=15),Math.min(100,a)};function MQ({open:t,onOpenChange:a,isCandidateActive:n=!0,onComplete:s,onSaveDraft:r}){var I,A,_;const[i,o]=b.useState(1),[c,l]=b.useState({appearanceMode:n?"both_freelance_fulltime":"freelance_only",preferredLocations:[],verticals:[],headline:"",bio:"",primarySkills:[],availability:"part_time",portfolioItems:[]}),[h,u]=b.useState(""),[p,y]=b.useState(""),[m,f]=b.useState(""),[x,v]=b.useState(""),k=jQ(c),w=(((I=c.verticals)==null?void 0:I.length)??0)>=3,j=b.useCallback((P,E)=>{l(q=>{const $=q[P]||[],V=$.includes(E);return{...q,[P]:V?$.filter(H=>H!==E):[...$,E]}})},[]),M=b.useCallback((P,E,q)=>{E.trim()&&(l($=>({...$,[P]:[...$[P]||[],E.trim()]})),q(""))},[]),N=b.useCallback(()=>{if(!x.trim())return;const P={id:`link-${Date.now()}`,type:"link",title:x,url:x};l(E=>({...E,portfolioItems:[...E.portfolioItems||[],P]})),v("")},[x]),L=b.useCallback(P=>{l(E=>({...E,portfolioItems:(E.portfolioItems||[]).filter(q=>q.id!==P)}))},[]),C=()=>{const P=new Date().toISOString(),E={appearanceMode:c.appearanceMode||"both_freelance_fulltime",preferredLocations:c.preferredLocations||[],verticals:c.verticals||[],headline:c.headline||"",bio:c.bio||"",primarySkills:c.primarySkills||[],hourlyRateMin:c.hourlyRateMin,hourlyRateMax:c.hourlyRateMax,availability:c.availability||"part_time",portfolioItems:c.portfolioItems||[],isPublic:!0,isDraft:!1,profileStrength:k,createdAt:P,updatedAt:P};s(E),a(!1)},S=()=>{r({...c,isDraft:!0,isPublic:!1}),a(!1)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsx(Ct,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:i===1?e.jsxs(e.Fragment,{children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Set Up as Freelancer"}),e.jsx(Ra,{children:"Great! Let's make you discoverable."})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs(Z,{className:"text-sm font-medium",children:["How do you want to appear? ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(tS,{value:c.appearanceMode,onValueChange:P=>l(E=>({...E,appearanceMode:P})),children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"freelance_only",id:"freelance_only"}),e.jsx(Z,{htmlFor:"freelance_only",className:"font-normal",children:"Freelance gigs only"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"both_freelance_fulltime",id:"both"}),e.jsx(Z,{htmlFor:"both",className:"font-normal",children:"Both freelance + open to full-time jobs"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(Z,{className:"text-sm font-medium",children:"Preferred locations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:OK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.preferredLocations)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("preferredLocations",P),children:[P,((q=c.preferredLocations)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Add location",value:h,onChange:P=>u(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("preferredLocations",h,u),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("preferredLocations",h,u),children:e.jsx($t,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(Z,{className:"text-sm font-medium",children:["Your main freelance verticals (pick 3–5) ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:zK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.verticals)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("verticals",P),children:[P,((q=c.verticals)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Custom vertical",value:p,onChange:P=>y(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("verticals",p,y),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("verticals",p,y),children:e.jsx($t,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Selected: ",((A=c.verticals)==null?void 0:A.length)??0,"/5"]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(T,{onClick:()=>o(2),disabled:!w,children:["Continue",e.jsx(Ln,{className:"ml-2 h-4 w-4"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ft,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{children:"Freelancer Profile Setup"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(bc,{value:k,className:"flex-1 h-2"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[k,"% complete"]})]})]})}),e.jsxs("div",{className:"space-y-5 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(Z,{htmlFor:"headline",children:["Headline ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(fe,{id:"headline",placeholder:'e.g. "iGaming AML Specialist | Ex-MGA Auditor"',value:c.headline,onChange:P=>l(E=>({...E,headline:P.target.value}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"bio",children:"Short Bio (150–300 chars)"}),e.jsx(ea,{id:"bio",placeholder:"Tell clients what you do best...",value:c.bio,onChange:P=>l(E=>({...E,bio:P.target.value})),maxLength:300,rows:3}),e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[((_=c.bio)==null?void 0:_.length)??0,"/300"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Primary Skills"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:qK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.primarySkills)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("primarySkills",P),children:[P,((q=c.primarySkills)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Add skill",value:m,onChange:P=>f(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("primarySkills",m,f),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("primarySkills",m,f),children:e.jsx($t,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Hourly Rate (optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"€"}),e.jsx(fe,{type:"number",placeholder:"Min",className:"w-24",value:c.hourlyRateMin??"",onChange:P=>l(E=>({...E,hourlyRateMin:Number(P.target.value)||void 0}))}),e.jsx("span",{className:"text-muted-foreground",children:"–"}),e.jsx(fe,{type:"number",placeholder:"Max",className:"w-24",value:c.hourlyRateMax??"",onChange:P=>l(E=>({...E,hourlyRateMax:Number(P.target.value)||void 0}))}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"/hr"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Typical range: €50–€150 for iGaming experts"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Availability"}),e.jsxs(tS,{value:c.availability,onValueChange:P=>l(E=>({...E,availability:P})),className:"flex flex-wrap gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"full_time",id:"avail_full"}),e.jsx(Z,{htmlFor:"avail_full",className:"font-normal",children:"Full-time freelance"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"part_time",id:"avail_part"}),e.jsx(Z,{htmlFor:"avail_part",className:"font-normal",children:"Part-time"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"project_based",id:"avail_project"}),e.jsx(Z,{htmlFor:"avail_project",className:"font-normal",children:"Project-based only"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Portfolio / Proof"}),e.jsxs("div",{className:"border-2 border-dashed rounded-lg p-4 text-center",children:[e.jsx(Hc,{className:"mx-auto h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Add PDF, images, case studies, GitHub links..."})]}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(fe,{placeholder:"Paste URL to portfolio item",value:x,onChange:P=>v(P.target.value),onKeyDown:P=>P.key==="Enter"&&N(),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:N,children:e.jsx($t,{className:"h-4 w-4"})})]}),c.portfolioItems&&c.portfolioItems.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.portfolioItems.map(P=>e.jsxs(se,{variant:"secondary",className:"pr-1",children:[P.title.length>30?`${P.title.slice(0,30)}...`:P.title,e.jsx("button",{onClick:()=>L(P.id),className:"ml-1 hover:text-destructive",children:e.jsx(tt,{className:"h-3 w-3"})})]},P.id))})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx(T,{variant:"ghost",onClick:()=>o(1),children:"Back"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(T,{variant:"link",onClick:S,className:"text-muted-foreground",children:"Save as Draft"}),e.jsx(T,{onClick:C,disabled:!c.headline,className:"bg-orange-500 hover:bg-orange-600 text-white",children:"Save & Go Public"})]})]})]})})})}const CQ={title:"Change Password",description:"Submit the new credentials to emit an update-password event.",currentPasswordLabel:"Current password",newPasswordLabel:"New password",confirmPasswordLabel:"Confirm new password",mismatchError:"New password and confirmation do not match.",cancelButton:"Cancel",submitButton:"Update Password"},bn={headerTitle:"Settings",headerDescription:"Manage your account preferences",tabs:{notifications:"Notifications",account:"Account",subscription:"Subscription",connected:"Connected"},notifications:{title:"Notification Preferences",description:"Choose how you want to be notified",email:{label:"Email Notifications",description:"Receive updates via email"},push:{label:"Push Notifications",description:"Browser push notifications"},weekly:{label:"Weekly Digest",description:"Summary of activities"},contentAlertsTitle:"Content Alerts",jobAlertsLabel:"Job Alerts",courseUpdatesLabel:"Course Updates",newsDigestLabel:"News Digest"},account:{passwordTitle:"Password",passwordDescription:"Change your account password",changePasswordButton:"Change Password",deleteTitle:"Delete Account",deleteDescription:"Permanently delete your account and all data",deleteButton:"Delete Account"},subscription:{title:"Subscription Plan",description:"Manage your membership",premiumBadge:"Premium",premiumBenefitsTitle:"Premium Benefits",premiumBenefits:["✓ Unlimited job applications","✓ Access to all courses","✓ Priority support","✓ Advanced analytics","✓ Ad-free experience"],manageButton:"Manage Subscription",upgradeMessage:"Upgrade to Premium to unlock exclusive features",upgradeButton:"Upgrade to Premium"},connected:{title:"Connected Accounts",description:"Manage linked accounts and integrations",disconnectButton:"Disconnect",connectButton:"Connect"}};function NQ({open:t,onOpenChange:a,onSubmit:n,text:s}){const[r,i]=b.useState({currentPassword:"",newPassword:"",confirmPassword:""}),[o,c]=b.useState(null),[l,h]=b.useState({}),u={...CQ,...s};b.useEffect(()=>{t||(i({currentPassword:"",newPassword:"",confirmPassword:""}),c(null),h({}))},[t]);const p=y=>{if(y.preventDefault(),r.newPassword!==r.confirmPassword){c(u.mismatchError);return}n({currentPassword:r.currentPassword,newPassword:r.newPassword,confirmPassword:r.confirmPassword}),a(!1)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{className:"sm:max-w-md",children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:u.title}),e.jsx(Ra,{children:u.description})]}),e.jsxs("form",{className:"space-y-4",onSubmit:p,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"current-password",children:u.currentPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"current-password",type:l.currentPassword?"text":"password",value:r.currentPassword,onChange:y=>i(m=>({...m,currentPassword:y.target.value})),autoComplete:"current-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,currentPassword:!y.currentPassword})),children:l.currentPassword?"Hide":"Show"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"new-password",children:u.newPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"new-password",type:l.newPassword?"text":"password",value:r.newPassword,onChange:y=>i(m=>({...m,newPassword:y.target.value})),autoComplete:"new-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,newPassword:!y.newPassword})),children:l.newPassword?"Hide":"Show"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"confirm-password",children:u.confirmPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"confirm-password",type:l.confirmPassword?"text":"password",value:r.confirmPassword,onChange:y=>{i(m=>({...m,confirmPassword:y.target.value})),c(null)},autoComplete:"new-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,confirmPassword:!y.confirmPassword})),children:l.confirmPassword?"Hide":"Show"})]}),o?e.jsx("p",{className:"text-sm text-destructive",children:o}):null]}),e.jsxs(Qt,{className:"gap-2 sm:gap-0",children:[e.jsx(T,{type:"button",variant:"outline",onClick:()=>a(!1),children:u.cancelButton}),e.jsx(T,{type:"submit",children:u.submitButton})]})]})]})})}function SQ({settings:t,onUpdate:a,text:n,changePasswordText:s}){var m,f,x;const{notifications:r,connectedAccounts:i,subscription:o}=t,[c,l]=b.useState(!1),h={...bn,...n,tabs:{...bn.tabs,...n==null?void 0:n.tabs},notifications:{...bn.notifications,...n==null?void 0:n.notifications,email:{...bn.notifications.email,...(m=n==null?void 0:n.notifications)==null?void 0:m.email},push:{...bn.notifications.push,...(f=n==null?void 0:n.notifications)==null?void 0:f.push},weekly:{...bn.notifications.weekly,...(x=n==null?void 0:n.notifications)==null?void 0:x.weekly}},account:{...bn.account,...n==null?void 0:n.account},subscription:{...bn.subscription,...n==null?void 0:n.subscription},connected:{...bn.connected,...n==null?void 0:n.connected}},u=v=>{a({action:"notifications",updates:v})},p=v=>{a({action:"connect-account",platform:v})},y=v=>{a({action:"disconnect-account",accountId:v})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:h.headerTitle}),e.jsx("p",{className:"text-muted-foreground mt-1",children:h.headerDescription})]}),e.jsxs(yn,{defaultValue:"notifications",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[e.jsxs(Fe,{value:"notifications",children:[e.jsx(tn,{className:"h-4 w-4 mr-2"}),h.tabs.notifications]}),e.jsxs(Fe,{value:"account",children:[e.jsx(rs,{className:"h-4 w-4 mr-2"}),h.tabs.account]}),e.jsxs(Fe,{value:"subscription",children:[e.jsx(Nl,{className:"h-4 w-4 mr-2"}),h.tabs.subscription]}),e.jsxs(Fe,{value:"connected",children:[e.jsx(_l,{className:"h-4 w-4 mr-2"}),h.tabs.connected]})]}),e.jsx(Ie,{value:"notifications",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.notifications.title}),e.jsx(Te,{children:h.notifications.description})]}),e.jsxs(le,{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"email-notif",className:"text-base",children:h.notifications.email.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.email.description})]}),e.jsx(qt,{id:"email-notif",checked:r.emailNotifications,onCheckedChange:v=>u({emailNotifications:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"push-notif",className:"text-base",children:h.notifications.push.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.push.description})]}),e.jsx(qt,{id:"push-notif",checked:r.pushNotifications,onCheckedChange:v=>u({pushNotifications:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"weekly-digest",className:"text-base",children:h.notifications.weekly.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.weekly.description})]}),e.jsx(qt,{id:"weekly-digest",checked:r.weeklyDigest,onCheckedChange:v=>u({weeklyDigest:v})})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsx("h4",{className:"font-medium",children:h.notifications.contentAlertsTitle}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"job-alerts-set",children:h.notifications.jobAlertsLabel}),e.jsx(qt,{id:"job-alerts-set",checked:r.jobAlerts,onCheckedChange:v=>u({jobAlerts:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"course-updates",children:h.notifications.courseUpdatesLabel}),e.jsx(qt,{id:"course-updates",checked:r.courseUpdates,onCheckedChange:v=>u({courseUpdates:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"news-digest",children:h.notifications.newsDigestLabel}),e.jsx(qt,{id:"news-digest",checked:r.newsDigest,onCheckedChange:v=>u({newsDigest:v})})]})]})]})]})}),e.jsx(Ie,{value:"account",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.account.passwordTitle}),e.jsx(Te,{children:h.account.passwordDescription})]}),e.jsx(le,{children:e.jsx(T,{onClick:()=>l(!0),children:h.account.changePasswordButton})})]}),e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.account.deleteTitle}),e.jsx(Te,{children:h.account.deleteDescription})]}),e.jsx(le,{children:e.jsx(T,{variant:"destructive",onClick:()=>a({action:"delete-account"}),children:h.account.deleteButton})})]})]})}),e.jsx(NQ,{open:c,onOpenChange:l,text:s,onSubmit:v=>a({action:"update-password",details:v})}),e.jsx(Ie,{value:"subscription",children:e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx(xe,{children:h.subscription.title}),e.jsx(Te,{children:h.subscription.description})]}),o.isPremium&&e.jsx(se,{children:h.subscription.premiumBadge})]})}),e.jsx(le,{className:"space-y-4",children:o.isPremium?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border rounded-lg bg-accent/5",children:[e.jsx("h4",{className:"font-semibold mb-2",children:h.subscription.premiumBenefitsTitle}),e.jsx("ul",{className:"space-y-1 text-sm text-muted-foreground",children:h.subscription.premiumBenefits.map(v=>e.jsx("li",{children:v},v))})]}),e.jsx(T,{variant:"outline",children:h.subscription.manageButton})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:h.subscription.upgradeMessage}),e.jsx(T,{onClick:()=>a({action:"upgrade",plan:"premium"}),children:h.subscription.upgradeButton})]})})]})}),e.jsx(Ie,{value:"connected",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.connected.title}),e.jsx(Te,{children:h.connected.description})]}),e.jsx(le,{className:"space-y-4",children:i.map(v=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:v.platform}),v.connected&&v.email&&e.jsx("p",{className:"text-sm text-muted-foreground",children:v.email})]}),v.connected?e.jsx(T,{variant:"outline",size:"sm",onClick:()=>y(v.id),children:h.connected.disconnectButton}):e.jsx(T,{size:"sm",onClick:()=>p(v.platform),children:h.connected.connectButton})]},v.id))})]})})]})]})}function LQ({user:t,profileData:a,jobsDashboard:n,alerts:s,snapshot:r,feedItems:i,onUploadCV:o,cvPreviewText:c,cvPreviewStatus:l,cvPreviewErrorMessage:h,coursesData:u,newsData:p,settingsData:y,onUpdateProfile:m,activeTab:f,tabPaths:x,onTabChange:v,freelancerData:k,freelancerStats:w,isCandidateActive:j=!0,onFreelancerUpdate:M,onboardingSteps:N,emailVerified:L=!1,profileComplete:C=!1,onboardingProgress:S=0,onOnboardingAction:I,onOpenOnboarding:A}){const[_,P]=b.useState(f??"overview"),[E,q]=b.useState(!1);b.useEffect(()=>{f&&P(f)},[f]);const $=n||(a==null?void 0:a.jobsDashboard)||{savedJobs:[],recommendedJobs:[],applications:[]},V=()=>console.log("/logout"),H={overview:"/dashboard",profile:"/dashboard/profile",jobs:"/dashboard/jobs",courses:"/dashboard/courses",news:"/dashboard/news",settings:"/dashboard/settings",...x},G=K=>{var ie;const F=((ie=Object.entries(H).find(([,ce])=>ce===K))==null?void 0:ie[0])??null;if(F){f||P(F),v==null||v({tab:F,path:K});return}v==null||v({tab:_,path:K})},Y=async K=>{await m({type:"courses",payload:K})},z=K=>{K.action==="edit-profile"&&q(!0),M==null||M(K)},te=K=>{M==null||M({action:"complete-step-2",data:K}),q(!1)},U=K=>{M==null||M({action:"save-draft",data:K}),q(!1)},ae=(...K)=>console.log("Action:",...K),D=async K=>{await m({type:"news",payload:K})},B=y||{notifications:{emailNotifications:!0,pushNotifications:!1,weeklyDigest:!0,jobAlerts:!0,courseUpdates:!0,newsDigest:!1},connectedAccounts:[{id:"google_89213",platform:"Google",connected:!0,email:t.email},{id:"linkedin_55521",platform:"LinkedIn",connected:!1}],subscription:{isPremium:!1,plan:"free",renewalDate:null}},he=async K=>{await m({type:"settings",payload:K})},W=K=>{const F=K;f||P(F),v==null||v({tab:F,path:H[F]})},de=f??_,ve=H[de]??"/dashboard";return e.jsx(tJ,{user:t,onLogout:V,onNavigate:G,currentPath:ve,notificationCount:s.length,children:e.jsxs(yn,{value:de,onValueChange:W,className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-6",children:[e.jsxs(Fe,{value:"overview",className:"flex items-center gap-2",children:[e.jsx(jn,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Overview"})]}),e.jsxs(Fe,{value:"profile",className:"flex items-center gap-2",children:[e.jsx(Pn,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Profile"})]}),e.jsxs(Fe,{value:"jobs",className:"flex items-center gap-2",children:[e.jsx(at,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Jobs"})]}),e.jsxs(Fe,{value:"courses",className:"flex items-center gap-2",children:[e.jsx(ia,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Courses"})]}),e.jsxs(Fe,{value:"news",className:"flex items-center gap-2",children:[e.jsx(on,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"News"})]}),e.jsxs(Fe,{value:"settings",className:"flex items-center gap-2",children:[e.jsx(In,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Settings"})]})]}),e.jsx(Ie,{value:"overview",className:"mt-6",children:e.jsx(MK,{userName:t.name,feedItems:i,alerts:s,snapshot:r,onSave:ae,onApply:ae,onEnroll:K=>Y({action:"enroll",courseId:K}),onRead:K=>D({action:"read",articleId:K}),freelancerData:k,freelancerStats:w,isCandidateActive:j,onStartFreelancerSetup:()=>q(!0),onFreelancerUpdate:z,onboardingSteps:N,emailVerified:L,profileComplete:C,onboardingProgress:S,onOnboardingAction:I})}),e.jsx(MQ,{open:E,onOpenChange:q,isCandidateActive:j,onComplete:te,onSaveDraft:U}),e.jsx(Ie,{value:"profile",className:"mt-6",children:e.jsx(PK,{profile:a,onUpdate:K=>m(K)})}),e.jsx(Ie,{value:"jobs",className:"mt-6",children:e.jsx(TK,{savedJobs:$.savedJobs,applications:$.applications,recommendedJobs:$.recommendedJobs,onApply:K=>console.log("Applied:",K),onRemove:K=>console.log("Removed:",K),onUploadCV:o??(K=>console.log("Upload CV changed:",(K==null?void 0:K.name)||"removed")),cvPreviewText:c,cvPreviewStatus:l,cvPreviewErrorMessage:h,onSetAlert:()=>console.log("Set alerts clicked"),onUpdateProfile:async K=>{await m({type:"jobs",payload:K.payload})}})}),e.jsx(Ie,{value:"courses",className:"mt-6",children:e.jsx(DK,{enrolledCourses:(u==null?void 0:u.enrolledCourses)||[],savedCourses:(u==null?void 0:u.savedCourses)||[],recommendedCourses:(u==null?void 0:u.recommendedCourses)||[],certificates:(u==null?void 0:u.certificates)||[],onEnroll:K=>Y({action:"enroll",courseId:K}),onContinue:K=>Y({action:"continue",courseId:K}),onExplore:()=>Y({action:"explore"}),onSave:K=>Y({action:"save",courseId:K}),onRemoveSaved:K=>Y({action:"remove-saved",courseId:K}),onRemoveRecommended:K=>Y({action:"remove-recommended",courseId:K})})}),e.jsx(Ie,{value:"news",className:"mt-6",children:e.jsx(EK,{recommendedNews:(p==null?void 0:p.recommendedNews)||[],savedArticles:(p==null?void 0:p.savedArticles)||[],categories:(p==null?void 0:p.categories)||[],selectedCategory:(p==null?void 0:p.selectedCategory)||"all",onRead:K=>D({action:"read",articleId:K}),onSave:K=>D({action:"save",articleId:K}),onRemoveSaved:K=>D({action:"remove-saved",articleId:K}),onRemoveRecommended:K=>D({action:"remove-recommended",articleId:K}),onCategoryChange:K=>D({action:"category",category:K}),onManagePreferences:()=>D({action:"manage-preferences"})})}),e.jsx(Ie,{value:"settings",className:"mt-6",children:e.jsx(SQ,{settings:B,onUpdate:he})})]})})}const IQ=({emailVerified:t,profileComplete:a,requiredSteps:n})=>{const s=[],r=n??[],i=r.includes("email_verification")||r.length===0&&t===!1,o=r.includes("profile_required_fields")||r.length===0&&a===!1;return i&&t===!1&&s.push("Verify your email address"),o&&a===!1&&s.push("Complete your profile"),!s.length&&r.length>0&&s.push("Complete required onboarding steps"),s};function AQ({children:t,onClick:a,emailVerified:n,profileComplete:s,requiredSteps:r,isBlocked:i,blockedReason:o,ctaLabel:c,onCtaClick:l,variant:h="tooltip"}){const u=IQ({emailVerified:n,profileComplete:s,requiredSteps:r}),p=i??u.length>0,y=o??(u.length?u.join(" and "):"Complete onboarding to continue."),m=g.isValidElement(t)?t.props.onClick:void 0,[f,x]=g.useState(!1),v=h==="tooltip",k=()=>{if(p){v||x(!0);return}m==null||m(),a==null||a()};function w(M){return g.isValidElement(M)}const j=e.jsx("span",{className:pe("inline-flex",p?"cursor-not-allowed":"cursor-pointer"),onClick:k,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&p&&(M.preventDefault(),v||x(!0))},onMouseEnter:()=>p&&v&&x(!0),onMouseLeave:()=>p&&v&&x(!1),onFocus:()=>p&&v&&x(!0),onBlur:()=>p&&v&&x(!1),role:p?"button":void 0,tabIndex:p?0:void 0,"aria-disabled":p,children:w(t)?g.cloneElement(t,{className:pe(t.props.className,p&&"pointer-events-none opacity-60"),disabled:p||t.props.disabled}):t});return p?v?e.jsxs(QE,{open:f,onOpenChange:x,children:[e.jsx(eO,{asChild:!0,children:j}),e.jsxs(CL,{className:"w-64 text-sm",sideOffset:8,children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Action unavailable"}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:y}),c&&l&&e.jsx(T,{type:"button",variant:"link",className:"mt-2 h-auto p-0 text-sm",onClick:()=>{x(!1),l()},children:c})]})]}):e.jsxs(It,{open:f,onOpenChange:x,children:[e.jsx(cT,{asChild:!0,children:j}),e.jsxs(Ct,{children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Complete onboarding to continue"}),e.jsx(Ra,{children:y})]}),(c||l)&&e.jsxs(Qt,{children:[c&&l&&e.jsx(T,{type:"button",onClick:()=>{x(!1),l()},children:c}),e.jsx(T,{type:"button",variant:"outline",onClick:()=>x(!1),children:"Close"})]})]})]}):j}const IO=({freelancer:t,loading:a=!1,followLoading:n=!1,followDisabled:s=!1,onToggleFollow:r,onFollowAction:i,saveLoading:o=!1,saveDisabled:c=!1,onToggleSave:l,onSaveAction:h,onContact:u,onBack:p,onEmitEvent:y})=>{if(a)return e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx("div",{className:"text-center text-muted-foreground",children:"Loading profile..."})});if(!t)return e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Freelancer not found"}),e.jsx("a",{href:"/freelancers",className:"text-accent hover:underline",children:"Back to Freelancers"})]})});const m=t.isSaved??!1,f=t.isFollowing??!1,x=s||n,v=c||o,k=A=>{y==null||y({domain:"freelancers",name:A,payload:{freelancerId:t.id,slug:t.slug,name:t.name,source:"profile"},timestamp:new Date().toISOString(),context:{component:"FreelancerProfile"}})};b.useEffect(()=>{k("freelancer_profile_viewed")},[t.id]);const w=()=>{if(x)return;const A=!f;r==null||r(t.id,A),i==null||i({freelancerId:t.id,freelancerSlug:t.slug,action:A?"follow":"unfollow"}),k(A?"freelancer_followed":"freelancer_unfollowed")},j=()=>{if(v)return;const A=!m;l==null||l(t.id,A),h==null||h({freelancerId:t.id,freelancerSlug:t.slug,freelancerName:t.name,action:A?"save":"unsave"}),k(A?"freelancer_saved":"freelancer_unsaved")},M=()=>{u==null||u(t.id),k("freelancer_contact_clicked")},N=t.name.split(" ").map(A=>A[0]).join("").toUpperCase(),L=A=>{switch(A){case"available":return"bg-green-500";case"limited":return"bg-yellow-500";case"unavailable":return"bg-red-500";default:return"bg-gray-500"}},C=A=>{switch(A){case"available":return"Available Now";case"limited":return"Limited Availability";case"unavailable":return"Not Available";default:return A}},S=A=>{switch(A){case"freelancer":return"Freelancer";case"coach":return"Coach";case"mentor":return"Mentor";case"consultant":return"Consultant";case"influencer":return"Influencer";case"streamer":return"Streamer";default:return A}},I=[{id:1,author:"John Smith",company:"BetCasino Ltd",rating:5,date:"2024-01-15",content:"Exceptional expertise in compliance. Helped us secure our MGA license in record time. Highly recommended!"},{id:2,author:"Sarah Johnson",company:"GameTech Solutions",rating:5,date:"2024-01-10",content:"Professional, responsive, and incredibly knowledgeable. A true expert in the iGaming industry."},{id:3,author:"Michael Brown",company:"Lucky Spin Gaming",rating:4,date:"2023-12-20",content:"Great communication and delivered results on time. Would definitely work with again."}];return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"bg-card border-b border-border sticky top-0 z-50",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[p?e.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Ha,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Talent"})]}):e.jsxs("a",{href:"/freelancers",className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Ha,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Talent"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(T,{variant:"outline",size:"sm",onClick:w,disabled:x,children:[n?e.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ba,{className:`w-4 h-4 mr-2 ${f?"fill-rose-500 text-rose-500":""}`}),f?"Following":"Follow"]}),e.jsxs(T,{variant:"outline",size:"sm",onClick:j,disabled:v,children:[o?e.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ut,{className:`w-4 h-4 mr-2 ${m?"fill-accent text-accent":""}`}),m?"Saved":"Save"]}),e.jsxs(T,{variant:"outline",size:"sm",children:[e.jsx(ss,{className:"w-4 h-4 mr-2"}),"Share"]}),e.jsxs(T,{variant:"accent",size:"sm",onClick:M,children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"Contact"]})]})]})})}),e.jsx("div",{className:"bg-gradient-to-r from-primary via-primary/90 to-accent/80 h-32 md:h-48"}),e.jsx("div",{className:"container mx-auto px-4 -mt-16 md:-mt-20 pb-12",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(oe,{className:"overflow-visible",children:e.jsx(le,{className:"pt-0",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"-mt-12 md:-mt-16 relative",children:[e.jsxs(ps,{className:"w-28 h-28 md:w-36 md:h-36 border-4 border-card shadow-lg",children:[e.jsx(nc,{src:t.avatar}),e.jsx(ms,{className:"bg-gradient-to-br from-accent to-accent/80 text-white text-3xl md:text-4xl font-bold",children:N})]}),t.isVerified&&e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-card rounded-full p-1",children:e.jsx(qa,{className:"w-6 h-6 text-accent"})})]}),e.jsxs("div",{className:"flex-1 pt-2 md:pt-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:t.name}),t.isTopRated&&e.jsxs(se,{variant:"gaming",className:"gap-1",children:[e.jsx(Bt,{className:"w-3 h-3"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"accent",className:"gap-1",children:[e.jsx(ca,{className:"w-3 h-3"}),"Rising Talent"]})]}),e.jsx("p",{className:"text-lg text-muted-foreground mt-1",children:t.title}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 italic",children:['"',t.tagline,'"']}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-3 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(xt,{className:"w-4 h-4 text-accent"}),t.location.city,","," ",t.location.country]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(_a,{className:"w-4 h-4 text-accent"}),t.location.timezone]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ba,{className:"w-4 h-4 text-accent"}),t.responseTime]})]})]}),e.jsxs("div",{className:"flex gap-6 text-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-accent",children:[t.yearsOfExperience,"+"]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Years Exp."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-accent",children:t.completedProjects}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Projects"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-2xl font-bold text-accent",children:[e.jsx(yt,{className:"w-5 h-5 fill-gaming-gold text-gaming-gold"}),t.rating]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["(",t.reviewCount,")"]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-4",children:[e.jsx(se,{variant:"secondary",children:S(t.type)}),e.jsx(se,{variant:"outline",children:t.experienceLevel}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${L(t.availability)}`}),e.jsx("span",{className:"text-sm text-muted-foreground",children:C(t.availability)})]})]})]})]})})}),e.jsxs(yn,{defaultValue:"overview",className:"space-y-6",children:[e.jsxs(fn,{className:"flex-wrap h-auto gap-1 bg-secondary/50 p-1",children:[e.jsxs(Fe,{value:"overview",children:[e.jsx(at,{className:"w-4 h-4 mr-1.5"}),"Overview"]}),e.jsxs(Fe,{value:"portfolio",children:[e.jsx(Uo,{className:"w-4 h-4 mr-1.5"}),"Portfolio"]}),e.jsxs(Fe,{value:"reviews",children:[e.jsx(yt,{className:"w-4 h-4 mr-1.5"}),"Reviews"]})]}),e.jsxs(Ie,{value:"overview",className:"space-y-6",children:[e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(kt,{className:"w-5 h-5 text-accent"}),"About"]})}),e.jsx(le,{children:e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.bio})})]}),t.highlights.length>0&&e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Bt,{className:"w-5 h-5 text-accent"}),"Key Highlights"]})}),e.jsx(le,{children:e.jsx("ul",{className:"space-y-3",children:t.highlights.map((A,_)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx(Qe,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-muted-foreground",children:A})]},_))})})]}),e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(sn,{className:"w-5 h-5 text-accent"}),"Skills & Expertise"]})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Specializations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.specializations.map(A=>e.jsx(se,{variant:"accent",children:A},A))})]}),e.jsx(cs,{}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Skills"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.skills.map(A=>e.jsx(se,{variant:"outline",children:A},A))})]})]})]}),t.certifications.length>0&&e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(qa,{className:"w-5 h-5 text-accent"}),"Certifications"]})}),e.jsx(le,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:t.certifications.map(A=>e.jsxs(se,{variant:"secondary",className:"gap-1",children:[e.jsx(qa,{className:"w-3 h-3"}),A]},A))})})]})]}),e.jsx(Ie,{value:"portfolio",className:"space-y-6",children:t.portfolio.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.portfolio.map((A,_)=>e.jsxs(oe,{className:"overflow-hidden group cursor-pointer hover:shadow-lg transition-shadow",children:[e.jsxs("div",{className:"aspect-video relative bg-muted",children:[e.jsx("img",{src:A.thumbnail,alt:A.title,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:e.jsx(ts,{className:"w-8 h-8 text-white"})})]}),e.jsxs(le,{className:"p-4",children:[e.jsx("h3",{className:"font-semibold",children:A.title}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:A.description})]})]},_))}):e.jsx(oe,{children:e.jsxs(le,{className:"py-12 text-center text-muted-foreground",children:[e.jsx(Uo,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"No portfolio items available yet."})]})})}),e.jsxs(Ie,{value:"reviews",className:"space-y-6",children:[e.jsx(oe,{children:e.jsx(le,{className:"py-6",children:e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold text-foreground",children:t.rating}),e.jsx("div",{className:"flex items-center gap-1 mt-1",children:[...Array(5)].map((A,_)=>e.jsx(yt,{className:`w-4 h-4 ${_<Math.floor(t.rating)?"fill-gaming-gold text-gaming-gold":"text-muted"}`},_))}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[t.reviewCount," reviews"]})]}),e.jsx("div",{className:"flex-1 space-y-2",children:[5,4,3,2,1].map(A=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm w-3",children:A}),e.jsx(yt,{className:"w-3 h-3 text-gaming-gold"}),e.jsx(bc,{value:A===5?80:A===4?15:5,className:"h-2 flex-1"})]},A))})]})})}),e.jsx("div",{className:"space-y-4",children:I.map(A=>e.jsx(oe,{children:e.jsx(le,{className:"py-4",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(ps,{className:"w-10 h-10",children:e.jsx(ms,{className:"bg-muted",children:A.author[0]})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold",children:A.author}),e.jsx("p",{className:"text-sm text-muted-foreground",children:A.company})]}),e.jsx("div",{className:"flex items-center gap-1",children:[...Array(5)].map((_,P)=>e.jsx(yt,{className:`w-4 h-4 ${P<A.rating?"fill-gaming-gold text-gaming-gold":"text-muted"}`},P))})]}),e.jsxs("div",{className:"mt-3 flex items-start gap-2",children:[e.jsx(Go,{className:"w-4 h-4 text-muted-foreground flex-shrink-0 mt-1"}),e.jsx("p",{className:"text-muted-foreground",children:A.content})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:new Date(A.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})})},A.id))})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(oe,{className:"sticky top-20",children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Rc,{className:"w-5 h-5 text-accent"}),"Pricing"]})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-secondary/50 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Hourly Rate"}),e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[t.hourlyRate.currency," ",t.hourlyRate.min," -"," ",t.hourlyRate.max]})]}),t.sessionRate&&e.jsxs("div",{className:"p-4 bg-accent/10 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t.type==="mentor"||t.type==="coach"?"Session Rate":"Consultation"}),e.jsxs("p",{className:"text-2xl font-bold text-accent",children:[t.sessionRate.currency," ",t.sessionRate.price]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.sessionRate.duration})]}),e.jsxs("div",{className:"space-y-2 pt-2",children:[e.jsxs(T,{onClick:M,className:"w-full",variant:"accent",children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"Send Message"]}),(t.type==="mentor"||t.type==="coach")&&e.jsxs(T,{className:"w-full",variant:"outline",children:[e.jsx(Qn,{className:"w-4 h-4 mr-2"}),"Book Session"]})]}),e.jsx(cs,{}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Success Rate"}),e.jsxs("span",{className:"font-medium",children:[t.successRate,"%"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Response Time"}),e.jsx("span",{className:"font-medium",children:t.responseTime})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Member Since"}),e.jsx("span",{className:"font-medium",children:new Date(t.joinedDate).toLocaleDateString("en-US",{year:"numeric",month:"short"})})]})]})]})]}),e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Dc,{className:"w-5 h-5 text-accent"}),"Languages"]})}),e.jsx(le,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:t.languages.map(A=>e.jsx(se,{variant:"outline",children:A},A))})})]}),t.isVerified&&e.jsx(oe,{className:"bg-accent/5 border-accent/20",children:e.jsx(le,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(qa,{className:"w-8 h-8 text-accent"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold",children:"Verified Professional"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Identity and credentials verified"})]})]})})})]})]})})]})},vA={freelancer:e.jsx(at,{className:"w-3.5 h-3.5"}),coach:e.jsx(sn,{className:"w-3.5 h-3.5"}),mentor:e.jsx(kt,{className:"w-3.5 h-3.5"}),consultant:e.jsx(Ec,{className:"w-3.5 h-3.5"}),streamer:e.jsx(kt,{className:"w-3.5 h-3.5"}),influencer:e.jsx(kt,{className:"w-3.5 h-3.5"})},kA={freelancer:"Freelancer",coach:"Coach",mentor:"Mentor",consultant:"Consultant",streamer:"Streamer",influencer:"Influencer"},bA={freelancer:"bg-blue-500/10 text-blue-600 border-blue-200",coach:"bg-green-500/10 text-green-600 border-green-200",mentor:"bg-purple-500/10 text-purple-600 border-purple-200",consultant:"bg-orange-500/10 text-orange-600 border-orange-200",streamer:"bg-orange-500/10 text-orange-600 border-orange-200",influencer:"bg-orange-500/10 text-orange-600 border-orange-200"},wA={available:"bg-emerald-500/10 text-emerald-600",limited:"bg-amber-500/10 text-amber-600",unavailable:"bg-red-500/10 text-red-500"},PQ={available:"Available Now",limited:"Limited Availability",unavailable:"Not Available"},_Q=({freelancer:t,viewMode:a,isSaved:n,isFollowing:s,followDisabled:r=!1,followLoading:i=!1,onToggleFollow:o,onFollowAction:c,saveDisabled:l=!1,saveLoading:h=!1,onToggleSave:u,onSaveAction:p,onContact:y,onViewProfile:m,onEmitEvent:f,positionInList:x})=>{const v=n??t.isSaved??!1,k=s??t.isFollowing??!1,w=r||i,j=l||h,M=(A,_,P)=>A===_?`${P} ${A}/hr`:`${P} ${A}-${_}/hr`,N=A=>A.split(" ").map(_=>_[0]).join("").toUpperCase(),L=()=>{if(w)return;const A=!k;o==null||o(t.id,A),c==null||c({freelancerId:t.id,freelancerSlug:t.slug,action:A?"follow":"unfollow"}),f==null||f({domain:"freelancers",name:A?"freelancer_followed":"freelancer_unfollowed",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},C=()=>{if(j)return;const A=!v;u==null||u(t.id,A),p==null||p({freelancerId:t.id,freelancerSlug:t.slug,freelancerName:t.name,action:A?"save":"unsave"}),f==null||f({domain:"freelancers",name:A?"freelancer_saved":"freelancer_unsaved",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},S=()=>{y==null||y(t.id),f==null||f({domain:"freelancers",name:"freelancer_contact_clicked",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},I=()=>{m==null||m(t.id),f==null||f({domain:"freelancers",name:"freelancer_profile_opened",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing",openedIn:"same_tab"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})};return a==="list"?e.jsx(oe,{className:"p-4 hover:shadow-md transition-all border-border bg-card group",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsxs("div",{className:"relative",children:[e.jsxs(ps,{className:"w-16 h-16",children:[e.jsx(nc,{src:t.avatar,alt:t.name}),e.jsx(ms,{className:"bg-accent/20 text-accent font-semibold",children:N(t.name)})]}),t.isVerified&&e.jsx(Qe,{className:"absolute -bottom-1 -right-1 w-5 h-5 text-blue-500 bg-white rounded-full"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground truncate",children:t.name}),t.isTopRated&&e.jsxs(se,{variant:"outline",className:"bg-amber-500/10 text-amber-600 border-amber-200 text-xs",children:[e.jsx(Bt,{className:"w-3 h-3 mr-1"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"outline",className:"bg-green-500/10 text-green-600 border-green-200 text-xs",children:[e.jsx(ca,{className:"w-3 h-3 mr-1"}),"Rising Talent"]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.title}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-muted-foreground",children:[e.jsxs(se,{variant:"outline",className:`${bA[t.type]} text-xs`,children:[vA[t.type],e.jsx("span",{className:"ml-1",children:kA[t.type]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(xt,{className:"w-3 h-3"}),t.location.city,", ",t.location.country]})]})]}),e.jsxs("div",{className:"flex-shrink-0 text-right",children:[e.jsx("div",{className:"font-semibold text-foreground",children:M(t.hourlyRate.min,t.hourlyRate.max,t.hourlyRate.currency)}),e.jsxs("div",{className:"mt-1 flex items-center justify-end gap-1",children:[e.jsx("button",{onClick:L,disabled:w,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":k?"Unfollow":"Follow",children:i?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):e.jsx(Ba,{className:`w-5 h-5 ${k?"text-rose-500 fill-rose-500":"text-muted-foreground"}`})}),e.jsx("button",{onClick:C,disabled:j,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":v?"Remove from saved":"Save",children:h?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):v?e.jsx(va,{className:"w-5 h-5 text-accent"}):e.jsx(Ut,{className:"w-5 h-5 text-muted-foreground"})})]})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-1",children:t.tagline}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-3",children:[t.skills.slice(0,5).map(A=>e.jsx(se,{variant:"secondary",className:"text-xs",children:A},A)),t.skills.length>5&&e.jsxs(se,{variant:"outline",className:"text-xs text-muted-foreground",children:["+",t.skills.length-5," more"]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-4",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(yt,{className:"w-4 h-4 text-amber-500 fill-amber-500"}),e.jsx("span",{className:"font-medium",children:t.rating}),e.jsxs("span",{className:"text-muted-foreground",children:["(",t.reviewCount,")"]})]}),e.jsxs("span",{className:"text-muted-foreground",children:[t.completedProjects," projects"]}),e.jsxs("span",{className:"text-muted-foreground",children:[t.successRate,"% success"]}),e.jsx(se,{variant:"outline",className:wA[t.availability],children:PQ[t.availability]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{variant:"outline",size:"sm",onClick:I,children:"View Profile"}),e.jsxs(T,{size:"sm",onClick:S,className:"bg-accent hover:bg-accent/90 text-accent-foreground",children:[e.jsx(Tl,{className:"w-4 h-4 mr-1"}),"Contact"]})]})]})]})]})}):e.jsxs(oe,{className:"p-4 hover:shadow-md transition-all border-border bg-card group flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs(ps,{className:"w-12 h-12",children:[e.jsx(nc,{src:t.avatar,alt:t.name}),e.jsx(ms,{className:"bg-accent/20 text-accent font-semibold text-sm",children:N(t.name)})]}),t.isVerified&&e.jsx(Qe,{className:"absolute -bottom-0.5 -right-0.5 w-4 h-4 text-blue-500 bg-white rounded-full"})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-foreground text-sm truncate",children:t.name}),e.jsxs(se,{variant:"outline",className:`${bA[t.type]} text-xs mt-0.5`,children:[vA[t.type],e.jsx("span",{className:"ml-1",children:kA[t.type]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:L,disabled:w,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":k?"Unfollow":"Follow",children:i?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):e.jsx(Ba,{className:`w-5 h-5 ${k?"text-rose-500 fill-rose-500":"text-muted-foreground"}`})}),e.jsx("button",{onClick:C,disabled:j,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":v?"Remove from saved":"Save",children:h?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):v?e.jsx(va,{className:"w-5 h-5 text-accent"}):e.jsx(Ut,{className:"w-5 h-5 text-muted-foreground"})})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-3",children:[t.isTopRated&&e.jsxs(se,{variant:"outline",className:"bg-amber-500/10 text-amber-600 border-amber-200 text-xs",children:[e.jsx(Bt,{className:"w-3 h-3 mr-0.5"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"outline",className:"bg-green-500/10 text-green-600 border-green-200 text-xs",children:[e.jsx(ca,{className:"w-3 h-3 mr-0.5"}),"Rising"]}),e.jsx(se,{variant:"outline",className:`${wA[t.availability]} text-xs`,children:t.availability==="available"?"Available":t.availability==="limited"?"Limited":"Busy"})]}),e.jsx("h4",{className:"font-medium text-foreground text-sm mt-3 line-clamp-1",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 flex-grow",children:t.tagline}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-2",children:[e.jsx(xt,{className:"w-3 h-3"}),t.location.city,", ",t.location.country]}),e.jsxs("div",{className:"flex flex-wrap gap-1 mt-3",children:[t.skills.slice(0,3).map(A=>e.jsx(se,{variant:"secondary",className:"text-xs",children:A},A)),t.skills.length>3&&e.jsxs(se,{variant:"outline",className:"text-xs text-muted-foreground",children:["+",t.skills.length-3]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-border",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(yt,{className:"w-4 h-4 text-amber-500 fill-amber-500"}),e.jsx("span",{className:"font-medium text-sm",children:t.rating}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.reviewCount,")"]})]}),e.jsx("div",{className:"font-semibold text-sm text-foreground",children:M(t.hourlyRate.min,t.hourlyRate.max,t.hourlyRate.currency)})]}),e.jsx(T,{className:"w-full mt-3 bg-accent hover:bg-accent/90 text-accent-foreground",size:"sm",onClick:I,children:"View Profile"})]})},RQ=({title:t,description:a,popularTags:n=[],selectedTags:s=[],onTagClick:r,onTagRemove:i,className:o=""})=>e.jsxs("div",{className:`bg-card border-b border-border ${o}`,children:[e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:t}),a&&e.jsx("p",{className:"hidden lg:block text-muted-foreground mt-1",children:a})]})})}),n.length>0&&e.jsx("div",{className:"border-t border-border",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3",children:e.jsxs("div",{className:"flex items-center gap-3 overflow-x-auto scrollbar-hide",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground flex-shrink-0",children:"Popular:"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:n.map(c=>{const l=s.includes(c.value);return e.jsxs("button",{onClick:()=>r==null?void 0:r(c.value),className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium border transition-all ${l?"bg-accent text-accent-foreground border-accent":"bg-accent/10 text-accent border-accent/30 hover:bg-accent/20"}`,children:["#",c.label,l&&i&&e.jsx(tt,{className:"w-3.5 h-3.5 hover:text-accent-foreground/80",onClick:h=>{h.stopPropagation(),i(c.value)}})]},c.value)})})]})})})]}),TQ=({value:t,onChange:a,onSubmit:n,onClear:s,onFilterClick:r,placeholder:i="Search...",suggestions:o=[],onSuggestionSelect:c,showFilterButton:l=!0,filterCount:h=0,className:u=""})=>{const[p,y]=b.useState(!1),m=f=>{f.key==="Enter"&&t.trim()&&(n(t.trim()),y(!1)),f.key==="Escape"&&y(!1)};return e.jsxs("div",{className:`relative ${u}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Rt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),e.jsx("input",{type:"text",value:t,onChange:f=>{a(f.target.value),y(f.target.value.length>0)},onKeyDown:m,onFocus:()=>y(t.length>0&&o.length>0),onBlur:()=>setTimeout(()=>y(!1),200),placeholder:i,className:"w-full h-12 pl-10 pr-20 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"}),t&&s&&e.jsx("button",{onClick:s,className:"absolute right-14 top-1/2 -translate-y-1/2 p-1 hover:bg-muted rounded",children:e.jsx(tt,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx("button",{onClick:()=>t.trim()&&n(t.trim()),className:"absolute right-2 top-1/2 -translate-y-1/2 bg-accent hover:bg-accent-hover text-accent-foreground p-2 rounded-md transition-colors",children:e.jsx(Rt,{className:"h-4 w-4"})})]}),l&&r&&e.jsxs("button",{onClick:r,className:"lg:hidden flex items-center justify-center h-12 w-12 rounded-lg border border-input bg-background hover:bg-muted transition-colors relative",children:[e.jsx(An,{className:"h-5 w-5 text-muted-foreground"}),h>0&&e.jsx("span",{className:"absolute -top-1 -right-1 bg-accent text-accent-foreground text-xs font-bold w-5 h-5 rounded-full flex items-center justify-center",children:h})]})]}),p&&o.length>0&&e.jsx("ul",{className:"absolute z-20 mt-1 w-full bg-card border border-border rounded-lg shadow-lg max-h-60 overflow-y-auto",children:o.map((f,x)=>e.jsx("li",{children:e.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted flex items-center gap-2",onClick:()=>{c==null||c(f),y(!1)},children:[e.jsx(Rt,{className:"h-4 w-4 text-muted-foreground"}),f]})},x))})]})},DQ=({viewMode:t,onViewModeChange:a,itemsPerPage:n,onItemsPerPageChange:s,itemsPerPageOptions:r=[5,10,20,50],sortBy:i,onSortChange:o,sortOptions:c,pagination:l,title:h,itemLabel:u="items",icon:p,className:y=""})=>e.jsx("div",{className:`bg-card rounded-lg shadow-sm border border-border p-4 ${y}`,children:e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[p&&e.jsx(p,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[h&&e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:h}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing"," ",e.jsx("span",{className:"font-semibold text-foreground",children:l.startIndex}),"–",e.jsx("span",{className:"font-semibold text-foreground",children:l.endIndex})," ","of"," ",e.jsx("span",{className:"font-semibold text-foreground",children:l.totalItems})," ",u]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Order by"}),e.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"h-9 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:c.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))})]}),e.jsxs("div",{className:"flex bg-muted p-1 rounded-lg",children:[e.jsxs("button",{onClick:()=>a("grid"),className:`px-3 py-1.5 rounded-md flex items-center gap-1.5 transition-colors ${t==="grid"?"bg-accent text-accent-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,"aria-label":"Grid view","aria-pressed":t==="grid",children:[e.jsx(La,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Grid"})]}),e.jsxs("button",{onClick:()=>a("list"),className:`px-3 py-1.5 rounded-md flex items-center gap-1.5 transition-colors ${t==="list"?"bg-accent text-accent-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,"aria-label":"List view","aria-pressed":t==="list",children:[e.jsx(Oc,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"List"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Show:"}),e.jsx("select",{value:n,onChange:m=>s(Number(m.target.value)),className:"h-9 px-2 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:r.map(m=>e.jsx("option",{value:m,children:m},m))})]})]})]})}),EQ=({title:t="Filters",sections:a,onFilterChange:n,onClearAll:s,activeFiltersCount:r,savedCount:i=0,showSavedOnly:o=!1,onToggleSavedOnly:c,savedLabel:l="Saved Items",className:h=""})=>e.jsxs("div",{className:`bg-card rounded-lg shadow-sm border border-border ${h}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nn,{className:"w-5 h-5 text-accent"}),e.jsx("h2",{className:"font-semibold text-foreground",children:t}),r>0&&e.jsx("span",{className:"bg-accent text-accent-foreground text-xs font-bold px-2 py-0.5 rounded-full",children:r})]}),r>0&&e.jsx("button",{onClick:s,className:"text-sm text-accent hover:underline",children:"Clear all"})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[a.map(u=>e.jsx(OQ,{section:u,onFilterChange:n},u.key)),c&&e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs("button",{onClick:c,className:`w-full px-4 py-2.5 rounded-lg flex items-center justify-center gap-2 transition-colors ${o?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:[e.jsx(Ut,{className:"w-4 h-4"}),e.jsxs("span",{className:"font-medium",children:[l," (",i,")"]})]})})]})]}),OQ=({section:t,onFilterChange:a})=>{var u,p,y,m;const[n,s]=b.useState(t.defaultExpanded??!0),[r,i]=b.useState(""),o=((u=t.options)==null?void 0:u.filter(f=>f.label.toLowerCase().includes(r.toLowerCase())))||[],c=f=>{const x=t.selectedValues.includes(f)?t.selectedValues.filter(v=>v!==f):[...t.selectedValues,f];a(t.key,x)},l=f=>{a(t.key,f?[f]:[])},h=t.searchable&&(((p=t.options)==null?void 0:p.length)||0)>6;return e.jsxs("div",{className:"border-b border-border pb-4 last:border-b-0 last:pb-0",children:[t.collapsible!==!1?e.jsxs("button",{onClick:()=>s(!n),className:"flex items-center justify-between w-full py-2 text-left",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.label}),n?e.jsx(an,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(ka,{className:"w-4 h-4 text-muted-foreground"})]}):e.jsx("h3",{className:"text-sm font-medium text-foreground py-2",children:t.label}),n&&e.jsxs("div",{className:"mt-2 space-y-2",children:[h&&e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Rt,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx("input",{type:"text",value:r,onChange:f=>i(f.target.value),placeholder:`Search ${t.label.toLowerCase()}...`,className:"w-full h-8 pl-8 pr-8 text-sm rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),r&&e.jsx("button",{onClick:()=>i(""),className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(tt,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})]}),t.type==="checkbox"&&e.jsxs("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:[o.map(f=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer group",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(f.value),onChange:()=>c(f.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground group-hover:text-accent transition-colors flex-1",children:f.label}),f.count!==void 0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",f.count,")"]})]},f.value)),o.length===0&&r&&e.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No matching options"})]}),(t.type==="select"||t.type==="searchable-select")&&e.jsxs("select",{value:t.selectedValues[0]||"",onChange:f=>l(f.target.value),className:"w-full h-9 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:[e.jsxs("option",{value:"",children:["All ",t.label]}),(y=t.options)==null?void 0:y.map(f=>e.jsxs("option",{value:f.value,children:[f.label,f.count!==void 0&&` (${f.count})`]},f.value))]}),t.type==="toggle"&&((m=t.options)==null?void 0:m.map(f=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(f.value),onChange:()=>c(f.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground",children:f.label})]},f.value)))]})]})},zQ=({pagination:t,onPageChange:a,maxPagesToShow:n=5,showFirstLast:s=!0,className:r=""})=>{const{currentPage:i,totalPages:o}=t;if(o<=1)return null;const l=(()=>{const h=[];let u=Math.max(1,i-Math.floor(n/2)),p=Math.min(o,u+n-1);p-u+1<n&&(u=Math.max(1,p-n+1)),u>1&&(h.push(1),u>2&&h.push("ellipsis"));for(let y=u;y<=p;y++)(y!==1&&y!==o||u===1&&y===1||p===o&&y===o)&&h.push(y);return p<o&&(p<o-1&&h.push("ellipsis"),h.push(o)),h})();return e.jsx("div",{className:`flex justify-center ${r}`,children:e.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[s&&e.jsx("button",{onClick:()=>a(1),disabled:i===1,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"First page",children:e.jsx(Ml,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>a(i-1),disabled:i===1,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Previous page",children:e.jsx(Ha,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex items-center gap-1",children:l.map((h,u)=>h==="ellipsis"?e.jsx("span",{className:"px-2 py-1 text-muted-foreground",children:"..."},`ellipsis-${u}`):e.jsx("button",{onClick:()=>a(h),className:`min-w-[36px] h-9 px-3 rounded-md text-sm font-medium transition-colors ${i===h?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,"aria-label":`Page ${h}`,"aria-current":i===h?"page":void 0,children:h},h))}),e.jsx("button",{onClick:()=>a(i+1),disabled:i===o,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Next page",children:e.jsx(ka,{className:"w-4 h-4"})}),s&&e.jsx("button",{onClick:()=>a(o),disabled:i===o,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Last page",children:e.jsx(Cl,{className:"w-4 h-4"})})]})})},qQ=({icon:t=Ol,title:a="No results found",description:n="Try adjusting your search criteria or filters to find more results.",actionLabel:s="Clear All Filters",onAction:r,className:i=""})=>e.jsxs("div",{className:`flex flex-col items-center justify-center py-16 px-4 ${i}`,children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:e.jsx(t,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:a}),e.jsx("p",{className:"text-muted-foreground text-center max-w-md mb-6",children:n}),r&&e.jsx("button",{onClick:r,className:"px-6 py-2.5 bg-accent hover:bg-accent-hover text-accent-foreground font-medium rounded-lg transition-colors",children:s})]}),FQ=({isOpen:t,onClose:a,title:n="Filters",sections:s,onFilterChange:r,onApply:i,onClearAll:o,savedCount:c=0,showSavedOnly:l=!1,onToggleSavedOnly:h,savedLabel:u="Saved Items"})=>t?e.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:a,"aria-hidden":"true"}),e.jsxs("div",{className:"absolute inset-y-0 right-0 w-full max-w-sm bg-background shadow-xl flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nn,{className:"w-5 h-5 text-accent"}),e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n})]}),e.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors","aria-label":"Close filters",children:e.jsx(tt,{className:"w-5 h-5 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[s.map(p=>e.jsx(VQ,{section:p,onFilterChange:r},p.key)),h&&e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs("button",{onClick:h,className:`w-full px-4 py-2.5 rounded-lg flex items-center justify-center gap-2 transition-colors ${l?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:[e.jsx(Ut,{className:"w-4 h-4"}),e.jsxs("span",{className:"font-medium",children:[u," (",c,")"]})]})})]}),e.jsxs("div",{className:"p-4 border-t border-border space-y-2",children:[e.jsx("button",{onClick:()=>{i(),a()},className:"w-full py-2.5 bg-accent hover:bg-accent-hover text-accent-foreground font-medium rounded-lg transition-colors",children:"Apply Filters"}),e.jsx("button",{onClick:o,className:"w-full py-2.5 bg-muted hover:bg-muted/80 text-muted-foreground font-medium rounded-lg transition-colors",children:"Clear All"})]})]})]}):null,VQ=({section:t,onFilterChange:a})=>{var u,p,y;const[n,s]=b.useState(t.defaultExpanded??!0),[r,i]=b.useState(""),o=((u=t.options)==null?void 0:u.filter(m=>m.label.toLowerCase().includes(r.toLowerCase())))||[],c=m=>{const f=t.selectedValues.includes(m)?t.selectedValues.filter(x=>x!==m):[...t.selectedValues,m];a(t.key,f)},l=m=>{a(t.key,m?[m]:[])},h=t.searchable&&(((p=t.options)==null?void 0:p.length)||0)>6;return e.jsxs("div",{className:"border-b border-border pb-4 last:border-b-0",children:[e.jsxs("button",{onClick:()=>s(!n),className:"flex items-center justify-between w-full py-2",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.label}),n?e.jsx(an,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(ka,{className:"w-4 h-4 text-muted-foreground"})]}),n&&e.jsxs("div",{className:"mt-2 space-y-2",children:[h&&e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Rt,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx("input",{type:"text",value:r,onChange:m=>i(m.target.value),placeholder:`Search ${t.label.toLowerCase()}...`,className:"w-full h-9 pl-8 pr-3 text-sm rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),t.type==="checkbox"&&e.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:o.map(m=>e.jsxs("label",{className:"flex items-center gap-3 p-2 rounded-md hover:bg-muted cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(m.value),onChange:()=>c(m.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground flex-1",children:m.label}),m.count!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:m.count})]},m.value))}),(t.type==="select"||t.type==="searchable-select")&&e.jsxs("select",{value:t.selectedValues[0]||"",onChange:m=>l(m.target.value),className:"w-full h-10 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:[e.jsxs("option",{value:"",children:["All ",t.label]}),(y=t.options)==null?void 0:y.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))]})]})]})},HQ=({filters:t,onRemove:a,onClearAll:n,onCreateAlert:s,showCreateAlert:r=!0,className:i=""})=>t.length===0?null:e.jsxs("div",{className:`flex flex-wrap items-center gap-2 ${i}`,children:[t.map(o=>e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-accent/10 text-accent border border-accent/20 rounded-full text-sm",children:[o.label&&e.jsxs("span",{className:"font-medium",children:[o.label,":"]}),e.jsx("span",{children:o.displayValue||o.value}),e.jsx("button",{onClick:()=>a(o.key,o.value),className:"ml-1 hover:text-accent-hover transition-colors","aria-label":`Remove ${o.label||o.key} filter`,children:e.jsx(tt,{className:"w-3.5 h-3.5"})})]},`${o.key}-${o.value}`)),e.jsx("button",{onClick:n,className:"inline-flex items-center px-3 py-1.5 bg-muted text-muted-foreground hover:bg-muted/80 rounded-full text-sm font-medium transition-colors",children:"Clear All"}),r&&s&&e.jsxs("button",{onClick:s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-primary/10 text-primary hover:bg-primary/20 rounded-full text-sm font-medium transition-colors",children:[e.jsx(tn,{className:"w-3.5 h-3.5"}),"Create Alert"]})]}),BQ=[{label:"compliance",value:"compliance"},{label:"CRM",value:"crm"},{label:"trading",value:"trading"},{label:"marketing",value:"marketing"},{label:"analytics",value:"analytics"},{label:"payments",value:"payments"},{label:"game-design",value:"game-design"},{label:"LatAm",value:"latam"}],$Q=[{value:"relevance",label:"Most Relevant"},{value:"rating",label:"Highest Rated"},{value:"reviews",label:"Most Reviews"},{value:"rate_asc",label:"Rate: Low to High"},{value:"rate_desc",label:"Rate: High to Low"},{value:"newest",label:"Newest Members"}],AO=({freelancers:t,filterOptions:a,loading:n,page:s,pageSize:r,totalCount:i,totalPages:o,onPageChange:c,onPageSizeChange:l,filters:h,onFiltersChange:u,onClearFilters:p,viewMode:y,onViewModeChange:m,followDisabled:f=!1,followLoading:x=!1,onToggleFollow:v,onFollowAction:k,saveDisabled:w=!1,saveLoading:j=!1,onToggleSave:M,onSaveAction:N,onEmitEvent:L})=>{const[C,S]=b.useState(h.search??""),[I,A]=b.useState(!1),_=h.tags??[],P=h.sortBy??"relevance";b.useEffect(()=>{S(h.search??"")},[h.search]);const E=b.useMemo(()=>t.filter(F=>F.isSaved).length,[t]),q=i===0?0:(s-1)*r+1,$=Math.min(s*r,i),V={currentPage:s,totalPages:o,totalItems:i,itemsPerPage:r,startIndex:q,endIndex:$},H=[{key:"types",label:"Type",type:"checkbox",searchable:!1,defaultExpanded:!0,options:a.types,selectedValues:h.types},{key:"specializations",label:"Specialization",type:"checkbox",searchable:!0,defaultExpanded:!0,options:a.specializations,selectedValues:h.specializations},{key:"experienceLevel",label:"Experience Level",type:"checkbox",searchable:!1,defaultExpanded:!0,options:a.experienceLevels,selectedValues:h.experienceLevel},{key:"locations",label:"Location",type:"checkbox",searchable:!0,defaultExpanded:!1,options:a.locations,selectedValues:h.locations},{key:"languages",label:"Language",type:"checkbox",searchable:!0,defaultExpanded:!1,options:a.languages,selectedValues:h.languages},{key:"availability",label:"Availability",type:"checkbox",searchable:!1,defaultExpanded:!1,options:a.availability,selectedValues:h.availability},{key:"signals",label:"Preferences",type:"toggle",defaultExpanded:!0,options:[{value:"verifiedOnly",label:"Verified Only"},{value:"topRatedOnly",label:"Top Rated Only"}],selectedValues:[...h.verifiedOnly?["verifiedOnly"]:[],...h.topRatedOnly?["topRatedOnly"]:[]]}],G=h.types.length+h.specializations.length+h.experienceLevel.length+h.locations.length+h.languages.length+h.availability.length+(h.verifiedOnly?1:0)+(h.topRatedOnly?1:0)+_.length,Y=[...h.types.map(F=>{var ie;return{key:"types",label:"Type",value:F,displayValue:((ie=a.types.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.specializations.map(F=>{var ie;return{key:"specializations",label:"Spec",value:F,displayValue:((ie=a.specializations.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.experienceLevel.map(F=>{var ie;return{key:"experienceLevel",label:"Level",value:F,displayValue:((ie=a.experienceLevels.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.locations.map(F=>{var ie;return{key:"locations",label:"Location",value:F,displayValue:((ie=a.locations.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.languages.map(F=>{var ie;return{key:"languages",label:"Language",value:F,displayValue:((ie=a.languages.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.availability.map(F=>{var ie;return{key:"availability",label:"Avail",value:F,displayValue:((ie=a.availability.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.verifiedOnly?[{key:"verifiedOnly",label:"",value:"verifiedOnly",displayValue:"Verified Only"}]:[],...h.topRatedOnly?[{key:"topRatedOnly",label:"",value:"topRatedOnly",displayValue:"Top Rated Only"}]:[],..._.map(F=>({key:"tag",label:"Tag",value:F,displayValue:`#${F}`}))],z=F=>{u({...h,search:F}),c(1)},te=F=>{const ie=_.includes(F)?_.filter(ce=>ce!==F):[..._,F];u({...h,tags:ie}),c(1)},U=F=>{u({...h,tags:_.filter(ie=>ie!==F)}),c(1)},ae=(F,ie)=>{u(F==="signals"?{...h,verifiedOnly:ie.includes("verifiedOnly"),topRatedOnly:ie.includes("topRatedOnly")}:{...h,[F]:ie}),c(1)},D=(F,ie)=>{u(F==="tag"?{...h,tags:_.filter(ce=>ce!==ie)}:F==="verifiedOnly"?{...h,verifiedOnly:!1}:F==="topRatedOnly"?{...h,topRatedOnly:!1}:{...h,[F]:h[F].filter(ce=>ce!==ie)}),c(1)},B=()=>{p(),S(""),c(1)},he=F=>m(F),W=F=>{l(F)},de=F=>{u({...h,sortBy:F}),c(1)},ve=F=>{c(F),window.scrollTo({top:0,behavior:"smooth"})},K=F=>{console.log("Contact freelancer:",F)};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(RQ,{title:"iGaming Talent Marketplace",description:"Connect with top freelancers, coaches, mentors, and consultants specializing in the iGaming industry.",popularTags:BQ,selectedTags:_,onTagClick:te,onTagRemove:U}),e.jsx("div",{className:"bg-secondary/30 border-b border-border",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsx(TQ,{value:C,onChange:S,onSubmit:z,onClear:()=>{S(""),u({...h,search:""})},onFilterClick:()=>A(!0),placeholder:"Search by skill, specialization, or name...",filterCount:G})})}),e.jsx("section",{className:"py-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[Y.length>0&&e.jsx(HQ,{filters:Y,onRemove:D,onClearAll:B,showCreateAlert:!0,onCreateAlert:()=>console.log("Create alert"),className:"mb-4"}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("aside",{className:"hidden lg:block w-72 flex-shrink-0",children:e.jsx("div",{className:"sticky top-24",children:e.jsx(EQ,{title:"Filters",sections:H,onFilterChange:ae,onClearAll:B,activeFiltersCount:G,savedCount:E,savedLabel:"Saved Talent"})})}),e.jsxs("main",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"hidden lg:block",children:e.jsx(DQ,{viewMode:y,onViewModeChange:he,sortBy:P,sortOptions:$Q,onSortChange:de,itemsPerPage:r,onItemsPerPageChange:W,pagination:V,itemLabel:"talent"})}),n?e.jsx("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:e.jsx("span",{children:"Loading talent..."})}):t.length===0?e.jsx(qQ,{icon:kt,title:"No talent found",description:"Try adjusting your search or filter criteria to find more results.",actionLabel:"Clear All Filters",onAction:B}):e.jsx("div",{className:y==="grid"?"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4 mt-4":"flex flex-col gap-4 mt-4",children:t.map((F,ie)=>e.jsx(_Q,{freelancer:F,viewMode:y,isSaved:F.isSaved,isFollowing:F.isFollowing,followDisabled:f,followLoading:x,onToggleFollow:v,onFollowAction:k,saveDisabled:w,saveLoading:j,onToggleSave:M,onSaveAction:N,onContact:K,onViewProfile:()=>console.log(F.id),onEmitEvent:L,positionInList:ie+1},F.id))}),!n&&o>1&&e.jsx(zQ,{pagination:V,onPageChange:ve,className:"mt-8"})]})]})]})}),e.jsx(FQ,{isOpen:I,onClose:()=>A(!1),sections:H,onFilterChange:ae,onApply:()=>A(!1),onClearAll:B,savedCount:E,savedLabel:"Saved Talent"}),e.jsx(US,{})]})},dl=[{id:"1",name:"Marcus Chen",slug:"marcus-chen",avatar:"/placeholder.svg",title:"iGaming Compliance Consultant",tagline:"Helping operators navigate regulatory landscapes across 15+ jurisdictions",type:"consultant",specializations:["Compliance","Licensing","Responsible Gaming"],skills:["MGA Licensing","UKGC Compliance","AML/KYC","Risk Assessment","Policy Development"],experienceLevel:"Expert",yearsOfExperience:12,location:{country:"Malta",city:"Sliema",timezone:"CET"},hourlyRate:{min:150,max:250,currency:"EUR"},rating:4.9,reviewCount:127,completedProjects:89,successRate:98,responseTime:"< 2 hours",availability:"available",languages:["English","Mandarin","Maltese"],bio:"Former Head of Compliance at a major iGaming operator with extensive experience in obtaining and maintaining licenses across European and emerging markets.",highlights:["Secured 12+ gaming licenses for clients","Led compliance teams at tier-1 operators","Speaker at ICE London and SBC Summit"],certifications:["CGMA","CAMS","ICA Diploma"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-03-15",lastActive:"2024-01-20",isSaved:!1},{id:"2",name:"Sofia Rodriguez",slug:"sofia-rodriguez",avatar:"/placeholder.svg",title:"CRM & Retention Strategy Coach",tagline:"Transforming player engagement through data-driven retention strategies",type:"coach",specializations:["CRM","Player Retention","Marketing Automation"],skills:["Optimove","Salesforce","Player Segmentation","Lifecycle Marketing","Bonus Optimization"],experienceLevel:"Expert",yearsOfExperience:8,location:{country:"Spain",city:"Barcelona",timezone:"CET"},hourlyRate:{min:120,max:180,currency:"EUR"},sessionRate:{duration:"60 min",price:150,currency:"EUR"},rating:4.8,reviewCount:94,completedProjects:156,successRate:96,responseTime:"< 4 hours",availability:"available",languages:["English","Spanish","Portuguese"],bio:"I help iGaming companies maximize player lifetime value through strategic CRM implementation and team coaching.",highlights:["Increased client retention rates by 35% on average","Trained 50+ CRM professionals","Built retention programs for 3 unicorn startups"],certifications:["Optimove Certified Expert","HubSpot Marketing"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2020-08-22",lastActive:"2024-01-21",isSaved:!0},{id:"3",name:"James O'Brien",slug:"james-obrien",avatar:"/placeholder.svg",title:"Sports Trading Mentor",tagline:"Ex-Betfair trader teaching the art of odds compilation and risk management",type:"mentor",specializations:["Sports Trading","Odds Compilation","Risk Management"],skills:["Football Trading","In-Play Markets","Pricing Models","Liability Management","Market Making"],experienceLevel:"Expert",yearsOfExperience:15,location:{country:"United Kingdom",city:"London",timezone:"GMT"},hourlyRate:{min:200,max:300,currency:"GBP"},sessionRate:{duration:"90 min",price:275,currency:"GBP"},rating:5,reviewCount:52,completedProjects:38,successRate:100,responseTime:"< 24 hours",availability:"limited",languages:["English"],bio:"15 years of experience in sports trading at Betfair, Paddy Power, and as an independent consultant. I mentor aspiring traders and help sportsbooks optimize their trading operations.",highlights:["Managed £50M+ in liabilities","Trained traders at 5 major sportsbooks","Developed proprietary pricing algorithms"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2022-01-10",lastActive:"2024-01-19",isSaved:!1},{id:"4",name:"Elena Kowalski",slug:"elena-kowalski",avatar:"/placeholder.svg",title:"Freelance Game Designer",tagline:"Creating engaging slot mechanics and bonus features that players love",type:"freelancer",specializations:["Game Design","Slots","Math Models"],skills:["Slot Design","Game Math","Feature Design","Unity","Volatility Modeling"],experienceLevel:"Intermediate",yearsOfExperience:5,location:{country:"Poland",city:"Warsaw",timezone:"CET"},hourlyRate:{min:60,max:90,currency:"EUR"},rating:4.7,reviewCount:43,completedProjects:28,successRate:95,responseTime:"< 6 hours",availability:"available",languages:["English","Polish","German"],bio:"Passionate game designer specializing in slot games. I combine mathematical precision with creative mechanics to deliver games that perform.",highlights:["Designed 15+ launched slot titles","Featured game at ICE 2023","Average 4.5/5 player rating"],certifications:["Unity Certified Developer"],portfolio:[{title:"Golden Dragon Slots",description:"High-volatility Asian-themed slot with cascading reels",thumbnail:"/placeholder.svg"}],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-02-18",lastActive:"2024-01-21",isSaved:!1},{id:"5",name:"David Andersson",slug:"david-andersson",avatar:"/placeholder.svg",title:"Affiliate Marketing Consultant",tagline:"Building and scaling affiliate programs for iGaming operators",type:"consultant",specializations:["Affiliate Marketing","Partner Management","Performance Marketing"],skills:["Affiliate Programs","Income Access","NetRefer","SEO","Content Strategy"],experienceLevel:"Expert",yearsOfExperience:10,location:{country:"Sweden",city:"Stockholm",timezone:"CET"},hourlyRate:{min:130,max:200,currency:"EUR"},rating:4.8,reviewCount:76,completedProjects:67,successRate:97,responseTime:"< 3 hours",availability:"available",languages:["English","Swedish","Norwegian"],bio:"Former Affiliate Director at LeoVegas. I help operators build, optimize, and scale their affiliate programs for sustainable growth.",highlights:["Grew affiliate revenue 400% at previous role","Managed 2000+ affiliate relationships","Launched programs in 8 markets"],certifications:["Google Analytics","Google Ads"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-06-01",lastActive:"2024-01-20",isSaved:!1},{id:"6",name:"Anna Petrova",slug:"anna-petrova",avatar:"/placeholder.svg",title:"Product Management Coach",tagline:"Coaching iGaming PMs to build products players can't put down",type:"coach",specializations:["Product Management","Sportsbook","Casino"],skills:["Roadmapping","User Research","Agile","A/B Testing","OKRs"],experienceLevel:"Expert",yearsOfExperience:9,location:{country:"Estonia",city:"Tallinn",timezone:"EET"},hourlyRate:{min:100,max:160,currency:"EUR"},sessionRate:{duration:"60 min",price:120,currency:"EUR"},rating:4.9,reviewCount:88,completedProjects:112,successRate:99,responseTime:"< 4 hours",availability:"available",languages:["English","Russian","Estonian"],bio:"I help product managers in iGaming level up their skills through 1:1 coaching, workshops, and hands-on project support.",highlights:["Coached 100+ PMs across 20 companies","Former VP Product at Playtech","Built products serving 5M+ users"],certifications:["SVPG Certified","Pragmatic Marketing"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2020-11-05",lastActive:"2024-01-21",isSaved:!1},{id:"7",name:"Thomas Müller",slug:"thomas-muller",avatar:"/placeholder.svg",title:"Payment Solutions Freelancer",tagline:"Integrating payment systems and optimizing transaction flows for gaming",type:"freelancer",specializations:["Payments","Integration","Fintech"],skills:["Payment Gateways","Crypto Payments","API Integration","PCI DSS","Fraud Prevention"],experienceLevel:"Intermediate",yearsOfExperience:6,location:{country:"Germany",city:"Berlin",timezone:"CET"},hourlyRate:{min:80,max:120,currency:"EUR"},rating:4.6,reviewCount:31,completedProjects:24,successRate:92,responseTime:"< 8 hours",availability:"limited",languages:["English","German"],bio:"Specialized in payment integrations for the iGaming industry. From traditional methods to crypto, I handle the full payment stack.",highlights:["Integrated 50+ payment providers","Reduced checkout abandonment by 25%","PCI DSS implementation experience"],certifications:["PCI DSS Professional","Stripe Certified"],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-05-12",lastActive:"2024-01-18",isSaved:!1},{id:"8",name:"Maria Santos",slug:"maria-santos",avatar:"/placeholder.svg",title:"LatAm Market Entry Mentor",tagline:"Your guide to launching and scaling in Latin American markets",type:"mentor",specializations:["Market Entry","LatAm","Business Development"],skills:["Brazil Regulations","Colombia Licensing","Local Partnerships","Cultural Adaptation"],experienceLevel:"Expert",yearsOfExperience:11,location:{country:"Brazil",city:"São Paulo",timezone:"BRT"},hourlyRate:{min:100,max:150,currency:"USD"},sessionRate:{duration:"60 min",price:125,currency:"USD"},rating:4.8,reviewCount:45,completedProjects:33,successRate:94,responseTime:"< 6 hours",availability:"available",languages:["English","Portuguese","Spanish"],bio:"Helping international operators successfully enter and expand in Latin American markets. Deep expertise in Brazil, Colombia, and Argentina.",highlights:["Guided 8 operators into LatAm","Former GM at major LatAm operator","Network across 5 LatAm jurisdictions"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-09-28",lastActive:"2024-01-20",isSaved:!1},{id:"9",name:"Alex Thompson",slug:"alex-thompson",avatar:"/placeholder.svg",title:"Data Analytics Freelancer",tagline:"Turning player data into actionable insights and predictive models",type:"freelancer",specializations:["Data Analytics","BI","Player Insights"],skills:["Python","SQL","Tableau","Power BI","Machine Learning","Player Segmentation"],experienceLevel:"Intermediate",yearsOfExperience:4,location:{country:"Ireland",city:"Dublin",timezone:"GMT"},hourlyRate:{min:70,max:100,currency:"EUR"},rating:4.5,reviewCount:22,completedProjects:18,successRate:89,responseTime:"< 12 hours",availability:"available",languages:["English"],bio:"Data analyst specializing in player behavior analysis, churn prediction, and building dashboards that drive decisions.",highlights:["Built ML models predicting VIP potential","Created real-time dashboards for 3 operators","Reduced churn by 18% through insights"],certifications:["Google Data Analytics","Tableau Desktop Specialist"],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-08-01",lastActive:"2024-01-21",isSaved:!1},{id:"10",name:"Yuki Tanaka",slug:"yuki-tanaka",avatar:"/placeholder.svg",title:"Asian Markets Consultant",tagline:"Expert in Japan, Philippines, and emerging Asian gaming markets",type:"consultant",specializations:["Asian Markets","Licensing","Localization"],skills:["Japan Regulations","PAGCOR","Market Research","Cultural Localization"],experienceLevel:"Expert",yearsOfExperience:14,location:{country:"Japan",city:"Tokyo",timezone:"JST"},hourlyRate:{min:180,max:280,currency:"USD"},rating:4.9,reviewCount:38,completedProjects:29,successRate:97,responseTime:"< 8 hours",availability:"limited",languages:["English","Japanese","Mandarin"],bio:"Bridging Western operators with Asian opportunities. Deep regulatory knowledge and local networks across key Asian jurisdictions.",highlights:["Advised on 5 PAGCOR licenses","Former regulatory affairs at major Japanese gaming firm","Connected 20+ Western operators to Asian partners"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2020-04-15",lastActive:"2024-01-19",isSaved:!1}],UQ=[...new Set(dl.flatMap(t=>t.specializations))].sort();[...new Set(dl.flatMap(t=>t.skills))].sort();const GQ=[...new Set(dl.map(t=>t.location.country))].sort(),WQ=[...new Set(dl.flatMap(t=>t.languages))].sort(),ZQ=[{value:"freelancer",label:"Freelancer"},{value:"coach",label:"Coach"},{value:"mentor",label:"Mentor"},{value:"consultant",label:"Consultant"},{value:"streamer",label:"Streamer"},{value:"influencer",label:"Influencer"}],YQ=[{value:"Entry",label:"Entry Level"},{value:"Intermediate",label:"Intermediate"},{value:"Expert",label:"Expert"},{value:"Top Rated",label:"Top Rated"}],XQ=[{value:"available",label:"Available Now"},{value:"limited",label:"Limited Availability"}],jA={search:"",tags:[],sortBy:"relevance",types:[],specializations:[],experienceLevel:[],locations:[],languages:[],priceRange:null,availability:[],verifiedOnly:!1,topRatedOnly:!1},JQ=()=>{const[t,a]=b.useState(dl),[n,s]=b.useState(jA),[r,i]=b.useState(1),[o,c]=b.useState(10),[l,h]=b.useState("list"),u=b.useMemo(()=>({types:ZQ.map(L=>({...L,count:t.filter(C=>C.type===L.value).length})),specializations:UQ.map(L=>({value:L,label:L,count:t.filter(C=>C.specializations.includes(L)).length})),experienceLevels:YQ.map(L=>({...L,count:t.filter(C=>C.experienceLevel===L.value).length})),locations:GQ.map(L=>({value:L,label:L,count:t.filter(C=>C.location.country===L).length})),languages:WQ.map(L=>({value:L,label:L,count:t.filter(C=>C.languages.includes(L)).length})),availability:XQ.map(L=>({...L,count:t.filter(C=>C.availability===L.value).length}))}),[t]),p=b.useMemo(()=>{let L=[...t];if(n.search){const C=n.search.toLowerCase();L=L.filter(S=>S.name.toLowerCase().includes(C)||S.title.toLowerCase().includes(C)||S.tagline.toLowerCase().includes(C)||S.skills.some(I=>I.toLowerCase().includes(C))||S.specializations.some(I=>I.toLowerCase().includes(C)))}if(n.types.length>0&&(L=L.filter(C=>n.types.includes(C.type))),n.specializations.length>0&&(L=L.filter(C=>C.specializations.some(S=>n.specializations.includes(S)))),n.experienceLevel.length>0&&(L=L.filter(C=>n.experienceLevel.includes(C.experienceLevel))),n.locations.length>0&&(L=L.filter(C=>n.locations.includes(C.location.country))),n.languages.length>0&&(L=L.filter(C=>C.languages.some(S=>n.languages.includes(S)))),n.availability.length>0&&(L=L.filter(C=>n.availability.includes(C.availability))),n.verifiedOnly&&(L=L.filter(C=>C.isVerified)),n.topRatedOnly&&(L=L.filter(C=>C.isTopRated)),(n.tags??[]).length>0){const C=n.tags??[];L=L.filter(S=>C.some(I=>S.specializations.some(A=>A.toLowerCase().includes(I))||S.skills.some(A=>A.toLowerCase().includes(I))||S.title.toLowerCase().includes(I)))}switch(n.sortBy){case"rating":L.sort((C,S)=>S.rating-C.rating);break;case"reviews":L.sort((C,S)=>S.reviewCount-C.reviewCount);break;case"rate_asc":L.sort((C,S)=>C.hourlyRate.min-S.hourlyRate.min);break;case"rate_desc":L.sort((C,S)=>S.hourlyRate.max-C.hourlyRate.max);break;case"newest":L.sort((C,S)=>new Date(S.joinedDate).getTime()-new Date(C.joinedDate).getTime());break;default:L.sort((C,S)=>C.isFeatured!==S.isFeatured?C.isFeatured?-1:1:C.isTopRated!==S.isTopRated?C.isTopRated?-1:1:S.rating-C.rating)}return L},[n,t]),y=p.length,m=Math.ceil(y/o),f=p.slice((r-1)*o,r*o),x=L=>{s(L),i(1)},v=()=>{s(jA),i(1)},k=L=>{i(L)},w=L=>{c(L),i(1)},j=L=>{h(L)},M=(L,C)=>{a(S=>S.map(I=>I.id===L?{...I,isSaved:C}:I))},N=(L,C)=>{a(S=>S.map(I=>I.id===L?{...I,isFollowing:C}:I))};return e.jsx(AO,{freelancers:f,filterOptions:u,loading:!1,page:r,pageSize:o,totalCount:y,totalPages:m,onPageChange:k,onPageSizeChange:w,filters:n,onFiltersChange:x,onClearFilters:v,viewMode:l,onViewModeChange:j,onToggleSave:M,onToggleFollow:N})},KQ=()=>{const[t,a]=b.useState(dl[0]??null),n=(r,i)=>{a(o=>o&&o.id===r?{...o,isSaved:i}:o)},s=(r,i)=>{a(o=>o&&o.id===r?{...o,isFollowing:i}:o)};return e.jsx(IO,{freelancer:t,onToggleSave:n,onToggleFollow:s,onContact:r=>console.log("Contact freelancer:",r)})},QQ=({suggestions:t,selectedId:a,onSelect:n,onApprove:s,onReject:r,emptyState:i="No suggestions match the current filters.",title:o="Taxonomy suggestions"})=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:o})}),e.jsx(le,{children:t.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:i}):e.jsx("div",{className:"space-y-3",children:t.map(c=>e.jsx("div",{className:`rounded-lg border p-4 transition hover:bg-muted/50 ${a===c.id?"border-primary bg-muted/40":"bg-background"}`,children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(c),className:"flex-1 text-left",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:c.term}),c.status&&e.jsx(se,{variant:c.status==="approved"?"default":c.status==="rejected"?"destructive":"secondary",children:c.status})]}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Namespace: ",c.namespace||"Unassigned",e.jsx(cs,{orientation:"vertical",className:"mx-2 inline-flex h-4 align-middle"}),"Canonical: ",c.canonical||"Pending"]}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[c.scopes.map(l=>e.jsx(se,{variant:"outline",children:l},l)),typeof c.count=="number"&&e.jsxs(se,{variant:"secondary",children:[c.count," occurrences"]})]})]}),(s||r)&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[r&&e.jsx(T,{type:"button",variant:"outline",onClick:()=>r(c),children:"Reject"}),s&&e.jsx(T,{type:"button",onClick:()=>s(c),children:"Approve"})]})]})},c.id))})})]}),PO=({title:t="Examples",examples:a=[],emptyState:n="No examples were provided for this suggestion."})=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:t})}),e.jsx(le,{children:a.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:n}):e.jsx(UR,{className:"h-56 pr-4",children:e.jsx("ul",{className:"space-y-3",children:a.map((s,r)=>e.jsx("li",{className:"rounded-lg border bg-muted/40 p-3 text-sm",children:s},`${s}-${r}`))})})})]}),eee=({suggestion:t,title:a="Suggestion detail",description:n="Review the suggestion before approving or rejecting.",emptyState:s="Select a suggestion to view more information.",approveForm:r})=>t?e.jsxs("div",{className:"space-y-6",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:a}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:t.term}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.status&&e.jsx(se,{variant:t.status==="approved"?"default":t.status==="rejected"?"destructive":"secondary",children:t.status}),t.count!==void 0&&e.jsxs(se,{variant:"secondary",children:[t.count," occurrences"]}),t.source&&e.jsx(se,{variant:"outline",children:t.source})]})]}),e.jsx(cs,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Namespace"}),e.jsx("p",{className:"text-base text-foreground",children:t.namespace||"Unassigned"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Canonical term"}),e.jsx("p",{className:"text-base text-foreground",children:t.canonical||"Pending"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Scopes"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t.scopes.length===0?e.jsx("span",{className:"text-sm text-muted-foreground",children:"No scopes assigned"}):t.scopes.map(i=>e.jsx(se,{variant:"outline",children:i},i))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Last updated"}),e.jsx("p",{className:"text-base text-foreground",children:t.updatedAt||"Not available"})]})]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,360px)]",children:[e.jsx(PO,{examples:t.examples}),r&&e.jsx("div",{children:r})]})]}):e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:a})}),e.jsx(le,{children:e.jsx("p",{className:"text-sm text-muted-foreground",children:s})})]}),tee=({namespaceOptions:t,scopeOptions:a,defaultNamespace:n="",defaultCanonical:s="",defaultScopes:r=[],isSubmitting:i=!1,onApprove:o,onReject:c,approveLabel:l="Approve",rejectLabel:h="Reject"})=>{const[u,p]=b.useState(n),[y,m]=b.useState(s),[f,x]=b.useState(r);b.useEffect(()=>{p(n)},[n]),b.useEffect(()=>{m(s)},[s]),b.useEffect(()=>{x(r)},[r]);const v=b.useMemo(()=>[...a].sort(),[a]),k=j=>{x(M=>M.includes(j)?M.filter(N=>N!==j):[...M,j])},w=()=>{o({namespace:u.trim(),canonical:y.trim(),scopes:f})};return e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:"Approval details"})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"taxonomy-namespace",children:"Namespace"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(j=>e.jsx(T,{type:"button",variant:u===j?"default":"outline",size:"sm",onClick:()=>p(j),children:j},j))}),e.jsx(fe,{id:"taxonomy-namespace",value:u,onChange:j=>p(j.target.value),placeholder:"Enter namespace"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"taxonomy-canonical",children:"Canonical term"}),e.jsx(fe,{id:"taxonomy-canonical",value:y,onChange:j=>m(j.target.value),placeholder:"Normalized taxonomy value"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Scopes"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(j=>e.jsxs("label",{className:"flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:[e.jsx(Xt,{checked:f.includes(j),onCheckedChange:()=>k(j)}),e.jsx("span",{children:j})]},j))}),f.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(j=>e.jsx(se,{variant:"secondary",children:j},j))})]})]}),e.jsxs(ds,{className:"flex flex-col gap-3 sm:flex-row sm:justify-end",children:[e.jsx(T,{type:"button",variant:"outline",onClick:c,disabled:i,children:h}),e.jsx(T,{type:"button",onClick:w,disabled:i,children:l})]})]})},_O=5e3,aee=220,Ka={ADD:"ADD",UPDATE:"UPDATE",DISMISS:"DISMISS",REMOVE:"REMOVE",CLEAR:"CLEAR"},h9=[];let ec={notifications:[]},cN=0;const Va=new Map,Zl=new Map,nee=()=>(cN=(cN+1)%Number.MAX_SAFE_INTEGER,cN.toString()),RO=t=>{if(t.persistent||t.duration===0||t.duration===1/0)return;const a=t.duration??_O;Va.has(t.id)&&clearTimeout(Va.get(t.id));const n=setTimeout(()=>{SL(t.id)},a);Va.set(t.id,n)},MA=t=>{if(Zl.has(t))return;const a=setTimeout(()=>{Zl.delete(t),pd({type:Ka.REMOVE,id:t})},aee);Zl.set(t,a)},see=(t,a)=>{switch(a.type){case Ka.ADD:return{notifications:[a.notification,...t.notifications]};case Ka.UPDATE:return{notifications:t.notifications.map(n=>n.id===a.notification.id?{...n,...a.notification}:n)};case Ka.DISMISS:return{notifications:t.notifications.map(n=>a.id===void 0||n.id===a.id?{...n,status:"leaving"}:n)};case Ka.REMOVE:return a.id?{notifications:t.notifications.filter(n=>n.id!==a.id)}:{notifications:[]};case Ka.CLEAR:return{notifications:[]};default:return t}},pd=t=>{ec=see(ec,t),h9.forEach(a=>a(ec))},TO=t=>{const n={id:t.id??nee(),type:t.type??"info",title:t.title,message:t.message,content:t.content,duration:t.duration??_O,persistent:t.persistent??!1,actions:t.actions,icon:t.icon,className:t.className,titleClassName:t.titleClassName,messageClassName:t.messageClassName,role:t.role,ariaLabel:t.ariaLabel,onDismiss:t.onDismiss,status:"active",createdAt:Date.now()};return pd({type:Ka.ADD,notification:n}),RO(n),n},DO=t=>{pd({type:Ka.UPDATE,notification:t});const a=ec.notifications.find(n=>n.id===t.id);a&&RO({...a,...t})},SL=t=>{var a;if(t){const n=ec.notifications.find(s=>s.id===t);(a=n==null?void 0:n.onDismiss)==null||a.call(n,t),Va.has(t)&&(clearTimeout(Va.get(t)),Va.delete(t)),MA(t)}else ec.notifications.forEach(n=>{var s;(s=n.onDismiss)==null||s.call(n,n.id),Va.has(n.id)&&(clearTimeout(Va.get(n.id)),Va.delete(n.id)),MA(n.id)});pd({type:Ka.DISMISS,id:t})},EO=()=>{Va.forEach(t=>clearTimeout(t)),Va.clear(),Zl.forEach(t=>clearTimeout(t)),Zl.clear(),pd({type:Ka.CLEAR})},OO=()=>{const[t,a]=g.useState(ec);return g.useEffect(()=>(h9.push(a),()=>{const n=h9.indexOf(a);n>-1&&h9.splice(n,1)}),[]),{notifications:t.notifications,notify:TO,update:DO,dismiss:SL,clear:EO}},ree={success:{container:"border-emerald-200 bg-emerald-50 text-emerald-950",icon:"text-emerald-600",title:"text-emerald-950"},error:{container:"border-red-200 bg-red-50 text-red-950",icon:"text-red-600",title:"text-red-950"},warning:{container:"border-amber-200 bg-amber-50 text-amber-950",icon:"text-amber-600",title:"text-amber-950"},info:{container:"border-blue-200 bg-blue-50 text-blue-950",icon:"text-blue-600",title:"text-blue-950"},custom:{container:"border-border bg-background text-foreground",icon:"text-foreground",title:"text-foreground"}},iee={success:Qe,error:Fa,warning:Yn,info:Tc,custom:Tc},oee={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"bg-transparent text-current hover:bg-black/5"},cee=({notification:t,onDismiss:a,actionClassName:n,closeButtonClassName:s,notificationClassName:r,titleClassName:i,messageClassName:o,variantClassNames:c,iconClassNames:l,renderIcon:h})=>{const u=ree[t.type],p=iee[t.type],y=t.role??(t.type==="error"?"alert":"status"),m=y==="alert"?"assertive":"polite";return e.jsx("div",{role:y,"aria-live":m,"aria-label":t.ariaLabel,className:pe("pointer-events-auto w-full max-w-sm rounded-lg border px-4 py-3 shadow-lg transition-all duration-200",t.status==="leaving"?"opacity-0 translate-y-2":"opacity-100 translate-y-0",u.container,c==null?void 0:c[t.type],r,t.className),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:t.icon??(h?h(t.type):e.jsx(p,{className:pe("h-5 w-5",u.icon,l==null?void 0:l[t.type])}))}),e.jsxs("div",{className:"flex-1",children:[t.content?t.content:e.jsxs(e.Fragment,{children:[t.title&&e.jsx("div",{className:pe("text-sm font-semibold",u.title,i,t.titleClassName),children:t.title}),t.message&&e.jsx("div",{className:pe("text-sm opacity-90",o,t.messageClassName),children:t.message})]}),t.actions&&t.actions.length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:t.actions.map(f=>{const x=pe("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium transition-colors",oee[f.variant??"secondary"],n),v=()=>{var k;(k=f.onClick)==null||k.call(f,t.id),f.autoDismiss!==!1&&a(t.id)};return f.href?e.jsx("a",{href:f.href,target:f.target,rel:f.target==="_blank"?"noreferrer":void 0,className:x,onClick:v,"aria-label":f.ariaLabel,children:f.label},f.label):e.jsx("button",{type:"button",className:x,onClick:v,"aria-label":f.ariaLabel,children:f.label},f.label)})})]}),e.jsxs("button",{type:"button",onClick:()=>a(t.id),className:pe("rounded-md p-1 text-current/60 transition hover:text-current focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",s),"aria-label":"Dismiss notification",children:[e.jsx("span",{className:"sr-only",children:"Dismiss"}),e.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-4 w-4",children:e.jsx("path",{d:"M6 6l12 12M18 6l-12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]})})},lee={"top-left":"top-4 left-4 items-start","top-right":"top-4 right-4 items-end","top-center":"top-4 left-1/2 -translate-x-1/2 items-center","bottom-left":"bottom-4 left-4 items-start","bottom-right":"bottom-4 right-4 items-end","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center",center:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 items-center"},zO=({notifications:t,placement:a="top-right",containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,onDismiss:m,maxVisible:f})=>{const x=f?t.slice(0,f):t;return x.length===0?null:e.jsx("div",{className:pe("pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-3 px-4",lee[a],n),style:s,children:e.jsx("div",{className:pe("flex w-full flex-col gap-3",r),children:x.map(v=>e.jsx(cee,{notification:v,onDismiss:m,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y},v.id))})})},qO=g.createContext(null),dee=({children:t,placement:a,containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,maxVisible:m})=>{const f=OO();return e.jsxs(qO.Provider,{value:f,children:[t,e.jsx(zO,{notifications:f.notifications,placement:a,containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,onDismiss:f.dismiss,maxVisible:m})]})},FO=()=>{const t=g.useContext(qO),a=OO();return t||a},hee={"bottom-right":{button:"bottom-6 right-6",panel:"bottom-20 right-6"},"bottom-left":{button:"bottom-6 left-6",panel:"bottom-20 left-6"},"top-right":{button:"top-6 right-6",panel:"top-20 right-6"},"top-left":{button:"top-6 left-6",panel:"top-20 left-6"}},uee=[{label:"Profile updated",payload:{type:"success",title:"Profile updated",message:"Your changes were saved successfully."}},{label:"Login failed",payload:{type:"error",title:"Login failed",message:"We couldn't sign you in. Please try again.",actions:[{label:"Retry",variant:"primary",onClick:()=>{}}]}},{label:"Missing fields",payload:{type:"warning",title:"Missing fields",message:"Fill out the required fields before continuing."}},{label:"New message",payload:{type:"info",title:"New message",message:"You received a new message from Support."}},{label:"Backend error",payload:{type:"error",title:"Backend error",message:"We hit an issue on our side. Please report this error.",actions:[{label:"Report",variant:"secondary",onClick:()=>{}}]}}],pee=["success","error","warning","info"],mee=({position:t="bottom-right",buttonLabel:a="Test notifications",panelTitle:n="Notification tester",defaultType:s="success",defaultTitle:r="Notification title",defaultMessage:i="Notification message",allowCustomMessage:o=!0,allowCustomTitle:c=!0,allowActions:l=!0,allowDuration:h=!0,allowPersistent:u=!0,showAllTypes:p=!0,presetCases:y,onTrigger:m})=>{const{notify:f}=FO(),[x,v]=g.useState(!1),[k,w]=g.useState(s),[j,M]=g.useState(r),[N,L]=g.useState(i),[C,S]=g.useState("5000"),[I,A]=g.useState(!1),[_,P]=g.useState(!1),[E,q]=g.useState("View details"),$=y&&y.length>0?y:uee,V=p?pee:[s];g.useEffect(()=>{w(s)},[s]),g.useEffect(()=>{M(r)},[r]),g.useEffect(()=>{L(i)},[i]),g.useEffect(()=>{if(!x)return;const z=te=>{te.key==="Escape"&&v(!1)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[x]);const H=z=>{f(z),m==null||m(z)},G=z=>{z.preventDefault();const te=Number.parseInt(C,10),U=Number.isFinite(te)&&te>=0;H({type:k,title:c?j:r,message:o?N:i,duration:h&&!I&&U?te:void 0,persistent:u?I:void 0,actions:l&&_&&E?[{label:E,variant:"primary",onClick:()=>{}}]:void 0})},Y=hee[t];return e.jsxs("div",{className:"fixed z-50",children:[e.jsx("button",{type:"button",className:pe("fixed inline-flex items-center justify-center rounded-full bg-primary px-4 py-3 text-sm font-semibold text-primary-foreground shadow-lg transition hover:bg-primary/90",Y.button),onClick:()=>v(z=>!z),children:a}),x&&e.jsxs("div",{className:pe("fixed w-[320px] rounded-2xl border border-border bg-background p-4 shadow-2xl",Y.panel),children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:n}),e.jsxs("button",{type:"button",className:"rounded-md p-1 text-muted-foreground transition hover:text-foreground",onClick:()=>v(!1),children:[e.jsx("span",{className:"sr-only",children:"Close"}),e.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-4 w-4",children:e.jsx("path",{d:"M6 6l12 12M18 6l-12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),e.jsxs("form",{className:"space-y-3",onSubmit:G,children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-type",children:"Type"}),e.jsx("select",{id:"notification-type",className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:k,onChange:z=>w(z.target.value),children:V.map(z=>e.jsx("option",{value:z,children:z},z))})]}),c?e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-title",children:"Title"}),e.jsx("input",{id:"notification-title",className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:j,onChange:z=>M(z.target.value)})]}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Title: ",r]}),o?e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-message",children:"Message"}),e.jsx("textarea",{id:"notification-message",className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm",rows:3,value:N,onChange:z=>L(z.target.value)})]}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Message: ",i]}),h&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-duration",children:"Duration (ms)"}),e.jsx("input",{id:"notification-duration",type:"number",min:0,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:C,onChange:z=>S(z.target.value),disabled:u&&I})]}),u&&e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-border",checked:I,onChange:z=>A(z.target.checked)}),"Persistent"]}),l&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-border",checked:_,onChange:z=>P(z.target.checked)}),"Include action button"]}),_&&e.jsx("input",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:E,onChange:z=>q(z.target.value),placeholder:"Action label"})]}),e.jsx("button",{type:"submit",className:"w-full rounded-md bg-primary px-3 py-2 text-sm font-semibold text-primary-foreground transition hover:bg-primary/90",children:"Trigger notification"})]}),$.length>0&&e.jsxs("div",{className:"mt-4 border-t border-border pt-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-foreground",children:"Quick cases"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:$.map(z=>e.jsx("button",{type:"button",className:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition hover:bg-muted",onClick:()=>H(z.payload),children:z.label},z.label))})]})]})]})};exports.Advantages=i_;exports.Analytics=qX;exports.Banner=ad;exports.Button=T;exports.CandidateCard=YD;exports.CandidateProfile=jU;exports.Cart=v_;exports.Chatbot=g_;exports.CompanyAdminCandidates=XD;exports.CompanyAdminEditDialog=SX;exports.CompanyAdminEvents=xE;exports.CompanyAdminJobs=gE;exports.CompanyAdminNews=vE;exports.CompanyAdminOverview=kE;exports.CompanyAdminPeople=bE;exports.CompanyAdminProducts=wE;exports.CompanyAdminSettings=PE;exports.CompanyAdminShell=NX;exports.CompanyClaim=wY;exports.CompanyDetail=pY;exports.CompanyDirectory=UD;exports.CompanyDirectoryContainer=bY;exports.CompanyGroupDetail=mY;exports.ConsentBanner=KR;exports.ConsentProvider=JR;exports.CourseTypes=b_;exports.Courses=l_;exports.CoursesPage=oU;exports.Dashboard=LQ;exports.DashboardOnboardingSection=rO;exports.Destinations=d_;exports.ExamplesPanel=PO;exports.FAQ=f_;exports.FeatureJobs=sV;exports.Features=y_;exports.Footer=m$;exports.FooterLib=ZR;exports.ForEmployers=w_;exports.ForgotPassword=YX;exports.FreelancerProfile=IO;exports.FreelancerProfileContainer=KQ;exports.Freelancers=AO;exports.FreelancersContainer=JQ;exports.Gallery=x_;exports.GroupPrices=Mq;exports.Header=K$;exports.HeaderAlternative=WR;exports.Hero=h_;exports.HeroAlternative=j_;exports.HomePage=nV;exports.IgamingCareerHome=i$;exports.Input=fe;exports.JobDetailPage=J$;exports.JobListings=p$;exports.JobSearchWidget=S_;exports.Listing=W$;exports.Login=HX;exports.MobileNav=US;exports.Navbar=y$;exports.NewsPage=eU;exports.Newsletter=N_;exports.NotificationModal=QR;exports.NotificationProvider=dee;exports.NotificationTester=mee;exports.NotificationViewport=zO;exports.OnboardingChecklist=vJ;exports.OnboardingDashboard=FE;exports.OnboardingModal=tO;exports.OnboardingPopup=wK;exports.OnboardingProvider=YJ;exports.Partners=YR;exports.Register=$X;exports.RegisterV2=WX;exports.SearchableSelect=tC;exports.Services=u_;exports.ServicesNoIcons=k_;exports.ShieldedActionButton=AQ;exports.SidebarNewsletter=BS;exports.SignInPromptModal=KX;exports.SlidingSummary=Cq;exports.TagBadge=sS;exports.TagPicker=Oz;exports.TaxonomyApproveForm=tee;exports.TaxonomySuggestionDetail=eee;exports.TaxonomySuggestionTable=QQ;exports.Testimonials=p_;exports.TrustSignals=C_;exports.UserIdentityMenu=ON;exports.ValueProposition=M_;exports.VerificationBanner=QX;exports.Videos=m_;exports.calculateOnboardingProgress=KN;exports.canEditSection=LX;exports.clearNotifications=EO;exports.dismiss=SL;exports.getEnabledPermissions=IX;exports.mapBackendFlagsToSteps=aO;exports.notify=TO;exports.updateNotification=DO;exports.useConsent=HS;exports.useNotification=FO;exports.useOnboardingContext=sO;
|
|
7857
|
+
`).trim())??"",w=k.length>xA,j=y?k:w?`${k.slice(0,xA)}…`:k;return e.jsxs(It,{open:r,onOpenChange:i,children:[e.jsx(cT,{asChild:!0,children:e.jsxs(T,{children:[e.jsx(Zn,{className:"h-4 w-4 mr-2"}),"Upload CV"]})}),e.jsxs(Ct,{className:"sm:max-w-2xl",children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Upload your CV"}),e.jsx(Ra,{children:"Add a PDF so we can extract key details and keep it ready for job applications."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(fe,{type:"file",accept:"application/pdf",onChange:x}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Accepted format: PDF only. Text extraction should be handled by the host application if needed."})]}),u&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u}),o&&f&&e.jsxs("div",{className:"rounded-md border border-muted p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(as,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:f.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.size," • Updated ",f.lastModified]})]})]}),e.jsx(se,{variant:"secondary",children:"Stored"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[l&&e.jsx(T,{variant:"outline",size:"sm",asChild:!0,children:e.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:"View PDF"})}),e.jsxs(T,{variant:"destructive",size:"sm",onClick:v,children:[e.jsx(Wo,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]}),e.jsxs("div",{className:"rounded-md border border-muted p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"font-medium",children:"Extracted preview"}),n==="parsing"&&e.jsx(se,{variant:"outline",children:"Parsing..."})]}),n==="error"?e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:s||"Text preview is unavailable for this file."}):j?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-2 max-h-48 overflow-y-auto rounded-md border bg-muted/30 p-2",children:e.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:j})}),w&&e.jsx(T,{variant:"link",size:"sm",className:"px-0",onClick:()=>m(M=>!M),children:y?"Show less":"Show full text"})]}):e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Upload a PDF to preview extracted text from the host app."})]})]}),e.jsx(Qt,{children:e.jsx(T,{variant:"outline",onClick:()=>i(!1),children:"Close"})})]})]})}function TK({savedJobs:t,applications:a,recommendedJobs:n,onApply:s,onRemove:r,onUploadCV:i,cvPreviewText:o,cvPreviewStatus:c,cvPreviewErrorMessage:l,onSetAlert:h,onUpdateProfile:u}){const p=w=>({savedJobs:w.saved,recommendedJobs:w.recommended,applications:w.applications}),[y,m]=b.useState({saved:t||[],recommended:n||[],applications:a||[]});b.useEffect(()=>{m({saved:t||[],recommended:n||[],applications:a||[]})},[t,n,a]);const f=w=>{m(j=>{if(j.saved.some(L=>L.id===w.id))return j;const N={...j,saved:[...j.saved,w]};return u==null||u({type:"jobs",payload:p(N)}),N})},x=w=>{m(j=>{const M={...j,saved:j.saved.filter(N=>N.id!==w)};return u==null||u({type:"jobs",payload:p(M)}),M})},v=w=>{m(j=>{const M={...j,recommended:j.recommended.filter(N=>N.id!==w)};return u==null||u({type:"jobs",payload:p(M)}),M})},k=w=>{const j=y.recommended.find(M=>M.id===w);j&&(m(M=>{const N={...M,applications:[...M.applications,{...j,status:"Applied",appliedDate:new Date().toLocaleDateString()}]};return u==null||u({type:"jobs",payload:p(N)}),N}),s(w))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Jobs"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your job search"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{variant:"outline",onClick:h,children:"Set Job Alerts"}),e.jsx(RK,{onCVChange:i,previewText:o,previewStatus:c,previewErrorMessage:l})]})]}),e.jsxs(yn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-3",children:[e.jsxs(Fe,{value:"recommended",children:["Recommended (",y.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",y.saved.length,")"]}),e.jsxs(Fe,{value:"applications",children:[e.jsx(at,{className:"h-4 w-4 mr-2"}),"Applications (",y.applications.length,")"]})]}),e.jsx(Ie,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.recommended.map(w=>e.jsx(d9,{job:w,view:"recommended",isSaved:y.saved.some(j=>j.id===w.id),onApply:k,onSave:f,onRemove:v},w.id))})}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.saved.length===0?e.jsx(oe,{children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved jobs yet"}),e.jsx(T,{variant:"link",className:"mt-2",children:"Browse Jobs"})]})}):y.saved.map(w=>e.jsx(d9,{job:w,view:"saved",onRemove:x},w.id))})}),e.jsx(Ie,{value:"applications",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4",children:y.applications.length===0?e.jsx(oe,{children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(at,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No applications yet"}),e.jsx(T,{variant:"link",className:"mt-2",children:"Start Applying"})]})}):y.applications.map(w=>e.jsx(d9,{job:w,view:"applications",onViewApplication:()=>{}},w.id))})})]})]})}function DK({enrolledCourses:t,savedCourses:a,recommendedCourses:n,certificates:s,onEnroll:r,onContinue:i,onExplore:o,onSave:c,onRemoveSaved:l,onRemoveRecommended:h}){const[u,p]=b.useState({enrolled:t||[],recommended:n||[],saved:a||[]});b.useEffect(()=>{p({enrolled:t||[],recommended:n||[],saved:a||[]})},[t,n,a]);const y=k=>r(k),m=k=>{p(w=>{if(w.saved.some(N=>N.id===k.id))return w;const M={...w,saved:[...w.saved,{...k,saved:!0}],recommended:w.recommended.map(N=>N.id===k.id?{...N,saved:!0}:N)};return c==null||c(k.id),M})},f=k=>{p(w=>{const j={...w,saved:w.saved.filter(M=>M.id!==k),recommended:w.recommended.map(M=>M.id===k?{...M,saved:!1}:M)};return l==null||l(k),j})},x=k=>{p(w=>{const j={...w,recommended:w.recommended.filter(M=>M.id!==k)};return h==null||h(k),j})},v=({course:k,view:w})=>{const j=u.saved.some(M=>M.id===k.id);return e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(xe,{className:"text-lg",children:k.title}),e.jsx(Te,{children:k.provider})]}),e.jsx(se,{variant:"outline",children:k.level})]})}),e.jsx(le,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:k.duration}),k.certificate&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Bt,{className:"h-4 w-4"}),"Certificate"]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:k.tags.map(M=>e.jsx(se,{variant:"secondary",children:M},M))}),w==="enrolled"&&k.progress!==void 0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Progress"}),e.jsxs("span",{className:"font-medium",children:[k.progress,"%"]})]}),e.jsx(bc,{value:k.progress})]}),w==="recommended"&&k.reason&&e.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["💡 ",k.reason]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[w==="enrolled"&&e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>i(k.id),children:"Continue Learning"}),w==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>y(k.id),children:"Enroll Now"}),e.jsx(T,{variant:j?"secondary":"outline",className:"sm:w-auto w-full",size:"sm",disabled:j,onClick:()=>m(k),children:j?"Saved":"Save Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>x(k.id),children:"Remove"}),!h&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove not available yet"})]}),w==="saved"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",size:"sm",onClick:()=>y(k.id),children:"Start Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>f(k.id),children:"Remove Saved"}),!l&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove from saved not available yet"})]})]})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Courses"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Advance your iGaming career"})]}),e.jsx(T,{onClick:o,children:"Explore All Courses"})]}),e.jsxs(yn,{defaultValue:"enrolled",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-4",children:[e.jsxs(Fe,{value:"enrolled",children:[e.jsx(ia,{className:"h-4 w-4 mr-2"}),"Enrolled (",u.enrolled.length,")"]}),e.jsxs(Fe,{value:"recommended",children:[e.jsx(ca,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]}),e.jsxs(Fe,{value:"certificates",children:[e.jsx(Bt,{className:"h-4 w-4 mr-2"}),"Certificates (",s.length,")"]})]}),e.jsx(Ie,{value:"enrolled",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.enrolled.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(ia,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No enrolled courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"})]})}):u.enrolled.map(k=>e.jsx(v,{course:k,view:"enrolled"},k.id))})}),e.jsx(Ie,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(k=>e.jsx(v,{course:k,view:"recommended"},k.id))})}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"}),!c&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-2",children:"Saving courses not available yet"})]})}):u.saved.map(k=>e.jsx(v,{course:k,view:"saved"},k.id))})}),e.jsx(Ie,{value:"certificates",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:s.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(Bt,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No certificates yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Complete courses to earn certificates"})]})}):s.map(k=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10",children:e.jsx(Bt,{className:"h-6 w-6 text-accent"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(xe,{className:"text-base",children:k.title}),e.jsx(Te,{children:k.issuer}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Issued: ",k.date]})]})]})}),e.jsx(le,{children:e.jsx(T,{variant:"outline",size:"sm",className:"w-full",children:"Download Certificate"})})]},k.id))})})]})]})}function EK({recommendedNews:t,savedArticles:a,categories:n,selectedCategory:s,onRead:r,onSave:i,onRemoveSaved:o,onRemoveRecommended:c,onCategoryChange:l,onManagePreferences:h}){const[u,p]=b.useState({recommended:t||[],saved:a||[]});b.useEffect(()=>{p({recommended:t||[],saved:a||[]})},[t,a]);const y=x=>{p(v=>{if(v.saved.some(j=>j.id===x.id))return v;const w={recommended:v.recommended.map(j=>j.id===x.id?{...j,saved:!0}:j),saved:[...v.saved,{...x,saved:!0}]};return i(x.id),w})},m=x=>{p(v=>{const k={recommended:v.recommended.map(w=>w.id===x?{...w,saved:!1}:w),saved:v.saved.filter(w=>w.id!==x)};return o==null||o(x),k})},f=x=>{p(v=>{const k={...v,recommended:v.recommended.filter(w=>w.id!==x)};return c==null||c(x),k})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Stay updated with iGaming industry"})]}),e.jsxs(T,{variant:"outline",onClick:h,children:[e.jsx(nn,{className:"h-4 w-4 mr-2"}),"Preferences"]})]}),e.jsxs(yn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(fn,{children:[e.jsxs(Fe,{value:"recommended",children:[e.jsx(on,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Fe,{value:"saved",children:[e.jsx(va,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]})]}),e.jsxs(Ie,{value:"recommended",className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.jsx(T,{variant:s==="all"?"default":"outline",size:"sm",onClick:()=>l("all"),children:"All"}),n.map(x=>e.jsx(T,{variant:s===x?"default":"outline",size:"sm",onClick:()=>l(x),children:x},x))]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(x=>e.jsx(YN,{article:x,view:"recommended",isSaved:u.saved.some(v=>v.id===x.id),onRead:r,onSave:y,onRemove:f},x.id))})]}),e.jsx(Ie,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(oe,{className:"md:col-span-2",children:e.jsxs(le,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(va,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved articles yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:h,children:"Browse News"})]})}):u.saved.map(x=>e.jsx(YN,{article:x,view:"saved",onRead:r,onRemove:m},x.id))})})]})]})}const OK=["Malta","Remote","Gibraltar","Sweden","UK","Cyprus","Isle of Man","Curacao"],zK=["Casino Ops","Sportsbook","Compliance","Affiliate","Game Dev","Live Casino","Payments","UI/UX","Marketing","Legal","HR","Data Analytics"],qK=["Compliance","KYC/AML","Regulatory Consulting","Risk Management","Product Management","Game Development","Unity","C#","Affiliate Management","iGaming Platforms","Payment Integration"];function Rn(t,a,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return a==null?void 0:a(r)}}function gA(t,a){if(typeof t=="function")return t(a);t!=null&&(t.current=a)}function FK(...t){return a=>{let n=!1;const s=t.map(r=>{const i=gA(r,a);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():gA(t[r],null)}}}}function cc(...t){return g.useCallback(FK(...t),t)}function vC(t,a=[]){let n=[];function s(i,o){const c=g.createContext(o),l=n.length;n=[...n,o];const h=p=>{var k;const{scope:y,children:m,...f}=p,x=((k=y==null?void 0:y[t])==null?void 0:k[l])||c,v=g.useMemo(()=>f,Object.values(f));return e.jsx(x.Provider,{value:v,children:m})};h.displayName=i+"Provider";function u(p,y){var x;const m=((x=y==null?void 0:y[t])==null?void 0:x[l])||c,f=g.useContext(m);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[h,u]}const r=()=>{const i=n.map(o=>g.createContext(o));return function(c){const l=(c==null?void 0:c[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...c,[t]:l}}),[c,l])}};return r.scopeName=t,[s,VK(r,...a)]}function VK(...t){const a=t[0];if(t.length===1)return a;const n=()=>{const s=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((c,{useScope:l,scopeName:h})=>{const p=l(i)[`__scope${h}`];return{...c,...p}},{});return g.useMemo(()=>({[`__scope${a.scopeName}`]:o}),[o])}};return n.scopeName=a.scopeName,n}var HK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ll=HK.reduce((t,a)=>{const n=lt(`Primitive.${a}`),s=g.forwardRef((r,i)=>{const{asChild:o,...c}=r,l=o?n:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(l,{...c,ref:i})});return s.displayName=`Primitive.${a}`,{...t,[a]:s}},{});function BK(t){const a=t+"CollectionProvider",[n,s]=vC(a),[r,i]=n(a,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:v,children:k}=x,w=b.useRef(null),j=b.useRef(new Map).current;return e.jsx(r,{scope:v,itemMap:j,collectionRef:w,children:k})};o.displayName=a;const c=t+"CollectionSlot",l=lt(c),h=b.forwardRef((x,v)=>{const{scope:k,children:w}=x,j=i(c,k),M=cc(v,j.collectionRef);return e.jsx(l,{ref:M,children:w})});h.displayName=c;const u=t+"CollectionItemSlot",p="data-radix-collection-item",y=lt(u),m=b.forwardRef((x,v)=>{const{scope:k,children:w,...j}=x,M=b.useRef(null),N=cc(v,M),L=i(u,k);return b.useEffect(()=>(L.itemMap.set(M,{ref:M,...j}),()=>void L.itemMap.delete(M))),e.jsx(y,{[p]:"",ref:N,children:w})});m.displayName=u;function f(x){const v=i(t+"CollectionConsumer",x);return b.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const j=Array.from(w.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((L,C)=>j.indexOf(L.ref.current)-j.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:h,ItemSlot:m},f,s]}var _9=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},$K=g[" useId ".trim().toString()]||(()=>{}),UK=0;function GK(t){const[a,n]=g.useState($K());return _9(()=>{n(s=>s??String(UK++))},[t]),a?`radix-${a}`:""}function WK(t){const a=g.useRef(t);return g.useEffect(()=>{a.current=t}),g.useMemo(()=>(...n)=>{var s;return(s=a.current)==null?void 0:s.call(a,...n)},[])}var ZK=g[" useInsertionEffect ".trim().toString()]||_9;function iO({prop:t,defaultProp:a,onChange:n=()=>{},caller:s}){const[r,i,o]=YK({defaultProp:a,onChange:n}),c=t!==void 0,l=c?t:r;{const u=g.useRef(t!==void 0);g.useEffect(()=>{const p=u.current;p!==c&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,s])}const h=g.useCallback(u=>{var p;if(c){const y=XK(u)?u(t):u;y!==t&&((p=o.current)==null||p.call(o,y))}else i(u)},[c,t,i,o]);return[l,h]}function YK({defaultProp:t,onChange:a}){const[n,s]=g.useState(t),r=g.useRef(n),i=g.useRef(a);return ZK(()=>{i.current=a},[a]),g.useEffect(()=>{var o;r.current!==n&&((o=i.current)==null||o.call(i,n),r.current=n)},[n,r]),[n,s,i]}function XK(t){return typeof t=="function"}var JK=g.createContext(void 0);function oO(t){const a=g.useContext(JK);return t||a||"ltr"}var oN="rovingFocusGroup.onEntryFocus",KK={bubbles:!1,cancelable:!0},ud="RovingFocusGroup",[eS,cO,QK]=BK(ud),[eQ,lO]=vC(ud,[QK]),[tQ,aQ]=eQ(ud),dO=g.forwardRef((t,a)=>e.jsx(eS.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(eS.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(nQ,{...t,ref:a})})}));dO.displayName=ud;var nQ=g.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:r=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:h,preventScrollOnEntryFocus:u=!1,...p}=t,y=g.useRef(null),m=cc(a,y),f=oO(i),[x,v]=iO({prop:o,defaultProp:c??null,onChange:l,caller:ud}),[k,w]=g.useState(!1),j=WK(h),M=cO(n),N=g.useRef(!1),[L,C]=g.useState(0);return g.useEffect(()=>{const S=y.current;if(S)return S.addEventListener(oN,j),()=>S.removeEventListener(oN,j)},[j]),e.jsx(tQ,{scope:n,orientation:s,dir:f,loop:r,currentTabStopId:x,onItemFocus:g.useCallback(S=>v(S),[v]),onItemShiftTab:g.useCallback(()=>w(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(S=>S+1),[]),onFocusableItemRemove:g.useCallback(()=>C(S=>S-1),[]),children:e.jsx(ll.div,{tabIndex:k||L===0?-1:0,"data-orientation":s,...p,ref:m,style:{outline:"none",...t.style},onMouseDown:Rn(t.onMouseDown,()=>{N.current=!0}),onFocus:Rn(t.onFocus,S=>{const I=!N.current;if(S.target===S.currentTarget&&I&&!k){const A=new CustomEvent(oN,KK);if(S.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=M().filter(V=>V.focusable),P=_.find(V=>V.active),E=_.find(V=>V.id===x),$=[P,E,..._].filter(Boolean).map(V=>V.ref.current);pO($,u)}}N.current=!1}),onBlur:Rn(t.onBlur,()=>w(!1))})})}),hO="RovingFocusGroupItem",uO=g.forwardRef((t,a)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:r=!1,tabStopId:i,children:o,...c}=t,l=GK(),h=i||l,u=aQ(hO,n),p=u.currentTabStopId===h,y=cO(n),{onFocusableItemAdd:m,onFocusableItemRemove:f,currentTabStopId:x}=u;return g.useEffect(()=>{if(s)return m(),()=>f()},[s,m,f]),e.jsx(eS.ItemSlot,{scope:n,id:h,focusable:s,active:r,children:e.jsx(ll.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...c,ref:a,onMouseDown:Rn(t.onMouseDown,v=>{s?u.onItemFocus(h):v.preventDefault()}),onFocus:Rn(t.onFocus,()=>u.onItemFocus(h)),onKeyDown:Rn(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const k=iQ(v,u.orientation,u.dir);if(k!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let j=y().filter(M=>M.focusable).map(M=>M.ref.current);if(k==="last")j.reverse();else if(k==="prev"||k==="next"){k==="prev"&&j.reverse();const M=j.indexOf(v.currentTarget);j=u.loop?oQ(j,M+1):j.slice(M+1)}setTimeout(()=>pO(j))}}),children:typeof o=="function"?o({isCurrentTabStop:p,hasTabStop:x!=null}):o})})});uO.displayName=hO;var sQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rQ(t,a){return a!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function iQ(t,a,n){const s=rQ(t.key,n);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return sQ[s]}function pO(t,a=!1){const n=document.activeElement;for(const s of t)if(s===n||(s.focus({preventScroll:a}),document.activeElement!==n))return}function oQ(t,a){return t.map((n,s)=>t[(a+s)%t.length])}var cQ=dO,lQ=uO;function dQ(t,a){return g.useReducer((n,s)=>a[n][s]??n,t)}var mO=t=>{const{present:a,children:n}=t,s=hQ(a),r=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),i=cc(s.ref,uQ(r));return typeof n=="function"||s.isPresent?g.cloneElement(r,{ref:i}):null};mO.displayName="Presence";function hQ(t){const[a,n]=g.useState(),s=g.useRef(null),r=g.useRef(t),i=g.useRef("none"),o=t?"mounted":"unmounted",[c,l]=dQ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const h=Td(s.current);i.current=c==="mounted"?h:"none"},[c]),_9(()=>{const h=s.current,u=r.current;if(u!==t){const y=i.current,m=Td(h);t?l("MOUNT"):m==="none"||(h==null?void 0:h.display)==="none"?l("UNMOUNT"):l(u&&y!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,l]),_9(()=>{if(a){let h;const u=a.ownerDocument.defaultView??window,p=m=>{const x=Td(s.current).includes(CSS.escape(m.animationName));if(m.target===a&&x&&(l("ANIMATION_END"),!r.current)){const v=a.style.animationFillMode;a.style.animationFillMode="forwards",h=u.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=v)})}},y=m=>{m.target===a&&(i.current=Td(s.current))};return a.addEventListener("animationstart",y),a.addEventListener("animationcancel",p),a.addEventListener("animationend",p),()=>{u.clearTimeout(h),a.removeEventListener("animationstart",y),a.removeEventListener("animationcancel",p),a.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[a,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:g.useCallback(h=>{s.current=h?getComputedStyle(h):null,n(h)},[])}}function Td(t){return(t==null?void 0:t.animationName)||"none"}function uQ(t){var s,r;let a=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?t.ref:(a=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var NL="Radio",[pQ,yO]=vC(NL),[mQ,yQ]=pQ(NL),fO=g.forwardRef((t,a)=>{const{__scopeRadio:n,name:s,checked:r=!1,required:i,disabled:o,value:c="on",onCheck:l,form:h,...u}=t,[p,y]=g.useState(null),m=cc(a,v=>y(v)),f=g.useRef(!1),x=p?h||!!p.closest("form"):!0;return e.jsxs(mQ,{scope:n,checked:r,disabled:o,children:[e.jsx(ll.button,{type:"button",role:"radio","aria-checked":r,"data-state":kO(r),"data-disabled":o?"":void 0,disabled:o,value:c,...u,ref:m,onClick:Rn(t.onClick,v=>{r||l==null||l(),x&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})}),x&&e.jsx(vO,{control:p,bubbles:!f.current,name:s,value:c,checked:r,required:i,disabled:o,form:h,style:{transform:"translateX(-100%)"}})]})});fO.displayName=NL;var xO="RadioIndicator",gO=g.forwardRef((t,a)=>{const{__scopeRadio:n,forceMount:s,...r}=t,i=yQ(xO,n);return e.jsx(mO,{present:s||i.checked,children:e.jsx(ll.span,{"data-state":kO(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:a})})});gO.displayName=xO;var fQ="RadioBubbleInput",vO=g.forwardRef(({__scopeRadio:t,control:a,checked:n,bubbles:s=!0,...r},i)=>{const o=g.useRef(null),c=cc(o,i),l=rC(n),h=iC(a);return g.useEffect(()=>{const u=o.current;if(!u)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(l!==n&&m){const f=new Event("click",{bubbles:s});m.call(u,n),u.dispatchEvent(f)}},[l,n,s]),e.jsx(ll.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vO.displayName=fQ;function kO(t){return t?"checked":"unchecked"}var xQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],kC="RadioGroup",[gQ,Cee]=vC(kC,[lO,yO]),bO=lO(),wO=yO(),[vQ,kQ]=gQ(kC),jO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,name:s,defaultValue:r,value:i,required:o=!1,disabled:c=!1,orientation:l,dir:h,loop:u=!0,onValueChange:p,...y}=t,m=bO(n),f=oO(h),[x,v]=iO({prop:i,defaultProp:r??null,onChange:p,caller:kC});return e.jsx(vQ,{scope:n,name:s,required:o,disabled:c,value:x,onValueChange:v,children:e.jsx(cQ,{asChild:!0,...m,orientation:l,dir:f,loop:u,children:e.jsx(ll.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":c?"":void 0,dir:f,...y,ref:a})})})});jO.displayName=kC;var MO="RadioGroupItem",CO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,disabled:s,...r}=t,i=kQ(MO,n),o=i.disabled||s,c=bO(n),l=wO(n),h=g.useRef(null),u=cc(a,h),p=i.value===r.value,y=g.useRef(!1);return g.useEffect(()=>{const m=x=>{xQ.includes(x.key)&&(y.current=!0)},f=()=>y.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",f),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",f)}},[]),e.jsx(lQ,{asChild:!0,...c,focusable:!o,active:p,children:e.jsx(fO,{disabled:o,required:i.required,checked:p,...l,...r,name:i.name,ref:u,onCheck:()=>i.onValueChange(r.value),onKeyDown:Rn(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:Rn(r.onFocus,()=>{var m;y.current&&((m=h.current)==null||m.click())})})})});CO.displayName=MO;var bQ="RadioGroupIndicator",NO=g.forwardRef((t,a)=>{const{__scopeRadioGroup:n,...s}=t,r=wO(n);return e.jsx(gO,{...r,...s,ref:a})});NO.displayName=bQ;var SO=jO,LO=CO,wQ=NO;const tS=g.forwardRef(({className:t,...a},n)=>e.jsx(SO,{className:pe("grid gap-2",t),...a,ref:n}));tS.displayName=SO.displayName;const Nc=g.forwardRef(({className:t,...a},n)=>e.jsx(LO,{ref:n,className:pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e.jsx(wQ,{className:"flex items-center justify-center",children:e.jsx(es,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Nc.displayName=LO.displayName;const jQ=t=>{let a=0;return t.headline&&(a+=20),t.bio&&t.bio.length>=100&&(a+=20),t.primarySkills&&t.primarySkills.length>=3&&(a+=20),(t.hourlyRateMin||t.hourlyRateMax)&&(a+=15),t.availability&&(a+=10),t.portfolioItems&&t.portfolioItems.length>0&&(a+=15),Math.min(100,a)};function MQ({open:t,onOpenChange:a,isCandidateActive:n=!0,onComplete:s,onSaveDraft:r}){var I,A,_;const[i,o]=b.useState(1),[c,l]=b.useState({appearanceMode:n?"both_freelance_fulltime":"freelance_only",preferredLocations:[],verticals:[],headline:"",bio:"",primarySkills:[],availability:"part_time",portfolioItems:[]}),[h,u]=b.useState(""),[p,y]=b.useState(""),[m,f]=b.useState(""),[x,v]=b.useState(""),k=jQ(c),w=(((I=c.verticals)==null?void 0:I.length)??0)>=3,j=b.useCallback((P,E)=>{l(q=>{const $=q[P]||[],V=$.includes(E);return{...q,[P]:V?$.filter(H=>H!==E):[...$,E]}})},[]),M=b.useCallback((P,E,q)=>{E.trim()&&(l($=>({...$,[P]:[...$[P]||[],E.trim()]})),q(""))},[]),N=b.useCallback(()=>{if(!x.trim())return;const P={id:`link-${Date.now()}`,type:"link",title:x,url:x};l(E=>({...E,portfolioItems:[...E.portfolioItems||[],P]})),v("")},[x]),L=b.useCallback(P=>{l(E=>({...E,portfolioItems:(E.portfolioItems||[]).filter(q=>q.id!==P)}))},[]),C=()=>{const P=new Date().toISOString(),E={appearanceMode:c.appearanceMode||"both_freelance_fulltime",preferredLocations:c.preferredLocations||[],verticals:c.verticals||[],headline:c.headline||"",bio:c.bio||"",primarySkills:c.primarySkills||[],hourlyRateMin:c.hourlyRateMin,hourlyRateMax:c.hourlyRateMax,availability:c.availability||"part_time",portfolioItems:c.portfolioItems||[],isPublic:!0,isDraft:!1,profileStrength:k,createdAt:P,updatedAt:P};s(E),a(!1)},S=()=>{r({...c,isDraft:!0,isPublic:!1}),a(!1)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsx(Ct,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:i===1?e.jsxs(e.Fragment,{children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Set Up as Freelancer"}),e.jsx(Ra,{children:"Great! Let's make you discoverable."})]}),e.jsxs("div",{className:"space-y-6 py-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs(Z,{className:"text-sm font-medium",children:["How do you want to appear? ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsxs(tS,{value:c.appearanceMode,onValueChange:P=>l(E=>({...E,appearanceMode:P})),children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"freelance_only",id:"freelance_only"}),e.jsx(Z,{htmlFor:"freelance_only",className:"font-normal",children:"Freelance gigs only"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"both_freelance_fulltime",id:"both"}),e.jsx(Z,{htmlFor:"both",className:"font-normal",children:"Both freelance + open to full-time jobs"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(Z,{className:"text-sm font-medium",children:"Preferred locations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:OK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.preferredLocations)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("preferredLocations",P),children:[P,((q=c.preferredLocations)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Add location",value:h,onChange:P=>u(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("preferredLocations",h,u),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("preferredLocations",h,u),children:e.jsx($t,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(Z,{className:"text-sm font-medium",children:["Your main freelance verticals (pick 3–5) ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:zK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.verticals)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("verticals",P),children:[P,((q=c.verticals)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Custom vertical",value:p,onChange:P=>y(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("verticals",p,y),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("verticals",p,y),children:e.jsx($t,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Selected: ",((A=c.verticals)==null?void 0:A.length)??0,"/5"]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(T,{onClick:()=>o(2),disabled:!w,children:["Continue",e.jsx(Ln,{className:"ml-2 h-4 w-4"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ft,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(pt,{children:"Freelancer Profile Setup"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(bc,{value:k,className:"flex-1 h-2"}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:[k,"% complete"]})]})]})}),e.jsxs("div",{className:"space-y-5 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(Z,{htmlFor:"headline",children:["Headline ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(fe,{id:"headline",placeholder:'e.g. "iGaming AML Specialist | Ex-MGA Auditor"',value:c.headline,onChange:P=>l(E=>({...E,headline:P.target.value}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"bio",children:"Short Bio (150–300 chars)"}),e.jsx(ea,{id:"bio",placeholder:"Tell clients what you do best...",value:c.bio,onChange:P=>l(E=>({...E,bio:P.target.value})),maxLength:300,rows:3}),e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[((_=c.bio)==null?void 0:_.length)??0,"/300"]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Primary Skills"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:qK.map(P=>{var E,q;return e.jsxs(se,{variant:(E=c.primarySkills)!=null&&E.includes(P)?"default":"outline",className:"cursor-pointer",onClick:()=>j("primarySkills",P),children:[P,((q=c.primarySkills)==null?void 0:q.includes(P))&&e.jsx(tt,{className:"ml-1 h-3 w-3"})]},P)})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(fe,{placeholder:"+ Add skill",value:m,onChange:P=>f(P.target.value),onKeyDown:P=>P.key==="Enter"&&M("primarySkills",m,f),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:()=>M("primarySkills",m,f),children:e.jsx($t,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Hourly Rate (optional)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"€"}),e.jsx(fe,{type:"number",placeholder:"Min",className:"w-24",value:c.hourlyRateMin??"",onChange:P=>l(E=>({...E,hourlyRateMin:Number(P.target.value)||void 0}))}),e.jsx("span",{className:"text-muted-foreground",children:"–"}),e.jsx(fe,{type:"number",placeholder:"Max",className:"w-24",value:c.hourlyRateMax??"",onChange:P=>l(E=>({...E,hourlyRateMax:Number(P.target.value)||void 0}))}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"/hr"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Typical range: €50–€150 for iGaming experts"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Availability"}),e.jsxs(tS,{value:c.availability,onValueChange:P=>l(E=>({...E,availability:P})),className:"flex flex-wrap gap-4",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"full_time",id:"avail_full"}),e.jsx(Z,{htmlFor:"avail_full",className:"font-normal",children:"Full-time freelance"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"part_time",id:"avail_part"}),e.jsx(Z,{htmlFor:"avail_part",className:"font-normal",children:"Part-time"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Nc,{value:"project_based",id:"avail_project"}),e.jsx(Z,{htmlFor:"avail_project",className:"font-normal",children:"Project-based only"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Portfolio / Proof"}),e.jsxs("div",{className:"border-2 border-dashed rounded-lg p-4 text-center",children:[e.jsx(Hc,{className:"mx-auto h-8 w-8 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Add PDF, images, case studies, GitHub links..."})]}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(fe,{placeholder:"Paste URL to portfolio item",value:x,onChange:P=>v(P.target.value),onKeyDown:P=>P.key==="Enter"&&N(),className:"flex-1"}),e.jsx(T,{variant:"outline",size:"icon",onClick:N,children:e.jsx($t,{className:"h-4 w-4"})})]}),c.portfolioItems&&c.portfolioItems.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.portfolioItems.map(P=>e.jsxs(se,{variant:"secondary",className:"pr-1",children:[P.title.length>30?`${P.title.slice(0,30)}...`:P.title,e.jsx("button",{onClick:()=>L(P.id),className:"ml-1 hover:text-destructive",children:e.jsx(tt,{className:"h-3 w-3"})})]},P.id))})]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-2",children:[e.jsx(T,{variant:"ghost",onClick:()=>o(1),children:"Back"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(T,{variant:"link",onClick:S,className:"text-muted-foreground",children:"Save as Draft"}),e.jsx(T,{onClick:C,disabled:!c.headline,className:"bg-orange-500 hover:bg-orange-600 text-white",children:"Save & Go Public"})]})]})]})})})}const CQ={title:"Change Password",description:"Submit the new credentials to emit an update-password event.",currentPasswordLabel:"Current password",newPasswordLabel:"New password",confirmPasswordLabel:"Confirm new password",mismatchError:"New password and confirmation do not match.",cancelButton:"Cancel",submitButton:"Update Password"},bn={headerTitle:"Settings",headerDescription:"Manage your account preferences",tabs:{notifications:"Notifications",account:"Account",subscription:"Subscription",connected:"Connected"},notifications:{title:"Notification Preferences",description:"Choose how you want to be notified",email:{label:"Email Notifications",description:"Receive updates via email"},push:{label:"Push Notifications",description:"Browser push notifications"},weekly:{label:"Weekly Digest",description:"Summary of activities"},contentAlertsTitle:"Content Alerts",jobAlertsLabel:"Job Alerts",courseUpdatesLabel:"Course Updates",newsDigestLabel:"News Digest"},account:{passwordTitle:"Password",passwordDescription:"Change your account password",changePasswordButton:"Change Password",deleteTitle:"Delete Account",deleteDescription:"Permanently delete your account and all data",deleteButton:"Delete Account"},subscription:{title:"Subscription Plan",description:"Manage your membership",premiumBadge:"Premium",premiumBenefitsTitle:"Premium Benefits",premiumBenefits:["✓ Unlimited job applications","✓ Access to all courses","✓ Priority support","✓ Advanced analytics","✓ Ad-free experience"],manageButton:"Manage Subscription",upgradeMessage:"Upgrade to Premium to unlock exclusive features",upgradeButton:"Upgrade to Premium"},connected:{title:"Connected Accounts",description:"Manage linked accounts and integrations",disconnectButton:"Disconnect",connectButton:"Connect"}};function NQ({open:t,onOpenChange:a,onSubmit:n,text:s}){const[r,i]=b.useState({currentPassword:"",newPassword:"",confirmPassword:""}),[o,c]=b.useState(null),[l,h]=b.useState({}),u={...CQ,...s};b.useEffect(()=>{t||(i({currentPassword:"",newPassword:"",confirmPassword:""}),c(null),h({}))},[t]);const p=y=>{if(y.preventDefault(),r.newPassword!==r.confirmPassword){c(u.mismatchError);return}n({currentPassword:r.currentPassword,newPassword:r.newPassword,confirmPassword:r.confirmPassword}),a(!1)};return e.jsx(It,{open:t,onOpenChange:a,children:e.jsxs(Ct,{className:"sm:max-w-md",children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:u.title}),e.jsx(Ra,{children:u.description})]}),e.jsxs("form",{className:"space-y-4",onSubmit:p,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"current-password",children:u.currentPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"current-password",type:l.currentPassword?"text":"password",value:r.currentPassword,onChange:y=>i(m=>({...m,currentPassword:y.target.value})),autoComplete:"current-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,currentPassword:!y.currentPassword})),children:l.currentPassword?"Hide":"Show"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"new-password",children:u.newPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"new-password",type:l.newPassword?"text":"password",value:r.newPassword,onChange:y=>i(m=>({...m,newPassword:y.target.value})),autoComplete:"new-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,newPassword:!y.newPassword})),children:l.newPassword?"Hide":"Show"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"confirm-password",children:u.confirmPasswordLabel}),e.jsxs("div",{className:"relative",children:[e.jsx(fe,{id:"confirm-password",type:l.confirmPassword?"text":"password",value:r.confirmPassword,onChange:y=>{i(m=>({...m,confirmPassword:y.target.value})),c(null)},autoComplete:"new-password",className:"pr-20"}),e.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs font-medium text-muted-foreground hover:text-foreground",onClick:()=>h(y=>({...y,confirmPassword:!y.confirmPassword})),children:l.confirmPassword?"Hide":"Show"})]}),o?e.jsx("p",{className:"text-sm text-destructive",children:o}):null]}),e.jsxs(Qt,{className:"gap-2 sm:gap-0",children:[e.jsx(T,{type:"button",variant:"outline",onClick:()=>a(!1),children:u.cancelButton}),e.jsx(T,{type:"submit",children:u.submitButton})]})]})]})})}function SQ({settings:t,onUpdate:a,text:n,changePasswordText:s}){var m,f,x;const{notifications:r,connectedAccounts:i,subscription:o}=t,[c,l]=b.useState(!1),h={...bn,...n,tabs:{...bn.tabs,...n==null?void 0:n.tabs},notifications:{...bn.notifications,...n==null?void 0:n.notifications,email:{...bn.notifications.email,...(m=n==null?void 0:n.notifications)==null?void 0:m.email},push:{...bn.notifications.push,...(f=n==null?void 0:n.notifications)==null?void 0:f.push},weekly:{...bn.notifications.weekly,...(x=n==null?void 0:n.notifications)==null?void 0:x.weekly}},account:{...bn.account,...n==null?void 0:n.account},subscription:{...bn.subscription,...n==null?void 0:n.subscription},connected:{...bn.connected,...n==null?void 0:n.connected}},u=v=>{a({action:"notifications",updates:v})},p=v=>{a({action:"connect-account",platform:v})},y=v=>{a({action:"disconnect-account",accountId:v})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:h.headerTitle}),e.jsx("p",{className:"text-muted-foreground mt-1",children:h.headerDescription})]}),e.jsxs(yn,{defaultValue:"notifications",className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[e.jsxs(Fe,{value:"notifications",children:[e.jsx(tn,{className:"h-4 w-4 mr-2"}),h.tabs.notifications]}),e.jsxs(Fe,{value:"account",children:[e.jsx(rs,{className:"h-4 w-4 mr-2"}),h.tabs.account]}),e.jsxs(Fe,{value:"subscription",children:[e.jsx(Nl,{className:"h-4 w-4 mr-2"}),h.tabs.subscription]}),e.jsxs(Fe,{value:"connected",children:[e.jsx(_l,{className:"h-4 w-4 mr-2"}),h.tabs.connected]})]}),e.jsx(Ie,{value:"notifications",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.notifications.title}),e.jsx(Te,{children:h.notifications.description})]}),e.jsxs(le,{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"email-notif",className:"text-base",children:h.notifications.email.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.email.description})]}),e.jsx(qt,{id:"email-notif",checked:r.emailNotifications,onCheckedChange:v=>u({emailNotifications:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"push-notif",className:"text-base",children:h.notifications.push.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.push.description})]}),e.jsx(qt,{id:"push-notif",checked:r.pushNotifications,onCheckedChange:v=>u({pushNotifications:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"weekly-digest",className:"text-base",children:h.notifications.weekly.label}),e.jsx("p",{className:"text-sm text-muted-foreground",children:h.notifications.weekly.description})]}),e.jsx(qt,{id:"weekly-digest",checked:r.weeklyDigest,onCheckedChange:v=>u({weeklyDigest:v})})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsx("h4",{className:"font-medium",children:h.notifications.contentAlertsTitle}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"job-alerts-set",children:h.notifications.jobAlertsLabel}),e.jsx(qt,{id:"job-alerts-set",checked:r.jobAlerts,onCheckedChange:v=>u({jobAlerts:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"course-updates",children:h.notifications.courseUpdatesLabel}),e.jsx(qt,{id:"course-updates",checked:r.courseUpdates,onCheckedChange:v=>u({courseUpdates:v})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"news-digest",children:h.notifications.newsDigestLabel}),e.jsx(qt,{id:"news-digest",checked:r.newsDigest,onCheckedChange:v=>u({newsDigest:v})})]})]})]})]})}),e.jsx(Ie,{value:"account",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.account.passwordTitle}),e.jsx(Te,{children:h.account.passwordDescription})]}),e.jsx(le,{children:e.jsx(T,{onClick:()=>l(!0),children:h.account.changePasswordButton})})]}),e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.account.deleteTitle}),e.jsx(Te,{children:h.account.deleteDescription})]}),e.jsx(le,{children:e.jsx(T,{variant:"destructive",onClick:()=>a({action:"delete-account"}),children:h.account.deleteButton})})]})]})}),e.jsx(NQ,{open:c,onOpenChange:l,text:s,onSubmit:v=>a({action:"update-password",details:v})}),e.jsx(Ie,{value:"subscription",children:e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx(xe,{children:h.subscription.title}),e.jsx(Te,{children:h.subscription.description})]}),o.isPremium&&e.jsx(se,{children:h.subscription.premiumBadge})]})}),e.jsx(le,{className:"space-y-4",children:o.isPremium?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border rounded-lg bg-accent/5",children:[e.jsx("h4",{className:"font-semibold mb-2",children:h.subscription.premiumBenefitsTitle}),e.jsx("ul",{className:"space-y-1 text-sm text-muted-foreground",children:h.subscription.premiumBenefits.map(v=>e.jsx("li",{children:v},v))})]}),e.jsx(T,{variant:"outline",children:h.subscription.manageButton})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:h.subscription.upgradeMessage}),e.jsx(T,{onClick:()=>a({action:"upgrade",plan:"premium"}),children:h.subscription.upgradeButton})]})})]})}),e.jsx(Ie,{value:"connected",children:e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:h.connected.title}),e.jsx(Te,{children:h.connected.description})]}),e.jsx(le,{className:"space-y-4",children:i.map(v=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:v.platform}),v.connected&&v.email&&e.jsx("p",{className:"text-sm text-muted-foreground",children:v.email})]}),v.connected?e.jsx(T,{variant:"outline",size:"sm",onClick:()=>y(v.id),children:h.connected.disconnectButton}):e.jsx(T,{size:"sm",onClick:()=>p(v.platform),children:h.connected.connectButton})]},v.id))})]})})]})]})}function LQ({user:t,profileData:a,jobsDashboard:n,alerts:s,snapshot:r,feedItems:i,onUploadCV:o,cvPreviewText:c,cvPreviewStatus:l,cvPreviewErrorMessage:h,coursesData:u,newsData:p,settingsData:y,onUpdateProfile:m,activeTab:f,tabPaths:x,onTabChange:v,freelancerData:k,freelancerStats:w,isCandidateActive:j=!0,onFreelancerUpdate:M,onboardingSteps:N,emailVerified:L=!1,profileComplete:C=!1,onboardingProgress:S=0,onOnboardingAction:I,onOpenOnboarding:A}){const[_,P]=b.useState(f??"overview"),[E,q]=b.useState(!1);b.useEffect(()=>{f&&P(f)},[f]);const $=n||(a==null?void 0:a.jobsDashboard)||{savedJobs:[],recommendedJobs:[],applications:[]},V=()=>{window.dispatchEvent(new CustomEvent("logout"))},H={overview:"/dashboard",profile:"/dashboard/profile",jobs:"/dashboard/jobs",courses:"/dashboard/courses",news:"/dashboard/news",settings:"/dashboard/settings",...x},G=K=>{var ie;const F=((ie=Object.entries(H).find(([,ce])=>ce===K))==null?void 0:ie[0])??null;if(F){f||P(F),v==null||v({tab:F,path:K});return}v==null||v({tab:_,path:K})},Y=async K=>{await m({type:"courses",payload:K})},z=K=>{K.action==="edit-profile"&&q(!0),M==null||M(K)},te=K=>{M==null||M({action:"complete-step-2",data:K}),q(!1)},U=K=>{M==null||M({action:"save-draft",data:K}),q(!1)},ae=(...K)=>console.log("Action:",...K),D=async K=>{await m({type:"news",payload:K})},B=y||{notifications:{emailNotifications:!0,pushNotifications:!1,weeklyDigest:!0,jobAlerts:!0,courseUpdates:!0,newsDigest:!1},connectedAccounts:[{id:"google_89213",platform:"Google",connected:!0,email:t.email},{id:"linkedin_55521",platform:"LinkedIn",connected:!1}],subscription:{isPremium:!1,plan:"free",renewalDate:null}},he=async K=>{await m({type:"settings",payload:K})},W=K=>{const F=K;f||P(F),v==null||v({tab:F,path:H[F]})},de=f??_,ve=H[de]??"/dashboard";return e.jsx(tJ,{user:t,onLogout:V,onNavigate:G,currentPath:ve,notificationCount:s.length,children:e.jsxs(yn,{value:de,onValueChange:W,className:"w-full",children:[e.jsxs(fn,{className:"grid w-full grid-cols-3 lg:grid-cols-6",children:[e.jsxs(Fe,{value:"overview",className:"flex items-center gap-2",children:[e.jsx(jn,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Overview"})]}),e.jsxs(Fe,{value:"profile",className:"flex items-center gap-2",children:[e.jsx(Pn,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Profile"})]}),e.jsxs(Fe,{value:"jobs",className:"flex items-center gap-2",children:[e.jsx(at,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Jobs"})]}),e.jsxs(Fe,{value:"courses",className:"flex items-center gap-2",children:[e.jsx(ia,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Courses"})]}),e.jsxs(Fe,{value:"news",className:"flex items-center gap-2",children:[e.jsx(on,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"News"})]}),e.jsxs(Fe,{value:"settings",className:"flex items-center gap-2",children:[e.jsx(In,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Settings"})]})]}),e.jsx(Ie,{value:"overview",className:"mt-6",children:e.jsx(MK,{userName:t.name,feedItems:i,alerts:s,snapshot:r,onSave:ae,onApply:ae,onEnroll:K=>Y({action:"enroll",courseId:K}),onRead:K=>D({action:"read",articleId:K}),freelancerData:k,freelancerStats:w,isCandidateActive:j,onStartFreelancerSetup:()=>q(!0),onFreelancerUpdate:z,onboardingSteps:N,emailVerified:L,profileComplete:C,onboardingProgress:S,onOnboardingAction:I})}),e.jsx(MQ,{open:E,onOpenChange:q,isCandidateActive:j,onComplete:te,onSaveDraft:U}),e.jsx(Ie,{value:"profile",className:"mt-6",children:e.jsx(PK,{profile:a,onUpdate:K=>m(K)})}),e.jsx(Ie,{value:"jobs",className:"mt-6",children:e.jsx(TK,{savedJobs:$.savedJobs,applications:$.applications,recommendedJobs:$.recommendedJobs,onApply:K=>console.log("Applied:",K),onRemove:K=>console.log("Removed:",K),onUploadCV:o??(K=>console.log("Upload CV changed:",(K==null?void 0:K.name)||"removed")),cvPreviewText:c,cvPreviewStatus:l,cvPreviewErrorMessage:h,onSetAlert:()=>console.log("Set alerts clicked"),onUpdateProfile:async K=>{await m({type:"jobs",payload:K.payload})}})}),e.jsx(Ie,{value:"courses",className:"mt-6",children:e.jsx(DK,{enrolledCourses:(u==null?void 0:u.enrolledCourses)||[],savedCourses:(u==null?void 0:u.savedCourses)||[],recommendedCourses:(u==null?void 0:u.recommendedCourses)||[],certificates:(u==null?void 0:u.certificates)||[],onEnroll:K=>Y({action:"enroll",courseId:K}),onContinue:K=>Y({action:"continue",courseId:K}),onExplore:()=>Y({action:"explore"}),onSave:K=>Y({action:"save",courseId:K}),onRemoveSaved:K=>Y({action:"remove-saved",courseId:K}),onRemoveRecommended:K=>Y({action:"remove-recommended",courseId:K})})}),e.jsx(Ie,{value:"news",className:"mt-6",children:e.jsx(EK,{recommendedNews:(p==null?void 0:p.recommendedNews)||[],savedArticles:(p==null?void 0:p.savedArticles)||[],categories:(p==null?void 0:p.categories)||[],selectedCategory:(p==null?void 0:p.selectedCategory)||"all",onRead:K=>D({action:"read",articleId:K}),onSave:K=>D({action:"save",articleId:K}),onRemoveSaved:K=>D({action:"remove-saved",articleId:K}),onRemoveRecommended:K=>D({action:"remove-recommended",articleId:K}),onCategoryChange:K=>D({action:"category",category:K}),onManagePreferences:()=>D({action:"manage-preferences"})})}),e.jsx(Ie,{value:"settings",className:"mt-6",children:e.jsx(SQ,{settings:B,onUpdate:he})})]})})}const IQ=({emailVerified:t,profileComplete:a,requiredSteps:n})=>{const s=[],r=n??[],i=r.includes("email_verification")||r.length===0&&t===!1,o=r.includes("profile_required_fields")||r.length===0&&a===!1;return i&&t===!1&&s.push("Verify your email address"),o&&a===!1&&s.push("Complete your profile"),!s.length&&r.length>0&&s.push("Complete required onboarding steps"),s};function AQ({children:t,onClick:a,emailVerified:n,profileComplete:s,requiredSteps:r,isBlocked:i,blockedReason:o,ctaLabel:c,onCtaClick:l,variant:h="tooltip"}){const u=IQ({emailVerified:n,profileComplete:s,requiredSteps:r}),p=i??u.length>0,y=o??(u.length?u.join(" and "):"Complete onboarding to continue."),m=g.isValidElement(t)?t.props.onClick:void 0,[f,x]=g.useState(!1),v=h==="tooltip",k=()=>{if(p){v||x(!0);return}m==null||m(),a==null||a()};function w(M){return g.isValidElement(M)}const j=e.jsx("span",{className:pe("inline-flex",p?"cursor-not-allowed":"cursor-pointer"),onClick:k,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&p&&(M.preventDefault(),v||x(!0))},onMouseEnter:()=>p&&v&&x(!0),onMouseLeave:()=>p&&v&&x(!1),onFocus:()=>p&&v&&x(!0),onBlur:()=>p&&v&&x(!1),role:p?"button":void 0,tabIndex:p?0:void 0,"aria-disabled":p,children:w(t)?g.cloneElement(t,{className:pe(t.props.className,p&&"pointer-events-none opacity-60"),disabled:p||t.props.disabled}):t});return p?v?e.jsxs(QE,{open:f,onOpenChange:x,children:[e.jsx(eO,{asChild:!0,children:j}),e.jsxs(CL,{className:"w-64 text-sm",sideOffset:8,children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Action unavailable"}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:y}),c&&l&&e.jsx(T,{type:"button",variant:"link",className:"mt-2 h-auto p-0 text-sm",onClick:()=>{x(!1),l()},children:c})]})]}):e.jsxs(It,{open:f,onOpenChange:x,children:[e.jsx(cT,{asChild:!0,children:j}),e.jsxs(Ct,{children:[e.jsxs(Ft,{children:[e.jsx(pt,{children:"Complete onboarding to continue"}),e.jsx(Ra,{children:y})]}),(c||l)&&e.jsxs(Qt,{children:[c&&l&&e.jsx(T,{type:"button",onClick:()=>{x(!1),l()},children:c}),e.jsx(T,{type:"button",variant:"outline",onClick:()=>x(!1),children:"Close"})]})]})]}):j}const IO=({freelancer:t,loading:a=!1,followLoading:n=!1,followDisabled:s=!1,onToggleFollow:r,onFollowAction:i,saveLoading:o=!1,saveDisabled:c=!1,onToggleSave:l,onSaveAction:h,onContact:u,onBack:p,onEmitEvent:y})=>{if(a)return e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx("div",{className:"text-center text-muted-foreground",children:"Loading profile..."})});if(!t)return e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Freelancer not found"}),e.jsx("a",{href:"/freelancers",className:"text-accent hover:underline",children:"Back to Freelancers"})]})});const m=t.isSaved??!1,f=t.isFollowing??!1,x=s||n,v=c||o,k=A=>{y==null||y({domain:"freelancers",name:A,payload:{freelancerId:t.id,slug:t.slug,name:t.name,source:"profile"},timestamp:new Date().toISOString(),context:{component:"FreelancerProfile"}})};b.useEffect(()=>{k("freelancer_profile_viewed")},[t.id]);const w=()=>{if(x)return;const A=!f;r==null||r(t.id,A),i==null||i({freelancerId:t.id,freelancerSlug:t.slug,action:A?"follow":"unfollow"}),k(A?"freelancer_followed":"freelancer_unfollowed")},j=()=>{if(v)return;const A=!m;l==null||l(t.id,A),h==null||h({freelancerId:t.id,freelancerSlug:t.slug,freelancerName:t.name,action:A?"save":"unsave"}),k(A?"freelancer_saved":"freelancer_unsaved")},M=()=>{u==null||u(t.id),k("freelancer_contact_clicked")},N=t.name.split(" ").map(A=>A[0]).join("").toUpperCase(),L=A=>{switch(A){case"available":return"bg-green-500";case"limited":return"bg-yellow-500";case"unavailable":return"bg-red-500";default:return"bg-gray-500"}},C=A=>{switch(A){case"available":return"Available Now";case"limited":return"Limited Availability";case"unavailable":return"Not Available";default:return A}},S=A=>{switch(A){case"freelancer":return"Freelancer";case"coach":return"Coach";case"mentor":return"Mentor";case"consultant":return"Consultant";case"influencer":return"Influencer";case"streamer":return"Streamer";default:return A}},I=[{id:1,author:"John Smith",company:"BetCasino Ltd",rating:5,date:"2024-01-15",content:"Exceptional expertise in compliance. Helped us secure our MGA license in record time. Highly recommended!"},{id:2,author:"Sarah Johnson",company:"GameTech Solutions",rating:5,date:"2024-01-10",content:"Professional, responsive, and incredibly knowledgeable. A true expert in the iGaming industry."},{id:3,author:"Michael Brown",company:"Lucky Spin Gaming",rating:4,date:"2023-12-20",content:"Great communication and delivered results on time. Would definitely work with again."}];return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("header",{className:"bg-card border-b border-border sticky top-0 z-50",children:e.jsx("div",{className:"container mx-auto px-4 py-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[p?e.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Ha,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Talent"})]}):e.jsxs("a",{href:"/freelancers",className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Ha,{className:"w-5 h-5"}),e.jsx("span",{className:"font-medium",children:"Back to Talent"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(T,{variant:"outline",size:"sm",onClick:w,disabled:x,children:[n?e.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ba,{className:`w-4 h-4 mr-2 ${f?"fill-rose-500 text-rose-500":""}`}),f?"Following":"Follow"]}),e.jsxs(T,{variant:"outline",size:"sm",onClick:j,disabled:v,children:[o?e.jsx(et,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ut,{className:`w-4 h-4 mr-2 ${m?"fill-accent text-accent":""}`}),m?"Saved":"Save"]}),e.jsxs(T,{variant:"outline",size:"sm",children:[e.jsx(ss,{className:"w-4 h-4 mr-2"}),"Share"]}),e.jsxs(T,{variant:"accent",size:"sm",onClick:M,children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"Contact"]})]})]})})}),e.jsx("div",{className:"bg-gradient-to-r from-primary via-primary/90 to-accent/80 h-32 md:h-48"}),e.jsx("div",{className:"container mx-auto px-4 -mt-16 md:-mt-20 pb-12",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(oe,{className:"overflow-visible",children:e.jsx(le,{className:"pt-0",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsxs("div",{className:"-mt-12 md:-mt-16 relative",children:[e.jsxs(ps,{className:"w-28 h-28 md:w-36 md:h-36 border-4 border-card shadow-lg",children:[e.jsx(nc,{src:t.avatar}),e.jsx(ms,{className:"bg-gradient-to-br from-accent to-accent/80 text-white text-3xl md:text-4xl font-bold",children:N})]}),t.isVerified&&e.jsx("div",{className:"absolute -bottom-1 -right-1 bg-card rounded-full p-1",children:e.jsx(qa,{className:"w-6 h-6 text-accent"})})]}),e.jsxs("div",{className:"flex-1 pt-2 md:pt-6",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:t.name}),t.isTopRated&&e.jsxs(se,{variant:"gaming",className:"gap-1",children:[e.jsx(Bt,{className:"w-3 h-3"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"accent",className:"gap-1",children:[e.jsx(ca,{className:"w-3 h-3"}),"Rising Talent"]})]}),e.jsx("p",{className:"text-lg text-muted-foreground mt-1",children:t.title}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 italic",children:['"',t.tagline,'"']}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 mt-3 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(xt,{className:"w-4 h-4 text-accent"}),t.location.city,","," ",t.location.country]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(_a,{className:"w-4 h-4 text-accent"}),t.location.timezone]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ba,{className:"w-4 h-4 text-accent"}),t.responseTime]})]})]}),e.jsxs("div",{className:"flex gap-6 text-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"text-2xl font-bold text-accent",children:[t.yearsOfExperience,"+"]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Years Exp."})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-bold text-accent",children:t.completedProjects}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Projects"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-center gap-1 text-2xl font-bold text-accent",children:[e.jsx(yt,{className:"w-5 h-5 fill-gaming-gold text-gaming-gold"}),t.rating]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["(",t.reviewCount,")"]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mt-4",children:[e.jsx(se,{variant:"secondary",children:S(t.type)}),e.jsx(se,{variant:"outline",children:t.experienceLevel}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${L(t.availability)}`}),e.jsx("span",{className:"text-sm text-muted-foreground",children:C(t.availability)})]})]})]})]})})}),e.jsxs(yn,{defaultValue:"overview",className:"space-y-6",children:[e.jsxs(fn,{className:"flex-wrap h-auto gap-1 bg-secondary/50 p-1",children:[e.jsxs(Fe,{value:"overview",children:[e.jsx(at,{className:"w-4 h-4 mr-1.5"}),"Overview"]}),e.jsxs(Fe,{value:"portfolio",children:[e.jsx(Uo,{className:"w-4 h-4 mr-1.5"}),"Portfolio"]}),e.jsxs(Fe,{value:"reviews",children:[e.jsx(yt,{className:"w-4 h-4 mr-1.5"}),"Reviews"]})]}),e.jsxs(Ie,{value:"overview",className:"space-y-6",children:[e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(kt,{className:"w-5 h-5 text-accent"}),"About"]})}),e.jsx(le,{children:e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.bio})})]}),t.highlights.length>0&&e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Bt,{className:"w-5 h-5 text-accent"}),"Key Highlights"]})}),e.jsx(le,{children:e.jsx("ul",{className:"space-y-3",children:t.highlights.map((A,_)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx(Qe,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-muted-foreground",children:A})]},_))})})]}),e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(sn,{className:"w-5 h-5 text-accent"}),"Skills & Expertise"]})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Specializations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.specializations.map(A=>e.jsx(se,{variant:"accent",children:A},A))})]}),e.jsx(cs,{}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Skills"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.skills.map(A=>e.jsx(se,{variant:"outline",children:A},A))})]})]})]}),t.certifications.length>0&&e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(qa,{className:"w-5 h-5 text-accent"}),"Certifications"]})}),e.jsx(le,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:t.certifications.map(A=>e.jsxs(se,{variant:"secondary",className:"gap-1",children:[e.jsx(qa,{className:"w-3 h-3"}),A]},A))})})]})]}),e.jsx(Ie,{value:"portfolio",className:"space-y-6",children:t.portfolio.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.portfolio.map((A,_)=>e.jsxs(oe,{className:"overflow-hidden group cursor-pointer hover:shadow-lg transition-shadow",children:[e.jsxs("div",{className:"aspect-video relative bg-muted",children:[e.jsx("img",{src:A.thumbnail,alt:A.title,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:e.jsx(ts,{className:"w-8 h-8 text-white"})})]}),e.jsxs(le,{className:"p-4",children:[e.jsx("h3",{className:"font-semibold",children:A.title}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:A.description})]})]},_))}):e.jsx(oe,{children:e.jsxs(le,{className:"py-12 text-center text-muted-foreground",children:[e.jsx(Uo,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"No portfolio items available yet."})]})})}),e.jsxs(Ie,{value:"reviews",className:"space-y-6",children:[e.jsx(oe,{children:e.jsx(le,{className:"py-6",children:e.jsxs("div",{className:"flex items-center gap-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-4xl font-bold text-foreground",children:t.rating}),e.jsx("div",{className:"flex items-center gap-1 mt-1",children:[...Array(5)].map((A,_)=>e.jsx(yt,{className:`w-4 h-4 ${_<Math.floor(t.rating)?"fill-gaming-gold text-gaming-gold":"text-muted"}`},_))}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[t.reviewCount," reviews"]})]}),e.jsx("div",{className:"flex-1 space-y-2",children:[5,4,3,2,1].map(A=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm w-3",children:A}),e.jsx(yt,{className:"w-3 h-3 text-gaming-gold"}),e.jsx(bc,{value:A===5?80:A===4?15:5,className:"h-2 flex-1"})]},A))})]})})}),e.jsx("div",{className:"space-y-4",children:I.map(A=>e.jsx(oe,{children:e.jsx(le,{className:"py-4",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(ps,{className:"w-10 h-10",children:e.jsx(ms,{className:"bg-muted",children:A.author[0]})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold",children:A.author}),e.jsx("p",{className:"text-sm text-muted-foreground",children:A.company})]}),e.jsx("div",{className:"flex items-center gap-1",children:[...Array(5)].map((_,P)=>e.jsx(yt,{className:`w-4 h-4 ${P<A.rating?"fill-gaming-gold text-gaming-gold":"text-muted"}`},P))})]}),e.jsxs("div",{className:"mt-3 flex items-start gap-2",children:[e.jsx(Go,{className:"w-4 h-4 text-muted-foreground flex-shrink-0 mt-1"}),e.jsx("p",{className:"text-muted-foreground",children:A.content})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:new Date(A.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})})},A.id))})]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(oe,{className:"sticky top-20",children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Rc,{className:"w-5 h-5 text-accent"}),"Pricing"]})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-secondary/50 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Hourly Rate"}),e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[t.hourlyRate.currency," ",t.hourlyRate.min," -"," ",t.hourlyRate.max]})]}),t.sessionRate&&e.jsxs("div",{className:"p-4 bg-accent/10 rounded-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t.type==="mentor"||t.type==="coach"?"Session Rate":"Consultation"}),e.jsxs("p",{className:"text-2xl font-bold text-accent",children:[t.sessionRate.currency," ",t.sessionRate.price]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.sessionRate.duration})]}),e.jsxs("div",{className:"space-y-2 pt-2",children:[e.jsxs(T,{onClick:M,className:"w-full",variant:"accent",children:[e.jsx($a,{className:"w-4 h-4 mr-2"}),"Send Message"]}),(t.type==="mentor"||t.type==="coach")&&e.jsxs(T,{className:"w-full",variant:"outline",children:[e.jsx(Qn,{className:"w-4 h-4 mr-2"}),"Book Session"]})]}),e.jsx(cs,{}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Success Rate"}),e.jsxs("span",{className:"font-medium",children:[t.successRate,"%"]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Response Time"}),e.jsx("span",{className:"font-medium",children:t.responseTime})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Member Since"}),e.jsx("span",{className:"font-medium",children:new Date(t.joinedDate).toLocaleDateString("en-US",{year:"numeric",month:"short"})})]})]})]})]}),e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsxs(xe,{className:"flex items-center gap-2",children:[e.jsx(Dc,{className:"w-5 h-5 text-accent"}),"Languages"]})}),e.jsx(le,{children:e.jsx("div",{className:"flex flex-wrap gap-2",children:t.languages.map(A=>e.jsx(se,{variant:"outline",children:A},A))})})]}),t.isVerified&&e.jsx(oe,{className:"bg-accent/5 border-accent/20",children:e.jsx(le,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(qa,{className:"w-8 h-8 text-accent"}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold",children:"Verified Professional"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Identity and credentials verified"})]})]})})})]})]})})]})},vA={freelancer:e.jsx(at,{className:"w-3.5 h-3.5"}),coach:e.jsx(sn,{className:"w-3.5 h-3.5"}),mentor:e.jsx(kt,{className:"w-3.5 h-3.5"}),consultant:e.jsx(Ec,{className:"w-3.5 h-3.5"}),streamer:e.jsx(kt,{className:"w-3.5 h-3.5"}),influencer:e.jsx(kt,{className:"w-3.5 h-3.5"})},kA={freelancer:"Freelancer",coach:"Coach",mentor:"Mentor",consultant:"Consultant",streamer:"Streamer",influencer:"Influencer"},bA={freelancer:"bg-blue-500/10 text-blue-600 border-blue-200",coach:"bg-green-500/10 text-green-600 border-green-200",mentor:"bg-purple-500/10 text-purple-600 border-purple-200",consultant:"bg-orange-500/10 text-orange-600 border-orange-200",streamer:"bg-orange-500/10 text-orange-600 border-orange-200",influencer:"bg-orange-500/10 text-orange-600 border-orange-200"},wA={available:"bg-emerald-500/10 text-emerald-600",limited:"bg-amber-500/10 text-amber-600",unavailable:"bg-red-500/10 text-red-500"},PQ={available:"Available Now",limited:"Limited Availability",unavailable:"Not Available"},_Q=({freelancer:t,viewMode:a,isSaved:n,isFollowing:s,followDisabled:r=!1,followLoading:i=!1,onToggleFollow:o,onFollowAction:c,saveDisabled:l=!1,saveLoading:h=!1,onToggleSave:u,onSaveAction:p,onContact:y,onViewProfile:m,onEmitEvent:f,positionInList:x})=>{const v=n??t.isSaved??!1,k=s??t.isFollowing??!1,w=r||i,j=l||h,M=(A,_,P)=>A===_?`${P} ${A}/hr`:`${P} ${A}-${_}/hr`,N=A=>A.split(" ").map(_=>_[0]).join("").toUpperCase(),L=()=>{if(w)return;const A=!k;o==null||o(t.id,A),c==null||c({freelancerId:t.id,freelancerSlug:t.slug,action:A?"follow":"unfollow"}),f==null||f({domain:"freelancers",name:A?"freelancer_followed":"freelancer_unfollowed",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},C=()=>{if(j)return;const A=!v;u==null||u(t.id,A),p==null||p({freelancerId:t.id,freelancerSlug:t.slug,freelancerName:t.name,action:A?"save":"unsave"}),f==null||f({domain:"freelancers",name:A?"freelancer_saved":"freelancer_unsaved",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},S=()=>{y==null||y(t.id),f==null||f({domain:"freelancers",name:"freelancer_contact_clicked",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})},I=()=>{m==null||m(t.id),f==null||f({domain:"freelancers",name:"freelancer_profile_opened",payload:{freelancerId:t.id,slug:t.slug,name:t.name,positionInList:x,source:"listing",openedIn:"same_tab"},timestamp:new Date().toISOString(),context:{component:"Freelancers"}})};return a==="list"?e.jsx(oe,{className:"p-4 hover:shadow-md transition-all border-border bg-card group",children:e.jsxs("div",{className:"flex gap-4",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsxs("div",{className:"relative",children:[e.jsxs(ps,{className:"w-16 h-16",children:[e.jsx(nc,{src:t.avatar,alt:t.name}),e.jsx(ms,{className:"bg-accent/20 text-accent font-semibold",children:N(t.name)})]}),t.isVerified&&e.jsx(Qe,{className:"absolute -bottom-1 -right-1 w-5 h-5 text-blue-500 bg-white rounded-full"})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground truncate",children:t.name}),t.isTopRated&&e.jsxs(se,{variant:"outline",className:"bg-amber-500/10 text-amber-600 border-amber-200 text-xs",children:[e.jsx(Bt,{className:"w-3 h-3 mr-1"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"outline",className:"bg-green-500/10 text-green-600 border-green-200 text-xs",children:[e.jsx(ca,{className:"w-3 h-3 mr-1"}),"Rising Talent"]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:t.title}),e.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-muted-foreground",children:[e.jsxs(se,{variant:"outline",className:`${bA[t.type]} text-xs`,children:[vA[t.type],e.jsx("span",{className:"ml-1",children:kA[t.type]})]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(xt,{className:"w-3 h-3"}),t.location.city,", ",t.location.country]})]})]}),e.jsxs("div",{className:"flex-shrink-0 text-right",children:[e.jsx("div",{className:"font-semibold text-foreground",children:M(t.hourlyRate.min,t.hourlyRate.max,t.hourlyRate.currency)}),e.jsxs("div",{className:"mt-1 flex items-center justify-end gap-1",children:[e.jsx("button",{onClick:L,disabled:w,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":k?"Unfollow":"Follow",children:i?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):e.jsx(Ba,{className:`w-5 h-5 ${k?"text-rose-500 fill-rose-500":"text-muted-foreground"}`})}),e.jsx("button",{onClick:C,disabled:j,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":v?"Remove from saved":"Save",children:h?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):v?e.jsx(va,{className:"w-5 h-5 text-accent"}):e.jsx(Ut,{className:"w-5 h-5 text-muted-foreground"})})]})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2 line-clamp-1",children:t.tagline}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-3",children:[t.skills.slice(0,5).map(A=>e.jsx(se,{variant:"secondary",className:"text-xs",children:A},A)),t.skills.length>5&&e.jsxs(se,{variant:"outline",className:"text-xs text-muted-foreground",children:["+",t.skills.length-5," more"]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-4",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(yt,{className:"w-4 h-4 text-amber-500 fill-amber-500"}),e.jsx("span",{className:"font-medium",children:t.rating}),e.jsxs("span",{className:"text-muted-foreground",children:["(",t.reviewCount,")"]})]}),e.jsxs("span",{className:"text-muted-foreground",children:[t.completedProjects," projects"]}),e.jsxs("span",{className:"text-muted-foreground",children:[t.successRate,"% success"]}),e.jsx(se,{variant:"outline",className:wA[t.availability],children:PQ[t.availability]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(T,{variant:"outline",size:"sm",onClick:I,children:"View Profile"}),e.jsxs(T,{size:"sm",onClick:S,className:"bg-accent hover:bg-accent/90 text-accent-foreground",children:[e.jsx(Tl,{className:"w-4 h-4 mr-1"}),"Contact"]})]})]})]})]})}):e.jsxs(oe,{className:"p-4 hover:shadow-md transition-all border-border bg-card group flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsxs(ps,{className:"w-12 h-12",children:[e.jsx(nc,{src:t.avatar,alt:t.name}),e.jsx(ms,{className:"bg-accent/20 text-accent font-semibold text-sm",children:N(t.name)})]}),t.isVerified&&e.jsx(Qe,{className:"absolute -bottom-0.5 -right-0.5 w-4 h-4 text-blue-500 bg-white rounded-full"})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-semibold text-foreground text-sm truncate",children:t.name}),e.jsxs(se,{variant:"outline",className:`${bA[t.type]} text-xs mt-0.5`,children:[vA[t.type],e.jsx("span",{className:"ml-1",children:kA[t.type]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:L,disabled:w,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":k?"Unfollow":"Follow",children:i?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):e.jsx(Ba,{className:`w-5 h-5 ${k?"text-rose-500 fill-rose-500":"text-muted-foreground"}`})}),e.jsx("button",{onClick:C,disabled:j,className:"p-1.5 rounded-full hover:bg-muted transition-colors disabled:cursor-not-allowed disabled:opacity-60","aria-label":v?"Remove from saved":"Save",children:h?e.jsx(et,{className:"w-5 h-5 animate-spin text-muted-foreground"}):v?e.jsx(va,{className:"w-5 h-5 text-accent"}):e.jsx(Ut,{className:"w-5 h-5 text-muted-foreground"})})]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-3",children:[t.isTopRated&&e.jsxs(se,{variant:"outline",className:"bg-amber-500/10 text-amber-600 border-amber-200 text-xs",children:[e.jsx(Bt,{className:"w-3 h-3 mr-0.5"}),"Top Rated"]}),t.isRisingTalent&&e.jsxs(se,{variant:"outline",className:"bg-green-500/10 text-green-600 border-green-200 text-xs",children:[e.jsx(ca,{className:"w-3 h-3 mr-0.5"}),"Rising"]}),e.jsx(se,{variant:"outline",className:`${wA[t.availability]} text-xs`,children:t.availability==="available"?"Available":t.availability==="limited"?"Limited":"Busy"})]}),e.jsx("h4",{className:"font-medium text-foreground text-sm mt-3 line-clamp-1",children:t.title}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2 flex-grow",children:t.tagline}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mt-2",children:[e.jsx(xt,{className:"w-3 h-3"}),t.location.city,", ",t.location.country]}),e.jsxs("div",{className:"flex flex-wrap gap-1 mt-3",children:[t.skills.slice(0,3).map(A=>e.jsx(se,{variant:"secondary",className:"text-xs",children:A},A)),t.skills.length>3&&e.jsxs(se,{variant:"outline",className:"text-xs text-muted-foreground",children:["+",t.skills.length-3]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-border",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(yt,{className:"w-4 h-4 text-amber-500 fill-amber-500"}),e.jsx("span",{className:"font-medium text-sm",children:t.rating}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.reviewCount,")"]})]}),e.jsx("div",{className:"font-semibold text-sm text-foreground",children:M(t.hourlyRate.min,t.hourlyRate.max,t.hourlyRate.currency)})]}),e.jsx(T,{className:"w-full mt-3 bg-accent hover:bg-accent/90 text-accent-foreground",size:"sm",onClick:I,children:"View Profile"})]})},RQ=({title:t,description:a,popularTags:n=[],selectedTags:s=[],onTagClick:r,onTagRemove:i,className:o=""})=>e.jsxs("div",{className:`bg-card border-b border-border ${o}`,children:[e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-foreground",children:t}),a&&e.jsx("p",{className:"hidden lg:block text-muted-foreground mt-1",children:a})]})})}),n.length>0&&e.jsx("div",{className:"border-t border-border",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3",children:e.jsxs("div",{className:"flex items-center gap-3 overflow-x-auto scrollbar-hide",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground flex-shrink-0",children:"Popular:"}),e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:n.map(c=>{const l=s.includes(c.value);return e.jsxs("button",{onClick:()=>r==null?void 0:r(c.value),className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium border transition-all ${l?"bg-accent text-accent-foreground border-accent":"bg-accent/10 text-accent border-accent/30 hover:bg-accent/20"}`,children:["#",c.label,l&&i&&e.jsx(tt,{className:"w-3.5 h-3.5 hover:text-accent-foreground/80",onClick:h=>{h.stopPropagation(),i(c.value)}})]},c.value)})})]})})})]}),TQ=({value:t,onChange:a,onSubmit:n,onClear:s,onFilterClick:r,placeholder:i="Search...",suggestions:o=[],onSuggestionSelect:c,showFilterButton:l=!0,filterCount:h=0,className:u=""})=>{const[p,y]=b.useState(!1),m=f=>{f.key==="Enter"&&t.trim()&&(n(t.trim()),y(!1)),f.key==="Escape"&&y(!1)};return e.jsxs("div",{className:`relative ${u}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Rt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),e.jsx("input",{type:"text",value:t,onChange:f=>{a(f.target.value),y(f.target.value.length>0)},onKeyDown:m,onFocus:()=>y(t.length>0&&o.length>0),onBlur:()=>setTimeout(()=>y(!1),200),placeholder:i,className:"w-full h-12 pl-10 pr-20 rounded-lg border border-input bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"}),t&&s&&e.jsx("button",{onClick:s,className:"absolute right-14 top-1/2 -translate-y-1/2 p-1 hover:bg-muted rounded",children:e.jsx(tt,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx("button",{onClick:()=>t.trim()&&n(t.trim()),className:"absolute right-2 top-1/2 -translate-y-1/2 bg-accent hover:bg-accent-hover text-accent-foreground p-2 rounded-md transition-colors",children:e.jsx(Rt,{className:"h-4 w-4"})})]}),l&&r&&e.jsxs("button",{onClick:r,className:"lg:hidden flex items-center justify-center h-12 w-12 rounded-lg border border-input bg-background hover:bg-muted transition-colors relative",children:[e.jsx(An,{className:"h-5 w-5 text-muted-foreground"}),h>0&&e.jsx("span",{className:"absolute -top-1 -right-1 bg-accent text-accent-foreground text-xs font-bold w-5 h-5 rounded-full flex items-center justify-center",children:h})]})]}),p&&o.length>0&&e.jsx("ul",{className:"absolute z-20 mt-1 w-full bg-card border border-border rounded-lg shadow-lg max-h-60 overflow-y-auto",children:o.map((f,x)=>e.jsx("li",{children:e.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-foreground hover:bg-muted flex items-center gap-2",onClick:()=>{c==null||c(f),y(!1)},children:[e.jsx(Rt,{className:"h-4 w-4 text-muted-foreground"}),f]})},x))})]})},DQ=({viewMode:t,onViewModeChange:a,itemsPerPage:n,onItemsPerPageChange:s,itemsPerPageOptions:r=[5,10,20,50],sortBy:i,onSortChange:o,sortOptions:c,pagination:l,title:h,itemLabel:u="items",icon:p,className:y=""})=>e.jsx("div",{className:`bg-card rounded-lg shadow-sm border border-border p-4 ${y}`,children:e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[p&&e.jsx(p,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[h&&e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:h}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing"," ",e.jsx("span",{className:"font-semibold text-foreground",children:l.startIndex}),"–",e.jsx("span",{className:"font-semibold text-foreground",children:l.endIndex})," ","of"," ",e.jsx("span",{className:"font-semibold text-foreground",children:l.totalItems})," ",u]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Order by"}),e.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"h-9 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:c.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))})]}),e.jsxs("div",{className:"flex bg-muted p-1 rounded-lg",children:[e.jsxs("button",{onClick:()=>a("grid"),className:`px-3 py-1.5 rounded-md flex items-center gap-1.5 transition-colors ${t==="grid"?"bg-accent text-accent-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,"aria-label":"Grid view","aria-pressed":t==="grid",children:[e.jsx(La,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"Grid"})]}),e.jsxs("button",{onClick:()=>a("list"),className:`px-3 py-1.5 rounded-md flex items-center gap-1.5 transition-colors ${t==="list"?"bg-accent text-accent-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,"aria-label":"List view","aria-pressed":t==="list",children:[e.jsx(Oc,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium hidden sm:inline",children:"List"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Show:"}),e.jsx("select",{value:n,onChange:m=>s(Number(m.target.value)),className:"h-9 px-2 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:r.map(m=>e.jsx("option",{value:m,children:m},m))})]})]})]})}),EQ=({title:t="Filters",sections:a,onFilterChange:n,onClearAll:s,activeFiltersCount:r,savedCount:i=0,showSavedOnly:o=!1,onToggleSavedOnly:c,savedLabel:l="Saved Items",className:h=""})=>e.jsxs("div",{className:`bg-card rounded-lg shadow-sm border border-border ${h}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nn,{className:"w-5 h-5 text-accent"}),e.jsx("h2",{className:"font-semibold text-foreground",children:t}),r>0&&e.jsx("span",{className:"bg-accent text-accent-foreground text-xs font-bold px-2 py-0.5 rounded-full",children:r})]}),r>0&&e.jsx("button",{onClick:s,className:"text-sm text-accent hover:underline",children:"Clear all"})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[a.map(u=>e.jsx(OQ,{section:u,onFilterChange:n},u.key)),c&&e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs("button",{onClick:c,className:`w-full px-4 py-2.5 rounded-lg flex items-center justify-center gap-2 transition-colors ${o?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:[e.jsx(Ut,{className:"w-4 h-4"}),e.jsxs("span",{className:"font-medium",children:[l," (",i,")"]})]})})]})]}),OQ=({section:t,onFilterChange:a})=>{var u,p,y,m;const[n,s]=b.useState(t.defaultExpanded??!0),[r,i]=b.useState(""),o=((u=t.options)==null?void 0:u.filter(f=>f.label.toLowerCase().includes(r.toLowerCase())))||[],c=f=>{const x=t.selectedValues.includes(f)?t.selectedValues.filter(v=>v!==f):[...t.selectedValues,f];a(t.key,x)},l=f=>{a(t.key,f?[f]:[])},h=t.searchable&&(((p=t.options)==null?void 0:p.length)||0)>6;return e.jsxs("div",{className:"border-b border-border pb-4 last:border-b-0 last:pb-0",children:[t.collapsible!==!1?e.jsxs("button",{onClick:()=>s(!n),className:"flex items-center justify-between w-full py-2 text-left",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.label}),n?e.jsx(an,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(ka,{className:"w-4 h-4 text-muted-foreground"})]}):e.jsx("h3",{className:"text-sm font-medium text-foreground py-2",children:t.label}),n&&e.jsxs("div",{className:"mt-2 space-y-2",children:[h&&e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Rt,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx("input",{type:"text",value:r,onChange:f=>i(f.target.value),placeholder:`Search ${t.label.toLowerCase()}...`,className:"w-full h-8 pl-8 pr-8 text-sm rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),r&&e.jsx("button",{onClick:()=>i(""),className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(tt,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})})]}),t.type==="checkbox"&&e.jsxs("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:[o.map(f=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer group",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(f.value),onChange:()=>c(f.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground group-hover:text-accent transition-colors flex-1",children:f.label}),f.count!==void 0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",f.count,")"]})]},f.value)),o.length===0&&r&&e.jsx("p",{className:"text-sm text-muted-foreground italic",children:"No matching options"})]}),(t.type==="select"||t.type==="searchable-select")&&e.jsxs("select",{value:t.selectedValues[0]||"",onChange:f=>l(f.target.value),className:"w-full h-9 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:[e.jsxs("option",{value:"",children:["All ",t.label]}),(y=t.options)==null?void 0:y.map(f=>e.jsxs("option",{value:f.value,children:[f.label,f.count!==void 0&&` (${f.count})`]},f.value))]}),t.type==="toggle"&&((m=t.options)==null?void 0:m.map(f=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(f.value),onChange:()=>c(f.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground",children:f.label})]},f.value)))]})]})},zQ=({pagination:t,onPageChange:a,maxPagesToShow:n=5,showFirstLast:s=!0,className:r=""})=>{const{currentPage:i,totalPages:o}=t;if(o<=1)return null;const l=(()=>{const h=[];let u=Math.max(1,i-Math.floor(n/2)),p=Math.min(o,u+n-1);p-u+1<n&&(u=Math.max(1,p-n+1)),u>1&&(h.push(1),u>2&&h.push("ellipsis"));for(let y=u;y<=p;y++)(y!==1&&y!==o||u===1&&y===1||p===o&&y===o)&&h.push(y);return p<o&&(p<o-1&&h.push("ellipsis"),h.push(o)),h})();return e.jsx("div",{className:`flex justify-center ${r}`,children:e.jsxs("nav",{className:"flex items-center gap-1","aria-label":"Pagination",children:[s&&e.jsx("button",{onClick:()=>a(1),disabled:i===1,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"First page",children:e.jsx(Ml,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>a(i-1),disabled:i===1,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Previous page",children:e.jsx(Ha,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex items-center gap-1",children:l.map((h,u)=>h==="ellipsis"?e.jsx("span",{className:"px-2 py-1 text-muted-foreground",children:"..."},`ellipsis-${u}`):e.jsx("button",{onClick:()=>a(h),className:`min-w-[36px] h-9 px-3 rounded-md text-sm font-medium transition-colors ${i===h?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,"aria-label":`Page ${h}`,"aria-current":i===h?"page":void 0,children:h},h))}),e.jsx("button",{onClick:()=>a(i+1),disabled:i===o,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Next page",children:e.jsx(ka,{className:"w-4 h-4"})}),s&&e.jsx("button",{onClick:()=>a(o),disabled:i===o,className:"p-2 rounded-md text-muted-foreground hover:bg-muted disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent transition-colors","aria-label":"Last page",children:e.jsx(Cl,{className:"w-4 h-4"})})]})})},qQ=({icon:t=Ol,title:a="No results found",description:n="Try adjusting your search criteria or filters to find more results.",actionLabel:s="Clear All Filters",onAction:r,className:i=""})=>e.jsxs("div",{className:`flex flex-col items-center justify-center py-16 px-4 ${i}`,children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mb-4",children:e.jsx(t,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:a}),e.jsx("p",{className:"text-muted-foreground text-center max-w-md mb-6",children:n}),r&&e.jsx("button",{onClick:r,className:"px-6 py-2.5 bg-accent hover:bg-accent-hover text-accent-foreground font-medium rounded-lg transition-colors",children:s})]}),FQ=({isOpen:t,onClose:a,title:n="Filters",sections:s,onFilterChange:r,onApply:i,onClearAll:o,savedCount:c=0,showSavedOnly:l=!1,onToggleSavedOnly:h,savedLabel:u="Saved Items"})=>t?e.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:a,"aria-hidden":"true"}),e.jsxs("div",{className:"absolute inset-y-0 right-0 w-full max-w-sm bg-background shadow-xl flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(nn,{className:"w-5 h-5 text-accent"}),e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:n})]}),e.jsx("button",{onClick:a,className:"p-2 rounded-lg hover:bg-muted transition-colors","aria-label":"Close filters",children:e.jsx(tt,{className:"w-5 h-5 text-muted-foreground"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[s.map(p=>e.jsx(VQ,{section:p,onFilterChange:r},p.key)),h&&e.jsx("div",{className:"pt-4 border-t border-border",children:e.jsxs("button",{onClick:h,className:`w-full px-4 py-2.5 rounded-lg flex items-center justify-center gap-2 transition-colors ${l?"bg-accent text-accent-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:[e.jsx(Ut,{className:"w-4 h-4"}),e.jsxs("span",{className:"font-medium",children:[u," (",c,")"]})]})})]}),e.jsxs("div",{className:"p-4 border-t border-border space-y-2",children:[e.jsx("button",{onClick:()=>{i(),a()},className:"w-full py-2.5 bg-accent hover:bg-accent-hover text-accent-foreground font-medium rounded-lg transition-colors",children:"Apply Filters"}),e.jsx("button",{onClick:o,className:"w-full py-2.5 bg-muted hover:bg-muted/80 text-muted-foreground font-medium rounded-lg transition-colors",children:"Clear All"})]})]})]}):null,VQ=({section:t,onFilterChange:a})=>{var u,p,y;const[n,s]=b.useState(t.defaultExpanded??!0),[r,i]=b.useState(""),o=((u=t.options)==null?void 0:u.filter(m=>m.label.toLowerCase().includes(r.toLowerCase())))||[],c=m=>{const f=t.selectedValues.includes(m)?t.selectedValues.filter(x=>x!==m):[...t.selectedValues,m];a(t.key,f)},l=m=>{a(t.key,m?[m]:[])},h=t.searchable&&(((p=t.options)==null?void 0:p.length)||0)>6;return e.jsxs("div",{className:"border-b border-border pb-4 last:border-b-0",children:[e.jsxs("button",{onClick:()=>s(!n),className:"flex items-center justify-between w-full py-2",children:[e.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.label}),n?e.jsx(an,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(ka,{className:"w-4 h-4 text-muted-foreground"})]}),n&&e.jsxs("div",{className:"mt-2 space-y-2",children:[h&&e.jsxs("div",{className:"relative mb-3",children:[e.jsx(Rt,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx("input",{type:"text",value:r,onChange:m=>i(m.target.value),placeholder:`Search ${t.label.toLowerCase()}...`,className:"w-full h-9 pl-8 pr-3 text-sm rounded-md border border-input bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"})]}),t.type==="checkbox"&&e.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:o.map(m=>e.jsxs("label",{className:"flex items-center gap-3 p-2 rounded-md hover:bg-muted cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t.selectedValues.includes(m.value),onChange:()=>c(m.value),className:"h-4 w-4 rounded border-input text-accent focus:ring-accent"}),e.jsx("span",{className:"text-sm text-foreground flex-1",children:m.label}),m.count!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:m.count})]},m.value))}),(t.type==="select"||t.type==="searchable-select")&&e.jsxs("select",{value:t.selectedValues[0]||"",onChange:m=>l(m.target.value),className:"w-full h-10 px-3 rounded-md border border-input bg-background text-sm focus:outline-none focus:ring-2 focus:ring-ring",children:[e.jsxs("option",{value:"",children:["All ",t.label]}),(y=t.options)==null?void 0:y.map(m=>e.jsx("option",{value:m.value,children:m.label},m.value))]})]})]})},HQ=({filters:t,onRemove:a,onClearAll:n,onCreateAlert:s,showCreateAlert:r=!0,className:i=""})=>t.length===0?null:e.jsxs("div",{className:`flex flex-wrap items-center gap-2 ${i}`,children:[t.map(o=>e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-accent/10 text-accent border border-accent/20 rounded-full text-sm",children:[o.label&&e.jsxs("span",{className:"font-medium",children:[o.label,":"]}),e.jsx("span",{children:o.displayValue||o.value}),e.jsx("button",{onClick:()=>a(o.key,o.value),className:"ml-1 hover:text-accent-hover transition-colors","aria-label":`Remove ${o.label||o.key} filter`,children:e.jsx(tt,{className:"w-3.5 h-3.5"})})]},`${o.key}-${o.value}`)),e.jsx("button",{onClick:n,className:"inline-flex items-center px-3 py-1.5 bg-muted text-muted-foreground hover:bg-muted/80 rounded-full text-sm font-medium transition-colors",children:"Clear All"}),r&&s&&e.jsxs("button",{onClick:s,className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-primary/10 text-primary hover:bg-primary/20 rounded-full text-sm font-medium transition-colors",children:[e.jsx(tn,{className:"w-3.5 h-3.5"}),"Create Alert"]})]}),BQ=[{label:"compliance",value:"compliance"},{label:"CRM",value:"crm"},{label:"trading",value:"trading"},{label:"marketing",value:"marketing"},{label:"analytics",value:"analytics"},{label:"payments",value:"payments"},{label:"game-design",value:"game-design"},{label:"LatAm",value:"latam"}],$Q=[{value:"relevance",label:"Most Relevant"},{value:"rating",label:"Highest Rated"},{value:"reviews",label:"Most Reviews"},{value:"rate_asc",label:"Rate: Low to High"},{value:"rate_desc",label:"Rate: High to Low"},{value:"newest",label:"Newest Members"}],AO=({freelancers:t,filterOptions:a,loading:n,page:s,pageSize:r,totalCount:i,totalPages:o,onPageChange:c,onPageSizeChange:l,filters:h,onFiltersChange:u,onClearFilters:p,viewMode:y,onViewModeChange:m,followDisabled:f=!1,followLoading:x=!1,onToggleFollow:v,onFollowAction:k,saveDisabled:w=!1,saveLoading:j=!1,onToggleSave:M,onSaveAction:N,onEmitEvent:L})=>{const[C,S]=b.useState(h.search??""),[I,A]=b.useState(!1),_=h.tags??[],P=h.sortBy??"relevance";b.useEffect(()=>{S(h.search??"")},[h.search]);const E=b.useMemo(()=>t.filter(F=>F.isSaved).length,[t]),q=i===0?0:(s-1)*r+1,$=Math.min(s*r,i),V={currentPage:s,totalPages:o,totalItems:i,itemsPerPage:r,startIndex:q,endIndex:$},H=[{key:"types",label:"Type",type:"checkbox",searchable:!1,defaultExpanded:!0,options:a.types,selectedValues:h.types},{key:"specializations",label:"Specialization",type:"checkbox",searchable:!0,defaultExpanded:!0,options:a.specializations,selectedValues:h.specializations},{key:"experienceLevel",label:"Experience Level",type:"checkbox",searchable:!1,defaultExpanded:!0,options:a.experienceLevels,selectedValues:h.experienceLevel},{key:"locations",label:"Location",type:"checkbox",searchable:!0,defaultExpanded:!1,options:a.locations,selectedValues:h.locations},{key:"languages",label:"Language",type:"checkbox",searchable:!0,defaultExpanded:!1,options:a.languages,selectedValues:h.languages},{key:"availability",label:"Availability",type:"checkbox",searchable:!1,defaultExpanded:!1,options:a.availability,selectedValues:h.availability},{key:"signals",label:"Preferences",type:"toggle",defaultExpanded:!0,options:[{value:"verifiedOnly",label:"Verified Only"},{value:"topRatedOnly",label:"Top Rated Only"}],selectedValues:[...h.verifiedOnly?["verifiedOnly"]:[],...h.topRatedOnly?["topRatedOnly"]:[]]}],G=h.types.length+h.specializations.length+h.experienceLevel.length+h.locations.length+h.languages.length+h.availability.length+(h.verifiedOnly?1:0)+(h.topRatedOnly?1:0)+_.length,Y=[...h.types.map(F=>{var ie;return{key:"types",label:"Type",value:F,displayValue:((ie=a.types.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.specializations.map(F=>{var ie;return{key:"specializations",label:"Spec",value:F,displayValue:((ie=a.specializations.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.experienceLevel.map(F=>{var ie;return{key:"experienceLevel",label:"Level",value:F,displayValue:((ie=a.experienceLevels.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.locations.map(F=>{var ie;return{key:"locations",label:"Location",value:F,displayValue:((ie=a.locations.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.languages.map(F=>{var ie;return{key:"languages",label:"Language",value:F,displayValue:((ie=a.languages.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.availability.map(F=>{var ie;return{key:"availability",label:"Avail",value:F,displayValue:((ie=a.availability.find(ce=>ce.value===F))==null?void 0:ie.label)??F}}),...h.verifiedOnly?[{key:"verifiedOnly",label:"",value:"verifiedOnly",displayValue:"Verified Only"}]:[],...h.topRatedOnly?[{key:"topRatedOnly",label:"",value:"topRatedOnly",displayValue:"Top Rated Only"}]:[],..._.map(F=>({key:"tag",label:"Tag",value:F,displayValue:`#${F}`}))],z=F=>{u({...h,search:F}),c(1)},te=F=>{const ie=_.includes(F)?_.filter(ce=>ce!==F):[..._,F];u({...h,tags:ie}),c(1)},U=F=>{u({...h,tags:_.filter(ie=>ie!==F)}),c(1)},ae=(F,ie)=>{u(F==="signals"?{...h,verifiedOnly:ie.includes("verifiedOnly"),topRatedOnly:ie.includes("topRatedOnly")}:{...h,[F]:ie}),c(1)},D=(F,ie)=>{u(F==="tag"?{...h,tags:_.filter(ce=>ce!==ie)}:F==="verifiedOnly"?{...h,verifiedOnly:!1}:F==="topRatedOnly"?{...h,topRatedOnly:!1}:{...h,[F]:h[F].filter(ce=>ce!==ie)}),c(1)},B=()=>{p(),S(""),c(1)},he=F=>m(F),W=F=>{l(F)},de=F=>{u({...h,sortBy:F}),c(1)},ve=F=>{c(F),window.scrollTo({top:0,behavior:"smooth"})},K=F=>{console.log("Contact freelancer:",F)};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(RQ,{title:"iGaming Talent Marketplace",description:"Connect with top freelancers, coaches, mentors, and consultants specializing in the iGaming industry.",popularTags:BQ,selectedTags:_,onTagClick:te,onTagRemove:U}),e.jsx("div",{className:"bg-secondary/30 border-b border-border",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:e.jsx(TQ,{value:C,onChange:S,onSubmit:z,onClear:()=>{S(""),u({...h,search:""})},onFilterClick:()=>A(!0),placeholder:"Search by skill, specialization, or name...",filterCount:G})})}),e.jsx("section",{className:"py-6",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[Y.length>0&&e.jsx(HQ,{filters:Y,onRemove:D,onClearAll:B,showCreateAlert:!0,onCreateAlert:()=>console.log("Create alert"),className:"mb-4"}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("aside",{className:"hidden lg:block w-72 flex-shrink-0",children:e.jsx("div",{className:"sticky top-24",children:e.jsx(EQ,{title:"Filters",sections:H,onFilterChange:ae,onClearAll:B,activeFiltersCount:G,savedCount:E,savedLabel:"Saved Talent"})})}),e.jsxs("main",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"hidden lg:block",children:e.jsx(DQ,{viewMode:y,onViewModeChange:he,sortBy:P,sortOptions:$Q,onSortChange:de,itemsPerPage:r,onItemsPerPageChange:W,pagination:V,itemLabel:"talent"})}),n?e.jsx("div",{className:"flex flex-col items-center justify-center py-16 text-muted-foreground",children:e.jsx("span",{children:"Loading talent..."})}):t.length===0?e.jsx(qQ,{icon:kt,title:"No talent found",description:"Try adjusting your search or filter criteria to find more results.",actionLabel:"Clear All Filters",onAction:B}):e.jsx("div",{className:y==="grid"?"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-4 mt-4":"flex flex-col gap-4 mt-4",children:t.map((F,ie)=>e.jsx(_Q,{freelancer:F,viewMode:y,isSaved:F.isSaved,isFollowing:F.isFollowing,followDisabled:f,followLoading:x,onToggleFollow:v,onFollowAction:k,saveDisabled:w,saveLoading:j,onToggleSave:M,onSaveAction:N,onContact:K,onViewProfile:()=>console.log(F.id),onEmitEvent:L,positionInList:ie+1},F.id))}),!n&&o>1&&e.jsx(zQ,{pagination:V,onPageChange:ve,className:"mt-8"})]})]})]})}),e.jsx(FQ,{isOpen:I,onClose:()=>A(!1),sections:H,onFilterChange:ae,onApply:()=>A(!1),onClearAll:B,savedCount:E,savedLabel:"Saved Talent"}),e.jsx(US,{})]})},dl=[{id:"1",name:"Marcus Chen",slug:"marcus-chen",avatar:"/placeholder.svg",title:"iGaming Compliance Consultant",tagline:"Helping operators navigate regulatory landscapes across 15+ jurisdictions",type:"consultant",specializations:["Compliance","Licensing","Responsible Gaming"],skills:["MGA Licensing","UKGC Compliance","AML/KYC","Risk Assessment","Policy Development"],experienceLevel:"Expert",yearsOfExperience:12,location:{country:"Malta",city:"Sliema",timezone:"CET"},hourlyRate:{min:150,max:250,currency:"EUR"},rating:4.9,reviewCount:127,completedProjects:89,successRate:98,responseTime:"< 2 hours",availability:"available",languages:["English","Mandarin","Maltese"],bio:"Former Head of Compliance at a major iGaming operator with extensive experience in obtaining and maintaining licenses across European and emerging markets.",highlights:["Secured 12+ gaming licenses for clients","Led compliance teams at tier-1 operators","Speaker at ICE London and SBC Summit"],certifications:["CGMA","CAMS","ICA Diploma"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-03-15",lastActive:"2024-01-20",isSaved:!1},{id:"2",name:"Sofia Rodriguez",slug:"sofia-rodriguez",avatar:"/placeholder.svg",title:"CRM & Retention Strategy Coach",tagline:"Transforming player engagement through data-driven retention strategies",type:"coach",specializations:["CRM","Player Retention","Marketing Automation"],skills:["Optimove","Salesforce","Player Segmentation","Lifecycle Marketing","Bonus Optimization"],experienceLevel:"Expert",yearsOfExperience:8,location:{country:"Spain",city:"Barcelona",timezone:"CET"},hourlyRate:{min:120,max:180,currency:"EUR"},sessionRate:{duration:"60 min",price:150,currency:"EUR"},rating:4.8,reviewCount:94,completedProjects:156,successRate:96,responseTime:"< 4 hours",availability:"available",languages:["English","Spanish","Portuguese"],bio:"I help iGaming companies maximize player lifetime value through strategic CRM implementation and team coaching.",highlights:["Increased client retention rates by 35% on average","Trained 50+ CRM professionals","Built retention programs for 3 unicorn startups"],certifications:["Optimove Certified Expert","HubSpot Marketing"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2020-08-22",lastActive:"2024-01-21",isSaved:!0},{id:"3",name:"James O'Brien",slug:"james-obrien",avatar:"/placeholder.svg",title:"Sports Trading Mentor",tagline:"Ex-Betfair trader teaching the art of odds compilation and risk management",type:"mentor",specializations:["Sports Trading","Odds Compilation","Risk Management"],skills:["Football Trading","In-Play Markets","Pricing Models","Liability Management","Market Making"],experienceLevel:"Expert",yearsOfExperience:15,location:{country:"United Kingdom",city:"London",timezone:"GMT"},hourlyRate:{min:200,max:300,currency:"GBP"},sessionRate:{duration:"90 min",price:275,currency:"GBP"},rating:5,reviewCount:52,completedProjects:38,successRate:100,responseTime:"< 24 hours",availability:"limited",languages:["English"],bio:"15 years of experience in sports trading at Betfair, Paddy Power, and as an independent consultant. I mentor aspiring traders and help sportsbooks optimize their trading operations.",highlights:["Managed £50M+ in liabilities","Trained traders at 5 major sportsbooks","Developed proprietary pricing algorithms"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2022-01-10",lastActive:"2024-01-19",isSaved:!1},{id:"4",name:"Elena Kowalski",slug:"elena-kowalski",avatar:"/placeholder.svg",title:"Freelance Game Designer",tagline:"Creating engaging slot mechanics and bonus features that players love",type:"freelancer",specializations:["Game Design","Slots","Math Models"],skills:["Slot Design","Game Math","Feature Design","Unity","Volatility Modeling"],experienceLevel:"Intermediate",yearsOfExperience:5,location:{country:"Poland",city:"Warsaw",timezone:"CET"},hourlyRate:{min:60,max:90,currency:"EUR"},rating:4.7,reviewCount:43,completedProjects:28,successRate:95,responseTime:"< 6 hours",availability:"available",languages:["English","Polish","German"],bio:"Passionate game designer specializing in slot games. I combine mathematical precision with creative mechanics to deliver games that perform.",highlights:["Designed 15+ launched slot titles","Featured game at ICE 2023","Average 4.5/5 player rating"],certifications:["Unity Certified Developer"],portfolio:[{title:"Golden Dragon Slots",description:"High-volatility Asian-themed slot with cascading reels",thumbnail:"/placeholder.svg"}],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-02-18",lastActive:"2024-01-21",isSaved:!1},{id:"5",name:"David Andersson",slug:"david-andersson",avatar:"/placeholder.svg",title:"Affiliate Marketing Consultant",tagline:"Building and scaling affiliate programs for iGaming operators",type:"consultant",specializations:["Affiliate Marketing","Partner Management","Performance Marketing"],skills:["Affiliate Programs","Income Access","NetRefer","SEO","Content Strategy"],experienceLevel:"Expert",yearsOfExperience:10,location:{country:"Sweden",city:"Stockholm",timezone:"CET"},hourlyRate:{min:130,max:200,currency:"EUR"},rating:4.8,reviewCount:76,completedProjects:67,successRate:97,responseTime:"< 3 hours",availability:"available",languages:["English","Swedish","Norwegian"],bio:"Former Affiliate Director at LeoVegas. I help operators build, optimize, and scale their affiliate programs for sustainable growth.",highlights:["Grew affiliate revenue 400% at previous role","Managed 2000+ affiliate relationships","Launched programs in 8 markets"],certifications:["Google Analytics","Google Ads"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-06-01",lastActive:"2024-01-20",isSaved:!1},{id:"6",name:"Anna Petrova",slug:"anna-petrova",avatar:"/placeholder.svg",title:"Product Management Coach",tagline:"Coaching iGaming PMs to build products players can't put down",type:"coach",specializations:["Product Management","Sportsbook","Casino"],skills:["Roadmapping","User Research","Agile","A/B Testing","OKRs"],experienceLevel:"Expert",yearsOfExperience:9,location:{country:"Estonia",city:"Tallinn",timezone:"EET"},hourlyRate:{min:100,max:160,currency:"EUR"},sessionRate:{duration:"60 min",price:120,currency:"EUR"},rating:4.9,reviewCount:88,completedProjects:112,successRate:99,responseTime:"< 4 hours",availability:"available",languages:["English","Russian","Estonian"],bio:"I help product managers in iGaming level up their skills through 1:1 coaching, workshops, and hands-on project support.",highlights:["Coached 100+ PMs across 20 companies","Former VP Product at Playtech","Built products serving 5M+ users"],certifications:["SVPG Certified","Pragmatic Marketing"],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2020-11-05",lastActive:"2024-01-21",isSaved:!1},{id:"7",name:"Thomas Müller",slug:"thomas-muller",avatar:"/placeholder.svg",title:"Payment Solutions Freelancer",tagline:"Integrating payment systems and optimizing transaction flows for gaming",type:"freelancer",specializations:["Payments","Integration","Fintech"],skills:["Payment Gateways","Crypto Payments","API Integration","PCI DSS","Fraud Prevention"],experienceLevel:"Intermediate",yearsOfExperience:6,location:{country:"Germany",city:"Berlin",timezone:"CET"},hourlyRate:{min:80,max:120,currency:"EUR"},rating:4.6,reviewCount:31,completedProjects:24,successRate:92,responseTime:"< 8 hours",availability:"limited",languages:["English","German"],bio:"Specialized in payment integrations for the iGaming industry. From traditional methods to crypto, I handle the full payment stack.",highlights:["Integrated 50+ payment providers","Reduced checkout abandonment by 25%","PCI DSS implementation experience"],certifications:["PCI DSS Professional","Stripe Certified"],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-05-12",lastActive:"2024-01-18",isSaved:!1},{id:"8",name:"Maria Santos",slug:"maria-santos",avatar:"/placeholder.svg",title:"LatAm Market Entry Mentor",tagline:"Your guide to launching and scaling in Latin American markets",type:"mentor",specializations:["Market Entry","LatAm","Business Development"],skills:["Brazil Regulations","Colombia Licensing","Local Partnerships","Cultural Adaptation"],experienceLevel:"Expert",yearsOfExperience:11,location:{country:"Brazil",city:"São Paulo",timezone:"BRT"},hourlyRate:{min:100,max:150,currency:"USD"},sessionRate:{duration:"60 min",price:125,currency:"USD"},rating:4.8,reviewCount:45,completedProjects:33,successRate:94,responseTime:"< 6 hours",availability:"available",languages:["English","Portuguese","Spanish"],bio:"Helping international operators successfully enter and expand in Latin American markets. Deep expertise in Brazil, Colombia, and Argentina.",highlights:["Guided 8 operators into LatAm","Former GM at major LatAm operator","Network across 5 LatAm jurisdictions"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!0,isRisingTalent:!1,joinedDate:"2021-09-28",lastActive:"2024-01-20",isSaved:!1},{id:"9",name:"Alex Thompson",slug:"alex-thompson",avatar:"/placeholder.svg",title:"Data Analytics Freelancer",tagline:"Turning player data into actionable insights and predictive models",type:"freelancer",specializations:["Data Analytics","BI","Player Insights"],skills:["Python","SQL","Tableau","Power BI","Machine Learning","Player Segmentation"],experienceLevel:"Intermediate",yearsOfExperience:4,location:{country:"Ireland",city:"Dublin",timezone:"GMT"},hourlyRate:{min:70,max:100,currency:"EUR"},rating:4.5,reviewCount:22,completedProjects:18,successRate:89,responseTime:"< 12 hours",availability:"available",languages:["English"],bio:"Data analyst specializing in player behavior analysis, churn prediction, and building dashboards that drive decisions.",highlights:["Built ML models predicting VIP potential","Created real-time dashboards for 3 operators","Reduced churn by 18% through insights"],certifications:["Google Data Analytics","Tableau Desktop Specialist"],portfolio:[],isVerified:!0,isTopRated:!1,isFeatured:!1,isRisingTalent:!0,joinedDate:"2023-08-01",lastActive:"2024-01-21",isSaved:!1},{id:"10",name:"Yuki Tanaka",slug:"yuki-tanaka",avatar:"/placeholder.svg",title:"Asian Markets Consultant",tagline:"Expert in Japan, Philippines, and emerging Asian gaming markets",type:"consultant",specializations:["Asian Markets","Licensing","Localization"],skills:["Japan Regulations","PAGCOR","Market Research","Cultural Localization"],experienceLevel:"Expert",yearsOfExperience:14,location:{country:"Japan",city:"Tokyo",timezone:"JST"},hourlyRate:{min:180,max:280,currency:"USD"},rating:4.9,reviewCount:38,completedProjects:29,successRate:97,responseTime:"< 8 hours",availability:"limited",languages:["English","Japanese","Mandarin"],bio:"Bridging Western operators with Asian opportunities. Deep regulatory knowledge and local networks across key Asian jurisdictions.",highlights:["Advised on 5 PAGCOR licenses","Former regulatory affairs at major Japanese gaming firm","Connected 20+ Western operators to Asian partners"],certifications:[],portfolio:[],isVerified:!0,isTopRated:!0,isFeatured:!1,isRisingTalent:!1,joinedDate:"2020-04-15",lastActive:"2024-01-19",isSaved:!1}],UQ=[...new Set(dl.flatMap(t=>t.specializations))].sort();[...new Set(dl.flatMap(t=>t.skills))].sort();const GQ=[...new Set(dl.map(t=>t.location.country))].sort(),WQ=[...new Set(dl.flatMap(t=>t.languages))].sort(),ZQ=[{value:"freelancer",label:"Freelancer"},{value:"coach",label:"Coach"},{value:"mentor",label:"Mentor"},{value:"consultant",label:"Consultant"},{value:"streamer",label:"Streamer"},{value:"influencer",label:"Influencer"}],YQ=[{value:"Entry",label:"Entry Level"},{value:"Intermediate",label:"Intermediate"},{value:"Expert",label:"Expert"},{value:"Top Rated",label:"Top Rated"}],XQ=[{value:"available",label:"Available Now"},{value:"limited",label:"Limited Availability"}],jA={search:"",tags:[],sortBy:"relevance",types:[],specializations:[],experienceLevel:[],locations:[],languages:[],priceRange:null,availability:[],verifiedOnly:!1,topRatedOnly:!1},JQ=()=>{const[t,a]=b.useState(dl),[n,s]=b.useState(jA),[r,i]=b.useState(1),[o,c]=b.useState(10),[l,h]=b.useState("list"),u=b.useMemo(()=>({types:ZQ.map(L=>({...L,count:t.filter(C=>C.type===L.value).length})),specializations:UQ.map(L=>({value:L,label:L,count:t.filter(C=>C.specializations.includes(L)).length})),experienceLevels:YQ.map(L=>({...L,count:t.filter(C=>C.experienceLevel===L.value).length})),locations:GQ.map(L=>({value:L,label:L,count:t.filter(C=>C.location.country===L).length})),languages:WQ.map(L=>({value:L,label:L,count:t.filter(C=>C.languages.includes(L)).length})),availability:XQ.map(L=>({...L,count:t.filter(C=>C.availability===L.value).length}))}),[t]),p=b.useMemo(()=>{let L=[...t];if(n.search){const C=n.search.toLowerCase();L=L.filter(S=>S.name.toLowerCase().includes(C)||S.title.toLowerCase().includes(C)||S.tagline.toLowerCase().includes(C)||S.skills.some(I=>I.toLowerCase().includes(C))||S.specializations.some(I=>I.toLowerCase().includes(C)))}if(n.types.length>0&&(L=L.filter(C=>n.types.includes(C.type))),n.specializations.length>0&&(L=L.filter(C=>C.specializations.some(S=>n.specializations.includes(S)))),n.experienceLevel.length>0&&(L=L.filter(C=>n.experienceLevel.includes(C.experienceLevel))),n.locations.length>0&&(L=L.filter(C=>n.locations.includes(C.location.country))),n.languages.length>0&&(L=L.filter(C=>C.languages.some(S=>n.languages.includes(S)))),n.availability.length>0&&(L=L.filter(C=>n.availability.includes(C.availability))),n.verifiedOnly&&(L=L.filter(C=>C.isVerified)),n.topRatedOnly&&(L=L.filter(C=>C.isTopRated)),(n.tags??[]).length>0){const C=n.tags??[];L=L.filter(S=>C.some(I=>S.specializations.some(A=>A.toLowerCase().includes(I))||S.skills.some(A=>A.toLowerCase().includes(I))||S.title.toLowerCase().includes(I)))}switch(n.sortBy){case"rating":L.sort((C,S)=>S.rating-C.rating);break;case"reviews":L.sort((C,S)=>S.reviewCount-C.reviewCount);break;case"rate_asc":L.sort((C,S)=>C.hourlyRate.min-S.hourlyRate.min);break;case"rate_desc":L.sort((C,S)=>S.hourlyRate.max-C.hourlyRate.max);break;case"newest":L.sort((C,S)=>new Date(S.joinedDate).getTime()-new Date(C.joinedDate).getTime());break;default:L.sort((C,S)=>C.isFeatured!==S.isFeatured?C.isFeatured?-1:1:C.isTopRated!==S.isTopRated?C.isTopRated?-1:1:S.rating-C.rating)}return L},[n,t]),y=p.length,m=Math.ceil(y/o),f=p.slice((r-1)*o,r*o),x=L=>{s(L),i(1)},v=()=>{s(jA),i(1)},k=L=>{i(L)},w=L=>{c(L),i(1)},j=L=>{h(L)},M=(L,C)=>{a(S=>S.map(I=>I.id===L?{...I,isSaved:C}:I))},N=(L,C)=>{a(S=>S.map(I=>I.id===L?{...I,isFollowing:C}:I))};return e.jsx(AO,{freelancers:f,filterOptions:u,loading:!1,page:r,pageSize:o,totalCount:y,totalPages:m,onPageChange:k,onPageSizeChange:w,filters:n,onFiltersChange:x,onClearFilters:v,viewMode:l,onViewModeChange:j,onToggleSave:M,onToggleFollow:N})},KQ=()=>{const[t,a]=b.useState(dl[0]??null),n=(r,i)=>{a(o=>o&&o.id===r?{...o,isSaved:i}:o)},s=(r,i)=>{a(o=>o&&o.id===r?{...o,isFollowing:i}:o)};return e.jsx(IO,{freelancer:t,onToggleSave:n,onToggleFollow:s,onContact:r=>console.log("Contact freelancer:",r)})},QQ=({suggestions:t,selectedId:a,onSelect:n,onApprove:s,onReject:r,emptyState:i="No suggestions match the current filters.",title:o="Taxonomy suggestions"})=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:o})}),e.jsx(le,{children:t.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:i}):e.jsx("div",{className:"space-y-3",children:t.map(c=>e.jsx("div",{className:`rounded-lg border p-4 transition hover:bg-muted/50 ${a===c.id?"border-primary bg-muted/40":"bg-background"}`,children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("button",{type:"button",onClick:()=>n==null?void 0:n(c),className:"flex-1 text-left",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:c.term}),c.status&&e.jsx(se,{variant:c.status==="approved"?"default":c.status==="rejected"?"destructive":"secondary",children:c.status})]}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Namespace: ",c.namespace||"Unassigned",e.jsx(cs,{orientation:"vertical",className:"mx-2 inline-flex h-4 align-middle"}),"Canonical: ",c.canonical||"Pending"]}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[c.scopes.map(l=>e.jsx(se,{variant:"outline",children:l},l)),typeof c.count=="number"&&e.jsxs(se,{variant:"secondary",children:[c.count," occurrences"]})]})]}),(s||r)&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[r&&e.jsx(T,{type:"button",variant:"outline",onClick:()=>r(c),children:"Reject"}),s&&e.jsx(T,{type:"button",onClick:()=>s(c),children:"Approve"})]})]})},c.id))})})]}),PO=({title:t="Examples",examples:a=[],emptyState:n="No examples were provided for this suggestion."})=>e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:t})}),e.jsx(le,{children:a.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:n}):e.jsx(UR,{className:"h-56 pr-4",children:e.jsx("ul",{className:"space-y-3",children:a.map((s,r)=>e.jsx("li",{className:"rounded-lg border bg-muted/40 p-3 text-sm",children:s},`${s}-${r}`))})})})]}),eee=({suggestion:t,title:a="Suggestion detail",description:n="Review the suggestion before approving or rejecting.",emptyState:s="Select a suggestion to view more information.",approveForm:r})=>t?e.jsxs("div",{className:"space-y-6",children:[e.jsxs(oe,{children:[e.jsxs(ye,{children:[e.jsx(xe,{children:a}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n})]}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-2xl font-semibold text-foreground",children:t.term}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.status&&e.jsx(se,{variant:t.status==="approved"?"default":t.status==="rejected"?"destructive":"secondary",children:t.status}),t.count!==void 0&&e.jsxs(se,{variant:"secondary",children:[t.count," occurrences"]}),t.source&&e.jsx(se,{variant:"outline",children:t.source})]})]}),e.jsx(cs,{}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Namespace"}),e.jsx("p",{className:"text-base text-foreground",children:t.namespace||"Unassigned"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Canonical term"}),e.jsx("p",{className:"text-base text-foreground",children:t.canonical||"Pending"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Scopes"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t.scopes.length===0?e.jsx("span",{className:"text-sm text-muted-foreground",children:"No scopes assigned"}):t.scopes.map(i=>e.jsx(se,{variant:"outline",children:i},i))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Last updated"}),e.jsx("p",{className:"text-base text-foreground",children:t.updatedAt||"Not available"})]})]})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,360px)]",children:[e.jsx(PO,{examples:t.examples}),r&&e.jsx("div",{children:r})]})]}):e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:a})}),e.jsx(le,{children:e.jsx("p",{className:"text-sm text-muted-foreground",children:s})})]}),tee=({namespaceOptions:t,scopeOptions:a,defaultNamespace:n="",defaultCanonical:s="",defaultScopes:r=[],isSubmitting:i=!1,onApprove:o,onReject:c,approveLabel:l="Approve",rejectLabel:h="Reject"})=>{const[u,p]=b.useState(n),[y,m]=b.useState(s),[f,x]=b.useState(r);b.useEffect(()=>{p(n)},[n]),b.useEffect(()=>{m(s)},[s]),b.useEffect(()=>{x(r)},[r]);const v=b.useMemo(()=>[...a].sort(),[a]),k=j=>{x(M=>M.includes(j)?M.filter(N=>N!==j):[...M,j])},w=()=>{o({namespace:u.trim(),canonical:y.trim(),scopes:f})};return e.jsxs(oe,{children:[e.jsx(ye,{children:e.jsx(xe,{children:"Approval details"})}),e.jsxs(le,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"taxonomy-namespace",children:"Namespace"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(j=>e.jsx(T,{type:"button",variant:u===j?"default":"outline",size:"sm",onClick:()=>p(j),children:j},j))}),e.jsx(fe,{id:"taxonomy-namespace",value:u,onChange:j=>p(j.target.value),placeholder:"Enter namespace"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"taxonomy-canonical",children:"Canonical term"}),e.jsx(fe,{id:"taxonomy-canonical",value:y,onChange:j=>m(j.target.value),placeholder:"Normalized taxonomy value"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{children:"Scopes"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:v.map(j=>e.jsxs("label",{className:"flex items-center gap-2 rounded-md border px-3 py-2 text-sm",children:[e.jsx(Xt,{checked:f.includes(j),onCheckedChange:()=>k(j)}),e.jsx("span",{children:j})]},j))}),f.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:f.map(j=>e.jsx(se,{variant:"secondary",children:j},j))})]})]}),e.jsxs(ds,{className:"flex flex-col gap-3 sm:flex-row sm:justify-end",children:[e.jsx(T,{type:"button",variant:"outline",onClick:c,disabled:i,children:h}),e.jsx(T,{type:"button",onClick:w,disabled:i,children:l})]})]})},_O=5e3,aee=220,Ka={ADD:"ADD",UPDATE:"UPDATE",DISMISS:"DISMISS",REMOVE:"REMOVE",CLEAR:"CLEAR"},h9=[];let ec={notifications:[]},cN=0;const Va=new Map,Zl=new Map,nee=()=>(cN=(cN+1)%Number.MAX_SAFE_INTEGER,cN.toString()),RO=t=>{if(t.persistent||t.duration===0||t.duration===1/0)return;const a=t.duration??_O;Va.has(t.id)&&clearTimeout(Va.get(t.id));const n=setTimeout(()=>{SL(t.id)},a);Va.set(t.id,n)},MA=t=>{if(Zl.has(t))return;const a=setTimeout(()=>{Zl.delete(t),pd({type:Ka.REMOVE,id:t})},aee);Zl.set(t,a)},see=(t,a)=>{switch(a.type){case Ka.ADD:return{notifications:[a.notification,...t.notifications]};case Ka.UPDATE:return{notifications:t.notifications.map(n=>n.id===a.notification.id?{...n,...a.notification}:n)};case Ka.DISMISS:return{notifications:t.notifications.map(n=>a.id===void 0||n.id===a.id?{...n,status:"leaving"}:n)};case Ka.REMOVE:return a.id?{notifications:t.notifications.filter(n=>n.id!==a.id)}:{notifications:[]};case Ka.CLEAR:return{notifications:[]};default:return t}},pd=t=>{ec=see(ec,t),h9.forEach(a=>a(ec))},TO=t=>{const n={id:t.id??nee(),type:t.type??"info",title:t.title,message:t.message,content:t.content,duration:t.duration??_O,persistent:t.persistent??!1,actions:t.actions,icon:t.icon,className:t.className,titleClassName:t.titleClassName,messageClassName:t.messageClassName,role:t.role,ariaLabel:t.ariaLabel,onDismiss:t.onDismiss,status:"active",createdAt:Date.now()};return pd({type:Ka.ADD,notification:n}),RO(n),n},DO=t=>{pd({type:Ka.UPDATE,notification:t});const a=ec.notifications.find(n=>n.id===t.id);a&&RO({...a,...t})},SL=t=>{var a;if(t){const n=ec.notifications.find(s=>s.id===t);(a=n==null?void 0:n.onDismiss)==null||a.call(n,t),Va.has(t)&&(clearTimeout(Va.get(t)),Va.delete(t)),MA(t)}else ec.notifications.forEach(n=>{var s;(s=n.onDismiss)==null||s.call(n,n.id),Va.has(n.id)&&(clearTimeout(Va.get(n.id)),Va.delete(n.id)),MA(n.id)});pd({type:Ka.DISMISS,id:t})},EO=()=>{Va.forEach(t=>clearTimeout(t)),Va.clear(),Zl.forEach(t=>clearTimeout(t)),Zl.clear(),pd({type:Ka.CLEAR})},OO=()=>{const[t,a]=g.useState(ec);return g.useEffect(()=>(h9.push(a),()=>{const n=h9.indexOf(a);n>-1&&h9.splice(n,1)}),[]),{notifications:t.notifications,notify:TO,update:DO,dismiss:SL,clear:EO}},ree={success:{container:"border-emerald-200 bg-emerald-50 text-emerald-950",icon:"text-emerald-600",title:"text-emerald-950"},error:{container:"border-red-200 bg-red-50 text-red-950",icon:"text-red-600",title:"text-red-950"},warning:{container:"border-amber-200 bg-amber-50 text-amber-950",icon:"text-amber-600",title:"text-amber-950"},info:{container:"border-blue-200 bg-blue-50 text-blue-950",icon:"text-blue-600",title:"text-blue-950"},custom:{container:"border-border bg-background text-foreground",icon:"text-foreground",title:"text-foreground"}},iee={success:Qe,error:Fa,warning:Yn,info:Tc,custom:Tc},oee={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"bg-transparent text-current hover:bg-black/5"},cee=({notification:t,onDismiss:a,actionClassName:n,closeButtonClassName:s,notificationClassName:r,titleClassName:i,messageClassName:o,variantClassNames:c,iconClassNames:l,renderIcon:h})=>{const u=ree[t.type],p=iee[t.type],y=t.role??(t.type==="error"?"alert":"status"),m=y==="alert"?"assertive":"polite";return e.jsx("div",{role:y,"aria-live":m,"aria-label":t.ariaLabel,className:pe("pointer-events-auto w-full max-w-sm rounded-lg border px-4 py-3 shadow-lg transition-all duration-200",t.status==="leaving"?"opacity-0 translate-y-2":"opacity-100 translate-y-0",u.container,c==null?void 0:c[t.type],r,t.className),children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:t.icon??(h?h(t.type):e.jsx(p,{className:pe("h-5 w-5",u.icon,l==null?void 0:l[t.type])}))}),e.jsxs("div",{className:"flex-1",children:[t.content?t.content:e.jsxs(e.Fragment,{children:[t.title&&e.jsx("div",{className:pe("text-sm font-semibold",u.title,i,t.titleClassName),children:t.title}),t.message&&e.jsx("div",{className:pe("text-sm opacity-90",o,t.messageClassName),children:t.message})]}),t.actions&&t.actions.length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:t.actions.map(f=>{const x=pe("inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium transition-colors",oee[f.variant??"secondary"],n),v=()=>{var k;(k=f.onClick)==null||k.call(f,t.id),f.autoDismiss!==!1&&a(t.id)};return f.href?e.jsx("a",{href:f.href,target:f.target,rel:f.target==="_blank"?"noreferrer":void 0,className:x,onClick:v,"aria-label":f.ariaLabel,children:f.label},f.label):e.jsx("button",{type:"button",className:x,onClick:v,"aria-label":f.ariaLabel,children:f.label},f.label)})})]}),e.jsxs("button",{type:"button",onClick:()=>a(t.id),className:pe("rounded-md p-1 text-current/60 transition hover:text-current focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",s),"aria-label":"Dismiss notification",children:[e.jsx("span",{className:"sr-only",children:"Dismiss"}),e.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-4 w-4",children:e.jsx("path",{d:"M6 6l12 12M18 6l-12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]})})},lee={"top-left":"top-4 left-4 items-start","top-right":"top-4 right-4 items-end","top-center":"top-4 left-1/2 -translate-x-1/2 items-center","bottom-left":"bottom-4 left-4 items-start","bottom-right":"bottom-4 right-4 items-end","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center",center:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 items-center"},zO=({notifications:t,placement:a="top-right",containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,onDismiss:m,maxVisible:f})=>{const x=f?t.slice(0,f):t;return x.length===0?null:e.jsx("div",{className:pe("pointer-events-none fixed z-[100] flex max-h-screen w-full flex-col gap-3 px-4",lee[a],n),style:s,children:e.jsx("div",{className:pe("flex w-full flex-col gap-3",r),children:x.map(v=>e.jsx(cee,{notification:v,onDismiss:m,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y},v.id))})})},qO=g.createContext(null),dee=({children:t,placement:a,containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,maxVisible:m})=>{const f=OO();return e.jsxs(qO.Provider,{value:f,children:[t,e.jsx(zO,{notifications:f.notifications,placement:a,containerClassName:n,containerStyle:s,stackClassName:r,notificationClassName:i,titleClassName:o,messageClassName:c,actionClassName:l,closeButtonClassName:h,variantClassNames:u,iconClassNames:p,renderIcon:y,onDismiss:f.dismiss,maxVisible:m})]})},FO=()=>{const t=g.useContext(qO),a=OO();return t||a},hee={"bottom-right":{button:"bottom-6 right-6",panel:"bottom-20 right-6"},"bottom-left":{button:"bottom-6 left-6",panel:"bottom-20 left-6"},"top-right":{button:"top-6 right-6",panel:"top-20 right-6"},"top-left":{button:"top-6 left-6",panel:"top-20 left-6"}},uee=[{label:"Profile updated",payload:{type:"success",title:"Profile updated",message:"Your changes were saved successfully."}},{label:"Login failed",payload:{type:"error",title:"Login failed",message:"We couldn't sign you in. Please try again.",actions:[{label:"Retry",variant:"primary",onClick:()=>{}}]}},{label:"Missing fields",payload:{type:"warning",title:"Missing fields",message:"Fill out the required fields before continuing."}},{label:"New message",payload:{type:"info",title:"New message",message:"You received a new message from Support."}},{label:"Backend error",payload:{type:"error",title:"Backend error",message:"We hit an issue on our side. Please report this error.",actions:[{label:"Report",variant:"secondary",onClick:()=>{}}]}}],pee=["success","error","warning","info"],mee=({position:t="bottom-right",buttonLabel:a="Test notifications",panelTitle:n="Notification tester",defaultType:s="success",defaultTitle:r="Notification title",defaultMessage:i="Notification message",allowCustomMessage:o=!0,allowCustomTitle:c=!0,allowActions:l=!0,allowDuration:h=!0,allowPersistent:u=!0,showAllTypes:p=!0,presetCases:y,onTrigger:m})=>{const{notify:f}=FO(),[x,v]=g.useState(!1),[k,w]=g.useState(s),[j,M]=g.useState(r),[N,L]=g.useState(i),[C,S]=g.useState("5000"),[I,A]=g.useState(!1),[_,P]=g.useState(!1),[E,q]=g.useState("View details"),$=y&&y.length>0?y:uee,V=p?pee:[s];g.useEffect(()=>{w(s)},[s]),g.useEffect(()=>{M(r)},[r]),g.useEffect(()=>{L(i)},[i]),g.useEffect(()=>{if(!x)return;const z=te=>{te.key==="Escape"&&v(!1)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[x]);const H=z=>{f(z),m==null||m(z)},G=z=>{z.preventDefault();const te=Number.parseInt(C,10),U=Number.isFinite(te)&&te>=0;H({type:k,title:c?j:r,message:o?N:i,duration:h&&!I&&U?te:void 0,persistent:u?I:void 0,actions:l&&_&&E?[{label:E,variant:"primary",onClick:()=>{}}]:void 0})},Y=hee[t];return e.jsxs("div",{className:"fixed z-50",children:[e.jsx("button",{type:"button",className:pe("fixed inline-flex items-center justify-center rounded-full bg-primary px-4 py-3 text-sm font-semibold text-primary-foreground shadow-lg transition hover:bg-primary/90",Y.button),onClick:()=>v(z=>!z),children:a}),x&&e.jsxs("div",{className:pe("fixed w-[320px] rounded-2xl border border-border bg-background p-4 shadow-2xl",Y.panel),children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:n}),e.jsxs("button",{type:"button",className:"rounded-md p-1 text-muted-foreground transition hover:text-foreground",onClick:()=>v(!1),children:[e.jsx("span",{className:"sr-only",children:"Close"}),e.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-4 w-4",children:e.jsx("path",{d:"M6 6l12 12M18 6l-12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})]})]}),e.jsxs("form",{className:"space-y-3",onSubmit:G,children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-type",children:"Type"}),e.jsx("select",{id:"notification-type",className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:k,onChange:z=>w(z.target.value),children:V.map(z=>e.jsx("option",{value:z,children:z},z))})]}),c?e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-title",children:"Title"}),e.jsx("input",{id:"notification-title",className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:j,onChange:z=>M(z.target.value)})]}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Title: ",r]}),o?e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-message",children:"Message"}),e.jsx("textarea",{id:"notification-message",className:"w-full resize-none rounded-md border border-border bg-background px-3 py-2 text-sm",rows:3,value:N,onChange:z=>L(z.target.value)})]}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Message: ",i]}),h&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",htmlFor:"notification-duration",children:"Duration (ms)"}),e.jsx("input",{id:"notification-duration",type:"number",min:0,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:C,onChange:z=>S(z.target.value),disabled:u&&I})]}),u&&e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-border",checked:I,onChange:z=>A(z.target.checked)}),"Persistent"]}),l&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border-border",checked:_,onChange:z=>P(z.target.checked)}),"Include action button"]}),_&&e.jsx("input",{className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm",value:E,onChange:z=>q(z.target.value),placeholder:"Action label"})]}),e.jsx("button",{type:"submit",className:"w-full rounded-md bg-primary px-3 py-2 text-sm font-semibold text-primary-foreground transition hover:bg-primary/90",children:"Trigger notification"})]}),$.length>0&&e.jsxs("div",{className:"mt-4 border-t border-border pt-3",children:[e.jsx("div",{className:"text-xs font-semibold text-muted-foreground",children:"Quick cases"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:$.map(z=>e.jsx("button",{type:"button",className:"rounded-full border border-border px-3 py-1 text-xs text-foreground transition hover:bg-muted",onClick:()=>H(z.payload),children:z.label},z.label))})]})]})]})};exports.Advantages=i_;exports.Analytics=qX;exports.Banner=ad;exports.Button=T;exports.CandidateCard=YD;exports.CandidateProfile=jU;exports.Cart=v_;exports.Chatbot=g_;exports.CompanyAdminCandidates=XD;exports.CompanyAdminEditDialog=SX;exports.CompanyAdminEvents=xE;exports.CompanyAdminJobs=gE;exports.CompanyAdminNews=vE;exports.CompanyAdminOverview=kE;exports.CompanyAdminPeople=bE;exports.CompanyAdminProducts=wE;exports.CompanyAdminSettings=PE;exports.CompanyAdminShell=NX;exports.CompanyClaim=wY;exports.CompanyDetail=pY;exports.CompanyDirectory=UD;exports.CompanyDirectoryContainer=bY;exports.CompanyGroupDetail=mY;exports.ConsentBanner=KR;exports.ConsentProvider=JR;exports.CourseTypes=b_;exports.Courses=l_;exports.CoursesPage=oU;exports.Dashboard=LQ;exports.DashboardOnboardingSection=rO;exports.Destinations=d_;exports.ExamplesPanel=PO;exports.FAQ=f_;exports.FeatureJobs=sV;exports.Features=y_;exports.Footer=m$;exports.FooterLib=ZR;exports.ForEmployers=w_;exports.ForgotPassword=YX;exports.FreelancerProfile=IO;exports.FreelancerProfileContainer=KQ;exports.Freelancers=AO;exports.FreelancersContainer=JQ;exports.Gallery=x_;exports.GroupPrices=Mq;exports.Header=K$;exports.HeaderAlternative=WR;exports.Hero=h_;exports.HeroAlternative=j_;exports.HomePage=nV;exports.IgamingCareerHome=i$;exports.Input=fe;exports.JobDetailPage=J$;exports.JobListings=p$;exports.JobSearchWidget=S_;exports.Listing=W$;exports.Login=HX;exports.MobileNav=US;exports.Navbar=y$;exports.NewsPage=eU;exports.Newsletter=N_;exports.NotificationModal=QR;exports.NotificationProvider=dee;exports.NotificationTester=mee;exports.NotificationViewport=zO;exports.OnboardingChecklist=vJ;exports.OnboardingDashboard=FE;exports.OnboardingModal=tO;exports.OnboardingPopup=wK;exports.OnboardingProvider=YJ;exports.Partners=YR;exports.Register=$X;exports.RegisterV2=WX;exports.SearchableSelect=tC;exports.Services=u_;exports.ServicesNoIcons=k_;exports.ShieldedActionButton=AQ;exports.SidebarNewsletter=BS;exports.SignInPromptModal=KX;exports.SlidingSummary=Cq;exports.TagBadge=sS;exports.TagPicker=Oz;exports.TaxonomyApproveForm=tee;exports.TaxonomySuggestionDetail=eee;exports.TaxonomySuggestionTable=QQ;exports.Testimonials=p_;exports.TrustSignals=C_;exports.UserIdentityMenu=ON;exports.ValueProposition=M_;exports.VerificationBanner=QX;exports.Videos=m_;exports.calculateOnboardingProgress=KN;exports.canEditSection=LX;exports.clearNotifications=EO;exports.dismiss=SL;exports.getEnabledPermissions=IX;exports.mapBackendFlagsToSteps=aO;exports.notify=TO;exports.updateNotification=DO;exports.useConsent=HS;exports.useNotification=FO;exports.useOnboardingContext=sO;
|
package/dist/index.mjs
CHANGED
|
@@ -61578,7 +61578,9 @@ function Iee({
|
|
|
61578
61578
|
savedJobs: [],
|
|
61579
61579
|
recommendedJobs: [],
|
|
61580
61580
|
applications: []
|
|
61581
|
-
}, H = () =>
|
|
61581
|
+
}, H = () => {
|
|
61582
|
+
window.dispatchEvent(new CustomEvent("logout"));
|
|
61583
|
+
}, B = {
|
|
61582
61584
|
overview: "/dashboard",
|
|
61583
61585
|
profile: "/dashboard/profile",
|
|
61584
61586
|
jobs: "/dashboard/jobs",
|
package/package.json
CHANGED