(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))r(h);new MutationObserver(h=>{for(const v of h)if(v.type==="childList")for(const z of v.addedNodes)z.tagName==="LINK"&&z.rel==="modulepreload"&&r(z)}).observe(document,{childList:!0,subtree:!0});function u(h){const v={};return h.integrity&&(v.integrity=h.integrity),h.referrerPolicy&&(v.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?v.credentials="include":h.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function r(h){if(h.ep)return;h.ep=!0;const v=u(h);fetch(h.href,v)}})();var Yu={exports:{}},Hn={};var jh;function X1(){if(jh)return Hn;jh=1;var o=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function u(r,h,v){var z=null;if(v!==void 0&&(z=""+v),h.key!==void 0&&(z=""+h.key),"key"in h){v={};for(var q in h)q!=="key"&&(v[q]=h[q])}else v=h;return h=v.ref,{$$typeof:o,type:r,key:z,ref:h!==void 0?h:null,props:v}}return Hn.Fragment=c,Hn.jsx=u,Hn.jsxs=u,Hn}var xh;function Z1(){return xh||(xh=1,Yu.exports=X1()),Yu.exports}var n=Z1(),Gu={exports:{}},me={};var Sh;function K1(){if(Sh)return me;Sh=1;var o=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),z=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),R=Symbol.iterator;function K(m){return m===null||typeof m!="object"?null:(m=R&&m[R]||m["@@iterator"],typeof m=="function"?m:null)}var le={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z=Object.assign,fe={};function te(m,N,U){this.props=m,this.context=N,this.refs=fe,this.updater=U||le}te.prototype.isReactComponent={},te.prototype.setState=function(m,N){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,N,"setState")},te.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function se(){}se.prototype=te.prototype;function Y(m,N,U){this.props=m,this.context=N,this.refs=fe,this.updater=U||le}var P=Y.prototype=new se;P.constructor=Y,Z(P,te.prototype),P.isPureReactComponent=!0;var ie=Array.isArray;function G(){}var E={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function he(m,N,U){var J=U.ref;return{$$typeof:o,type:m,key:N,ref:J!==void 0?J:null,props:U}}function pe(m,N){return he(m.type,N,m.props)}function H(m){return typeof m=="object"&&m!==null&&m.$$typeof===o}function Q(m){var N={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(U){return N[U]})}var ue=/\/+/g;function ee(m,N){return typeof m=="object"&&m!==null&&m.key!=null?Q(""+m.key):N.toString(36)}function W(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(G,G):(m.status="pending",m.then(function(N){m.status==="pending"&&(m.status="fulfilled",m.value=N)},function(N){m.status==="pending"&&(m.status="rejected",m.reason=N)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function _(m,N,U,J,oe){var re=typeof m;(re==="undefined"||re==="boolean")&&(m=null);var Ae=!1;if(m===null)Ae=!0;else switch(re){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(m.$$typeof){case o:case c:Ae=!0;break;case B:return Ae=m._init,_(Ae(m._payload),N,U,J,oe)}}if(Ae)return oe=oe(m),Ae=J===""?"."+ee(m,0):J,ie(oe)?(U="",Ae!=null&&(U=Ae.replace(ue,"$&/")+"/"),_(oe,N,U,"",function(Jl){return Jl})):oe!=null&&(H(oe)&&(oe=pe(oe,U+(oe.key==null||m&&m.key===oe.key?"":(""+oe.key).replace(ue,"$&/")+"/")+Ae)),N.push(oe)),1;Ae=0;var nt=J===""?".":J+":";if(ie(m))for(var Ve=0;Ve>>1,de=_[$];if(0>>1;$h(U,x))Jh(oe,U)?(_[$]=oe,_[J]=x,$=J):(_[$]=U,_[N]=x,$=N);else if(Jh(oe,x))_[$]=oe,_[J]=x,$=J;else break e}}return V}function h(_,V){var x=_.sortIndex-V.sortIndex;return x!==0?x:_.id-V.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;o.unstable_now=function(){return v.now()}}else{var z=Date,q=z.now();o.unstable_now=function(){return z.now()-q}}var L=[],b=[],B=1,D=null,R=3,K=!1,le=!1,Z=!1,fe=!1,te=typeof setTimeout=="function"?setTimeout:null,se=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function P(_){for(var V=u(b);V!==null;){if(V.callback===null)r(b);else if(V.startTime<=_)r(b),V.sortIndex=V.expirationTime,c(L,V);else break;V=u(b)}}function ie(_){if(Z=!1,P(_),!le)if(u(L)!==null)le=!0,G||(G=!0,Q());else{var V=u(b);V!==null&&W(ie,V.startTime-_)}}var G=!1,E=-1,ae=5,he=-1;function pe(){return fe?!0:!(o.unstable_now()-he_&&pe());){var $=D.callback;if(typeof $=="function"){D.callback=null,R=D.priorityLevel;var de=$(D.expirationTime<=_);if(_=o.unstable_now(),typeof de=="function"){D.callback=de,P(_),V=!0;break t}D===u(L)&&r(L),P(_)}else r(L);D=u(L)}if(D!==null)V=!0;else{var m=u(b);m!==null&&W(ie,m.startTime-_),V=!1}}break e}finally{D=null,R=x,K=!1}V=void 0}}finally{V?Q():G=!1}}}var Q;if(typeof Y=="function")Q=function(){Y(H)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ee=ue.port2;ue.port1.onmessage=H,Q=function(){ee.postMessage(null)}}else Q=function(){te(H,0)};function W(_,V){E=te(function(){_(o.unstable_now())},V)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(_){_.callback=null},o.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<_?Math.floor(1e3/_):5},o.unstable_getCurrentPriorityLevel=function(){return R},o.unstable_next=function(_){switch(R){case 1:case 2:case 3:var V=3;break;default:V=R}var x=R;R=V;try{return _()}finally{R=x}},o.unstable_requestPaint=function(){fe=!0},o.unstable_runWithPriority=function(_,V){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var x=R;R=_;try{return V()}finally{R=x}},o.unstable_scheduleCallback=function(_,V,x){var $=o.unstable_now();switch(typeof x=="object"&&x!==null?(x=x.delay,x=typeof x=="number"&&0$?(_.sortIndex=x,c(b,_),u(L)===null&&_===u(b)&&(Z?(se(E),E=-1):Z=!0,W(ie,x-$))):(_.sortIndex=de,c(L,_),le||K||(le=!0,G||(G=!0,Q()))),_},o.unstable_shouldYield=pe,o.unstable_wrapCallback=function(_){var V=R;return function(){var x=R;R=V;try{return _.apply(this,arguments)}finally{R=x}}}})(Xu)),Xu}var _h;function F1(){return _h||(_h=1,Qu.exports=W1()),Qu.exports}var Zu={exports:{}},lt={};var Ah;function $1(){if(Ah)return lt;Ah=1;var o=dr();function c(L){var b="https://react.dev/errors/"+L;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(c){console.error(c)}}return o(),Zu.exports=$1(),Zu.exports}var zh;function P1(){if(zh)return Vn;zh=1;var o=F1(),c=dr(),u=I1();function r(e){var t="https://react.dev/errors/"+e;if(1de||(e.current=$[de],$[de]=null,de--)}function U(e,t){de++,$[de]=e.current,e.current=t}var J=m(null),oe=m(null),re=m(null),Ae=m(null);function nt(e,t){switch(U(re,t),U(oe,e),U(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gf(t),e=Jf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}N(J),U(J,e)}function Ve(){N(J),N(oe),N(re)}function Jl(e){e.memoizedState!==null&&U(Ae,e);var t=J.current,a=Jf(t,e.type);t!==a&&(U(oe,e),U(J,a))}function Wn(e){oe.current===e&&(N(J),N(oe)),Ae.current===e&&(N(Ae),Un._currentValue=x)}var ks,pr;function Oa(e){if(ks===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ks=t&&t[1]||"",pr=-1)":-1i||g[l]!==S[i]){var C=` `+g[l].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=l&&0<=i);break}}}finally{_s=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Oa(a):""}function Nm(e,t){switch(e.tag){case 26:case 27:case 5:return Oa(e.type);case 16:return Oa("Lazy");case 13:return e.child!==t&&t!==null?Oa("Suspense Fallback"):Oa("Suspense");case 19:return Oa("SuspenseList");case 0:case 15:return As(e.type,!1);case 11:return As(e.type.render,!1);case 1:return As(e.type,!0);case 31:return Oa("Activity");default:return""}}function yr(e){try{var t="",a=null;do t+=Nm(e,a),a=e,e=e.return;while(e);return t}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var Ts=Object.prototype.hasOwnProperty,zs=o.unstable_scheduleCallback,Ds=o.unstable_cancelCallback,km=o.unstable_shouldYield,_m=o.unstable_requestPaint,mt=o.unstable_now,Am=o.unstable_getCurrentPriorityLevel,br=o.unstable_ImmediatePriority,jr=o.unstable_UserBlockingPriority,Fn=o.unstable_NormalPriority,Tm=o.unstable_LowPriority,xr=o.unstable_IdlePriority,zm=o.log,Dm=o.unstable_setDisableYieldValue,Ql=null,vt=null;function ra(e){if(typeof zm=="function"&&Dm(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Ql,e)}catch{}}var gt=Math.clz32?Math.clz32:Cm,Mm=Math.log,Em=Math.LN2;function Cm(e){return e>>>=0,e===0?32:31-(Mm(e)/Em|0)|0}var $n=256,In=262144,Pn=4194304;function La(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ei(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var i=0,s=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var f=l&134217727;return f!==0?(l=f&~s,l!==0?i=La(l):(d&=f,d!==0?i=La(d):a||(a=f&~e,a!==0&&(i=La(a))))):(f=l&~s,f!==0?i=La(f):d!==0?i=La(d):a||(a=l&~e,a!==0&&(i=La(a)))),i===0?0:t!==0&&t!==i&&(t&s)===0&&(s=i&-i,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:i}function Xl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wm(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sr(){var e=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),e}function Ms(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Zl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Um(e,t,a,l,i,s){var d=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var f=e.entanglements,g=e.expirationTimes,S=e.hiddenUpdates;for(a=d&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var qm=/[\n"\\]/g;function At(e){return e.replace(qm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ls(e,t,a,l,i,s,d,f){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_t(t)):e.value!==""+_t(t)&&(e.value=""+_t(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Rs(e,d,_t(t)):a!=null?Rs(e,d,_t(a)):l!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.name=""+_t(f):e.removeAttribute("name")}function Or(e,t,a,l,i,s,d,f){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Os(e);return}a=a!=null?""+_t(a):"",t=t!=null?""+_t(t):a,f||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=f?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Os(e)}function Rs(e,t,a){t==="number"&&li(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cl(e,t,a,l){if(e=e.options,t){t={};for(var i=0;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ys=!1;if(Zt)try{var $l={};Object.defineProperty($l,"passive",{get:function(){Ys=!0}}),window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{Ys=!1}var da=null,Gs=null,ii=null;function Yr(){if(ii)return ii;var e,t=Gs,a=t.length,l,i="value"in da?da.value:da.textContent,s=i.length;for(e=0;e=en),Kr=" ",Wr=!1;function Fr(e,t){switch(e){case"keyup":return mv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $r(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function gv(e,t){switch(e){case"compositionend":return $r(t);case"keypress":return t.which!==32?null:(Wr=!0,Kr);case"textInput":return e=t.data,e===Kr&&Wr?null:e;default:return null}}function pv(e,t){if(dl)return e==="compositionend"||!Ks&&Fr(e,t)?(e=Yr(),ii=Gs=da=null,dl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=io(a)}}function co(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?co(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=li(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=li(e.document)}return t}function $s(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _v=Zt&&"documentMode"in document&&11>=document.documentMode,fl=null,Is=null,nn=null,Ps=!1;function ro(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ps||fl==null||fl!==li(l)||(l=fl,"selectionStart"in l&&$s(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),nn&&ln(nn,l)||(nn=l,l=Ii(Is,"onSelect"),0>=d,i-=d,Vt=1<<32-gt(t)+i|a<ge?(xe=I,I=null):xe=I.sibling;var ke=k(y,I,j[ge],w);if(ke===null){I===null&&(I=xe);break}e&&I&&ke.alternate===null&&t(y,I),p=s(ke,p,ge),Ne===null?ne=ke:Ne.sibling=ke,Ne=ke,I=xe}if(ge===j.length)return a(y,I),Se&&Wt(y,ge),ne;if(I===null){for(;gege?(xe=I,I=null):xe=I.sibling;var wa=k(y,I,ke.value,w);if(wa===null){I===null&&(I=xe);break}e&&I&&wa.alternate===null&&t(y,I),p=s(wa,p,ge),Ne===null?ne=wa:Ne.sibling=wa,Ne=wa,I=xe}if(ke.done)return a(y,I),Se&&Wt(y,ge),ne;if(I===null){for(;!ke.done;ge++,ke=j.next())ke=O(y,ke.value,w),ke!==null&&(p=s(ke,p,ge),Ne===null?ne=ke:Ne.sibling=ke,Ne=ke);return Se&&Wt(y,ge),ne}for(I=l(I);!ke.done;ge++,ke=j.next())ke=A(I,y,ge,ke.value,w),ke!==null&&(e&&ke.alternate!==null&&I.delete(ke.key===null?ge:ke.key),p=s(ke,p,ge),Ne===null?ne=ke:Ne.sibling=ke,Ne=ke);return e&&I.forEach(function(Q1){return t(y,Q1)}),Se&&Wt(y,ge),ne}function Ee(y,p,j,w){if(typeof j=="object"&&j!==null&&j.type===Z&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case K:e:{for(var ne=j.key;p!==null;){if(p.key===ne){if(ne=j.type,ne===Z){if(p.tag===7){a(y,p.sibling),w=i(p,j.props.children),w.return=y,y=w;break e}}else if(p.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ae&&Za(ne)===p.type){a(y,p.sibling),w=i(p,j.props),dn(w,j),w.return=y,y=w;break e}a(y,p);break}else t(y,p);p=p.sibling}j.type===Z?(w=Ya(j.props.children,y.mode,w,j.key),w.return=y,y=w):(w=vi(j.type,j.key,j.props,null,y.mode,w),dn(w,j),w.return=y,y=w)}return d(y);case le:e:{for(ne=j.key;p!==null;){if(p.key===ne)if(p.tag===4&&p.stateNode.containerInfo===j.containerInfo&&p.stateNode.implementation===j.implementation){a(y,p.sibling),w=i(p,j.children||[]),w.return=y,y=w;break e}else{a(y,p);break}else t(y,p);p=p.sibling}w=sc(j,y.mode,w),w.return=y,y=w}return d(y);case ae:return j=Za(j),Ee(y,p,j,w)}if(W(j))return F(y,p,j,w);if(Q(j)){if(ne=Q(j),typeof ne!="function")throw Error(r(150));return j=ne.call(j),ce(y,p,j,w)}if(typeof j.then=="function")return Ee(y,p,Si(j),w);if(j.$$typeof===Y)return Ee(y,p,yi(y,j),w);Ni(y,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,p!==null&&p.tag===6?(a(y,p.sibling),w=i(p,j),w.return=y,y=w):(a(y,p),w=ic(j,y.mode,w),w.return=y,y=w),d(y)):a(y,p)}return function(y,p,j,w){try{on=0;var ne=Ee(y,p,j,w);return Nl=null,ne}catch(I){if(I===Sl||I===ji)throw I;var Ne=yt(29,I,null,y.mode);return Ne.lanes=w,Ne.return=y,Ne}}}var Wa=wo(!0),Uo=wo(!1),ga=!1;function yc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ya(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(_e&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=mi(e),po(e,null,a),t}return hi(e,l,t,a),mi(e)}function fn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kr(e,a)}}function jc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var i=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?i=s=d:s=s.next=d,a=a.next}while(a!==null);s===null?i=s=t:s=s.next=t}else i=s=t;a={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var xc=!1;function hn(){if(xc){var e=xl;if(e!==null)throw e}}function mn(e,t,a,l){xc=!1;var i=e.updateQueue;ga=!1;var s=i.firstBaseUpdate,d=i.lastBaseUpdate,f=i.shared.pending;if(f!==null){i.shared.pending=null;var g=f,S=g.next;g.next=null,d===null?s=S:d.next=S,d=g;var C=e.alternate;C!==null&&(C=C.updateQueue,f=C.lastBaseUpdate,f!==d&&(f===null?C.firstBaseUpdate=S:f.next=S,C.lastBaseUpdate=g))}if(s!==null){var O=i.baseState;d=0,C=S=g=null,f=s;do{var k=f.lane&-536870913,A=k!==f.lane;if(A?(je&k)===k:(l&k)===k){k!==0&&k===jl&&(xc=!0),C!==null&&(C=C.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var F=e,ce=f;k=t;var Ee=a;switch(ce.tag){case 1:if(F=ce.payload,typeof F=="function"){O=F.call(Ee,O,k);break e}O=F;break e;case 3:F.flags=F.flags&-65537|128;case 0:if(F=ce.payload,k=typeof F=="function"?F.call(Ee,O,k):F,k==null)break e;O=D({},O,k);break e;case 2:ga=!0}}k=f.callback,k!==null&&(e.flags|=64,A&&(e.flags|=8192),A=i.callbacks,A===null?i.callbacks=[k]:A.push(k))}else A={lane:k,tag:f.tag,payload:f.payload,callback:f.callback,next:null},C===null?(S=C=A,g=O):C=C.next=A,d|=k;if(f=f.next,f===null){if(f=i.shared.pending,f===null)break;A=f,f=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);C===null&&(g=O),i.baseState=g,i.firstBaseUpdate=S,i.lastBaseUpdate=C,s===null&&(i.shared.lanes=0),Na|=d,e.lanes=d,e.memoizedState=O}}function Oo(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Lo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;es?s:8;var d=_.T,f={};_.T=f,qc(e,!1,t,a);try{var g=i(),S=_.S;if(S!==null&&S(f,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var C=Uv(g,l);pn(e,t,C,Nt(e))}else pn(e,t,l,Nt(e))}catch(O){pn(e,t,{then:function(){},status:"rejected",reason:O},Nt())}finally{V.p=s,d!==null&&f.types!==null&&(d.types=f.types),_.T=d}}function qv(){}function Hc(e,t,a,l){if(e.tag!==5)throw Error(r(476));var i=md(e).queue;hd(e,i,t,x,a===null?qv:function(){return vd(e),a(l)})}function md(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:x},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vd(e){var t=md(e);t.next===null&&(t=e.alternate.memoizedState),pn(e,t.next.queue,{},Nt())}function Vc(){return et(Un)}function gd(){return Be().memoizedState}function pd(){return Be().memoizedState}function Bv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Nt();e=pa(a);var l=ya(t,e,a);l!==null&&(ft(l,t,a),fn(l,t,a)),t={cache:mc()},e.payload=t;return}t=t.return}}function Yv(e,t,a){var l=Nt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wi(e)?bd(t,a):(a=lc(e,t,a,l),a!==null&&(ft(a,e,l),jd(a,t,l)))}function yd(e,t,a){var l=Nt();pn(e,t,a,l)}function pn(e,t,a,l){var i={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(wi(e))bd(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,f=s(d,a);if(i.hasEagerState=!0,i.eagerState=f,pt(f,d))return hi(e,t,i,0),Ce===null&&fi(),!1}catch{}if(a=lc(e,t,i,l),a!==null)return ft(a,e,l),jd(a,t,l),!0}return!1}function qc(e,t,a,l){if(l={lane:2,revertLane:yu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},wi(e)){if(t)throw Error(r(479))}else t=lc(e,a,l,2),t!==null&&ft(t,e,2)}function wi(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function bd(e,t){_l=Ai=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function jd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kr(e,a)}}var yn={readContext:et,use:Di,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};yn.useEffectEvent=Le;var xd={readContext:et,use:Di,useCallback:function(e,t){return it().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:nd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ei(4194308,4,ud.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){Ei(4,2,e,t)},useMemo:function(e,t){var a=it();t=t===void 0?null:t;var l=e();if(Fa){ra(!0);try{e()}finally{ra(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=it();if(a!==void 0){var i=a(t);if(Fa){ra(!0);try{a(t)}finally{ra(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=Yv.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var t=it();return e={current:e},t.memoizedState=e},useState:function(e){e=wc(e);var t=e.queue,a=yd.bind(null,ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lc,useDeferredValue:function(e,t){var a=it();return Rc(a,e,t)},useTransition:function(){var e=wc(!1);return e=hd.bind(null,ve,e.queue,!0,!1),it().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ve,i=it();if(Se){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ce===null)throw Error(r(349));(je&127)!==0||Yo(l,t,a)}i.memoizedState=a;var s={value:a,getSnapshot:t};return i.queue=s,nd(Jo.bind(null,l,s,e),[e]),l.flags|=2048,Tl(9,{destroy:void 0},Go.bind(null,l,s,a,t),null),a},useId:function(){var e=it(),t=Ce.identifierPrefix;if(Se){var a=qt,l=Vt;a=(l&~(1<<32-gt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ti++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?d.createElement(i,{is:l.is}):d.createElement(i)}}s[Ie]=t,s[st]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)s.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=s;e:switch(at(s,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ta(t)}}return Ue(t),eu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,yl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,i=Pe,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[Ie]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Bf(e.nodeValue,a)),e||ma(t,!0)}else e=Pi(e).createTextNode(l),e[Ie]=t,t.stateNode=e}return Ue(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=yl(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Ie]=t}else Ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else a=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(jt(t),t):(jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ue(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=yl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(r(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));i[Ie]=t}else Ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),i=!1}else i=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(jt(t),t):(jt(t),null)}return jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==i&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Hi(t,t.updateQueue),Ue(t),null);case 4:return Ve(),e===null&&Su(t.stateNode.containerInfo),Ue(t),null;case 10:return $t(t.type),Ue(t),null;case 19:if(N(qe),l=t.memoizedState,l===null)return Ue(t),null;if(i=(t.flags&128)!==0,s=l.rendering,s===null)if(i)jn(l,!1);else{if(Re!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=_i(e),s!==null){for(t.flags|=128,jn(l,!1),e=s.updateQueue,t.updateQueue=e,Hi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)yo(a,e),a=a.sibling;return U(qe,qe.current&1|2),Se&&Wt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&mt()>Gi&&(t.flags|=128,i=!0,jn(l,!1),t.lanes=4194304)}else{if(!i)if(e=_i(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Hi(t,e),jn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!Se)return Ue(t),null}else 2*mt()-l.renderingStartTime>Gi&&a!==536870912&&(t.flags|=128,i=!0,jn(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=mt(),e.sibling=null,a=qe.current,U(qe,i?a&1|2:a&1),Se&&Wt(t,l.treeForkCount),e):(Ue(t),null);case 22:case 23:return jt(t),Nc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),a=t.updateQueue,a!==null&&Hi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&N(Xa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),$t(Ye),Ue(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Zv(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $t(Ye),Ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wn(t),null;case 31:if(t.memoizedState!==null){if(jt(t),t.alternate===null)throw Error(r(340));Ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(qe),null;case 4:return Ve(),null;case 10:return $t(t.type),null;case 22:case 23:return jt(t),Nc(),e!==null&&N(Xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $t(Ye),null;case 25:return null;default:return null}}function Qd(e,t){switch(uc(t),t.tag){case 3:$t(Ye),Ve();break;case 26:case 27:case 5:Wn(t);break;case 4:Ve();break;case 31:t.memoizedState!==null&&jt(t);break;case 13:jt(t);break;case 19:N(qe);break;case 10:$t(t.type);break;case 22:case 23:jt(t),Nc(),e!==null&&N(Xa);break;case 24:$t(Ye)}}function xn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){l=void 0;var s=a.create,d=a.inst;l=s(),d.destroy=l}a=a.next}while(a!==i)}}catch(f){ze(t,t.return,f)}}function xa(e,t,a){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var s=i.next;l=s;do{if((l.tag&e)===e){var d=l.inst,f=d.destroy;if(f!==void 0){d.destroy=void 0,i=t;var g=a,S=f;try{S()}catch(C){ze(i,g,C)}}}l=l.next}while(l!==s)}}catch(C){ze(t,t.return,C)}}function Xd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Lo(t,a)}catch(l){ze(e,e.return,l)}}}function Zd(e,t,a){a.props=$a(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){ze(e,t,l)}}function Sn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(i){ze(e,t,i)}}function Bt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(i){ze(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){ze(e,t,i)}else a.current=null}function Kd(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(i){ze(e,e.return,i)}}function tu(e,t,a){try{var l=e.stateNode;v1(l,e.type,a,t),l[st]=t}catch(i){ze(e,e.return,i)}}function Wd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function au(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&za(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Xt));else if(l!==4&&(l===27&&za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(lu(e,t,a),e=e.sibling;e!==null;)lu(e,t,a),e=e.sibling}function Vi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Vi(e,t,a),e=e.sibling;e!==null;)Vi(e,t,a),e=e.sibling}function Fd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);at(t,l,a),t[Ie]=e,t[st]=a}catch(s){ze(e,e.return,s)}}var aa=!1,Qe=!1,nu=!1,$d=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Kv(e,t){if(e=e.containerInfo,_u=ss,e=uo(e),$s(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var d=0,f=-1,g=-1,S=0,C=0,O=e,k=null;t:for(;;){for(var A;O!==a||i!==0&&O.nodeType!==3||(f=d+i),O!==s||l!==0&&O.nodeType!==3||(g=d+l),O.nodeType===3&&(d+=O.nodeValue.length),(A=O.firstChild)!==null;)k=O,O=A;for(;;){if(O===e)break t;if(k===a&&++S===i&&(f=d),k===s&&++C===l&&(g=d),(A=O.nextSibling)!==null)break;O=k,k=O.parentNode}O=A}a=f===-1||g===-1?null:{start:f,end:g}}else a=null}a=a||{start:0,end:0}}else a=null;for(Au={focusedElem:e,selectionRange:a},ss=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),at(s,l,a),s[Ie]=e,We(s),l=s;break e;case"link":var d=nh("link","href",i).get(l+(a.href||""));if(d){for(var f=0;fEe&&(d=Ee,Ee=ce,ce=d);var y=so(f,ce),p=so(f,Ee);if(y&&p&&(A.rangeCount!==1||A.anchorNode!==y.node||A.anchorOffset!==y.offset||A.focusNode!==p.node||A.focusOffset!==p.offset)){var j=O.createRange();j.setStart(y.node,y.offset),A.removeAllRanges(),ce>Ee?(A.addRange(j),A.extend(p.node,p.offset)):(j.setEnd(p.node,p.offset),A.addRange(j))}}}}for(O=[],A=f;A=A.parentNode;)A.nodeType===1&&O.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fa?32:a,_.T=null,a=du,du=null;var s=_a,d=ca;if(Ze=0,Cl=_a=null,ca=0,(_e&6)!==0)throw Error(r(331));var f=_e;if(_e|=4,rf(s.current),sf(s,s.current,d,a),_e=f,zn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Ql,s)}catch{}return!0}finally{V.p=i,_.T=l,Tf(e,t)}}function Df(e,t,a){t=zt(a,t),t=Jc(e.stateNode,t,2),e=ya(e,t,2),e!==null&&(Zl(e,2),Yt(e))}function ze(e,t,a){if(e.tag===3)Df(e,e,a);else for(;t!==null;){if(t.tag===3){Df(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ka===null||!ka.has(l))){e=zt(a,e),a=Dd(2),l=ya(t,a,2),l!==null&&(Md(a,l,t,e),Zl(l,2),Yt(l));break}}t=t.return}}function vu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new $v;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(a)||(cu=!0,i.add(a),e=a1.bind(null,e,t,a),t.then(e,e))}function a1(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ce===e&&(je&a)===a&&(Re===4||Re===3&&(je&62914560)===je&&300>mt()-Yi?(_e&2)===0&&wl(e,0):uu|=a,El===je&&(El=0)),Yt(e)}function Mf(e,t){t===0&&(t=Sr()),e=Ba(e,t),e!==null&&(Zl(e,t),Yt(e))}function l1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Mf(e,a)}function n1(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Mf(e,a)}function i1(e,t){return zs(e,t)}var Wi=null,Ol=null,gu=!1,Fi=!1,pu=!1,Ta=0;function Yt(e){e!==Ol&&e.next===null&&(Ol===null?Wi=Ol=e:Ol=Ol.next=e),Fi=!0,gu||(gu=!0,c1())}function zn(e,t){if(!pu&&Fi){pu=!0;do for(var a=!1,l=Wi;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var s=0;else{var d=l.suspendedLanes,f=l.pingedLanes;s=(1<<31-gt(42|e)+1)-1,s&=i&~(d&~f),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,Uf(l,s))}else s=je,s=ei(l,l===Ce?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Xl(l,s)||(a=!0,Uf(l,s));l=l.next}while(a);pu=!1}}function s1(){Ef()}function Ef(){Fi=gu=!1;var e=0;Ta!==0&&p1()&&(e=Ta);for(var t=mt(),a=null,l=Wi;l!==null;){var i=l.next,s=Cf(l,t);s===0?(l.next=null,a===null?Wi=i:a.next=i,i===null&&(Ol=a)):(a=l,(e!==0||(s&3)!==0)&&(Fi=!0)),l=i}Ze!==0&&Ze!==5||zn(e),Ta!==0&&(Ta=0)}function Cf(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0f)break;var C=g.transferSize,O=g.initiatorType;C&&Yf(O)&&(g=g.responseEnd,d+=C*(g"u"?null:document;function eh(e,t,a){var l=Ll;if(l&&typeof t=="string"&&t){var i=At(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),Pf.has(i)||(Pf.add(i),e={rel:e,crossOrigin:a,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),at(t,"link",e),We(t),l.head.appendChild(t)))}}function A1(e){ua.D(e),eh("dns-prefetch",e,null)}function T1(e,t){ua.C(e,t),eh("preconnect",e,t)}function z1(e,t,a){ua.L(e,t,a);var l=Ll;if(l&&e&&t){var i='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+At(a.imageSizes)+'"]')):i+='[href="'+At(e)+'"]';var s=i;switch(t){case"style":s=Rl(e);break;case"script":s=Hl(e)}Ut.has(s)||(e=D({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ut.set(s,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Cn(s))||t==="script"&&l.querySelector(wn(s))||(t=l.createElement("link"),at(t,"link",e),We(t),l.head.appendChild(t)))}}function D1(e,t){ua.m(e,t);var a=Ll;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+At(l)+'"][href="'+At(e)+'"]',s=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Hl(e)}if(!Ut.has(s)&&(e=D({rel:"modulepreload",href:e},t),Ut.set(s,e),a.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wn(s)))return}l=a.createElement("link"),at(l,"link",e),We(l),a.head.appendChild(l)}}}function M1(e,t,a){ua.S(e,t,a);var l=Ll;if(l&&e){var i=il(l).hoistableStyles,s=Rl(e);t=t||"default";var d=i.get(s);if(!d){var f={loading:0,preload:null};if(d=l.querySelector(Cn(s)))f.loading=5;else{e=D({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ut.get(s))&&wu(e,a);var g=d=l.createElement("link");We(g),at(g,"link",e),g._p=new Promise(function(S,C){g.onload=S,g.onerror=C}),g.addEventListener("load",function(){f.loading|=1}),g.addEventListener("error",function(){f.loading|=2}),f.loading|=4,ts(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:f},i.set(s,d)}}}function E1(e,t){ua.X(e,t);var a=Ll;if(a&&e){var l=il(a).hoistableScripts,i=Hl(e),s=l.get(i);s||(s=a.querySelector(wn(i)),s||(e=D({src:e,async:!0},t),(t=Ut.get(i))&&Uu(e,t),s=a.createElement("script"),We(s),at(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(i,s))}}function C1(e,t){ua.M(e,t);var a=Ll;if(a&&e){var l=il(a).hoistableScripts,i=Hl(e),s=l.get(i);s||(s=a.querySelector(wn(i)),s||(e=D({src:e,async:!0,type:"module"},t),(t=Ut.get(i))&&Uu(e,t),s=a.createElement("script"),We(s),at(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(i,s))}}function th(e,t,a,l){var i=(i=re.current)?es(i):null;if(!i)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Rl(a.href),a=il(i).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Rl(a.href);var s=il(i).hoistableStyles,d=s.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,d),(s=i.querySelector(Cn(e)))&&!s._p&&(d.instance=s,d.state.loading=5),Ut.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ut.set(e,a),s||w1(i,e,a,d.state))),t&&l===null)throw Error(r(528,""));return d}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Hl(a),a=il(i).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Rl(e){return'href="'+At(e)+'"'}function Cn(e){return'link[rel="stylesheet"]['+e+"]"}function ah(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function w1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),at(t,"link",a),We(t),e.head.appendChild(t))}function Hl(e){return'[src="'+At(e)+'"]'}function wn(e){return"script[async]"+e}function lh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(l)return t.instance=l,We(l),l;var i=D({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),We(l),at(l,"style",i),ts(l,a.precedence,e),t.instance=l;case"stylesheet":i=Rl(a.href);var s=e.querySelector(Cn(i));if(s)return t.state.loading|=4,t.instance=s,We(s),s;l=ah(a),(i=Ut.get(i))&&wu(l,i),s=(e.ownerDocument||e).createElement("link"),We(s);var d=s;return d._p=new Promise(function(f,g){d.onload=f,d.onerror=g}),at(s,"link",l),t.state.loading|=4,ts(s,a.precedence,e),t.instance=s;case"script":return s=Hl(a.src),(i=e.querySelector(wn(s)))?(t.instance=i,We(i),i):(l=a,(i=Ut.get(s))&&(l=D({},a),Uu(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),We(i),at(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ts(l,a.precedence,e));return t.instance}function ts(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,s=i,d=0;d title"):null)}function U1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function sh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function O1(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=Rl(l.href),s=t.querySelector(Cn(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ls.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=s,We(s);return}s=t.ownerDocument||t,l=ah(l),(i=Ut.get(i))&&wu(l,i),s=s.createElement("link"),We(s);var d=s;d._p=new Promise(function(f,g){d.onload=f,d.onerror=g}),at(s,"link",l),a.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ls.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ou=0;function L1(e,t){return e.stylesheets&&e.count===0&&is(e,e.stylesheets),0Ou?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)is(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ns=null;function is(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ns=new Map,t.forEach(R1,e),ns=null,ls.call(e))}function R1(e,t){if(!(t.state.loading&4)){var a=ns.get(e);if(a)var l=a.get(null);else{a=new Map,ns.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(c){console.error(c)}}return o(),Ju.exports=P1(),Ju.exports}var tg=eg();class ag{observers=new Set;next(c){this.observers.forEach(u=>u(c))}asObservable(){return{subscribe:c=>(this.observers.add(c),{unsubscribe:()=>this.observers.delete(c)})}}}class lg extends ag{currentValue;constructor(c){super(),this.currentValue=c}next(c){this.currentValue=c,super.next(c)}get value(){return this.currentValue}asObservable(){return{subscribe:c=>(c(this.currentValue),super.asObservable().subscribe(c))}}}class ng{authId="id";authToken="token";authEmail="email";runOutDate="runOutDate";authTokenSubject=new lg(null);constructor(){}async loadAuthTokenFromStorage(){const c=window.localStorage.getItem(this.authToken);this.authTokenSubject.next(c)}async setAuthData(c,u){if(await this.setPreference(this.authId,c.id),await this.setPreference(this.authToken,c.token),await this.setPreference(this.authEmail,c.email),u)await this.setPreference(this.runOutDate,"forever");else{const r=new Date,h=new Date(r);h.setDate(r.getDate()+1);const v=h.toISOString();await this.setPreference(this.runOutDate,v)}}async setPreference(c,u){window.localStorage.setItem(c,u)}async getCandidateId(){return window.localStorage.getItem(this.authId)}async getCandidateEmail(){return window.localStorage.getItem(this.authEmail)}async getAuthToken(){return window.localStorage.getItem(this.authToken)}getAuthTokenNoneAsync(){return this.authTokenSubject.value}async getRunOutDate(){return window.localStorage.getItem(this.runOutDate)}async clearCredentials(){window.localStorage.removeItem(this.authId),window.localStorage.removeItem(this.authToken),window.localStorage.removeItem(this.runOutDate)}async getAuth(){let c=await this.getCandidateId(),u=await this.getAuthToken(),r=await this.getCandidateEmail(),h=await this.getRunOutDate();return c&&u&&r&&h?{id:c,token:u,email:r,runOutDate:h}:null}getAuthTokenWithoutWindow(){const c=this.getAuthTokenNoneAsync();return c||""}getAuthWithoutWindow(){const c=this.getAuthTokenNoneAsync();return c?{id:"",token:c,email:"",runOutDate:"forever"}:null}}const Gl=new ng;const $h=(...o)=>o.filter((c,u,r)=>!!c&&c.trim()!==""&&r.indexOf(c)===u).join(" ").trim();const ig=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const sg=o=>o.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,u,r)=>r?r.toUpperCase():u.toLowerCase());const Mh=o=>{const c=sg(o);return c.charAt(0).toUpperCase()+c.slice(1)};var cg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ug=o=>{for(const c in o)if(c.startsWith("aria-")||c==="role"||c==="title")return!0;return!1};const rg=T.forwardRef(({color:o="currentColor",size:c=24,strokeWidth:u=2,absoluteStrokeWidth:r,className:h="",children:v,iconNode:z,...q},L)=>T.createElement("svg",{ref:L,...cg,width:c,height:c,stroke:o,strokeWidth:r?Number(u)*24/Number(c):u,className:$h("lucide",h),...!v&&!ug(q)&&{"aria-hidden":"true"},...q},[...z.map(([b,B])=>T.createElement(b,B)),...Array.isArray(v)?v:[v]]));const X=(o,c)=>{const u=T.forwardRef(({className:r,...h},v)=>T.createElement(rg,{ref:v,iconNode:c,className:$h(`lucide-${ig(Mh(o))}`,`lucide-${o}`,r),...h}));return u.displayName=Mh(o),u};const og=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ih=X("arrow-left",og);const dg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ua=X("arrow-right",dg);const fg=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],hg=X("arrow-up-down",fg);const mg=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ph=X("badge-check",mg);const vg=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],gg=X("bolt",vg);const pg=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],yg=X("bookmark",pg);const bg=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],em=X("bot",bg);const jg=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],ar=X("briefcase-business",jg);const xg=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],fr=X("briefcase",xg);const Sg=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Ng=X("calendar-days",Sg);const kg=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],_g=X("calendar",kg);const Ag=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],tm=X("car",Ag);const Tg=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],zg=X("check-check",Tg);const Dg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mg=X("check",Dg);const Eg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bn=X("chevron-down",Eg);const Cg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ke=X("circle-check",Cg);const wg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],Ug=X("circle-pause",wg);const Og=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Lg=X("circle-play",Og);const Rg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Hg=X("circle-plus",Rg);const Vg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],qg=X("circle-stop",Vg);const Bg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],Yg=X("circle-user",Bg);const Gg=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],Jg=X("clipboard-list",Gg);const Qg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],lr=X("clock-3",Qg);const Xg=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],nr=X("code-xml",Xg);const Zg=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],ir=X("crown",Zg);const Kg=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Wg=X("ellipsis",Kg);const Fg=[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]],$g=X("file-plus-corner",Fg);const Ig=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],sr=X("file-text",Ig);const Pg=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],am=X("funnel",Pg);const ep=[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]],lm=X("gamepad-2",ep);const tp=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]],ap=X("gift",tp);const lp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],js=X("globe",lp);const np=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],nm=X("graduation-cap",np);const ip=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],im=X("grid-3x3",ip);const sp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cp=X("info",sp);const up=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],cr=X("laptop",up);const rp=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],op=X("layout-grid",rp);const dp=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]],sm=X("layout-panel-top",dp);const fp=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],hp=X("lightbulb",fp);const mp=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],vp=X("link-2",mp);const gp=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],cm=X("lock-keyhole",gp);const pp=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],yp=X("log-out",pp);const bp=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],xs=X("mail",bp);const jp=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Qn=X("map-pin",jp);const xp=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Sp=X("menu",xp);const Np=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],um=X("message-circle",Np);const kp=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],_p=X("mic",kp);const Ap=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Tp=X("monitor",Ap);const zp=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Dp=X("moon",zp);const Mp=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Ep=X("move-right",Mp);const Cp=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],wp=X("paperclip",Cp);const Up=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Op=X("pen-line",Up);const Lp=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Rp=X("phone",Lp);const Hp=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Vp=X("play",Hp);const qp=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bp=X("plus",qp);const Yp=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Gp=X("presentation",Yp);const Jp=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],Qp=X("radar",Jp);const Xp=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Zp=X("radio",Xp);const Kp=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],Wp=X("rocket",Kp);const Fp=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],ur=X("route",Fp);const $p=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ip=X("save",$p);const Pp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rr=X("search",Pp);const e0=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],t0=X("send",e0);const a0=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],rm=X("settings",a0);const l0=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],n0=X("shield",l0);const i0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],s0=X("smile",i0);const c0=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Zn=X("sparkles",c0);const u0=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],om=X("square-pen",u0);const r0=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],hr=X("star",r0);const o0=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],d0=X("sun",o0);const f0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Kn=X("target",f0);const h0=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Eh=X("trending-up",h0);const m0=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],dm=X("trophy",m0);const v0=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],ql=X("user-round",v0);const g0=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ch=X("user",g0);const p0=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],y0=X("users",p0);const b0=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],j0=X("wand-sparkles",b0);const x0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],or=X("x",x0);function Bl({icon:o,label:c,...u}){return n.jsxs("label",{className:"auth-field",children:[n.jsx("span",{children:c}),n.jsxs("div",{className:"auth-input-wrap",children:[n.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:o}),n.jsx("input",{...u})]})]})}function S0({email:o,loading:c,onBackToLogin:u,onChangeEmail:r,onSubmit:h}){return n.jsxs("div",{className:"auth-view view-enter",children:[n.jsxs("div",{className:"auth-head",children:[n.jsx("button",{className:"link-btn back-link",type:"button",onClick:u,children:"Tilbage"}),n.jsx("h1",{children:"Glemt kodeord?"}),n.jsx("p",{children:"Indtast din e-mail, sa sender vi instruktioner til at nulstille din kode."})]}),n.jsxs("form",{className:"auth-form",onSubmit:h,children:[n.jsx(Bl,{icon:n.jsx(xs,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:o,onChange:v=>r(v.target.value),required:!0}),n.jsx("button",{className:"submit-btn",type:"submit",disabled:c,children:c?"Sender...":"Send nulstillingslink"})]})]})}function N0({email:o,loading:c,onChangeEmail:u,onChangePassword:r,onChangeRememberMe:h,onForgotPassword:v,onRegister:z,onSubmit:q,password:L,rememberMe:b}){return n.jsxs("div",{className:"auth-view view-enter",children:[n.jsxs("div",{className:"auth-head auth-head-center",children:[n.jsx("h1",{children:"Velkommen tilbage"}),n.jsx("p",{children:"Indtast dine oplysninger for at logge ind pa din konto."})]}),n.jsxs("form",{className:"auth-form",onSubmit:q,children:[n.jsx(Bl,{icon:n.jsx(xs,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:o,onChange:B=>u(B.target.value),required:!0}),n.jsxs("label",{className:"auth-field",children:[n.jsxs("div",{className:"auth-field-row",children:[n.jsx("span",{children:"Adgangskode"}),n.jsx("button",{className:"link-btn",type:"button",onClick:v,children:"Glemt adgangskode?"})]}),n.jsxs("div",{className:"auth-input-wrap",children:[n.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:n.jsx(cm,{size:16,strokeWidth:1.8})}),n.jsx("input",{type:"password",placeholder:"••••••••",value:L,onChange:B=>r(B.target.value),required:!0})]})]}),n.jsxs("label",{className:"check-row",children:[n.jsx("input",{type:"checkbox",checked:b,onChange:B=>h(B.target.checked)}),n.jsx("span",{children:"Husk mig i 30 dage"})]}),n.jsx("button",{className:"submit-btn",type:"submit",disabled:c,children:c?"Logger ind...":"Log ind"})]}),n.jsxs("p",{className:"auth-foot",children:["Har du ikke en konto?",n.jsx("button",{className:"link-btn",type:"button",onClick:z,children:"Opret bruger"})]})]})}function k0({email:o,firstName:c,lastName:u,loading:r,locationQuery:h,locationSuggestions:v,onBackToLogin:z,onChangeEmail:q,onChangeFirstName:L,onChangeLastName:b,onChangeLocationQuery:B,onChangePassword:D,onSelectLocation:R,onSubmit:K,password:le}){return n.jsxs("div",{className:"auth-view view-enter",children:[n.jsxs("div",{className:"auth-head auth-head-center",children:[n.jsx("h1",{children:"Opret konto"}),n.jsx("p",{children:"Start din karriere-rejse med os i dag."})]}),n.jsxs("form",{className:"auth-form",onSubmit:K,children:[n.jsx(Bl,{icon:n.jsx(Ch,{size:16,strokeWidth:1.8}),label:"Fornavn",type:"text",placeholder:"Lasse",value:c,onChange:Z=>L(Z.target.value),required:!0}),n.jsx(Bl,{icon:n.jsx(Ch,{size:16,strokeWidth:1.8}),label:"Efternavn",type:"text",placeholder:"Hansen",value:u,onChange:Z=>b(Z.target.value),required:!0}),n.jsx(Bl,{icon:n.jsx(xs,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:o,onChange:Z=>q(Z.target.value),required:!0}),n.jsx(Bl,{icon:n.jsx(cm,{size:16,strokeWidth:1.8}),label:"Adgangskode",type:"password",placeholder:"Skab en staerk kode",value:le,onChange:Z=>D(Z.target.value),required:!0,minLength:8}),n.jsxs("label",{className:"auth-field",children:[n.jsx("span",{children:"Lokation"}),n.jsxs("div",{className:"auth-input-wrap",children:[n.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:n.jsx(Qn,{size:16,strokeWidth:1.8})}),n.jsx("input",{type:"text",placeholder:"Soeg by eller adresse",value:h,onChange:Z=>B(Z.target.value),autoComplete:"off",required:!0})]}),v.length>0?n.jsx("div",{className:"location-suggestions",children:v.map(Z=>n.jsx("button",{type:"button",className:"location-suggestion-item",onClick:()=>{R(Z.placeId,Z.description)},children:Z.description},Z.placeId))}):null]}),n.jsx("button",{className:"submit-btn",type:"submit",disabled:r,children:r?"Opretter...":"Opret bruger"})]}),n.jsxs("p",{className:"auth-foot",children:["Har du allerede en konto?",n.jsx("button",{className:"link-btn",type:"button",onClick:z,children:"Log ind"})]})]})}class el{searchParams;constructor(c){this.searchParams=c?new URLSearchParams(c):new URLSearchParams}append(c,u){const r=new URLSearchParams(this.searchParams);return r.append(c,String(u)),new el(r)}set(c,u){const r=new URLSearchParams(this.searchParams);return r.set(c,String(u)),new el(r)}toString(){return this.searchParams.toString()}}function hs(o,c){if(!c)return o;const u=new URL(o);if(c instanceof el){const r=c.toString();return r&&new URLSearchParams(r).forEach((v,z)=>u.searchParams.append(z,v)),u.toString()}return Object.entries(c).forEach(([r,h])=>{if(Array.isArray(h)){h.forEach(v=>u.searchParams.append(r,String(v)));return}u.searchParams.set(r,String(h))}),u.toString()}async function ms(o,c="json"){if(!o.ok){const u=await o.text();throw new Error(u||`HTTP ${o.status}`)}if(o.status!==204)return c==="blob"?await o.blob():await o.json()}function vs(o){const c=typeof window>"u"?null:window.localStorage.getItem("token");return{...c?{Authorization:`Bearer ${c}`}:{},...o??{}}}class _0{async get(c,u){const r=await fetch(hs(c,u?.params),{method:"GET",headers:vs(u?.headers)});return ms(r,u?.responseType)}async post(c,u,r){const h=await fetch(hs(c,r?.params),{method:"POST",headers:{"Content-Type":"application/json",...vs(r?.headers)},body:u===void 0?void 0:JSON.stringify(u)});return ms(h)}async put(c,u,r){const h=await fetch(hs(c,r?.params),{method:"PUT",headers:{"Content-Type":"application/json",...vs(r?.headers)},body:u===void 0?void 0:JSON.stringify(u)});return ms(h)}async delete(c,u){const r=await fetch(hs(c,u?.params),{method:"DELETE",headers:vs(u?.headers)});return ms(r)}}const He=new _0,M={backendApi:"https://api.arbejd.com/",backendApiV2:"https://api2.arbejd.com/api/"};class A0{http;constructor(c=He){this.http=c}login(c,u){let r=M.backendApi+"api/1.1.0/candidate/login",h={email:c,password:u};return this.http.post(r,h)}forgotPassword(c){let u=M.backendApi+"api/1.1.0/candidate/resetPassword/"+c.toLowerCase();return this.http.get(u)}}class tl{constructor(c=He,u=Gl){this.http=c,this.localStorageService=u}closeAccount(c){let u=M.backendApi+"api/1.1.0/candidate/"+c.toLowerCase();return this.http.delete(u)}accountRetention(c){let u=M.backendApi+"api/1.1.0/candidate/"+c+"/account-retention/";return this.http.get(u)}getCandidatesQualifications(){let c=M.backendApi+"api/1.1.0/candidate/skill/";return this.http.get(c)}getCandidatesCertifications(){let c=M.backendApi+"api/1.1.0/candidate/certificate/";return this.http.get(c)}getCandidatesLanguages(){let c=M.backendApi+"api/1.1.0/candidate/language/";return this.http.get(c)}getCandidatesDriverLicenses(){let c=M.backendApi+"api/1.1.0/candidate/driversLicense/";return this.http.get(c)}changePassword(c,u){let r=M.backendApi+"api/1.1.0/candidate/resetPassword",h={key:c,password:u};return this.http.post(r,h)}getCandidatesEducations(){let c=M.backendApiV2+"1.0.0/client/candidate_education";return this.http.get(c)}updateExperience(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_experience/"+c.id,h={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.put(r,h)}createAccountV2(c){let u=M.backendApiV2+"1.0.0/client/candidate";return this.http.post(u,c)}updateCandidate(c,u){let r=M.backendApiV2+"1.0.0/client/candidate/v2/"+c.id,h={...c};c.birthday&&(c.birthday=new Date(c.birthday)),c.birthday instanceof Date&&(h.birthday=c.birthday.toISOString());let v={language:u,candidate:h};return this.http.put(r,v)}getCandidate(){let c=M.backendApiV2+"1.0.0/client/candidate";return this.http.get(c)}getCvSuggestion(){let c=M.backendApiV2+"1.0.0/client/suggestion";return this.http.get(c)}saveExperience(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_experience",h={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,esco_id:c.occupation.id,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.post(r,h)}removeExperience(c){let u=M.backendApiV2+"1.0.0/client/candidate_experience/"+c;return this.http.delete(u)}getCandidatesExperiences(){let c=M.backendApiV2+"1.0.0/client/candidate_experience";return this.http.get(c)}getJobAgentFilters(){let c=M.backendApiV2+"1.0.0/client/job_agent_filter";return this.http.get(c)}updateJobAgentFilter(c){let u=M.backendApiV2+"1.0.0/client/job_agent_filter/"+c.id,r=c;return this.http.put(u,r)}removeJobAgentFilter(c){let u=M.backendApiV2+"1.0.0/client/job_agent_filter/"+c;return this.http.delete(u)}updateCandidateJobSeeker(c){let u=M.backendApiV2+"1.0.0/client/candidate/update_job_seeker/"+c.id;return this.http.put(u,c)}updateCvUploadProfileText(c,u,r){let h=M.backendApiV2+"1.0.0/client/candidate/update_cv_upload_profile/"+c,v={description:u,language:r};return this.http.put(h,v)}saveExperienceV2(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_experience",h={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,esco_id:c.escoId,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.post(r,h)}updateProfileText(c){let u=M.backendApiV2+"1.0.0/client/candidate/update_profile_text";return this.http.put(u,c)}}function Ku(o,c){const u=o[c];return typeof u=="string"?u:null}class T0{authService;candidateService;constructor(c=new A0,u=new tl){this.authService=c,this.candidateService=u}async login(c,u,r){const v=await this.authService.login(c,u)??{},z=Ku(v,"token");if(!z)return{ok:!1,message:"Login fejlede: token mangler i svaret fra serveren."};const q={id:Ku(v,"id")??"",token:z,email:Ku(v,"email")??c,runOutDate:"forever"};return await Gl.setAuthData(q,r),{ok:!0,message:"Du er nu logget ind."}}async forgotPassword(c){return await this.authService.forgotPassword(c),{ok:!0,message:"Anmodning om nulstilling af kodeord er sendt."}}async register(c){const u=Number.parseInt(c.zip,10);if(Number.isNaN(u))return{ok:!1,message:"Postnummer skal være et tal."};const r={email:c.email,password:c.password,zip:u,zipName:c.zipName,awsUrl:"",latitude:0,longitude:0,firstName:c.firstName,lastName:c.lastName,subscribe:c.subscribe};return await this.candidateService.createAccountV2(r),{ok:!0,message:"Kontoen er oprettet."}}}class fm{constructor(c=He){this.http=c}searchPlaces(c){const u=M.backendApiV2+"client/google_maps/1.0.0/get_places?query="+encodeURIComponent(c);return this.http.get(u)}getPlaceDetails(c){const u=M.backendApiV2+"client/google_maps/1.0.0/get_place_details?place_id="+encodeURIComponent(c);return this.http.get(u)}}function z0(o){const c=T.useMemo(()=>new T0,[]),u=T.useMemo(()=>new fm,[]),[r,h]=T.useState(""),[v,z]=T.useState(!1),[q,L]=T.useState(""),[b,B]=T.useState(""),[D,R]=T.useState(""),[K,le]=T.useState(""),[Z,fe]=T.useState(""),[te,se]=T.useState(""),[Y,P]=T.useState([]),[ie,G]=T.useState(null),[E,ae]=T.useState(""),[he,pe]=T.useState(!1),[H,Q]=T.useState(null),[ue,ee]=T.useState("login");function W(N){Q(null),ee(N)}async function _(N){const U=N.trim();if(U.length<3){P([]);return}try{const oe=((await u.searchPlaces(U)).predictions??[]).filter(re=>typeof re.place_id=="string"&&typeof re.description=="string").map(re=>({description:re.description,placeId:re.place_id}));P(oe)}catch{P([])}}function V(N){const U=N.match(/\b(\d{4})\b/);if(!U)return null;const J=U[1],re=N.slice(N.indexOf(J)+J.length).trim().split(",")[0]?.trim()||"";return re?{cityName:re,zip:J}:null}async function x(N,U){let J=U;try{const re=await u.getPlaceDetails(N);typeof re.result?.formatted_address=="string"&&re.result.formatted_address.trim()&&(J=re.result.formatted_address.trim())}catch{}const oe=V(J)??V(U);if(se(J),P([]),!oe){G(null);return}G({cityName:oe.cityName,description:J,zip:oe.zip})}async function $(N){N.preventDefault(),z(!0),Q(null);try{const U=await c.login(q.trim(),b,he);Q(U),U.ok&&o?.()}catch(U){const J=U instanceof Error?U.message:"Login mislykkedes.";Q({ok:!1,message:J})}finally{z(!1)}}async function de(N){N.preventDefault(),z(!0),Q(null);try{if(!ie){Q({ok:!1,message:"Vaelg en lokation fra listen (med postnummer)."});return}const U=await c.register({email:K.trim(),firstName:D.trim(),lastName:Z.trim(),password:E,subscribe:!0,zip:ie.zip,zipName:ie.cityName});Q(U),U.ok&&ee("login")}catch(U){const J=U instanceof Error?U.message:"Oprettelse mislykkedes.";Q({ok:!1,message:J})}finally{z(!1)}}async function m(N){N.preventDefault(),z(!0),Q(null);try{const U=await c.forgotPassword(r.trim());Q(U)}catch(U){const J=U instanceof Error?U.message:"Kunne ikke sende nulstillingslink.";Q({ok:!1,message:J})}finally{z(!1)}}return{forgotEmail:r,handleForgotSubmit:m,handleLoginSubmit:$,handleRegisterSubmit:de,loading:v,loginEmail:q,loginPassword:b,registerFirstName:D,registerEmail:K,registerLastName:Z,registerLocationQuery:te,registerLocationSuggestions:Y,registerPassword:E,rememberMe:he,result:H,setForgotEmail:h,setLoginEmail:L,setLoginPassword:B,setRegisterEmail:le,setRegisterFirstName:R,setRegisterLastName:fe,setRegisterLocationQuery:N=>{se(N),G(null),_(N)},setRegisterPassword:ae,setRememberMe:pe,selectRegisterLocation:x,switchView:W,view:ue}}function D0({onAuthenticated:o}){const{forgotEmail:c,handleForgotSubmit:u,handleLoginSubmit:r,handleRegisterSubmit:h,loading:v,loginEmail:z,loginPassword:q,registerFirstName:L,registerEmail:b,registerLastName:B,registerLocationQuery:D,registerLocationSuggestions:R,registerPassword:K,rememberMe:le,result:Z,setForgotEmail:fe,setLoginEmail:te,setLoginPassword:se,setRegisterEmail:Y,setRegisterFirstName:P,setRegisterLastName:ie,setRegisterLocationQuery:G,setRegisterPassword:E,setRememberMe:ae,selectRegisterLocation:he,switchView:pe,view:H}=z0(o);return n.jsxs("main",{className:"auth-page",children:[n.jsx("div",{className:"orb orb-1"}),n.jsx("div",{className:"orb orb-2"}),n.jsx("div",{className:"orb orb-3"}),n.jsxs("div",{className:"auth-logo-wrap",children:[n.jsx("div",{className:"auth-logo-dot",children:"A"}),n.jsx("span",{className:"auth-logo-text",children:"ARBEJD"})]}),n.jsxs("section",{className:"auth-card",children:[H==="login"?n.jsx(N0,{email:z,loading:v,onChangeEmail:te,onChangePassword:se,onChangeRememberMe:ae,onForgotPassword:()=>pe("forgot"),onRegister:()=>pe("register"),onSubmit:r,password:q,rememberMe:le}):null,H==="register"?n.jsx(k0,{email:b,firstName:L,lastName:B,loading:v,locationQuery:D,locationSuggestions:R,onBackToLogin:()=>pe("login"),onChangeEmail:Y,onChangeFirstName:P,onChangeLastName:ie,onChangeLocationQuery:G,onChangePassword:E,onSelectLocation:he,onSubmit:h,password:K}):null,H==="forgot"?n.jsx(S0,{email:c,loading:v,onBackToLogin:()=>pe("login"),onChangeEmail:fe,onSubmit:u}):null,Z?n.jsx("p",{className:Z.ok?"status success":"status error",children:Z.message}):null]},H)]})}class hm{constructor(c=He){this.http=c}listEscoByParent(c){let u=M.backendApiV2+"1.0.0/client/esco";return c&&(u+="/"+c),this.http.get(u)}listAllEscos(){let c=M.backendApiV2+"1.0.0/client/esco";return this.http.get(c)}}class M0{constructor(c=He){this.http=c}addEscoToJobAgent(c){let u=M.backendApiV2+"1.0.0/client/job_agent_filter",r={esco_id:c};return this.http.post(u,r)}removeJobAgentFilter(c){let u=M.backendApiV2+"1.0.0/client/job_agent_filter/"+c;return this.http.delete(u)}}class Ss{constructor(c=He){this.http=c}getPaymentOverview(){let c=M.backendApiV2+"client/end_user_subscription/1.0.0/payment_overview";return this.http.get(c)}getSubscriptionProducts(){let c=M.backendApiV2+"client/end_user_subscription/1.0.0/get_products";return this.http.get(c)}deactivateAutoRenew(){let c=M.backendApiV2+"client/end_user_subscription/1.0.0/deactivate_auto_renew";return this.http.put(c,{})}activateAutoRenew(){let c=M.backendApiV2+"client/end_user_subscription/1.0.0/activate_auto_renew";return this.http.put(c,{})}redeemCode(c){let u=M.backendApiV2+"client/candidate_redeem_code/v1";return this.http.post(u,{code:c})}}class mm{constructor(c=new tl,u=new Ss,r=new M0,h=new hm){this.candidateService=c,this.subscriptionService=u,this.jobAgentService=r,this.escoService=h}async loadInitialData(){const[c,u,r,h]=await Promise.allSettled([this.subscriptionService.getPaymentOverview(),this.candidateService.getJobAgentFilters(),this.candidateService.getCvSuggestion(),this.escoService.listAllEscos()]);return{paymentOverview:c.status==="fulfilled"?c.value:null,jobAgentFilters:u.status==="fulfilled"?u.value:[],cvSuggestions:r.status==="fulfilled"?this.withImprovements(r.value):[],escos:h.status==="fulfilled"?h.value:[]}}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",r=c.imageUrl||c.image||void 0;return{name:u,imageUrl:r}}catch{return{name:"Lasse"}}}async addEscoToFilter(c){await this.jobAgentService.addEscoToJobAgent(c)}async removeFilter(c){await this.jobAgentService.removeJobAgentFilter(c)}async setFilterVisibility(c,u){await this.candidateService.updateJobAgentFilter({...c,visible:u})}getEscoSuggestions(c,u,r){const h=c.trim().toLowerCase();if(!h)return[];const v=new Set(r.map(z=>z.escoId));return u.filter(z=>!v.has(z.id)).filter(z=>z.preferedLabelDa.toLowerCase().includes(h)).slice(0,10)}getSuggestionText(c){return c>=0&&c<50?"Et godt første skridt mod flere relevante job.":c>=50&&c<100?"Kan styrke dine chancer i ansøgningsbunken.":c>=100&&c<150?"Ofte efterspurgt og forbedrer dine jobmuligheder markant.":c>=150&&c<200?"Et klart plus som gør dig mere attraktiv for arbejdsgivere.":c>=200?"En afgørende faktor der åbner langt flere jobmuligheder.":"Forbedrer din profil til kommende jobmatch."}withImprovements(c){return c.map(u=>{const r=[],h=[{items:u.jobImprovementSuggestion.educations??[],type:"education"},{items:u.jobImprovementSuggestion.languages??[],type:"language"},{items:u.jobImprovementSuggestion.driversLicenses??[],type:"driversLicense"},{items:u.jobImprovementSuggestion.qualifications??[],type:"qualification"},{items:u.jobImprovementSuggestion.certificates??[],type:"certificate"}];for(const v of h)for(const z of v.items)r.push({...z,improvementType:v.type});return r.sort((v,z)=>z.jobChanceIncrease-v.jobChanceIncrease),{...u,improvements:r}})}}class E0{constructor(c=He){this.http=c}saveJobFilter(c){let u=M.backendApiV2+"1.0.0/client/candidate_search_filter";return this.http.post(u,c)}getJobFilter(){let c=M.backendApiV2+"1.0.0/client/candidate_search_filter";return this.http.get(c)}resetJobFilter(){let c=M.backendApiV2+"1.0.0/client/candidate_search_filter/reset_job_filter";return this.http.put(c,{})}}class mr{http;constructor(c=He){this.http=c}getSearchWords(){let c=M.backendApiV2+"1.0.0/client/candidate_search/list_search_words";return this.http.get(c)}getJobs(c,u,r){let h=M.backendApi+"api/1.1.0/jobs/all/"+u+"/"+r;return this.http.post(h,c)}getJobsV2(c,u,r,h){let v=M.backendApiV2+"1.0.0/client/candidate_search/v2/"+c+"/"+u+"/"+r,z=new el;return h.length>0&&h.forEach(q=>{z=z.append("terms",q)}),this.http.get(v,{params:z})}getSavedJobs(c,u){let r=M.backendApi+"api/1.1.0/candidate/jobs/saved";return this.http.get(r)}getSavedJobsV2(c,u){let r=M.backendApiV2+"1.0.0/client/job/bookmarked_jobs/"+c+"/"+u;return this.http.get(r)}getAppliedJobs(c,u){let r=M.backendApi+"api/1.1.0/applications/candidate/";return this.http.get(r)}getAppliedJobsV2(c,u){let r=M.backendApiV2+"1.0.0/client/job/applied_jobs/"+c+"/"+u;return this.http.get(r)}payWithStripe(c,u){const r=M.backendApiV2+"1.0.0/client/payment/create-payment-intent",h={paymentMethodId:c,amount:u};return this.http.post(r,h)}bookmarkJob(c){let u=M.backendApi+"api/1.1.0/candidate/jobs/"+c+"/jobnet/updateSavedStatus",r={saved:!0};return this.http.post(u,r)}unbookmarkJob(c){let u=M.backendApi+"api/1.1.0/candidate/jobs/"+c+"/jobnet/updateSavedStatus",r={saved:!1};return this.http.post(u,r)}bookmarkJobV2(c,u,r){let h=M.backendApiV2+"1.0.0/client/job/bookmark/"+c,v={job_type:r,save:u};return this.http.post(h,v)}getJobNetJobDetail(c){let u=M.backendApiV2+"1.0.0/client/job/detail/star/"+c;return this.http.get(u)}getJobDetail(c){let u=M.backendApi+"api/1.1.0/jobs/"+c;return this.http.get(u)}getOccupationCategorizations(){let c=M.backendApiV2+"1.0.0/client/ds_tree";return this.http.get(c)}getJobSummary(c){let u=M.backendApi+"api/1.1.0/jobs/"+c+"/summary";return this.http.get(u)}applyJob(c){let u=M.backendApi+"api/1.1.0/applications/job/"+c,r={jobPostingId:c};return this.http.post(u,r)}undoApplyJob(c){let u=M.backendApi+"api/1.1.0/applications/"+c;return this.http.delete(u)}toggleApplyJobnetjob(c,u){let r=M.backendApiV2+"1.0.0/client/job/detail/star/apply/"+c,h={apply:u};return this.http.put(r,h)}}const Wu={escoIds:[],workTypePermanent:!1,workTypePartTime:!1,workDistance:50,partTimeHours:null,distanceCenterName:"",latitude:null,longitude:null};function Xe(o){return typeof o=="string"?o:""}function Gn(o){return typeof o=="object"&&o!==null?o:null}function Fu(o,c){if(!o)return[];const u=o[c];return Array.isArray(u)?u:[]}function $u(o){if(Array.isArray(o))return o;const c=Gn(o);if(!c)return[];const u=Fu(c,"searchList");if(u.length>0)return u;const r=Gn(c.data),h=Fu(r,"searchList");if(h.length>0)return h;const v=Fu(c,"items");return v.length>0?v:[]}function wh(o,c){if(!o)return null;const u=o[c];return typeof u=="number"?u:null}function C0(o){return o.trim()}function w0(o){if(!o)return[];const c=new Set,u=o.searchText?.trim();u&&u.length>0&&c.add(u);for(const r of o.desiredTitles??[]){const h=C0(r);h.length>0&&c.add(h)}return Array.from(c)}function U0(o,c){return{id:Xe(o.id),title:Xe(o.title),companyName:Xe(o.companyName),occupationName:Xe(o.occupationName),descriptionIntro:Xe(o.descriptionIntro),address:Xe(o.address),time:Xe(o.time),applicationDeadline:o.applicationDeadline instanceof Date?o.applicationDeadline.toISOString():Xe(String(o.applicationDeadline??"")),candidateDistance:typeof o.candidateDistance=="number"?o.candidateDistance:null,logoUrl:Xe(o.logoUrl),companyLogoImage:Xe(o.companyLogoImage),fromJobnet:!!o.fromJobnet,isSaved:!!o.saved,matchPercent:c}}function Uh(o){return{id:Xe(o.id),title:Xe(o.title),companyName:Xe(o.companyName),occupationName:Xe(o.occupationName),descriptionIntro:Xe(o.descriptionIntro),address:Xe(o.address),time:Xe(o.time),applicationDeadline:o.applicationDeadline instanceof Date?o.applicationDeadline.toISOString():Xe(String(o.applicationDeadline??"")),candidateDistance:typeof o.candidateDistance=="number"?o.candidateDistance:null,logoUrl:Xe(o.logoUrl),companyLogoImage:Xe(o.companyLogoImage),isActive:typeof o.isActive=="boolean"?o.isActive:void 0,fromJobnet:!!o.fromJobnet,isSaved:!0}}class Ns{constructor(c=new mr,u=new E0,r=new fm,h=new tl){this.jobService=c,this.filterService=u,this.placesService=r,this.candidateService=h}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",r=c.imageUrl||c.image||void 0;return{name:u,imageUrl:r}}catch{return{name:"Lasse"}}}async getOccupationOptions(){const c=await this.jobService.getOccupationCategorizations(),u=[];for(const r of c)for(const h of r.subAreas)for(const v of h.occupations)typeof v.id=="number"&&typeof v.name=="string"&&v.name.trim().length>0&&u.push({id:v.id,name:v.name});return u.sort((r,h)=>r.name.localeCompare(h.name,"da"))}async getJobSearchWords(){return(await this.jobService.getSearchWords()).filter(u=>typeof u=="string"&&u.trim().length>0)}async getSavedFilter(){try{const c=await this.filterService.getJobFilter(),u=c?.candidateSearchFilter;return u?{escoIds:c.escoIds??[],workTypePermanent:!!u.workTypePermanent,workTypePartTime:!!u.workTypePartTime,workDistance:u.workDistance??u.defaultDistance??50,partTimeHours:u.partTimeHours??null,distanceCenterName:u.distanceCenterName??u.defaultCenterName??"",latitude:u.latitude??null,longitude:u.longitude??null}:{...Wu}}catch{return{...Wu}}}async saveFilter(c){const u=c.workTypePartTime&&c.partTimeHours&&c.partTimeHours>0&&c.partTimeHours<=37?c.partTimeHours:null,r={escoIds:c.escoIds,candidateSearchFilter:{workTimeDay:!1,workTimeEvening:!1,workTimeNight:!1,workTimeWeekend:!1,workTypePermanent:c.workTypePermanent,workTypeFreelance:!1,workTypePartTime:c.workTypePartTime,workTypeSubstitute:!1,workTypeTemporary:!1,workDistance:c.workDistance,partTimeHours:u,distanceCenterName:c.distanceCenterName,latitude:c.latitude,longitude:c.longitude}};await this.filterService.saveJobFilter(r)}async resetFilter(){return await this.filterService.resetJobFilter(),{...Wu}}async searchPlaceSuggestions(c){const u=c.trim();return u.length<3?[]:((await this.placesService.searchPlaces(u)).predictions??[]).filter(h=>typeof h.place_id=="string"&&typeof h.description=="string").map(h=>({placeId:h.place_id,description:h.description}))}async getPlaceSelection(c){const r=(await this.placesService.getPlaceDetails(c)).result;return!r||typeof r.formatted_address!="string"?null:{description:r.formatted_address,latitude:typeof r.geometry?.location?.lat=="number"?r.geometry.location.lat:null,longitude:typeof r.geometry?.location?.lng=="number"?r.geometry.location.lng:null}}async getTabItems(c,u){if(c==="gemte"){const r=await this.jobService.getSavedJobsV2(0,100);return $u(r).map(v=>Uh(v))}if(c==="sogte"){const r=await this.jobService.getAppliedJobsV2(0,100);return $u(r).map(v=>Uh(v))}return this.getJobsFeedItems(u?[u]:void 0)}async applyFiltersAndGetJobs(c,u){await this.saveFilter(c);const r=w0(u);return this.getJobsFeedItems(r)}async toggleBookmark(c,u){const r=c.fromJobnet?"star":"arbejd.com";await this.jobService.bookmarkJobV2(c.id,u,r)}async getJobsFeedItems(c){let r=10,h=0;const v=12,z=120,q=new Set,L=[];let b=[];const B=(c??[]).map(D=>D.trim()).filter(D=>D.length>0);if(B.length>0)b=B;else try{b=(await this.jobService.getSearchWords()).filter(R=>typeof R=="string"&&R.trim().length>0)}catch{b=[]}for(let D=0;D{r(!1)},[o]),T.useEffect(()=>{if(!u)return;function v(q){q.key==="Escape"&&r(!1)}const z=document.body.style.overflow;return document.body.style.overflow="hidden",window.addEventListener("keydown",v),()=>{document.body.style.overflow=z,window.removeEventListener("keydown",v)}},[u]);function h(v){c?.(v),r(!1)}return n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"dash-mobile-menu-btn","aria-label":u?"Luk menu":"Aabn menu","aria-expanded":u,onClick:()=>r(v=>!v),children:u?n.jsx(or,{size:18,strokeWidth:1.9}):n.jsx(Sp,{size:18,strokeWidth:1.9})}),n.jsx("button",{type:"button",className:`dash-mobile-overlay ${u?"open":""}`,"aria-label":"Luk menu",onClick:()=>r(!1)}),n.jsxs("aside",{className:`dash-sidebar ${u?"open":""}`,children:[n.jsxs("div",{className:"dash-logo-row",children:[n.jsx("div",{className:"dash-logo-dot",children:"A"}),n.jsx("span",{className:"dash-logo-text",children:"ARBEJD"})]}),n.jsxs("nav",{className:"dash-nav",children:[O0.map(v=>{const z=v.icon,q=v.key===o;return n.jsxs("button",{type:"button",className:q?"dash-nav-item active":"dash-nav-item",onClick:()=>h(v.key),children:[n.jsx("span",{className:v.accent?"dash-nav-icon accent":"dash-nav-icon",children:n.jsx(z,{size:19,strokeWidth:1.7})}),n.jsx("span",{className:"dash-nav-label",children:v.label}),v.badge?n.jsx("span",{className:"dash-nav-badge",children:v.badge}):null]},v.key)}),n.jsx("div",{className:"dash-nav-divider"}),L0.map(v=>{const z=v.icon,q=v.key===o;return n.jsxs("button",{type:"button",className:q?"dash-nav-item active":"dash-nav-item",onClick:()=>h(v.key),children:[n.jsx("span",{className:v.accent?"dash-nav-icon accent":"dash-nav-icon",children:n.jsx(z,{size:19,strokeWidth:1.7})}),n.jsx("span",{className:"dash-nav-label",children:v.label}),v.dot?n.jsx("span",{className:"dash-nav-dot"}):null]},v.key)})]}),n.jsxs("div",{className:"dash-sidebar-pro",children:[n.jsx("div",{className:"dash-sidebar-pro-glow"}),n.jsx(Zn,{size:19,strokeWidth:1.8}),n.jsx("h4",{children:"Pro-medlemskab"}),n.jsx("p",{children:"Faa ubegrænsede simuleringer"})]})]})]})}function Jt({actions:o,imageUrl:c,name:u,onLogout:r,onToggleTheme:h,theme:v="light"}){return n.jsxs("header",{className:"dash-topbar",children:[h?n.jsxs("button",{type:"button",className:"dash-theme-btn",onClick:h,children:[v==="dark"?n.jsx(d0,{size:15,strokeWidth:1.8}):n.jsx(Dp,{size:15,strokeWidth:1.8}),n.jsx("span",{children:v==="dark"?"Light":"Dark"})]}):null,o?n.jsx("div",{className:"dash-topbar-actions",children:o}):null,n.jsxs("div",{className:"dash-profile-wrap",children:[n.jsxs("button",{className:"dash-profile-btn",type:"button",children:[c?n.jsx("img",{src:c,alt:u,className:"dash-profile-avatar"}):n.jsx("div",{className:"dash-profile-avatar dash-profile-avatar-fallback",children:u.slice(0,1).toUpperCase()}),n.jsx("span",{children:u}),n.jsx(Bn,{size:15,strokeWidth:1.8})]}),n.jsxs("div",{className:"dash-profile-menu",children:[n.jsxs("button",{type:"button",children:[n.jsx(Yg,{size:16,strokeWidth:1.8})," Profil"]}),n.jsxs("button",{type:"button",children:[n.jsx(rm,{size:16,strokeWidth:1.8})," Indstillinger"]}),n.jsx("div",{className:"dash-profile-divider"}),n.jsxs("button",{type:"button",className:"danger",onClick:r,children:[n.jsx(yp,{size:16,strokeWidth:1.8})," Log ud"]})]})]})]})}const R0={paymentOverview:null,jobAgentFilters:[],cvSuggestions:[],escos:[]};function H0(o){return o.trim().slice(0,1).toUpperCase()||"A"}function V0(o){return Math.max(68,98-o*4)}function q0(o,c){const u=c.trim().toLowerCase();return u?o.filter(r=>r.preferedLabelDa.toLowerCase().includes(u)).slice(0,8):[]}function B0({onLogout:o,onNavigate:c,onOpenJobDetail:u,onToggleTheme:r,theme:h}){const v=T.useMemo(()=>new mm,[]),z=T.useMemo(()=>new Ns,[]),[q,L]=T.useState("Lasse"),[b,B]=T.useState(void 0),[D,R]=T.useState(R0),[K,le]=T.useState([]),[Z,fe]=T.useState(!0),[te,se]=T.useState(""),[Y,P]=T.useState(""),[ie,G]=T.useState(""),[E,ae]=T.useState(""),[he,pe]=T.useState(""),[H,Q]=T.useState(25);T.useEffect(()=>{let x=!0;async function $(){fe(!0);const[de,m,N]=await Promise.all([v.getCandidateProfile(),v.loadInitialData(),z.getTabItems("jobs")]);x&&(L(de.name),B(de.imageUrl),R(m),le(N),fe(!1))}return $(),()=>{x=!1}},[v,z]);async function ue(){const x=await v.loadInitialData();R(x)}async function ee(){const x=Y.trim()||te.trim()||ie.trim(),$=v.getEscoSuggestions(x,D.escos,D.jobAgentFilters)[0]||q0(D.escos,x)[0];$&&(await v.addEscoToFilter($.id),await ue(),se(""),P(""),G(""),ae(""),pe(""),Q(25))}async function W(x){await v.setFilterVisibility(x,!x.visible),await ue()}const _=D.jobAgentFilters,V=(K.length>0?K:[]).slice(0,6);return n.jsxs("section",{className:`dash-root ${h==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"agents",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar ai-agent-main",children:[n.jsx(Jt,{name:q,imageUrl:b,onLogout:o,theme:h,onToggleTheme:r}),n.jsxs("div",{className:"ai-head",children:[n.jsx("h1",{children:"Jobagenter"}),n.jsx("p",{children:"Saet din jobsogning pa autopilot. Lad agenter overvage og matche dig med de perfekte jobs."})]}),n.jsxs("section",{className:"ai-create-card",children:[n.jsxs("div",{className:"ai-create-title",children:[n.jsx("div",{className:"ai-create-icon",children:n.jsx(em,{size:20,strokeWidth:1.8})}),n.jsx("h2",{children:"Opret ny jobagent"})]}),n.jsxs("div",{className:"ai-form-grid",children:[n.jsxs("div",{className:"ai-field",children:[n.jsx("label",{children:"Agentens navn"}),n.jsx("input",{value:te,onChange:x=>se(x.target.value),placeholder:"F.eks. Frontend Udvikler CPH"})]}),n.jsxs("div",{className:"ai-field",children:[n.jsx("label",{children:"Sogetekst / Nogleord"}),n.jsx("input",{value:Y,onChange:x=>P(x.target.value),placeholder:"F.eks. React, TypeScript, Tailwind"})]}),n.jsxs("div",{className:"ai-field",children:[n.jsx("label",{children:"Arbejdsomrade"}),n.jsxs("select",{value:ie,onChange:x=>G(x.target.value),children:[n.jsx("option",{value:"",children:"Vaelg branche"}),n.jsx("option",{value:"IT & Udvikling",children:"IT & Udvikling"}),n.jsx("option",{value:"Design & UX",children:"Design & UX"}),n.jsx("option",{value:"Salg & Marketing",children:"Salg & Marketing"}),n.jsx("option",{value:"HR & Ledelse",children:"HR & Ledelse"})]})]}),n.jsxs("div",{className:"ai-field",children:[n.jsx("label",{children:"Arbejdstype"}),n.jsxs("select",{value:E,onChange:x=>ae(x.target.value),children:[n.jsx("option",{value:"",children:"Vaelg type"}),n.jsx("option",{value:"Fuldtid",children:"Fuldtid"}),n.jsx("option",{value:"Deltid",children:"Deltid"}),n.jsx("option",{value:"Freelance",children:"Freelance / Konsulent"}),n.jsx("option",{value:"Studiejob",children:"Studiejob"})]})]}),n.jsxs("div",{className:"ai-field",children:[n.jsx("label",{children:"Arbejdssted"}),n.jsxs("div",{className:"ai-location-wrap",children:[n.jsx(Qn,{size:16,strokeWidth:1.8}),n.jsx("input",{value:he,onChange:x=>pe(x.target.value),placeholder:"By eller postnummer"})]})]}),n.jsxs("div",{className:"ai-field ai-distance-field",children:[n.jsxs("div",{className:"ai-distance-head",children:[n.jsx("label",{children:"Maks. distance"}),n.jsxs("span",{children:[H," km"]})]}),n.jsx("input",{type:"range",min:0,max:100,value:H,onChange:x=>Q(Number(x.target.value))})]})]}),n.jsx("div",{className:"ai-create-actions",children:n.jsxs("button",{type:"button",onClick:()=>{ee()},children:[n.jsx(Ip,{size:16,strokeWidth:1.8})," Gem jobagent"]})})]}),n.jsxs("section",{className:"ai-agents-section",children:[n.jsx("h3",{children:"Dine aktive agenter"}),n.jsxs("div",{className:"ai-agents-row custom-scrollbar",children:[_.length===0?n.jsx("p",{className:"dash-loading",children:"Ingen aktive agenter endnu."}):null,_.map((x,$)=>n.jsxs("article",{className:"ai-agent-chip-card",children:[n.jsxs("div",{className:"ai-agent-card-head",children:[n.jsxs("div",{className:"ai-agent-chip-left",children:[n.jsx("div",{className:`ai-agent-mini-icon ${$%2===0?"teal":"indigo"}`,children:$%2===0?n.jsx(Tp,{size:16,strokeWidth:1.8}):n.jsx(om,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:x.escoName}),n.jsx("p",{children:x.isCalculated?"Aktiv siden i går":"Aktiv"})]})]}),n.jsx("button",{type:"button",className:x.visible?"ai-toggle on":"ai-toggle",onClick:()=>{W(x)},children:n.jsx("span",{})})]}),n.jsxs("div",{className:"ai-tags",children:[n.jsx("span",{children:x.escoName}),n.jsx("span",{children:he||"København"}),n.jsxs("span",{children:[H," km"]})]})]},x.id))]})]}),n.jsxs("section",{className:"ai-jobs-section",children:[n.jsxs("div",{className:"ai-jobs-head",children:[n.jsxs("h3",{children:[n.jsx(Zn,{size:16,strokeWidth:1.8})," Anbefalede jobs til dig"]}),n.jsx("span",{children:"Opdateret for 5 min siden"})]}),n.jsxs("div",{className:"ai-jobs-grid",children:[Z?n.jsx("p",{className:"dash-loading",children:"Indlaeser anbefalinger..."}):null,!Z&&V.length===0?n.jsx("p",{className:"dash-loading",children:"Ingen jobanbefalinger fundet endnu."}):null,V.map((x,$)=>n.jsxs("article",{className:"ai-job-card",role:"button",tabIndex:0,onClick:()=>u(x.id,x.fromJobnet,"agents"),onKeyDown:de=>{(de.key==="Enter"||de.key===" ")&&(de.preventDefault(),u(x.id,x.fromJobnet,"agents"))},children:[n.jsx("div",{className:`ai-job-rail ${$%3===2?"indigo":"teal"}`}),n.jsxs("div",{className:"ai-job-top",children:[x.companyLogoImage||x.logoUrl?n.jsx("img",{src:x.companyLogoImage||x.logoUrl,alt:x.companyName,className:"ai-company-logo"}):n.jsx("div",{className:"ai-company-logo-fallback",children:H0(x.companyName)}),n.jsxs("div",{className:"ai-match-col",children:[n.jsxs("div",{className:"ai-match-pill",children:[n.jsx(Kn,{size:13,strokeWidth:1.8})," ",V0($),"% Match"]}),n.jsxs("small",{children:["Via: ",_[0]?.escoName||"Jobagent"]})]})]}),n.jsxs("div",{className:"ai-job-title-wrap",children:[n.jsx("h4",{children:x.title}),n.jsxs("p",{children:[x.companyName," • ",x.address||"Lokation"]})]}),n.jsxs("div",{className:"ai-job-tags",children:[n.jsx("span",{children:x.occupationName||"Frontend"}),n.jsx("span",{children:x.fromJobnet?"Jobnet":"Arbejd.com"}),n.jsx("span",{children:x.candidateDistance!=null?`${Math.round(x.candidateDistance)} km`:"Remote"})]}),n.jsxs("div",{className:"ai-job-bottom",children:[n.jsx("span",{children:"Slået op for nyligt"}),n.jsxs("button",{type:"button",onClick:de=>{de.stopPropagation(),u(x.id,x.fromJobnet,"agents")},children:["Læs mere ",n.jsx(Ua,{size:14,strokeWidth:1.8})]})]})]},x.id))]})]})]})]})}const Y0={paymentOverview:null,jobAgentFilters:[],cvSuggestions:[],escos:[]};function Oh(){return["Diamantskærer","Ministerialbetjent","Kiropraktor","System Developer","Senior Software Developer","Founder and Developer","Senior .Net Developer","Freelance Programmer","Støberichef","Softwareudvikler, frontend","CSR-ansvarlig","Lagerchef inden for råstof","Ios developer","Kokkeelev","IT-kvalitetsmedarbejder","Efterretningsofficer"]}function G0(o){return o>=70?{text:"Kan styrke dine chancer i ansøgningsbunken",kind:"strong"}:o>=40?{text:"Ofte efterspurgt – forbedrer dine jobmuligheder markant",kind:"neutral"}:{text:"Et godt første skridt mod flere relevante job",kind:"soft"}}function J0(o){return o==="education"?nm:o==="language"?js:o==="driversLicense"?tm:o==="certificate"?Ph:o==="qualification"?Kn:hr}function Q0(o){return o==="education"?"blue":o==="language"?"emerald":o==="driversLicense"?"orange":o==="certificate"?"rose":o==="qualification"?"indigo":"slate"}function X0({onLogout:o,onNavigate:c,onToggleTheme:u,theme:r}){const h=T.useMemo(()=>new mm,[]),[v,z]=T.useState("Lasse"),[q,L]=T.useState(void 0),[b,B]=T.useState(Y0),[D,R]=T.useState(!0),[K,le]=T.useState("");T.useEffect(()=>{let Y=!0;async function P(){R(!0);const[ie,G]=await Promise.all([h.getCandidateProfile(),h.loadInitialData()]);if(!Y)return;z(ie.name),L(ie.imageUrl),B(G);const E=G.jobAgentFilters[0]?.escoName||Oh()[1];le(ae=>ae||E),R(!1)}return P(),()=>{Y=!1}},[h]);const Z=b.jobAgentFilters.length>0?b.jobAgentFilters.map(Y=>Y.escoName):Oh(),fe=b.jobAgentFilters.find(Y=>Y.escoName===K)||b.jobAgentFilters[0],te=(fe?b.cvSuggestions.find(Y=>Y.escoId===fe.escoId)?.improvements:b.cvSuggestions[0]?.improvements)||[],se=te.length>0?te:[{name:"Grundkursus i sikkerhed og beredskab",jobChanceIncrease:78,improvementType:"education"},{name:"Service og kommunikation i offentlige institutioner",jobChanceIncrease:52,improvementType:"qualification"},{name:"Dansk (Flydende)",jobChanceIncrease:65,improvementType:"language"},{name:"B - Almindelig bil",jobChanceIncrease:34,improvementType:"driversLicense"},{name:"Konflikthåndtering",jobChanceIncrease:72,improvementType:"qualification"},{name:"Førstehjælpsbevis",jobChanceIncrease:44,improvementType:"certificate"},{name:"Sikkerhedsgodkendelse (PET)",jobChanceIncrease:81,improvementType:"certificate"}];return n.jsxs("section",{className:`dash-root ${r==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"ai-agent",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar career-main",children:[n.jsx(Jt,{name:v,imageUrl:q,onLogout:o,theme:r,onToggleTheme:u,actions:n.jsxs("div",{className:"career-status-pill",children:[n.jsx(Ke,{size:15,strokeWidth:1.8}),"CV analyseret"]})}),n.jsxs("div",{className:"career-head",children:[n.jsxs("div",{className:"career-head-title-row",children:[n.jsx("div",{className:"career-head-icon",children:n.jsx(j0,{size:19,strokeWidth:1.8})}),n.jsx("h1",{children:"Karriereagent"})]}),n.jsx("p",{className:"career-head-kicker",children:"Din Karriereagent Foreslår"}),n.jsx("p",{className:"career-head-desc",children:"Boost din profil ved hjælp af kunstig intelligens. Forslagene er udvalgt til din profil ud fra analyser af over 100.000+ jobopslag og dit nuværende CV."})]}),n.jsxs("div",{className:"career-grid",children:[n.jsxs("aside",{className:"career-agents-col",children:[n.jsxs("div",{className:"career-agents-head",children:[n.jsx("h2",{children:"Mine agenter"}),n.jsxs("button",{type:"button",children:[n.jsx(Hg,{size:16,strokeWidth:1.8})," Tilføj ny agent"]})]}),n.jsx("div",{className:"career-agents-list custom-scrollbar",children:Z.map(Y=>n.jsxs("button",{type:"button",className:K===Y?"active":"",onClick:()=>le(Y),children:[n.jsx("span",{children:Y}),K===Y?n.jsx("i",{}):null]},Y))})]}),n.jsxs("section",{className:"career-reco-col",children:[n.jsxs("div",{className:"career-reco-head",children:[n.jsxs("h2",{children:["Viser anbefalinger for",n.jsx("span",{children:K||"Ministerialbetjent"})]}),n.jsxs("button",{type:"button",children:[n.jsx(am,{size:14,strokeWidth:1.8})," Filtrer"]})]}),D?n.jsx("p",{className:"dash-loading",children:"Indlaeser anbefalinger..."}):null,n.jsx("div",{className:"career-cards custom-scrollbar",children:se.map((Y,P)=>{const ie=J0(Y.improvementType||"qualification"),G=G0(Y.jobChanceIncrease||0),E=Q0(Y.improvementType||"qualification");return n.jsxs("article",{className:"career-card",children:[n.jsx("div",{className:"career-card-glow"}),n.jsx("div",{className:"career-card-wand",children:n.jsx(Zn,{size:16,strokeWidth:1.8})}),n.jsxs("div",{className:"career-card-content",children:[n.jsx("div",{className:`career-card-icon ${E}`,children:n.jsx(ie,{size:18,strokeWidth:1.8})}),n.jsx("h3",{children:Y.shortName||Y.name}),n.jsxs("p",{className:`tone ${G.kind}`,children:[G.kind==="strong"?n.jsx(dm,{size:13,strokeWidth:1.8}):G.kind==="neutral"?n.jsx(Kn,{size:13,strokeWidth:1.8}):n.jsx(n0,{size:13,strokeWidth:1.8}),G.text]})]})]},`${Y.name}-${P}`)})})]})]})]})]})}class Z0{constructor(c=He){this.http=c}generateApplication(c,u,r,h){let v=M.backendApiV2+"1.0.0/client/ai_handler/create_my_application",z={isStar:c,jobId:u,language:r,userInput:h};return this.http.post(v,z)}listGeneratedJobApplications(c){let u=M.backendApiV2+"1.0.0/client/ai_handler/list_created_job_application/"+c;return this.http.get(u)}listPredefinedUserInput(){let c=M.backendApiV2+"1.0.0/client/ai_handler/list_predefined_user_input";return this.http.get(c)}getJobApplication(c){let u=M.backendApiV2+"1.0.0/client/ai_handler/"+c;return this.http.get(u)}updateMyCvDescriptions(c){let u=M.backendApiV2+"1.0.0/client/ai_handler/update_my_cv_descriptions",r={language:c};return this.http.post(u,r)}updateStatesOnMyCvDescription(c,u,r){let h=M.backendApiV2+"1.0.0/client/ai_handler/update_states_on_my_cv_descriptions/"+c,v={state:u,subState:r};return this.http.put(h,v)}getMyCvDescriptions(){let c=M.backendApiV2+"1.0.0/client/ai_handler/get_my_cv_descriptions";return this.http.get(c)}submitJobApplicationRating(c,u,r){let h=M.backendApiV2+"1.0.0/client/ai_handler/job_application_rating",v={ai_generated_job_application_id:c,rating:u,rating_text:r};return this.http.post(h,v)}startApplicationExamination(c){const u=M.backendApiV2+"1.0.0/client/ai_handler/create_application_examination",r={ai_generated_job_application_id:c};return this.http.post(u,r)}getApplicationExamination(c){const u=M.backendApiV2+"1.0.0/client/ai_handler/application_examination/"+encodeURIComponent(c);return this.http.get(u)}getApplicationExaminationByJobApplicationId(c){const u=M.backendApiV2+"1.0.0/client/ai_handler/application_examination_by_job_application/"+c;return this.http.get(u)}}class K0{constructor(c=He){this.http=c}searchForCertification(c){let u=encodeURIComponent(c),r=M.backendApiV2+`1.0.0/client/certificate?search_text=${u}`;return this.http.get(r)}saveCertification(c){let u=M.backendApiV2+"1.0.0/client/candidate_certificate",r={qualification_id:c};return this.http.post(u,r)}updateCertification(c){let u=M.backendApiV2+"1.0.0/client/candidate_certificate/"+c.id,r=c;return this.http.put(u,r)}removeCertification(c){let u=M.backendApiV2+"1.0.0/client/candidate_certificate/"+c;return this.http.delete(u)}addUnknownCertificate(c){let u=M.backendApiV2+"1.0.0/client/certificate",r={certificate_name:c};return this.http.post(u,r)}}class W0{constructor(c=He){this.http=c}sendMyCvToEmail(){let c=M.backendApi+"api/1.1.0/candidate/sendPdf",u={};return this.http.post(c,u)}getMyCv(){let c=M.backendApiV2+"1.0.0/client/candidate/pdf";return this.http.get(c,{responseType:"blob"})}getMyCvV2(c){let u=M.backendApiV2+"1.0.0/client/candidate/pdf_url?language="+c;return this.http.get(u)}generateCv(c){let u=M.backendApiV2+"1.0.0/client/candidate/generateCv",r={language:c};return this.http.post(u,r)}}class F0{constructor(c=He,u=Gl){this.http=c,this.localStorageService=u}uploadCv(c,u){const r=M.backendApiV2+"1.0.0/client/cv_upload";return this.http.post(r,c,{headers:{Authorization:`Bearer ${u}`}})}getCvUploadData(){let c=M.backendApiV2+"1.0.0/client/cv_upload/get_upload_cv";return this.http.get(c)}setProfileTextToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/profile_text_is_done/"+c,r={};return this.http.put(u,r)}setExperienceToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/experience_is_done/"+c,r={};return this.http.put(u,r)}setEducationToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/education_is_done/"+c,r={};return this.http.put(u,r)}setQualificationToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/qualification_is_done/"+c,r={};return this.http.put(u,r)}setCertificateToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/certificate_is_done/"+c,r={};return this.http.put(u,r)}setLanguageToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/language_is_done/"+c,r={};return this.http.put(u,r)}setDriversLicenseToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/drivers_license_is_done/"+c,r={};return this.http.put(u,r)}setCvUploadToDone(c){let u=M.backendApiV2+"1.0.0/client/cv_upload/cv_is_done/"+c,r={};return this.http.put(u,r)}}class $0{constructor(c=He){this.http=c}getAllDriverLicenses(){let c=M.backendApi+"api/1.1.0/driversLicenses";return this.http.get(c)}updateDriverLicense(c,u){let r=M.backendApi+"api/1.1.0/candidate/driversLicense/"+c,h={};return this.http.put(r,h)}removeLanguage(c){let u=M.backendApiV2+"1.0.0/client/candidate_drivers_license/"+c;return this.http.delete(u)}saveDriverLicense(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_drivers_license",h={level:u,drivers_license_id:c.id};return this.http.post(r,h)}saveDriverLicenseV2(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_drivers_license",h={level:c,drivers_license_id:u};return this.http.post(r,h)}}class I0{constructor(c=He){this.http=c}searchForEducations(c){let u=M.backendApi+"api/1.1.0/educations/search/"+c;return this.http.get(u)}searchForSchools(c){let u=M.backendApi+"api/1.1.0/institutions/search/"+c;return this.http.get(u)}saveEducation(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_education",h={comments:c.comments,education_disced_15:c.education.disced15,from_date:c.fromDate,to_date:c.toDate,institution_number:c.institution?.instNumber,is_current:c.isCurrent,language:u};return this.http.post(r,h)}removeEducation(c){let u=M.backendApiV2+"1.0.0/client/candidate_education/"+c;return this.http.delete(u)}updateEducation(c,u,r){let h=M.backendApiV2+"1.0.0/client/candidate_education/"+c,v={comments:u.comments,from_date:u.fromDate,to_date:u.toDate,is_current:u.isCurrent,language:r};return this.http.put(h,v)}getEducationOccupationSuggestions(c){let u=M.backendApi+"api/1.1.0/educations/suggestions/occupation/"+c;return this.http.get(u)}saveUnknownEducation(c){let u=M.backendApiV2+"1.0.0/client/education/save_unknown_education",r={education_name:c};return this.http.post(u,r)}saveEducationV2(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_education",h={comments:c.comments,education_disced_15:c.education_disced_15,from_date:c.from_date,to_date:c.to_date,institution_number:c.institution_number,is_current:c.is_current,language:u};return this.http.post(r,h)}}class P0{constructor(c=He){this.http=c}getAllLanguages(){let c=M.backendApi+"api/1.1.0/languages";return this.http.get(c)}saveLanguage(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_language",h={language_id:u.id,level:c};return this.http.post(r,h)}updateLanguage(c,u,r){let h=M.backendApiV2+"1.0.0/client/candidate_language/"+c,v={level:u};return this.http.put(h,v)}removeLanguage(c){let u=M.backendApiV2+"1.0.0/client/candidate_language/"+c;return this.http.delete(u)}saveLanguageV2(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_language",h={language_id:u,level:c};return this.http.post(r,h)}}class ey{constructor(c=He){this.http=c}searchForQualification(c){let u=M.backendApi+"api/1.1.0/qualifications/type/3/search/"+c;return this.http.get(u)}updateQualification(c,u){let r=M.backendApiV2+"1.0.0/client/candidate_qualification/"+c,h={level:u};return this.http.put(r,h)}saveQualification(c){let u=M.backendApiV2+"1.0.0/client/candidate_qualification",r={level:c.level,qualification_id:c.qualification.id};return this.http.post(u,r)}removeQualification(c){let u=M.backendApiV2+"1.0.0/client/candidate_qualification/"+c;return this.http.delete(u)}getQualificationsOccupationSuggestions(c,u){let r=M.backendApi+"api/1.1.0/qualifications/type/"+u+"/suggestions/occupation/"+c;return this.http.get(r)}addUnknownQualification(c){let u=M.backendApi+"api/1.1.0/qualifications/type/3/fromCandidate",r={name:c,type:3};return this.http.post(u,r)}saveQualificationV2(c){let u=M.backendApiV2+"1.0.0/client/candidate_qualification",r={level:c.level,qualification_id:c.qualification_id};return this.http.post(u,r)}}class ty{constructor(c=He){this.http=c}addUnknownOccupation(c){let u=M.backendApi+"api/1.1.0/occupations/fromCandidate",r={name:c};return this.http.post(u,r)}}class ay{constructor(c=He){this.http=c}saveUnknownInstitution(c){let u=M.backendApiV2+"1.0.0/client/institution/save_unknown_institution",r={institution_name:c};return this.http.post(u,r)}}class ly{constructor(c=new tl,u=new W0,r=new F0,h=new Ss,v=new Z0,z=new I0,q=new ey,L=new K0,b=new P0,B=new $0,D=new hm,R=new ty,K=new ay,le=Gl){this.candidateService=c,this.cvService=u,this.cvUploadService=r,this.subscriptionService=h,this.aiHandlerService=v,this.educationService=z,this.qualificationService=q,this.certificationService=L,this.languageService=b,this.driverLicenseService=B,this.escoService=D,this.occupationService=R,this.institutionService=K,this.localStorageService=le}escosCache=null;async getSnapshot(){const[c,u,r,h,v,z,q,L,b,B]=await Promise.allSettled([this.candidateService.getCandidate(),this.candidateService.getCandidatesExperiences(),this.candidateService.getCandidatesEducations(),this.candidateService.getCandidatesQualifications(),this.candidateService.getCandidatesCertifications(),this.candidateService.getCandidatesLanguages(),this.candidateService.getCandidatesDriverLicenses(),this.subscriptionService.getPaymentOverview(),this.cvUploadService.getCvUploadData(),this.aiHandlerService.getMyCvDescriptions()]);return{candidate:c.status==="fulfilled"?c.value:null,experiences:u.status==="fulfilled"?u.value:[],educations:r.status==="fulfilled"?r.value:[],skills:h.status==="fulfilled"?h.value:[],certifications:v.status==="fulfilled"?v.value:[],languages:z.status==="fulfilled"?z.value:[],driverLicenses:q.status==="fulfilled"?q.value:[],paymentOverview:L.status==="fulfilled"?L.value:null,cvUploadData:b.status==="fulfilled"?b.value:null,aiGeneratedCVDescription:B.status==="fulfilled"&&B.value?.id?B.value:null}}async setActiveSeeker(c,u,r){const h={...c,isActive:u};return this.candidateService.updateCandidate(h,r)}async updateCandidate(c,u){return this.candidateService.updateCandidate(c,u)}async generateCv(c){await this.cvService.generateCv(c)}async getCvDownloadUrl(c){return(await this.cvService.getMyCvV2(c)).url}async uploadCv(c,u){const r=await this.localStorageService.getAuthToken();if(!r)throw new Error("No auth token found.");await this.cvUploadService.uploadCv({base_64_cv_file:c,cv_file_type:u},r)}async optimizeCv(c){await this.aiHandlerService.updateMyCvDescriptions(c)}async updateExperience(c,u){await this.candidateService.updateExperience(c,u)}async updateEducation(c,u){const r={comments:c.comments,education:c.education,institution:c.institution,fromDate:new Date(c.fromDate),toDate:new Date(c.toDate),isCurrent:c.isCurrent};await this.educationService.updateEducation(c.id,r,u)}async updateCertification(c){await this.certificationService.updateCertification(c)}async updateLanguage(c){const u={id:c.language.id,isO639:c.language.isO639,name:c.language.name,ownName:c.language.ownName,priority:c.language.priority};await this.languageService.updateLanguage(c.id,c.level,u)}async removeExperience(c){await this.candidateService.removeExperience(c)}async removeEducation(c){await this.educationService.removeEducation(c)}async removeQualification(c){await this.qualificationService.removeQualification(c)}async removeCertification(c){await this.certificationService.removeCertification(c)}async removeLanguage(c){await this.languageService.removeLanguage(c)}async removeDriverLicense(c){await this.driverLicenseService.removeLanguage(c)}async getEscoSuggestions(c,u=25){this.escosCache||(this.escosCache=await this.escoService.listAllEscos());const r=c.trim().toLowerCase();return r?this.escosCache.filter(h=>h.preferedLabelDa.toLowerCase().includes(r)).slice(0,u):this.escosCache.slice(0,u)}async getLanguageOptions(){return(await this.languageService.getAllLanguages()).allLanguages??[]}async getDriverLicenseOptions(){return this.driverLicenseService.getAllDriverLicenses()}async createExperience(c,u){let r=c.escoId??null;if(!r&&c.occupationName?.trim()&&(r=(await this.occupationService.addUnknownOccupation(c.occupationName.trim())).id),!r)throw new Error("Vælg eller opret en stilling først.");await this.candidateService.saveExperienceV2({companyName:c.companyName,comments:c.comments,fromDate:c.fromDate,toDate:c.toDate,isCurrent:c.isCurrent,escoId:r},u)}async createEducation(c,u){let r=c.educationDisced15??null;if(!r&&c.educationName?.trim()&&(r=(await this.educationService.saveUnknownEducation(c.educationName)).disced15),!r)throw new Error("Vælg eller opret en uddannelse først.");let h=c.institutionNumber;!h&&c.institutionName?.trim()&&(h=(await this.institutionService.saveUnknownInstitution(c.institutionName.trim())).inst_number),await this.educationService.saveEducationV2({comments:c.comments,institution_number:h,from_date:c.fromDate,to_date:c.toDate,education_disced_15:r,is_current:c.isCurrent},u)}async createCertification(c){let u=c.certificateId??null;if(!u&&c.certificateName?.trim()&&(u=(await this.certificationService.addUnknownCertificate(c.certificateName.trim())).certificate_id),!u)throw new Error("Vælg eller opret et certifikat først.");await this.certificationService.saveCertification(u)}async createLanguage(c,u){await this.languageService.saveLanguageV2(u,c)}async getQualificationSuggestions(c){const u=c.trim();return u?this.qualificationService.searchForQualification(u):[]}async createQualification(c){let u=c.qualificationId?.trim()||"";if(!u&&c.qualificationName?.trim()&&(u=(await this.qualificationService.addUnknownQualification(c.qualificationName.trim())).id),!u)throw new Error("Vælg eller opret en kvalifikation først.");await this.qualificationService.saveQualificationV2({qualification_id:u,level:c.level})}async getEducationSuggestions(c){const u=c.trim();return u?this.educationService.searchForEducations(u):[]}async getSchoolSuggestions(c){const u=c.trim();return u?this.educationService.searchForSchools(u):[]}async getCertificationSuggestions(c){const u=c.trim();return u?this.certificationService.searchForCertification(u):[]}async createDriverLicense(c,u){await this.driverLicenseService.saveDriverLicenseV2(u,c)}}const ny={candidate:null,experiences:[],educations:[],skills:[],certifications:[],languages:[],driverLicenses:[],paymentOverview:null,cvUploadData:null,aiGeneratedCVDescription:null},iy=[{id:"e1",title:"Senior Frontend-udvikler",company:"Lunar",from:"2020-08-01",to:null,description:"Udvikling og vedligeholdelse af core-features i bankens app samt performance-optimering."},{id:"e2",title:"Web-udvikler",company:"Trustpilot",from:"2017-01-01",to:"2020-07-01",description:"Udviklede dashboards og analysevaerktojer i taet samarbejde med UX-teamet."}],sy=[{id:"ed1",title:"Cand.it i Webudvikling",school:"IT-Universitetet i Kobenhavn",from:"2013-08-01",to:"2015-06-01",description:"Specialisering i webteknologier, databaser og brugercentreret design."},{id:"ed2",title:"Datamatiker",school:"KEA - Kobenhavns Erhvervsakademi",from:"2010-08-01",to:"2013-06-01",description:"Softwarekonstruktion, systemarkitektur og programmering i Java og C#."}];function ys(o){if(!o)return null;const c=o instanceof Date?o:new Date(o);return Number.isNaN(c.getTime())?null:c}function Lh(o){const c=ys(o);return c?new Intl.DateTimeFormat("da-DK",{month:"short",year:"numeric"}).format(c):"Ukendt"}function Rh(o,c,u){const r=Lh(o),h=u?"Nu":Lh(c);return`${r} - ${h}`}function cy(o){const c=ys(o);return c?new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"long",year:"numeric"}).format(c):"Ikke angivet"}function Hh(o){return[...o].sort((c,u)=>{const r=ys(c.fromDate)?.getTime()??0;return(ys(u.fromDate)?.getTime()??0)-r})}function uy(o){return o.qualification?.name||"Kvalifikation"}function ry(o){return o.qualification?.name||o.levelName||"Certificering"}function oy(o){return o.driversLicense?.name||o.levelName||"Korekort"}function dy(o){return o.levelName||"Niveau ukendt"}function fy({onLogout:o,onNavigate:c,onToggleTheme:u,theme:r}){const h=T.useMemo(()=>new ly,[]),[v,z]=T.useState("standard"),[q,L]=T.useState(ny),[b,B]=T.useState(!0);T.useEffect(()=>{let E=!0;return h.getSnapshot().then(ae=>{E&&L(ae)}).finally(()=>{E&&B(!1)}),()=>{E=!1}},[h]);const D=q.candidate,R=D?.firstName?.trim()||D?.name?.trim()||"Lasse",K=D?.firstName||"Lasse",le=D?.lastName||"Hansen",Z=D?.imageUrl||D?.image||"",fe=q.experiences.length>0?Hh(q.experiences):[],te=q.educations.length>0?Hh(q.educations):[],se=q.skills,Y=q.languages,P=q.certifications,ie=q.driverLicenses,G=Y.length>0?Y.map(E=>({id:E.id,name:E.language?.name||"Sprog",level:dy(E)})):[{id:"da",name:"Dansk",level:"Modersmal"},{id:"en",name:"Engelsk",level:"Flydende"}];return n.jsxs("section",{className:`dash-root ${r==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"cv",onNavigate:c}),n.jsxs("main",{className:`dash-main custom-scrollbar cv-page ${v==="reference"?"cv-design-reference":""}`,children:[n.jsx(Jt,{name:R,imageUrl:Z||void 0,onLogout:o,theme:r,onToggleTheme:u,actions:n.jsxs("button",{type:"button",className:"cv-design-toggle",onClick:()=>z(E=>E==="standard"?"reference":"standard"),children:[v==="reference"?n.jsx(im,{size:16,strokeWidth:1.8}):n.jsx(sm,{size:16,strokeWidth:1.8}),n.jsx("span",{children:v==="reference"?"Skift til standard design":"Skift til reference design"})]})}),n.jsxs("div",{className:"cv-head",children:[n.jsxs("div",{children:[n.jsx("h1",{children:"Dit CV"}),n.jsx("p",{children:"Handter dine faglige oplysninger, erfaringer og uddannelser."})]}),n.jsxs("button",{type:"button",className:"cv-edit-btn",children:[n.jsx(Op,{size:16,strokeWidth:1.8})," Rediger CV"]})]}),b?n.jsx("p",{className:"dash-loading",children:"Indlaeser CV..."}):null,n.jsxs("div",{className:"cv-layout",children:[n.jsxs("div",{className:"cv-left",children:[n.jsxs("article",{className:"cv-card",children:[n.jsx("div",{className:"cv-avatar-wrap",children:Z?n.jsx("img",{src:Z,alt:R,className:"cv-avatar"}):n.jsx("div",{className:"cv-avatar cv-avatar-fallback",children:R.slice(0,1).toUpperCase()})}),n.jsxs("div",{className:"cv-section-head",children:[n.jsx(ql,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Personlige oplysninger"})]}),n.jsxs("div",{className:"cv-personal-list",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Fornavn"}),n.jsx("strong",{children:K})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Efternavn"}),n.jsx("strong",{children:le})]}),n.jsxs("div",{children:[n.jsx("span",{children:"E-mail"}),n.jsx("strong",{children:D?.email||"lasse@eksempel.dk"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Telefon"}),n.jsx("strong",{children:D?.phoneNumber||"+45 12 34 56 78"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Fodselsdato"}),n.jsx("strong",{children:cy(D?.birthday)})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Kon"}),n.jsx("strong",{children:D?.gender||"Mand"})]})]})]}),n.jsxs("article",{className:"cv-card",children:[n.jsxs("div",{className:"cv-section-head",children:[n.jsx(hr,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Kvalifikationer"})]}),n.jsx("div",{className:"cv-chip-wrap",children:(se.length>0?se.map(uy):["HTML & CSS","Tailwind CSS","JavaScript","React","UI/UX Design"]).slice(0,12).map(E=>n.jsx("span",{className:"cv-chip",children:E},E))})]}),n.jsxs("article",{className:"cv-card",children:[n.jsxs("div",{className:"cv-section-head",children:[n.jsx(js,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Sprog"})]}),n.jsx("div",{className:"cv-language-list",children:G.map(E=>n.jsxs("div",{children:[n.jsx("strong",{children:E.name}),n.jsx("span",{children:E.level})]},E.id))})]}),n.jsxs("div",{className:"cv-mini-grid",children:[n.jsxs("article",{className:"cv-card",children:[n.jsxs("div",{className:"cv-section-head",children:[n.jsx(Ph,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Certificeringer"})]}),n.jsxs("ul",{className:"cv-list",children:[(P.length>0?P:[]).slice(0,4).map(E=>n.jsxs("li",{children:[n.jsx(Ke,{size:15,strokeWidth:1.8})," ",ry(E)]},E.id)),P.length===0?n.jsxs(n.Fragment,{children:[n.jsxs("li",{children:[n.jsx(Ke,{size:15,strokeWidth:1.8})," AWS Certified Developer"]}),n.jsxs("li",{children:[n.jsx(Ke,{size:15,strokeWidth:1.8})," Certificeret Scrum Master"]})]}):null]})]}),n.jsxs("article",{className:"cv-card",children:[n.jsxs("div",{className:"cv-section-head",children:[n.jsx(tm,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Korekort"})]}),n.jsx("div",{className:"cv-chip-wrap",children:(ie.length>0?ie.map(oy):["B (Almindelig bil)","A (Motorcykel)"]).map(E=>n.jsx("span",{className:"cv-chip",children:E},E))})]})]})]}),n.jsxs("div",{className:"cv-right",children:[n.jsxs("section",{children:[n.jsxs("div",{className:"cv-timeline-head",children:[n.jsx("div",{className:"cv-timeline-icon",children:n.jsx(fr,{size:19,strokeWidth:1.8})}),n.jsx("h2",{children:"Erhvervserfaring"})]}),n.jsx("div",{className:"cv-timeline",children:(fe.length>0?fe:iy).map((E,ae)=>{const he="occupation"in E?E.occupation?.name||"Stilling":E.title,pe="companyName"in E?E.companyName:E.company,H="comments"in E?E.comments:E.description,Q="fromDate"in E?E.fromDate:E.from,ue="toDate"in E?E.toDate:E.to,ee="isCurrent"in E?!!E.isCurrent:!1;return n.jsxs("article",{className:"cv-timeline-item",children:[n.jsx("div",{className:"cv-timeline-dot",children:n.jsx(sr,{size:15,strokeWidth:1.8})}),n.jsxs("div",{className:"cv-timeline-card",children:[n.jsx("h3",{children:he}),n.jsxs("div",{className:"cv-meta",children:[n.jsx("strong",{children:pe}),n.jsx("span",{children:Rh(Q,ue,ee)})]}),n.jsx("p",{children:H||"Ingen beskrivelse."})]})]},"id"in E?String(E.id):`exp-${ae}`)})})]}),n.jsx("div",{className:"cv-divider"}),n.jsxs("section",{children:[n.jsxs("div",{className:"cv-timeline-head",children:[n.jsx("div",{className:"cv-timeline-icon",children:n.jsx(nm,{size:19,strokeWidth:1.8})}),n.jsx("h2",{children:"Uddannelse"})]}),n.jsx("div",{className:"cv-timeline",children:(te.length>0?te:sy).map((E,ae)=>{const he="education"in E?E.education?.name||"Uddannelse":E.title,pe="institution"in E?E.institution?.name||"Institution":E.school,H="comments"in E?E.comments:E.description,Q="fromDate"in E?E.fromDate:E.from,ue="toDate"in E?E.toDate:E.to,ee="isCurrent"in E?!!E.isCurrent:!1;return n.jsxs("article",{className:"cv-timeline-item",children:[n.jsx("div",{className:"cv-timeline-dot",children:n.jsx(sr,{size:15,strokeWidth:1.8})}),n.jsxs("div",{className:"cv-timeline-card",children:[n.jsx("h3",{children:he}),n.jsxs("div",{className:"cv-meta",children:[n.jsx("strong",{children:pe}),n.jsx("span",{children:Rh(Q,ue,ee)})]}),n.jsx("p",{children:H||"Ingen beskrivelse."})]})]},"id"in E?String(E.id):`edu-${ae}`)})})]})]})]})]})]})}class hy{constructor(c=He){this.http=c}getNotificationSetting(){const c=M.backendApiV2+"2.0.0/client/notification/settings";return this.http.get(c)}createNotificationSetting(c){const u=M.backendApiV2+"2.0.0/client/notification/settings";return this.http.post(u,c)}updateNotificationSetting(c,u){const r=M.backendApiV2+"2.0.0/client/notification/settings/"+c;return this.http.put(r,u)}deleteNotificationSetting(c){const u=M.backendApiV2+"2.0.0/client/notification/settings/"+c;return this.http.delete(u)}getNewNotificationCount(){let c=M.backendApiV2+"1.0.0/client/notification/unseen_notifications";return this.http.get(c)}getNotifications(c,u){let r=M.backendApiV2+"1.0.0/client/notification/"+c+"/"+u;return this.http.get(r)}notificationSeenByUser(c){let u=M.backendApiV2+"1.0.0/client/notification/seen_by_user/"+c,r={};return this.http.put(u,r)}}class vr{constructor(c=He,u=Gl){this.http=c,this.localStorage=u}listSimulationPersonalities(){let c=M.backendApiV2+"client/simulation/1.0.0/list_simulation_personalities",u=new el().set("language","da");return this.http.get(c,{params:u})}getInterviewEvaluation(c){const u=M.backendApiV2+`client/simulation/1.0.0/interview_evaluation/${c}`;return this.http.get(u)}listInterviews(c=20,u=0){const r=M.backendApiV2+"client/job_simulator/1.0.0/list_interviews",h=new el().set("limit",c.toString()).set("offset",u.toString());return this.http.get(r,{params:h})}submitEvaluationRating(c,u,r){const h=M.backendApiV2+"client/simulation/1.0.0/evaluation_rating",v={interview_id:c,rating:u,rating_text:r};return this.http.post(h,v)}submitInterviewRating(c,u,r){const h=M.backendApiV2+"client/simulation/1.0.0/interview_rating",v={interview_id:c,rating:u,rating_text:r};return this.http.post(h,v)}}class my{constructor(c=He){this.http=c}chatMessageThreads=[];getChatMessages(){let c=M.backendApi+"api/1.1.0/chatMessages/forCandidate/";return this.http.get(c)}sendMessage(c){let u=M.backendApi+"api/1.1.0/chatMessages/"+c.threadId+"/fromCandidate";return this.http.post(u,c)}markThreadRead(c){let u=M.backendApi+"api/1.1.0/chatMessages/markRead/"+c;return this.http.get(u)}}class vy{constructor(c=He){this.http=c}getUnreadMessages(){let c=M.backendApi+"api/1.1.0/chatMessages/getUnreadCount";return this.http.get(c)}}function gs(o){if(!o)return 0;const u=(o instanceof Date?o:new Date(o)).getTime();return Number.isNaN(u)?0:u}function Iu(o,c){const u=o?.timeSent?new Date(o.timeSent):new Date,r=o?.seen?new Date(o.seen):void 0;return{id:o?.id,threadId:o?.threadId??c,timeSent:u,fromCandidate:!!o?.fromCandidate,text:o?.text??"",seen:r}}class vm{constructor(c=new my,u=new vy,r=new tl){this.chatMessagesService=c,this.messageService=u,this.candidateService=r}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",r=c.imageUrl||c.image||void 0;return{name:u,imageUrl:r}}catch{return{name:"Lasse"}}}async getThreads(){return(await this.chatMessagesService.getChatMessages()??[]).map(u=>{const r=(u.allMessages??[]).map(v=>Iu(v,u.id));r.sort((v,z)=>gs(v.timeSent)-gs(z.timeSent));const h=u.latestMessage?Iu(u.latestMessage,u.id):r[r.length-1]??Iu(void 0,u.id);return{...u,allMessages:r,latestMessage:h}}).sort((u,r)=>gs(r.latestMessage?.timeSent)-gs(u.latestMessage?.timeSent))}async getUnreadCount(){const c=await this.messageService.getUnreadMessages();return Number(c?.unreadCount??0)}async sendMessage(c,u){const r={threadId:c,text:u.trim(),fromCandidate:!0,timeSent:new Date};return this.chatMessagesService.sendMessage(r)}async markThreadReadByMessageId(c){c&&await this.chatMessagesService.markThreadRead(c)}}function Xn(o){return typeof o=="object"&&o!==null?o:null}function Ot(o){return typeof o=="string"?o:""}function gy(o){return typeof o=="number"?o:null}function py(o){const c=Xn(o);if(!c)return null;const r=Xn(c.jobPosting)??c,h=Ot(r.id);return h?{id:h,title:Ot(r.title),companyName:Ot(r.companyName),address:Ot(r.address),applicationDeadline:Ot(r.applicationDeadline),candidateDistance:gy(r.candidateDistance),fromJobnet:!!r.fromJobnet,logoUrl:Ot(r.logoUrl),companyLogoImage:Ot(r.companyLogoImage)}:null}function yy(o){const c=Xn(o);return(Array.isArray(c?.interviews)?c.interviews:[]).map(r=>{const h=Xn(r);if(!h)return null;const v=Ot(h.id);return v?{id:v,jobName:Ot(h.job_name)||"Interview",companyName:Ot(h.company_name)||null,interviewDate:Ot(h.interview_date)||null,recommendation:Ot(h.recommendation)||null,isCompleted:!!h.is_completed}:null}).filter(r=>!!r).sort((r,h)=>{const v=r.interviewDate?new Date(r.interviewDate).getTime():0;return(h.interviewDate?new Date(h.interviewDate).getTime():0)-v}).slice(0,5)}function by(o){const c=Xn(o);return c?Array.isArray(c.searchList)?c.searchList:[]:[]}class jy{constructor(c=new tl,u=new hy,r=new mr,h=new Ss,v=new vr,z=new vm){this.candidateService=c,this.notificationService=u,this.jobService=r,this.subscriptionService=h,this.simulationService=v,this.messagesViewModel=z}async loadInitialData(){const[c,u,r,h,v,z]=await Promise.allSettled([this.candidateService.getCandidate(),this.notificationService.getNotifications(0,5),this.messagesViewModel.getThreads(),this.loadBestJobs(),this.subscriptionService.getPaymentOverview(),this.simulationService.listInterviews(5,0)]);return{candidate:c.status==="fulfilled"?c.value:null,notifications:u.status==="fulfilled"?u.value.slice(0,5):[],messages:r.status==="fulfilled"?r.value.slice(0,5):[],bestJobs:h.status==="fulfilled"?h.value:[],subscription:v.status==="fulfilled"?v.value:null,evaluations:z.status==="fulfilled"?yy(z.value):[]}}async loadBestJobs(){const c=await this.jobService.getJobsV2(10,0,5,[]);return by(c).map(r=>py(r)).filter(r=>!!r).slice(0,5)}}const xy={bestJobs:[],candidate:null,evaluations:[],messages:[],notifications:[],subscription:null};function Vh(o){return o.trim().slice(0,1).toUpperCase()||"A"}function Sy({onLogout:o,onNavigate:c,onOpenJobDetail:u,onToggleTheme:r,theme:h}){const v=T.useMemo(()=>new jy,[]),[z,q]=T.useState(xy),[L,b]=T.useState(!0);T.useEffect(()=>{let R=!0;return v.loadInitialData().then(K=>{R&&q(K)}).finally(()=>{R&&b(!1)}),()=>{R=!1}},[v]);const B=z.candidate?.firstName?.trim()||z.candidate?.name?.trim()||"Lasse",D=z.candidate?.imageUrl||z.candidate?.image||"";return n.jsxs("section",{className:`dash-root ${h==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"dashboard",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar",children:[n.jsx(Jt,{name:B,imageUrl:D||void 0,onLogout:o,theme:h,onToggleTheme:r}),n.jsxs("div",{className:"dash-welcome",children:[n.jsxs("h1",{children:["Velkommen tilbage ",B," ",n.jsx("span",{children:"👋"})]}),n.jsx("p",{children:"Her er, hvad der sker med din jobsøgning i dag."})]}),L?n.jsx("p",{className:"dash-loading",children:"Indlaeser dashboard..."}):null,n.jsxs("div",{className:"dash-grid",children:[n.jsxs("div",{className:"dash-grid-main",children:[n.jsxs("article",{className:"dash-card",children:[n.jsx("div",{className:"dash-card-head",children:n.jsx("h2",{children:"Anbefalet til dig"})}),n.jsx("div",{className:"dash-job-list",children:(z.bestJobs.length>0?z.bestJobs:[{id:"d1",title:"Senior Frontend-udvikler",companyName:"Lunar",address:"Kobenhavn, DK",applicationDeadline:"",candidateDistance:null,fromJobnet:!1,logoUrl:"",companyLogoImage:""},{id:"d2",title:"React-udvikler",companyName:"Pleo",address:"Remote",applicationDeadline:"",candidateDistance:null,fromJobnet:!1,logoUrl:"",companyLogoImage:""}]).slice(0,5).map(R=>n.jsxs("div",{className:"dash-job-item",role:"button",tabIndex:0,onClick:()=>u(R.id,!!R.fromJobnet,"dashboard"),onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),u(R.id,!!R.fromJobnet,"dashboard"))},children:[n.jsxs("div",{className:"dash-job-left",children:[n.jsx("div",{className:"dash-company-chip",children:Vh(R.companyName)}),n.jsxs("div",{children:[n.jsx("h4",{children:R.title}),n.jsxs("p",{children:[R.companyName," • ",R.address||"Lokation ikke angivet"]})]})]}),n.jsx("button",{type:"button",className:"dash-job-arrow-btn","aria-label":"Se job",onClick:K=>{K.stopPropagation(),u(R.id,!!R.fromJobnet,"dashboard")},children:n.jsx(Ua,{size:16,strokeWidth:1.8})})]},R.id))})]}),n.jsxs("div",{className:"dash-split-grid",children:[n.jsxs("article",{className:"dash-card",children:[n.jsx("h3",{children:"Seneste beskeder"}),n.jsxs("div",{className:"dash-message-list",children:[(z.messages.length>0?z.messages:[]).slice(0,5).map(R=>n.jsxs("div",{className:"dash-message-item",children:[n.jsx("div",{className:"dash-avatar",children:Vh(R.companyName||"A")}),n.jsxs("div",{children:[n.jsx("h4",{children:R.companyName||"Samtale"}),n.jsx("p",{children:R.latestMessage?.text||"Ingen besked endnu"})]})]},R.id)),z.messages.length===0?n.jsx("p",{className:"dash-muted",children:"Ingen beskeder endnu."}):null]})]}),n.jsxs("article",{className:"dash-card",children:[n.jsxs("div",{className:"dash-card-head dash-card-head-inline",children:[n.jsx("h3",{children:"Seneste simuleringer"}),n.jsx("button",{type:"button",className:"dash-icon-btn",children:n.jsx(Bp,{size:16,strokeWidth:1.8})})]}),n.jsxs("div",{className:"dash-sim-list",children:[n.jsxs("div",{className:"dash-sim-item",children:[n.jsxs("div",{className:"dash-sim-left",children:[n.jsx("span",{className:"dash-sim-icon teal",children:n.jsx(nr,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:"Teknisk samtale"}),n.jsx("p",{children:"Frontend-fokus"})]})]}),n.jsxs("div",{className:"dash-sim-right",children:[n.jsx("strong",{children:"92/100"}),n.jsx("div",{className:"dash-progress",children:n.jsx("span",{style:{width:"92%"}})})]})]}),n.jsxs("div",{className:"dash-sim-item",children:[n.jsxs("div",{className:"dash-sim-left",children:[n.jsx("span",{className:"dash-sim-icon purple",children:n.jsx(y0,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:"Kulturelt match"}),n.jsx("p",{children:"Lunar Bank"})]})]}),n.jsxs("div",{className:"dash-sim-right",children:[n.jsx("strong",{children:"88/100"}),n.jsx("div",{className:"dash-progress",children:n.jsx("span",{style:{width:"88%"}})})]})]}),n.jsxs("div",{className:"dash-sim-item",children:[n.jsxs("div",{className:"dash-sim-left",children:[n.jsx("span",{className:"dash-sim-icon amber",children:n.jsx(Gp,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:"Systemdesign"}),n.jsx("p",{children:"Arkitektur"})]})]}),n.jsxs("div",{className:"dash-sim-right",children:[n.jsx("strong",{className:"warn",children:"65/100"}),n.jsx("div",{className:"dash-progress",children:n.jsx("span",{className:"warn",style:{width:"65%"}})})]})]}),n.jsxs("div",{className:"dash-sim-item",children:[n.jsxs("div",{className:"dash-sim-left",children:[n.jsx("span",{className:"dash-sim-icon blue",children:n.jsx(nr,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:"Live-kodning"}),n.jsx("p",{children:"React.js"})]})]}),n.jsxs("div",{className:"dash-sim-right",children:[n.jsx("strong",{children:"95/100"}),n.jsx("div",{className:"dash-progress",children:n.jsx("span",{style:{width:"95%"}})})]})]}),n.jsxs("div",{className:"dash-sim-item",children:[n.jsxs("div",{className:"dash-sim-left",children:[n.jsx("span",{className:"dash-sim-icon gray",children:n.jsx(um,{size:16,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h4",{children:"HR-screening"}),n.jsx("p",{children:"Generelt"})]})]}),n.jsxs("div",{className:"dash-sim-right",children:[n.jsx("strong",{className:"na",children:"N/A"}),n.jsx("div",{className:"dash-progress"})]})]})]})]})]})]}),n.jsxs("div",{className:"dash-grid-side",children:[n.jsxs("article",{className:"dash-card dash-ai-card dash-ai-card-group",children:[n.jsx("div",{className:"dash-ai-peel"}),n.jsxs("div",{className:"dash-ai-content",children:[n.jsxs("div",{className:"dash-ai-head",children:[n.jsx(Zn,{size:22,strokeWidth:1.8}),n.jsx("h3",{children:"AI-indsigter til dit CV"})]}),n.jsx("p",{children:"Vi analyserede dit seneste CV op imod dine målroller."}),n.jsxs("ul",{className:"dash-ai-list",children:[n.jsxs("li",{className:"dash-ai-item",children:[n.jsx("span",{className:"dash-ai-item-icon",children:n.jsx(gg,{size:13,strokeWidth:2})}),n.jsxs("div",{children:[n.jsx("strong",{children:"Kvantificer dine resultater"}),n.jsx("small",{children:'Tilføj tal til din rolle hos TechCorp (f.eks. \\"Forbedrede loadhastighed med 40%\\").'})]})]}),n.jsxs("li",{className:"dash-ai-item",children:[n.jsx("span",{className:"dash-ai-item-icon",children:n.jsx(hg,{size:13,strokeWidth:2})}),n.jsxs("div",{children:[n.jsx("strong",{children:"Omorganiser dine færdigheder"}),n.jsx("small",{children:"Flyt React & TypeScript til toppen baseret på aktive Jobagenter."})]})]}),n.jsxs("li",{className:"dash-ai-item",children:[n.jsx("span",{className:"dash-ai-item-icon",children:n.jsx($g,{size:13,strokeWidth:2})}),n.jsxs("div",{children:[n.jsx("strong",{children:"Tilføj manglende nøgleord"}),n.jsx("small",{children:'Inkluder \\"Tailwind CSS\\" for at matche 85% af dine anbefalede jobs.'})]})]}),n.jsxs("li",{className:"dash-ai-item dash-ai-xl-only",children:[n.jsx("span",{className:"dash-ai-item-icon",children:n.jsx(om,{size:13,strokeWidth:2})}),n.jsxs("div",{children:[n.jsx("strong",{children:"Omskriv dit resumé"}),n.jsx("small",{children:"Gør din målsætning mere handlingsorienteret."})]})]}),n.jsxs("li",{className:"dash-ai-item dash-ai-xl-only",children:[n.jsx("span",{className:"dash-ai-item-icon",children:n.jsx(vp,{size:13,strokeWidth:2})}),n.jsxs("div",{children:[n.jsx("strong",{children:"Opdater porteføljelink"}),n.jsx("small",{children:"Dit GitHub-link gav en 404-fejl i vores test."})]})]})]}),n.jsx("button",{type:"button",children:"Anvend alle ændringer"})]})]}),n.jsxs("article",{className:"dash-card",children:[n.jsxs("div",{className:"dash-card-head dash-card-head-inline",children:[n.jsx("h3",{children:"Aktive Jobagenter"}),n.jsx("button",{type:"button",className:"dash-icon-btn",children:n.jsx(rm,{size:16,strokeWidth:1.8})})]}),n.jsxs("div",{className:"dash-agent-list",children:[n.jsxs("div",{className:"dash-agent-item",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Frontend-udvikler"}),n.jsxs("small",{children:[n.jsx(Qn,{size:13,strokeWidth:1.8})," Kobenhavn"]})]}),n.jsxs("label",{className:"dash-switch",children:[n.jsx("input",{type:"checkbox",defaultChecked:!0}),n.jsx("span",{})]})]}),n.jsxs("div",{className:"dash-agent-item",children:[n.jsxs("div",{children:[n.jsx("span",{children:"React-udvikler"}),n.jsxs("small",{children:[n.jsx(cr,{size:13,strokeWidth:1.8})," Remote (EU)"]})]}),n.jsxs("label",{className:"dash-switch",children:[n.jsx("input",{type:"checkbox",defaultChecked:!0}),n.jsx("span",{})]})]}),n.jsxs("div",{className:"dash-agent-item muted",children:[n.jsxs("div",{children:[n.jsx("span",{children:"UI/UX-designer"}),n.jsxs("small",{children:[n.jsx(Qn,{size:13,strokeWidth:1.8})," Aarhus"]})]}),n.jsxs("label",{className:"dash-switch",children:[n.jsx("input",{type:"checkbox"}),n.jsx("span",{})]})]})]}),n.jsx("button",{type:"button",className:"dash-outline-btn",children:"Opret ny agent"})]})]})]})]})]})}function Jn(o){return o instanceof Date?o.toISOString():typeof o=="string"?o:""}function qh(o){const c=[o.road,o.houseNum,o.zip,o.zipName].filter(u=>typeof u=="string"&&u.trim().length>0).join(" ");return{id:o.id,title:o.title??"Job",companyName:o.hiringCompanyName??"Ukendt virksomhed",occupationName:o.occupation?.name??"",address:c||o.zipName||"Ukendt adresse",description:o.description??"",applicationDeadline:Jn(o.applicationDeadline),websiteUrl:o.applicationUrl||o.hiringCompanyUrl||"",logoUrl:o.logoUrl||"",fromJobnet:!0,isSaved:!1,isApplied:!!o.applied,isFullTime:typeof o.isFullTime=="boolean"?o.isFullTime:null,workTimes:Array.isArray(o.workTimes)?o.workTimes:[],contactName:o.contactName??"",hiringCompanyName:o.hiringCompanyName??"",datePosted:Jn(o.datePosted),employmentDate:Jn(o.employmentDate),startAsSoonAsPossible:typeof o.startAsSoonAsPossible=="boolean"?o.startAsSoonAsPossible:null,numberOfPositions:typeof o.numberOfPositions=="number"?o.numberOfPositions:null}}function Bh(o,c){return{id:o,title:c.title??"Job",companyName:c.companyName??"Ukendt virksomhed",occupationName:c.position??"",address:"",description:[c.descriptionIntro,c.descriptionPosition,c.descriptionOffer].filter(u=>typeof u=="string"&&u.trim().length>0).join(` `),applicationDeadline:Jn(c.applicationDeadline),websiteUrl:c.website??"",logoUrl:"",fromJobnet:!1,isSaved:!1,isApplied:!!c.appliedJob,isFullTime:null,workTimes:Array.isArray(c.workTimes)?c.workTimes:[],contactName:"",hiringCompanyName:c.companyName??"",datePosted:"",employmentDate:Jn(c.fromDate),startAsSoonAsPossible:null,numberOfPositions:typeof c.numberOfPositions=="number"?c.numberOfPositions:null}}class Ny{constructor(c=new mr){this.jobService=c}async getDetail(c,u){if(u)try{const r=await this.jobService.getJobNetJobDetail(c);return qh(r)}catch{const r=await this.jobService.getJobDetail(c);return Bh(c,r)}try{const r=await this.jobService.getJobDetail(c);return Bh(c,r)}catch{const r=await this.jobService.getJobNetJobDetail(c);return qh(r)}}async toggleBookmark(c,u,r){const h=u?"star":"arbejd.com";await this.jobService.bookmarkJobV2(c,r,h)}async markAsApplied(c,u){if(u){await this.jobService.toggleApplyJobnetjob(c,!0);return}await this.jobService.applyJob(c)}}function ky(o){return o.trim().slice(0,1).toUpperCase()||"A"}function Pu(o){if(!o)return"Ikke angivet";const c=new Date(o);return Number.isNaN(c.getTime())?o:new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short",year:"numeric"}).format(c)}function _y(o){if(!o.trim())return"";if(typeof window>"u")return o;const u=new DOMParser().parseFromString(o,"text/html");u.querySelectorAll("script, style, iframe, object, embed, link, meta").forEach(r=>r.remove());for(const r of Array.from(u.body.querySelectorAll("*")))for(const h of Array.from(r.attributes)){const v=h.name.toLowerCase(),q=h.value.trim().toLowerCase();if(v.startsWith("on")){r.removeAttribute(h.name);continue}if((v==="href"||v==="src")&&q.startsWith("javascript:")){r.removeAttribute(h.name);continue}(v==="style"||v==="srcdoc")&&r.removeAttribute(h.name)}return u.body.innerHTML}function Ay(o){return o.isFullTime===!0?"Fuldtid":o.isFullTime===!1?"Deltid":o.workTimes.length>0?"Fleksibel arbejdstid":"Ikke oplyst"}function Ty({fromJobnet:o,jobId:c,onBack:u,onLogout:r,onNavigate:h,onToggleTheme:v,theme:z}){const q=T.useMemo(()=>new Ny,[]),L=T.useMemo(()=>new Ns,[]),[b,B]=T.useState({name:"Lasse"}),[D,R]=T.useState(null),[K,le]=T.useState(!0),[Z,fe]=T.useState(""),[te,se]=T.useState(!1),[Y,P]=T.useState(!1),[ie,G]=T.useState(!1),[E,ae]=T.useState(!1);T.useEffect(()=>{let Q=!0;async function ue(){le(!0),fe("");const[ee,W]=await Promise.allSettled([L.getCandidateProfile(),q.getDetail(c,o)]);Q&&(ee.status==="fulfilled"&&B(ee.value),W.status==="fulfilled"?(R(W.value),se(!!W.value.isSaved),P(!!W.value.isApplied)):(R(null),fe("Kunne ikke hente jobdetaljer. Proev igen.")),le(!1))}return ue(),()=>{Q=!1}},[q,o,c,L]);async function he(){if(!(!D||ie)){G(!0);try{await q.toggleBookmark(D.id,D.fromJobnet,!te),se(Q=>!Q)}finally{G(!1)}}}async function pe(){if(!(!D||Y||E)){ae(!0);try{await q.markAsApplied(D.id,D.fromJobnet),P(!0)}finally{ae(!1)}}}const H=T.useMemo(()=>_y(D?.description??""),[D?.description]);return n.jsxs("section",{className:`dash-root ${z==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"jobs",onNavigate:h}),n.jsxs("main",{className:"dash-main custom-scrollbar",children:[n.jsx(Jt,{name:b.name,imageUrl:b.imageUrl,onLogout:r,theme:z,onToggleTheme:v}),n.jsx("div",{className:"job-detail-back-row",children:n.jsxs("button",{type:"button",className:"job-detail-back-btn",onClick:u,children:[n.jsx(Ih,{size:15,strokeWidth:1.8}),n.jsx("span",{children:"Tilbage til jobs"})]})}),K?n.jsx("p",{className:"dash-loading",children:"Indlaeser jobdetaljer..."}):null,!K&&Z?n.jsx("p",{className:"dash-loading",children:Z}):null,!K&&D?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"job-detail-header",children:[n.jsx("div",{className:"job-detail-logo-wrap",children:D.logoUrl?n.jsx("img",{src:D.logoUrl,alt:D.companyName,className:"job-detail-logo-image"}):n.jsx("div",{className:"job-detail-logo-fallback",children:ky(D.companyName)})}),n.jsxs("div",{className:"job-detail-heading",children:[n.jsx("h1",{children:D.title||"Jobdetaljer"}),n.jsxs("div",{className:"job-detail-meta",children:[n.jsxs("span",{children:[n.jsx(ar,{size:14,strokeWidth:1.8})," ",D.companyName||"Virksomhed"]}),n.jsxs("span",{children:[n.jsx(Qn,{size:14,strokeWidth:1.8})," ",D.address||"Lokation ikke angivet"]}),n.jsxs("span",{children:[n.jsx(lr,{size:14,strokeWidth:1.8})," ",Ay(D)]})]})]})]}),n.jsxs("div",{className:"job-detail-grid",children:[n.jsxs("section",{className:"job-detail-main-card dash-card",children:[n.jsxs("div",{className:"job-detail-section",children:[n.jsx("h2",{children:"Om rollen"}),H?n.jsx("div",{className:"job-detail-rich-html",dangerouslySetInnerHTML:{__html:H}}):n.jsx("p",{children:"Ingen jobbeskrivelse er tilgaengelig endnu."})]}),n.jsxs("div",{className:"job-detail-section",children:[n.jsx("h3",{children:"Jobinformation"}),n.jsxs("div",{className:"job-detail-info-grid",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Ansøgningsfrist"}),n.jsx("strong",{children:Pu(D.applicationDeadline)})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Opslået"}),n.jsx("strong",{children:Pu(D.datePosted)})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Startdato"}),n.jsx("strong",{children:Pu(D.employmentDate)})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Stillinger"}),n.jsx("strong",{children:D.numberOfPositions??"Ikke angivet"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Kontaktperson"}),n.jsx("strong",{children:D.contactName||"Ikke angivet"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Kilde"}),n.jsx("strong",{children:D.fromJobnet?"Jobnet":"Arbejd.com"})]})]})]})]}),n.jsxs("aside",{className:"job-detail-side-col",children:[n.jsxs("article",{className:"dash-card job-detail-actions-card",children:[n.jsx("h2",{children:"Handlinger"}),n.jsxs("button",{type:"button",className:"job-detail-action-primary",children:[n.jsxs("span",{children:[n.jsx(Zn,{size:16,strokeWidth:1.8})," Generer ansøgning"]}),n.jsx(Ua,{size:14,strokeWidth:1.8})]}),n.jsxs("button",{type:"button",className:"job-detail-action-secondary",children:[n.jsxs("span",{children:[n.jsx(Wp,{size:16,strokeWidth:1.8})," Simuler jobsamtale"]}),n.jsx(Ua,{size:14,strokeWidth:1.8})]}),n.jsx("div",{className:"job-detail-action-divider"}),n.jsxs("button",{type:"button",className:"job-detail-text-action",onClick:()=>{he()},disabled:ie,children:[n.jsx(yg,{size:16,strokeWidth:1.8}),te?"Fjern fra gemte jobs":"Gem job"]}),n.jsxs("button",{type:"button",className:"job-detail-text-action",children:[n.jsx(xs,{size:16,strokeWidth:1.8}),"Del via email"]}),D.websiteUrl?n.jsxs("a",{href:D.websiteUrl,target:"_blank",rel:"noreferrer",className:"job-detail-text-action link",children:[n.jsx(js,{size:16,strokeWidth:1.8}),"Åbn på nettet"]}):null,n.jsxs("button",{type:"button",className:Y?"job-detail-text-action success is-done":"job-detail-text-action success",onClick:()=>{pe()},disabled:Y||E,children:[n.jsx(Ke,{size:16,strokeWidth:1.8}),Y?"Markeret som søgt":"Marker som søgt"]})]}),n.jsxs("article",{className:"dash-card job-detail-company-card",children:[n.jsx("h3",{children:"Om virksomheden"}),n.jsxs("div",{className:"job-detail-company-list",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Virksomhed"}),n.jsx("strong",{children:D.hiringCompanyName||D.companyName||"Ukendt"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Stilling"}),n.jsx("strong",{children:D.occupationName||"Ikke angivet"})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Website"}),n.jsx("strong",{children:D.websiteUrl||"Ikke angivet"})]})]})]})]})]})]}):null]})]})}const Yh=[2,4,6,8,10,12,24],zy=[{id:"job-1",title:"Senior Frontend-udvikler",companyName:"Lunar",occupationName:"Frontend",descriptionIntro:"Vi søger en erfaren frontend-udvikler til at lede vores nye team.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:5,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:98},{id:"job-2",title:"UX/UI Designer (Deltid)",companyName:"Pleo",occupationName:"Design",descriptionIntro:"Hjælp os med at skabe brugervenlige flows for vores expense management platform.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:12,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:95},{id:"job-3",title:"React-udvikler",companyName:"Zendesk",occupationName:"Frontend",descriptionIntro:"Bliv en del af vores kerne-team i Kobenhavn og byg software i topklasse.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:2,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:89},{id:"job-4",title:"Full Stack Web-udvikler",companyName:"Trustpilot",occupationName:"Full stack",descriptionIntro:"Vi leder efter en passioneret Full Stack Developer (Node.js/React).",address:"Remote",time:"",applicationDeadline:"",candidateDistance:null,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:85},{id:"job-5",title:"Frontend-arkitekt",companyName:"Novo Nordisk",occupationName:"Frontend",descriptionIntro:"Vær med til at designe arkitekturen for interne medicinske data-platforme.",address:"Bagsvaerd",time:"",applicationDeadline:"",candidateDistance:18,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:72},{id:"job-6",title:"Product Designer",companyName:"Podimo",occupationName:"Design",descriptionIntro:"Vi mangler en skarp Product Designer til at forme fremtidens lytteoplevelse.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:3,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:68}];function Dy(o){return o.trim().slice(0,1).toUpperCase()||"A"}function Gh(o){return o.address.toLowerCase().includes("remote")?"Remote":typeof o.candidateDistance=="number"?`${Math.max(0,Math.round(o.candidateDistance))} km vaek`:o.address||"Lokation ikke angivet"}function My(o){return o.companyLogoImage||o.logoUrl||""}function Jh({item:o}){const[c,u]=T.useState(!1),r=My(o);return r.length>0&&!c?n.jsx("div",{className:"jobs-card-logo jobs-card-logo-image-wrap",children:n.jsx("img",{src:r,alt:o.companyName||"Virksomhed",className:"jobs-card-logo-image",onError:()=>u(!0)})}):n.jsx("div",{className:"jobs-card-logo",children:Dy(o.companyName)})}function Ey(o){return o.workTypePartTime?"deltid":"fast"}function Cy({onLogout:o,onNavigate:c,onOpenJobDetail:u,onToggleTheme:r,theme:h}){const v=T.useMemo(()=>new Ns,[]),[z,q]=T.useState({name:"Lasse"}),[L,b]=T.useState(""),[B,D]=T.useState("sidebar"),[R,K]=T.useState("fast"),[le,Z]=T.useState(15),[fe,te]=T.useState(24),[se,Y]=T.useState(["Frontend-udvikler","UX/UI Designer"]),[P,ie]=T.useState(""),[G,E]=T.useState([]),[ae,he]=T.useState(!0),[pe,H]=T.useState(6),Q=T.useCallback(async()=>{try{const m=await v.getTabItems("jobs");E(m),H(6)}catch{E([]),H(6)}},[v]);T.useEffect(()=>{let m=!0;async function N(){try{const U=await v.getSavedFilter();if(!m)return;K(Ey(U)),Z(U.workDistance??15),te(U.partTimeHours??24),b(U.distanceCenterName??"")}catch{}if(await Q(),m){const U=await v.getCandidateProfile();m&&q(U),he(!1)}}return N(),()=>{m=!1}},[Q,v]);async function ue(){const m={escoIds:[],workTypePermanent:R==="fast",workTypePartTime:R==="deltid",workDistance:le,partTimeHours:R==="deltid"?fe:null,distanceCenterName:L,latitude:null,longitude:null};he(!0);try{const N=await v.applyFiltersAndGetJobs(m,{searchText:L,desiredTitles:se});E(N),H(6)}catch{E([]),H(6)}he(!1)}const ee=G.length>0?G:zy,W=ee.slice(0,Math.min(pe,ee.length)),_=pem==="sidebar"?"top":"sidebar")}function x(m){Y(N=>N.filter(U=>U!==m))}function $(m){const N=m.trim();N&&(Y(U=>U.includes(N)?U:[...U,N]),ie(""))}function de(){H(m=>Math.min(m+6,ee.length))}return n.jsxs("section",{className:`dash-root ${h==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"jobs",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar",children:[n.jsx(Jt,{name:z.name,imageUrl:z.imageUrl,onLogout:o,theme:h,onToggleTheme:r,actions:n.jsxs("button",{type:"button",className:"jobs-layout-toggle",onClick:V,children:[B==="sidebar"?n.jsx(sm,{size:16,strokeWidth:1.8}):n.jsx(im,{size:16,strokeWidth:1.8}),n.jsx("span",{children:B==="sidebar"?"Top-layout":"Side-layout"})]})}),n.jsxs("div",{className:"jobs-page-head",children:[n.jsx("h1",{children:"Find dit naeste job"}),n.jsx("p",{children:"Sog og filtrer for at finde det perfekte match til din profil."})]}),B==="sidebar"?n.jsxs("div",{className:"jobs-grid",children:[n.jsxs("aside",{className:"jobs-filter dash-card",children:[n.jsxs("h2",{children:[n.jsx(ar,{size:18,strokeWidth:1.8})," Filtre"]}),n.jsxs("div",{className:"jobs-filter-block",children:[n.jsx("label",{children:"Sog jobtitel eller virksomhed"}),n.jsxs("div",{className:"jobs-search-wrap",children:[n.jsx(rr,{size:16,strokeWidth:1.8}),n.jsx("input",{type:"text",placeholder:"F.eks. Frontend Udvikler...",value:L,onChange:m=>b(m.target.value)})]})]}),n.jsxs("div",{className:"jobs-filter-block",children:[n.jsx("label",{children:"Onskede jobtitler"}),n.jsxs("div",{className:"jobs-title-picker",children:[n.jsxs("div",{className:"jobs-title-input-wrap",children:[se.map(m=>n.jsxs("span",{className:"jobs-title-chip",children:[m,n.jsx("button",{type:"button",onClick:()=>x(m),"aria-label":`Fjern ${m}`,children:n.jsx(or,{size:12,strokeWidth:2})})]},m)),n.jsx("input",{type:"text",value:P,onChange:m=>ie(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),$(P))},placeholder:"Sog og tilfoj flere jobtitler..."})]}),n.jsxs("div",{className:"jobs-title-suggestions",children:[n.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("Frontend-udvikler"),children:[n.jsx("span",{children:"Frontend-udvikler"}),n.jsx(Ke,{size:16,strokeWidth:1.8})]}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Backend-udvikler"),children:n.jsx("span",{children:"Backend-udvikler"})}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Full Stack-udvikler"),children:n.jsx("span",{children:"Full Stack-udvikler"})}),n.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("UX/UI Designer"),children:[n.jsx("span",{children:"UX/UI Designer"}),n.jsx(Ke,{size:16,strokeWidth:1.8})]}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Product Manager"),children:n.jsx("span",{children:"Product Manager"})})]})]})]}),n.jsx("div",{className:"jobs-separator"}),n.jsxs("div",{className:"jobs-filter-block",children:[n.jsx("label",{children:"Ansaettelsestype"}),n.jsxs("div",{className:"jobs-radio-grid",children:[n.jsx("button",{type:"button",className:R==="fast"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>K("fast"),children:"Fast (Fuldtid)"}),n.jsx("button",{type:"button",className:R==="deltid"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>K("deltid"),children:"Deltid"})]})]}),n.jsxs("div",{className:"jobs-filter-block jobs-range-block",children:[n.jsxs("div",{className:"jobs-range-head",children:[n.jsx("label",{children:"Maks. afstand"}),n.jsxs("span",{children:[le," km"]})]}),n.jsx("input",{type:"range",min:0,max:50,value:le,onChange:m=>Z(Number(m.target.value))}),n.jsxs("div",{className:"jobs-range-labels",children:[n.jsx("span",{children:"0 km"}),n.jsx("span",{children:"50+ km"})]})]}),n.jsx("div",{className:"jobs-separator"}),n.jsxs("div",{className:"jobs-filter-block",children:[n.jsx("label",{children:"Timer (ved deltid)"}),n.jsx("p",{children:"Vaelg onsket timeantal pr. uge"}),n.jsx("div",{className:"jobs-hours-grid",children:Yh.map(m=>n.jsx("button",{type:"button",className:fe===m?"jobs-hour-btn active":"jobs-hour-btn",onClick:()=>te(m),children:m},m))})]}),n.jsx("button",{type:"button",className:"jobs-apply-btn",onClick:()=>{ue()},children:"Opdater resultater"})]}),n.jsxs("section",{className:"jobs-content",children:[n.jsxs("div",{className:"jobs-content-head",children:[n.jsx("h2",{children:"Seneste jobs"}),n.jsxs("span",{children:["Viser ",G.length>0?G.length:142," resultater"]})]}),ae?n.jsx("p",{className:"dash-loading",children:"Indlaeser jobs..."}):null,n.jsx("div",{className:"jobs-cards",children:W.map(m=>n.jsxs("article",{className:"jobs-card",role:"button",tabIndex:0,onClick:()=>u(m.id,m.fromJobnet,"jobs"),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),u(m.id,m.fromJobnet,"jobs"))},children:[n.jsx("div",{className:"jobs-card-top",children:n.jsx(Jh,{item:m})}),n.jsxs("div",{className:"jobs-card-title",children:[n.jsx("h3",{children:m.title||"Stilling"}),n.jsx("p",{children:m.companyName||"Virksomhed"})]}),n.jsx("p",{className:"jobs-card-description",children:m.descriptionIntro||"Beskrivelse er ikke tilgaengelig endnu."}),n.jsxs("div",{className:"jobs-card-bottom",children:[n.jsxs("div",{className:"jobs-card-distance",children:[m.address.toLowerCase().includes("remote")?n.jsx(cr,{size:15,strokeWidth:1.8}):n.jsx(ur,{size:15,strokeWidth:1.8}),n.jsx("span",{children:Gh(m)})]}),n.jsx("button",{type:"button",className:"jobs-card-arrow","aria-label":"Se job",onClick:N=>{N.stopPropagation(),u(m.id,m.fromJobnet,"jobs")},children:n.jsx(Ua,{size:16,strokeWidth:1.8})})]})]},m.id))}),n.jsx("div",{className:"jobs-load-more-wrap",children:n.jsx("button",{type:"button",className:"jobs-load-more",onClick:de,disabled:!_,children:_?"Indlaes flere jobs":"Alle jobs er vist"})})]})]}):n.jsxs("section",{className:"jobs-top-layout",children:[n.jsxs("div",{className:"jobs-top-filters dash-card",children:[n.jsxs("div",{className:"jobs-top-filter-title",children:[n.jsx(ar,{size:18,strokeWidth:1.8}),n.jsx("h2",{children:"Filtre"})]}),n.jsxs("div",{className:"jobs-top-controls",children:[n.jsxs("div",{className:"jobs-filter-block no-margin",children:[n.jsx("label",{children:"Sog noegleord eller virksomhed"}),n.jsxs("div",{className:"jobs-search-wrap",children:[n.jsx(rr,{size:16,strokeWidth:1.8}),n.jsx("input",{type:"text",placeholder:"F.eks. Lunar, React...",value:L,onChange:m=>b(m.target.value)})]})]}),n.jsxs("div",{className:"jobs-filter-block no-margin",children:[n.jsx("label",{children:"Ansaettelsestype"}),n.jsxs("div",{className:"jobs-radio-grid",children:[n.jsx("button",{type:"button",className:R==="fast"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>K("fast"),children:"Fast"}),n.jsx("button",{type:"button",className:R==="deltid"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>K("deltid"),children:"Deltid"})]})]}),n.jsxs("div",{className:"jobs-filter-block no-margin jobs-top-range",children:[n.jsxs("div",{className:"jobs-range-head",children:[n.jsx("label",{children:"Maks. afstand"}),n.jsxs("span",{children:[le," km"]})]}),n.jsx("input",{type:"range",min:0,max:50,value:le,onChange:m=>Z(Number(m.target.value))})]}),n.jsx("button",{type:"button",className:"jobs-apply-btn jobs-top-apply",onClick:()=>{ue()},children:"Opdater resultater"})]}),n.jsxs("div",{className:"jobs-filter-block no-margin",children:[n.jsx("label",{children:"Onskede jobtitler"}),n.jsxs("div",{className:"jobs-title-picker",children:[n.jsxs("div",{className:"jobs-title-input-wrap",children:[se.map(m=>n.jsxs("span",{className:"jobs-title-chip",children:[m,n.jsx("button",{type:"button",onClick:()=>x(m),"aria-label":`Fjern ${m}`,children:n.jsx(or,{size:12,strokeWidth:2})})]},m)),n.jsx("input",{type:"text",value:P,onChange:m=>ie(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),$(P))},placeholder:"Sog og tilfoj flere jobtitler..."})]}),n.jsxs("div",{className:"jobs-title-suggestions",children:[n.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("Frontend-udvikler"),children:[n.jsx("span",{children:"Frontend-udvikler"}),n.jsx(Ke,{size:16,strokeWidth:1.8})]}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Backend-udvikler"),children:n.jsx("span",{children:"Backend-udvikler"})}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Full Stack-udvikler"),children:n.jsx("span",{children:"Full Stack-udvikler"})}),n.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("UX/UI Designer"),children:[n.jsx("span",{children:"UX/UI Designer"}),n.jsx(Ke,{size:16,strokeWidth:1.8})]}),n.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Product Manager"),children:n.jsx("span",{children:"Product Manager"})})]})]})]}),n.jsx("div",{className:"jobs-separator top-margin"}),n.jsxs("div",{className:"jobs-hours-row",children:[n.jsxs("div",{children:[n.jsx("label",{children:"Timer (ved deltid)"}),n.jsx("p",{children:"Vaelg onsket timeantal pr. uge"})]}),n.jsx("div",{className:"jobs-hours-grid",children:Yh.map(m=>n.jsx("button",{type:"button",className:fe===m?"jobs-hour-btn active":"jobs-hour-btn",onClick:()=>te(m),children:m},m))})]})]}),n.jsxs("section",{className:"jobs-content",children:[n.jsxs("div",{className:"jobs-content-head",children:[n.jsx("h2",{children:"Seneste jobs"}),n.jsxs("span",{children:["Viser ",G.length>0?G.length:142," resultater"]})]}),ae?n.jsx("p",{className:"dash-loading",children:"Indlaeser jobs..."}):null,n.jsx("div",{className:"jobs-cards jobs-cards-top",children:W.map(m=>n.jsxs("article",{className:"jobs-card",role:"button",tabIndex:0,onClick:()=>u(m.id,m.fromJobnet,"jobs"),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),u(m.id,m.fromJobnet,"jobs"))},children:[n.jsx("div",{className:"jobs-card-top",children:n.jsx(Jh,{item:m})}),n.jsxs("div",{className:"jobs-card-title",children:[n.jsx("h3",{children:m.title||"Stilling"}),n.jsx("p",{children:m.companyName||"Virksomhed"})]}),n.jsx("p",{className:"jobs-card-description",children:m.descriptionIntro||"Beskrivelse er ikke tilgaengelig endnu."}),n.jsxs("div",{className:"jobs-card-bottom",children:[n.jsxs("div",{className:"jobs-card-distance",children:[m.address.toLowerCase().includes("remote")?n.jsx(cr,{size:15,strokeWidth:1.8}):n.jsx(ur,{size:15,strokeWidth:1.8}),n.jsx("span",{children:Gh(m)})]}),n.jsx("button",{type:"button",className:"jobs-card-arrow","aria-label":"Se job",onClick:N=>{N.stopPropagation(),u(m.id,m.fromJobnet,"jobs")},children:n.jsx(Ua,{size:16,strokeWidth:1.8})})]})]},m.id))}),n.jsx("div",{className:"jobs-load-more-wrap",children:n.jsx("button",{type:"button",className:"jobs-load-more",onClick:de,disabled:!_,children:_?"Indlaes flere jobs":"Alle jobs er vist"})})]})]})]})]})}function bs(o){if(!o)return 0;const u=(o instanceof Date?o:new Date(o)).getTime();return Number.isNaN(u)?0:u}function gm(o){if(!o)return"--:--";const c=o instanceof Date?o:new Date(o);return Number.isNaN(c.getTime())?"--:--":new Intl.DateTimeFormat("da-DK",{hour:"2-digit",minute:"2-digit"}).format(c)}function wy(o){if(!o)return"";const c=o instanceof Date?o:new Date(o);if(Number.isNaN(c.getTime()))return"";const u=new Date,r=1440*60*1e3,h=Math.floor((new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime()-new Date(c.getFullYear(),c.getMonth(),c.getDate()).getTime())/r);return h===0?gm(c):h===1?"I går":new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short"}).format(c)}function Uy(o){const c=new Date,u=new Date(o.getFullYear(),o.getMonth(),o.getDate()),r=new Date(c.getFullYear(),c.getMonth(),c.getDate()),h=Math.floor((r.getTime()-u.getTime())/(1440*60*1e3));return h===0?"I dag":h===1?"I går":new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short"}).format(o)}function Yn(o){return!o.fromCandidate&&!o.seen}function Qh(o){return o.allMessages.filter(Yn).length}function qn(o){return o.companyLogoUrl||o.companyLogo||""}function Oy(o){return{...o,allMessages:[...o.allMessages??[]].sort((c,u)=>bs(c.timeSent)-bs(u.timeSent))}}function Xh(){const o=new Date,c=new Date(o.getTime()-600*1e3),u=new Date(o.getTime()-7200*1e3),r=(z,q,L,b,B)=>({threadId:z,text:q,fromCandidate:L,timeSent:b,seen:B}),h=[r("thread-techcorp","Hej Lasse! Mange tak for din ansøgning.",!1,u),r("thread-techcorp","Mange tak, det lyder rigtig spændende.",!0,new Date(u.getTime()+1200*1e3),new Date(u.getTime()+1800*1e3)),r("thread-techcorp","Vi vil gerne invitere dig til samtale.",!1,c)],v=[r("thread-lunar","Mange tak for din opdaterede portefølje.",!1,new Date(o.getTime()-1560*60*1e3),new Date(o.getTime()-1500*60*1e3))];return[{id:"thread-techcorp",companyLogo:"",companyLogoUrl:"https://i.pravatar.cc/150?img=33",companyName:"TechCorp A/S",candidateFirstName:"Lasse",candidateLastName:"Hansen",candidateImage:"https://i.pravatar.cc/150?img=11",allMessages:h,latestMessage:h[h.length-1],title:"Frontend Udvikler",messagesLoaded:!0,jobPostingId:"job-1",jobPosting:void 0,isFromSupport:!1},{id:"thread-lunar",companyLogo:"",companyLogoUrl:"https://i.pravatar.cc/150?img=12",companyName:"Lunar Bank",candidateFirstName:"Lasse",candidateLastName:"Hansen",candidateImage:"https://i.pravatar.cc/150?img=11",allMessages:v,latestMessage:v[v.length-1],title:"Senior UX Designer",messagesLoaded:!0,jobPostingId:"job-2",jobPosting:void 0,isFromSupport:!1}]}function Ly({onLogout:o,onNavigate:c,onToggleTheme:u,theme:r}){const h=T.useMemo(()=>new vm,[]),[v,z]=T.useState("Lasse"),[q,L]=T.useState(void 0),[b,B]=T.useState([]),[D,R]=T.useState(!0),[K,le]=T.useState(""),[Z,fe]=T.useState("all"),[te,se]=T.useState(""),[Y,P]=T.useState("");T.useEffect(()=>{let H=!0;async function Q(){R(!0);try{const ue=await h.getCandidateProfile();H&&(z(ue.name),L(ue.imageUrl));const ee=await h.getThreads();if(!H)return;const W=(ee.length>0?ee:Xh()).map(Oy);B(W),se(W[0]?.id||"")}catch{if(!H)return;const ue=Xh();B(ue),se(ue[0]?.id||"")}finally{H&&R(!1)}}return Q(),()=>{H=!1}},[h]);const ie=T.useMemo(()=>{const H=K.trim().toLowerCase();return b.filter(Q=>Z==="unread"&&Qh(Q)===0||Z==="companies"&&Q.isFromSupport?!1:H?Q.companyName.toLowerCase().includes(H)||(Q.latestMessage?.text||"").toLowerCase().includes(H):!0)},[Z,K,b]),G=T.useMemo(()=>b.find(H=>H.id===te)||ie[0],[te,ie,b]),E=T.useMemo(()=>[...G?.allMessages||[]].sort((H,Q)=>bs(H.timeSent)-bs(Q.timeSent)),[G]);async function ae(H){se(H.id);const Q=[...H.allMessages].reverse().find(ue=>Yn(ue));Q?.id&&(h.markThreadReadByMessageId(Q.id),B(ue=>ue.map(ee=>ee.id!==H.id?ee:{...ee,allMessages:ee.allMessages.map(W=>Yn(W)?{...W,seen:new Date}:W)})))}async function he(){const H=b.flatMap(Q=>Q.allMessages).filter(Q=>Yn(Q)&&!!Q.id);await Promise.all(H.map(Q=>h.markThreadReadByMessageId(Q.id))),B(Q=>Q.map(ue=>({...ue,allMessages:ue.allMessages.map(ee=>Yn(ee)?{...ee,seen:new Date}:ee)})))}async function pe(){const H=Y.trim();if(!G||!H)return;const Q={threadId:G.id,text:H,fromCandidate:!0,timeSent:new Date};P(""),B(ue=>ue.map(ee=>{if(ee.id!==G.id)return ee;const W=[...ee.allMessages,Q];return{...ee,allMessages:W,latestMessage:Q}}));try{const ue=await h.sendMessage(G.id,H);B(ee=>ee.map(W=>{if(W.id!==G.id)return W;const V=[...W.allMessages.filter(x=>x!==Q),ue];return{...W,allMessages:V,latestMessage:ue}}))}catch{}}return n.jsxs("section",{className:`dash-root ${r==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"messages",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar msg-main",children:[n.jsx(Jt,{name:v,imageUrl:q,onLogout:o,theme:r,onToggleTheme:u}),n.jsxs("div",{className:"msg-head",children:[n.jsxs("div",{children:[n.jsx("h1",{children:"Beskeder"}),n.jsx("p",{children:"Kommuniker med virksomheder og hold styr på dine ansøgninger."})]}),n.jsxs("button",{type:"button",className:"msg-mark-btn",onClick:()=>{he()},children:[n.jsx(zg,{size:16,strokeWidth:1.8})," Marker alle som læst"]})]}),n.jsxs("div",{className:"msg-layout",children:[n.jsxs("section",{className:"msg-threads",children:[n.jsxs("div",{className:"msg-threads-head",children:[n.jsxs("div",{className:"msg-search-wrap",children:[n.jsx(rr,{size:16,strokeWidth:1.8}),n.jsx("input",{value:K,onChange:H=>le(H.target.value),type:"text",placeholder:"Søg i beskeder..."})]}),n.jsxs("div",{className:"msg-filter-row",children:[n.jsx("button",{type:"button",className:Z==="all"?"active":"",onClick:()=>fe("all"),children:"Alle"}),n.jsx("button",{type:"button",className:Z==="unread"?"active":"",onClick:()=>fe("unread"),children:"Ulæste"}),n.jsx("button",{type:"button",className:Z==="companies"?"active":"",onClick:()=>fe("companies"),children:"Virksomheder"})]})]}),n.jsxs("div",{className:"msg-thread-list custom-scrollbar",children:[D?n.jsx("p",{className:"dash-loading",children:"Indlaeser beskeder..."}):null,!D&&ie.length===0?n.jsx("p",{className:"dash-loading",children:"Ingen tråde fundet."}):null,ie.map(H=>{const Q=Qh(H),ue=G?.id===H.id,ee=qn(H);return n.jsxs("button",{type:"button",className:ue?"msg-thread-item active":"msg-thread-item",onClick:()=>{ae(H)},children:[n.jsxs("div",{className:"msg-thread-avatar-wrap",children:[ee?n.jsx("img",{src:ee,alt:H.companyName,className:"msg-thread-avatar"}):n.jsx("div",{className:"msg-thread-avatar-fallback",children:H.companyName.slice(0,1).toUpperCase()}),n.jsx("span",{className:"msg-thread-online"})]}),n.jsxs("div",{className:"msg-thread-content",children:[n.jsxs("div",{className:"msg-thread-row",children:[n.jsx("h3",{children:H.companyName}),n.jsx("span",{children:wy(H.latestMessage?.timeSent)})]}),n.jsx("p",{className:Q>0?"unread":"",children:H.latestMessage?.text||"Ingen beskeder endnu"}),n.jsx("small",{children:H.title||"Stilling"})]}),Q>0?n.jsx("div",{className:"msg-thread-unread",children:Q}):null]},H.id)})]})]}),n.jsxs("section",{className:"msg-chat",children:[n.jsx("div",{className:"msg-chat-head",children:G?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"msg-chat-company",children:[qn(G)?n.jsx("img",{src:qn(G),alt:G.companyName,className:"msg-chat-avatar"}):n.jsx("div",{className:"msg-chat-avatar-fallback",children:G.companyName.slice(0,1).toUpperCase()}),n.jsxs("div",{children:[n.jsx("h2",{children:G.companyName}),n.jsx("p",{children:G.title||"Rekruttering"})]})]}),n.jsxs("div",{className:"msg-chat-actions",children:[n.jsx("button",{type:"button","aria-label":"Ring",children:n.jsx(Rp,{size:16,strokeWidth:1.8})}),n.jsx("button",{type:"button","aria-label":"Info",children:n.jsx(cp,{size:16,strokeWidth:1.8})})]})]}):n.jsx("h2",{children:"Vælg en samtale"})}),n.jsx("div",{className:"msg-chat-body custom-scrollbar",children:E.map((H,Q)=>{const ue=H.timeSent instanceof Date?H.timeSent:new Date(H.timeSent),ee=Q>0?E[Q-1]:void 0,W=ee?.timeSent instanceof Date?ee.timeSent:ee?.timeSent?new Date(ee.timeSent):void 0,_=!W||ue.toDateString()!==W.toDateString();return n.jsxs("div",{children:[_?n.jsx("div",{className:"msg-day-sep",children:Uy(ue)}):null,n.jsxs("div",{className:H.fromCandidate?"msg-bubble-row mine":"msg-bubble-row",children:[H.fromCandidate?null:qn(G)?n.jsx("img",{src:qn(G),alt:G.companyName,className:"msg-mini-avatar"}):n.jsx("div",{className:"msg-mini-avatar msg-mini-avatar-fallback",children:G.companyName.slice(0,1).toUpperCase()}),n.jsxs("div",{className:"msg-bubble-wrap",children:[n.jsx("span",{className:"msg-time",children:gm(H.timeSent)}),n.jsx("div",{className:H.fromCandidate?"msg-bubble mine":"msg-bubble",children:H.text})]})]})]},`${H.threadId}-${Q}`)})}),n.jsx("div",{className:"msg-input-area",children:n.jsxs("div",{className:"msg-input-wrap",children:[n.jsx("button",{type:"button","aria-label":"Vedhæft",children:n.jsx(wp,{size:18,strokeWidth:1.8})}),n.jsx("textarea",{rows:1,value:Y,onChange:H=>P(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),pe())},placeholder:"Skriv din besked her..."}),n.jsx("button",{type:"button","aria-label":"Emoji",children:n.jsx(s0,{size:18,strokeWidth:1.8})}),n.jsxs("button",{type:"button",className:"msg-send-btn",onClick:()=>{pe()},children:["Send ",n.jsx(t0,{size:15,strokeWidth:1.8})]})]})})]})]})]})]})}function pm(o){return typeof o=="object"&&o!==null?o:null}function ht(o){return typeof o=="string"?o:""}function er(o){return typeof o=="number"?o:null}function tr(o){if(typeof o=="boolean")return o;if(typeof o=="string"){const c=o.toLowerCase();if(c==="completed"||c==="done"||c==="true")return!0;if(c==="incomplete"||c==="pending"||c==="false")return!1}return null}function Ry(o){if(!o)return"";const c=new Date(o);return Number.isNaN(c.getTime())?"":new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short",year:"numeric"}).format(c)}function Hy(o,c){const u=pm(o);if(!u)return null;const r=ht(u.id)||ht(u.interview_id)||`interview-${c}`,h=ht(u.job_name)||ht(u.job_title)||ht(u.title)||"Interview",v=ht(u.company_name)||ht(u.companyName)||"Ukendt virksomhed",z=ht(u.interview_date)||ht(u.created_at)||ht(u.updated_at)||ht(u.date),q=tr(u.is_completed)??tr(u.completed)??tr(u.status)??!0,L=er(u.duration_minutes)??er(u.duration)??er(u.length_minutes),b=ht(u.personality_name)||ht(u.simulation_personality_name)||ht(u.personality)||"Professionel";return{id:r,title:h,companyName:v,dateLabel:Ry(z),completed:q,durationMinutes:L,personality:b}}class Vy{constructor(c=new Ns,u=new vr){this.jobsViewModel=c,this.simulationService=u}async getCandidateProfile(){return this.jobsViewModel.getCandidateProfile()}async getJobs(){try{return await this.jobsViewModel.getTabItems("jobs")}catch{return[]}}async getPersonalities(){try{const c=await this.simulationService.listSimulationPersonalities();return Array.isArray(c)?c:[]}catch{return[]}}async getInterviews(c=12){try{const u=await this.simulationService.listInterviews(c,0),r=pm(u);return(Array.isArray(r?.interviews)?r.interviews:Array.isArray(u)?u:[]).map((v,z)=>Hy(v,z)).filter(v=>!!v)}catch{return[]}}}const qy=[{id:"sim-1",title:"Senior Frontend-udvikler",companyName:"Lunar",completed:!0,durationMinutes:15,personality:"Professionel",dateLabel:"12. okt 2023"},{id:"sim-2",title:"Fullstack Developer",companyName:"Pleo",completed:!1,durationMinutes:20,personality:"Afslappet",dateLabel:"10. okt 2023"},{id:"sim-3",title:"UX Designer",companyName:"Trustpilot",completed:!0,durationMinutes:10,personality:"Sarkastisk",dateLabel:"05. okt 2023"},{id:"sim-4",title:"Product Manager",companyName:"Danske Bank",completed:!0,durationMinutes:5,personality:"Stress-test",dateLabel:"01. okt 2023"}];function By(o){return{id:o.id,title:o.title,companyName:o.companyName,completed:o.completed,durationMinutes:o.durationMinutes??15,personality:o.personality||"Professionel",dateLabel:o.dateLabel||"Nyligt"}}function Yy(o){return`${o.title||"Stilling"}${o.companyName?` · ${o.companyName}`:""}`}function Gy({onLogout:o,onNavigate:c,onOpenEvaluation:u,onToggleTheme:r,theme:h}){const v=T.useMemo(()=>new Vy,[]),[z,q]=T.useState("Lasse"),[L,b]=T.useState(void 0),[B,D]=T.useState([]),[R,K]=T.useState([]),[le,Z]=T.useState([]),[fe,te]=T.useState(!0),[se,Y]=T.useState(""),[P,ie]=T.useState(""),[G,E]=T.useState("Dansk"),[ae,he]=T.useState("15"),[pe,H]=T.useState(!1);T.useEffect(()=>{let x=!0;async function $(){te(!0);const[de,m,N,U]=await Promise.all([v.getCandidateProfile(),v.getJobs(),v.getInterviews(),v.getPersonalities()]);x&&(q(de.name),b(de.imageUrl),D(m),K(N.map(By)),Z(U.map(J=>({id:J.id,name:J.name}))),m.length>0&&Y(J=>J||m[0].id),U.length>0&&ie(J=>J||String(U[0].id)),te(!1))}return $(),()=>{x=!1}},[v]);const Q=R.length>0?R:qy,ue={id:"fallback-job",title:"Senior Frontend-udvikler",companyName:"Lunar"},ee=B.length>0?B:[ue],W=ee.find(x=>x.id===se)||ee[0],_=le.find(x=>String(x.id)===P)?.name||"Professionel & Grundig",V=[{id:"ai-1",sender:"ai",text:`Hej Lasse, og velkommen til! Vi er rigtig glade for at have dig til samtalen omkring rollen som ${W.title||"Senior Frontend-udvikler"}. Kan du fortælle om et nyligt projekt, hvor din erfaring med React gjorde en stor forskel for slutresultatet?`},{id:"me-1",sender:"me",text:"I mit seneste projekt migrerede vi en stor dashboard-løsning til Next.js. Jeg implementerede virtualisering og strammere state management med Zustand, hvilket reducerede load-tid med over 60%."},{id:"ai-2",sender:"ai",text:"Det lyder som en rigtig solid forbedring. Når du nævner Zustand frem for Redux, hvad var overvejelserne bag det valg i jeres use-case?"}];return n.jsxs("section",{className:`dash-root ${h==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"simulator",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar sim-main",children:[n.jsx(Jt,{name:z,imageUrl:L,onLogout:o,theme:h,onToggleTheme:r,actions:pe?n.jsxs("button",{type:"button",className:"sim-leave-btn",onClick:()=>H(!1),children:[n.jsx(Ih,{size:15,strokeWidth:1.8}),n.jsx("span",{children:"Forlad simulering"})]}):void 0}),pe?n.jsxs("div",{className:"sim-live-wrap",children:[n.jsxs("div",{className:"sim-live-head",children:[n.jsx("h1",{children:"Live Jobsamtale"}),n.jsx("p",{children:"Du er i øjeblikket i en simuleret teknisk samtale. Brug mikrofonen til at svare."})]}),n.jsxs("div",{className:"sim-live-grid",children:[n.jsxs("section",{className:"sim-live-chat-card",children:[n.jsxs("div",{className:"sim-live-chat-head",children:[n.jsxs("div",{className:"sim-live-ai-row",children:[n.jsx("div",{className:"sim-live-ai-avatar",children:n.jsx(ql,{size:18,strokeWidth:1.8})}),n.jsxs("div",{children:[n.jsx("h3",{children:"Sarah (AI Interviewer)"}),n.jsxs("p",{children:[n.jsx(Zp,{size:12,strokeWidth:1.8})," Venter på dit svar..."]})]})]}),n.jsx("button",{type:"button",className:"sim-live-more-btn",children:n.jsx(Wg,{size:16,strokeWidth:1.8})})]}),n.jsx("div",{className:"sim-live-chat-scroll custom-scrollbar",children:V.map(x=>n.jsxs("div",{className:x.sender==="ai"?"sim-live-msg-row ai":"sim-live-msg-row me",children:[n.jsx("div",{className:x.sender==="ai"?"sim-live-msg-avatar ai":"sim-live-msg-avatar me",children:x.sender==="ai"?n.jsx(ql,{size:13,strokeWidth:1.8}):L?n.jsx("img",{src:L,alt:z}):n.jsx("span",{children:z.slice(0,1).toUpperCase()})}),n.jsx("div",{className:x.sender==="ai"?"sim-live-msg-bubble ai":"sim-live-msg-bubble me",children:n.jsx("p",{children:x.text})})]},x.id))}),n.jsxs("div",{className:"sim-live-voice",children:[n.jsxs("div",{className:"sim-live-time-row",children:[n.jsxs("div",{className:"sim-live-time",children:[n.jsx("small",{children:"Tid gået"}),n.jsx("strong",{children:"04:23"})]}),n.jsx("div",{className:"sim-live-wave",children:Array.from({length:7}).map((x,$)=>n.jsx("span",{style:{animationDelay:`${$*.14}s`}},`wave-${$}`))}),n.jsxs("div",{className:"sim-live-time",children:[n.jsx("small",{children:"Tilbage"}),n.jsx("strong",{children:"10:37"})]})]}),n.jsx("button",{type:"button",className:"sim-live-mic-btn",children:n.jsx(_p,{size:22,strokeWidth:1.8})}),n.jsx("p",{children:"Optager dit svar..."})]})]}),n.jsxs("aside",{className:"sim-live-side custom-scrollbar",children:[n.jsxs("article",{className:"sim-live-side-card",children:[n.jsx("h2",{children:"Session Status"}),n.jsxs("div",{className:"sim-live-side-list",children:[n.jsxs("div",{children:[n.jsx("small",{children:"Stilling"}),n.jsxs("p",{children:[W.title||"Senior Frontend-udvikler"," @ ",W.companyName||"Lunar"]})]}),n.jsxs("div",{children:[n.jsx("small",{children:"Samtaletype"}),n.jsxs("p",{children:[n.jsx(nr,{size:14,strokeWidth:1.8})," Teknisk Dybde"]})]}),n.jsxs("div",{children:[n.jsx("small",{children:"Interviewer stil"}),n.jsxs("p",{children:[n.jsx(ql,{size:14,strokeWidth:1.8})," ",_]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"sim-live-progress-head",children:[n.jsx("small",{children:"Fremgang"}),n.jsx("strong",{children:"Spørgsmål 2 af 5"})]}),n.jsx("div",{className:"sim-live-progress-track",children:n.jsx("span",{})})]})]})]}),n.jsxs("article",{className:"sim-live-coach-card",children:[n.jsxs("h2",{children:[n.jsx(hp,{size:15,strokeWidth:1.8})," Live Coach"]}),n.jsxs("div",{className:"sim-live-coach-list",children:[n.jsxs("div",{children:[n.jsx(Ke,{size:14,strokeWidth:1.8}),n.jsxs("div",{children:[n.jsx("strong",{children:"Godt brug af STAR-metoden"}),n.jsx("p",{children:"Dit forrige svar beskrev situationen og resultatet meget tydeligt."})]})]}),n.jsxs("div",{children:[n.jsx(Kn,{size:14,strokeWidth:1.8}),n.jsxs("div",{children:[n.jsx("strong",{children:"Næste skridt"}),n.jsx("p",{children:"Uddyb hvorfor Zustand var bedre end Redux i jeres specifikke use-case."})]})]})]})]}),n.jsx("article",{className:"sim-live-side-card",children:n.jsxs("div",{className:"sim-live-actions",children:[n.jsxs("button",{type:"button",children:[n.jsx(Ug,{size:16,strokeWidth:1.8})," Sæt på pause"]}),n.jsxs("button",{type:"button",className:"stop",children:[n.jsx(qg,{size:16,strokeWidth:1.8})," Afslut & Få Feedback"]})]})})]})]})]}):n.jsxs("div",{className:"sim-wrap",children:[n.jsxs("section",{className:"sim-hero-card",children:[n.jsx("div",{className:"sim-hero-glow"}),n.jsxs("div",{className:"sim-hero-left",children:[n.jsx("h1",{children:"Job Interview Simulator"}),n.jsx("p",{children:"Ov dig pa jobsamtaler med vores AI-drevne simulator. Du far skraeddersyede sporgsmal baseret pa den jobtype, du soger, og modtager detaljeret feedback pa dine svar."}),n.jsxs("ul",{className:"sim-benefits",children:[n.jsxs("li",{children:[n.jsx(Ke,{size:16,strokeWidth:1.8})," Personaliserede interviewsporgsmal"]}),n.jsxs("li",{children:[n.jsx(Ke,{size:16,strokeWidth:1.8})," Ojeblikkelig AI-feedback pa dine svar"]}),n.jsxs("li",{children:[n.jsx(Ke,{size:16,strokeWidth:1.8})," Detaljeret evaluering efter interviewet"]}),n.jsxs("li",{children:[n.jsx(Ke,{size:16,strokeWidth:1.8})," Gem og gennemga tidligere interviews"]})]}),n.jsxs("button",{type:"button",className:"sim-start-btn",onClick:()=>H(!0),children:[n.jsx(Lg,{size:18,strokeWidth:1.8}),"Start ny simulering"]})]}),n.jsxs("div",{className:"sim-config-card",children:[n.jsxs("div",{className:"sim-config-head",children:[n.jsx("h3",{children:"Simuleringsindstillinger"}),n.jsx("p",{children:"Vaelg dine praeferencer for start"})]}),n.jsxs("label",{children:["Gemt job",n.jsxs("div",{className:"sim-select-wrap",children:[n.jsx(fr,{size:16,strokeWidth:1.8}),n.jsx("select",{value:se,onChange:x=>Y(x.target.value),children:ee.map(x=>n.jsx("option",{value:x.id,children:Yy(x)},x.id))}),n.jsx(Bn,{size:15,strokeWidth:1.8,className:"sim-caret"})]})]}),n.jsxs("label",{children:["Personlighed (AI)",n.jsxs("div",{className:"sim-select-wrap",children:[n.jsx(ql,{size:16,strokeWidth:1.8}),n.jsx("select",{value:P,onChange:x=>ie(x.target.value),children:(le.length>0?le:[{id:1,name:"Professionel & Grundig"}]).map(x=>n.jsx("option",{value:String(x.id),children:x.name},x.id))}),n.jsx(Bn,{size:15,strokeWidth:1.8,className:"sim-caret"})]})]}),n.jsxs("div",{className:"sim-mini-grid",children:[n.jsxs("label",{children:["Sprog",n.jsxs("div",{className:"sim-select-wrap",children:[n.jsx(js,{size:16,strokeWidth:1.8}),n.jsxs("select",{value:G,onChange:x=>E(x.target.value),children:[n.jsx("option",{children:"Dansk"}),n.jsx("option",{children:"Engelsk"})]}),n.jsx(Bn,{size:15,strokeWidth:1.8,className:"sim-caret"})]})]}),n.jsxs("label",{children:["Varighed",n.jsxs("div",{className:"sim-select-wrap",children:[n.jsx(lr,{size:16,strokeWidth:1.8}),n.jsxs("select",{value:ae,onChange:x=>he(x.target.value),children:[n.jsx("option",{value:"5",children:"5 min"}),n.jsx("option",{value:"10",children:"10 min"}),n.jsx("option",{value:"15",children:"15 min"}),n.jsx("option",{value:"20",children:"20 min"})]}),n.jsx(Bn,{size:15,strokeWidth:1.8,className:"sim-caret"})]})]})]})]})]}),n.jsxs("div",{className:"sim-history-head",children:[n.jsx("h2",{children:"Tidligere simuleringer"}),n.jsxs("button",{type:"button",children:[n.jsx(am,{size:15,strokeWidth:1.8})," Filtrer"]})]}),fe?n.jsx("p",{className:"dash-loading",children:"Indlaeser simuleringer..."}):null,n.jsx("section",{className:"sim-history-grid",children:Q.map(x=>n.jsxs("article",{className:x.completed?"sim-card done":"sim-card draft",children:[n.jsxs("div",{className:"sim-card-head",children:[n.jsxs("div",{children:[n.jsx("h3",{children:x.title}),n.jsx("p",{children:x.companyName})]}),n.jsx("span",{className:x.completed?"sim-status done":"sim-status draft",children:x.completed?"Faerdig":"Ikke faerdig"})]}),n.jsxs("div",{className:"sim-tags",children:[n.jsxs("span",{children:[n.jsx(lr,{size:13,strokeWidth:1.8})," ",x.durationMinutes," min"]}),n.jsxs("span",{children:[n.jsx(ql,{size:13,strokeWidth:1.8})," ",x.personality]})]}),n.jsxs("div",{className:"sim-card-foot",children:[n.jsx("small",{children:x.dateLabel}),x.completed?n.jsxs("button",{type:"button",className:"sim-link-btn",onClick:()=>u({interviewId:x.id,title:x.title,companyName:x.companyName,dateLabel:x.dateLabel}),children:["Se evaluering ",n.jsx(Ua,{size:14,strokeWidth:1.8})]}):n.jsxs("button",{type:"button",className:"sim-link-btn",children:["Fortsæt ",n.jsx(Vp,{size:14,strokeWidth:1.8})]})]})]},x.id))})]})]})]})}function Yl(o){return typeof o=="object"&&o!==null?o:null}function gr(o){return typeof o=="string"?o:""}function Jy(o){if(typeof o=="number"&&Number.isFinite(o))return o;if(typeof o=="string"){const c=Number(o);return Number.isFinite(c)?c:null}return null}function Zh(o){return Array.isArray(o)?o.map(c=>gr(c).trim()).filter(Boolean):[]}function $e(o,c){if(!o)return"";for(const u of c){const r=gr(o[u]).trim();if(r)return r}return""}function ps(o,c){if(!o)return null;for(const u of c){const r=Jy(o[u]);if(r!==null)return r}return null}function Qy(o){if(!o)return"";const c=new Date(o);return Number.isNaN(c.getTime())?o:new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"long",year:"numeric"}).format(c)}function Kh(o,c){return o===null?c:Math.max(0,Math.min(10,Math.round(o)))}const ym=[{id:"1",title:"Mere struktur og korthed i dine svar",behavior:"Du gav nogle svar, der blev lange og gentagende i stedet for fokuserede pa kernen.",effect:"Det kan gore det svaerere for intervieweren hurtigt at vurdere din erfaring og beslutninger.",nextStep:"Svar i 3 trin: pointe, konkret eksempel, resultat. Sigt efter 30-60 sekunder pr. svar."},{id:"2",title:"Flere konkrete eksempler pa performance i service",behavior:"Du fortalte om ansvar, men gav fa konkrete scenarier med handling og resultat.",effect:"Uden konkrete cases bliver niveau og paalidelighed svaerere at validere.",nextStep:"Forbered 2-3 STAR-historier med tydelig situation, handling og maelbart resultat."},{id:"3",title:"Gor din motivation mere maelrettet virksomheden",behavior:"Motivationen var positiv, men ikke altid koblet direkte til virksomhedens drift og behov.",effect:"Du kan fremsta generelt motiveret i stedet for specifikt relevant for rollen.",nextStep:"Naevn 2-3 konkrete grunde til, at netop deres setup matcher din erfaring."},{id:"4",title:"Konkretiser kvalitet og sikkerhed i praksis",behavior:"Du naevnte standarder og certificeringer, men beskrev fa daglige rutiner.",effect:"Det reducerer tydeligheden omkring, hvordan du arbejder sikkert i travle perioder.",nextStep:"Beskriv faste rutiner for kontrol, logning og hurtig korrektion under pres."}],bm=["Du viser relevant erfaring for rollen og kommunikerer ro under pres.","Du arbejder struktureret med kvalitet og timing i service.","Du har en moden team-tilgang med fokus pa samarbejde.","Du kobler dine svar til konkrete arbejdsrutiner og drift.","Du fremstar stabil og ansvarlig i hektiske situationer."],jm=["Forbered 3 korte STAR-historier med maelbare resultater.","Lav en 60-sekunders pitch af din profil og vaerdiskabelse.","Research virksomheden i 10-15 minutter inden samtalen.","Forbered 4-5 konkrete spoergsmaal om rolle og forventninger.","Afslut svar med resultat, sa din effekt bliver tydelig."],kt={companyName:"Ukendt virksomhed",dateLabel:"Nyligt",evaluationLabel:"Interview Feedback",interviewerEvaluationTitle:"Interviewer evaluering",interviewerEvaluationLead:"Du er godt med. Din praestation viste styrker der matcher stillingen.",interviewerEvaluationBody:"Du viste relevante kompetencer og en stabil tilgang under pres. Du kan staerke dit indtryk yderligere ved at svare mere struktureret og bruge flere konkrete resultateksempler.",interviewTitle:"Stilling",interviewerScore:8,selfScore:5,strengths:bm,recommendations:jm,suggestions:ym};function Xy(o,c){const u=Yl(o);if(!u)return null;const r=$e(u,["title","heading","name","subject"]),h=$e(u,["behavior","adfaerd","observation","issue"]),v=$e(u,["effect","impact","consequence"]),z=$e(u,["next_step","nextStep","recommendation","suggestion"]);return!r&&!h&&!v&&!z?null:{id:gr(u.id)||String(c+1),title:r||`Forbedringspunkt ${c+1}`,behavior:h||"Ingen detaljer tilgaengelige.",effect:v||"Ingen detaljer tilgaengelige.",nextStep:z||"Ingen detaljer tilgaengelige."}}function Zy(o){const c=[o?.suggestions,o?.improvements,o?.improvement_points,o?.feedback_points,Yl(o?.evaluation)?.suggestions,Yl(o?.evaluation)?.improvements];for(const u of c){if(!Array.isArray(u))continue;const r=u.map((h,v)=>Xy(h,v)).filter(h=>!!h);if(r.length>0)return r}return ym}function Wh(o,c,u){for(const h of c){const v=Zh(o?.[h]);if(v.length>0)return v}const r=Yl(o?.evaluation);for(const h of c){const v=Zh(r?.[h]);if(v.length>0)return v}return u}class Ky{constructor(c=new vr){this.simulationService=c}async getEvaluation(c,u){try{const r=await this.simulationService.getInterviewEvaluation(c),h=Yl(r),v=Yl(h?.evaluation),z=$e(h,["company_name","companyName"])||$e(v,["company_name","companyName"])||u?.companyName||kt.companyName,q=$e(h,["job_title","job_name","title"])||$e(v,["job_title","job_name","title"])||u?.title||kt.interviewTitle,L=$e(h,["interview_date","created_at","date"])||$e(v,["interview_date","created_at","date"]),b=Qy(L)||u?.dateLabel||kt.dateLabel,B=$e(h,["interviewer_evaluation_lead","lead"])||$e(v,["interviewer_evaluation_lead","lead"])||kt.interviewerEvaluationLead,D=$e(h,["interviewer_evaluation","summary","feedback"])||$e(v,["interviewer_evaluation","summary","feedback"])||kt.interviewerEvaluationBody,R=$e(h,["evaluation_title","interviewer_title"])||$e(v,["evaluation_title","interviewer_title"])||kt.interviewerEvaluationTitle,K=$e(h,["label","evaluation_label"])||$e(v,["label","evaluation_label"])||kt.evaluationLabel,le=Kh(ps(h,["candidate_score","self_score","self_rating"])??ps(v,["candidate_score","self_score","self_rating"]),kt.selfScore),Z=Kh(ps(h,["interviewer_score","score","interviewer_rating"])??ps(v,["interviewer_score","score","interviewer_rating"]),kt.interviewerScore);return{companyName:z,dateLabel:b,evaluationLabel:K,interviewerEvaluationBody:D,interviewerEvaluationLead:B,interviewerEvaluationTitle:R,interviewerScore:Z,interviewTitle:q,recommendations:Wh(h,["recommendations","constructive_recommendations","next_steps"],jm),selfScore:le,strengths:Wh(h,["strengths","highlights"],bm),suggestions:Zy(h)}}catch{return{...kt,companyName:u?.companyName||kt.companyName,interviewTitle:u?.title||kt.interviewTitle,dateLabel:u?.dateLabel||kt.dateLabel}}}async submitRating(c,u,r){await this.simulationService.submitEvaluationRating(c,u,r)}}function xm(o,c){return c-o}function Wy(o,c){const u=xm(o,c);return u>0?`Gab: +${u} point`:u<0?`Gab: ${u} point`:"Gab: 0 point"}function Fy(o,c){const u=xm(o,c);return u>0?"Du undervurderede dig selv i forhold til interviewerens vurdering.":u<0?"Du vurderede dig selv hojere end intervieweren gjorde i denne session.":"Din selvvurdering matcher interviewerens vurdering godt."}function $y(o){return o||"Nyligt"}function Iy({interviewSelection:o,onBack:c,onLogout:u,onNavigate:r,onToggleTheme:h,theme:v}){const z=T.useMemo(()=>new Ky,[]),[q]=T.useState("Lasse"),[L]=T.useState(void 0),[b,B]=T.useState(null),[D,R]=T.useState(!0),[K,le]=T.useState(0),[Z,fe]=T.useState(""),[te,se]=T.useState(!1),[Y,P]=T.useState("");T.useEffect(()=>{let ae=!0;async function he(){R(!0);const pe=await z.getEvaluation(o.interviewId,{companyName:o.companyName,dateLabel:o.dateLabel,title:o.title});ae&&(B(pe),R(!1))}return he(),()=>{ae=!1}},[o.companyName,o.dateLabel,o.interviewId,o.title,z]);async function ie(){if(!(!K||te)){se(!0),P("");try{await z.submitRating(o.interviewId,K,Z.trim()),P("Tak. Din feedback er sendt.")}catch{P("Kunne ikke sende feedback lige nu. Prov igen.")}finally{se(!1)}}}const G=b,E=G?.suggestions??[];return n.jsxs("section",{className:`dash-root ${v==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"simulator",onNavigate:r}),n.jsxs("main",{className:"dash-main custom-scrollbar sim-eval-main",children:[n.jsx(Jt,{name:q,imageUrl:L,onLogout:u,theme:v,onToggleTheme:h,actions:n.jsxs("div",{className:"sim-eval-top-actions",children:[n.jsx("button",{type:"button",className:"sim-eval-back-btn",onClick:c,children:"Tilbage"}),n.jsxs("div",{className:"sim-eval-crumb-pill",children:[n.jsx(lm,{size:14,strokeWidth:1.8}),n.jsx("span",{children:"Simulator"}),n.jsx(Ua,{size:13,strokeWidth:1.8}),n.jsx("strong",{children:"Evaluering"})]})]})}),n.jsxs("div",{className:"sim-eval-wrap",children:[n.jsxs("header",{className:"sim-eval-head",children:[n.jsxs("div",{className:"sim-eval-label",children:[n.jsx(Jg,{size:14,strokeWidth:1.8}),n.jsx("span",{children:G?.evaluationLabel??"Interview Feedback"})]}),n.jsx("h1",{children:"Evalueringsfeedback"}),n.jsxs("div",{className:"sim-eval-meta",children:[n.jsx("strong",{children:G?.companyName??o.companyName}),n.jsx("span",{}),n.jsx("p",{children:G?.interviewTitle??o.title}),n.jsx("span",{}),n.jsxs("small",{children:[n.jsx(_g,{size:14,strokeWidth:1.8})," ",$y(G?.dateLabel??o.dateLabel)]})]})]}),D?n.jsx("p",{className:"dash-loading",children:"Indlaeser evaluering..."}):null,!D&&G?n.jsxs(n.Fragment,{children:[n.jsxs("section",{className:"sim-eval-overview-card",children:[n.jsxs("div",{className:"sim-eval-overview-text",children:[n.jsxs("div",{className:"sim-eval-overview-title",children:[n.jsx(dm,{size:20,strokeWidth:1.8}),n.jsx("h2",{children:G.interviewerEvaluationTitle})]}),n.jsx("p",{className:"lead",children:G.interviewerEvaluationLead}),n.jsx("p",{children:G.interviewerEvaluationBody})]}),n.jsxs("aside",{className:"sim-eval-score-card",children:[n.jsxs("div",{className:"sim-eval-score-head",children:[n.jsx("h3",{children:"Performance vurdering"}),n.jsx(Kn,{size:16,strokeWidth:1.8})]}),n.jsxs("div",{className:"sim-eval-score-rows",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Din udfyldelse"}),n.jsxs("strong",{children:[G.selfScore,"/10"]})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Interviewers vurdering"}),n.jsxs("strong",{className:"good",children:[G.interviewerScore,"/10"]})]})]}),n.jsxs("div",{className:"sim-eval-gap-block",children:[n.jsxs("span",{children:[n.jsx(Eh,{size:13,strokeWidth:1.8})," ",Wy(G.selfScore,G.interviewerScore)]}),n.jsx("p",{children:Fy(G.selfScore,G.interviewerScore)})]})]})]}),n.jsxs("section",{className:"sim-eval-improvements",children:[n.jsxs("div",{className:"sim-eval-section-title",children:[n.jsx(Eh,{size:20,strokeWidth:1.8}),n.jsx("h2",{children:"Hvordan kan du blive bedre?"})]}),n.jsx("div",{className:"sim-eval-improvement-list",children:E.map((ae,he)=>n.jsxs("article",{className:"sim-eval-improvement-card",children:[n.jsx("div",{className:"sim-eval-improvement-index",children:he+1}),n.jsxs("div",{className:"sim-eval-improvement-content",children:[n.jsx("h3",{children:ae.title}),n.jsxs("div",{className:"sim-eval-improvement-grid",children:[n.jsxs("div",{children:[n.jsx("small",{children:"Adfaerd"}),n.jsx("p",{children:ae.behavior})]}),n.jsxs("div",{className:"impact",children:[n.jsx("small",{children:"Effekt"}),n.jsx("p",{children:ae.effect})]}),n.jsxs("div",{className:"next",children:[n.jsx("small",{children:"Naeste gang"}),n.jsx("p",{children:ae.nextStep})]})]})]})]},ae.id))})]}),n.jsxs("section",{className:"sim-eval-split-grid",children:[n.jsxs("article",{className:"sim-eval-list-card",children:[n.jsxs("div",{className:"sim-eval-card-title",children:[n.jsx(Ke,{size:20,strokeWidth:1.8}),n.jsx("h2",{children:"Dine styrker"})]}),n.jsx("ul",{children:G.strengths.map((ae,he)=>n.jsxs("li",{children:[n.jsx(Ke,{size:17,strokeWidth:1.8}),n.jsx("span",{children:ae})]},`strength-${he}`))})]}),n.jsxs("article",{className:"sim-eval-list-card recommendations",children:[n.jsxs("div",{className:"sim-eval-card-title",children:[n.jsx(ur,{size:20,strokeWidth:1.8}),n.jsx("h2",{children:"Konstruktiv anbefaling"})]}),n.jsx("p",{className:"hint",children:"Fokuser pa disse handlinger for at staerke din naeste samtale."}),n.jsx("ul",{children:G.recommendations.map((ae,he)=>n.jsxs("li",{children:[n.jsx("div",{children:n.jsx(Ep,{size:13,strokeWidth:2})}),n.jsx("span",{children:ae})]},`recommendation-${he}`))})]})]}),n.jsxs("section",{className:"sim-eval-rating-card",children:[n.jsx("p",{children:"Husk: Hvert interview er en laeringsmulighed. Bliv ved med at ove."}),n.jsxs("div",{className:"sim-eval-rating-box",children:[n.jsx("h3",{children:"Bedom denne evaluering"}),n.jsx("small",{children:"Din feedback hjaelper os med at forbedre oplevelsen."}),n.jsx("div",{className:"sim-eval-stars",children:Array.from({length:5}).map((ae,he)=>{const pe=he+1,H=pe<=K;return n.jsx("button",{type:"button","aria-label":`Vaelg ${pe} stjerner`,className:H?"selected":"",onClick:()=>le(pe),children:n.jsx(hr,{size:27,fill:H?"currentColor":"none",strokeWidth:1.8})},`star-${pe}`)})}),n.jsx("textarea",{value:Z,onChange:ae=>fe(ae.target.value),rows:3,placeholder:"Kommentar (valgfrit)"}),n.jsx("button",{type:"button",onClick:()=>{ie()},disabled:te||K===0,children:te?"Sender...":"Send feedback"}),Y?n.jsx("div",{className:"sim-eval-submit-status",children:Y}):null]})]})]}):null]})]})]})}class Py{constructor(c=new tl,u=new Ss){this.candidateService=c,this.subscriptionService=u}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate();return{name:c.firstName?.trim()||c.name?.trim()||"Lasse",imageUrl:c.imageUrl||c.image||void 0}}catch{return{name:"Lasse"}}}async getSnapshot(){const[c,u]=await Promise.allSettled([this.subscriptionService.getPaymentOverview(),this.subscriptionService.getSubscriptionProducts()]);return{paymentOverview:c.status==="fulfilled"?c.value:null,products:u.status==="fulfilled"?u.value:null}}async redeemCode(c){await this.subscriptionService.redeemCode(c)}}const Fh=["Download et professionelt CV - Klar til brug med et enkelt klik","Karriereagent med personlige anbefalinger","Øget synlighed – bliv fundet af virksomheder","Lad systemet lave din ansøgning for dig","Optimer dit CV med intelligente forslag","Job simulatoren – træn til din næste jobsamtale"];function Sm(o){if(!o)return null;const c=o instanceof Date?o:new Date(o);return Number.isNaN(c.getTime())?null:c}function eb(o){const c=Sm(o);return c?new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"2-digit",year:"numeric"}).format(c):"Ukendt dato"}function tb(o){if(!o)return!1;const c=Sm(o.activeToDate);return c?c.getTime()>Date.now():!1}function ab(o){const c=o?.premium_30?.price??49,u=o?.premium_90?.price??99,r=o?.premium_365?.price??249;return{30:{title:"30 dage",priceText:`${c} kr.`,dailyText:"Svarer til 1.63 kr. pr. dag",description:"Månedlig adgang til alle premium-funktioner"},90:{title:"90 dage",priceText:`${u} kr.`,dailyText:"Svarer til 1.10 kr. pr. dag",savings:"Spar 33%",description:"Mest populære valg med ekstra besparelse"},365:{title:"365 dage",priceText:`${r} kr.`,dailyText:"Svarer til 0.68 kr. pr. dag",savings:"Spar 58%",description:"Inkluderer gavekode til 3 måneders premium"}}}function lb({onLogout:o,onNavigate:c,onToggleTheme:u,theme:r}){const h=T.useMemo(()=>new Py,[]),[v,z]=T.useState("Lasse"),[q,L]=T.useState(void 0),[b,B]=T.useState(null),[D,R]=T.useState(null),[K,le]=T.useState(!0),[Z,fe]=T.useState("90"),[te,se]=T.useState(!1),[Y,P]=T.useState(""),[ie,G]=T.useState(""),[E,ae]=T.useState(!1),[he,pe]=T.useState(null);T.useEffect(()=>{let W=!0;async function _(){le(!0);const[V,x]=await Promise.all([h.getCandidateProfile(),h.getSnapshot()]);W&&(z(V.name),L(V.imageUrl),B(x.paymentOverview),R(x.products),le(!1))}return _(),()=>{W=!1}},[h]);const H=T.useMemo(()=>ab(D),[D]),Q=tb(b),ue=he??Q;async function ee(){const W=Y.trim();if(!(!W||E)){G(""),ae(!0);try{await h.redeemCode(W),G("Koden blev indløst. Opdaterer abonnement...");const _=await h.getSnapshot();B(_.paymentOverview),R(_.products),P("")}catch{G("Kunne ikke indløse kode. Prøv igen.")}finally{ae(!1)}}}return n.jsxs("section",{className:`dash-root ${r==="dark"?"theme-dark":""}`,children:[n.jsx("div",{className:"dash-orb dash-orb-1"}),n.jsx("div",{className:"dash-orb dash-orb-2"}),n.jsx("div",{className:"dash-orb dash-orb-3"}),n.jsx(Gt,{active:"subscription",onNavigate:c}),n.jsxs("main",{className:"dash-main custom-scrollbar sub-main",children:[n.jsx(Jt,{name:v,imageUrl:q,onLogout:o,theme:r,onToggleTheme:u,actions:n.jsxs("div",{className:"sub-top-actions",children:[n.jsxs("div",{className:"sub-crumb-pill",children:[n.jsx(ir,{size:15,strokeWidth:1.8})," Abonnement"]}),n.jsx("button",{type:"button",className:"sub-toggle-btn",onClick:()=>pe(W=>W===null?!Q:!W),children:ue?'Vis "Unsubscribed" state':'Vis "Subscribed" state'})]})}),n.jsxs("div",{className:"sub-head",children:[n.jsxs("div",{className:"sub-head-title-row",children:[n.jsx("div",{className:"sub-head-icon",children:n.jsx(ir,{size:18,strokeWidth:1.8})}),n.jsx("h1",{children:"Dit Abonnement"})]}),n.jsx("p",{children:"Administrer dit medlemskab og lås op for alle de intelligente værktøjer, der gør din jobsøgning nemmere."})]}),n.jsxs("div",{className:"sub-wrap",children:[n.jsxs("section",{className:"sub-redeem-card",children:[n.jsxs("div",{className:"sub-redeem-head",children:[n.jsx("span",{children:"🎟️"}),n.jsx("h2",{children:"Indløs kode"})]}),n.jsx("p",{children:"Har du en rabatkode eller gavekode? Indtast den her og få den aktiveret med det samme"}),n.jsxs("div",{className:"sub-redeem-row",children:[n.jsx("input",{type:"text",value:Y,onChange:W=>P(W.target.value),placeholder:"Indtast kode her..."}),n.jsx("button",{type:"button",onClick:()=>{ee()},disabled:E,children:E?"Indløser...":"Indløs"})]}),ie?n.jsx("small",{children:ie}):null]}),K?n.jsx("p",{className:"dash-loading",children:"Indlaeser abonnement..."}):null,!K&&!ue?n.jsxs(n.Fragment,{children:[n.jsx("section",{className:"sub-plan-grid",children:["30","90","365"].map(W=>{const _=H[W],V=Z===W,x=W==="90",$=W==="365";return n.jsxs("label",{className:["sub-plan-card",V?"selected":"",x?"popular":"",$?"yearly":""].join(" ").trim(),children:[x?n.jsx("div",{className:"sub-popular-badge",children:"Mest populær"}):null,n.jsx("input",{type:"radio",name:"pricing-plan",checked:V,onChange:()=>fe(W)}),n.jsx("div",{className:"sub-radio-indicator",children:n.jsx("i",{})}),n.jsxs("div",{className:"sub-plan-content",children:[n.jsxs("div",{className:"sub-plan-title-row",children:[n.jsx("h3",{children:_.title}),_.savings?n.jsx("span",{children:_.savings}):null]}),n.jsx("div",{className:"sub-price",children:_.priceText}),n.jsx("p",{className:"sub-price-daily",children:_.dailyText}),$?n.jsxs("div",{className:"sub-gift-box",children:[n.jsx(ap,{size:17,strokeWidth:1.8}),n.jsxs("div",{children:[n.jsx("strong",{children:"Giv en gave"}),n.jsx("small",{children:"Få en gratis 3-måneders Premium-kode med i købet til en ven."})]})]}):null,n.jsx("div",{className:"sub-divider"}),n.jsx("ul",{children:Fh.map(de=>n.jsxs("li",{children:[n.jsx(Ke,{size:15,strokeWidth:1.8}),n.jsx("span",{children:de})]},`${W}-${de}`))})]})]},W)})}),n.jsxs("section",{className:"sub-checkout-card",children:[n.jsxs("div",{children:[n.jsx("h3",{children:"Klar til at opgradere?"}),n.jsx("p",{children:"Vælg en plan ovenfor og få adgang til alle Premium-funktioner med det samme."})]}),n.jsxs("div",{className:"sub-checkout-actions",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:te,onChange:W=>se(W.target.checked)}),n.jsx("span",{className:"sub-checkbox",children:n.jsx(Mg,{size:13,strokeWidth:2.2})}),n.jsx("span",{children:"Jeg accepterer handelsbetingelser"})]}),n.jsx("button",{type:"button",disabled:!te,children:"Gå til betaling"})]})]})]}):null,!K&&ue?n.jsxs("div",{className:"sub-active-wrap",children:[n.jsxs("section",{className:"sub-gift-alert",children:[n.jsx("div",{className:"sub-gift-glow"}),n.jsx("div",{className:"sub-gift-icon",children:"🎁"}),n.jsxs("div",{children:[n.jsx("h2",{children:"Din gave venter!"}),n.jsx("p",{children:"Klik på gaven nedenfor for at se indholdet"})]}),n.jsx("button",{type:"button",children:"Åbn gave"})]}),n.jsxs("section",{className:"sub-active-card",children:[n.jsxs("div",{className:"sub-active-head",children:[n.jsx("span",{children:"👑"}),n.jsx("h2",{children:"Premium abonnement"})]}),n.jsxs("div",{className:"sub-active-grid",children:[n.jsx("div",{className:"sub-active-features",children:n.jsx("ul",{children:Fh.map(W=>n.jsxs("li",{children:[n.jsx(Ke,{size:16,strokeWidth:1.8}),n.jsx("span",{children:W})]},`active-${W}`))})}),n.jsxs("div",{className:"sub-active-status-col",children:[n.jsxs("div",{className:"sub-active-status-box",children:[n.jsx("div",{className:"sub-active-check",children:n.jsx(Ke,{size:34,strokeWidth:1.8})}),n.jsx("h3",{children:"Dit abonnement er aktivt"}),n.jsxs("strong",{children:[H[Z].priceText," for ",H[Z].title]}),n.jsx("p",{children:H[Z].dailyText}),n.jsxs("div",{className:"sub-renew-pill",children:[n.jsx(Ng,{size:16,strokeWidth:1.8}),"Fornyes d. ",eb(b?.renewDate)]})]}),n.jsx("button",{type:"button",className:"sub-manage-link",children:"Administrer betalingsoplysninger"})]})]})]})]}):null]})]})]})}function nb(){const o=T.useMemo(()=>!!window.localStorage.getItem("token"),[]),c=T.useMemo(()=>window.localStorage.getItem("theme")==="dark"?"dark":"light",[]),[u,r]=T.useState(o),[h,v]=T.useState(c),[z,q]=T.useState("dashboard"),[L,b]=T.useState(null),[B,D]=T.useState(null);function R(Y){(Y==="dashboard"||Y==="jobs"||Y==="cv"||Y==="messages"||Y==="agents"||Y==="ai-agent"||Y==="simulator"||Y==="subscription")&&q(Y)}function K(Y,P,ie="jobs"){b({id:Y,fromJobnet:P,returnPage:ie}),q("job-detail")}function le(){q(L?.returnPage??"jobs")}function Z(Y){D(Y),q("simulator-evaluation")}function fe(){q("simulator")}async function te(){await Gl.clearCredentials(),q("dashboard"),b(null),D(null),r(!1)}function se(){v(Y=>{const P=Y==="light"?"dark":"light";return window.localStorage.setItem("theme",P),P})}return u?z==="jobs"?n.jsx(Cy,{onLogout:te,onNavigate:R,onOpenJobDetail:K,theme:h,onToggleTheme:se}):z==="cv"?n.jsx(fy,{onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):z==="messages"?n.jsx(Ly,{onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):z==="agents"?n.jsx(B0,{onLogout:te,onNavigate:R,onOpenJobDetail:K,theme:h,onToggleTheme:se}):z==="ai-agent"?n.jsx(X0,{onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):z==="simulator"?n.jsx(Gy,{onLogout:te,onNavigate:R,onOpenEvaluation:Z,theme:h,onToggleTheme:se}):z==="simulator-evaluation"&&B?n.jsx(Iy,{interviewSelection:B,onBack:fe,onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):z==="subscription"?n.jsx(lb,{onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):z==="job-detail"&&L?n.jsx(Ty,{jobId:L.id,fromJobnet:L.fromJobnet,onBack:le,onLogout:te,onNavigate:R,theme:h,onToggleTheme:se}):n.jsx(Sy,{onLogout:te,onNavigate:R,onOpenJobDetail:K,theme:h,onToggleTheme:se}):n.jsx(D0,{onAuthenticated:()=>r(!0)})}tg.createRoot(document.getElementById("root")).render(n.jsx(T.StrictMode,{children:n.jsx(nb,{})}));