diff --git a/src/profiles/web/dist/assets/index-BRlfnag_.js b/src/profiles/web/dist/assets/index-BRlfnag_.js new file mode 100644 index 0000000..57f9743 --- /dev/null +++ b/src/profiles/web/dist/assets/index-BRlfnag_.js @@ -0,0 +1,384 @@ +var Yv=Object.defineProperty;var Gv=(n,r,a)=>r in n?Yv(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var sx=(n,r,a)=>Gv(n,typeof r!="symbol"?r+"":r,a);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const d of s)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const d={};return s.integrity&&(d.integrity=s.integrity),s.referrerPolicy&&(d.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?d.credentials="include":s.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function u(s){if(s.ep)return;s.ep=!0;const d=a(s);fetch(s.href,d)}})();function Od(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ff={exports:{}},Ia={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cx;function Qv(){if(cx)return Ia;cx=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(u,s,d){var f=null;if(d!==void 0&&(f=""+d),s.key!==void 0&&(f=""+s.key),"key"in s){d={};for(var m in s)m!=="key"&&(d[m]=s[m])}else d=s;return s=d.ref,{$$typeof:n,type:u,key:f,ref:s!==void 0?s:null,props:d}}return Ia.Fragment=r,Ia.jsx=a,Ia.jsxs=a,Ia}var fx;function Xv(){return fx||(fx=1,Ff.exports=Qv()),Ff.exports}var h=Xv(),Vf={exports:{}},De={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dx;function Iv(){if(dx)return De;dx=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.for("react.view_transition"),v=Symbol.iterator;function N(_){return _===null||typeof _!="object"?null:(_=v&&_[v]||_["@@iterator"],typeof _=="function"?_:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,C={};function J(_,re,de){this.props=_,this.context=re,this.refs=C,this.updater=de||D}J.prototype.isReactComponent={},J.prototype.setState=function(_,re){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,re,"setState")},J.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function G(){}G.prototype=J.prototype;function P(_,re,de){this.props=_,this.context=re,this.refs=C,this.updater=de||D}var ae=P.prototype=new G;ae.constructor=P,O(ae,J.prototype),ae.isPureReactComponent=!0;var U=Array.isArray;function R(){}var X={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function L(_,re,de){var ge=de.ref;return{$$typeof:n,type:_,key:re,ref:ge!==void 0?ge:null,props:de}}function le(_,re){return L(_.type,re,_.props)}function V(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function ce(_){var re={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(de){return re[de]})}var ye=/\/+/g;function ue(_,re){return typeof _=="object"&&_!==null&&_.key!=null?ce(""+_.key):re.toString(36)}function B(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(R,R):(_.status="pending",_.then(function(re){_.status==="pending"&&(_.status="fulfilled",_.value=re)},function(re){_.status==="pending"&&(_.status="rejected",_.reason=re)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function I(_,re,de,ge,Ae){var ke=typeof _;(ke==="undefined"||ke==="boolean")&&(_=null);var ze=!1;if(_===null)ze=!0;else switch(ke){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(_.$$typeof){case n:case r:ze=!0;break;case y:return ze=_._init,I(ze(_._payload),re,de,ge,Ae)}}if(ze)return Ae=Ae(_),ze=ge===""?"."+ue(_,0):ge,U(Ae)?(de="",ze!=null&&(de=ze.replace(ye,"$&/")+"/"),I(Ae,re,de,"",function($t){return $t})):Ae!=null&&(V(Ae)&&(Ae=le(Ae,de+(Ae.key==null||_&&_.key===Ae.key?"":(""+Ae.key).replace(ye,"$&/")+"/")+ze)),re.push(Ae)),1;ze=0;var pe=ge===""?".":ge+":";if(U(_))for(var Ne=0;Ne<_.length;Ne++)ge=_[Ne],ke=pe+ue(ge,Ne),ze+=I(ge,re,de,ke,Ae);else if(Ne=N(_),typeof Ne=="function")for(_=Ne.call(_),Ne=0;!(ge=_.next()).done;)ge=ge.value,ke=pe+ue(ge,Ne++),ze+=I(ge,re,de,ke,Ae);else if(ke==="object"){if(typeof _.then=="function")return I(B(_),re,de,ge,Ae);throw re=String(_),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return ze}function $(_,re,de){if(_==null)return _;var ge=[],Ae=0;return I(_,ge,"","",function(ke){return re.call(de,ke,Ae++)}),ge}function ne(_){if(_._status===-1){var re=_._result,de=re();de.then(function(ge){(_._status===0||_._status===-1)&&(_._status=1,_._result=ge,de.status===void 0&&(de.status="fulfilled",de.value=ge))},function(ge){(_._status===0||_._status===-1)&&(_._status=2,_._result=ge,de.status===void 0&&(de.status="rejected",de.reason=ge))}),_._status===-1&&(_._status=0,_._result=de)}if(_._status===1)return _._result.default;throw _._result}var S=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var re=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(re))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)};function Fe(_){var re=X.T,de={};de.types=re!==null?re.types:null,X.T=de;try{var ge=_(),Ae=X.S;Ae!==null&&Ae(de,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(R,S)}catch(ke){S(ke)}finally{re!==null&&de.types!==null&&(re.types=de.types),X.T=re}}function Ve(_){var re=X.T;if(re!==null){var de=re.types;de===null?re.types=[_]:de.indexOf(_)===-1&&de.push(_)}else Fe(Ve.bind(null,_))}var A={map:$,forEach:function(_,re,de){$(_,function(){re.apply(this,arguments)},de)},count:function(_){var re=0;return $(_,function(){re++}),re},toArray:function(_){return $(_,function(re){return re})||[]},only:function(_){if(!V(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return De.Activity=g,De.Children=A,De.Component=J,De.Fragment=a,De.Profiler=s,De.PureComponent=P,De.StrictMode=u,De.Suspense=p,De.ViewTransition=w,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,De.__COMPILER_RUNTIME={__proto__:null,c:function(_){return X.H.useMemoCache(_)}},De.addTransitionType=Ve,De.cache=function(_){return function(){return _.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(_,re,de){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ge=O({},_.props),Ae=_.key;if(re!=null)for(ke in re.key!==void 0&&(Ae=""+re.key),re)!ie.call(re,ke)||ke==="key"||ke==="__self"||ke==="__source"||ke==="ref"&&re.ref===void 0||(ge[ke]=re[ke]);var ke=arguments.length-2;if(ke===1)ge.children=de;else if(1>>1,S=B[ne];if(0>>1;nes(A,$))_s(re,A)?(B[ne]=re,B[_]=$,ne=_):(B[ne]=A,B[Ve]=$,ne=Ve);else if(_s(re,$))B[ne]=re,B[_]=$,ne=_;else break e}}return I}function s(B,I){var $=B.sortIndex-I.sortIndex;return $!==0?$:B.id-I.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],x=[],y=1,g=null,w=3,v=!1,N=!1,D=!1,O=!1,C=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function P(B){for(var I=a(x);I!==null;){if(I.callback===null)u(x);else if(I.startTime<=B)u(x),I.sortIndex=I.expirationTime,r(p,I);else break;I=a(x)}}function ae(B){if(D=!1,P(B),!N)if(a(p)!==null)N=!0,U||(U=!0,V());else{var I=a(x);I!==null&&ue(ae,I.startTime-B)}}var U=!1,R=-1,X=5,ie=-1;function L(){return O?!0:!(n.unstable_now()-ieB&&L());){var ne=g.callback;if(typeof ne=="function"){g.callback=null,w=g.priorityLevel;var S=ne(g.expirationTime<=B);if(B=n.unstable_now(),typeof S=="function"){g.callback=S,P(B),I=!0;break t}g===a(p)&&u(p),P(B)}else u(p);g=a(p)}if(g!==null)I=!0;else{var Fe=a(x);Fe!==null&&ue(ae,Fe.startTime-B),I=!1}}break e}finally{g=null,w=$,v=!1}I=void 0}}finally{I?V():U=!1}}}var V;if(typeof G=="function")V=function(){G(le)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ye=ce.port2;ce.port1.onmessage=le,V=function(){ye.postMessage(null)}}else V=function(){C(le,0)};function ue(B,I){R=C(function(){B(n.unstable_now())},I)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125ne?(B.sortIndex=$,r(x,B),a(p)===null&&B===a(x)&&(D?(J(R),R=-1):D=!0,ue(ae,$-ne))):(B.sortIndex=S,r(p,B),N||v||(N=!0,U||(U=!0,V()))),B},n.unstable_shouldYield=L,n.unstable_wrapCallback=function(B){var I=w;return function(){var $=w;w=I;try{return B.apply(this,arguments)}finally{w=$}}}})(Qf)),Qf}var px;function $v(){return px||(px=1,Gf.exports=Zv()),Gf.exports}var Xf={exports:{}},It={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gx;function Jv(){if(gx)return It;gx=1;var n=Rd();function r(y){var g="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Xf.exports=Jv(),Xf.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yx;function Pv(){if(yx)return Ka;yx=1;var n=$v(),r=Rd(),a=Hy();function u(e){var t="https://react.dev/errors/"+e;if(1kn||(e.current=ln[kn],ln[kn]=null,kn--)}function Ke(e,t){kn++,ln[kn]=e.current,e.current=t}var Jt=kt(null),Sn=kt(null),Pt=kt(null),Lt=kt(null);function me(e,t){switch(Ke(Pt,t),Ke(Sn,e),Ke(Jt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yg(t),e=bg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}tt(Jt),Ke(Jt,e)}function Re(){tt(Jt),tt(Sn),tt(Pt)}function Me(e){var t=e.memoizedState;t!==null&&(Yr._currentValue=t.memoizedState,Ke(Lt,e)),t=Jt.current;var l=bg(t,e.type);t!==l&&(Ke(Sn,e),Ke(Jt,l))}function lt(e){Sn.current===e&&(tt(Jt),tt(Sn)),Lt.current===e&&(tt(Lt),Yr._currentValue=$t)}var Z,oe;function be(e){if(Z===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Z=t&&t[1]||"",oe=-1)":-1o||E[i]!==F[o]){var K=` +`+E[i].replace(" at new "," at ");return e.displayName&&K.includes("")&&(K=K.replace("",e.displayName)),K}while(1<=i&&0<=o);break}}}finally{Te=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?be(l):""}function it(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be("Lazy");case 13:return e.child!==t&&t!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return St(e.type,!1);case 11:return St(e.type.render,!1);case 1:return St(e.type,!0);case 31:return be("Activity");case 30:return be("ViewTransition");default:return""}}function jt(e){try{var t="",l=null;do t+=it(e,l),l=e,e=e.return;while(e);return t}catch(i){return` +Error generating stack: `+i.message+` +`+i.stack}}var qt=Object.prototype.hasOwnProperty,dn=n.unstable_scheduleCallback,rn=n.unstable_cancelCallback,Gn=n.unstable_shouldYield,ll=n.unstable_requestPaint,Ot=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,an=n.unstable_ImmediatePriority,fe=n.unstable_UserBlockingPriority,er=n.unstable_NormalPriority,Nn=n.unstable_LowPriority,yt=n.unstable_IdlePriority,hn=n.log,mn=n.unstable_setDisableYieldValue,st=null,un=null;function Qn(e){if(typeof hn=="function"&&mn(e),un&&typeof un.setStrictMode=="function")try{un.setStrictMode(st,e)}catch{}}var gt=Math.clz32?Math.clz32:ta,ps=Math.log,ou=Math.LN2;function ta(e){return e>>>=0,e===0?32:31-(ps(e)/ou|0)|0}var tr=256,nr=262144,Ll=4194304;function Mn(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&-e;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 Bl(e,t,l){var i=e.pendingLanes;if(i===0)return 0;var o=0,c=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var k=i&134217727;return k!==0?(i=k&~c,i!==0?o=Mn(i):(b&=k,b!==0?o=Mn(b):l||(l=k&~e,l!==0&&(o=Mn(l))))):(k=i&~c,k!==0?o=Mn(k):b!==0?o=Mn(b):l||(l=i&~e,l!==0&&(o=Mn(l)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:o}function yi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lr(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0l;l++)t.push(e);return t}function bi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fu(e,t,l,i,o,c){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,E=e.expirationTimes,F=e.hiddenUpdates;for(l=b&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ss=!1;if(kl)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){Ss=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{Ss=!1}var Vl=null,Ns=null,Nu=null;function mh(){if(Nu)return Nu;var e,t=Ns,l=t.length,i,o="value"in Vl?Vl.value:Vl.textContent,c=o.length;for(e=0;e=sa),vh=" ",wh=!1;function kh(e,t){switch(e){case"keyup":return qb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fr=!1;function Vb(e,t){switch(e){case"compositionend":return Sh(t);case"keypress":return t.which!==32?null:(wh=!0,vh);case"textInput":return e=t.data,e===vh&&wh?null:e;default:return null}}function Yb(e,t){if(fr)return e==="compositionend"||!_s&&kh(e,t)?(e=mh(),Nu=Ns=Vl=null,fr=!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"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dh(e,t){var l=zh(e);e=0;for(var i;l;){if(l.nodeType===3){if(i=e+l.textContent.length,e<=t&&i>=t)return{node:l,offset:t-e};e=i}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=zh(l)}}function Mh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ds(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ds(e.document)}return t}function Ms(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 Jb=kl&&"documentMode"in document&&11>=document.documentMode,dr=null,Os=null,ha=null,Rs=!1;function Rh(e,t,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Rs||dr==null||dr!==Ds(i)||(i=dr,"selectionStart"in i&&Ms(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ha&&da(ha,i)||(ha=i,i=Ao(Os,"onSelect"),0>=b,o-=b,al=1<<32-gt(t)+o|l<_e?(Dt=Se,Se=null):Dt=Se.sibling;var Pe=H(q,Se,Y[_e],ee);if(Pe===null){Se===null&&(Se=Dt);break}e&&Se&&Pe.alternate===null&&t(q,Se),M=c(Pe,M,_e),Ie===null?xe=Pe:Ie.sibling=Pe,Ie=Pe,Se=Dt}if(_e===Y.length)return l(q,Se),He&&jl(q,_e),xe;if(Se===null){for(;_e_e?(Dt=Se,Se=null):Dt=Se.sibling;var hi=H(q,Se,Pe.value,ee);if(hi===null){Se===null&&(Se=Dt);break}e&&Se&&hi.alternate===null&&t(q,Se),M=c(hi,M,_e),Ie===null?xe=hi:Ie.sibling=hi,Ie=hi,Se=Dt}if(Pe.done)return l(q,Se),He&&jl(q,_e),xe;if(Se===null){for(;!Pe.done;_e++,Pe=Y.next())Pe=te(q,Pe.value,ee),Pe!==null&&(M=c(Pe,M,_e),Ie===null?xe=Pe:Ie.sibling=Pe,Ie=Pe);return He&&jl(q,_e),xe}for(Se=i(Se);!Pe.done;_e++,Pe=Y.next())Pe=Q(Se,q,_e,Pe.value,ee),Pe!==null&&(e&&(Dt=Pe.alternate,Dt!==null&&Se.delete(Dt.key===null?_e:Dt.key)),M=c(Pe,M,_e),Ie===null?xe=Pe:Ie.sibling=Pe,Ie=Pe);return e&&Se.forEach(function(Vv){return t(q,Vv)}),He&&jl(q,_e),xe}function Be(q,M,Y,ee){if(typeof Y=="object"&&Y!==null&&Y.type===le&&Y.key===null&&Y.props.ref===void 0&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case ie:e:{for(var xe=Y.key;M!==null;){if(M.key===xe){if(xe=Y.type,xe===le){if(M.tag===7){l(q,M.sibling),ee=o(M,Y.props.children),Kl(ee,Y),ee.return=q,q=ee;break e}}else if(M.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===S&&Oi(xe)===M.type){l(q,M.sibling),ee=o(M,Y.props),Kl(ee,Y),ee.return=q,q=ee;break e}l(q,M);break}else t(q,M);M=M.sibling}Y.type===le?(ee=Ci(Y.props.children,q.mode,ee,Y.key),Kl(ee,Y),ee.return=q,q=ee):(ee=Ou(Y.type,Y.key,Y.props,null,q.mode,ee),Kl(ee,Y),ee.return=q,q=ee)}return b(q);case L:e:{for(xe=Y.key;M!==null;){if(M.key===xe)if(M.tag===4&&M.stateNode.containerInfo===Y.containerInfo&&M.stateNode.implementation===Y.implementation){l(q,M.sibling),ee=o(M,Y.children||[]),ee.return=q,q=ee;break e}else{l(q,M);break}else t(q,M);M=M.sibling}ee=Vs(Y,q.mode,ee),ee.return=q,q=ee}return b(q);case S:return Y=Oi(Y),Be(q,M,Y,ee)}if(ze(Y))return he(q,M,Y,ee);if(ge(Y)){if(xe=ge(Y),typeof xe!="function")throw Error(u(150));return Y=xe.call(Y),ve(q,M,Y,ee)}if(typeof Y.then=="function")return Be(q,M,Gu(Y),ee);if(Y.$$typeof===ue)return Be(q,M,qu(q,Y),ee);Qu(q,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,M!==null&&M.tag===6?(l(q,M.sibling),ee=o(M,Y),ee.return=q,q=ee):(l(q,M),ee=Fs(Y,q.mode,ee),ee.return=q,q=ee),b(q)):l(q,M)}return function(q,M,Y,ee){try{ba=0;var xe=Be(q,M,Y,ee);return wr=null,xe}catch(Se){if(Se===vr||Se===Vu)throw Se;var Ie=pn(29,Se,null,q.mode);return Ie.lanes=ee,Ie.return=q,Ie}finally{}}}var Li=rm(!0),am=rm(!1),Zl=!1;function Ps(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ws(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 $l(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jl(e,t,l){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(et&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=Mu(e),Yh(e,null,l),t}return Du(e,i,t,l),Mu(e)}function va(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,bl(e,l)}}function ec(e,t){var l=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var o=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?o=c=b:c=c.next=b,l=l.next}while(l!==null);c===null?o=c=t:c=c.next=t}else o=c=t;l={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:i.shared,callbacks:i.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var tc=!1;function wa(){if(tc){var e=br;if(e!==null)throw e}}function ka(e,t,l,i){tc=!1;var o=e.updateQueue;Zl=!1;var c=o.firstBaseUpdate,b=o.lastBaseUpdate,k=o.shared.pending;if(k!==null){o.shared.pending=null;var E=k,F=E.next;E.next=null,b===null?c=F:b.next=F,b=E;var K=e.alternate;K!==null&&(K=K.updateQueue,k=K.lastBaseUpdate,k!==b&&(k===null?K.firstBaseUpdate=F:k.next=F,K.lastBaseUpdate=E))}if(c!==null){var te=o.baseState;b=0,K=F=E=null,k=c;do{var H=k.lane&-536870913,Q=H!==k.lane;if(Q?(Xe&H)===H:(i&H)===H){H!==0&&H===Di&&(tc=!0),K!==null&&(K=K.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var he=e,ve=k;H=t;var Be=l;switch(ve.tag){case 1:if(he=ve.payload,typeof he=="function"){te=he.call(Be,te,H);break e}te=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ve.payload,H=typeof he=="function"?he.call(Be,te,H):he,H==null)break e;te=R({},te,H);break e;case 2:Zl=!0}}H=k.callback,H!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=o.callbacks,Q===null?o.callbacks=[H]:Q.push(H))}else Q={lane:H,tag:k.tag,payload:k.payload,callback:k.callback,next:null},K===null?(F=K=Q,E=te):K=K.next=Q,b|=H;if(k=k.next,k===null){if(k=o.shared.pending,k===null)break;Q=k,k=Q.next,Q.next=null,o.lastBaseUpdate=Q,o.shared.pending=null}}while(!0);K===null&&(E=te),o.baseState=E,o.firstBaseUpdate=F,o.lastBaseUpdate=K,c===null&&(o.shared.lanes=0),ii|=b,e.lanes=b,e.memoizedState=te}}function um(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function om(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;ec?c:8;var b=pe.T,k={};k.types=b!==null?b.types:null,pe.T=k,wc(e,!1,t,l);try{var E=o(),F=pe.S;if(F!==null&&F(k,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var K=o1(E,i);ja(e,t,K,An(e))}else ja(e,t,i,An(e))}catch(te){ja(e,t,{then:function(){},status:"rejected",reason:te},An())}finally{Ne.p=c,b!==null&&k.types!==null&&(b.types=k.types),pe.T=b}}function m1(){}function bc(e,t,l,i){if(e.tag!==5)throw Error(u(476));var o=qm(e).queue;Hm(e,o,t,$t,l===null?m1:function(){return Fm(e),l(i)})}function qm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$t,baseState:$t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:$t},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fm(e){var t=qm(e);t.next===null&&(t=e.alternate.memoizedState),ja(e,t.next.queue,{},An())}function vc(){return Vt(Yr)}function Vm(){return Et().memoizedState}function Ym(){return Et().memoizedState}function p1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=An();e=$l(l);var i=Jl(t,e,l);i!==null&&(bn(i,t,l),va(i,t,l)),t={cache:Ks()},e.payload=t;return}t=t.return}}function g1(e,t,l){var i=An();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},to(e)?Qm(t,l):(l=Hs(e,t,l,i),l!==null&&(bn(l,e,i),Xm(l,t,i)))}function Gm(e,t,l){var i=An();ja(e,t,l,i)}function ja(e,t,l,i){var o={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(to(e))Qm(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var b=t.lastRenderedState,k=c(b,l);if(o.hasEagerState=!0,o.eagerState=k,En(k,b))return Du(e,t,o,0),ft===null&&zu(),!1}catch{}finally{}if(l=Hs(e,t,o,i),l!==null)return bn(l,e,i),Xm(l,t,i),!0}return!1}function wc(e,t,l,i){if(i={lane:2,revertLane:df(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},to(e)){if(t)throw Error(u(479))}else t=Hs(e,l,i,2),t!==null&&bn(t,e,2)}function to(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Qm(e,t){kr=Ku=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Xm(e,t,l){if((l&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,bl(e,l)}}var no={readContext:Vt,use:Ju,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt,useEffectEvent:vt},Im={readContext:Vt,use:Ju,useCallback:function(e,t){return sn().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:Am,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Wu(4194308,4,Om.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Wu(4194308,4,e,t)},useInsertionEffect:function(e,t){Wu(4,2,e,t)},useMemo:function(e,t){var l=sn();t=t===void 0?null:t;var i=e();if(Bi){Qn(!0);try{e()}finally{Qn(!1)}}return l.memoizedState=[i,t],i},useReducer:function(e,t,l){var i=sn();if(l!==void 0){var o=l(t);if(Bi){Qn(!0);try{l(t)}finally{Qn(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=g1.bind(null,Le,e),[i.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:function(e){e=mc(e);var t=e.queue,l=Gm.bind(null,Le,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:xc,useDeferredValue:function(e,t){var l=sn();return yc(l,e,t)},useTransition:function(){var e=mc(!1);return e=Hm.bind(null,Le,e.queue,!0,!1),sn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var i=Le,o=sn();if(He){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),ft===null)throw Error(u(349));(Xe&127)!==0||mm(i,t,l)}o.memoizedState=l;var c={value:l,getSnapshot:t};return o.queue=c,Am(gm.bind(null,i,c,e),[e]),i.flags|=2048,Nr(9,{destroy:void 0},pm.bind(null,i,c,l,t),null),l},useId:function(){var e=sn(),t=ft.identifierPrefix;if(He){var l=ul,i=al;l=(i&~(1<<32-gt(i)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Zu++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof i.is=="string"?b.createElement("select",{is:i.is}):b.createElement("select"),i.multiple?c.multiple=!0:i.size&&(c.size=i.size);break;default:c=typeof i.is=="string"?b.createElement(o,{is:i.is}):b.createElement(o)}}c[Tt]=t,c[en]=i;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)c.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=c;e:switch(Xt(c,o,i),o){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Dl(t)}}return pt(t),t.subtreeFlags&=-33554433,Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Dl(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=Pt.current,yr(t)){if(e=t.stateNode,l=t.memoizedProps,i=null,o=Bt,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||gg(e.nodeValue,l)),e||Xl(t,!0)}else e=Ha(e).createTextNode(i),e[Tt]=t,t.stateNode=e}return pt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(i=yr(t),l!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Tt]=t}else Ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else l=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(jn(t),t):(jn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return pt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=yr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[Tt]=t}else Ti(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),o=!1}else o=Qs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(jn(t),t):(jn(t),null)}return jn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=i!==null,e=e!==null&&e.memoizedState!==null,l&&(i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==o&&(i.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oo(t,t.updateQueue),pt(t),null);case 4:return Re(),e===null&&gf(t.stateNode.containerInfo),t.flags|=67108864,pt(t),null;case 10:return Tl(t.type),pt(t),null;case 19:if(rc(t),i=t.memoizedState,i===null)return pt(t),null;if(o=(t.flags&128)!==0,c=i.rendering,c===null)if(o)Ta(i,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Iu(e),c!==null){for(t.flags|=128,Ta(i,!1),e=c.updateQueue,t.updateQueue=e,oo(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Gh(l,e),l=l.sibling;return Sa(t,Gt.current&1|2),He&&jl(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Ot()>wo&&(t.flags|=128,o=!0,Ta(i,!1),t.lanes=4194304)}else{if(!o)if(e=Iu(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,oo(t,e),Ta(i,!0),i.tail===null&&i.tailMode!=="collapsed"&&i.tailMode!=="visible"&&!c.alternate&&!He)return pt(t),null}else 2*Ot()-i.renderingStartTime>wo&&l!==536870912&&(t.flags|=128,o=!0,Ta(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}if(i.tail!==null){e=i.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ot(),e.sibling=null,c=Gt.current,c=o?c&1|2:c&1,i.tailMode==="visible"||i.tailMode==="collapsed"||!l||He?Sa(t,c):(l=c,Ke(Yt,t),Ke(Gt,l),tn===null&&(tn=t)),He&&jl(t,i.treeForkCount),e}return pt(t),null;case 22:case 23:return jn(t),lc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(l&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),l=t.updateQueue,l!==null&&oo(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==l&&(t.flags|=2048),e!==null&&tt(Mi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Tl(_t),pt(t),null;case 25:return null;case 30:return t.flags|=33554432,pt(t),null}throw Error(u(156,t.tag))}function S1(e,t){switch(Ys(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tl(_t),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return lt(t),null;case 31:if(t.memoizedState!==null){if(jn(t),t.alternate===null)throw Error(u(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Re(),null;case 10:return Tl(t.type),null;case 22:case 23:return jn(t),lc(),e!==null&&tt(Mi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Tl(_t),null;case 25:return null;default:return null}}function yp(e,t){switch(Ys(t),t.tag){case 3:Tl(_t),Re();break;case 26:case 27:case 5:lt(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&jn(t);break;case 13:jn(t);break;case 19:rc(t);break;case 10:Tl(t.type);break;case 22:case 23:jn(t),lc(),e!==null&&tt(Mi);break;case 24:Tl(_t)}}function _a(e,t){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var o=i.next;l=o;do{if((l.tag&e)===e){i=void 0;var c=l.create,b=l.inst;i=c(),b.destroy=i}l=l.next}while(l!==o)}}catch(k){ut(t,t.return,k)}}function ti(e,t,l){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var c=o.next;i=c;do{if((i.tag&e)===e){var b=i.inst,k=b.destroy;if(k!==void 0){b.destroy=void 0,o=t;var E=l,F=k;try{F()}catch(K){ut(o,E,K)}}}i=i.next}while(i!==c)}}catch(K){ut(t,t.return,K)}}function bp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{om(t,l)}catch(i){ut(e,e.return,i)}}}function vp(e,t,l){l.props=Ui(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(i){ut(e,t,i)}}function ol(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:var o=e.stateNode,c=Sl(e.memoizedProps,o);(o.ref===null||o.ref.name!==c)&&(o.ref=Cg(c)),i=o.ref;break;case 7:if(e.stateNode===null){var b=new zn(e);g(e.child,!1,hv,b,void 0,void 0),e.stateNode=b}i=e.stateNode;break;default:i=e.stateNode}typeof l=="function"?e.refCleanup=l(i):l.current=i}}catch(k){ut(e,t,k)}}function Qt(e,t){var l=e.ref,i=e.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(o){ut(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){ut(e,t,o)}else l.current=null}function so(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l title"))),Xt(i,t,l),i[Tt]=e,Nt(i),t=i;break e;case"link":if(c=Gg("link","href",o).get(t+(l.href||""))){for(b=0;bBe&&(b=Be,Be=ve,ve=b);var q=Dh(k,ve),M=Dh(k,Be);if(q&&M&&(Q.rangeCount!==1||Q.anchorNode!==q.node||Q.anchorOffset!==q.offset||Q.focusNode!==M.node||Q.focusOffset!==M.offset)){var Y=te.createRange();Y.setStart(q.node,q.offset),Q.removeAllRanges(),ve>Be?(Q.addRange(Y),Q.extend(M.node,M.offset)):(Y.setEnd(M.node,M.offset),Q.addRange(Y))}}}}for(te=[],Q=k;Q=Q.parentNode;)Q.nodeType===1&&te.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;kl?32:l,pe.T=null,l=tf,tf=null;var c=Jn,b=ml;if(bt=0,Vi=Jn=null,ml=0,(et&6)!==0)throw Error(u(331));var k=et;if(et|=4,Yp(c.current),qp(c,c.current,b,l),et=k,La(0,!1),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(st,c)}catch{}return!0}finally{Ne.p=o,pe.T=i,ig(e,t)}}function rg(e,t,l){t=Rn(l,t),t=Nc(e.stateNode,t,2),e=Jl(e,t,2),e!==null&&(bi(e,2),pl(e))}function ut(e,t,l){if(e.tag===3)rg(e,e,l);else for(;t!==null;){if(t.tag===3){rg(t,e,l);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ri===null||!ri.has(i))){e=Rn(l,e),l=tp(2),i=Jl(t,l,2),i!==null&&(np(l,i,t,e),bi(i,2),pl(i));break}}t=t.return}}function sf(e,t,l){var i=e.pingCache;if(i===null){i=e.pingCache=new C1;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(l)||(Pc=!0,o.add(l),e=R1.bind(null,e,t,l),t.then(e,e))}function R1(e,t,l){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ft===e&&(Xe&l)===l&&((wt===4||wt===3&&(Xe&62914560)===Xe&&300>Ot()-vo)&&(et&2)===0?Rr(e,0):bo|=l,Ar===Xe&&(Ar=0)),pl(e)}function ag(e,t){t===0&&(t=cu()),e=ji(e,t),e!==null&&(bi(e,t),pl(e))}function L1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),ag(e,l)}function B1(e,t){var l=0;switch(e.tag){case 31:case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),ag(e,l)}function U1(e,t){return dn(e,t)}var Br=null,Ur=null,cf=!1,To=!1,ff=!1,ui=0;function pl(e){e!==Ur&&e.next===null&&(Ur===null?Br=Ur=e:Ur=Ur.next=e),To=!0,cf||(cf=!0,q1())}function La(e,t){if(!ff&&To){ff=!0;do for(var l=!1,i=Br;i!==null;){if(e!==0){var o=i.pendingLanes;if(o===0)var c=0;else{var b=i.suspendedLanes,k=i.pingedLanes;c=(1<<31-gt(42|e)+1)-1,c&=o&~(b&~k),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,cg(i,c))}else c=Xe,c=Bl(i,i===ft?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(c&3)===0||yi(i,c)||(l=!0,cg(i,c));i=i.next}while(l);ff=!1}}function H1(){ug()}function ug(){To=cf=!1;var e=0;ui!==0&&J1()&&(e=ui);for(var t=Ot(),l=null,i=Br;i!==null;){var o=i.next,c=og(i,t);c===0?(i.next=null,l===null?Br=o:l.next=o,o===null&&(Ur=l)):(l=i,(e!==0||(c&3)!==0)&&(To=!0)),i=o}bt!==0&&bt!==5||La(e),ui!==0&&(ui=0)}function og(e,t){for(var l=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0k)break;var K=E.transferSize,te=E.initiatorType;K&&xg(te)&&(E=E.responseEnd,b+=K*(EMo){ve.length=he;break}Y=new Promise(lv.bind(Y)),ve.push(Y)}}}if(0"u"?null:document;function qg(e,t,l){var i=qr;if(i&&typeof t=="string"&&t){var o=je(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),Hg.has(o)||(Hg.add(o),e={rel:e,crossOrigin:l,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),Xt(t,"link",e),Nt(t),i.head.appendChild(t)))}}function kv(e){Ol.D(e),qg("dns-prefetch",e,null)}function Sv(e,t){Ol.C(e,t),qg("preconnect",e,t)}function Nv(e,t,l){Ol.L(e,t,l);var i=qr;if(i&&e&&t){var o='link[rel="preload"][as="'+je(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+je(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+je(l.imageSizes)+'"]')):o+='[href="'+je(e)+'"]';var c=o;switch(t){case"style":c=Fr(e);break;case"script":c=Vr(e)}if(!(Fn.has(c)||(e=R({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Fn.set(c,e),i.querySelector(o)!==null||t==="style"&&i.querySelector(Fa(c))||t==="script"&&i.querySelector(Va(c))))){var b=i.createElement("link");Xt(b,"link",e),t==="style"&&(b[ir]=!0,b.onload=b.onerror=function(){gu(b)}),Nt(b),i.head.appendChild(b)}}}function Ev(e,t){Ol.m(e,t);var l=qr;if(l&&e){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+je(i)+'"][href="'+je(e)+'"]',c=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Vr(e)}if(!Fn.has(c)&&(e=R({rel:"modulepreload",href:e},t),Fn.set(c,e),l.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Va(c)))return}i=l.createElement("link"),Xt(i,"link",e),Nt(i),l.head.appendChild(i)}}}function jv(e,t,l){Ol.S(e,t,l);var i=qr;if(i&&e){var o=ql(i).hoistableStyles,c=Fr(e);t=t||"default";var b=o.get(c);if(!b){var k={loading:0,preload:null};if(b=i.querySelector(Fa(c)))k.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Fn.get(c))&&Df(e,l);var E=b=i.createElement("link");Nt(E),Xt(E,"link",e),E._p=new Promise(function(F,K){E.onload=F,E.onerror=K}),E.addEventListener("load",function(){k.loading|=1}),E.addEventListener("error",function(){k.loading|=2}),k.loading|=4,zo(b,t,i)}b={type:"stylesheet",instance:b,count:1,state:k},o.set(c,b)}}}function Cv(e,t){Ol.X(e,t);var l=qr;if(l&&e){var i=ql(l).hoistableScripts,o=Vr(e),c=i.get(o);c||(c=l.querySelector(Va(o)),c||(e=R({src:e,async:!0},t),(t=Fn.get(o))&&Mf(e,t),c=l.createElement("script"),Nt(c),Xt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(o,c))}}function Tv(e,t){Ol.M(e,t);var l=qr;if(l&&e){var i=ql(l).hoistableScripts,o=Vr(e),c=i.get(o);c||(c=l.querySelector(Va(o)),c||(e=R({src:e,async:!0,type:"module"},t),(t=Fn.get(o))&&Mf(e,t),c=l.createElement("script"),Nt(c),Xt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(o,c))}}function Fg(e,t,l,i){var o=(o=Pt.current)?qa(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Fr(l.href),t=ql(o).hoistableStyles,i=t.get(l),i||(i={type:"style",instance:null,count:0,state:null},t.set(l,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Fr(l.href);var c=ql(o).hoistableStyles,b=c.get(e);if(b||(o=o.ownerDocument||o,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,b),(c=o.querySelector(Fa(e)))?c._p||(b.instance=c,b.state.loading=5):(c=Fn.get(e),c||(c={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Fn.set(e,c)),_v(o,e,c,b.state))),t&&i===null)throw Error(u(528,""));return b}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Vr(l),t=ql(o).hoistableScripts,i=t.get(l),i||(i={type:"script",instance:null,count:0,state:null},t.set(l,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Fr(e){return'href="'+je(e)+'"'}function Fa(e){return'link[rel="stylesheet"]['+e+"]"}function Vg(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function _v(e,t,l,i){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ir]!==!0){i.loading=1;return}}else t=e.createElement("link"),t[ir]=!0,t.onload=t.onerror=gu.bind(null,t),Xt(t,"link",l),Nt(t),e.head.appendChild(t);i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2})}function Vr(e){return'[src="'+je(e)+'"]'}function Va(e){return"script[async]"+e}function Yg(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+je(l.href)+'"]');if(i)return t.instance=i,Nt(i),i;var o=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Nt(i),Xt(i,"style",o),zo(i,l.precedence,e),t.instance=i;case"stylesheet":o=Fr(l.href);var c=e.querySelector(Fa(o));if(c)return t.state.loading|=4,t.instance=c,Nt(c),c;i=Vg(l),(o=Fn.get(o))&&Df(i,o),c=(e.ownerDocument||e).createElement("link"),Nt(c);var b=c;return b._p=new Promise(function(k,E){b.onload=k,b.onerror=E}),Xt(c,"link",i),t.state.loading|=4,zo(c,l.precedence,e),t.instance=c;case"script":return c=Vr(l.src),(o=e.querySelector(Va(c)))?(t.instance=o,Nt(o),o):(i=l,(o=Fn.get(c))&&(i=R({},l),Mf(i,o)),e=e.ownerDocument||e,o=e.createElement("script"),Nt(o),Xt(o,"link",i),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,zo(i,l.precedence,e));return t.instance}function zo(e,t,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,c=o,b=0;b title"):null)}function Av(e,t,l){if(l===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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Qg(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Xg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ig(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Kg(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Ig(t),e.suspenseyImages.push(t)),e=Mv.bind(e),t.decode().then(e,e))}function zv(e,t,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Fr(i.href),c=t.querySelector(Fa(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ya.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,Nt(c);return}c=t.ownerDocument||t,i=Vg(i),(o=Fn.get(o))&&Df(i,o),c=c.createElement("link"),Nt(c);var b=c;b._p=new Promise(function(k,E){b.onload=k,b.onerror=E}),Xt(c,"link",i),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ya.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Mo=0;function Dv(e,t){return e.stylesheets&&e.count===0&&Ro(e,e.stylesheets),0Mo?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(o)}}:null}function Zg(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Ro(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Ya(){this.count--,Zg(this)}function Mv(){this.imgCount--,Zg(this)}var Oo=null;function Ro(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oo=new Map,t.forEach(Ov,e),Oo=null,Ya.call(e))}function Ov(e,t){if(!(t.state.loading&4)){var l=Oo.get(e);if(l)var i=l.get(null);else{l=new Map,Oo.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Yf.exports=Pv(),Yf.exports}var e2=Wv();const t2=Od(e2);async function n2(n){const r=await fetch(`/api/notifications?after=${n}`);if(!r.ok)throw new Error("Failed to fetch notifications");return r.json()}async function l2(){const n=await fetch("/api/actions/open-log",{method:"POST"});if(!n.ok)throw new Error("Failed to open log file");return n.json()}async function i2(n){const r=new URLSearchParams;r.set("limit",String(n.limit)),n!=null&&n.level&&r.set("level",n.level),n!=null&&n.search&&r.set("search",n.search);const a=await fetch(`/api/logs?${r.toString()}`);if(!a.ok)throw new Error("Failed to fetch log entries");return a.json()}async function vx(){const n=await fetch("/api/system");if(!n.ok)throw new Error("Failed to fetch system info");return n.json()}async function wx(){const n=await fetch("/api/config");if(!n.ok)throw new Error("Failed to fetch app configuration");return n.json()}async function kx(n){const r=await fetch("/api/config/select-directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:n})});if(!r.ok)throw new Error("Failed to select directory");return r.json()}async function r2(n){const r=await fetch("/api/config/load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config_path:n})});if(!r.ok)throw new Error("Failed to load config file");return r.json()}async function a2(n,r){const a=await fetch("/api/config/load-content",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:n,content:r})});if(!a.ok){let u=`Failed to apply dropped config (${n})`;try{const s=await a.json();s!=null&&s.detail&&(u=s.detail)}catch{}throw new Error(u)}return a.json()}async function u2(){const n=await fetch("/api/config/reload",{method:"POST"});if(!n.ok){let r="Failed to reload configuration";try{const a=await n.json();a!=null&&a.detail&&(r=a.detail)}catch{}throw new Error(r)}return n.json()}async function o2(n){const r=await fetch("/api/config/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({directory:n})});if(!r.ok)throw new Error("Failed to create config file");return r.json()}async function s2(n){const r=`/api/fs/browse?path=${encodeURIComponent(n)}&include_hidden=true`,a=await fetch(r);if(!a.ok)throw new Error("Failed to browse config files");return a.json()}async function c2(n){const r=`/api/fs/browse?path=${encodeURIComponent(n)}`,a=await fetch(r);if(!a.ok)throw new Error("Failed to browse directory");return a.json()}async function Sx(n,r){const a=await fetch("/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:r});if(!a.ok)throw new Error("Failed to execute scan");return a.json()}async function If(n){const r=new URLSearchParams;(n==null?void 0:n.offset)!=null&&r.set("offset",String(n.offset)),(n==null?void 0:n.limit)!=null&&r.set("limit",String(n.limit)),n!=null&&n.sort_by&&r.set("sort_by",n.sort_by),n!=null&&n.sort_dir&&r.set("sort_dir",n.sort_dir);const a=r.toString(),u=`/api/scan/results${a?`?${a}`:""}`,s=await fetch(u,{signal:n==null?void 0:n.signal});if(!s.ok)throw new Error("Failed to fetch scan results");return s.json()}async function f2(n){const r=await fetch("/api/actions/launch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error("Failed to launch file");return r.json()}async function qy(n){const r=await fetch("/api/actions/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n})});if(!r.ok)throw new Error("Failed to reveal file");return r.json()}async function hd(n){const r=await fetch("/api/actions/open-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n})});if(!r.ok)throw new Error("Failed to open folder");return r.json()}async function Nx(n){const r=await fetch("/api/actions/open-terminal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n})});if(!r.ok)throw new Error("Failed to open terminal");return r.json()}async function Ex(n,r){const a=await fetch("/api/actions/hash",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n,algorithm:r})});if(!a.ok)throw new Error("Failed to compute hash");return a.json()}async function jx(){const n=await fetch("/api/actions/open-config",{method:"POST"});if(!n.ok)throw new Error("Failed to open config file");return n.json()}async function Cx(n){const r={file_path:n.file_path||n.filePath,content:n.content},a=await fetch("/api/actions/barcode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!a.ok)throw new Error("Failed to generate barcode");return a.json()}async function d2(n){const r=await fetch("/api/actions/barcode/decode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image_base64:n.imageBase64,formats:n.formats})});if(!r.ok)throw r.status===503?new Error("Server-side barcode decoding is unavailable"):new Error(`Failed to decode frame (HTTP ${r.status})`);return r.json()}async function h2(n,r){const a=await fetch("/api/actions/metadata",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:n}),signal:r});if(!a.ok)throw new Error("Failed to fetch metadata");return a.json()}async function m2(n,r){const a=await fetch("/api/actions/export-csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,filename:r})});if(!a.ok)throw new Error("Failed to export CSV");return a.json()}async function p2(n,r){const a=await fetch("/api/actions/save-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({image_base64:n,filename:r})});if(!a.ok)throw new Error("Failed to save image");return a.json()}async function g2(n){const r=await fetch("/api/workflow/start",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const a=await r.json().catch(()=>({detail:"Failed to start workflow session"}));throw new Error(a.detail||"Failed to start workflow session")}return r.json()}async function x2(n,r){const a=await fetch(`/api/workflow/${n}/respond`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r})});if(!a.ok)throw new Error("Failed to respond to workflow prompt");return a.json()}async function y2(n){const r=await fetch(`/api/workflow/${n}/abort`,{method:"POST"});if(!r.ok)throw new Error("Failed to abort workflow session");return r.json()}const b2=[".profiles",".profiles.yaml",".profiles.yml",".yaml",".yml"];function v2(n){const r=n.toLowerCase();return b2.some(a=>r.endsWith(a))}function w2(n){for(const r of n)if(v2(r.name))return r;return null}function Jo(){return{depth:0,overlayVisible:!1}}function Tx(n,r,a){switch(r){case"enter":return a?{depth:n.depth+1,overlayVisible:!0}:n;case"leave":{const u=Math.max(0,n.depth-1);return{depth:u,overlayVisible:n.depth>0&&u>0}}case"drop":return Jo()}}function _x(n){return n==="light"?"light":"dark"}/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fy=(...n)=>n.filter((r,a,u)=>!!r&&r.trim()!==""&&u.indexOf(r)===a).join(" ").trim();/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var S2={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"};/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N2=z.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:u,className:s="",children:d,iconNode:f,...m},p)=>z.createElement("svg",{ref:p,...S2,width:r,height:r,stroke:n,strokeWidth:u?Number(a)*24/Number(r):a,className:Fy("lucide",s),...m},[...f.map(([x,y])=>z.createElement(x,y)),...Array.isArray(d)?d:[d]]));/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ee=(n,r)=>{const a=z.forwardRef(({className:u,...s},d)=>z.createElement(N2,{ref:d,iconNode:r,className:Fy(`lucide-${k2(n)}`,u),...s}));return a.displayName=`${n}`,a};/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],j2=Ee("Activity",E2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Vy=Ee("ArrowDown",C2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T2=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],_2=Ee("ArrowLeftRight",T2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const A2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],z2=Ee("ArrowRight",A2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const D2=[["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"}]],Ax=Ee("ArrowUpDown",D2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],O2=Ee("ArrowUp",M2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R2=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],L2=Ee("Bug",R2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const B2=[["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"}]],U2=Ee("Calendar",B2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const H2=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Yy=Ee("Camera",H2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const q2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ii=Ee("Check",q2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],V2=Ee("ChevronDown",F2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Y2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ld=Ee("ChevronRight",Y2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const G2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],eu=Ee("CircleAlert",G2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],zx=Ee("CircleCheck",Q2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const X2=[["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"}]],I2=Ee("CirclePause",X2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const K2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]],Z2=Ee("CirclePlay",K2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],md=Ee("CircleX",$2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const J2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],P2=Ee("Clock",J2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const W2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Vn=Ee("Copy",W2);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ew=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Gy=Ee("Download",ew);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],nw=Ee("ExternalLink",tw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lw=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],iw=Ee("EyeOff",lw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rw=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],pd=Ee("Eye",rw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aw=[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]],uw=Ee("FastForward",aw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ow=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],gd=Ee("FileCode",ow);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sw=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m3.2 12.9-.9-.4",key:"1i3dj5"}],["path",{d:"m3.2 15.1-.9.4",key:"1fvgj0"}],["path",{d:"M4.677 21.5a2 2 0 0 0 1.313.5H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2.5",key:"1yo3oz"}],["path",{d:"m4.9 11.2-.4-.9",key:"otmhb9"}],["path",{d:"m4.9 16.8-.4.9",key:"1b8z07"}],["path",{d:"m7.5 10.3-.4.9",key:"11k65u"}],["path",{d:"m7.5 17.7-.4-.9",key:"431x55"}],["path",{d:"m9.7 12.5-.9.4",key:"87sjan"}],["path",{d:"m9.7 15.5-.9-.4",key:"khqm91"}],["circle",{cx:"6",cy:"14",r:"3",key:"a1xfv6"}]],Ir=Ee("FileCog",sw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Jr=Ee("FileText",cw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Kf=Ee("File",fw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dw=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Ki=Ee("FolderOpen",dw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hw=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],us=Ee("Folder",hw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mw=[["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"}]],pw=Ee("Globe",mw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gw=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Kr=Ee("Hash",gw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xw=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Bd=Ee("House",xw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Qy=Ee("Info",yw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bw=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],Xy=Ee("Keyboard",bw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vw=[["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"}]],ww=Ee("Link2",vw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$i=Ee("LoaderCircle",kw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Nw=Ee("Lock",Sw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ew=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],jw=Ee("Moon",Ew);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cw=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Ji=Ee("Play",Cw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],_w=Ee("Plus",Tw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aw=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Ud=Ee("QrCode",Aw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],os=Ee("RefreshCw",zw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dw=[["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-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Mw=Ee("Rocket",Dw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ow=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Iy=Ee("Search",Ow);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rw=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lw=Ee("Settings",Rw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bw=[["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"}]],Uw=Ee("Sun",Bw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hw=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],xd=Ee("Terminal",Hw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qw=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Ky=Ee("Timer",qw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fw=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Zy=Ee("Trash2",Fw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vw=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],$y=Ee("TriangleAlert",Vw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yw=[["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"}]],Gw=Ee("User",Yw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qw=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Jy=Ee("Webhook",Qw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xw=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Iw=Ee("Workflow",Xw);/** + * @license lucide-react v0.477.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],nl=Ee("X",Kw);function Zw(n){if(n<60)return`${n}s`;const r=Math.floor(n/60),a=n%60;return`${r}m${a.toString().padStart(2,"0")}s`}function $w(n){if(!n)return{label:"",cut:!1};const r=n.replace(/\\/g,"/").split("/").filter(Boolean);return r.length===0?{label:n,cut:!1}:{label:r[r.length-1],cut:r.length>1}}function Jw({directory:n}){const[r,a]=z.useState(0);z.useEffect(()=>{a(0);const d=window.setInterval(()=>{a(f=>f+1)},1e3);return()=>window.clearInterval(d)},[]);const{label:u,cut:s}=$w(n);return h.jsxs("div",{"data-testid":"scan-status-strip",className:"flex min-w-0 items-center gap-1.5 text-[11px] text-ink-muted",children:[h.jsx($i,{className:"h-3 w-3 shrink-0 animate-spin text-chip-indigo-text motion-reduce:animate-none","aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 truncate",children:["Scanning",n&&h.jsxs(h.Fragment,{children:[" ",h.jsxs("span",{className:"font-mono text-ink-secondary",title:n,children:[s?"…/":"",u]})]})," — ",h.jsx("span",{className:"font-mono tabular-nums text-ink-secondary",children:Zw(r)})]})]})}function Pw({onExecute:n,scanning:r,hasSelection:a,fileCount:u,totalCount:s,scanningDirectory:d="",toastMessage:f,onToastDismiss:m}){const p=(f==null?void 0:f.kind)==="error";return h.jsxs("div",{className:"relative flex items-center justify-between border-t border-line bg-surface-glass px-4 py-2.5 text-xs transition-colors duration-200",children:[f&&h.jsx("div",{role:"status","aria-live":p?"assertive":"polite","aria-atomic":"true",className:`animate-toast-in absolute left-1/2 top-1/2 z-[var(--z-toast)] max-w-[min(80vw,640px)] -translate-x-1/2 -translate-y-1/2 rounded-xl border px-4 py-2 text-xs font-medium glass-panel-strong ${p?"pointer-events-auto flex max-w-[min(70vw,560px)] items-center gap-2.5 border-status-danger-border text-left text-ink":"pointer-events-none max-w-[min(70vw,560px)] text-center text-ink"}`,children:p?h.jsxs(h.Fragment,{children:[h.jsx(md,{className:"h-3.5 w-3.5 shrink-0 text-status-danger-text/80","aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 flex-1",children:f.message}),m&&h.jsx("button",{type:"button",onClick:m,"aria-label":"Dismiss error",className:"shrink-0 rounded-md p-0.5 text-status-danger-text/60 hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-danger-border transition-colors",children:h.jsx(nl,{className:"h-3.5 w-3.5"})})]}):f.message}),h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[r&&h.jsx(Jw,{directory:d}),s!==void 0&&s!==u&&h.jsxs("span",{"data-testid":"action-bar-count",className:"text-ink-muted",children:["Showing ",u," of ",s]})]}),h.jsxs("button",{onClick:n,disabled:!a||r,className:"flex shrink-0 items-center gap-2 rounded-xl border border-emerald-300/50 bg-gradient-to-b from-emerald-400/90 to-emerald-600/90 px-5 py-2 font-semibold text-white shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_8px_24px_-6px_rgb(16_185_129/0.55)] transition-[filter,box-shadow,transform] hover:-translate-y-px hover:brightness-110 hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_12px_30px_-6px_rgb(16_185_129/0.7)] disabled:opacity-40 disabled:hover:translate-y-0 disabled:hover:brightness-100 disabled:hover:shadow-[inset_0_1px_0_rgb(255_255_255/0.35),0_8px_24px_-6px_rgb(16_185_129/0.55)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400",children:[h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current"}),h.jsx("span",{children:"Execute"}),h.jsx("kbd",{className:"rounded bg-emerald-800/60 px-1.5 py-0.5 text-[10px] text-emerald-200 shadow-[inset_0_1px_0_rgb(255_255_255/0.12)]",children:"↵"})]})]})}function Ww({position:n,onClose:r,onLaunch:a,onLaunchWithArgs:u,onReveal:s,onOpenFolder:d,onOpenTerminal:f,onScanDirectory:m,onFilterFolder:p,onFilterExtension:x,onCopyPath:y,onCopyFilename:g,onCopyUri:w,onComputeHash:v,onVerifyHash:N,onProperties:D,onClearFile:O,onGenerateBarcode:C,showToast:J}){const[G,P]=z.useState(!1),[ae,U]=z.useState(""),R=z.useRef(null),X=z.useRef(null),ie=z.useRef(null),[L,le]=z.useState(null);if(z.useEffect(()=>{var ne;G&&((ne=X.current)==null||ne.showModal())},[G]),z.useLayoutEffect(()=>{if(!n){le(null);return}const ne=()=>{const S=R.current;if(!S)return;const Fe=S.getBoundingClientRect(),Ve=8;le({left:Math.max(Ve,Math.min(n.x,window.innerWidth-Fe.width-Ve)),top:Math.max(Ve,Math.min(n.y,window.innerHeight-Fe.height-Ve))})};return ne(),window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[n]),z.useEffect(()=>{if(!n)return;ie.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ne=window.requestAnimationFrame(()=>{var S,Fe;(Fe=(S=R.current)==null?void 0:S.querySelector("[role='menuitem']"))==null||Fe.focus()});return()=>{var S;window.cancelAnimationFrame(ne),(S=ie.current)==null||S.focus()}},[n]),!n)return null;const{file:V,x:ce,y:ye}=n,ue=()=>{u(V,ae),P(!1),r()},B=ne=>{const S=ne.lastIndexOf(".");return S!==-1?ne.slice(S):""},I=ne=>{const S=Math.max(ne.lastIndexOf("/"),ne.lastIndexOf("\\"));return S!==-1?ne.slice(0,S):ne},$=ne=>{const S=Math.max(ne.lastIndexOf("/"),ne.lastIndexOf("\\"));return S!==-1?ne.slice(0,S):""};return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[calc(var(--z-context-menu)-1)]",onClick:r,onContextMenu:ne=>{ne.preventDefault(),r()},"aria-hidden":"true"}),h.jsxs("div",{ref:R,role:"menu","aria-label":`Actions for ${V.filename}`,tabIndex:0,onKeyDown:ne=>{var Ve,A,_,re;["Escape","ArrowDown","ArrowUp","Home","End"].includes(ne.key)&&ne.stopPropagation();const S=Array.from(((Ve=R.current)==null?void 0:Ve.querySelectorAll("[role='menuitem']"))??[]),Fe=S.indexOf(document.activeElement);if(ne.key==="Escape")ne.preventDefault(),r();else if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const de=ne.key==="ArrowDown"?1:-1;(A=S[(Fe+de+S.length)%S.length])==null||A.focus()}else ne.key==="Home"?(ne.preventDefault(),(_=S[0])==null||_.focus()):ne.key==="End"&&(ne.preventDefault(),(re=S.at(-1))==null||re.focus())},className:"animate-modal-in fixed z-[var(--z-context-menu)] max-h-[calc(100dvh-16px)] w-56 max-w-[calc(100vw-16px)] overflow-y-auto rounded-lg border border-line bg-surface-glass py-1 text-xs text-ink shadow-2xl backdrop-blur-md",style:L??{left:ce,top:ye,visibility:"hidden"},children:[h.jsx("div",{className:"border-b border-line px-3 py-2 font-medium text-ink-muted truncate",children:V.filename}),h.jsxs("button",{role:"menuitem",onClick:()=>{a(V),r()},className:"flex w-full items-center gap-2 px-3 py-3 min-h-[44px] hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Launch ${V.filename}`,children:[h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current text-status-success-text group-hover:text-white"}),h.jsx("span",{children:"Launch"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{P(!0)},className:"flex w-full items-center gap-2 px-3 py-3 min-h-[44px] hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Launch ${V.filename} with arguments`,children:[h.jsx(Ji,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Launch with arguments..."})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{s(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Reveal ${V.filename} in file manager`,children:[h.jsx(pd,{className:"h-3.5 w-3.5 text-chip-sky-text group-hover:text-white"}),h.jsx("span",{children:"Reveal in File Manager"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{d(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Open folder containing ${V.filename}`,children:[h.jsx(Ki,{className:"h-3.5 w-3.5 text-chip-amber-text group-hover:text-white"}),h.jsx("span",{children:"Open Folder"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{f(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Open terminal in directory containing ${V.filename}`,children:[h.jsx(xd,{className:"h-3.5 w-3.5 text-status-success-text group-hover:text-white"}),h.jsx("span",{children:"Open Terminal in Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{C(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Generate QR Code",children:[h.jsx(Ud,{className:"h-3.5 w-3.5 text-chip-fuchsia-text group-hover:text-white"}),h.jsx("span",{children:"Generate QR Code"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=I(V.path);m(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Scan to Directory",children:[h.jsx(Ki,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Scan to Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=$(V.rel_path);ne&&p(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Filter view to folder ${V.filename} is in`,children:[h.jsx(gd,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Filter to Folder"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{const ne=B(V.filename);ne&&x(ne),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Filter view by extension ${B(V.filename)}`,children:[h.jsx(gd,{className:"h-3.5 w-3.5 text-chip-indigo-text group-hover:text-white"}),h.jsx("span",{children:"Filter by Extension"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{y(V,!1),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy full path of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Full Path"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{y(V,!0),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy path of ${V.filename} with forward slashes`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Path (Forward Slashes)"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{g(V,!1),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy filename of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Filename"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{g(V,!0),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy filename of ${V.filename} without extension`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Filename (no ext)"})]}),h.jsxs("button",{role:"menuitem",onClick:async()=>{const ne=I(V.path);r();try{await navigator.clipboard.writeText(ne),J==null||J(`Copied: ${ne}`)}catch(S){J==null||J(`Copy failed: ${(S==null?void 0:S.message)??S}`,"error")}},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":"Copy Directory",children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy Directory"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{w(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Copy URI of ${V.filename}`,children:[h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted group-hover:text-white"}),h.jsx("span",{className:"truncate",children:"Copy URI"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{v(V,"md5"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Compute MD5 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Compute MD5 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{v(V,"sha256"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Compute SHA256 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Compute SHA256 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{N(V,"md5"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Verify MD5 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Verify MD5 Hash"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{N(V,"sha256"),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Verify SHA256 hash of ${V.filename}`,children:[h.jsx(Kr,{className:"h-3.5 w-3.5 text-chip-purple-text group-hover:text-white"}),h.jsx("span",{children:"Verify SHA256 Hash"})]}),h.jsx("div",{className:"my-1 border-t border-line"}),h.jsxs("button",{role:"menuitem",onClick:()=>{D(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`View properties of ${V.filename}`,children:[h.jsx(pd,{className:"h-3.5 w-3.5 text-chip-sky-text group-hover:text-white"}),h.jsx("span",{children:"Properties"})]}),h.jsxs("button",{role:"menuitem",onClick:()=>{O(V),r()},className:"flex w-full items-center gap-2 px-3 py-1.5 hover:bg-indigo-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 active:scale-95 transition-transform group","aria-label":`Remove ${V.filename} from list`,children:[h.jsx(Zy,{className:"h-3.5 w-3.5 text-status-danger-text group-hover:text-white"}),h.jsx("span",{children:"Delete"})]})]}),G&&h.jsx("dialog",{ref:X,className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 rounded-xl","aria-labelledby":"args-modal-title",onClick:ne=>{ne.target===X.current&&P(!1)},onCancel:ne=>{ne.preventDefault(),P(!1)},children:h.jsxs("div",{className:"animate-modal-in w-96 rounded-xl border border-frame-line glass-panel p-4",children:[h.jsx("h3",{id:"args-modal-title",className:"mb-2 text-sm font-semibold text-ink",children:"Launch with Arguments"}),h.jsx("p",{className:"mb-3 text-xs text-ink-muted truncate",children:V.filename}),h.jsx("input",{type:"text",autoFocus:!0,placeholder:"Arguments (e.g. --verbose --port 80)",value:ae,onChange:ne=>U(ne.target.value),onKeyDown:ne=>{ne.key==="Enter"&&ue(),ne.key==="Escape"&&P(!1)},className:"mb-4 w-full rounded-md border border-line bg-elevated px-3 py-2 text-xs text-ink outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500","aria-label":"Command line arguments"}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{onClick:()=>P(!1),className:"rounded-md px-3 py-1.5 text-xs text-ink-muted hover:bg-elevated hover:text-ink focus:outline-none focus:ring-2 focus:ring-indigo-500","aria-label":"Cancel launch",children:"Cancel"}),h.jsx("button",{onClick:ue,className:"btn btn-primary px-3 py-1.5","aria-label":`Launch ${V.filename} with arguments`,children:"Launch"})]})]})})]})}var ek=Hy();const xl=8,pi=8,tk=400,Dx={top:"bottom",bottom:"top",left:"right",right:"left"},nk={top:"-bottom-1 left-1/2 -translate-x-1/2",bottom:"-top-1 left-1/2 -translate-x-1/2",left:"-right-1 top-1/2 -translate-y-1/2",right:"-left-1 top-1/2 -translate-y-1/2"},lk={top:"border-b border-r",bottom:"border-t border-l",left:"border-t border-r",right:"border-b border-l"},Mx=(n,r,a)=>{switch(n){case"top":return r.top-pi-a.h>=xl;case"bottom":return r.bottom+pi+a.h<=window.innerHeight-xl;case"left":return r.left-pi-a.w>=xl;default:return r.right+pi+a.w<=window.innerWidth-xl}},ik=(n,r,a)=>{if(n==="top"||n==="bottom"){const f=r.left+r.width/2-a.w/2,m=window.innerWidth-a.w-xl;return{x:Math.min(Math.max(f,xl),Math.max(xl,m))-f,y:0}}const u=r.top+r.height/2-a.h/2,s=window.innerHeight-a.h-xl;return{x:0,y:Math.min(Math.max(u,xl),Math.max(xl,s))-u}},Ue=({text:n,children:r,block:a=!0,placement:u="top",suppress:s=!1})=>{const d=z.useRef(null),f=z.useRef(null),m=z.useId(),p=z.useRef(null),[x,y]=z.useState(!1),[g,w]=z.useState(u),[v,N]=z.useState({x:0,y:0}),[D,O]=z.useState({left:-9999,top:-9999}),C=()=>{p.current!==null&&(window.clearTimeout(p.current),p.current=null)};z.useEffect(()=>{s&&(C(),y(!1))},[s]),z.useEffect(()=>()=>C(),[]);const J=z.useCallback(()=>{const U=d.current,R=f.current;if(!U||!R)return;const X=U.getBoundingClientRect(),ie={w:R.offsetWidth,h:R.offsetHeight},L=Mx(u,X,ie)?u:Mx(Dx[u],X,ie)?Dx[u]:u,le=ik(L,X,ie);w(L),N(le);const V=X.left+X.width/2,ce=X.top+X.height/2;O(L==="top"?{left:V,top:X.top-pi-ie.h}:L==="bottom"?{left:V,top:X.bottom+pi}:L==="left"?{left:X.left-pi-ie.w,top:ce}:{left:X.right+pi,top:ce})},[u]);z.useEffect(()=>{if(!x)return;const U=()=>y(!1);return window.addEventListener("resize",U),window.addEventListener("scroll",U,!0),()=>{window.removeEventListener("resize",U),window.removeEventListener("scroll",U,!0)}},[x]);const G=U=>{if(s)return;C();const R=()=>{J(),y(!0)};U?R():p.current=window.setTimeout(R,tk)},P=()=>{C(),y(!1)};z.useEffect(()=>{if(!x)return;const U=R=>{R.key==="Escape"&&y(!1)};return document.addEventListener("keydown",U,!0),()=>document.removeEventListener("keydown",U,!0)},[x]),z.useEffect(()=>{if(!x)return;const U=()=>!!document.querySelector('[role="dialog"][aria-modal="true"], dialog[open]');if(U()){y(!1);return}const R=new MutationObserver(()=>{U()&&y(!1)});return R.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["role","aria-modal","open","class"]}),()=>R.disconnect()},[x]);const ae={onMouseEnter:()=>G(!1),onMouseLeave:P,onFocus:()=>G(!0),onBlur:P,"aria-describedby":m};return h.jsxs("div",{ref:d,className:`group relative ${a?"flex min-w-0 flex-1 items-center":"inline-flex shrink-0 items-center"}`,onMouseEnter:()=>G(!1),onMouseLeave:P,onFocus:()=>G(!0),onBlur:P,children:[z.cloneElement(r,ae),ek.createPortal(h.jsxs("span",{ref:f,id:m,role:"tooltip",className:`pointer-events-none invisible fixed z-[var(--z-tooltip)] w-max max-w-[calc(100vw-16px)] rounded-md border border-line bg-elevated px-2 py-1 text-left text-[11px] leading-relaxed text-ink shadow-lg ${x?"visible opacity-100":"opacity-0"}`,style:{left:D.left,top:D.top,transform:g==="top"||g==="bottom"?`translateX(calc(-50% + ${v.x}px))`:`translateY(calc(-50% + ${v.y}px))`},children:[n,h.jsx("span",{className:`absolute h-2 w-2 rotate-45 border-line bg-elevated ${nk[g]} ${lk[g]}`,style:g==="top"||g==="bottom"?{left:`calc(50% - ${v.x}px)`}:void 0})]}),document.body)]})};function rk({isOpen:n,initialPath:r,onClose:a,onSelect:u}){const[s,d]=z.useState(null),[f,m]=z.useState(null),[p,x]=z.useState(""),[y,g]=z.useState(!1),[w,v]=z.useState(null),N=z.useRef(null),D=z.useRef(null),O=z.useRef(null);z.useEffect(()=>{var ae;if(!n){(ae=O.current)==null||ae.focus();return}O.current=document.activeElement instanceof HTMLElement?document.activeElement:null,v(null),C(r||"");const P=requestAnimationFrame(()=>{var U;return(U=D.current)==null?void 0:U.focus()});return()=>{var U;cancelAnimationFrame(P),(U=O.current)==null||U.focus()}},[n]);const C=async P=>{g(!0),v(null);try{const ae=await fetch(`/api/fs/browse?path=${encodeURIComponent(P)}`);if(!ae.ok)throw new Error("Failed to browse directory");const U=await ae.json();d(U),m(U.current_path),x(U.current_path)}catch(ae){v(ae.message||"Navigation failed")}finally{g(!1)}},J=()=>{const P=p.trim()||f;P&&(u(P),a())},G=P=>{var X;if(P.key==="Escape"){P.preventDefault(),a();return}if(P.key!=="Tab")return;const ae=(X=N.current)==null?void 0:X.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(ae!=null&&ae.length))return;const U=ae[0],R=ae[ae.length-1];P.shiftKey&&document.activeElement===U?(P.preventDefault(),R.focus()):!P.shiftKey&&document.activeElement===R&&(P.preventDefault(),U.focus())};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:a,children:h.jsxs("div",{ref:N,role:"dialog","aria-modal":"true","aria-labelledby":"directory-picker-title",onKeyDown:G,className:"animate-modal-in flex h-[min(84dvh,760px)] max-h-[calc(100dvh-1.5rem)] w-[min(94vw,960px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:P=>P.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ki,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"directory-picker-title",className:"text-sm font-semibold text-ink",children:"Select a directory"}),h.jsx("p",{className:"truncate font-mono text-xs text-ink-muted",children:(s==null?void 0:s.current_path)||""})]})]}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{type:"button",onClick:a,"aria-label":"Close directory picker",className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-ink-muted transition-colors hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4"})})})]}),h.jsxs("div",{className:"border-b border-line px-4 py-3 sm:px-5",children:[h.jsx("label",{htmlFor:"directory-picker-path",className:"mb-1.5 block text-xs font-medium text-ink-secondary",children:"Location"}),h.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[h.jsx("input",{ref:D,id:"directory-picker-path",type:"text",value:p,onChange:P=>x(P.target.value),onKeyDown:P=>{P.key==="Enter"&&C(p.trim())},placeholder:"/path/to/directory",className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-elevated px-2.5 font-mono text-sm text-ink outline-none placeholder:text-ink-faint transition-colors hover:bg-surface-strong focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-indigo-500/30"}),h.jsx("button",{type:"button",onClick:()=>C(p.trim()),className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-line bg-elevated px-3.5 text-sm font-medium text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Go"}),h.jsx(Ue,{text:"Home directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>C(""),"aria-label":"Home directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Bd,{className:"h-4 w-4"})})}),(s==null?void 0:s.parent_path)&&h.jsx(Ue,{text:"Parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>C(s.parent_path),"aria-label":"Parent directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Ld,{className:"h-4 w-4 rotate-180"})})})]})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3","aria-busy":y,children:y?h.jsxs("div",{className:"flex h-full items-center justify-center gap-2.5 text-sm text-ink-muted",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text"}),h.jsx("span",{role:"status",children:"Loading directories…"})]}):w?h.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-2.5 text-center",children:[h.jsx("p",{className:"text-sm text-status-danger-text",children:w}),h.jsx("button",{type:"button",onClick:()=>C(p||(s==null?void 0:s.current_path)||""),className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Retry"})]}):h.jsxs("ul",{className:"space-y-0.5",children:[s==null?void 0:s.items.filter(P=>P.is_dir).map(P=>h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>C(P.path),onDoubleClick:()=>{x(P.path),u(P.path),a()},className:`flex min-h-10 w-full items-center justify-between rounded-lg px-3 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${f===P.path?"bg-chip-indigo-bg text-chip-indigo-text":"text-ink-secondary hover:bg-elevated hover:text-ink"}`,children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx(us,{className:"h-5 w-5 shrink-0 text-chip-indigo-text"}),h.jsx("span",{className:"truncate",children:P.name})]}),f===P.path&&h.jsx(Ii,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"})]})},P.path)),(s==null?void 0:s.items.filter(P=>P.is_dir).length)===0&&h.jsxs("li",{className:"flex h-full min-h-36 flex-col items-center justify-center gap-2.5 text-center text-sm text-ink-muted",children:[h.jsx(Ki,{className:"h-7 w-7 text-ink-faint"}),"No subdirectories found"]})]})}),h.jsxs("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"mb-0.5 text-xs font-medium text-ink-muted",children:"Selected folder"}),h.jsx("p",{className:"truncate font-mono text-sm text-ink",title:f||p,children:f||p||"—"})]}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-1.5",children:[h.jsx("button",{type:"button",onClick:a,className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Cancel"}),h.jsxs("button",{type:"button",onClick:J,disabled:!p.trim(),className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ki,{className:"h-4 w-4"}),"Select folder"]})]})]})]})}):null}function ak({visible:n,onFileSelected:r}){const a=z.useRef(null);return n?h.jsxs("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-drop-overlay)] flex items-center justify-center bg-black/65 backdrop-blur-sm",onClick:()=>{var u;return(u=a.current)==null?void 0:u.click()},"data-testid":"drop-config-overlay",children:[h.jsx("input",{ref:a,type:"file",accept:".profiles,.profiles.yaml,.profiles.yml,.yaml,.yml",className:"hidden",onChange:u=>{var d;const s=(d=u.target.files)==null?void 0:d[0];s&&r(s),u.target.value=""}}),h.jsxs("div",{className:"rounded-xl border-2 border-dashed border-chip-indigo-border bg-surface px-8 py-6 text-center shadow-2xl",children:[h.jsx("span",{className:"mx-auto mb-3 grid h-9 w-9 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ir,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsx("p",{className:"text-sm font-semibold text-ink",children:"Drop configuration file"}),h.jsx("p",{className:"mt-1 text-xs text-ink-muted",children:".profiles, .profiles.yaml, .yml, .yaml — session-only preview"})]})]}):null}function uk({items:n,columnTemplate:r,resizePointerRef:a,resizeMovedRef:u}){return h.jsx("div",{className:"grid select-none items-center border-b border-l-2 border-l-transparent border-line/40 bg-surface/60 font-medium text-ink-muted shadow-sm backdrop-blur-md",role:"row","aria-rowindex":1,"data-file-list-header":!0,style:{gridTemplateColumns:r},children:n.map((s,d)=>{const f=!!(s.onSort&&s.sortKey),m=s.active?s.direction==="asc"?"ascending":"descending":"none";return h.jsxs("div",{role:"columnheader","data-column-key":s.sortKey,className:`group relative flex items-center gap-1.5 truncate px-3 py-2 ${f?"cursor-pointer hover:text-ink transition-colors":""} ${s.active?"text-ink":""}`,...f?{"aria-sort":m,tabIndex:0,onClick:s.onSort,onKeyDown:p=>{var x;(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),(x=s.onSort)==null||x.call(s))}}:{},children:[s.icon,h.jsx("span",{className:"truncate",children:s.label}),f?s.active?s.direction==="asc"?h.jsx(O2,{className:"ml-auto h-3 w-3 shrink-0 text-chip-indigo-text"}):h.jsx(Vy,{className:"ml-auto h-3 w-3 shrink-0 text-chip-indigo-text"}):h.jsx(Ax,{className:"ml-auto h-3 w-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-40 hover:opacity-40"}):d>0&&h.jsx(Ax,{className:"ml-auto h-3 w-3 shrink-0 opacity-40"}),s.canResize&&s.onResizeBy&&h.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":`Resize ${s.label} column`,"aria-valuemin":Zr,"aria-valuemax":ts,"aria-valuenow":s.width??s.defaultWidth??Po,"aria-valuetext":`${s.width??s.defaultWidth??Po} pixels wide`,title:"Drag to resize; use arrow keys or click either side to adjust",tabIndex:0,onClick:p=>{var g;p.preventDefault(),p.stopPropagation();const x=u.current;if(u.current=!1,x)return;const y=p.currentTarget.getBoundingClientRect();(g=s.onResizeBy)==null||g.call(s,p.clientX{p.preventDefault(),p.stopPropagation();const x=p.currentTarget.parentElement;u.current=!1,a.current={pointerId:p.pointerId,startX:p.clientX,startWidth:s.width??(x==null?void 0:x.getBoundingClientRect().width)??s.defaultWidth??Po,resizeTo:s.onResizeTo},p.currentTarget.setPointerCapture(p.pointerId)},onPointerMove:p=>{const x=a.current;if(!x||x.pointerId!==p.pointerId)return;const y=p.clientX-x.startX;Math.abs(y)>2&&(u.current=!0),x.resizeTo(x.startWidth+y)},onPointerUp:p=>{var x;((x=a.current)==null?void 0:x.pointerId)===p.pointerId&&(p.currentTarget.releasePointerCapture(p.pointerId),a.current=null,window.setTimeout(()=>{u.current=!1},0))},onPointerCancel:()=>{a.current=null,u.current=!1},onKeyDown:p=>{var x,y;p.stopPropagation(),p.key==="ArrowLeft"||p.key==="ArrowRight"?(p.preventDefault(),(x=s.onResizeBy)==null||x.call(s,p.key==="ArrowLeft"?-Yo:Yo)):(p.key==="Home"||p.key==="End")&&(p.preventDefault(),(y=s.onResizeTo)==null||y.call(s,p.key==="Home"?Zr:ts))},className:"absolute inset-y-0 right-0 z-10 w-3 cursor-col-resize touch-none border-r border-transparent transition-colors hover:border-indigo-400 focus-visible:border-indigo-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500"})]},d)})})}const Wn=28,Vo=12,Zf=500,Zr=80,ts=960,Po=160,Yo=24,Ox=44,Go={File:2,Path:3,FileName:1,Type:1,Version:1};function ok({files:n,totalCount:r,rawLoadedCount:a,onLoadMore:u,loadingMore:s=!1,scanning:d=!1,hasScanned:f=!1,activeDirectory:m="",recursive:p=!1,onDisableRecursive:x,onOpenDirectory:y,onOpenConfig:g,filterText:w,onClearFilter:v,prefilterNote:N,columnHeaders:D,columnNames:O,selectedIndex:C,onSelectIndex:J,onLaunch:G,onContextMenu:P,rowColors:ae,sort:U,onSortChange:R}){const X=["File"],ie=O.length>0?O:X,L=D.length>0?D:ie,le=Array.from({length:Math.max(ie.length,L.length)},(me,Re)=>({key:ie[Re]??X[0],header:L[Re]??ie[Re]??X[0]})),V=z.useRef(null),[ce,ye]=z.useState(0),[ue,B]=z.useState(600),[I,$]=z.useState(0),[ne,S]=z.useState({}),Fe=z.useRef(null),Ve=z.useRef(!1),A=ie.reduce((me,Re)=>me+(Go[Re]??1),1),_=(me,Re)=>{const Me=Math.min(ts,Math.max(Zr,Math.round(Re)));S(lt=>({...lt,[me]:Me}))},re=(me,Re)=>{var Z;const Me=Array.from(((Z=V.current)==null?void 0:Z.querySelectorAll("[data-column-key]"))??[]).find(oe=>oe.dataset.columnKey===me),lt=ne[me]??(Me==null?void 0:Me.getBoundingClientRect().width)??Po;_(me,lt+Re)},de=[`${Ox}px`,...ie.map(me=>ne[me]?`${ne[me]}px`:`minmax(${Zr}px, ${Go[me]??1}fr)`)].join(" "),ge=z.useRef(!1),Ae=z.useRef(null),ke=n.length,ze=a??ke,pe=r??ze,Ne=ze{const me=V.current;if(!me)return;const Re=new ResizeObserver(Me=>{for(const lt of Me)B(lt.contentRect.height),$(lt.contentRect.width)});return Re.observe(me),B(me.clientHeight||600),$(me.clientWidth||0),()=>Re.disconnect()},[]),z.useEffect(()=>{var oe;const me=V.current;if(!me||C<0||C>=ke)return;const Re=((oe=me.querySelector("[data-file-list-header]"))==null?void 0:oe.offsetHeight)??0,Me=Re+C*Wn,lt=Me+Wn;let Z=me.scrollTop;Meme.scrollTop+me.clientHeight&&(Z=lt-me.clientHeight),Z!==me.scrollTop&&(me.scrollTop=Z,ye(Z))},[C,ke]),z.useEffect(()=>{const me=V.current;if(!me)return;const Re=()=>{if(ge.current||!ln||!u)return;const Me=me.scrollTop+me.clientHeight,lt=ke*Wn;lt-MeMe&&(ge.current=!0,window.setTimeout(()=>{ge.current=!1},200),u())};return me.addEventListener("scroll",Re,{passive:!0}),window.addEventListener("scroll",Re,{passive:!0}),()=>{me.removeEventListener("scroll",Re),window.removeEventListener("scroll",Re)}},[n,ln,u,ke]),z.useEffect(()=>{if(ge.current||!ln||!u)return;const me=ke*Wn,Re=ce+ue;if(!(me-ReRe))return;const lt=`${ke}:${ze}:${pe}`;Ae.current=lt,u()});const kn=z.useCallback(me=>{ye(me.currentTarget.scrollTop)},[]),kt=Math.max(0,Math.floor(ce/Wn)-Vo),tt=Math.ceil(ue/Wn)+Vo*2,Ke=Math.min(ke,kt+tt),Jt=kt*Wn,Sn=(me,Re)=>{if(Re)return{className:"bg-chip-indigo-bg border-l-4 border-chip-indigo-border text-ink",style:{}};for(const[Me,lt]of ae)if(me.toLowerCase().includes(Me.toLowerCase()))return{className:"hover:bg-elevated border-l-4 text-ink",style:{borderLeftColor:lt,borderLeftWidth:"4px"}};return{className:"border-l-4 border-transparent text-ink-secondary hover:bg-elevated/60",style:{borderLeftColor:"transparent",borderLeftWidth:"4px"}}},Pt=(ln?ke+tt:ke)*Wn,Lt="btn btn-secondary px-3 py-1.5";return h.jsxs("div",{ref:V,onScroll:kn,className:"flex-1 overflow-auto bg-app text-xs transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-indigo-500 focus-visible:outline-offset-[-2px]","data-testid":"file-list","data-loaded-count":ze,"aria-busy":d,role:"grid","aria-label":"Discovered files","aria-rowcount":Math.max(pe,ke===0?1:0)+1,"aria-colcount":ie.length+1,"aria-activedescendant":ke>0?`file-row-${C}`:void 0,tabIndex:0,children:[h.jsx("div",{className:"sticky top-0 z-10",role:"presentation",children:h.jsx(uk,{columnTemplate:de,resizePointerRef:Fe,resizeMovedRef:Ve,items:[{label:"#",icon:h.jsx(gd,{className:"h-3.5 w-3.5"})},...le.map(({key:me,header:Re})=>({label:Re,weight:Go[me]??1,width:ne[me],defaultWidth:Math.min(ts,Math.max(Zr,Math.round((I-Ox)*(Go[me]??1)/A))),canResize:!0,onResizeBy:Me=>re(me,Me),onResizeTo:Me=>_(me,Me),sortKey:me,active:(U==null?void 0:U.column)===me,direction:U==null?void 0:U.direction,onSort:()=>{(U==null?void 0:U.column)!==me?R({column:me,direction:"asc"}):U.direction==="asc"?R({column:me,direction:"desc"}):R(null)}}))]})}),N&&ke>0&&h.jsxs("div",{role:"note","data-testid":"prefilter-note",className:"flex items-center gap-1.5 border-b border-line/40 bg-surface px-3 py-1 text-[11px] text-ink-faint",children:[h.jsx(Qy,{className:"h-3 w-3 shrink-0 text-ink-faint","aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 truncate",children:N})]}),ke===0?h.jsx("div",{role:"row","aria-rowindex":2,"data-testid":"file-list-empty",children:h.jsx("div",{role:"gridcell","aria-colspan":ie.length+1,className:"p-8 text-center text-ink-faint",children:d?h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text motion-reduce:animate-none"}),h.jsx("span",{children:"Scanning files..."})]}):!m.trim()&&g?h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsx("span",{children:"Select a directory first."}),h.jsx("button",{type:"button",onClick:g,className:Lt,children:"Choose configuration"})]}):f?w.trim()?h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsxs("span",{children:["No files match “",w,"”."]}),h.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[h.jsx("button",{type:"button",onClick:v,className:Lt,children:"Clear filter"}),p&&x&&h.jsx("button",{type:"button",onClick:x,className:Lt,children:"Turn off recursive"}),y&&h.jsx("button",{type:"button",onClick:y,className:Lt,children:"Open directory"})]})]}):h.jsxs("div",{className:"flex flex-col items-center gap-3",children:[h.jsx("span",{children:"No files found for the current directory and extension."}),h.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[p&&x&&h.jsx("button",{type:"button",onClick:x,className:Lt,children:"Turn off recursive"}),y&&h.jsx("button",{type:"button",onClick:y,className:Lt,children:"Open directory"})]})]}):h.jsx("span",{children:"Select a directory and scan to find files."})})}):h.jsxs("div",{className:"relative",style:{height:Pt},role:"rowgroup",children:[s&&h.jsx("div",{className:"pointer-events-none absolute left-1/2 top-2 z-20 -translate-x-1/2","aria-hidden":"true",children:h.jsx($i,{className:"h-4 w-4 animate-spin text-chip-indigo-text"})}),h.jsx("div",{style:{transform:`translateY(${Jt}px)`},"data-testid":"file-list-window",role:"presentation",children:n.slice(kt,Ke).map((me,Re)=>{const Me=kt+Re,lt=Me===C,Z=Sn(me.filename,lt);return h.jsxs("div",{id:`file-row-${Me}`,"data-row-index":Me,role:"row","aria-rowindex":Me+2,"aria-selected":lt,onClick:()=>{var oe;J(Me),(oe=V.current)==null||oe.focus()},onDoubleClick:()=>G(me),onContextMenu:oe=>P(oe,me,Me),className:`grid cursor-pointer items-center transition-colors ${Z.className}`,style:{...Z.style,height:Wn,gridTemplateColumns:de},children:[h.jsxs("div",{className:"flex items-center justify-end gap-1 px-3 font-mono text-ink-faint",children:[me.has_hook&&h.jsx("span",{title:me.hook_pattern?`Launch workflow: ${me.hook_pattern}`:"Launch workflow configured","aria-label":"Workflow hook attached",className:"inline-flex items-center text-status-warning-text hover:brightness-95",children:h.jsx(Jy,{className:"h-3 w-3 shrink-0"})}),h.jsx("span",{className:"hidden sm:inline",children:Me+1})]}),ie.map((oe,be)=>{const Te=me.column_values[oe]||(oe==="File"?me.filename:"-");return h.jsx("div",{role:"gridcell","data-column-key":oe,className:"truncate px-3 font-mono",style:{minWidth:Zr},title:oe==="Path"?me.path:Te,children:Te},be)})]},me.path||Me)})}),Ne&&h.jsxs("div",{className:"pointer-events-none absolute bottom-2 left-1/2 -translate-x-1/2 rounded-full border border-line bg-surface-strong px-3 py-1 text-[11px] text-ink-muted shadow","data-testid":"file-list-paging",children:[s?h.jsx(_2,{className:"mr-1.5 h-4 w-4 animate-spin motion-reduce:animate-none text-ink-muted"}):null,"(",ze," of ",pe," loaded)"]})]})]})}function yd({id:n,ariaLabel:r,value:a,options:u,onChange:s,placeholder:d,className:f="",inputClassName:m="",optionLabel:p=y=>y,onOpenChange:x}){const y=z.useId(),g=z.useRef(null),[w,v]=z.useState(!1),[N,D]=z.useState(""),[O,C]=z.useState(-1),J=u.filter(R=>p(R).toLocaleLowerCase().includes(N.toLocaleLowerCase())),G=O>=0&&J[O]?`${y}-option-${O}`:void 0;z.useEffect(()=>{const R=X=>{var ie;(ie=g.current)!=null&&ie.contains(X.target)||v(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]),z.useEffect(()=>{x==null||x(w)},[w,x]),z.useEffect(()=>{var R;O<0||(R=document.getElementById(`${y}-option-${O}`))==null||R.scrollIntoView({block:"nearest"})},[O,y]);const P=()=>{D(""),C(-1),v(!0)},ae=R=>{s(R),D(""),C(-1),v(!1)},U=R=>{if(R.key==="ArrowDown"){if(R.preventDefault(),!w){P(),C(0);return}C(X=>Math.min(X+1,J.length-1))}else if(R.key==="ArrowUp"){if(R.preventDefault(),!w){P(),C(J.length-1);return}C(X=>X<=0?J.length-1:X-1)}else R.key==="Enter"&&w&&J[O]!==void 0?(R.preventDefault(),ae(J[O])):R.key==="Escape"&&v(!1)};return h.jsxs("div",{ref:g,onBlur:R=>{var X;(X=g.current)!=null&&X.contains(R.relatedTarget)||v(!1)},className:`relative flex min-w-0 ${f}`,children:[h.jsx("input",{id:n,type:"text",role:"combobox","aria-label":r,"aria-autocomplete":"list","aria-expanded":w,"aria-controls":y,"aria-activedescendant":G,value:a,placeholder:d,onChange:R=>{s(R.target.value),D(R.target.value),C(-1),v(!0)},onKeyDown:U,className:`min-w-0 flex-1 rounded-l-md border border-line bg-elevated px-3 py-1.5 text-ink outline-none transition-colors hover:bg-surface-strong focus:border-indigo-500 ${m}`}),h.jsx("button",{type:"button","aria-label":`Show ${r.toLowerCase()} options`,"aria-expanded":w,title:`Show ${r.toLowerCase()} options`,onMouseDown:R=>R.preventDefault(),onClick:()=>w?v(!1):P(),className:"shrink-0 rounded-r-md border border-l-0 border-line bg-elevated px-2 text-ink-muted hover:bg-surface-strong hover:text-ink focus-visible:z-10 focus-visible:outline focus-visible:outline-2 focus-visible:outline-indigo-500 transition-colors",children:h.jsx(V2,{className:`h-3.5 w-3.5 transition-transform ${w?"rotate-180":""}`})}),w&&h.jsx("ul",{id:y,role:"listbox","aria-label":`${r} options`,className:"absolute left-0 top-full z-[var(--z-combobox-list)] mt-1 max-h-60 w-full min-w-48 overflow-y-auto rounded-md border border-line bg-surface py-1 text-ink shadow-xl",children:J.length>0?J.map((R,X)=>{const ie=p(R),L=X===O,le=R===a;return h.jsx("li",{id:`${y}-option-${X}`,role:"option","aria-selected":le,title:ie||void 0,onMouseEnter:()=>C(X),onMouseDown:V=>V.preventDefault(),onClick:()=>ae(R),className:`cursor-pointer truncate px-3 py-1.5 ${L?"bg-elevated text-ink":"text-ink-secondary"} ${le?"font-semibold":""}`,children:ie||"(No filter)"},`${R}-${X}`)}):h.jsx("li",{className:"px-3 py-1.5 text-ink-muted",children:"No matching presets"})})]})}function sk({title:n,release:r,directories:a,activeDirectory:u,onDirectoryChange:s,onBrowseDirectory:d,onGoToParentDirectory:f,onGoToHomeDirectory:m,onOpenActiveDirectory:p,onOpenTerminal:x}){const[y,g]=z.useState(!1);return h.jsxs("header",{className:"relative z-30 flex flex-wrap items-center gap-3 border-b border-line bg-app/90 px-5 py-2 text-xs backdrop-blur-xl shadow-xs transition-all duration-200",children:[h.jsx("div",{className:"flex shrink-0 items-center gap-3",children:h.jsxs("div",{className:"flex items-center gap-3.5",children:[h.jsxs("div",{className:"relative flex h-9 w-9 items-center justify-center rounded-xl bg-gradient-to-br from-chip-indigo-bg to-chip-purple-bg text-chip-indigo-text border border-chip-indigo-border shadow-xs",children:[h.jsx(xd,{className:"h-4 w-4"}),h.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-2.5 w-2.5 items-center justify-center rounded-full bg-emerald-500 ring-2 ring-app"})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h1",{className:"text-sm font-bold tracking-tight text-ink font-heading",children:"ProFiles"}),n&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-ink-faint",children:"/"}),h.jsx("span",{className:"text-xs font-medium text-chip-indigo-text bg-chip-indigo-bg px-2 py-0.5 rounded-md border border-chip-indigo-border/50",children:n})]})]}),h.jsxs("p",{className:"text-[11px] font-medium text-ink-muted tracking-wide mt-0.5",children:["Crafted by ",h.jsx("span",{className:"text-ink font-semibold",children:"Florent ALBANY"})," • ",h.jsxs("span",{className:"font-mono text-chip-indigo-text",children:["v",r||"0.11.0-rc.2"]})]})]})]})}),h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[h.jsxs("label",{className:"flex shrink-0 items-center gap-1.5 font-medium text-ink-secondary text-xs",children:[h.jsx(us,{className:"h-3.5 w-3.5 text-chip-indigo-text"}),h.jsx("span",{children:"Directory:"})]}),h.jsx(Ue,{text:"Select or type a directory path to scan files from.",suppress:y,children:h.jsx(yd,{id:"directory-combobox",ariaLabel:"Directory",value:u,options:a,onChange:s,onOpenChange:g,placeholder:"/path/to/directory",className:"w-full",inputClassName:"font-mono"})}),p&&h.jsx(Ue,{text:"Open the active directory in the OS file manager",block:!1,children:h.jsx("button",{type:"button",onClick:p,"aria-label":"Open active directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(z2,{className:"h-3.5 w-3.5"})})}),f&&h.jsx(Ue,{text:"Go to parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:f,"aria-label":"Go to parent directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Ld,{className:"h-3.5 w-3.5 rotate-180"})})}),d&&h.jsx(Ue,{text:"Browse for a folder on this system",block:!1,children:h.jsx("button",{type:"button",onClick:d,"aria-label":"Browse directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Ki,{className:"h-3.5 w-3.5"})})}),x&&h.jsx(Ue,{text:"Open the active directory in a terminal",block:!1,children:h.jsx("button",{type:"button",onClick:()=>x(u),"aria-label":"Open directory in terminal",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(xd,{className:"h-3.5 w-3.5"})})}),m&&h.jsx(Ue,{text:"Set directory to your home folder",block:!1,children:h.jsx("button",{type:"button",onClick:m,"aria-label":"Go to home directory",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Bd,{className:"h-3.5 w-3.5"})})})]})]})}function ck({message:n,onRetry:r,retrying:a=!1}){return h.jsx("div",{className:"flex flex-1 items-center justify-center p-8",role:"alert","data-testid":"init-error-panel",children:h.jsxs("div",{className:"w-full max-w-sm rounded-xl border border-line bg-surface p-6 text-center shadow-xl",children:[h.jsx("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full border border-status-danger-border bg-status-danger-bg",children:h.jsx(eu,{className:"h-5 w-5 text-status-danger-text/80"})}),h.jsx("h3",{className:"text-sm font-semibold text-ink",children:"Couldn't load the app"}),h.jsx("p",{className:"mt-1 break-words text-xs text-ink-secondary",children:n}),h.jsxs("button",{type:"button",onClick:r,disabled:a,className:"btn btn-primary mx-auto mt-4 px-3.5 py-1.5 font-semibold shadow-sm",children:[h.jsx(os,{className:`h-3.5 w-3.5 ${a?"animate-spin motion-reduce:animate-none":""}`}),h.jsx("span",{children:a?"Retrying...":"Retry"})]})]})})}const Rx=/"([^"]*)"|(\S+)/g,Lx=/"([^"]*)"/g,fk="Unmatched quote";function dk(n){const r=[];let a;for(Rx.lastIndex=0;(a=Rx.exec(n))!==null;){const f=a[1]!==void 0?a[1]:a[2];f&&f.trim()&&r.push(f)}let u="",s=0;Lx.lastIndex=0;let d;for(;(d=Lx.exec(n))!==null;)u+=n.slice(s,d.index),s=d.index+d[0].length;return u+=n.slice(s),{terms:r,error:u.includes('"')?fk:null}}function Py(n){const r=n.trim();if(!r)return{error:null,groups:[]};const{terms:a,error:u}=dk(r);if(a.length===0)return{error:u,groups:[]};const s=[];let d={includes:[],excludes:[]};for(const f of a){if(f.toUpperCase()==="OR"){s.push(d),d={includes:[],excludes:[]};continue}f==="-"||f==="+"||(f.startsWith("-")&&f.length>1?d.excludes.push(f.slice(1)):f.startsWith("+")&&f.length>1?d.includes.push(f.slice(1)):d.includes.push(f))}return s.push(d),{error:u,groups:s}}const hk=256,Gi=new Map;function Bx(n){return n.toLowerCase()}function mk(n){const r=Gi.get(n);if(r)return Gi.delete(n),Gi.set(n,r),r;const{groups:a}=Py(n),u={groups:a.map(s=>({includes:s.includes.map(Bx),excludes:s.excludes.map(Bx)}))};if(Gi.size>=hk){const s=Gi.keys().next().value;s!==void 0&&Gi.delete(s)}return Gi.set(n,u),u}function pk(n,r){return r.includes.every(a=>n.includes(a))&&!r.excludes.some(a=>n.includes(a))}function gk(n,r){const{groups:a}=mk(r);if(a.length===0)return!0;const u=n.toLowerCase();return a.some(s=>pk(u,s))}function xk({query:n,visible:r}){if(!r)return null;const a=Py(n);return a.error?h.jsx("div",{"data-testid":"filter-syntax-helper",className:"pointer-events-none absolute left-0 right-0 top-full z-[var(--z-syntax-helper)] mt-1 rounded-md border border-status-danger-border bg-surface-strong px-3 py-2 text-[11px] leading-5 text-status-danger-text/90 shadow-xl",children:a.error}):a.groups.length===0?null:h.jsxs("div",{"data-testid":"filter-syntax-helper",className:"pointer-events-none absolute left-0 right-0 top-full z-[var(--z-syntax-helper)] mt-1 rounded-md border border-line bg-surface-strong px-3 py-2 text-[11px] leading-5 text-ink-secondary shadow-xl",children:[h.jsx("span",{className:"mr-1.5 align-[1px] text-[10px] uppercase tracking-wide text-ink-muted",children:"reads as"}),a.groups.map((u,s)=>h.jsxs("span",{"data-testid":"filter-syntax-group",children:[s>0&&h.jsx("span",{className:"mx-1 font-mono text-chip-indigo-text",children:"OR"}),u.includes.map((d,f)=>h.jsxs("span",{children:[f>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),h.jsx("span",{className:"font-mono text-chip-indigo-text",children:d})]},`i-${f}`)),u.includes.length>0&&u.excludes.length>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),u.excludes.map((d,f)=>h.jsxs("span",{children:[f>0&&h.jsx("span",{className:"text-ink-muted",children:" · "}),h.jsx("span",{className:"text-ink-muted",children:"✕ "}),h.jsx("span",{className:"font-mono text-status-danger-text/70 line-through",children:d})]},`x-${f}`))]},s))]})}const Ux=h.jsxs("span",{className:"flex flex-col gap-1 whitespace-nowrap text-left",children:[h.jsx("span",{className:"font-semibold",children:"Supported operators"}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"a b"})," — AND (both terms)"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"a OR b"})," — either term"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"-a"})," — NOT (exclude)"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:"+a"})," — force include"]}),h.jsxs("span",{children:[h.jsx("code",{className:"font-mono text-chip-indigo-text",children:'"a b"'})," — exact phrase"]})]});function yk({extensions:n,activeExtension:r,onExtensionChange:a,filterOptions:u,filterText:s,onFilterTextChange:d,recursive:f,onRecursiveChange:m,onScan:p,scanning:x,barcodeMode:y,onBarcodeToggle:g,onCameraBarcodeClick:w,autoRescanActive:v,onTimerClick:N}){const[D,O]=z.useState(!1),[C,J]=z.useState(!1),[G,P]=z.useState(!1);return h.jsxs("div",{className:"flex w-full flex-wrap items-center gap-3 border-b border-line bg-surface-glass p-3 text-xs",children:[h.jsx(Ue,{text:Ux,suppress:C,children:h.jsxs("div",{className:"relative min-w-0 flex-1 basis-64",onFocusCapture:ae=>{ae.target.tagName==="INPUT"&&O(!0)},onBlurCapture:ae=>{ae.target.tagName==="INPUT"&&O(!1)},children:[h.jsx(Iy,{className:"pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-ink-secondary"}),h.jsx(yd,{id:"filter-combobox",ariaLabel:"File filter",value:s,options:u||[],onChange:d,onOpenChange:J,placeholder:"Filter files: keyword, a OR b, -tag, exact phrase...",className:"w-full",inputClassName:"pl-9 pr-3",optionLabel:ae=>ae||"(No filter)"}),h.jsx(xk,{query:s,visible:D&&!C&&s.trim().length>0})]})}),h.jsx(Ue,{text:Ux,block:!1,suppress:G,children:h.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[h.jsx("span",{className:"text-ink-muted",children:"Ext:"}),h.jsx(yd,{id:"extension-combobox",ariaLabel:"Extension filter",value:r,options:n,onChange:a,onOpenChange:P,placeholder:".py OR .toml",className:"w-44",inputClassName:"font-mono px-2.5"})]})}),h.jsx(Ue,{text:"Include subdirectories when scanning",block:!1,children:h.jsxs("label",{className:"flex shrink-0 cursor-pointer select-none items-center gap-1.5 text-ink-secondary",children:[h.jsx("input",{type:"checkbox",checked:f,onChange:ae=>m(ae.target.checked),className:"rounded border-line text-chip-indigo-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-1 focus-visible:ring-offset-app"}),h.jsx("span",{children:"Recursive"})]})}),h.jsx(Ue,{text:"Run the scan with the current criteria (Enter)",block:!1,children:h.jsxs("button",{onClick:p,disabled:x,className:"btn btn-primary shrink-0 px-3.5 py-1.5 font-semibold shadow-sm",children:[x?h.jsx(os,{className:"h-3.5 w-3.5 animate-spin motion-reduce:animate-none"}):h.jsx(Ji,{className:"h-3.5 w-3.5 fill-current"}),h.jsx("span",{children:x?"Scanning...":"Scan"})]})}),h.jsx(Ue,{text:v?"Auto-rescan is active. Click to configure.":"Configure periodic auto-rescan (hot-folder mode)",block:!1,children:h.jsx("button",{type:"button",onClick:N,"aria-label":"Configure timer / auto-rescan",className:`flex shrink-0 items-center justify-center rounded-md border p-1.5 text-ink-secondary hover:border-indigo-500 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 transition-colors ${v?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated"}`,children:h.jsx(Ky,{className:`h-3.5 w-3.5 ${v?"animate-pulse":""}`})})}),h.jsx(Ue,{text:"Toggle barcode scanner mode (USB HID). When active, scan a barcode to auto-fill controls and trigger a scan.",block:!1,children:h.jsx("button",{type:"button",onClick:g,"aria-label":y?"Disable barcode mode":"Enable barcode mode",className:`flex shrink-0 items-center justify-center rounded-md border p-1.5 text-ink-secondary hover:border-indigo-500 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 transition-colors ${y?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated"}`,children:h.jsx(Ud,{className:`h-3.5 w-3.5 ${y?"animate-pulse":""}`})})}),w&&h.jsx(Ue,{text:"Scan barcode or QR code using webcam / camera (Ctrl + Shift + B)",block:!1,children:h.jsx("button",{type:"button",onClick:w,"aria-label":"Scan barcode with camera",className:"btn btn-secondary shrink-0 p-1.5",children:h.jsx(Yy,{className:"h-3.5 w-3.5"})})})]})}const bk=2e3,vk=500,wk=[{value:null,label:"ALL"},{value:"DEBUG",label:"DEBUG"},{value:"INFO",label:"INFO"},{value:"WARNING",label:"WARNING"},{value:"ERROR",label:"ERROR"},{value:"CRITICAL",label:"CRITICAL"}],Hx={DEBUG:{icon:L2,className:"text-chip-sky-text"},INFO:{icon:Qy,className:"text-status-success-text"},WARNING:{icon:$y,className:"text-status-warning-text"},ERROR:{icon:md,className:"text-status-danger-text"},CRITICAL:{icon:md,className:"text-status-danger-text"},UNKNOWN:{icon:Jr,className:"text-ink-faint"}};function kk({isOpen:n,onClose:r,onOpenExternally:a}){const[u,s]=z.useState([]),[d,f]=z.useState("profiles.log"),[m,p]=z.useState(0),[x,y]=z.useState(null),[g,w]=z.useState(""),[v,N]=z.useState(!1),[D,O]=z.useState(!0),[C,J]=z.useState(null),[G,P]=z.useState(!0),ae=z.useRef(null),U=z.useRef(null),R=z.useRef(null),X=z.useRef(null),ie=z.useRef(D),L=z.useRef({level:x,search:g});ie.current=D,L.current={level:x,search:g};const le=z.useCallback(async()=>{const{level:B,search:I}=L.current;N(!0);try{const $=await i2({limit:vk,level:B,search:I});s($.entries),f($.path),p($.size_bytes),J(null)}catch($){J(($==null?void 0:$.message)||"Failed to read the log file")}finally{N(!1)}},[]);z.useEffect(()=>{n&&le()},[n,le]),z.useEffect(()=>{if(!n||!D)return;const B=window.setInterval(()=>{le()},bk);return()=>window.clearInterval(B)},[n,D,le]),z.useEffect(()=>{if(!n)return;const B=window.setTimeout(()=>void le(),250);return()=>window.clearTimeout(B)},[n,x,g,le]),z.useEffect(()=>{if(!G)return;const B=R.current;B&&(B.scrollTop=B.scrollHeight)},[u,G]),z.useEffect(()=>{if(!n)return;const B=document.activeElement instanceof HTMLElement?document.activeElement:null,I=requestAnimationFrame(()=>{var $;return($=U.current)==null?void 0:$.focus()});return()=>{cancelAnimationFrame(I),B==null||B.focus()}},[n]);const V=B=>{var S;if(B.key==="Escape"){B.preventDefault(),r();return}if(B.key!=="Tab")return;const I=(S=ae.current)==null?void 0:S.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(I!=null&&I.length))return;const $=I[0],ne=I[I.length-1];B.shiftKey&&document.activeElement===$?(B.preventDefault(),ne.focus()):!B.shiftKey&&document.activeElement===ne&&(B.preventDefault(),$.focus())},ce=()=>{const B=R.current;if(!B)return;const I=B.scrollHeight-B.scrollTop-B.clientHeight<24;P(I)},ye=async()=>{try{await navigator.clipboard.writeText(u.map(B=>B.raw).join(` +`))}catch{}},ue=z.useMemo(()=>{const B=new Map;for(const I of u)B.set(I.level,(B.get(I.level)??0)+1);return B},[u]);return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:r,children:h.jsxs("div",{ref:ae,role:"dialog","aria-modal":"true","aria-labelledby":"log-viewer-title",onKeyDown:V,className:"animate-modal-in flex h-[min(84dvh,760px)] w-[clamp(560px,85vw,1500px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:B=>B.stopPropagation(),children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-line px-5 py-4 sm:px-6",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Jr,{className:"h-5 w-5 text-chip-indigo-text","aria-hidden":"true"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"log-viewer-title",className:"text-base font-semibold text-ink",children:"Application logs"}),h.jsxs("p",{className:"truncate font-mono text-xs text-ink-muted",children:[d,h.jsxs("span",{className:"text-ink-faint",children:[" · ",qx(m)]})]})]})]}),h.jsxs("div",{className:"relative min-w-[220px] flex-1",children:[h.jsx(Iy,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-faint","aria-hidden":"true"}),h.jsx("input",{ref:X,type:"search",value:g,onChange:B=>w(B.target.value),placeholder:"Filter log lines…","aria-label":"Filter log lines",className:"w-full rounded-lg border border-line bg-elevated py-1.5 pl-8 pr-2.5 font-mono text-xs text-ink placeholder:text-ink-faint focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400"})]}),h.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[h.jsx(Ue,{text:D?"Pause live tail":"Resume live tail",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>O(B=>!B),"aria-pressed":D,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${D?"border-status-success-border bg-status-success-bg text-status-success-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx("span",{className:`h-2 w-2 rounded-full ${D?"bg-emerald-400":"bg-ink-faint"}`,"aria-hidden":"true"}),D?"Live":"Paused"]})}),h.jsx(Ue,{text:"Refresh now",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void le(),disabled:v,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(os,{className:`h-4 w-4 ${v?"animate-spin":""}`,"aria-hidden":"true"})})}),h.jsx(Ue,{text:"Copy visible lines",block:!1,children:h.jsx("button",{type:"button",onClick:()=>void ye(),disabled:u.length===0,className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Vn,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Open log file in the default application",block:!1,children:h.jsx("button",{type:"button",onClick:()=>{a==null||a(),r()},className:"rounded-lg border border-line bg-elevated p-2 text-ink-muted hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nw,{className:"h-4 w-4","aria-hidden":"true"})})}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{ref:U,type:"button",onClick:r,className:"rounded-lg p-2 text-ink-muted hover:bg-hover-surface hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4","aria-hidden":"true"})})})]})]}),h.jsxs("div",{ref:R,onScroll:ce,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain bg-app px-2 py-2 font-mono text-xs leading-relaxed sm:px-3",children:[h.jsxs("div",{className:"sticky top-0 z-10 mb-1 flex items-center gap-2 rounded-md border border-line/40 bg-surface/60 px-2 py-1 text-[10px] font-bold uppercase tracking-wider text-ink-muted shadow-sm backdrop-blur-md",role:"row",children:[h.jsx("span",{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink/70",children:"Time"}),h.jsx("span",{className:"w-[52px] shrink-0 text-ink/70",children:"Level"}),h.jsx("span",{className:"w-[150px] shrink-0 text-ink/70",children:"Source"}),h.jsx("span",{className:"min-w-0 flex-1 text-ink/70",children:"Message"})]}),C&&h.jsx("p",{role:"alert",className:"px-3 py-6 text-center text-xs text-status-danger-text",children:C}),!C&&u.length===0&&!v&&h.jsx("p",{className:"px-3 py-6 text-center text-xs text-ink-faint",children:"No log entries match the current filters."}),h.jsx("ul",{className:"space-y-0.5",children:u.map((B,I)=>{const $=Hx[B.level]??Hx.UNKNOWN,ne=$.icon,S=B.level==="ERROR"||B.level==="CRITICAL";return h.jsxs("li",{className:`group flex items-start gap-2 rounded px-2 py-1 ${S?"bg-status-danger-bg/40":"hover:bg-elevated/50"}`,children:[h.jsx("span",{className:$.className,children:h.jsx(ne,{className:"mt-0.5 h-3.5 w-3.5","aria-hidden":"true"})}),h.jsx("span",{className:"w-[138px] shrink-0 text-ink-faint",children:B.timestamp}),h.jsx("span",{className:`w-[52px] shrink-0 text-[10px] font-semibold ${$.className}`,children:B.level}),h.jsx("span",{className:"w-[150px] shrink-0 truncate text-ink-faint",title:B.source,children:B.source}),h.jsx("span",{className:"min-w-0 flex-1 break-words text-ink-secondary",children:B.message})]},`${I}-${B.raw}`)})})]}),h.jsx("div",{className:"border-t border-line/60 bg-elevated/50 px-5 py-2.5 text-[11px] text-ink-faint shadow-sm backdrop-blur-md sm:px-6",children:h.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[h.jsx("span",{className:"mr-auto min-w-0 max-w-full basis-full truncate sm:basis-auto",role:"status","aria-atomic":"true",children:v&&u.length===0?"Loading log entries…":`${u.length} of ${qx(m)} shown`}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"flex overflow-hidden rounded-lg border border-line/60 text-[11px] backdrop-blur-sm",role:"group","aria-label":"Filter by log level",children:wk.map(B=>{const I=x===B.value,$=B.value?ue.get(B.value)??0:u.length;return h.jsxs("button",{type:"button",onClick:()=>y(B.value),"aria-pressed":I,title:B.value?`Show ${B.value} and above`:"Show all levels",className:`flex items-center gap-1 px-2.5 py-1 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${I?"bg-indigo-600 text-white":"text-ink-muted hover:bg-elevated hover:text-ink"}`,children:[B.label,h.jsx("span",{className:I?"text-chip-indigo-text":"text-ink-faint",children:$})]},B.label)})}),h.jsx(Ue,{text:"Scroll to the newest entry",block:!1,children:h.jsxs("button",{type:"button",onClick:()=>P(!0),"aria-pressed":G,className:`flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${G?"border-chip-indigo-border bg-chip-indigo-bg text-chip-indigo-text":"border-line bg-elevated text-ink-muted hover:text-ink"}`,children:[h.jsx(Vy,{className:"h-3.5 w-3.5","aria-hidden":"true"}),h.jsx("span",{className:"hidden sm:inline",children:"Follow tail"})]})})]}),h.jsxs("span",{className:"hidden items-center gap-1.5 lg:flex",children:[h.jsx("span",{className:"hidden sm:inline",children:"Ctrl + Shift + L"}),h.jsx("span",{children:"opens externally"})]})]})})]})}):null}function qx(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const Fx='button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], video[tabindex], [tabindex]:not([tabindex="-1"])';function Pr({isOpen:n,onClose:r,dialogRef:a,initialFocusRef:u}){return z.useEffect(()=>{if(!n)return;const s=document.activeElement instanceof HTMLElement?document.activeElement:null,d=requestAnimationFrame(()=>{var p;const m=(u==null?void 0:u.current)??((p=a.current)==null?void 0:p.querySelector(Fx))??a.current;m==null||m.focus()}),f=m=>{if(m.key!=="Tab")return;const p=a.current;if(!p)return;const x=Array.from(p.querySelectorAll(Fx));if(!x.length)return;const y=x[0],g=x[x.length-1],w=document.activeElement;if(!(w instanceof Node&&p.contains(w))){m.preventDefault(),(m.shiftKey?g:y).focus();return}m.shiftKey&&(w===y||w===p)?(m.preventDefault(),g.focus()):!m.shiftKey&&(w===g||w===p)&&(m.preventDefault(),y.focus())};return window.addEventListener("keydown",f,!0),()=>{cancelAnimationFrame(d),s==null||s.focus(),window.removeEventListener("keydown",f,!0)}},[n]),s=>{s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),r())}}function Sk({isOpen:n,onClose:r}){const a=z.useRef(null),u=Pr({isOpen:n,onClose:r,dialogRef:a});if(!n)return null;const s=[{key:"F5",desc:"Refresh / re-scan file list"},{key:"Ctrl + R",desc:"Reload configuration & scan"},{key:"Enter",desc:"Execute / launch selected file"},{key:"P",desc:"Open properties for selected file"},{key:"↑ / ↓",desc:"Navigate file list"},{key:"Home / End",desc:"Jump to first / last file"},{key:"PageUp / PageDown",desc:"Page through the file list"},{key:"Ctrl + D",desc:"Focus Directory field"},{key:"Ctrl + E",desc:"Focus Extension field"},{key:"Ctrl + F",desc:"Focus Filter / Search field"},{key:"Ctrl + L",desc:"Focus File List"},{key:"Ctrl + Shift + L",desc:"Open the log viewer"},{key:"Ctrl + ,",desc:"Open config file"},{key:"Ctrl + Shift + T",desc:"Toggle theme (Dark / Light)"},{key:"Ctrl + B",desc:"Toggle barcode scanner mode"},{key:"Ctrl + Shift + B",desc:"Open webcam / camera barcode scanner"},{key:"Ctrl + T",desc:"Open auto-rescan timer modal"},{key:"Ctrl + H",desc:"Set directory to home folder"},{key:"? or Ctrl + /",desc:"Show keyboard shortcuts"},{key:"Y / S / N",desc:"Answer workflow guard: Yes / Skip / No (prompt open)"},{key:"Enter",desc:"Confirm active workflow prompt (prompt open)"},{key:"Escape",desc:"Close dialogs / context menu"}];return h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",children:h.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard Shortcuts",onKeyDown:u,className:"animate-modal-in w-[450px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Xy,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Keyboard Shortcuts"})]}),h.jsx("button",{onClick:r,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"max-h-[60vh] space-y-2 overflow-y-auto pr-1 text-xs",children:s.map(({key:d,desc:f})=>h.jsxs("div",{className:"flex items-center justify-between rounded-lg bg-elevated/50 px-3 py-2",children:[h.jsx("span",{className:"text-ink-secondary",children:f}),h.jsx("kbd",{className:"rounded bg-app px-2 py-0.5 font-mono text-[11px] font-semibold text-chip-indigo-text border border-line",children:d})]},d))}),h.jsx("div",{className:"mt-5 flex justify-end",children:h.jsx("button",{onClick:r,className:"btn btn-primary rounded-lg px-4 py-2 font-semibold",children:"Close"})})]})})}function Nk({isOpen:n,activeConfigPath:r,configExists:a=!0,onClose:u,onLoaded:s}){const[d,f]=z.useState(null),[m,p]=z.useState(""),[x,y]=z.useState(null),[g,w]=z.useState(!1),[v,N]=z.useState(null),D=z.useRef(null),O=z.useRef(null),C=z.useRef(null),J=a===!1;z.useEffect(()=>{var le;if(!n){(le=C.current)==null||le.focus();return}C.current=document.activeElement instanceof HTMLElement?document.activeElement:null,N(null);const R=r??"",X=Math.max(R.lastIndexOf("/"),R.lastIndexOf("\\")),ie=X>0?R.slice(0,X):"";G(ie);const L=requestAnimationFrame(()=>{var V;return(V=O.current)==null?void 0:V.focus()});return()=>{var V;cancelAnimationFrame(L),(V=C.current)==null||V.focus()}},[n,r]);const G=async R=>{w(!0),N(null);try{const X=await s2(R);f(X),p(X.current_path),r&&X.items.some(ie=>ie.path===r)?y(r):y(null)}catch(X){N(X.message||"Navigation failed")}finally{w(!1)}},P=R=>{var le;if(R.key==="Escape"){R.preventDefault(),u();return}if(R.key!=="Tab")return;const X=(le=D.current)==null?void 0:le.querySelectorAll('button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(!(X!=null&&X.length))return;const ie=X[0],L=X[X.length-1];R.shiftKey&&document.activeElement===ie?(R.preventDefault(),L.focus()):!R.shiftKey&&document.activeElement===L&&(R.preventDefault(),ie.focus())},ae=async()=>{var X;const R=x||(((X=d==null?void 0:d.items.find(ie=>ie.is_config))==null?void 0:X.path)??null);if(!R){N("Select a configuration file to load.");return}try{w(!0);const ie=await r2(R);s(ie),u()}catch(ie){N(ie.message||"Unable to load configuration")}finally{w(!1)}},U=async()=>{const R=(m||(d==null?void 0:d.current_path)||"").trim();if(!R){N("Choose a directory before creating a configuration.");return}try{w(!0);const X=await o2(R);s(X),u()}catch(X){N(X.message||"Unable to create configuration")}finally{w(!1)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/65 p-3 backdrop-blur-sm sm:p-6",onClick:u,children:h.jsxs("div",{ref:D,role:"dialog","aria-modal":"true","aria-labelledby":"load-config-title",onKeyDown:P,className:"animate-modal-in flex h-[min(84dvh,760px)] max-h-[calc(100dvh-1.5rem)] w-[min(94vw,960px)] min-h-0 flex-col overflow-hidden rounded-xl border border-frame-line glass-panel sm:rounded-2xl",onClick:R=>R.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-line px-4 py-3 sm:px-5",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-chip-indigo-bg",children:h.jsx(Ir,{className:"h-5 w-5 text-chip-indigo-text"})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("h2",{id:"load-config-title",className:"text-sm font-semibold text-ink",children:J?"Create configuration":"Load configuration"}),h.jsx("p",{className:"truncate font-mono text-xs text-ink-muted",children:(d==null?void 0:d.current_path)||""})]})]}),h.jsx(Ue,{text:"Close",block:!1,children:h.jsx("button",{type:"button",onClick:u,"aria-label":"Close configuration modal",className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-ink-muted transition-colors hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(nl,{className:"h-4 w-4"})})})]}),J&&h.jsx("div",{className:"border-b border-line bg-chip-indigo-bg/20 px-4 py-3 text-xs text-ink-secondary",children:"No configuration file was found. Create one here?"}),h.jsxs("div",{className:"border-b border-line px-4 py-3 sm:px-5",children:[h.jsx("label",{htmlFor:"config-path-input",className:"mb-1.5 block text-xs font-medium text-ink-secondary",children:"Configuration directory"}),h.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[h.jsx("input",{ref:O,id:"config-path-input",type:"text",value:m,onChange:R=>p(R.target.value),onKeyDown:R=>{R.key==="Enter"&&G(m.trim())},placeholder:"/path/to/directory",className:"h-10 min-w-0 flex-1 rounded-lg border border-line bg-elevated px-2.5 font-mono text-sm text-ink outline-none placeholder:text-ink-faint transition-colors hover:bg-surface-strong focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-indigo-500/30"}),h.jsx("button",{type:"button",onClick:()=>G(m.trim()),className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg border border-line bg-elevated px-3.5 text-sm font-medium text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Go"}),h.jsx(Ue,{text:"Home directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(""),"aria-label":"Home directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Bd,{className:"h-4 w-4"})})}),(d==null?void 0:d.parent_path)&&h.jsx(Ue,{text:"Parent directory",block:!1,children:h.jsx("button",{type:"button",onClick:()=>G(d.parent_path),"aria-label":"Parent directory",className:"grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-line bg-elevated text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:h.jsx(Ld,{className:"h-4 w-4 rotate-180"})})})]})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3","aria-busy":g,children:g?h.jsxs("div",{className:"flex h-full items-center justify-center gap-2.5 text-sm text-ink-muted",children:[h.jsx($i,{className:"h-5 w-5 animate-spin text-chip-indigo-text"}),h.jsx("span",{role:"status",children:"Loading configuration files…"})]}):v?h.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-2.5 text-center",children:[h.jsx("p",{className:"text-sm text-status-danger-text",children:v}),h.jsx("button",{type:"button",onClick:()=>G(m||(d==null?void 0:d.current_path)||""),className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Retry"})]}):h.jsxs("ul",{className:"space-y-1",children:[d==null?void 0:d.items.map(R=>{if(R.is_dir)return h.jsx("li",{children:h.jsx("button",{onClick:()=>G(R.path),onDoubleClick:()=>G(R.path),className:"flex w-full items-center justify-between rounded-md px-3 py-1.5 text-left text-xs text-ink-secondary hover:bg-elevated",children:h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(us,{className:"h-3.5 w-3.5 text-chip-indigo-text"}),R.name]})})},R.path);const X=x===R.path;return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>y(R.path),"aria-pressed":X,className:`flex w-full items-center justify-between rounded-lg px-3 py-1.5 text-left text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-indigo-400 ${X?"bg-chip-indigo-bg text-chip-indigo-text":"text-ink-secondary hover:bg-elevated hover:text-ink"}`,children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[h.jsx(Jr,{className:"h-5 w-5 shrink-0 text-chip-amber-text"}),h.jsx("span",{className:"truncate",children:R.name})]}),R.is_config&&h.jsx(Ir,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"}),X&&h.jsx(Ii,{className:"h-4 w-4 shrink-0 text-chip-indigo-text"})]})},R.path)}),(d==null?void 0:d.items.filter(R=>R.is_config).length)===0&&h.jsxs("li",{className:"flex h-full min-h-36 flex-col items-center justify-center gap-2.5 text-center text-sm text-ink-muted",children:[h.jsx(Jr,{className:"h-7 w-7 text-ink-faint"}),"No configuration files found"]})]})}),h.jsxs("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"mb-0.5 text-xs font-medium text-ink-muted",children:"Selected file"}),h.jsx("p",{className:"truncate font-mono text-sm text-ink",title:x||m,children:x||m||"—"})]}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-1.5",children:[h.jsx("button",{type:"button",onClick:u,className:"min-h-10 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:"Cancel"}),J?h.jsxs("button",{type:"button",onClick:U,disabled:!m.trim(),className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Create configuration"]}):h.jsxs("button",{type:"button",onClick:ae,disabled:!x,className:"btn btn-primary min-h-10 rounded-lg px-4 text-sm font-semibold",children:[h.jsx(Ir,{className:"h-4 w-4"}),"Load configuration"]})]})]})]})}):null}function Wy({isOpen:n,onClose:r,initialFilePath:a,md5:u}){const[s,d]=z.useState(null),[f,m]=z.useState(""),[p,x]=z.useState([]),[y,g]=z.useState(!1),[w,v]=z.useState(null),[N,D]=z.useState(!1),[O,C]=z.useState(!1),[J,G]=z.useState(null),P=z.useRef(null),ae=Pr({isOpen:n,onClose:r,dialogRef:P});z.useEffect(()=>{if(!n)return;async function ue(){if(a){g(!0);try{const B=await Cx({filePath:a});d(B.image),m(B.content),U(B.content)}catch(B){v(B.message)}finally{g(!1)}}}ue()},[n,a]);const U=ue=>{const B=ue.split(";").map(I=>{const $=I.split("=");return{key:$[0]||"",value:$[1]||""}}).filter(I=>I.key||I.value);x(B)},R=async ue=>{const B=ue.filter(I=>I.key.trim()).map(I=>`${I.key.trim()}=${I.value.trim()}`).join(";");if(m(B),!B){d(null);return}try{const I=await Cx({content:B});d(I.image)}catch(I){console.error("Failed to re-generate barcode:",I)}},X=(ue,B,I)=>{const $=[...p];$[ue][B]=I,x($),R($)},ie=()=>{const ue=[...p,{key:"",value:""}];x(ue)},L=ue=>{const B=p.filter((I,$)=>$!==ue);x(B),R(B)},le=()=>{if(!u||p.some(B=>B.key.toLowerCase()==="md5"))return;const ue=[...p,{key:"md5",value:u}];x(ue),R(ue)},V=async()=>{if(s){G("Saving…");try{const ue=await p2(s,`profiles-qr-${Date.now()}.png`);G(ue.path||ue.message)}catch(ue){G(`Save failed: ${(ue==null?void 0:ue.message)??ue}`)}finally{setTimeout(()=>G(null),6e3)}}},ce=async()=>{try{await navigator.clipboard.writeText(f),D(!0),setTimeout(()=>D(!1),2e3)}catch(ue){console.error("Copy failed",ue)}},ye=async()=>{if(s)try{const B=await(await fetch(s)).blob();await navigator.clipboard.write([new ClipboardItem({[B.type]:B})]),C(!0),setTimeout(()=>C(!1),2e3)}catch(ue){console.error("Image copy failed",ue)}};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4",onClick:r,children:h.jsxs("div",{ref:P,role:"dialog","aria-modal":"true","aria-label":"QR Code Settings",onKeyDown:ae,className:"animate-modal-in w-full max-w-md rounded-xl border border-frame-line glass-panel p-6",onClick:ue=>ue.stopPropagation(),children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h.jsx("h3",{className:"text-sm font-semibold text-ink",children:"QR Code Settings"}),h.jsx("button",{onClick:r,className:"focus-ring rounded-md p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),y?h.jsx("div",{className:"flex h-48 items-center justify-center",children:h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent"})}):w?h.jsx("div",{className:"rounded-md border border-status-danger-border bg-status-danger-bg p-4 text-center text-xs text-status-danger-text",children:w}):h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex flex-col items-center gap-4",children:[h.jsxs("div",{className:"relative group",children:[h.jsx("div",{className:"h-48 w-48 overflow-hidden rounded-lg border border-line bg-white p-2",children:s?h.jsx("img",{src:s,alt:"QR Code",className:"h-full w-full object-contain"}):h.jsx("div",{className:"flex h-full items-center justify-center text-xs text-slate-400",children:"No content"})}),s&&h.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/20 rounded-lg",children:h.jsxs("button",{onClick:ye,className:"focus-ring flex items-center gap-2 rounded-md bg-white/90 p-2 text-xs font-medium text-slate-900 shadow-sm hover:bg-white",children:[O?h.jsx(Ii,{className:"h-3.5 w-3.5"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),O?"Copied":"Copy Image"]})})]}),h.jsxs("div",{className:"flex w-full gap-2",children:[h.jsxs("button",{onClick:ce,className:"btn btn-secondary flex-1 px-3 py-1.5",children:[N?h.jsx(Ii,{className:"h-3.5 w-3.5 text-status-success-text"}):h.jsx(Vn,{className:"h-3.5 w-3.5"}),"Copy Content"]}),h.jsxs("button",{onClick:V,disabled:!s,className:"btn btn-primary flex-1 px-3 py-1.5",children:[h.jsx(Gy,{className:"h-3.5 w-3.5"}),"Save Image"]})]}),J&&h.jsx("p",{className:"break-all text-center text-[11px] text-ink-muted",role:"status",children:J})]}),h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("label",{className:"text-xs font-medium text-ink-muted uppercase tracking-wider",children:"Payload Fields"}),h.jsxs("div",{className:"flex gap-2",children:[u&&!p.some(ue=>ue.key==="md5")&&h.jsxs("button",{onClick:le,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-purple-text border border-chip-purple-border",children:[h.jsx(Kr,{className:"h-3 w-3"})," Inc. MD5"]}),h.jsxs("button",{onClick:ie,className:"btn-chip flex items-center gap-1 rounded px-2 py-0.5 text-[10px] font-bold text-chip-indigo-text border border-chip-indigo-border",children:[h.jsx(_w,{className:"h-3 w-3"})," Add Field"]})]})]}),h.jsxs("div",{className:"max-h-48 space-y-2 overflow-y-auto pr-1 custom-scrollbar",children:[p.map((ue,B)=>h.jsxs("div",{className:"flex gap-2 items-center slide-in",children:[h.jsx("input",{type:"text",placeholder:"key",value:ue.key,onChange:I=>X(B,"key",I.target.value),className:"w-1/3 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("input",{type:"text",placeholder:"value",value:ue.value,onChange:I=>X(B,"value",I.target.value),className:"flex-1 rounded border border-line bg-elevated px-2 py-1 text-xs text-ink focus:border-indigo-500 focus:outline-none"}),h.jsx("button",{onClick:()=>L(B),className:"p-1 text-ink-muted hover:text-status-danger-text transition-colors","aria-label":"Remove field",children:h.jsx(Zy,{className:"h-3.5 w-3.5"})})]},B)),p.length===0&&h.jsx("p",{className:"text-center py-4 text-xs text-ink-muted italic",children:"No fields defined"})]})]}),h.jsxs("div",{className:"pt-2 border-t border-line",children:[h.jsx("label",{className:"text-[10px] font-medium text-ink-muted uppercase tracking-wider block mb-1.5",children:"Raw Preview"}),h.jsx("div",{className:"rounded bg-elevated p-2 font-mono text-[10px] text-ink-secondary break-all border border-line",children:f||h.jsx("span",{className:"italic text-ink-muted/50",children:"empty"})})]})]})]})}):null}const Vx=["Bytes","KB","MB","GB","TB"];function e0(n){if(n===0)return"0 Bytes";const r=1024,a=Math.max(0,Math.min(Vx.length-1,Math.floor(Math.log(n)/Math.log(r))));return parseFloat((n/Math.pow(r,a)).toFixed(2))+" "+Vx[a]}function Ek(n){const r=Math.max(n.lastIndexOf("\\"),n.lastIndexOf("/"));return r===-1?"":n.slice(0,r)}function jk(n){const r=[`File Properties: ${n.name}`,`Path: ${n.path}`,`Type: ${n.type}`,`Size: ${e0(n.size_bytes)}`,`Created: ${n.created}`,`Modified: ${n.modified}`];return n.md5&&r.push(`MD5: ${n.md5}`),n.sha256&&r.push(`SHA256: ${n.sha256}`),r.join(` +`)}function $f(n,r,a){return n.length<=r+a+1?n:`${n.slice(0,r)}…${n.slice(-a)}`}function Ck(n){const r=n.includes("\\")?"\\":"/",a=n.split(/[\\/]/);return a.length<=5?n:[a[0],a[1],"…",a[a.length-2],a[a.length-1]].join(r)}const Tk=[{ms:1e3*60,unit:"minute"},{ms:1e3*60*60,unit:"hour"},{ms:1e3*60*60*24,unit:"day"},{ms:1e3*60*60*24*30,unit:"month"},{ms:1e3*60*60*24*365,unit:"year"}];function Yx(n,r=new Date){const a=new Date(n.replace(" ","T"));if(Number.isNaN(a.getTime()))return"just now";const u=r.getTime()-a.getTime();if(u<6e4)return"just now";let s="just now";for(const{ms:d,unit:f}of Tk){if(u{var V;n||((V=G.current)==null||V.focus(),v(!1))},[n]),z.useEffect(()=>{if(!n||!r)return;const V=new AbortController;return P.current=V,d(null),C(null),m(!0),x(null),(async()=>{try{const ce=await h2(r.path,V.signal);if(P.current!==V)return;d(ce)}catch(ce){if(P.current!==V||ce instanceof DOMException&&ce.name==="AbortError")return;x(ce instanceof Error?ce.message:"Failed to load properties")}finally{P.current===V&&m(!1)}})(),()=>{P.current=null,V.abort()}},[n,r]),z.useEffect(()=>{if(!n)return;const V=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=V}},[n]),z.useEffect(()=>{if(!n)return;const V=ce=>{if(ce.key==="Escape"){if(w)return;a();return}if(ce.key!=="Tab")return;const ye=J.current;if(!ye)return;const ue=Array.from(ye.querySelectorAll('button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(ne=>ne.offsetParent!==null);if(ue.length===0)return;const B=ue[0],I=ue[ue.length-1],$=document.activeElement instanceof HTMLElement?document.activeElement:null;ce.shiftKey?($===B||!ye.contains($))&&(ce.preventDefault(),I.focus()):$===I&&(ce.preventDefault(),B.focus())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[n,w,a]),z.useEffect(()=>{if(!n)return;const V=document.activeElement instanceof HTMLElement?document.activeElement:null;G.current=V;const ce=requestAnimationFrame(()=>{var ye,ue;(ue=(ye=J.current)==null?void 0:ye.querySelector("button"))==null||ue.focus()});return()=>cancelAnimationFrame(ce)},[n]);const ae=async(V,ce)=>{try{await navigator.clipboard.writeText(V),g(ce),setTimeout(()=>g(null),2e3)}catch(ye){console.error("Failed to copy:",ye)}},U=async(V,ce,ye)=>{D(V),C(null);try{await ye(),C(ce)}catch{C("Action failed")}finally{D(null)}},R=V=>`btn btn-chip rounded-md border px-3 py-2 text-xs ${{reveal:"bg-chip-sky-bg text-chip-sky-text border-chip-sky-border",launch:"border-emerald-500/30 bg-emerald-600 font-semibold text-white hover:bg-emerald-500",folder:"bg-chip-amber-bg text-chip-amber-text border-chip-amber-border"}[V]??"bg-chip-indigo-bg text-chip-indigo-text border-chip-indigo-border"}`,X=(V,ce,ye,ue=!1,B)=>h.jsxs("div",{className:"flex items-start gap-2 py-1.5 group",children:[h.jsxs("span",{className:"text-ink-muted min-w-[100px] text-xs",children:[V,":"]}),h.jsx("div",{className:"flex-1 min-w-0",children:h.jsx("span",{className:`text-ink text-xs break-all ${ue?"font-mono":""}`,children:B??ce})}),h.jsx(Ue,{text:"Copy to clipboard",block:!1,children:h.jsx("button",{onClick:()=>ae(ce,ye),className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded hover:bg-elevated","aria-label":`Copy ${V}`,children:y===ye?h.jsx(Ii,{className:"h-3.5 w-3.5 text-status-success-text"}):h.jsx(Vn,{className:"h-3.5 w-3.5 text-ink-muted"})})})]}),ie=(V,ce,ye)=>h.jsxs("div",{className:"rounded-lg border border-line bg-elevated p-4",children:[h.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[ce,h.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-ink-muted",children:V})]}),ye]}),L=()=>h.jsx(Ue,{text:"Click to copy full path",children:h.jsxs("button",{onClick:()=>void ae(s.path,"path"),className:"group mb-3 flex w-full items-center gap-2 rounded-lg border border-line bg-elevated px-3 py-2 text-left hover:bg-surface",children:[h.jsx(us,{className:"text-chip-amber-text h-4 w-4 flex-shrink-0"}),h.jsx("span",{className:"text-ink min-w-0 flex-1 truncate font-mono text-xs",children:Ck(s.path)}),y==="path"?h.jsx(Ii,{className:"text-status-success-text h-3.5 w-3.5"}):h.jsx(Vn,{className:"text-ink-muted h-3.5 w-3.5"})]})});if(!n||!r)return null;const le=r;return h.jsxs("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 backdrop-blur-md p-4",role:"dialog","aria-modal":"true","aria-labelledby":"properties-modal-title",children:[h.jsx("div",{className:"absolute inset-0",onClick:a,onContextMenu:V=>{V.preventDefault(),a()}}),h.jsxs("div",{ref:J,className:"animate-modal-in relative w-full max-w-4xl max-h-[90vh] overflow-hidden rounded-xl border border-frame-line glass-panel flex flex-col",children:[h.jsx("div",{className:"flex-shrink-0 border-b border-line px-6 py-4",children:h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[h.jsx("div",{className:"rounded-lg bg-indigo-600 p-2 flex-shrink-0",children:h.jsx(Kf,{className:"h-5 w-5 text-white"})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h3",{id:"properties-modal-title",className:"text-base font-semibold text-ink truncate",children:"File Properties"}),h.jsx("p",{className:"text-xs text-ink-muted truncate",children:r.filename})]}),h.jsx(Ue,{text:"Copy all properties to clipboard",block:!1,children:h.jsx("button",{onClick:()=>{s&&ae(jk(s),"all")},disabled:!s||f||p!==null,className:"btn-chip ml-2 flex items-center gap-1 rounded-md border border-chip-indigo-border bg-chip-indigo-bg p-1.5 text-chip-indigo-text","aria-label":"Copy all properties",children:y==="all"?h.jsx(Ii,{className:"h-4 w-4 text-status-success-text"}):h.jsx(Vn,{className:"h-4 w-4"})})}),h.jsx(Ue,{text:"Generate Barcode/QR Code",block:!1,children:h.jsx("button",{onClick:()=>v(!0),className:"btn-chip rounded-md border border-chip-indigo-border bg-chip-indigo-bg p-1.5 text-chip-indigo-text",children:h.jsx(Ud,{className:"h-4 w-4"})})})]}),h.jsx("button",{onClick:a,className:"focus-ring rounded-md p-1 text-ink-muted hover:bg-elevated hover:text-ink flex-shrink-0","aria-label":"Close",children:h.jsx(nl,{className:"h-4 w-4"})})]})}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[f&&h.jsx("div",{className:"flex items-center justify-center py-8",children:h.jsxs("div",{className:"flex flex-col items-center gap-2",children:[h.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-indigo-600 border-t-transparent"}),h.jsx("p",{className:"text-xs text-ink-muted",children:"Loading properties..."})]})}),p&&h.jsx("div",{className:"rounded-lg border border-status-danger-border bg-status-danger-bg p-4 text-center",children:h.jsx("p",{className:"text-xs text-status-danger-text",children:p})}),s&&!f&&!p&&h.jsxs("div",{children:[h.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-x-4 gap-y-1.5 rounded-lg border border-line bg-elevated px-4 py-2.5",children:[h.jsx("span",{className:"inline-flex items-center gap-1 rounded-md border border-chip-indigo-border bg-chip-indigo-bg px-2 py-0.5 text-xs font-semibold text-chip-indigo-text",children:s.type}),s.attributes.extension&&h.jsx("span",{className:"inline-flex items-center rounded-md border border-line bg-surface px-2 py-0.5 text-xs font-medium text-ink-muted",children:s.attributes.extension}),h.jsxs("span",{className:"text-xs text-ink-muted",title:`${s.size_bytes} bytes`,children:["Size ",h.jsx("strong",{className:"text-ink font-medium",children:e0(s.size_bytes)})]}),h.jsxs("span",{className:"text-xs text-ink-muted",title:s.created,children:["Created ",h.jsx("strong",{className:"text-ink font-medium",children:Yx(s.created)})]}),h.jsxs("span",{className:"text-xs text-ink-muted",title:s.modified,children:["Modified ",h.jsx("strong",{className:"text-ink font-medium",children:Yx(s.modified)})]}),s.md5&&h.jsx("span",{className:"inline-flex items-center rounded-md border border-chip-purple-border bg-chip-purple-bg px-2 py-0.5 font-mono text-xs font-medium text-chip-purple-text",title:`MD5 ${s.md5}`,children:$f(s.md5,4,4)}),s.attributes.is_symlink&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-chip-fuchsia-border bg-chip-fuchsia-bg px-2 py-0.5 text-xs font-medium text-chip-fuchsia-text",children:[h.jsx(ww,{className:"h-3 w-3"})," Symlink"]})]}),L(),h.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[ie("Hashes",h.jsx(Kr,{className:"text-chip-purple-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("MD5",s.md5,"md5",!0,$f(s.md5,10,6)),X("SHA256",s.sha256,"sha256",!0,$f(s.sha256,10,6))]})),ie("Timestamps",h.jsx(U2,{className:"text-chip-sky-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("Created",s.created,"created",!0),X("Modified",s.modified,"modified",!0)]})),ie("Identity",h.jsx(Kf,{className:"text-chip-indigo-text h-3.5 w-3.5"}),h.jsxs("div",{className:"space-y-0.5",children:[X("Type",s.type,"type"),s.attributes.stem&&X("Stem",s.attributes.stem,"attrStem"),X("Extension",s.name.includes(".")?s.name.slice(s.name.lastIndexOf(".")):"None","extension"),X("Directory",Ek(s.path)||"None","directory",!0)]})),ie("System",h.jsx(Kf,{className:"text-status-success-text h-3.5 w-3.5"}),h.jsxs("div",{children:[h.jsxs("div",{className:"mb-1 flex min-h-[24px] flex-wrap items-center gap-1.5",children:[s.attributes.is_readonly&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-status-danger-border bg-status-danger-bg px-2 py-0.5 text-xs text-status-danger-text",children:[h.jsx(Nw,{className:"h-3 w-3"})," Read-only"]}),s.attributes.is_hidden&&h.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-slate-500/30 bg-slate-600/20 px-2 py-0.5 text-xs text-slate-300",children:[h.jsx(iw,{className:"h-3 w-3"})," Hidden"]}),!s.attributes.is_readonly&&!s.attributes.is_hidden&&!s.attributes.is_symlink&&h.jsx("span",{className:"text-xs text-ink-muted",children:"No special flags"})]}),h.jsxs("div",{className:"space-y-0.5",children:[X("File Type",s.attributes.is_file?"Regular File":s.attributes.is_dir?"Directory":"Other","fileType"),s.attributes.permissions&&X("Permissions",s.attributes.permissions,"permissions",!0),s.attributes.owner_uid!==void 0&&X("Owner UID",String(s.attributes.owner_uid),"ownerUid"),s.attributes.group_gid!==void 0&&X("Group GID",String(s.attributes.group_gid),"groupGid")]})]}))]})]})]}),h.jsx("div",{className:"flex-shrink-0 border-t border-line px-6 py-3",children:h.jsxs("div",{className:"flex justify-between items-center gap-2",children:[h.jsx("p",{className:"min-w-0 text-xs text-ink-muted truncate",children:O??"Click the copy icon next to any field to copy its value"}),h.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[h.jsx(Ue,{text:"Show file in Explorer",block:!1,children:h.jsxs("button",{onClick:()=>void U("reveal","Revealed in Explorer",()=>qy(le.path)),disabled:N!==null,className:R("reveal"),children:[h.jsx(pd,{className:"h-3.5 w-3.5"})," Reveal"]})}),h.jsx(Ue,{text:"Launch file with default association",block:!1,children:h.jsxs("button",{onClick:()=>{u&&(D("launch"),Promise.resolve(u(le)).finally(()=>D(null)))},disabled:N!==null||!u,className:R("launch"),children:[h.jsx(Ji,{className:"h-3.5 w-3.5"})," Launch"]})}),h.jsx(Ue,{text:"Open containing folder",block:!1,children:h.jsxs("button",{onClick:()=>void U("folder","Opened folder",()=>hd(le.path)),disabled:N!==null,className:R("folder"),children:[h.jsx(Ki,{className:"h-3.5 w-3.5"})," Open Folder"]})}),h.jsx("button",{onClick:a,className:"btn btn-primary px-4 py-2",children:"Close"})]})]})})]}),h.jsx(Wy,{isOpen:w,onClose:()=>v(!1),initialFilePath:r.path,md5:s==null?void 0:s.md5})]})}const Ak=["qr_code","code_128","code_39","ean_13","ean_8","upc_a","upc_e","data_matrix"],zk=250,Dk=400,Mk=.7;function Ok(n,r=Dk,a=Mk){const u=n.videoWidth,s=n.videoHeight;if(!u||!s)return null;const d=Math.min(u,s),f=document.createElement("canvas");f.width=Math.min(r,d),f.height=f.width;const m=f.getContext("2d");if(!m)return null;m.drawImage(n,(u-d)/2,(s-d)/2,d,d,0,0,f.width,f.height);const p=f.toDataURL("image/jpeg",a);return p.slice(p.indexOf(",")+1)}function Rk(n,r){const a=n.intervalMs??zk;let u=!1,s=!1;const d=()=>{u=!0,clearInterval(f)},f=setInterval(()=>{if(u||s)return;const m=n.capture();m&&(s=!0,n.decode(m).then(p=>{u||p.decoded&&(d(),r.onDetected(p.decoded))}).catch(p=>{u||(d(),r.onError(p instanceof Error?p.message:"Frame decoding failed"))}).finally(()=>{s=!1}))},a);return d}const Lk=8e3;function Bk({isOpen:n,onClose:r,onDetected:a}){const u=z.useRef(null),s=z.useRef(null),d=Pr({isOpen:n,onClose:r,dialogRef:s}),f=z.useRef(null),m=z.useRef(null),p=z.useRef(null),[x,y]=z.useState(null),[g,w]=z.useState(!1),v=()=>{p.current&&(p.current(),p.current=null),m.current&&(cancelAnimationFrame(m.current),m.current=null),f.current&&(f.current.getTracks().forEach(O=>O.stop()),f.current=null),u.current&&(u.current.srcObject=null)};z.useEffect(()=>{if(!n){v(),y(null);return}let O=!0;async function C(){var G,P,ae,U,R;if(y(null),w(!1),typeof window<"u"&&!window.isSecureContext&&window.location.hostname!=="localhost"&&window.location.hostname!=="127.0.0.1"){y("Camera access requires HTTPS or localhost. If connecting across a local network IP (e.g. 192.168.x.x), modern browsers disable camera access for insecure HTTP.");return}const J=((P=(G=navigator.mediaDevices)==null?void 0:G.getUserMedia)==null?void 0:P.bind(navigator.mediaDevices))||((ae=navigator.getUserMedia)==null?void 0:ae.bind(navigator))||((U=navigator.webkitGetUserMedia)==null?void 0:U.bind(navigator))||((R=navigator.mozGetUserMedia)==null?void 0:R.bind(navigator));if(!J){y(window.isSecureContext?"Camera access is not supported by your browser or environment.":"Camera access is blocked because the page is not served over a secure origin (HTTPS or localhost/127.0.0.1).");return}try{let X;const ie=await Promise.race([J({video:{facingMode:"environment",width:{ideal:1280},height:{ideal:720}}}),new Promise((L,le)=>{X=window.setTimeout(()=>le(new DOMException("Camera did not start in time","TimeoutError")),Lk)})]).finally(()=>{X!==void 0&&window.clearTimeout(X)});if(!O){ie.getTracks().forEach(L=>L.stop());return}f.current=ie,u.current&&(u.current.srcObject=ie,await u.current.play()),"BarcodeDetector"in window?D():N()}catch(X){if(!O)return;console.error("Camera access error:",X),y(X.name==="NotAllowedError"||X.name==="PermissionDeniedError"?"Camera permission denied. Please allow camera access in your browser settings.":X.name==="TimeoutError"?"The camera did not start in time. On macOS, camera capture needs the packaged desktop app — a bare Python process cannot access the camera. Alternatively, open ProFiles in Chrome, Edge or Safari.":`Could not access camera: ${X.message||"Unknown error"}`)}}return C(),()=>{O=!1,v()}},[n]);const N=()=>{w(!0),p.current=Rk({capture:()=>u.current?Ok(u.current):null,decode:O=>d2({imageBase64:O,formats:[...Ak]})},{onDetected:O=>{v(),a(O)},onError:O=>{v(),y(O)}})},D=()=>{const O=["qr_code","code_128","code_39","ean_13","ean_8","upc_a","upc_e","data_matrix"];let C;try{C=new window.BarcodeDetector({formats:O})}catch(G){console.warn("BarcodeDetector formats unsupported:",G),C=new window.BarcodeDetector}const J=async()=>{if(!u.current||u.current.readyState<2){m.current=requestAnimationFrame(J);return}try{const G=await C.detect(u.current);if(G&&G.length>0){const P=G[0].rawValue;if(P){v(),a(P);return}}}catch(G){console.debug("Frame detection error:",G)}m.current=requestAnimationFrame(J)};m.current=requestAnimationFrame(J)};return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/70 p-4 backdrop-blur-sm",onClick:r,children:h.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-label":"Camera barcode scanner",onKeyDown:d,className:"relative w-full max-w-lg rounded-2xl border border-frame-line glass-panel p-6 flex flex-col",onClick:O=>O.stopPropagation(),children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Yy,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Scan with Camera"})]}),h.jsx("button",{onClick:r,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink transition-colors","aria-label":"Close",children:h.jsx(nl,{className:"h-4 w-4"})})]}),x?h.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[h.jsx("div",{className:"rounded-full bg-status-danger-bg p-3 text-status-danger-text mb-3",children:h.jsx(eu,{className:"h-6 w-6"})}),h.jsx("p",{className:"text-xs text-status-danger-text max-w-xs",children:x}),h.jsx("button",{onClick:r,className:"btn btn-secondary mt-6 px-4 py-2",children:"Close"})]}):h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("div",{className:"relative aspect-video w-full overflow-hidden rounded-xl bg-black border border-line flex items-center justify-center",children:[h.jsx("video",{ref:u,playsInline:!0,muted:!0,className:"h-full w-full object-cover"}),h.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:h.jsxs("div",{className:"relative h-48 w-48 rounded-lg border-2 border-dashed border-indigo-400/80 bg-indigo-500/5 shadow-[0_0_0_9999px_rgba(0,0,0,0.45)]",children:[h.jsx("div",{className:"absolute top-0 left-0 h-4 w-4 border-t-2 border-l-2 border-indigo-400"}),h.jsx("div",{className:"absolute top-0 right-0 h-4 w-4 border-t-2 border-r-2 border-indigo-400"}),h.jsx("div",{className:"absolute bottom-0 left-0 h-4 w-4 border-b-2 border-l-2 border-indigo-400"}),h.jsx("div",{className:"absolute bottom-0 right-0 h-4 w-4 border-b-2 border-r-2 border-indigo-400"})]})})]}),h.jsx("p",{className:"mt-4 text-center text-xs text-ink-muted",children:g?"Hold a QR code or barcode steady in front of your camera — frames are decoded by the local ProFiles server (no native Barcode Detector in this browser).":"Hold a QR code or barcode steady in front of your camera to auto-scan."})]})]})}):null}function Uk({isOpen:n,file:r,onConfirm:a,onDismiss:u}){const s=z.useRef(null);return z.useEffect(()=>{var d;if(n){const f=m=>{m.key==="Enter"?(m.preventDefault(),a()):m.key==="Escape"&&(m.preventDefault(),u())};return window.addEventListener("keydown",f),(d=s.current)==null||d.focus(),()=>window.removeEventListener("keydown",f)}},[n,a,u]),!n||!r?null:h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onClick:u,children:h.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":`1 file matched: ${r.filename}`,className:"animate-modal-in w-full max-w-sm rounded-xl border border-frame-line glass-panel p-5 flex flex-col gap-4",onClick:d=>d.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink text-sm",children:[r.has_hook?h.jsx(Iw,{className:"h-4 w-4 text-chip-purple-text"}):h.jsx(Ji,{className:"h-4 w-4 text-status-success-text"}),h.jsx("span",{children:"1 File Matched"})]}),h.jsx("button",{onClick:u,className:"focus-ring rounded p-1 text-ink-muted hover:bg-elevated hover:text-ink","aria-label":"Dismiss",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-line bg-elevated/50 p-3",children:[h.jsx(Jr,{className:"h-5 w-5 text-chip-indigo-text shrink-0 mt-0.5"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h4",{className:"text-xs font-semibold text-ink truncate",children:r.filename}),h.jsx("p",{className:"text-[11px] text-ink-muted truncate mt-0.5",children:r.rel_path||r.path}),r.has_hook&&h.jsx("span",{className:"inline-block mt-1 text-[10px] text-chip-purple-text bg-chip-purple-bg px-1.5 py-0.5 rounded border border-chip-purple-border/50 font-medium",children:"Workflow Hook Configured"})]})]}),h.jsx("p",{className:"text-xs text-ink-muted text-center",children:"Launch this file now?"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{type:"button",onClick:u,className:"btn btn-secondary flex-1 px-3 py-1.5",children:"Dismiss (Esc)"}),h.jsxs("button",{ref:s,type:"button",onClick:a,className:"btn btn-primary flex-1 px-3 py-1.5 shadow-md",children:[h.jsx(Ji,{className:"h-3 w-3 fill-current"}),"Launch (Enter)"]})]})]})})}function Hk({systemInfo:n,fileCount:r,theme:a,onToggleTheme:u,onOpenLog:s,onOpenConfig:d,onLoadConfig:f,onShowShortcuts:m,onReloadConfig:p,onExport:x,exportDisabled:y=!1,language:g="en",onLanguageChange:w,activeConfigName:v}){return h.jsxs("footer",{className:"flex items-center justify-between border-t border-line bg-app px-4 py-2 text-[11px] text-ink-muted transition-colors duration-200",children:[h.jsx("div",{className:"flex items-center gap-4",children:n&&h.jsxs("div",{className:"flex items-center gap-1.5 rounded-full border border-line bg-surface px-2.5 py-0.5 text-ink-secondary",children:[h.jsx(j2,{className:"h-3 w-3 text-status-success-text"}),h.jsx("a",{href:`http://${n.hostname}:${window.location.port}`,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ProFiles on ${n.hostname}`,className:"font-mono hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 rounded px-1 py-0.5",children:n.hostname}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsx("a",{href:`http://${n.ip}:${window.location.port}`,target:"_blank",rel:"noopener noreferrer","aria-label":`Open ProFiles on ${n.ip}`,className:"font-mono hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 rounded px-1 py-0.5",children:n.ip}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsxs("span",{className:"flex items-center gap-1",title:"Session user",children:[h.jsx(Gw,{className:"h-3 w-3 text-ink-faint"}),h.jsx("span",{children:n.username||"operator"})]})]})}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("span",{children:[h.jsx("strong",{className:"text-ink",children:r})," files found"]}),h.jsx("span",{className:"text-ink-faint",children:"|"}),h.jsx(Ue,{text:"Keyboard shortcuts (?)",block:!1,children:h.jsxs("button",{onClick:m,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Xy,{className:"h-3 w-3"}),h.jsx("span",{children:"Shortcuts"})]})}),h.jsx(Ue,{text:"Open the application log viewer",block:!1,children:h.jsxs("button",{onClick:s,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Jr,{className:"h-3 w-3"}),h.jsx("span",{children:"Logs"})]})}),h.jsx("span",{className:"text-ink-faint",children:"|"}),p&&h.jsx(Ue,{text:"Reload configuration from disk",block:!1,children:h.jsxs("button",{onClick:p,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(os,{className:"h-3 w-3"}),h.jsx("span",{children:"Reload"})]})}),x&&h.jsx(Ue,{text:"Export the current results as CSV",block:!1,children:h.jsxs("button",{onClick:x,disabled:y,className:"focus-ring flex items-center gap-1 rounded text-ink-muted hover:text-ink disabled:opacity-40 disabled:hover:text-ink-muted",children:[h.jsx(Gy,{className:"h-3 w-3"}),h.jsx("span",{children:"Export CSV"})]})}),w&&h.jsxs("div",{className:"flex items-center overflow-hidden rounded border border-line text-[10px]",children:[h.jsx(Ue,{text:"English",block:!1,children:h.jsxs("button",{onClick:()=>w("en"),className:`flex items-center gap-1 px-1.5 py-0.5 transition-colors ${g==="en"?"bg-indigo-600 text-white focus-ring":"text-ink-muted hover:text-ink focus-ring"}`,children:[h.jsx(pw,{className:"h-3 w-3"}),h.jsx("span",{children:"EN"})]})}),h.jsx(Ue,{text:"Français",block:!1,children:h.jsx("button",{onClick:()=>w("fr"),className:`flex items-center gap-1 px-1.5 py-0.5 transition-colors ${g==="fr"?"bg-indigo-600 text-white focus-ring":"text-ink-muted hover:text-ink focus-ring"}`,children:h.jsx("span",{children:"FR"})})})]}),f&&h.jsx(Ue,{text:v?`Load a different .profiles file (active: ${v})`:"Load a .profiles file",block:!1,children:h.jsxs("button",{onClick:f,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Ir,{className:"h-3 w-3"}),h.jsx("span",{children:"Load config…"})]})}),h.jsx(Ue,{text:"Open configuration file",block:!1,children:h.jsxs("button",{onClick:d,className:"focus-ring flex items-center gap-1 text-ink-muted hover:text-ink",children:[h.jsx(Lw,{className:"h-3 w-3"}),h.jsx("span",{children:"Config"})]})}),h.jsx(Ue,{text:`Switch to ${a==="dark"?"light":"dark"} mode`,block:!1,children:h.jsxs("button",{onClick:u,className:"focus-ring flex items-center gap-1 rounded px-1.5 py-0.5 text-ink-muted hover:bg-elevated hover:text-status-warning-text",children:[a==="dark"?h.jsx(Uw,{className:"h-3 w-3 text-status-warning-text"}):h.jsx(jw,{className:"h-3 w-3 text-chip-indigo-text"}),h.jsx("span",{children:a==="dark"?"Light":"Dark"})]})})]})]})}const qk=[{label:"5 seconds",seconds:5},{label:"10 seconds",seconds:10},{label:"30 seconds",seconds:30},{label:"1 minute",seconds:60},{label:"5 minutes",seconds:300}];function Fk({isOpen:n,currentInterval:r,onClose:a,onSetInterval:u}){const s=z.useRef(null),d=Pr({isOpen:n,onClose:a,dialogRef:s});if(!n)return null;const f=r>0,m=y=>{u(y)},p=y=>{y.preventDefault();const w=y.currentTarget.elements.namedItem("custom-interval"),v=parseInt(w.value,10);!isNaN(v)&&v>0&&u(v)},x=()=>{u(0)};return h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",children:h.jsxs("div",{ref:s,role:"dialog","aria-modal":"true","aria-label":"Auto-Rescan Timer",onKeyDown:d,className:"animate-modal-in w-[420px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-4 flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2 font-semibold text-ink",children:[h.jsx(Ky,{className:"h-5 w-5 text-chip-indigo-text"}),h.jsx("span",{children:"Auto-Rescan Timer"})]}),h.jsx("button",{onClick:a,className:"focus-ring rounded-lg p-1 text-ink-muted hover:bg-elevated hover:text-ink",children:h.jsx(nl,{className:"h-4 w-4"})})]}),h.jsx("div",{className:"mb-4 rounded-lg bg-elevated/50 px-3 py-2 text-xs",children:f?h.jsxs("div",{className:"flex items-center gap-2 text-status-success-text",children:[h.jsx(Z2,{className:"h-4 w-4 animate-pulse"}),h.jsxs("span",{children:["Auto-rescan every ",r,"s"]})]}):h.jsxs("div",{className:"flex items-center gap-2 text-ink-secondary",children:[h.jsx(I2,{className:"h-4 w-4"}),h.jsx("span",{children:"Auto-rescan is disabled"})]})}),h.jsxs("div",{className:"mb-4 space-y-1 text-xs",children:[h.jsx("p",{className:"text-ink-muted",children:"Presets:"}),h.jsx("div",{className:"grid grid-cols-2 gap-2",children:qk.map(y=>h.jsx("button",{onClick:()=>m(y.seconds),className:"rounded-lg border border-line bg-elevated/50 px-3 py-1.5 text-left font-medium text-ink-secondary hover:border-chip-indigo-border hover:bg-chip-indigo-bg/40 hover:text-chip-indigo-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:y.label},y.seconds))})]}),h.jsxs("form",{onSubmit:p,className:"mb-4",children:[h.jsxs("label",{className:"flex items-center gap-2 text-xs font-medium text-ink-secondary",children:[h.jsx(P2,{className:"h-3.5 w-3.5"}),h.jsx("span",{children:"Custom interval (seconds):"})]}),h.jsxs("div",{className:"mt-1 flex gap-2",children:[h.jsx("input",{type:"number",name:"custom-interval",min:"1",placeholder:"e.g. 45",className:"flex-1 rounded-lg border border-line bg-app px-2 py-1 text-xs text-ink placeholder-ink-faint focus:border-indigo-500 focus:outline-none"}),h.jsx("button",{type:"submit",className:"btn btn-primary rounded-lg px-3 py-1 font-semibold",children:"Set"})]})]}),f&&h.jsx("button",{onClick:x,className:"btn w-full rounded-lg border-line bg-elevated/50 px-3 py-2 text-status-warning-text hover:border-status-warning-border hover:bg-status-warning-bg/40",children:"Stop Auto-Rescan"}),h.jsx("div",{className:"flex justify-end gap-2 border-t border-line pt-3",children:h.jsx("button",{onClick:a,className:"rounded-lg border border-line bg-elevated px-4 py-2 text-xs font-semibold text-ink-secondary hover:bg-elevated/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Close"})})]})})}function Vk(n,r){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Yk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qk={};function Gx(n,r){return(Qk.jsx?Gk:Yk).test(n)}const Xk=/[ \t\n\f\r]/g;function Ik(n){return typeof n=="object"?n.type==="text"?Qx(n.value):!1:Qx(n)}function Qx(n){return n.replace(Xk,"")===""}class ru{constructor(r,a,u){this.normal=a,this.property=r,u&&(this.space=u)}}ru.prototype.normal={};ru.prototype.property={};ru.prototype.space=void 0;function t0(n,r){const a={},u={};for(const s of n)Object.assign(a,s.property),Object.assign(u,s.normal);return new ru(a,u,r)}function bd(n){return n.toLowerCase()}class wn{constructor(r,a){this.attribute=a,this.property=r}}wn.prototype.attribute="";wn.prototype.booleanish=!1;wn.prototype.boolean=!1;wn.prototype.commaOrSpaceSeparated=!1;wn.prototype.commaSeparated=!1;wn.prototype.defined=!1;wn.prototype.mustUseProperty=!1;wn.prototype.number=!1;wn.prototype.overloadedBoolean=!1;wn.prototype.property="";wn.prototype.spaceSeparated=!1;wn.prototype.space=void 0;let Kk=0;const Oe=Wi(),Mt=Wi(),vd=Wi(),se=Wi(),dt=Wi(),Zi=Wi(),Dn=Wi();function Wi(){return 2**++Kk}const wd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Oe,booleanish:Mt,commaOrSpaceSeparated:Dn,commaSeparated:Zi,number:se,overloadedBoolean:vd,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Jf=Object.keys(wd);class Hd extends wn{constructor(r,a,u,s){let d=-1;if(super(r,a),Xx(this,"space",s),typeof u=="number")for(;++d4&&a.slice(0,4)==="data"&&Wk.test(r)){if(r.charAt(4)==="-"){const d=r.slice(5).replace(Ix,nS);u="data"+d.charAt(0).toUpperCase()+d.slice(1)}else{const d=r.slice(4);if(!Ix.test(d)){let f=d.replace(Pk,tS);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}s=Hd}return new s(u,r)}function tS(n){return"-"+n.toLowerCase()}function nS(n){return n.charAt(1).toUpperCase()}const lS=t0([n0,Zk,r0,a0,u0],"html"),qd=t0([n0,$k,r0,a0,u0],"svg");function iS(n){return n.join(" ").trim()}var Kx=/\/\*(?:[^*]|\*(?!\/))*\*\//g,rS=/\n/g,aS=/^\s*/,uS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oS=/^:\s*/,sS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,cS=/^[;\s]*/,fS=` +`,Zx="/",$x="*",Za="",dS="comment",hS="declaration";function mS(n,r){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];r=r||{};var a=1,u=1;function s(N){var D=N.match(rS);D&&(a+=D.length);var O=N.lastIndexOf(fS);u=~O?N.length-O:u+N.length}function d(){var N={line:a,column:u};return function(D){return D.position=new f(N),x(),D}}function f(N){this.start=N,this.end={line:a,column:u},this.source=r.source}f.prototype.content=n;function m(N){var D=new Error(r.source+":"+a+":"+u+": "+N);if(D.reason=N,D.filename=r.source,D.line=a,D.column=u,D.source=n,!r.silent)throw D}function p(N){var D=N.exec(n);if(D){var O=D[0];return s(O),n=n.slice(O.length),D}}function x(){p(aS)}function y(N){for(var D;D=g();)N.push(D);return N}function g(){var N=d();if(!(Zx!=n.charAt(0)||$x!=n.charAt(1))){for(var D=2;Za!=n.charAt(D)&&($x!=n.charAt(D)||Zx!=n.charAt(D+1));)++D;if(D+=2,Za===n.charAt(D-1))return m("End of comment missing");var O=n.slice(2,D-2);return u+=2,s(O),n=n.slice(D),u+=2,N({type:dS,comment:O})}}function w(){var N=d(),D=p(uS);if(D){if(g(),!p(oS))return m("property missing ':'");var O=p(sS),C=N({type:hS,property:D[0].replace(Kx,Za).trim(),value:O?O[0].replace(Kx,Za).trim():Za});return p(cS),C}}function v(){var N=[];y(N);for(var D;D=w();)N.push(D),y(N);return N}return x(),v()}function pS(n,r){let a=null;if(!n||typeof n!="string")return a;const u=mS(n),s=typeof r=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;s?r(f,m,d):m&&(a=a??{},a[f]=m)}),a}const o0=s0("end"),Fd=s0("start");function s0(n){return r;function r(a){const u=a&&a.position&&a.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function gS(n){const r=Fd(n),a=o0(n);if(r&&a)return{start:r,end:a}}function tu(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Jx(n.position):"start"in n||"end"in n?Jx(n):"line"in n||"column"in n?kd(n):""}function kd(n){return Px(n&&n.line)+":"+Px(n&&n.column)}function Jx(n){return kd(n&&n.start)+"-"+kd(n&&n.end)}function Px(n){return n&&typeof n=="number"?n:1}class nn extends Error{constructor(r,a,u){super(),typeof a=="string"&&(u=a,a=void 0);let s="",d={},f=!1;if(a&&("line"in a&&"column"in a?d={place:a}:"start"in a&&"end"in a?d={place:a}:"type"in a?d={ancestors:[a],place:a.position}:d={...a}),typeof r=="string"?s=r:!d.cause&&r&&(f=!0,s=r.message,d.cause=r),!d.ruleId&&!d.source&&typeof u=="string"){const p=u.indexOf(":");p===-1?d.ruleId=u:(d.source=u.slice(0,p),d.ruleId=u.slice(p+1))}if(!d.place&&d.ancestors&&d.ancestors){const p=d.ancestors[d.ancestors.length-1];p&&(d.place=p.position)}const m=d.place&&"start"in d.place?d.place.start:d.place;this.ancestors=d.ancestors||void 0,this.cause=d.cause||void 0,this.column=m?m.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=m?m.line:void 0,this.name=tu(d.place)||"1:1",this.place=d.place||void 0,this.reason=this.message,this.ruleId=d.ruleId||void 0,this.source=d.source||void 0,this.stack=f&&d.cause&&typeof d.cause.stack=="string"?d.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const Vd={}.hasOwnProperty,xS=new Map,yS=/[A-Z]/g,bS=/-([a-z])/g,vS=new Set(["table","tbody","thead","tfoot","tr"]),wS=new Set(["td","th"]),c0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kS(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=r.filePath||void 0;let u;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=AS(a,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=_S(a,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:u,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?qd:lS,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},d=f0(s,n,void 0);return d&&typeof d!="string"?d:s.create(n,s.Fragment,{children:d||void 0},void 0)}function f0(n,r,a){if(r.type==="element")return SS(n,r,a);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return NS(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return jS(n,r,a);if(r.type==="mdxjsEsm")return ES(n,r);if(r.type==="root")return CS(n,r,a);if(r.type==="text")return TS(n,r)}function SS(n,r,a){const u=n.schema;let s=u;r.tagName.toLowerCase()==="svg"&&u.space==="html"&&(s=qd,n.schema=s),n.ancestors.push(r);const d=h0(n,r.tagName,!1),f=zS(n,r);let m=Gd(n,r);return vS.has(r.tagName)&&(m=m.filter(function(p){return typeof p=="string"?!Ik(p):!0})),d0(n,f,d,r),Yd(f,m),n.ancestors.pop(),n.schema=u,n.create(r,d,f,a)}function NS(n,r){if(r.data&&r.data.estree&&n.evaluater){const u=r.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}iu(n,r.position)}function ES(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);iu(n,r.position)}function jS(n,r,a){const u=n.schema;let s=u;r.name==="svg"&&u.space==="html"&&(s=qd,n.schema=s),n.ancestors.push(r);const d=r.name===null?n.Fragment:h0(n,r.name,!0),f=DS(n,r),m=Gd(n,r);return d0(n,f,d,r),Yd(f,m),n.ancestors.pop(),n.schema=u,n.create(r,d,f,a)}function CS(n,r,a){const u={};return Yd(u,Gd(n,r)),n.create(r,n.Fragment,u,a)}function TS(n,r){return r.value}function d0(n,r,a,u){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(r.node=u)}function Yd(n,r){if(r.length>0){const a=r.length>1?r:r[0];a&&(n.children=a)}}function _S(n,r,a){return u;function u(s,d,f,m){const x=Array.isArray(f.children)?a:r;return m?x(d,f,m):x(d,f)}}function AS(n,r){return a;function a(u,s,d,f){const m=Array.isArray(d.children),p=Fd(u);return r(s,d,f,m,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function zS(n,r){const a={};let u,s;for(s in r.properties)if(s!=="children"&&Vd.call(r.properties,s)){const d=MS(n,s,r.properties[s]);if(d){const[f,m]=d;n.tableCellAlignToStyle&&f==="align"&&typeof m=="string"&&wS.has(r.tagName)?u=m:a[f]=m}}if(u){const d=a.style||(a.style={});d[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return a}function DS(n,r){const a={};for(const u of r.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const d=u.data.estree.body[0];d.type;const f=d.expression;f.type;const m=f.properties[0];m.type,Object.assign(a,n.evaluater.evaluateExpression(m.argument))}else iu(n,r.position);else{const{name:s}=u;let d;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const m=u.value.data.estree.body[0];m.type,d=n.evaluater.evaluateExpression(m.expression)}else iu(n,r.position);else d=u.value===null?!0:u.value;a[s]=d}return a}function Gd(n,r){const a=[];let u=-1;const s=n.passKeys?new Map:xS;for(;++us?0:s+r:r=r>s?s:r,a=a>0?a:0,u.length<1e4)f=Array.from(u),f.unshift(r,a),n.splice(...f);else for(a&&n.splice(r,a);d0?(el(n,n.length,0,r),n):r}const ty={}.hasOwnProperty;function p0(n){const r={};let a=-1;for(;++a13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function tl(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=xi(/[A-Za-z]/),Zt=xi(/[\dA-Za-z]/),YS=xi(/[#-'*+\--9=?A-Z^-~]/);function ns(n){return n!==null&&(n<32||n===127)}const Sd=xi(/\d/),GS=xi(/[\dA-Fa-f]/),x0=xi(/[!-/:-@[-`{-~]/);function Ce(n){return n!==null&&n<-2}function ht(n){return n!==null&&(n<0||n===32)}function qe(n){return n===-2||n===-1||n===32}const ss=xi(new RegExp("\\p{P}|\\p{S}","u")),Pi=xi(/\s/);function xi(n){return r;function r(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function ea(n){const r=[];let a=-1,u=0,s=0;for(;++a55295&&d<57344){const m=n.charCodeAt(a+1);d<56320&&m>56319&&m<57344?(f=String.fromCharCode(d,m),s=1):f="�"}else f=String.fromCharCode(d);f&&(r.push(n.slice(u,a),encodeURIComponent(f)),u=a+s+1,f=""),s&&(a+=s,s=0)}return r.join("")+n.slice(u)}function We(n,r,a,u){const s=u?u-1:1/0;let d=0;return f;function f(p){return qe(p)?(n.enter(a),m(p)):r(p)}function m(p){return qe(p)&&d++=s?r(y):a(y)}}const QS={tokenize:XS};function XS(n){const r=n.attempt(this.parser.constructs.contentInitial,u,s);let a;return r;function u(m){if(m===null){n.consume(m);return}return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),We(n,r,"linePrefix")}function s(m){return n.enter("paragraph"),d(m)}function d(m){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(m)}function f(m){if(m===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(m);return}return Ce(m)?(n.consume(m),n.exit("chunkText"),d):(n.consume(m),f)}}let ls=class{constructor(){this.index=new Map,this.map=[]}add(r,a,u){ny(this,r,a,u,!1)}addBefore(r,a,u){ny(this,r,a,u,!0)}consume(r){if(this.map.sort(function(d,f){return d[0]-f[0]}),this.map.length===0)return;let a=this.map.length;const u=[];for(;a>0;)a-=1,u.push(r.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),r.length=this.map[a][0];u.push(r.slice()),r.length=0;let s=u.pop();for(;s;){for(const d of s)r.push(d);s=u.pop()}this.map.length=0,this.index.clear()}};function ny(n,r,a,u,s){if(a===0&&u.length===0)return;const d=n.index.get(r);if(d){d[1]+=a,s?(u.push(...d[2]),d[2]=u):d[2].push(...u);return}const f=[r,a,u];n.map.push(f),n.index.set(r,f)}const IS={tokenize:KS},ly={tokenize:ZS};function KS(n){const r=this,a=[];let u=0,s,d,f;return m;function m(G){if(uf))return;const R=r.events.length;let X=R,ie,L;for(;X--;)if(r.events[X][0]==="exit"&&r.events[X][1].type==="chunkFlow"){if(ie){L=r.events[X][1].end;break}ie=!0}for(C(u),U=R;UG;){const ae=a[P];r.containerState=ae[1],ae[0].exit.call(r,n)}a.length=G}function J(){s.write([null]),d=void 0,s=void 0,r.containerState._closeFlow=void 0}}function ZS(n,r,a){return We(n,n.attempt(this.parser.constructs.document,r,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(n){if(n===null||ht(n)||Pi(n))return 1;if(ss(n))return 2}function cs(n,r,a){const u=[];let s=-1;for(;++s1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1,f={...n[s][1].end},m={...n[a][1].start};iy(f,-d),iy(m,d);const p={type:d>1?"strongSequence":"emphasisSequence",start:f,end:{...n[s][1].end}},x={type:d>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:m},y={type:d>1?"strongText":"emphasisText",start:{...n[s][1].end},end:{...n[a][1].start}},g={type:d>1?"strong":"emphasis",start:{...p.start},end:{...x.end}};n[s][1].end={...p.start},n[a][1].start={...x.end},u=[],n[s][1].end.offset-n[s][1].start.offset&&(u=Yn(u,[["enter",n[s][1],r],["exit",n[s][1],r]])),u=Yn(u,[["enter",g,r],["enter",p,r],["exit",p,r],["enter",y,r]]),u=Yn(u,cs(r.parser.constructs.insideSpan.null,n.slice(s+1,a),r)),u=Yn(u,[["exit",y,r],["enter",x,r],["exit",x,r],["exit",g,r]]);let w=0;n[a][1].end.offset-n[a][1].start.offset&&(w=2,u=Yn(u,[["enter",n[a][1],r],["exit",n[a][1],r]])),el(n,s-1,a-s+3,u),a=s+u.length-w-2;break}}for(a=-1;++a0&&qe(U)?We(n,J,"linePrefix",d+1)(U):J(U)}function J(U){return U===null||Ce(U)?n.check(Ed,D,P)(U):(n.enter("codeFlowValue"),G(U))}function G(U){return U===null||Ce(U)?(n.exit("codeFlowValue"),J(U)):(n.consume(U),G)}function P(U){return n.exit("codeFenced"),r(U)}function ae(U,R,X){let ie=0;return L;function L(ue){return U.enter("lineEnding"),U.consume(ue),U.exit("lineEnding"),le}function le(ue){return U.enter("codeFencedFence"),qe(ue)?We(U,V,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):V(ue)}function V(ue){return ue===m?(U.enter("codeFencedFenceSequence"),ce(ue)):X(ue)}function ce(ue){return ue===m?(ie++,U.consume(ue),ce):ie>=f?(U.exit("codeFencedFenceSequence"),qe(ue)?We(U,ye,"whitespace")(ue):ye(ue)):X(ue)}function ye(ue){return ue===null||Ce(ue)?(U.exit("codeFencedFence"),R(ue)):X(ue)}}}const Wf={name:"codeIndented",tokenize:sN},oN={partial:!0,tokenize:cN};function sN(n,r,a){return u;function u(m){return n.enter("codeIndented"),y0(n,s,a,"linePrefix",4,4)(m)}function s(m){return m===null?f(m):Ce(m)?n.attempt(oN,s,f)(m):(n.enter("codeFlowValue"),d(m))}function d(m){return m===null||Ce(m)?(n.exit("codeFlowValue"),s(m)):(n.consume(m),d)}function f(m){return n.exit("codeIndented"),r(m)}}function cN(n,r,a){const u=this;return s;function s(f){return u.parser.lazy[u.now().line]?a(f):Ce(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):y0(n,r,d,"linePrefix",4,4)(f)}function d(f){return Ce(f)?s(f):a(f)}}const fN={name:"codeText",previous:hN,resolve:dN,tokenize:mN};function dN(n){let r=n.length-4,a=3,u,s;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(u=a;++u=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(r,a,u){const s=a||0;this.setCursor(Math.trunc(r));const d=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return u&&$a(this.left,u),d.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),$a(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),$a(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(f):n.interrupt(u.parser.constructs.flow,a,r)(f)}}function S0(n,r,a,u,s,d,f,m,p){const x=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(n.enter(u),n.enter(s),n.enter(d),n.consume(C),n.exit(d),w):C===null||C===32||C===41||ns(C)?a(C):(n.enter(u),n.enter(f),n.enter(m),n.enter("chunkString",{contentType:"string"}),D(C))}function w(C){return C===62?(n.enter(d),n.consume(C),n.exit(d),n.exit(s),n.exit(u),r):(n.enter(m),n.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(n.exit("chunkString"),n.exit(m),w(C)):C===null||C===60||Ce(C)?a(C):(n.consume(C),C===92?N:v)}function N(C){return C===60||C===62||C===92?(n.consume(C),v):v(C)}function D(C){return!y&&(C===null||C===41||ht(C))?(n.exit("chunkString"),n.exit(m),n.exit(f),n.exit(u),r(C)):y999||v===null||v===91||v===93&&!p||v===94&&!m&&"_hiddenFootnoteSupport"in f.parser.constructs?a(v):v===93?(n.exit(d),n.enter(s),n.consume(v),n.exit(s),n.exit(u),r):Ce(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),y):(n.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Ce(v)||m++>999?(n.exit("chunkString"),y(v)):(n.consume(v),p||(p=!qe(v)),v===92?w:g)}function w(v){return v===91||v===92||v===93?(n.consume(v),m++,g):g(v)}}function E0(n,r,a,u,s,d){let f;return m;function m(w){return w===34||w===39||w===40?(n.enter(u),n.enter(s),n.consume(w),n.exit(s),f=w===40?41:w,p):a(w)}function p(w){return w===f?(n.enter(s),n.consume(w),n.exit(s),n.exit(u),r):(n.enter(d),x(w))}function x(w){return w===f?(n.exit(d),p(f)):w===null?a(w):Ce(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),We(n,x,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===f||w===null||Ce(w)?(n.exit("chunkString"),x(w)):(n.consume(w),w===92?g:y)}function g(w){return w===f||w===92?(n.consume(w),y):y(w)}}function nu(n,r){let a;return u;function u(s){return Ce(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),a=!0,u):qe(s)?We(n,u,a?"linePrefix":"lineSuffix")(s):r(s)}}const kN={name:"definition",tokenize:NN},SN={partial:!0,tokenize:EN};function NN(n,r,a){const u=this;let s;return d;function d(v){return n.enter("definition"),f(v)}function f(v){return N0.call(u,n,m,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function m(v){return s=tl(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),v===58?(n.enter("definitionMarker"),n.consume(v),n.exit("definitionMarker"),p):a(v)}function p(v){return ht(v)?nu(n,x)(v):x(v)}function x(v){return S0(n,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return n.attempt(SN,g,g)(v)}function g(v){return qe(v)?We(n,w,"whitespace")(v):w(v)}function w(v){return v===null||Ce(v)?(n.exit("definition"),u.parser.defined.push(s),r(v)):a(v)}}function EN(n,r,a){return u;function u(m){return ht(m)?nu(n,s)(m):a(m)}function s(m){return E0(n,d,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(m)}function d(m){return qe(m)?We(n,f,"whitespace")(m):f(m)}function f(m){return m===null||Ce(m)?r(m):a(m)}}const jN={name:"hardBreakEscape",tokenize:CN};function CN(n,r,a){return u;function u(d){return n.enter("hardBreakEscape"),n.consume(d),s}function s(d){return Ce(d)?(n.exit("hardBreakEscape"),r(d)):a(d)}}const TN={name:"headingAtx",resolve:_N,tokenize:AN};function _N(n,r){let a=n.length-2,u=3;if(n[u][1].type==="whitespace"&&(u+=2),a-2>u&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(u===a-1||a-4>u&&n[a-2][1].type==="whitespace")&&(a-=u+1===a?2:4),a>u){const s={type:"atxHeadingText",start:n[u][1].start,end:n[a][1].end},d={type:"chunkText",start:n[u][1].start,end:n[a][1].end,contentType:"text"};el(n,u,a-u+1,[["enter",s,r],["enter",d,r],["exit",d,r],["exit",s,r]])}return n}function AN(n,r,a){let u=0;return s;function s(y){return n.enter("atxHeading"),d(y)}function d(y){return n.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&u++<6?(n.consume(y),f):y===null||ht(y)?(n.exit("atxHeadingSequence"),m(y)):a(y)}function m(y){return y===35?(n.enter("atxHeadingSequence"),p(y)):y===null||Ce(y)?(n.exit("atxHeading"),r(y)):qe(y)?We(n,m,"whitespace")(y):(n.enter("atxHeadingText"),x(y))}function p(y){return y===35?(n.consume(y),p):(n.exit("atxHeadingSequence"),m(y))}function x(y){return y===null||y===35||ht(y)?(n.exit("atxHeadingText"),m(y)):(n.consume(y),x)}}const j0=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],jd=["pre","script","style","textarea"],zN={concrete:!0,name:"htmlFlow",resolveTo:MN,tokenize:ON},DN={partial:!0,tokenize:RN};function MN(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function ON(n,r,a){const u=this;let s,d,f,m,p;return x;function x(A){return y(A)}function y(A){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(A),g}function g(A){return A===33?(n.consume(A),w):A===47?(n.consume(A),d=!0,D):A===63?(n.consume(A),s=3,u.interrupt?r:S):Kt(A)?(n.consume(A),f=String.fromCharCode(A),O):a(A)}function w(A){return A===45?(n.consume(A),s=2,v):A===91?(n.consume(A),s=5,m=0,N):Kt(A)?(n.consume(A),s=4,u.interrupt?r:S):a(A)}function v(A){return A===45?(n.consume(A),u.interrupt?r:S):a(A)}function N(A){const _="CDATA[";return A===_.charCodeAt(m++)?(n.consume(A),m===_.length?u.interrupt?r:V:N):a(A)}function D(A){return Kt(A)?(n.consume(A),f=String.fromCharCode(A),O):a(A)}function O(A){if(A===null||A===47||A===62||ht(A)){const _=A===47,re=f.toLowerCase();return!_&&!d&&jd.includes(re)?(s=1,u.interrupt?r(A):V(A)):j0.includes(f.toLowerCase())?(s=6,_?(n.consume(A),C):u.interrupt?r(A):V(A)):(s=7,u.interrupt&&!u.parser.lazy[u.now().line]?a(A):d?J(A):G(A))}return A===45||Zt(A)?(n.consume(A),f+=String.fromCharCode(A),O):a(A)}function C(A){return A===62?(n.consume(A),u.interrupt?r:V):a(A)}function J(A){return qe(A)?(n.consume(A),J):L(A)}function G(A){return A===47?(n.consume(A),L):A===58||A===95||Kt(A)?(n.consume(A),P):qe(A)?(n.consume(A),G):L(A)}function P(A){return A===45||A===46||A===58||A===95||Zt(A)?(n.consume(A),P):ae(A)}function ae(A){return A===61?(n.consume(A),U):qe(A)?(n.consume(A),ae):G(A)}function U(A){return A===null||A===60||A===61||A===62||A===96?a(A):A===34||A===39?(n.consume(A),p=A,R):qe(A)?(n.consume(A),U):X(A)}function R(A){return A===p?(n.consume(A),p=null,ie):A===null||Ce(A)?a(A):(n.consume(A),R)}function X(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||ht(A)?ae(A):(n.consume(A),X)}function ie(A){return A===47||A===62||qe(A)?G(A):a(A)}function L(A){return A===62?(n.consume(A),le):a(A)}function le(A){return A===null||Ce(A)?V(A):qe(A)?(n.consume(A),le):a(A)}function V(A){return A===45&&s===2?(n.consume(A),B):A===60&&s===1?(n.consume(A),I):A===62&&s===4?(n.consume(A),Fe):A===63&&s===3?(n.consume(A),S):A===93&&s===5?(n.consume(A),ne):Ce(A)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(DN,Ve,ce)(A)):A===null||Ce(A)?(n.exit("htmlFlowData"),ce(A)):(n.consume(A),V)}function ce(A){return n.check(Ed,ye,Ve)(A)}function ye(A){return n.enter("lineEnding"),n.consume(A),n.exit("lineEnding"),ue}function ue(A){return A===null||Ce(A)?ce(A):(n.enter("htmlFlowData"),V(A))}function B(A){return A===45?(n.consume(A),S):V(A)}function I(A){return A===47?(n.consume(A),f="",$):V(A)}function $(A){if(A===62){const _=f.toLowerCase();return jd.includes(_)?(n.consume(A),Fe):V(A)}return Kt(A)&&f.length<8?(n.consume(A),f+=String.fromCharCode(A),$):V(A)}function ne(A){return A===93?(n.consume(A),S):V(A)}function S(A){return A===62?(n.consume(A),Fe):A===45&&s===2?(n.consume(A),S):V(A)}function Fe(A){return A===null||Ce(A)?(n.exit("htmlFlowData"),Ve(A)):(n.consume(A),Fe)}function Ve(A){return n.exit("htmlFlow"),r(A)}}function RN(n,r,a){return u;function u(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(au,r,a)}}const LN={name:"htmlText",tokenize:BN};function BN(n,r,a){const u=this;let s,d,f;return m;function m(S){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(S),p}function p(S){return S===33?(n.consume(S),x):S===47?(n.consume(S),ae):S===63?(n.consume(S),G):Kt(S)?(n.consume(S),X):a(S)}function x(S){return S===45?(n.consume(S),y):S===91?(n.consume(S),d=0,N):Kt(S)?(n.consume(S),J):a(S)}function y(S){return S===45?(n.consume(S),v):a(S)}function g(S){return S===null?a(S):S===45?(n.consume(S),w):Ce(S)?(f=g,I(S)):(n.consume(S),g)}function w(S){return S===45?(n.consume(S),v):g(S)}function v(S){return S===62?B(S):S===45?w(S):g(S)}function N(S){const Fe="CDATA[";return S===Fe.charCodeAt(d++)?(n.consume(S),d===Fe.length?D:N):a(S)}function D(S){return S===null?a(S):S===93?(n.consume(S),O):Ce(S)?(f=D,I(S)):(n.consume(S),D)}function O(S){return S===93?(n.consume(S),C):D(S)}function C(S){return S===62?B(S):S===93?(n.consume(S),C):D(S)}function J(S){return S===null||S===62?B(S):Ce(S)?(f=J,I(S)):(n.consume(S),J)}function G(S){return S===null?a(S):S===63?(n.consume(S),P):Ce(S)?(f=G,I(S)):(n.consume(S),G)}function P(S){return S===62?B(S):G(S)}function ae(S){return Kt(S)?(n.consume(S),U):a(S)}function U(S){return S===45||Zt(S)?(n.consume(S),U):R(S)}function R(S){return Ce(S)?(f=R,I(S)):qe(S)?(n.consume(S),R):B(S)}function X(S){return S===45||Zt(S)?(n.consume(S),X):S===47||S===62||ht(S)?ie(S):a(S)}function ie(S){return S===47?(n.consume(S),B):S===58||S===95||Kt(S)?(n.consume(S),L):Ce(S)?(f=ie,I(S)):qe(S)?(n.consume(S),ie):B(S)}function L(S){return S===45||S===46||S===58||S===95||Zt(S)?(n.consume(S),L):le(S)}function le(S){return S===61?(n.consume(S),V):Ce(S)?(f=le,I(S)):qe(S)?(n.consume(S),le):ie(S)}function V(S){return S===null||S===60||S===61||S===62||S===96?a(S):S===34||S===39?(n.consume(S),s=S,ce):Ce(S)?(f=V,I(S)):qe(S)?(n.consume(S),V):(n.consume(S),ye)}function ce(S){return S===s?(n.consume(S),s=void 0,ue):S===null?a(S):Ce(S)?(f=ce,I(S)):(n.consume(S),ce)}function ye(S){return S===null||S===34||S===39||S===60||S===61||S===96?a(S):S===47||S===62||ht(S)?ie(S):(n.consume(S),ye)}function ue(S){return S===47||S===62||ht(S)?ie(S):a(S)}function B(S){return S===62?(n.consume(S),n.exit("htmlTextData"),n.exit("htmlText"),r):a(S)}function I(S){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),$}function $(S){return qe(S)?We(n,ne,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return n.enter("htmlTextData"),f(S)}}const Id={name:"labelEnd",resolveAll:FN,resolveTo:VN,tokenize:YN},UN={tokenize:GN},HN={tokenize:QN},qN={tokenize:XN};function FN(n){let r=-1;const a=[];for(;++r0&&s[s.length-1]._balanced;)s.pop();d=s[s.length-1]}return m;function m(w){return d?d._inactive?g(w):(f=u.parser.defined.includes(tl(u.sliceSerialize({start:d.end,end:u.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(w),n.exit("labelMarker"),n.exit("labelEnd"),p):a(w)}function p(w){return w===40?n.attempt(UN,y,f?y:g)(w):w===91?n.attempt(HN,y,f?x:g)(w):f?y(w):g(w)}function x(w){return n.attempt(qN,y,g)(w)}function y(w){return s.pop(),r(w)}function g(w){return d._balanced=!0,a(w)}}function GN(n,r,a){return u;function u(g){return n.enter("resource"),n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),s}function s(g){return ht(g)?nu(n,d)(g):d(g)}function d(g){return g===41?y(g):S0(n,f,m,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function f(g){return ht(g)?nu(n,p)(g):y(g)}function m(g){return a(g)}function p(g){return g===34||g===39||g===40?E0(n,x,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function x(g){return ht(g)?nu(n,y)(g):y(g)}function y(g){return g===41?(n.enter("resourceMarker"),n.consume(g),n.exit("resourceMarker"),n.exit("resource"),r):a(g)}}function QN(n,r,a){const u=this;return s;function s(m){return N0.call(u,n,d,f,"reference","referenceMarker","referenceString")(m)}function d(m){return u.parser.defined.includes(tl(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?r(m):a(m)}function f(m){return a(m)}}function XN(n,r,a){return u;function u(d){return n.enter("reference"),n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),s}function s(d){return d===93?(n.enter("referenceMarker"),n.consume(d),n.exit("referenceMarker"),n.exit("reference"),r):a(d)}}const IN={name:"labelStartImage",resolveAll:Id.resolveAll,tokenize:KN};function KN(n,r,a){const u=this;let s;return d;function d(p){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(p),n.exit("labelImageMarker"),f}function f(p){return p===91?(n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),s=n.exit("labelImage"),m):a(p)}function m(p){return p===94&&"_hiddenFootnoteSupport"in u.parser.constructs?a(p):(u._labelStarts=u._labelStarts||[],u._labelStarts.push(s),r(p))}}const ZN={name:"labelStartLink",resolveAll:Id.resolveAll,tokenize:$N};function $N(n,r,a){const u=this;let s;return d;function d(m){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),s=n.exit("labelLink"),f}function f(m){return m===94&&"_hiddenFootnoteSupport"in u.parser.constructs?a(m):(u._labelStarts=u._labelStarts||[],u._labelStarts.push(s),r(m))}}const ed={name:"lineEnding",tokenize:JN};function JN(n,r){return a;function a(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),We(n,r,"linePrefix")}}const Wo={name:"thematicBreak",tokenize:PN};function PN(n,r,a){let u=0,s;return d;function d(x){return n.enter("thematicBreak"),f(x)}function f(x){return s=x,m(x)}function m(x){return x===s?(n.enter("thematicBreakSequence"),p(x)):u>=3&&(x===null||Ce(x))?(n.exit("thematicBreak"),r(x)):a(x)}function p(x){return x===s?(n.consume(x),u++,p):(n.exit("thematicBreakSequence"),qe(x)?We(n,m,"whitespace")(x):m(x))}}const vn={continuation:{tokenize:n3},exit:i3,name:"list",tokenize:t3},WN={partial:!0,tokenize:r3},e3={partial:!0,tokenize:l3};function t3(n,r,a){const u=this,s=u.events[u.events.length-1];let d=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return m;function m(v){const N=u.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!u.containerState.marker||v===u.containerState.marker:Sd(v)){if(u.containerState.type||(u.containerState.type=N,n.enter(N,{_container:!0})),N==="listUnordered")return n.enter("listItemPrefix"),v===42||v===45?n.check(Wo,a,x)(v):x(v);if(!u.interrupt||v===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(v)}return a(v)}function p(v){return Sd(v)&&++f<10?(n.consume(v),p):(!u.interrupt||f<2)&&(u.containerState.marker?v===u.containerState.marker:v===41||v===46)?(n.exit("listItemValue"),x(v)):a(v)}function x(v){return n.enter("listItemMarker"),n.consume(v),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||v,n.check(au,u.interrupt?a:y,n.attempt(WN,w,g))}function y(v){return u.containerState.initialBlankLine=!0,d++,w(v)}function g(v){return qe(v)?(n.enter("listItemPrefixWhitespace"),n.consume(v),n.exit("listItemPrefixWhitespace"),w):a(v)}function w(v){return u.containerState.size=d+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(v)}}function n3(n,r,a){const u=this;return u.containerState._closeFlow=void 0,n.check(au,s,d);function s(m){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,We(n,r,"listItemIndent",u.containerState.size+1)(m)}function d(m){return u.containerState.furtherBlankLines||!qe(m)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(m)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(e3,r,f)(m))}function f(m){return u.containerState._closeFlow=!0,u.interrupt=void 0,We(n,n.attempt(vn,r,a),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m)}}function l3(n,r,a){const u=this;return We(n,s,"listItemIndent",u.containerState.size+1);function s(d){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?r(d):a(d)}}function i3(n){n.exit(this.containerState.type)}function r3(n,r,a){const u=this;return We(n,s,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(d){const f=u.events[u.events.length-1];return!qe(d)&&f&&f[1].type==="listItemPrefixWhitespace"?r(d):a(d)}}const ay={name:"setextUnderline",resolveTo:a3,tokenize:u3};function a3(n,r){const a=new ls;let u=n.length,s,d,f;for(;u--;)if(n[u][0]==="enter"){if(n[u][1].type==="content"){s=u;break}n[u][1].type==="paragraph"&&(d=u)}else n[u][1].type==="content"&&a.add(u,1,[]),!f&&n[u][1].type==="definition"&&(f=u);const m={type:"setextHeading",start:{...n[s][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",f?(a.add(d,0,[["enter",m,r]]),a.add(f+1,0,[["exit",n[s][1],r]]),n[s][1].end={...n[f][1].end}):n[s][1]=m,a.add(n.length,0,[["exit",m,r]]),a.consume(n),n}function u3(n,r,a){const u=this;let s;return d;function d(x){let y=u.events.length,g;for(;y--;)if(u.events[y][1].type!=="lineEnding"&&u.events[y][1].type!=="linePrefix"&&u.events[y][1].type!=="content"){g=u.events[y][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||g)?(n.enter("setextHeadingLine"),s=x,f(x)):a(x)}function f(x){return n.enter("setextHeadingLineSequence"),m(x)}function m(x){return x===s?(n.consume(x),m):(n.exit("setextHeadingLineSequence"),qe(x)?We(n,p,"lineSuffix")(x):p(x))}function p(x){return x===null||Ce(x)?(n.exit("setextHeadingLine"),r(x)):a(x)}}const o3={tokenize:s3};function s3(n){const r=this,a=n.attempt(au,u,n.attempt(this.parser.constructs.flowInitial,s,We(n,n.attempt(this.parser.constructs.flow,s,n.attempt(xN,s)),"linePrefix")));return a;function u(d){if(d===null){n.consume(d);return}return n.enter("lineEndingBlank"),n.consume(d),n.exit("lineEndingBlank"),r.currentConstruct=void 0,a}function s(d){if(d===null){n.consume(d);return}return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),r.currentConstruct=void 0,a}}const c3={resolveAll:T0()},f3=C0("string"),d3=C0("text");function C0(n){return{resolveAll:T0(n==="text"?h3:void 0),tokenize:r};function r(a){const u=this,s=this.parser.constructs[n],d=a.attempt(s,f,m);return f;function f(y){return x(y)?d(y):m(y)}function m(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return x(y)?(a.exit("data"),d(y)):(a.consume(y),p)}function x(y){if(y===null)return!0;const g=s[y];let w=-1;if(g)for(;++w-1){const m=f[0];typeof m=="string"?f[0]=m.slice(u):f.shift()}d>0&&f.push(n[s].slice(0,d))}return f}function j3(n,r){let a=-1;const u=[];let s;for(;++a0&&s(r.beforeEnter,{...be,sliceSerialize:Z[it][2].sliceSerialize},Z[it][1]),_0.call(jt,Z[it][1].type)&&jt[Z[it][1].type].call({...be,sliceSerialize:Z[it][2].sliceSerialize},Z[it][1]),Z[it][0]==="exit"&&r.afterExit.length>0&&s(r.afterExit,{...be,sliceSerialize:Z[it][2].sliceSerialize},Z[it][1])}if(be.tokenStack.length>0){const jt=be.tokenStack[be.tokenStack.length-1];(jt[1]||oy).call(be,void 0,jt[0])}for(oe.position={start:mi(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:mi(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it0&&(u.className=["language-"+s[0]]);let d={type:"element",tagName:"code",properties:u,children:[{type:"text",value:a}]};return r.meta&&(d.data={meta:r.meta}),n.patch(r,d),d=n.applyData(r,d),d={type:"element",tagName:"pre",properties:{},children:[d]},n.patch(r,d),d}function q3(n,r){const a={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function F3(n,r){const a={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function V3(n,r){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(r.identifier).toUpperCase(),s=ea(u.toLowerCase()),d=n.footnoteOrder.indexOf(u);let f,m=n.footnoteCounts.get(u);m===void 0?(m=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=d+1,m+=1,n.footnoteCounts.set(u,m);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(m>1?"-"+m:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,p);const x={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(r,x),n.applyData(r,x)}function Y3(n,r){const a={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,a),n.applyData(r,a)}function G3(n,r){if(n.options.allowDangerousHtml){const a={type:"raw",value:r.value};return n.patch(r,a),n.applyData(r,a)}}function z0(n,r){const a=r.referenceType;let u="]";if(a==="collapsed"?u+="[]":a==="full"&&(u+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+u}];const s=n.all(r),d=s[0];d&&d.type==="text"?d.value="["+d.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=u:s.push({type:"text",value:u}),s}function Q3(n,r){const a=String(r.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return z0(n,r);const s={src:ea(u.url||""),alt:r.alt};u.title!==null&&u.title!==void 0&&(s.title=u.title);const d={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,d),n.applyData(r,d)}function X3(n,r){const a={src:ea(r.url)};r.alt!==null&&r.alt!==void 0&&(a.alt=r.alt),r.title!==null&&r.title!==void 0&&(a.title=r.title);const u={type:"element",tagName:"img",properties:a,children:[]};return n.patch(r,u),n.applyData(r,u)}function I3(n,r){const a={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,a);const u={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(r,u),n.applyData(r,u)}function K3(n,r){const a=String(r.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return z0(n,r);const s={href:ea(u.url||"")};u.title!==null&&u.title!==void 0&&(s.title=u.title);const d={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,d),n.applyData(r,d)}function Z3(n,r){const a={href:ea(r.url)};r.title!==null&&r.title!==void 0&&(a.title=r.title);const u={type:"element",tagName:"a",properties:a,children:n.all(r)};return n.patch(r,u),n.applyData(r,u)}function $3(n,r,a){const u=n.all(r),s=a?J3(a):D0(r),d={},f=[];if(typeof r.checked=="boolean"){const y=u[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},u.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),d.className=["task-list-item"]}let m=-1;for(;++m1}function P3(n,r){const a={},u=n.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(a.start=r.start);++s0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},m=Fd(r.children[1]),p=o0(r.children[r.children.length-1]);m&&p&&(f.position={start:m,end:p}),s.push(f)}const d={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(r,d),n.applyData(r,d)}function lE(n,r,a){const u=a?a.children:void 0,d=(u?u.indexOf(r):1)===0?"th":"td",f=a&&a.type==="table"?a.align:void 0,m=f?f.length:r.children.length;let p=-1;const x=[];for(;++p0,!0),u[0]),s=u.index+u[0].length,u=a.exec(r);return d.push(fy(r.slice(s),s>0,!1)),d.join("")}function fy(n,r,a){let u=0,s=n.length;if(r){let d=n.codePointAt(u);for(;d===sy||d===cy;)u++,d=n.codePointAt(u)}if(a){let d=n.codePointAt(s-1);for(;d===sy||d===cy;)s--,d=n.codePointAt(s-1)}return s>u?n.slice(u,s):""}function aE(n,r){const a={type:"text",value:rE(String(r.value))};return n.patch(r,a),n.applyData(r,a)}function uE(n,r){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,a),n.applyData(r,a)}const oE={blockquote:B3,break:U3,code:H3,delete:q3,emphasis:F3,footnoteReference:V3,heading:Y3,html:G3,imageReference:Q3,image:X3,inlineCode:I3,linkReference:K3,link:Z3,listItem:$3,list:P3,paragraph:W3,root:eE,strong:tE,table:nE,tableCell:iE,tableRow:lE,text:aE,thematicBreak:uE,toml:Qo,yaml:Qo,definition:Qo,footnoteDefinition:Qo};function Qo(){}const M0=-1,fs=0,lu=1,is=2,Kd=3,Zd=4,$d=5,Jd=6,O0=7,R0=8,{defineProperty:sE}=Object,L0=typeof self=="object"?self:globalThis,dy=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new L0[n](r)},cE=(n,r)=>{const a=(s,d)=>(n.set(d,s),s),u=s=>{if(n.has(s))return n.get(s);const[d,f]=r[s];switch(d){case fs:case M0:return a(f,s);case lu:{const m=a([],s);for(const p of f)m.push(u(p));return m}case is:{const m=a({},s);for(const[p,x]of f){const y=u(p),g=u(x);y==="__proto__"?sE(m,y,{value:g,configurable:!0,enumerable:!0,writable:!0}):m[y]=g}return m}case Kd:return a(new Date(f),s);case Zd:{const{source:m,flags:p}=f;return a(new RegExp(m,p),s)}case $d:{const m=a(new Map,s);for(const[p,x]of f)m.set(u(p),u(x));return m}case Jd:{const m=a(new Set,s);for(const p of f)m.add(u(p));return m}case O0:{const{name:m,message:p}=f;return a(typeof L0[m]=="function"?dy(m,p):new Error(p),s)}case R0:return a(BigInt(f),s);case"BigInt":return a(Object(BigInt(f)),s);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:m}=new Uint8Array(f);return a(new DataView(m),f)}case"-0":return-0}return a(dy(d,f),s)};return u},hy=n=>cE(new Map,n)(0),Xi="",{toString:fE}={},{keys:dE,is:hE}=Object,Ja=n=>{const r=typeof n;if(r!=="object"||!n)return[fs,r];const a=fE.call(n).slice(8,-1);switch(a){case"Array":return[lu,Xi];case"Object":return[is,Xi];case"Date":return[Kd,Xi];case"RegExp":return[Zd,Xi];case"Map":return[$d,Xi];case"Set":return[Jd,Xi];case"DataView":return[lu,a]}return a.includes("Array")?[lu,a]:n instanceof Error?[O0,n.name||"Error"]:[is,a]},Xo=([n,r])=>n===fs&&(r==="function"||r==="symbol"),mE=(n,r,a,u)=>{const s=(f,m)=>{const p=u.push(f)-1;return a.set(m,p),p},d=f=>{if(a.has(f))return a.get(f);let[m,p]=Ja(f);switch(m){case fs:{let y=f;switch(p){case"bigint":m=R0,y=f.toString();break;case"number":if(!f&&hE(f,-0))return u.push(["-0"])-1;break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return s([M0],f)}return s([m,y],f)}case lu:{if(p){let w=f;return p==="DataView"?w=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(w=new Uint8Array(f)),s([p,[...w]],f)}const y=[],g=s([m,y],f);for(const w of f)y.push(d(w));return g}case is:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(r&&"toJSON"in f)return d(f.toJSON());const y=[],g=s([m,y],f);for(const w of dE(f))(n||!Xo(Ja(f[w])))&&y.push([d(w),d(f[w])]);return g}case Kd:return s([m,isNaN(f.getTime())?Xi:f.toISOString()],f);case Zd:{const{source:y,flags:g}=f;return s([m,{source:y,flags:g}],f)}case $d:{const y=[],g=s([m,y],f);for(const[w,v]of f)(n||!(Xo(Ja(w))||Xo(Ja(v))))&&y.push([d(w),d(v)]);return g}case Jd:{const y=[],g=s([m,y],f);for(const w of f)(n||!Xo(Ja(w)))&&y.push(d(w));return g}}const{message:x}=f;return s([m,{name:p,message:x}],f)};return d},my=(n,{json:r,lossy:a}={})=>{const u=[];return mE(!(r||a),!!r,new Map,u)(n),u},rs=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?hy(my(n,r)):structuredClone(n):(n,r)=>hy(my(n,r));function pE(n,r){const a=[{type:"text",value:"↩"}];return r>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),a}function gE(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function xE(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=n.options.footnoteBackContent||pE,u=n.options.footnoteBackLabel||gE,s=n.options.footnoteLabel||"Footnotes",d=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},m=[];let p=-1;for(;++p0&&N.push({type:"text",value:" "});let J=typeof a=="string"?a:a(p,v);typeof J=="string"&&(J={type:"text",value:J}),N.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+w+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(p,v),className:["data-footnote-backref"]},children:Array.isArray(J)?J:[J]})}const O=y[y.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const J=O.children[O.children.length-1];J&&J.type==="text"?J.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...N)}else y.push(...N);const C={type:"element",tagName:"li",properties:{id:r+"fn-"+w},children:n.wrap(y,!0)};n.patch(x,C),m.push(C)}if(m.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:d,properties:{...rs(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:n.wrap(m,!0)},{type:"text",value:` +`}]}}const ds=(function(n){if(n==null)return wE;if(typeof n=="function")return hs(n);if(typeof n=="object")return Array.isArray(n)?yE(n):bE(n);if(typeof n=="string")return vE(n);throw new Error("Expected function, string, or object as test")});function yE(n){const r=[];let a=-1;for(;++a":""))+")"})}return O;function O(){const C=!d||x(w,v,N[N.length-1]||void 0);let J=B0;if(m&&C&&(J=py(m(w,N,v)),J[0]===es))return J;if("children"in w&&w.children){const G=w;if(G.children&&J[0]!==Cd){let P=(s?-1:G.children.length)+y;const ae=[...N,G];for(;P>-1&&P0&&a.push({type:"text",value:` +`}),a}function gy(n){let r=0,a=n.charCodeAt(r);for(;a===9||a===32;)r++,a=n.charCodeAt(r);return n.slice(r)}function xy(n,r){const a=jE(n,r),u=a.one(n,void 0),s=xE(a),d=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return s&&d.children.push({type:"text",value:` +`},s),d}function zE(n,r){return n&&"run"in n?async function(a,u){const s=xy(a,{file:u,...r});await n.run(s,u)}:function(a,u){return xy(a,{file:u,...n||r})}}function yy(n){if(n)throw n}var td,by;function DE(){if(by)return td;by=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=function(x){return typeof Array.isArray=="function"?Array.isArray(x):r.call(x)==="[object Array]"},d=function(x){if(!x||r.call(x)!=="[object Object]")return!1;var y=n.call(x,"constructor"),g=x.constructor&&x.constructor.prototype&&n.call(x.constructor.prototype,"isPrototypeOf");if(x.constructor&&!y&&!g)return!1;var w;for(w in x);return typeof w>"u"||n.call(x,w)},f=function(x,y){a&&y.name==="__proto__"?a(x,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):x[y.name]=y.newValue},m=function(x,y){if(y==="__proto__")if(n.call(x,y)){if(u)return u(x,y).value}else return;return x[y]};return td=function p(){var x,y,g,w,v,N,D=arguments[0],O=1,C=arguments.length,J=!1;for(typeof D=="boolean"&&(J=D,D=arguments[1]||{},O=2),(D==null||typeof D!="object"&&typeof D!="function")&&(D={});Of.length;let p;m&&f.push(s);try{p=n.apply(this,f)}catch(x){const y=x;if(m&&a)throw y;return s(y)}m||(p&&p.then&&typeof p.then=="function"?p.then(d,s):p instanceof Error?s(p):d(p))}function s(f,...m){a||(a=!0,r(f,...m))}function d(f){s(null,f)}}const gl={basename:LE,dirname:BE,extname:UE,join:HE,sep:"/"};function LE(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');uu(n);let a=0,u=-1,s=n.length,d;if(r===void 0||r.length===0||r.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(d){a=s+1;break}}else u<0&&(d=!0,u=s+1);return u<0?"":n.slice(a,u)}if(r===n)return"";let f=-1,m=r.length-1;for(;s--;)if(n.codePointAt(s)===47){if(d){a=s+1;break}}else f<0&&(d=!0,f=s+1),m>-1&&(n.codePointAt(s)===r.codePointAt(m--)?m<0&&(u=s):(m=-1,u=f));return a===u?u=f:u<0&&(u=n.length),n.slice(a,u)}function BE(n){if(uu(n),n.length===0)return".";let r=-1,a=n.length,u;for(;--a;)if(n.codePointAt(a)===47){if(u){r=a;break}}else u||(u=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function UE(n){uu(n);let r=n.length,a=-1,u=0,s=-1,d=0,f;for(;r--;){const m=n.codePointAt(r);if(m===47){if(f){u=r+1;break}continue}a<0&&(f=!0,a=r+1),m===46?s<0?s=r:d!==1&&(d=1):s>-1&&(d=-1)}return s<0||a<0||d===0||d===1&&s===a-1&&s===u+1?"":n.slice(s,a)}function HE(...n){let r=-1,a;for(;++r0&&n.codePointAt(n.length-1)===47&&(a+="/"),r?"/"+a:a}function FE(n,r){let a="",u=0,s=-1,d=0,f=-1,m,p;for(;++f<=n.length;){if(f2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",u=0):(a=a.slice(0,p),u=a.length-1-a.lastIndexOf("/")),s=f,d=0;continue}}else if(a.length>0){a="",u=0,s=f,d=0;continue}}r&&(a=a.length>0?a+"/..":"..",u=2)}else a.length>0?a+="/"+n.slice(s+1,f):a=n.slice(s+1,f),u=f-s-1;s=f,d=0}else m===46&&d>-1?d++:d=-1}return a}function uu(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const VE={cwd:YE};function YE(){return"/"}function Dd(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function GE(n){if(typeof n=="string")n=new URL(n);else if(!Dd(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return QE(n)}function QE(n){if(n.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const r=n.pathname;let a=-1;for(;++a0){let[v,...N]=y;const D=u[w][1];zd(D)&&zd(v)&&(v=nd(!0,D,v)),u[w]=[x,v,...N]}}}}const ZE=new Wd().freeze();function ad(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function ud(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function od(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wy(n){if(!zd(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function ky(n,r,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Io(n){return $E(n)?n:new U0(n)}function $E(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function JE(n){return typeof n=="string"||PE(n)}function PE(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const WE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sy=[],Ny={allowDangerousHtml:!0},e5=/^(https?|ircs?|mailto|xmpp)$/i,t5=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function n5(n){const r=l5(n),a=i5(n);return r5(r.runSync(r.parse(a),a),n)}function l5(n){const r=n.rehypePlugins||Sy,a=n.remarkPlugins||Sy,u=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Ny}:Ny;return ZE().use(L3).use(a).use(zE,u).use(r)}function i5(n){const r=n.children||"",a=new U0;return typeof r=="string"&&(a.value=r),a}function r5(n,r){const a=r.allowedElements,u=r.allowElement,s=r.components,d=r.disallowedElements,f=r.skipHtml,m=r.unwrapDisallowed,p=r.urlTransform||a5;for(const y of t5)Object.hasOwn(r,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+WE+y.id,void 0);return Pd(n,x),kS(n,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function x(y,g,w){if(y.type==="raw"&&w&&typeof g=="number")return f?w.children.splice(g,1):w.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let v;for(v in Pf)if(Object.hasOwn(Pf,v)&&Object.hasOwn(y.properties,v)){const N=y.properties[v],D=Pf[v];(D===null||D.includes(y.tagName))&&(y.properties[v]=p(String(N||""),v,y))}}if(y.type==="element"){let v=a?!a.includes(y.tagName):d?d.includes(y.tagName):!1;if(!v&&u&&typeof g=="number"&&(v=!u(y,g,w)),v&&w&&typeof g=="number")return m&&y.children?w.children.splice(g,1,...y.children):w.children.splice(g,1),g}}}function a5(n){const r=n.indexOf(":"),a=n.indexOf("?"),u=n.indexOf("#"),s=n.indexOf("/");return r===-1||s!==-1&&r>s||a!==-1&&r>a||u!==-1&&r>u||e5.test(n.slice(0,r))?n:""}function u5(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function H0(n,r,a){const s=ds((a||{}).ignore||[]),d=o5(r);let f=-1;for(;++f0?{type:"text",value:U}:void 0),U===!1)v.lastIndex=P+1;else{if(D!==P&&G({type:"text",value:x.value.slice(D,P)}),Array.isArray(U))for(const R of U)G(R);else U&&G(U);D=P+J[0].length,O=!0}if(!v.global)break;J=v.exec(x.value)}return O?(D?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let a=r[0],u=a.indexOf(")");const s=Ey(n,"(");let d=Ey(n,")");for(;u!==-1&&s>d;)n+=a.slice(0,u+1),a=a.slice(u+1),u=a.indexOf(")"),d++;return[n,a]}function q0(n,r){const a=n.input.charCodeAt(n.index-1);return(n.index===0||Pi(a)||ss(a))&&(!r||a!==47)}F0.peek=O5;function j5(){this.buffer()}function C5(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function T5(){this.buffer()}function _5(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function A5(n){const r=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=tl(this.sliceSerialize(n)).toLowerCase(),a.label=r}function z5(n){this.exit(n)}function D5(n){const r=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=tl(this.sliceSerialize(n)).toLowerCase(),a.label=r}function M5(n){this.exit(n)}function O5(){return"["}function F0(n,r,a,u){const s=a.createTracker(u);let d=s.move("[^");const f=a.enter("footnoteReference"),m=a.enter("reference");return d+=s.move(a.safe(a.associationId(n),{after:"]",before:d})),m(),f(),d+=s.move("]"),d}function R5(){return{enter:{gfmFootnoteCallString:j5,gfmFootnoteCall:C5,gfmFootnoteDefinitionLabelString:T5,gfmFootnoteDefinition:_5},exit:{gfmFootnoteCallString:A5,gfmFootnoteCall:z5,gfmFootnoteDefinitionLabelString:D5,gfmFootnoteDefinition:M5}}}function L5(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:a,footnoteReference:F0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(u,s,d,f){const m=d.createTracker(f);let p=m.move("[^");const x=d.enter("footnoteDefinition"),y=d.enter("label");return p+=m.move(d.safe(d.associationId(u),{before:p,after:"]"})),y(),p+=m.move("]:"),u.children&&u.children.length>0&&(m.shift(4),p+=m.move((r?` +`:" ")+d.indentLines(d.containerFlow(u,m.current()),r?V0:B5))),x(),p}}function B5(n,r,a){return r===0?n:V0(n,r,a)}function V0(n,r,a){return(a?"":" ")+n}const U5=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];eh.attention=Y5;eh.peek=G5;function H5(){return{canContainEols:["delete"],enter:{strikethrough:F5},exit:{strikethrough:V5}}}function q5(){return{handlers:{delete:eh},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U5}]}}function F5(n){this.enter({type:"delete",children:[],position:void 0},n)}function V5(n){this.exit(n)}function eh(n,r,a,u){const s=a.createTracker(u),d=a.stack.includes("strikethrough")?"~":"~~",f=a.enter("strikethrough");let m=s.move(d);return m+=a.containerPhrasing(n,{...s.current(),before:m,after:"~"}),m+=s.move(d),f(),m}function Y5(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function G5(){return"~"}function Q5(n){return n.length}function X5(n,r){const a=r||{},u=(a.align||[]).concat(),s=a.stringLength||Q5,d=[],f=[],m=[],p=[];let x=0,y=-1;for(;++yx&&(x=n[y].length);++Cp[C])&&(p[C]=G)}D.push(J)}f[y]=D,m[y]=O}let g=-1;if(typeof u=="object"&&"length"in u)for(;++gp[g]&&(p[g]=J),v[g]=J),w[g]=G}f.splice(1,0,w),m.splice(1,0,v),y=-1;const N=[];for(;++y "),d.shift(2);const f=a.indentLines(a.containerFlow(n,d.current()),$5);return s(),f}function $5(n,r,a){return">"+(a?"":" ")+n}function J5(n,r){return Cy(n,r.inConstruct,!0)&&!Cy(n,r.notInConstruct,!1)}function Cy(n,r,a){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return a;let u=-1;for(;++uf&&(f=d):d=1,s=u+r.length,u=a.indexOf(r,s);return f}function W5(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^\n\r ]/.test(n.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(n.value))}function ej(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function tj(n,r,a,u){const s=ej(a),d=n.value||"";if(W5(n,a)){const g=a.enter("codeIndented"),w=a.indentLines(d,nj);return g(),w}const f=a.createTracker(u),m=s.repeat(Math.max(P5(d,s)+1,3)),p=a.enter("codeFenced"),x=s==="`"?"GraveAccent":"Tilde";let y=f.move(m);if(n.lang){const g=a.enter(`codeFencedLang${x}`);y+=f.move(a.safe(n.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(n.lang&&n.meta){const g=a.enter(`codeFencedMeta${x}`);y+=f.move(" "),y+=f.move(a.safe(n.meta,{before:y,after:` +`,encode:["`"],...f.current()})),g()}return y+=f.move(` +`),d&&(y+=f.move(d+` +`)),y+=f.move(m),p(),y}function nj(n,r,a){return(a?"":" ")+n}function th(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function lj(n,r,a,u){const s=th(a),d=s==='"'?"Quote":"Apostrophe",f=a.enter("definition");let m=a.enter("label");const p=a.createTracker(u);let x=p.move("[");return x+=p.move(a.safe(a.associationId(n),{before:x,after:"]",...p.current()})),x+=p.move("]: "),m(),!n.url||/[\0- \u007F]/.test(n.url)?(m=a.enter("destinationLiteral"),x+=p.move("<"),x+=p.move(a.safe(n.url,{before:x,after:">",...p.current()})),x+=p.move(">")):(m=a.enter("destinationRaw"),x+=p.move(a.safe(n.url,{before:x,after:n.title?" ":` +`,...p.current()}))),m(),n.title&&(m=a.enter(`title${d}`),x+=p.move(" "+s),x+=p.move(a.safe(n.title,{before:x,after:s,...p.current()})),x+=p.move(s),m()),f(),x}function ij(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function as(n){const r=n.codePointAt(0);return r===void 0?"":String.fromCodePoint(r)}function $r(n){const r=n.codePointAt(n.length-2);return r!==void 0&&r>65535?n.slice(-2):n.slice(-1)}function Y0(n){return"&#x"+n.toString(16).toUpperCase()+";"}function _y(n,r,a){const u=gi(n),s=gi(r);return u===void 0?s===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function rj(n){if(n.charCodeAt(0)!==60)return;const r=n.charCodeAt(1);if(r===33){const m=n.charCodeAt(2);return m===45?2:m===91?5:Kt(m)?4:void 0}if(r===63)return 3;const a=r===47,u=a?2:1;let s=u,d=n.charCodeAt(s);if(!Kt(d))return;for(;d===45||Zt(d);)d=n.charCodeAt(++s);const f=n.slice(u,s).toLowerCase();return!a&&d!==47&&jd.includes(f)?1:j0.includes(f)?6:7}const aj=new Map([["*",!1],["_",!0]]);function uj(n,r,a){const u=new Set;for(const d of n){const f=a.get(d);if(f&&d.attention&&r.some(m=>m.attention===d.attention))for(const m of f.tokens)u.add(m.attention)}const s=[];for(const d of n)d.attention&&u.delete(d.attention)&&s.push(d.attention);return s.reverse(),s}function G0(n,r,a){const u=[],s=new Map,d=new Map;let f=0;for(;fa.index)return{chosen:p,mistake:y,tokens:x}}}}function sj(n,r){const a=new Map;for(const u of n){const s=u.tokens[0].value.charAt(0);let d=a.get(s);d||(d=[],a.set(s,d));let f=u.close?d.length:0;for(;f--&&u.start1&&x>1?2:1:x,g=m.markers.slice(m.end-y,m.end),w=u.markers.slice(u.start,u.start+y),v=g[0],N=w[0];if(v===g[y-1]&&v.value.length===y&&N===w[y-1]&&N.value.length===y&&v.attention===N.attention)r.delete(v),r.delete(N);else{const D=[...new Set([...g,...w])];for(const O of D){const C=r.get(O);C&&C.push(...D)}}m.end-=y,u.start+=y,m.start===m.end&&d.splice(f,1),f=d.length}u.open&&u.start0?N[0].value:"",O=_y(w.charCodeAt(w.length-1),D.charCodeAt(0),y);O.inside&&Ko(N,!0);const C=N.length>0?$r(N[N.length-1].value):"",J=_y(v.charCodeAt(0),C.charCodeAt(C.length-1),y);J.inside&&Ko(N,!1),O.outside&&w!==` +`&&w!=="\r"&&Ko(s,!1),J.outside&&(d=v),s.push({value:x,attention:p},...N,{value:x,attention:p}),f=x.charAt(x.length-1)}return s}function ms(n,r,a){let u=new Map;const s=lh(n,u,r,a);let d=s,f=G0(d,r,a);for(;f;){const p=oj(n,u,f,r,a);if(!p){d=s;break}u=p.chosen,d=p.tokens,f=p.mistake}let m="";for(const p of d)m+=p.value;return m}ih.attention=Q0;ih.peek=dj;function ih(n,r,a,u){const s=a.enter("phrasing"),d=nh(n,Q0,a,a.createTracker(u)),f=ms([d],u.before,u.after);return s(),f}function Q0(n,r){return{construct:"emphasis",markers:ij(r)==="*"?["*","_"]:["_","*"],sizes:[1]}}function dj(n,r,a){return a.options.emphasis||"*"}function hj(n,r){let a=!1;return Pd(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return a=!0,es}),!!((!n.depth||n.depth<3)&&Qd(n)&&(r.options.setext||a))}function mj(n,r,a,u){const s=Math.max(Math.min(6,n.depth||1),1),d=a.createTracker(u);if(hj(n,a)){const g=a.enter("headingSetext"),w=a.enter("phrasing"),v=a.containerPhrasing(n,{...d.current(),before:` +`,after:` +`});return w(),g(),v+` +`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(` +`))+1))}const f="#".repeat(s),m=a.enter("headingAtx"),p=a.enter("phrasing");d.move(f+" ");let x=a.containerPhrasing(n,{before:"# ",after:` +`,...d.current()});const y=x.charCodeAt(0);return(y===9||y===32)&&(x=Y0(y)+x.slice(1)),x=x?f+" "+x:f,a.options.closeAtx&&(x+=" "+f),p(),m(),x}X0.peek=pj;function X0(n){return n.value||""}function pj(){return"<"}I0.peek=gj;function I0(n,r,a,u){const s=th(a),d=s==='"'?"Quote":"Apostrophe",f=a.enter("image");let m=a.enter("label");const p=a.createTracker(u);let x=p.move("![");return x+=p.move(a.safe(n.alt,{before:x,after:"]",...p.current()})),x+=p.move("]("),m(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(m=a.enter("destinationLiteral"),x+=p.move("<"),x+=p.move(a.safe(n.url,{before:x,after:">",...p.current()})),x+=p.move(">")):(m=a.enter("destinationRaw"),x+=p.move(a.safe(n.url,{before:x,after:n.title?" ":")",...p.current()}))),m(),n.title&&(m=a.enter(`title${d}`),x+=p.move(" "+s),x+=p.move(a.safe(n.title,{before:x,after:s,...p.current()})),x+=p.move(s),m()),x+=p.move(")"),f(),x}function gj(){return"!"}K0.peek=xj;function K0(n,r,a,u){const s=n.referenceType,d=a.enter("imageReference");let f=a.enter("label");const m=a.createTracker(u);let p=m.move("![");const x=a.safe(n.alt,{before:p,after:"]",...m.current()});p+=m.move(x+"]["),f();const y=a.stack;a.stack=y.filter(function(w){return w!=="phrasing"}),f=a.enter("reference");const g=a.safe(a.associationId(n),{before:p,after:"]",...m.current()});return f(),a.stack=y,d(),s==="full"||!x||x!==g?p+=m.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function xj(){return"!"}Z0.peek=yj;function Z0(n,r,a){let u=n.value||"",s="`",d=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(u);)s+="`";for(/[^\n\r ]/.test(u)&&(/^[\n\r ]/.test(u)&&/[\n\r ]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++d\u007F]/.test(n.url))}J0.peek=bj;function J0(n,r,a,u){const s=th(a),d=s==='"'?"Quote":"Apostrophe",f=a.createTracker(u);if($0(n,a)){const N=a.stack;a.stack=N.filter(function(C){return C!=="phrasing"});const D=a.enter("autolink");let O=f.move("<");return O+=f.move(a.containerPhrasing(n,{before:O,after:">",...f.current()})),O+=f.move(">"),D(),a.stack=N,O}const m=a.enter("link");let p=a.enter("label"),x=f.move("[");const y=a.containerPhrasing(n,{before:x,after:"](",...f.current()});x+=f.move(y),p(),x+=f.move("](");const g=/[\0- \u007F]/.test(n.url),w=u.before.charAt(u.before.length-1);let v=n.title||void 0;if(!v&&!g&&(w===` +`||w==="\r")){let N=0;for(;N",...f.current()})),x+=f.move(">")):(p=a.enter("destinationRaw"),x+=f.move(a.safe(n.url,{before:x,after:typeof v=="string"?" ":")",...f.current()}))),p(),typeof v=="string"&&(p=a.enter(`title${d}`),x+=f.move(" "+s),x+=f.move(a.safe(v,{before:x,after:s,...f.current()})),x+=f.move(s),p()),x+=f.move(")"),m(),x}function bj(n,r,a){return $0(n,a)?"<":"["}P0.peek=vj;function P0(n,r,a,u){const s=n.referenceType,d=a.enter("linkReference");let f=a.enter("label");const m=a.createTracker(u);let p=m.move("[");const x=a.containerPhrasing(n,{before:p,after:"]",...m.current()});p+=m.move(x+"]["),f();const y=a.stack;a.stack=y.filter(function(w){return w!=="phrasing"}),f=a.enter("reference");const g=a.safe(a.associationId(n),{before:p,after:"]",...m.current()});return f(),a.stack=y,d(),s==="full"||!x||x!==g?p+=m.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function vj(){return"["}function rh(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function wj(n){const r=rh(n),a=n.options.bulletOther;if(!a)return r==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+a+"`) to be different");return a}function kj(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function W0(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function Sj(n,r,a,u){const s=a.enter("list"),d=a.bulletCurrent;let f=n.ordered?kj(a):rh(a);const m=n.ordered?f==="."?")":".":wj(a);let p=r&&a.bulletLastUsed?f===a.bulletLastUsed:!1;if(!n.ordered){const y=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),W0(a)===f&&y){let g=-1;for(;++g-1?r.start:1)+(a.options.incrementListMarker===!1?0:r.children.indexOf(n))+d);let f=d.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const m=a.createTracker(u);m.move(d+" ".repeat(f-d.length)),m.shift(f);const p=a.enter("listItem"),x=a.indentLines(a.containerFlow(n,m.current()),y);return p(),x;function y(g,w,v){return w?(v?"":" ".repeat(f))+g:(v?d:d+" ".repeat(f-d.length))+g}}function jj(n,r,a,u){const s=a.enter("paragraph"),d=a.enter("phrasing"),f=a.containerPhrasing(n,u);return d(),s(),f}function Cj(n,r,a,u){if(!n.children.some(function(m){return K5(m)}))return a.containerFlow(n,u);const d=a.enter("phrasing"),f=a.containerPhrasing(n,u);return d(),f}function Tj(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}ah.attention=eb;ah.peek=_j;function ah(n,r,a,u){const s=a.enter("phrasing"),d=nh(n,eb,a,a.createTracker(u)),f=ms([d],u.before,u.after);return s(),f}function eb(n,r){return{construct:"strong",markers:Tj(r)==="*"?["*","_"]:["_","*"],sizes:[2]}}function _j(n,r,a){return a.options.strong||"*"}function Aj(n,r,a,u){const s=r?r.children:[],d=a.indexStack[a.indexStack.length-1];return a.safe(n.value,{...u,afterNode:s[d+1],beforeNode:s[d-1]})}function zj(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function Dj(n,r,a){const u=(W0(a)+(a.options.ruleSpaces?" ":"")).repeat(zj(a));return a.options.ruleSpaces?u.slice(0,-1):u}const tb={blockquote:Z5,break:Ty,code:tj,definition:lj,emphasis:ih,hardBreak:Ty,heading:mj,html:X0,image:I0,imageReference:K0,inlineCode:Z0,link:J0,linkReference:P0,list:Sj,listItem:Ej,paragraph:jj,root:Cj,strong:ah,text:Aj,thematicBreak:Dj};function Mj(){return{enter:{table:Oj,tableData:Ay,tableHeader:Ay,tableRow:Lj},exit:{codeText:Bj,table:Rj,tableData:dd,tableHeader:dd,tableRow:dd}}}function Oj(n){const r=n._align;this.enter({type:"table",align:r.map(function(a){return a==="none"?null:a}),children:[]},n),this.data.inTable=!0}function Rj(n){this.exit(n),this.data.inTable=void 0}function Lj(n){this.enter({type:"tableRow",children:[]},n)}function dd(n){this.exit(n)}function Ay(n){this.enter({type:"tableCell",children:[]},n)}function Bj(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,Uj));const a=this.stack[this.stack.length-1];a.type,a.value=r,this.exit(n)}function Uj(n,r){return r==="|"?r:n}function Hj(n){const r=n||{},a=r.tableCellPadding,u=r.tablePipeAlign,s=r.stringLength,d=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:f,tableCell:p,tableRow:m}};function f(v,N,D,O){return x(y(v,D,O),v.align)}function m(v,N,D,O){const C=g(v,D,O),J=x([C]);return J.slice(0,J.indexOf(` +`))}function p(v,N,D,O){const C=D.enter("tableCell"),J=D.enter("phrasing"),G=D.containerPhrasing(v,{...O,before:d,after:d});return J(),C(),G}function x(v,N){return X5(v,{align:N,alignDelimiters:u,padding:a,stringLength:s})}function y(v,N,D){const O=v.children;let C=-1;const J=[],G=N.enter("table");for(;++C0&&!a&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const l4={tokenize:f4,partial:!0};function i4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:o4,continuation:{tokenize:s4},exit:c4}},text:{91:{name:"gfmFootnoteCall",tokenize:u4},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:r4,resolveTo:a4}}}}function r4(n,r,a){const u=this;let s=u.events.length;const d=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;s--;){const p=u.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return m;function m(p){if(!f||!f._balanced)return a(p);const x=tl(u.sliceSerialize({start:f.end,end:u.now()}));return x.codePointAt(0)!==94||!d.includes(x.slice(1))?a(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),r(p))}}function a4(n,r){let a=n.length;for(;a--;)if(n[a][1].type==="labelImage"&&n[a][0]==="enter"){n[a][1];break}n[a+1][1].type="data",n[a+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},n[a+3][1].start),end:Object.assign({},n[n.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},n[a+3][1].end),end:Object.assign({},n[a+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const d={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},d.start),end:Object.assign({},d.end)},m=[n[a+1],n[a+2],["enter",u,r],n[a+3],n[a+4],["enter",s,r],["exit",s,r],["enter",d,r],["enter",f,r],["exit",f,r],["exit",d,r],n[n.length-2],n[n.length-1],["exit",u,r]];return n.splice(a,n.length-a+1,...m),n}function u4(n,r,a){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let d=0,f;return m;function m(g){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(g),n.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(n.enter("gfmFootnoteCallMarker"),n.consume(g),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",x)}function x(g){if(d>999||g===93&&!f||g===null||g===91||ht(g))return a(g);if(g===93){n.exit("chunkString");const w=n.exit("gfmFootnoteCallString");return s.includes(tl(u.sliceSerialize(w)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(g),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):a(g)}return ht(g)||(f=!0),d++,n.consume(g),g===92?y:x}function y(g){return g===91||g===92||g===93?(n.consume(g),d++,x):x(g)}}function o4(n,r,a){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let d,f=0,m;return p;function p(N){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(N),n.exit("gfmFootnoteDefinitionLabelMarker"),x}function x(N){return N===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(N),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",y):a(N)}function y(N){if(f>999||N===93&&!m||N===null||N===91||ht(N))return a(N);if(N===93){n.exit("chunkString");const D=n.exit("gfmFootnoteDefinitionLabelString");return d=tl(u.sliceSerialize(D)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(N),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),w}return ht(N)||(m=!0),f++,n.consume(N),N===92?g:y}function g(N){return N===91||N===92||N===93?(n.consume(N),f++,y):y(N)}function w(N){return N===58?(n.enter("definitionMarker"),n.consume(N),n.exit("definitionMarker"),s.includes(d)||s.push(d),We(n,v,"gfmFootnoteDefinitionWhitespace")):a(N)}function v(N){return r(N)}}function s4(n,r,a){return n.check(au,r,n.attempt(l4,r,a))}function c4(n){n.exit("gfmFootnoteDefinition")}function f4(n,r,a){const u=this;return We(n,s,"gfmFootnoteDefinitionIndent",5);function s(d){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(d):a(d)}}function d4(n){let a=(n||{}).singleTilde;const u={name:"strikethrough",tokenize:d,resolveAll:s};return a==null&&(a=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function s(f,m){let p=-1;for(;++p1?p(N):(f.consume(N),g++,v);if(g<2&&!a)return p(N);const O=f.exit("strikethroughSequenceTemporary"),C=gi(N);return O._open=!C||C===2&&!!D,O._close=!D||D===2&&!!C,m(N)}}}class h4{constructor(){this.map=[],this.index=new Map}add(r,a,u){m4(this,r,a,u)}consume(r){if(this.map.sort(function(d,f){return d[0]-f[0]}),this.map.length===0)return;let a=this.map.length;const u=[];for(;a>0;)a-=1,u.push(r.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),r.length=this.map[a][0];u.push(r.slice()),r.length=0;let s=u.pop();for(;s;){for(const d of s)r.push(d);s=u.pop()}this.map.length=0,this.index.clear()}}function m4(n,r,a,u){if(a===0&&u.length===0)return;const s=n.index.get(r);if(s){s[1]+=a,s[2].push(...u);return}const d=[r,a,u];n.map.push(d),n.index.set(r,d)}function p4(n,r){let a=!1;const u=[];for(;r-1;){const{type:ye}=u.events[le][1];if(ye==="lineEnding"||ye==="linePrefix")le--;else break}const V=le>-1?u.events[le][1].type:null,ce=V==="tableHead"||V==="tableRow"?U:p;return ce===U&&u.parser.lazy[u.now().line]?a(L):ce(L)}function p(L){return n.enter("tableHead"),n.enter("tableRow"),x(L)}function x(L){return L===124||(f=!0,d+=1),y(L)}function y(L){return L===null?a(L):Ce(L)?d>1?(d=0,u.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(L),n.exit("lineEnding"),v):a(L):qe(L)?We(n,y,"whitespace")(L):(d+=1,f&&(f=!1,s+=1),L===124?(n.enter("tableCellDivider"),n.consume(L),n.exit("tableCellDivider"),f=!0,y):(n.enter("data"),g(L)))}function g(L){return L===null||L===124||ht(L)?(n.exit("data"),y(L)):(n.consume(L),L===92?w:g)}function w(L){return L===92||L===124?(n.consume(L),g):g(L)}function v(L){return u.interrupt=!1,u.parser.lazy[u.now().line]?a(L):(n.enter("tableDelimiterRow"),f=!1,qe(L)?We(n,N,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):N(L))}function N(L){return L===45||L===58?O(L):L===124?(f=!0,n.enter("tableCellDivider"),n.consume(L),n.exit("tableCellDivider"),D):ae(L)}function D(L){return qe(L)?We(n,O,"whitespace")(L):O(L)}function O(L){return L===58?(d+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(L),n.exit("tableDelimiterMarker"),C):L===45?(d+=1,C(L)):L===null||Ce(L)?P(L):ae(L)}function C(L){return L===45?(n.enter("tableDelimiterFiller"),J(L)):ae(L)}function J(L){return L===45?(n.consume(L),J):L===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(L),n.exit("tableDelimiterMarker"),G):(n.exit("tableDelimiterFiller"),G(L))}function G(L){return qe(L)?We(n,P,"whitespace")(L):P(L)}function P(L){return L===124?N(L):L===null||Ce(L)?!f||s!==d?ae(L):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(L)):ae(L)}function ae(L){return a(L)}function U(L){return n.enter("tableRow"),R(L)}function R(L){return L===124?(n.enter("tableCellDivider"),n.consume(L),n.exit("tableCellDivider"),R):L===null||Ce(L)?(n.exit("tableRow"),r(L)):qe(L)?We(n,R,"whitespace")(L):(n.enter("data"),X(L))}function X(L){return L===null||L===124||ht(L)?(n.exit("data"),R(L)):(n.consume(L),L===92?ie:X)}function ie(L){return L===92||L===124?(n.consume(L),X):X(L)}}function y4(n,r){let a=-1,u=!0,s=0,d=[0,0,0,0],f=[0,0,0,0],m=!1,p=0,x,y,g;const w=new h4;for(;++aa[2]+1){const N=a[2]+1,D=a[3]-a[2]-1;n.add(N,D,[])}}n.add(a[3]+1,0,[["exit",g,r]])}return s!==void 0&&(d.end=Object.assign({},Xr(r.events,s)),n.add(s,0,[["exit",d,r]]),d=void 0),d}function Dy(n,r,a,u,s){const d=[],f=Xr(r.events,a);s&&(s.end=Object.assign({},f),d.push(["exit",s,r])),u.end=Object.assign({},f),d.push(["exit",u,r]),n.add(a+1,0,d)}function Xr(n,r){const a=n[r],u=a[0]==="enter"?"start":"end";return a[1][u]}const b4={name:"tasklistCheck",tokenize:w4};function v4(){return{text:{91:b4}}}function w4(n,r,a){const u=this;return s;function s(p){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?a(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),d)}function d(p){return ht(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),f):a(p)}function f(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),m):a(p)}function m(p){return Ce(p)?r(p):qe(p)?n.check({tokenize:k4},r,a)(p):a(p)}}function k4(n,r,a){return We(n,u,"whitespace");function u(s){return s===null?a(s):r(s)}}function S4(n){return p0([Kj(),i4(),d4(n),g4(),v4()])}const N4={};function E4(n){const r=this,a=n||N4,u=r.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),d=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(S4(a)),d.push(Gj()),f.push(Qj(a))}function j4(n){return n.replace(/\\n/g,` +`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\'/g,"'").replace(/\\\\/g,"\\")}const C4={h1:({children:n})=>h.jsx("h3",{className:"mt-3 mb-1.5 text-base font-bold text-ink first:mt-0",children:n}),h2:({children:n})=>h.jsx("h4",{className:"mt-3 mb-1 text-sm font-semibold text-ink first:mt-0",children:n}),h3:({children:n})=>h.jsx("h5",{className:"mt-2 mb-1 text-xs font-semibold text-ink first:mt-0",children:n}),p:({children:n})=>h.jsx("p",{className:"my-1.5 leading-relaxed first:mt-0 last:mb-0",children:n}),strong:({children:n})=>h.jsx("strong",{className:"font-semibold text-ink",children:n}),em:({children:n})=>h.jsx("em",{className:"italic text-ink-secondary",children:n}),del:({children:n})=>h.jsx("del",{className:"text-ink-muted line-through",children:n}),a:({children:n,href:r})=>h.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-chip-indigo-text underline underline-offset-2 hover:text-ink",children:n}),code:({children:n,className:r})=>h.jsx("code",{className:`break-words rounded bg-elevated px-1 py-0.5 font-mono text-chip-indigo-text whitespace-pre-wrap ${r??""}`,children:n}),pre:({children:n})=>h.jsx("pre",{className:"my-2 overflow-x-auto rounded-lg border border-line bg-elevated p-3 font-mono text-xs text-ink [&_code]:bg-transparent [&_code]:px-0 [&_code]:py-0 [&_code]:text-inherit",children:n}),ul:({children:n})=>h.jsx("ul",{className:"my-1.5 list-disc space-y-0.5 pl-5",children:n}),ol:({children:n})=>h.jsx("ol",{className:"my-1.5 list-decimal space-y-0.5 pl-5",children:n}),li:({children:n})=>h.jsx("li",{className:"leading-relaxed",children:n}),blockquote:({children:n})=>h.jsx("blockquote",{className:"my-2 border-l-2 border-line-strong pl-3 text-ink-secondary italic",children:n}),table:({children:n})=>h.jsx("div",{className:"my-2 overflow-x-auto",children:h.jsx("table",{className:"w-full border-collapse text-xs",children:n})}),th:({children:n})=>h.jsx("th",{className:"border border-line bg-elevated px-2 py-1 text-left font-semibold",children:n}),td:({children:n})=>h.jsx("td",{className:"border border-line px-2 py-1 align-top",children:n}),hr:()=>h.jsx("hr",{className:"my-3 border-line"}),img:({alt:n,src:r,title:a})=>h.jsx("img",{src:r,alt:n,title:a,loading:"lazy",referrerPolicy:"no-referrer",className:"my-2 max-w-full rounded-lg border border-line"})};function $o({text:n}){return n?h.jsx(n5,{remarkPlugins:[E4,h5],components:C4,children:j4(n)}):null}function cb(n){return n==="completed"||n==="aborted"||n==="failed"}function Pa({label:n}){return h.jsx("kbd",{"aria-hidden":"true",className:"ml-1.5 inline-block rounded border border-line/60 bg-elevated/60 px-1 py-px font-mono text-[10px] font-normal leading-none opacity-90",children:n})}function My(n){!n||cb(n.status)||y2(n.session_id).catch(()=>{})}function T4({isOpen:n,onClose:r,directory:a,filename:u,release:s,args:d,onFinished:f}){var ue,B;const[m,p]=z.useState(null),[x,y]=z.useState(!1),[g,w]=z.useState(null),[v,N]=z.useState(null),D=z.useRef(null),O=z.useRef(!1),C=z.useRef(null),J=z.useRef(!1);z.useEffect(()=>{if(!n||!a||!u){p(null),w(null),N(null),J.current=!1;return}let I=!0;return y(!0),w(null),N(null),g2({directory:a,filename:u,release:s,args:d}).then($=>{I&&(p($),y(!1),($.status==="completed"||$.status==="aborted"||$.status==="failed")&&(f==null||f($.status,$.final_message||"")))}).catch($=>{I&&(w($.message||"Failed to start workflow"),y(!1))}),()=>{I=!1}},[n,a,u,s,d]);const G=async I=>{if(!(!m||O.current)){O.current=!0,y(!0);try{const $=await x2(m.session_id,I);p($),($.status==="completed"||$.status==="aborted"||$.status==="failed")&&(f==null||f($.status,$.final_message||""))}catch($){w($.message||"Failed to process workflow response")}finally{O.current=!1,y(!1)}}},P=z.useRef(m);P.current=m;const ae=z.useRef(G);ae.current=G;const U=z.useRef(v);U.current=v,z.useEffect(()=>()=>My(P.current),[]);const R=()=>{J.current||(J.current=!0,My(P.current),r())},X=Pr({isOpen:n,onClose:R,dialogRef:D,initialFocusRef:C});if(z.useEffect(()=>{if(!n)return;const I=$=>{var _;if($.key==="Escape"){$.preventDefault(),R();return}const ne=P.current;if(!ne||cb(ne.status)||O.current||$.repeat||$.ctrlKey||$.metaKey||$.altKey)return;const S=U.current,Fe=S===null||S===ne.current_index,Ve=ne.status==="waiting_ask"?"yes":ne.status==="waiting_notify"||ne.status==="waiting_notice"?"ack":null;if(!Fe||Ve===null)return;if($.key==="Enter"){const re=$.target;if((re==null?void 0:re.tagName)==="BUTTON"||((_=document.activeElement)==null?void 0:_.tagName)==="BUTTON")return;$.preventDefault(),ae.current(Ve);return}if(ne.status!=="waiting_ask")return;const A=$.key.toLowerCase();A==="y"?($.preventDefault(),ae.current("yes")):A==="s"?($.preventDefault(),ae.current("skip")):A==="n"&&($.preventDefault(),ae.current("no"))};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n,r]),z.useEffect(()=>{if(!n||!m)return;const I=requestAnimationFrame(()=>{var $;return($=C.current)==null?void 0:$.focus()});return()=>cancelAnimationFrame(I)},[n,m==null?void 0:m.status]),!n)return null;const ie=v!==null?m==null?void 0:m.steps[v]:m==null?void 0:m.steps[m.current_index],L=(m==null?void 0:m.status)==="completed"||(m==null?void 0:m.status)==="aborted"||(m==null?void 0:m.status)==="failed",le=!!m&&!L&&(((ue=m.status)==null?void 0:ue.startsWith("waiting"))??!1),V=(((B=m==null?void 0:m.steps[(m==null?void 0:m.current_index)??-1])==null?void 0:B.phase)??"pre")==="post",ye=(v===null||v===(m==null?void 0:m.current_index))&&(ie!=null&&ie.command)&&((m==null?void 0:m.status)==="waiting_notify"||(m==null?void 0:m.status)==="waiting_notice"||(m==null?void 0:m.status)==="waiting_ask")?h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Command:"}),h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 font-mono text-xs text-ink leading-relaxed",children:ie.command})]}):null;return h.jsx("div",{ref:D,role:"dialog","aria-modal":"true","aria-labelledby":"workflow-runner-title",onKeyDown:X,className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-xs",children:h.jsxs("div",{className:"animate-modal-in flex h-[80vh] w-full max-w-5xl flex-col rounded-xl border border-frame-line glass-panel overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-line px-5 py-3.5 bg-surface-strong/30 shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx("span",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-chip-indigo-bg text-chip-indigo-text",children:h.jsx(Jy,{className:"h-4 w-4"})}),h.jsxs("div",{children:[h.jsx("h2",{id:"workflow-runner-title",className:"text-sm font-semibold text-ink",children:"Launch Workflow Engine"}),h.jsxs("p",{className:"text-xs text-ink-muted",children:[u," ",m!=null&&m.pattern?`• Pattern: ${m.pattern}`:""]})]})]}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[m&&!L&&h.jsxs("button",{type:"button",disabled:!le||x,onClick:()=>G("bypass"),title:V?"Skip the remaining post-launch steps":"Skip the remaining steps and launch with the OS default app",className:"btn inline-flex items-center gap-1.5 rounded-md border border-line bg-surface px-3 py-1.5 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 disabled:cursor-not-allowed disabled:opacity-40",children:[h.jsx(Mw,{className:"h-3.5 w-3.5"}),V?"Skip rest":"Launch now"]}),h.jsx("button",{type:"button",onClick:R,className:"rounded-md p-1.5 text-ink-muted hover:bg-elevated hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:h.jsx(nl,{className:"h-4 w-4"})})]})]}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("div",{className:"w-72 border-r border-line bg-surface-strong/20 p-4 overflow-y-auto flex flex-col gap-2 shrink-0",children:[h.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-ink-muted px-1 mb-1",children:"Workflow Steps (Click to inspect)"}),m&&m.steps.length>0?m.steps.map((I,$)=>{const ne=m.current_index===$&&!L,S=v===$||v===null&≠return h.jsxs("button",{type:"button",onClick:()=>N($),className:`flex items-start text-left gap-2.5 rounded-lg border px-3 py-2.5 transition-colors cursor-pointer w-full ${S?"border-chip-indigo-border bg-chip-indigo-bg shadow-xs ring-1 ring-chip-indigo-border/40":"border-line/60 bg-surface/60 hover:bg-elevated/80"}`,children:[h.jsxs("div",{className:"mt-0.5 shrink-0",children:[I.status==="running"&&h.jsx($i,{className:"h-4 w-4 animate-spin text-chip-indigo-text"}),I.status==="completed"&&h.jsx(zx,{className:"h-4 w-4 text-status-success-text"}),I.status==="skipped"&&h.jsx(uw,{className:"h-4 w-4 text-status-warning-text"}),I.status==="failed"&&h.jsx(eu,{className:"h-4 w-4 text-status-danger-text"}),I.status==="pending"&&h.jsx("div",{className:"h-4 w-4 rounded-full border border-line-strong flex items-center justify-center text-[10px] text-ink-faint font-mono",children:I.index})]}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"font-mono text-[11px] font-bold uppercase text-chip-indigo-text",children:I.action}),h.jsxs("span",{className:"text-[10px] font-mono text-ink-faint",children:["#",I.index]})]}),h.jsx("p",{className:"truncate font-mono text-[11px] text-ink-secondary mt-0.5",title:I.command,children:I.message?I.message.split(` +`)[0]:I.command}),I.note&&h.jsx("p",{className:"mt-1 text-[10px] text-ink-faint italic",children:I.note})]})]},I.index)}):h.jsx("div",{className:"p-4 text-center text-xs text-ink-faint",children:"Loading steps..."})]}),h.jsxs("div",{className:"flex-1 flex flex-col bg-app",children:[h.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-6",children:h.jsxs("div",{className:"space-y-6",children:[g&&h.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-status-danger-border bg-status-danger-bg p-3 text-xs text-status-danger-text",children:[h.jsx(eu,{className:"h-4 w-4 shrink-0 mt-0.5"}),h.jsx("span",{children:g})]}),h.jsxs("div",{className:"rounded-xl border border-line bg-surface p-5 shadow-xs space-y-4",children:[h.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:"rounded bg-chip-indigo-bg px-2 py-0.5 font-mono text-xs font-semibold uppercase text-chip-indigo-text",children:(ie==null?void 0:ie.action)||(m==null?void 0:m.status)}),h.jsx("span",{className:"text-xs text-ink-muted",children:ie?`Step ${ie.index} of ${m==null?void 0:m.steps.length}`:"Status"}),v!==null&&v!==(m==null?void 0:m.current_index)&&h.jsx("button",{type:"button",onClick:()=>N(null),className:"text-[11px] text-chip-indigo-text hover:underline ml-2",children:"(Return to active step)"})]}),x&&h.jsx($i,{className:"h-4 w-4 animate-spin text-chip-indigo-text"})]}),h.jsxs("div",{className:"space-y-3 text-xs text-ink font-sans leading-relaxed",children:[(v===null||v===(m==null?void 0:m.current_index))&&(m==null?void 0:m.status)==="waiting_notify"&&m.notify_message&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Notification Message:"}),h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 text-ink",children:h.jsx($o,{text:m.notify_message})}),ye]}),(v===null||v===(m==null?void 0:m.current_index))&&(m==null?void 0:m.status)==="waiting_notice"&&m.notice_message&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Notice:"}),h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 text-ink",children:h.jsx($o,{text:m.notice_message})}),ye,h.jsx("p",{className:"text-[11px] text-ink-faint",children:"The command will run when you continue."})]}),(v===null||v===(m==null?void 0:m.current_index))&&(m==null?void 0:m.status)==="waiting_ask"&&m.ask_prompt&&h.jsxs("div",{className:"space-y-2",children:[m.ask_message&&h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 text-ink",children:h.jsx($o,{text:m.ask_message})}),h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-status-warning-text",children:"Confirmation Prompt:"}),h.jsx("div",{className:"rounded-lg border border-status-warning-border bg-status-warning-bg p-4 text-sm font-medium text-ink",children:m.ask_prompt}),ye]}),L&&v===null&&h.jsxs("div",{className:`rounded-xl border p-8 text-center space-y-4 ${(m==null?void 0:m.status)==="completed"?"border-status-success-border bg-status-success-bg text-status-success-text":"border-status-danger-border bg-status-danger-bg text-status-danger-text"}`,children:[h.jsx("div",{className:"inline-flex h-12 w-12 items-center justify-center rounded-full bg-surface/50 mx-auto",children:(m==null?void 0:m.status)==="completed"?h.jsx(zx,{className:"h-6 w-6 text-status-success-text"}):h.jsx(eu,{className:"h-6 w-6 text-status-danger-text"})}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("h3",{className:"text-base font-bold",children:(m==null?void 0:m.status)==="completed"?"Workflow Finished":"Workflow Terminated"}),h.jsx("p",{className:"text-xs text-ink-secondary max-w-md mx-auto",children:(m==null?void 0:m.final_message)||"The launch sequence has ended."})]}),h.jsx("div",{className:"pt-2",children:h.jsx("button",{type:"button",onClick:r,className:"btn btn-primary px-8 py-2.5 font-bold shadow-lg",children:"Close Engine Runner"})})]}),L&&v===null&&(m==null?void 0:m.last_output)&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Command Output:"}),h.jsx("pre",{className:"max-h-48 overflow-y-auto whitespace-pre-wrap break-words rounded-lg border border-line bg-surface-strong p-4 font-mono text-xs text-ink",children:m.last_output})]}),!(L&&v===null)&&!((v===null||v===(m==null?void 0:m.current_index))&&((m==null?void 0:m.status)==="waiting_notify"||(m==null?void 0:m.status)==="waiting_ask"||(m==null?void 0:m.status)==="waiting_notice"))&&h.jsxs("div",{className:"space-y-4",children:[(ie==null?void 0:ie.message)&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Message:"}),h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 text-xs text-ink",children:h.jsx($o,{text:ie.message})})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Command:"}),h.jsx("div",{className:"rounded-lg border border-line bg-surface-strong p-4 font-mono text-xs text-ink leading-relaxed",children:ie!=null&&ie.command?ie.command:"Waiting..."})]}),(ie==null?void 0:ie.output)&&h.jsxs("div",{className:"space-y-2",children:[h.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wider text-ink-muted",children:"Output:"}),h.jsx("pre",{className:"max-h-48 overflow-y-auto whitespace-pre-wrap break-words rounded-lg border border-line bg-surface-strong p-4 font-mono text-xs text-ink",children:ie.output})]}),(ie==null?void 0:ie.ask)&&h.jsxs("div",{className:"rounded-lg border border-status-warning-border bg-status-warning-bg p-3 text-xs text-status-warning-text",children:[h.jsx("span",{className:"font-semibold",children:"Workflow Guard:"})," ",ie.ask]}),(ie==null?void 0:ie.note)&&h.jsxs("div",{className:"rounded-lg border border-line bg-surface-strong p-3 text-xs text-ink-muted italic",children:[h.jsx("span",{className:"font-semibold text-ink-secondary not-italic uppercase text-[10px]",children:"Log:"})," ",ie.note]})]})]})]})]})}),h.jsxs("div",{className:"shrink-0 px-6 pt-4 pb-4 border-t border-line flex items-center justify-between bg-app",children:[h.jsx("div",{className:"text-xs text-ink-muted",children:(m==null?void 0:m.status)==="waiting_ask"&&(v===null||v===m.current_index)?"Action required to proceed:":(m==null?void 0:m.status)==="waiting_notify"&&(v===null||v===m.current_index)?"Acknowledge message to proceed:":(m==null?void 0:m.status)==="waiting_notice"&&(v===null||v===m.current_index)?"Continue to run the command:":L?"Session terminated.":"Step in progress..."}),h.jsxs("div",{className:"flex items-center gap-2",children:[(m==null?void 0:m.status)==="waiting_notice"&&(v===null||v===m.current_index)&&h.jsxs("button",{type:"button",ref:C,disabled:x,onClick:()=>G("ack"),className:"btn btn-primary px-5 py-2 font-semibold shadow-sm",children:["Run Command",h.jsx(Pa,{label:"↵"})]}),(m==null?void 0:m.status)==="waiting_notify"&&(v===null||v===m.current_index)&&h.jsxs("button",{type:"button",ref:C,disabled:x,onClick:()=>G("ack"),className:"btn btn-primary px-5 py-2 font-semibold shadow-sm",children:["Continue Workflow",h.jsx(Pa,{label:"↵"})]}),(m==null?void 0:m.status)==="waiting_ask"&&(v===null||v===m.current_index)&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",disabled:x,onClick:()=>G("no"),className:"btn rounded-md border-line bg-surface px-4 py-2 text-status-danger-text hover:bg-status-danger-bg",children:["Abort Launch",h.jsx(Pa,{label:"N"})]}),h.jsxs("button",{type:"button",disabled:x,onClick:()=>G("skip"),className:"btn rounded-md border-line bg-surface px-4 py-2 text-status-warning-text hover:bg-status-warning-bg",children:["Skip Step",h.jsx(Pa,{label:"S"})]}),h.jsxs("button",{type:"button",ref:C,disabled:x,onClick:()=>G("yes"),className:"btn btn-primary px-5 py-2 font-semibold shadow-sm",children:["Execute Step",h.jsx(Pa,{label:"Y"})]})]}),L&&h.jsx("button",{type:"button",ref:C,onClick:r,className:"btn btn-primary px-5 py-2 font-semibold shadow-sm",children:"Close Runner"})]})]})]})]})]})})}function _4({isOpen:n,title:r,message:a,confirmLabel:u="Confirm",cancelLabel:s="Cancel",danger:d=!1,onConfirm:f,onCancel:m}){const p=z.useRef(null),x=z.useRef(null),y=Pr({isOpen:n,onClose:m,dialogRef:p,initialFocusRef:x});return n?h.jsx("div",{className:"animate-overlay-in fixed inset-0 z-[var(--z-modal)] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onClick:m,children:h.jsxs("div",{ref:p,role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",onKeyDown:y,onClick:g=>g.stopPropagation(),className:"animate-modal-in w-[400px] max-w-full rounded-2xl border border-frame-line glass-panel p-5",children:[h.jsxs("div",{className:"mb-3 flex items-center gap-2.5",children:[h.jsx("span",{className:`grid h-9 w-9 shrink-0 place-items-center rounded-lg ${d?"bg-status-danger-bg text-status-danger-text":"bg-chip-indigo-bg text-chip-indigo-text"}`,children:h.jsx($y,{className:"h-5 w-5"})}),h.jsx("h2",{id:"confirm-dialog-title",className:"text-sm font-semibold text-ink",children:r})]}),h.jsx("p",{className:"mb-5 whitespace-pre-line text-xs text-ink-secondary",children:a}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsx("button",{ref:x,type:"button",onClick:m,className:"min-h-9 rounded-lg border border-line bg-elevated px-3.5 text-sm text-ink-secondary transition-colors hover:bg-surface-strong hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400",children:s}),h.jsx("button",{type:"button",onClick:f,className:`min-h-9 rounded-lg border px-4 text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 ${d?"border-status-danger-border bg-status-danger-bg/30 text-status-danger-text hover:bg-status-danger-bg/60":"btn-primary border-transparent bg-indigo-600 text-white hover:bg-indigo-500"}`,children:u})]})]})}):null}const A4=";",Oy="=";function z4(n){const r=n.trim().toLowerCase();return r==="extension"||r==="file_ext"||r==="filetype"?"ext":r==="directory"||r==="path"||r==="folder"?"dir":r==="recurse"||r==="recursive_search"?"recursive":r==="filter_text"||r==="query"||r==="search"?"filter":r}function Ry(n){const r=n.trim();if(!r.includes(Oy))return{values:{filter:r},isPlainFilter:!0};const a={};for(const u of r.split(A4)){const s=u.trim();if(!s)continue;const d=s.indexOf(Oy);if(d===-1)continue;const f=z4(s.slice(0,d)),m=s.slice(d+1).trim();switch(f){case"filter":a.filter=m;break;case"ext":a.ext=m;break;case"recursive":a.recursive=Ly(m,!0);break;case"dir":a.dir=m;break;case"scan":a.scan=Ly(m,!1);break}}return{values:a,isPlainFilter:!1}}function Ly(n,r){const a=n.toLowerCase();return["0","false","no","off"].includes(a)?!1:["1","true","yes","on"].includes(a)?!0:r}function Wa(n){return/[",\n\r]/.test(n)?`"${n.replace(/"/g,'""')}"`:n}function D4(n,r,a,u){var p,x;const s=[],f=[["Exported",new Date().toISOString()],["App Version",(a==null?void 0:a.release)??"unknown"],["Config File",(a==null?void 0:a.config_path)??"none"],["Config Exists",String((a==null?void 0:a.config_exists)??!1)],["Directory",(a==null?void 0:a.active_directory)??""],["Extensions",((p=a==null?void 0:a.extensions)==null?void 0:p.join(" | "))??""],["Filter Text",u??((x=a==null?void 0:a.filters)==null?void 0:x[0])??""],["Recursive",String((a==null?void 0:a.recursive_search)??!0)],["Title",(a==null?void 0:a.title)??""],["Release",(a==null?void 0:a.release)??""]];for(const[y,g]of f)s.push(`${Wa(y)},${Wa(g)}`);s.push("");const m=r.length>0?r:["filename","path","rel_path"];s.push(m.map(Wa).join(","));for(const y of n){const g=m.map(w=>w in y?Wa(String(y[w]??"")):Wa(y.column_values[w]??""));s.push(g.join(","))}return s.join(`\r +`)}const M4=120,By=800,O4=4e3,Uy=20;function R4(){const[n,r]=z.useState("dark"),[a,u]=z.useState(null),[s,d]=z.useState(null),[f,m]=z.useState(""),[p,x]=z.useState(""),[y,g]=z.useState(""),[w,v]=z.useState(!0),[N,D]=z.useState([]),[O,C]=z.useState(0),[J,G]=z.useState(!1),[P,ae]=z.useState(!1),[U,R]=z.useState(null),[X,ie]=z.useState(!1),[L,le]=z.useState(null),[V,ce]=z.useState(0),[ye,ue]=z.useState(!1),B=z.useRef(0),I=z.useRef(null),$=z.useRef(null),[ne,S]=z.useState(""),[Fe,Ve]=z.useState(null),[A,_]=z.useState(!1),[re,de]=z.useState(null),[ge,Ae]=z.useState(!1),[ke,ze]=z.useState("en"),[pe,Ne]=z.useState(!1),[$t,ln]=z.useState(!1),[kn,kt]=z.useState(!1),[tt,Ke]=z.useState(null),[Jt,Sn]=z.useState(null),[Pt,Lt]=z.useState(!1),[me,Re]=z.useState(!1),[Me,lt]=z.useState(null),[Z,oe]=z.useState(!1),be=z.useRef(""),[Te,St]=z.useState(!1),[it,jt]=z.useState(void 0),[qt,dn]=z.useState(!1),[rn,Gn]=z.useState(null),[ll,Ot]=z.useState(0),Ct=z.useRef(null),an=z.useRef(null),fe=(T,j="info")=>{T&&(de({message:T,kind:j}),an.current&&clearTimeout(an.current),an.current=setTimeout(()=>de(null),j==="error"?1e4:3500))},er=()=>{an.current&&clearTimeout(an.current),de(null)},Nn=()=>{var j;$.current&&(clearTimeout($.current),$.current=null),(j=I.current)==null||j.abort(),I.current=new AbortController;const T=++B.current;return ue(!0),ae(!1),T},yt=T=>T===B.current,hn=T=>{yt(T)&&ue(!1)},mn=z.useRef(null);z.useEffect(()=>{if(!y.trim()){S("");return}const T=window.setTimeout(()=>S(y),M4);return()=>window.clearTimeout(T)},[y]);const st=z.useMemo(()=>ne.trim()===""?N:N.filter(T=>gk(T.rel_path,ne)),[N,ne]),un=y.trim()&&N.length{const T=mn.current,j=T?st.findIndex(W=>W.path===T):-1;if(j>=0){ce(W=>j!==W?j:W);return}ce(W=>Math.min(W,Math.max(0,st.length-1)))},[st]);const Qn=async(T,j=L)=>{var we;const W=await If({offset:0,limit:Zf,sort_by:j==null?void 0:j.column,sort_dir:j==null?void 0:j.direction,signal:(we=I.current)==null?void 0:we.signal});return yt(T)?(D(W.items),C(W.count),G(!0),!0):!1},gt=async(T,j)=>{var W;return!yt(T)||(await Sx(j,(W=I.current)==null?void 0:W.signal),!yt(T)||!await Qn(T))?!1:(mn.current=null,ce(0),!0)},ps=async()=>{if(P||N.length>=O)return;const T=B.current;ae(!0);try{const j=await If({offset:N.length,limit:Zf,sort_by:L==null?void 0:L.column,sort_dir:L==null?void 0:L.direction});if(!yt(T))return;const W=new Set(N.map(we=>we.path||we.filename));D(we=>[...we,...j.items.filter(Ze=>!W.has(Ze.path||Ze.filename))]),C(j.count)}catch{fe("Couldn't load more results — scroll to try again.","error")}finally{yt(T)&&ae(!1)}},ou=async()=>{if(ge)return;Ae(!0),fe("Reloading configuration...");const T=Nn();try{const j=await vx();u(j);const W=await u2();d(W),r(_x(W.theme));const we=W.active_directory||f,Ze=W.extensions[0]??"",Ye=W.filters[0]??"";we&&m(we),x(Ze),g(Ye),v(W.recursive_search),W.reloaded===!1?fe(`Config file not found: ${W.config_path||"(unknown path)"} — kept current configuration.`,"error"):fe("Configuration reloaded."),we&&await gt(T,{directory:we,extension:Ze,filter_text:Ye,recursive:W.recursive_search})}catch(j){fe(`Failed to reload configuration: ${j.message}`,"error")}finally{Ae(!1),hn(T)}},ta=async T=>{const j=Nn();d(T),r(_x(T.theme));const W=T.active_directory||f||(T.directories[0]??""),we=T.extensions[0]??"",Ze=T.filters[0]??"";if(W&&m(W),x(we),g(Ze),v(T.recursive_search),T.session_trial||fe(T.config_exists?`Loaded config: ${T.config_path}`:"Starter configuration created."),W)try{await gt(j,{directory:W,extension:we,filter_text:Ze,recursive:T.recursive_search})}catch(Ye){fe(`Scan failed after config load: ${Ye.message}`,"error")}finally{hn(j)}else hn(j)},[tr,nr]=z.useState(!1),Ll=z.useRef(Jo()),Mn=T=>{Ll.current=T,nr(T.overlayVisible)},Bl=z.useRef(()=>{}),yi=async T=>{try{const j=await T.text(),W=await a2(T.name,j);await ta(W),fe(`Session config applied: ${T.name}`)}catch(j){fe(j.message||"Failed to apply dropped configuration","error")}};Bl.current=T=>{yi(T)};const lr=z.useRef(0),su=z.useRef(async()=>{});z.useEffect(()=>{su.current=async()=>{const T=await wx();await ta(T)}}),z.useEffect(()=>{const T=async()=>{let W=[];try{W=(await n2(lr.current)).events}catch{return}for(const we of W){if(lr.current=Math.max(lr.current,we.id),we.config_applied)try{await su.current()}catch{}fe(we.message)}},j=setInterval(()=>void T(),O4);return()=>clearInterval(j)},[]),z.useEffect(()=>{const T=Ye=>{var Ft;return Array.from(((Ft=Ye.dataTransfer)==null?void 0:Ft.types)??[]).includes("Files")},j=Ye=>{Mn(Tx(Ll.current,"enter",T(Ye)))},W=Ye=>{T(Ye)&&Ye.preventDefault()},we=Ye=>{Mn(Tx(Ll.current,"leave",T(Ye)))},Ze=Ye=>{var Je;Ye.preventDefault(),Mn(Jo());const Ft=Array.from(((Je=Ye.dataTransfer)==null?void 0:Je.files)??[]),je=w2(Ft);if(!je){Ft.length>0&&fe("Not a ProFiles configuration file.","error");return}Bl.current(je)};return window.addEventListener("dragenter",j),window.addEventListener("dragover",W),window.addEventListener("dragleave",we),window.addEventListener("drop",Ze),()=>{window.removeEventListener("dragenter",j),window.removeEventListener("dragover",W),window.removeEventListener("dragleave",we),window.removeEventListener("drop",Ze)}},[]);const cu=()=>{Ne(!0)},na=async T=>{const j=Nn();Ne(!1),m(T),fe(`Directory selected: ${T}`);let W;try{W=await kx(T),d(W)}catch(Ye){console.error("select-directory failed:",Ye)}if(!yt(j))return;const we=W!=null&&W.extensions.includes(p)?p:(W==null?void 0:W.extensions[0])??p,Ze=W!=null&&W.filters.includes(y)?y:(W==null?void 0:W.filters[0])??y;x(we),g(Ze);try{await gt(j,{directory:T,extension:we,filter_text:Ze,recursive:w})}catch(Ye){yt(j)&&fe(`Scan failed: ${Ye.message}`,"error")}finally{hn(j)}},bi=async(T,j)=>{if(!yt(j))return;const W=T.theme==="auto"?"dark":T.theme==="light"?"light":"dark";r(W);try{localStorage.setItem("profiles-theme",W)}catch{}d(T);const we=T.active_directory||(T.directories.length>0?T.directories[0]:""),Ze=T.extensions.length>0?T.extensions[0]:"",Ye=T.filters.length>0?T.filters[0]:"";if(we&&m(we),Ze&&x(Ze),T.recursive_search!==void 0&&v(T.recursive_search),Ye&&g(Ye),T.config_exists||ln(!0),we)try{await gt(j,{directory:we,extension:Ze,filter_text:Ye,recursive:T.recursive_search})}catch(Ft){yt(j)&&fe(`Initial scan failed: ${Ft.message}`,"error")}},fu=async()=>{var j;(j=I.current)==null||j.abort(),I.current=new AbortController;const T=++B.current;R(null),ie(!0);try{const W=await vx();u(W);const we=await wx();await bi(we,T)}catch(W){R((W==null?void 0:W.message)||"Couldn't fetch system info or configuration.")}finally{ie(!1)}};z.useEffect(()=>{fu()},[]),z.useEffect(()=>()=>{var T;$.current&&(clearTimeout($.current),$.current=null),(T=I.current)==null||T.abort()},[]);const vi=async T=>{const j=Nn();m(T);try{const W=await kx(T);if(!yt(j))return;d(W);const we=W.extensions.includes(p)?p:W.extensions[0]??"",Ze=W.filters.includes(y)?y:W.filters[0]??"";x(we),g(Ze),await gt(j,{directory:T,extension:we,filter_text:Ze,recursive:w})}catch(W){yt(j)&&fe(`Directory change failed: ${W.message}`,"error")}finally{hn(j)}},bl=async()=>{if(!f)return;const T=Nn();try{await gt(T,{directory:f,extension:p,filter_text:y,recursive:w})}catch(j){yt(T)&&fe(`Scan failed: ${(j==null?void 0:j.message)??j}`,"error")}finally{hn(T)}},vl=z.useRef(bl);z.useEffect(()=>{vl.current=bl});const la=T=>{g(T),$.current&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,vl.current()},By)},ia=T=>{v(T),$.current&&clearTimeout($.current),$.current=setTimeout(()=>{$.current=null,vl.current()},By)},du=async()=>{if(g(""),!f)return;const T=Nn();try{await gt(T,{directory:f,extension:p,filter_text:"",recursive:w})}catch(j){yt(T)&&fe(`Scan failed: ${(j==null?void 0:j.message)??j}`,"error")}finally{hn(T)}},hu=async()=>{if(v(!1),!f)return;const T=Nn();try{await gt(T,{directory:f,extension:p,filter_text:y,recursive:!1})}catch(j){yt(T)&&fe(`Scan failed: ${j.message}`,"error")}finally{hn(T)}},Wt=async(T,j)=>{if(T.has_hook){lt({file:T,args:j});return}try{await f2({directory:f,filename:T.rel_path,release:s==null?void 0:s.release,args:j}),fe(`Launched ${T.filename}`)}catch(W){fe(`Launch error: ${W.message}`,"error")}},Tt=()=>{st.length>0&&st[V]&&Wt(st[V])},en=T=>{var j;mn.current=((j=st[T])==null?void 0:j.path)??null,ce(T)},Ul=async(T,j)=>{Wt(T,j)},mu=async T=>{try{await qy(T.path),fe("Revealed in file manager.")}catch(j){fe(`Error: ${j.message}`,"error")}},gs=async T=>{try{await hd(T.path),fe("Folder opened in file manager.")}catch(j){fe(`Error: ${j.message}`,"error")}},xs=async T=>{try{const j=await Nx(T.path);fe(j.message||"Terminal opened.")}catch(j){fe(`Error: ${j.message}`,"error")}},pu=async T=>{try{await vi(T),fe(`Scanned directory: ${T}`)}catch(j){fe(`Error: ${j.message}`,"error")}},wi=T=>{g(T);const j=Nn();gt(j,{directory:f,extension:p,filter_text:T,recursive:w}).catch(W=>{yt(j)&&fe(`Scan failed: ${(W==null?void 0:W.message)??W}`,"error")}).finally(()=>hn(j))},ir=T=>{x(T);const j=Nn();gt(j,{directory:f,extension:T,filter_text:y,recursive:w}).catch(W=>{yt(j)&&fe(`Scan failed: ${(W==null?void 0:W.message)??W}`,"error")}).finally(()=>hn(j))},rr=async(T,j)=>{const W=j?T.path.replace(/\\/g,"/"):T.path;try{await navigator.clipboard.writeText(W),fe("Path copied to clipboard.")}catch(we){fe(`Copy failed: ${(we==null?void 0:we.message)??we}`,"error")}},wl=async(T,j)=>{let W=T.filename;if(j){const we=W.lastIndexOf(".");we!==-1&&(W=W.slice(0,we))}try{await navigator.clipboard.writeText(W),fe("Filename copied to clipboard.")}catch(we){fe(`Copy failed: ${(we==null?void 0:we.message)??we}`,"error")}},Hl=async(T,j)=>{try{fe(`Computing ${j.toUpperCase()}...`);const W=await Ex(T.path,j);await navigator.clipboard.writeText(W.hash),fe(`${j.toUpperCase()} hash copied: ${W.hash.slice(0,12)}...`)}catch(W){fe(`Hash computation failed: ${W.message}`,"error")}},ki=async T=>{try{const j=new URL("file:///").href+T.path.replace(/\\/g,"/");await navigator.clipboard.writeText(j),fe("File URI copied to clipboard.")}catch(j){fe(`URI copy failed: ${j.message}`,"error")}},ql=async(T,j)=>{try{const W=await navigator.clipboard.readText();if(!W.trim()){fe("Clipboard is empty — copy a hash first, then try again.");return}fe(`Computing ${j.toUpperCase()}...`);const Ze=(await Ex(T.path,j)).hash.toLowerCase()===W.trim().toLowerCase();fe(Ze?`✅ ${j.toUpperCase()} matches!`:`❌ ${j.toUpperCase()} mismatch`)}catch(W){fe(`Verification failed: ${W.message}`,"error")}},Nt=T=>{Sn(T),kt(!0)},gu=T=>{Ke(T)},xu=async()=>{const T=tt;if(Ke(null),!!T)try{if(fe("Deleting file..."),!(await fetch("/api/actions/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file_path:T.path})})).ok)throw new Error("Failed to delete file");fe("File deleted successfully."),bl()}catch(j){fe(`Delete failed: ${j.message}`,"error")}},yu=T=>{jt(T.path),St(!0)},il=async()=>{if(f)try{await hd(f),fe("Directory opened in file manager.")}catch(T){fe(`Error: ${T.message}`,"error")}},Fl=async T=>{if(T)try{await Nx(T),fe("Terminal opened in directory.")}catch(j){fe(`Error: ${j.message}`,"error")}},bu=async()=>{try{await vi("~"),fe("Directory set to home folder.")}catch(T){fe(`Error: ${T.message}`,"error")}},vu=async()=>{if(f)try{const T=await c2(f);T.parent_path?(await vi(T.parent_path),fe("Moved to parent directory.")):fe("Already at root directory.")}catch(T){fe(`Error: ${T.message}`,"error")}},wu=async()=>{if(N.length===0){fe("No files to export.");return}try{const T=D4(N,(s==null?void 0:s.column_names)||[],s??void 0,y),j=`profiles-export-${new Date().toISOString().slice(0,19).replace(/[:.]/g,"-")}.csv`,W=await m2(T,j);fe(`Exported ${N.length} loaded row${N.length===1?"":"s"}${y?` matching "${y}"`:""} — ${W.message}`)}catch(T){fe(`Export failed: ${T.message}`,"error")}},ys=async T=>{var je,Je;dn(!1),fe("Barcode detected!");const W=Ry(T).values,we=W.dir!==void 0?W.dir:f,Ze=W.ext!==void 0?W.ext:p,Ye=W.filter!==void 0?W.filter:y,Ft=W.recursive!==void 0?W.recursive:w;if(W.dir!==void 0&&m(W.dir),W.ext!==void 0&&x(W.ext),W.filter!==void 0&&g(W.filter),W.recursive!==void 0&&v(W.recursive),we){const rt=Nn();try{await Sx({directory:we,extension:Ze,filter_text:Ye,recursive:Ft},(je=I.current)==null?void 0:je.signal);const Xn=await If({offset:0,limit:Zf,sort_by:L==null?void 0:L.column,sort_dir:L==null?void 0:L.direction,signal:(Je=I.current)==null?void 0:Je.signal});if(!yt(rt))return;D(Xn.items),C(Xn.count),G(!0),mn.current=null,ce(0),Xn.count===1&&Xn.items.length===1&&Gn(Xn.items[0])}catch(Xn){yt(rt)&&fe(`Scan error: ${Xn.message}`,"error")}finally{hn(rt)}}},$e=()=>{oe(T=>{const j=!T;return j?(be.current="",fe("Barcode mode ON — scan a barcode now.")):(be.current="",fe("Barcode mode OFF.")),j})},ku=T=>{T.filter!==void 0&&g(T.filter),T.ext!==void 0&&x(T.ext),T.recursive!==void 0&&v(T.recursive),T.dir!==void 0&&m(T.dir),(T.scan===!0||T.filter!==void 0||T.ext!==void 0||T.recursive!==void 0||T.dir!==void 0)&&(oe(!1),be.current="",setTimeout(()=>{vl.current()},50))};z.useEffect(()=>{if(!Z)return;const T=j=>{const W=j.target;if(!(W instanceof HTMLElement&&(W.isContentEditable||W instanceof HTMLInputElement||W instanceof HTMLTextAreaElement||W instanceof HTMLSelectElement)))if(j.key==="Enter"){const Ze=be.current;if(!Ze){be.current="";return}j.preventDefault(),be.current="";const Ye=Ry(Ze);if(Ye.isPlainFilter)fe(`Barcode filter: ${Ye.values.filter}`),g(Ye.values.filter||""),oe(!1),setTimeout(()=>void vl.current(),50);else{const Ft=Ye.values,je=Object.entries(Ft).map(([Je,rt])=>`${Je}=${rt}`).join(", ");fe(`Barcode applied: ${je}`),ku(Ft)}}else j.key==="Escape"?(oe(!1),be.current="",fe("Barcode mode cancelled.")):j.key.length===1&&!j.ctrlKey&&!j.metaKey&&!j.altKey&&(be.current+=j.key)};return document.addEventListener("keydown",T,!0),()=>document.removeEventListener("keydown",T,!0)},[Z]),z.useEffect(()=>(ll>0&&(Ct.current=setInterval(()=>{vl.current()},ll*1e3)),()=>{Ct.current&&(clearInterval(Ct.current),Ct.current=null)}),[ll]);const ar=T=>{Ot(T),T>0?fe(`Auto-rescan every ${T}s.`):fe("Auto-rescan disabled.")},Si=!!(Fe||A||pe||$t||kn||Pt||me||Te||qt||rn||Me||tt);return z.useEffect(()=>{const T=j=>{var we,Ze,Ye,Ft;if(j.key==="Escape"){Ve(null),_(!1),Lt(!1),Re(!1),Mn(Jo());return}if(Si)return;if(j.ctrlKey&&!j.shiftKey&&j.key.toLowerCase()==="l"){j.preventDefault(),(we=document.querySelector("[data-testid='file-list']"))==null||we.focus();return}const W=j.target;if(!(W instanceof HTMLElement&&W.closest("button, a, [role='menuitem'], [role='option'], [role='columnheader'], [role='separator']"))){if(W instanceof HTMLInputElement||W instanceof HTMLSelectElement){j.key==="Enter"&&bl();return}if(j.key==="ContextMenu"||j.shiftKey&&j.key==="F10"){const je=st[V];if(!je)return;j.preventDefault();const Je=document.querySelector(`[data-row-index="${V}"]`),rt=Je==null?void 0:Je.getBoundingClientRect();Ve({x:rt?rt.left+24:24,y:rt?rt.top+rt.height/2:24,file:je});return}if(j.key==="F5"){j.preventDefault(),bl();return}if(j.ctrlKey&&j.key.toLowerCase()==="r"){j.preventDefault(),ou();return}if(j.ctrlKey&&j.key.toLowerCase()==="d"){j.preventDefault(),(Ze=document.querySelector("#directory-combobox"))==null||Ze.focus();return}if(j.ctrlKey&&j.key.toLowerCase()==="e"){j.preventDefault(),(Ye=document.querySelector("#extension-combobox"))==null||Ye.focus();return}if(j.ctrlKey&&j.key.toLowerCase()==="f"){j.preventDefault(),(Ft=document.querySelector("#filter-combobox"))==null||Ft.focus();return}if(j.ctrlKey&&j.shiftKey&&j.key.toLowerCase()==="l"){j.preventDefault(),Lt(je=>!je);return}if(j.ctrlKey&&j.key===","){j.preventDefault(),jx().then(je=>fe(je.message));return}if(j.ctrlKey&&j.shiftKey&&j.key.toLowerCase()==="t"){j.preventDefault(),r(je=>je==="dark"?"light":"dark");return}if(j.ctrlKey&&!j.shiftKey&&j.key.toLowerCase()==="b"){j.preventDefault(),oe(je=>!je);return}if(j.ctrlKey&&j.shiftKey&&j.key.toLowerCase()==="b"){j.preventDefault(),dn(je=>!je);return}if(j.ctrlKey&&!j.shiftKey&&j.key.toLowerCase()==="t"){j.preventDefault(),Re(!0);return}if(j.ctrlKey&&!j.shiftKey&&j.key.toLowerCase()==="h"){j.preventDefault(),bu();return}if(j.key==="?"||j.ctrlKey&&j.key==="/"){j.preventDefault(),_(je=>!je);return}if(j.key.toLowerCase()==="p"&&!j.ctrlKey&&!j.shiftKey&&!j.altKey){const je=st[V];je&&(j.preventDefault(),Nt(je));return}j.key==="ArrowDown"?(j.preventDefault(),ce(je=>{var rt;const Je=Math.min(je+1,Math.max(0,st.length-1));return mn.current=((rt=st[Je])==null?void 0:rt.path)??null,Je})):j.key==="ArrowUp"?(j.preventDefault(),ce(je=>{var rt;const Je=Math.max(je-1,0);return mn.current=((rt=st[Je])==null?void 0:rt.path)??null,Je})):j.key==="Home"?(j.preventDefault(),ce(je=>{var Je;return mn.current=((Je=st[0])==null?void 0:Je.path)??null,je===0?je:0})):j.key==="End"?(j.preventDefault(),ce(je=>{var rt;const Je=Math.max(0,st.length-1);return mn.current=((rt=st[Je])==null?void 0:rt.path)??null,je===Je?je:Je})):j.key==="PageUp"?(j.preventDefault(),ce(je=>{var rt;const Je=Math.max(je-Uy,0);return mn.current=((rt=st[Je])==null?void 0:rt.path)??null,Je})):j.key==="PageDown"?(j.preventDefault(),ce(je=>{var rt;const Je=Math.min(je+Uy,Math.max(0,st.length-1));return mn.current=((rt=st[Je])==null?void 0:rt.path)??null,Je})):j.key==="Enter"&&(j.preventDefault(),Tt())}};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[Si,st,V,f,p,y,w,Z]),z.useEffect(()=>{document.documentElement.setAttribute("data-theme",n);try{localStorage.setItem("profiles-theme",n)}catch{}},[n]),h.jsxs("div",{className:"flex h-dvh flex-col bg-elevated/30 p-1 font-sans text-ink transition-colors duration-200 sm:p-1.5",children:[h.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-frame-line bg-app shadow-[0_2px_6px_rgb(0_0_0/0.35)] transition-colors duration-200 sm:rounded-xl",children:[h.jsx(sk,{title:(s==null?void 0:s.title)||"",release:(s==null?void 0:s.release)||"",directories:(s==null?void 0:s.directories)||[],activeDirectory:f,onDirectoryChange:vi,onBrowseDirectory:cu,onGoToParentDirectory:vu,onGoToHomeDirectory:bu,onOpenActiveDirectory:il,onOpenTerminal:Fl}),h.jsx(yk,{extensions:(s==null?void 0:s.extensions)||[],activeExtension:p,onExtensionChange:x,filterOptions:(s==null?void 0:s.filters)||[],filterText:y,onFilterTextChange:la,recursive:w,onRecursiveChange:ia,onScan:bl,scanning:ye,barcodeMode:Z,onBarcodeToggle:$e,onCameraBarcodeClick:()=>dn(!0),autoRescanActive:ll>0,onTimerClick:()=>Re(!0)}),U?h.jsx(ck,{message:U,onRetry:()=>void fu(),retrying:X}):h.jsx(ok,{files:st,totalCount:O,rawLoadedCount:N.length,onLoadMore:ps,loadingMore:P,scanning:ye,hasScanned:J,activeDirectory:f,recursive:w,onDisableRecursive:hu,onOpenDirectory:il,onOpenConfig:()=>ln(!0),filterText:y,onClearFilter:du,columnHeaders:(s==null?void 0:s.column_headers)||[],columnNames:(s==null?void 0:s.column_names)||[],selectedIndex:V,onSelectIndex:en,prefilterNote:un,onLaunch:Wt,onContextMenu:(T,j,W)=>{T.preventDefault(),mn.current=j.path,ce(W),Ve({x:T.clientX,y:T.clientY,file:j})},rowColors:(s==null?void 0:s.row_colors)||[],sort:L,onSortChange:T=>{le(T),mn.current=null,ce(0);const j=Nn();Qn(j,T).catch(W=>{yt(j)&&fe(`Sort failed: ${W.message}`,"error")}).finally(()=>hn(j))}}),h.jsx(Pw,{onExecute:Tt,scanning:ye,scanningDirectory:f,hasSelection:st.length>0,fileCount:st.length,totalCount:O,toastMessage:re,onToastDismiss:er}),h.jsx(Hk,{systemInfo:a,fileCount:O,theme:n,onToggleTheme:()=>r(T=>T==="dark"?"light":"dark"),onOpenLog:()=>Lt(!0),onOpenConfig:async()=>{try{const T=await jx();fe(T.message)}catch(T){fe(`Failed to open config: ${T.message}`,"error")}},onLoadConfig:()=>ln(!0),onShowShortcuts:()=>_(!0),onReloadConfig:ou,onExport:wu,exportDisabled:N.length===0||ye,language:ke,onLanguageChange:ze,activeConfigName:s!=null&&s.config_path?s.config_path.split(/[\\/]/).pop()||s.config_path:void 0})]}),h.jsx(Nk,{isOpen:$t,activeConfigPath:s==null?void 0:s.config_path,configExists:s==null?void 0:s.config_exists,onClose:()=>ln(!1),onLoaded:ta}),h.jsx(ak,{visible:tr,onFileSelected:T=>Bl.current(T)}),h.jsx(rk,{isOpen:pe,initialPath:f,onClose:()=>Ne(!1),onSelect:na}),h.jsx(Ww,{position:Fe,onClose:()=>Ve(null),onLaunch:Wt,onLaunchWithArgs:Ul,onReveal:mu,onOpenFolder:gs,onOpenTerminal:xs,onScanDirectory:pu,onFilterFolder:wi,onFilterExtension:ir,onCopyPath:rr,onCopyFilename:wl,onCopyUri:ki,onComputeHash:Hl,onVerifyHash:ql,onProperties:Nt,onClearFile:gu,onGenerateBarcode:yu,showToast:fe}),h.jsx(Sk,{isOpen:A,onClose:()=>_(!1)}),h.jsx(_k,{isOpen:kn,file:Jt,onLaunch:Wt,onClose:()=>{kt(!1),Sn(null)}}),h.jsx(Fk,{isOpen:me,currentInterval:ll,onClose:()=>Re(!1),onSetInterval:ar}),h.jsx(kk,{isOpen:Pt,onClose:()=>Lt(!1),onOpenExternally:()=>{l2().then(T=>fe(T.message))}}),h.jsx(T4,{isOpen:!!Me,onClose:()=>lt(null),directory:f,filename:(Me==null?void 0:Me.file.rel_path)||"",release:s==null?void 0:s.release,args:Me==null?void 0:Me.args,onFinished:(T,j)=>{T==="completed"?fe(j||"Workflow launched successfully."):(T==="aborted"||T==="failed")&&fe(`Workflow stopped: ${j}`,"error")}}),h.jsx(Wy,{isOpen:Te,onClose:()=>{St(!1),jt(void 0)},initialFilePath:it}),h.jsx(Bk,{isOpen:qt,onClose:()=>dn(!1),onDetected:ys}),h.jsx(_4,{isOpen:!!tt,title:"Delete file",message:`Delete this file? + +${(tt==null?void 0:tt.path)??""} + +This action cannot be undone.`,confirmLabel:"Delete",danger:!0,onConfirm:xu,onCancel:()=>Ke(null)}),h.jsx(Uk,{isOpen:!!rn,file:rn,onConfirm:()=>{if(rn){const T=rn;Gn(null),Wt(T)}},onDismiss:()=>Gn(null)})]})}class L4 extends z.Component{constructor(){super(...arguments);sx(this,"state",{error:null})}static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,u){console.error("Application render error:",a,u.componentStack)}render(){return this.state.error?h.jsx("main",{className:"flex min-h-screen items-center justify-center bg-app p-6 text-ink",children:h.jsxs("section",{className:"w-full max-w-lg rounded-lg border border-line bg-surface p-6",children:[h.jsx("h1",{className:"text-base font-semibold",children:"ProFiles encountered an error"}),h.jsx("p",{className:"mt-2 text-sm text-ink-secondary",children:"The interface could not continue. Reload the application to try again."}),h.jsxs("details",{className:"mt-4 text-xs text-ink-muted",children:[h.jsx("summary",{className:"cursor-pointer",children:"Error details"}),h.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap",children:this.state.error.message})]}),h.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"btn btn-primary mt-5 px-4 py-2 text-sm font-semibold",children:"Reload application"})]})}):this.props.children}}t2.createRoot(document.getElementById("root")).render(h.jsx(Kv.StrictMode,{children:h.jsx(L4,{children:h.jsx(R4,{})})})); diff --git a/src/profiles/web/dist/assets/index-CcQFM_iR.css b/src/profiles/web/dist/assets/index-CcQFM_iR.css new file mode 100644 index 0000000..8d687d9 --- /dev/null +++ b/src/profiles/web/dist/assets/index-CcQFM_iR.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-900:oklch(20.8% .042 265.755);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-4xl:56rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.glass-panel{background:var(--app-glass-panel);-webkit-backdrop-filter:blur(24px)saturate(160%);backdrop-filter:blur(24px)saturate(160%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.glass-panel-strong{background:var(--app-glass-panel-strong);-webkit-backdrop-filter:blur(28px)saturate(180%);backdrop-filter:blur(28px)saturate(180%);box-shadow:var(--app-panel-shadow),inset 0 1px 0 var(--app-glass-highlight)}.btn{justify-content:center;align-items:center;gap:calc(var(--spacing) * 1.5);border-radius:var(--radius-md);border-style:var(--tw-border-style);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-width:1px;display:inline-flex}.btn:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn:focus-visible{--tw-outline-style:none;outline-style:none}.btn:disabled{cursor:not-allowed;opacity:.4}.btn-primary{background-color:var(--color-indigo-600);color:var(--color-white);border-color:#0000}@media(hover:hover){.btn-primary:hover{background-color:var(--color-indigo-500)}}.btn-secondary{border-color:var(--app-border);background-color:var(--app-elevated);color:var(--app-text-secondary)}@media(hover:hover){.btn-secondary:hover{border-color:var(--color-indigo-500);color:var(--app-text-primary)}.btn-chip:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.btn-chip:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.btn-chip:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.btn-chip:focus-visible{--tw-outline-style:none;outline-style:none}.btn-chip:disabled{cursor:not-allowed;opacity:.4}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#625fffb3}@supports (color:color-mix(in lab,red,red)){.focus-ring:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 70%, transparent)}}.focus-ring:focus-visible{--tw-outline-style:none;outline-style:none}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{inset-block:0}.-top-1{top:calc(var(--spacing) * -1)}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.right-0{right:0}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.-bottom-1{bottom:calc(var(--spacing) * -1)}.bottom-0{bottom:0}.bottom-2{bottom:calc(var(--spacing) * 2)}.-left-1{left:calc(var(--spacing) * -1)}.left-0{left:0}.left-1\/2{left:50%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\[calc\(var\(--z-context-menu\)-1\)\]{z-index:calc(var(--z-context-menu) - 1)}.z-\[var\(--z-combobox-list\)\]{z-index:var(--z-combobox-list)}.z-\[var\(--z-context-menu\)\]{z-index:var(--z-context-menu)}.z-\[var\(--z-drop-overlay\)\]{z-index:var(--z-drop-overlay)}.z-\[var\(--z-modal\)\]{z-index:var(--z-modal)}.z-\[var\(--z-syntax-helper\)\]{z-index:var(--z-syntax-helper)}.z-\[var\(--z-toast\)\]{z-index:var(--z-toast)}.z-\[var\(--z-tooltip\)\]{z-index:var(--z-tooltip)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-auto{margin-right:auto}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-video{aspect-ratio:var(--aspect-video)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-48{height:calc(var(--spacing) * 48)}.h-\[80vh\]{height:80vh}.h-\[min\(84dvh\,760px\)\]{height:min(84dvh,760px)}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100dvh-1\.5rem\)\]{max-height:calc(100dvh - 1.5rem)}.max-h-\[calc\(100dvh-16px\)\]{max-height:calc(100dvh - 16px)}.min-h-0{min-height:0}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-10{min-height:calc(var(--spacing) * 10)}.min-h-36{min-height:calc(var(--spacing) * 36)}.min-h-\[24px\]{min-height:24px}.min-h-\[44px\]{min-height:44px}.min-h-screen{min-height:100vh}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-\[52px\]{width:52px}.w-\[138px\]{width:138px}.w-\[150px\]{width:150px}.w-\[400px\]{width:400px}.w-\[420px\]{width:420px}.w-\[450px\]{width:450px}.w-\[clamp\(560px\,85vw\,1500px\)\]{width:clamp(560px,85vw,1500px)}.w-\[min\(94vw\,960px\)\]{width:min(94vw,960px)}.w-full{width:100%}.w-max{width:max-content}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.max-w-\[min\(70vw\,560px\)\]{max-width:min(70vw,560px)}.max-w-\[min\(80vw\,640px\)\]{max-width:min(80vw,640px)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-48{min-width:calc(var(--spacing) * 48)}.min-w-\[100px\]{min-width:100px}.min-w-\[220px\]{min-width:220px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.basis-64{flex-basis:calc(var(--spacing) * 64)}.basis-full{flex-basis:100%}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-chip-amber-border{border-color:var(--chip-amber-border)}.border-chip-fuchsia-border{border-color:var(--chip-fuchsia-border)}.border-chip-indigo-border,.border-chip-indigo-border\/50{border-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-indigo-border\/50{border-color:color-mix(in oklab,var(--chip-indigo-border) 50%,transparent)}}.border-chip-purple-border,.border-chip-purple-border\/50{border-color:var(--chip-purple-border)}@supports (color:color-mix(in lab,red,red)){.border-chip-purple-border\/50{border-color:color-mix(in oklab,var(--chip-purple-border) 50%,transparent)}}.border-chip-sky-border{border-color:var(--chip-sky-border)}.border-emerald-300\/50{border-color:#5ee9b580}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/50{border-color:color-mix(in oklab,var(--color-emerald-300) 50%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-frame-line{border-color:var(--app-frame-border)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-400\/80{border-color:#7d87ffcc}@supports (color:color-mix(in lab,red,red)){.border-indigo-400\/80{border-color:color-mix(in oklab,var(--color-indigo-400) 80%,transparent)}}.border-indigo-600{border-color:var(--color-indigo-600)}.border-line,.border-line\/40{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/40{border-color:color-mix(in oklab,var(--app-border) 40%,transparent)}}.border-line\/60{border-color:var(--app-border)}@supports (color:color-mix(in lab,red,red)){.border-line\/60{border-color:color-mix(in oklab,var(--app-border) 60%,transparent)}}.border-slate-500\/30{border-color:#62748e4d}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/30{border-color:color-mix(in oklab,var(--color-slate-500) 30%,transparent)}}.border-status-danger-border{border-color:var(--status-danger-border)}.border-status-success-border{border-color:var(--status-success-border)}.border-status-warning-border{border-color:var(--status-warning-border)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-app,.bg-app\/90{background-color:var(--app-bg)}@supports (color:color-mix(in lab,red,red)){.bg-app\/90{background-color:color-mix(in oklab,var(--app-bg) 90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/65{background-color:#000000a6}@supports (color:color-mix(in lab,red,red)){.bg-black\/65{background-color:color-mix(in oklab,var(--color-black) 65%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-chip-amber-bg{background-color:var(--chip-amber-bg)}.bg-chip-fuchsia-bg{background-color:var(--chip-fuchsia-bg)}.bg-chip-indigo-bg,.bg-chip-indigo-bg\/20{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.bg-chip-indigo-bg\/20{background-color:color-mix(in oklab,var(--chip-indigo-bg) 20%,transparent)}}.bg-chip-purple-bg{background-color:var(--chip-purple-bg)}.bg-chip-sky-bg{background-color:var(--chip-sky-bg)}.bg-elevated,.bg-elevated\/30{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/30{background-color:color-mix(in oklab,var(--app-elevated) 30%,transparent)}}.bg-elevated\/50{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/50{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.bg-elevated\/60{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-elevated\/60{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-800\/60{background-color:#005f4699}@supports (color:color-mix(in lab,red,red)){.bg-emerald-800\/60{background-color:color-mix(in oklab,var(--color-emerald-800) 60%,transparent)}}.bg-indigo-500\/5{background-color:#625fff0d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/5{background-color:color-mix(in oklab,var(--color-indigo-500) 5%,transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-ink-faint{background-color:var(--app-text-faint)}.bg-slate-600\/20{background-color:#45556c33}@supports (color:color-mix(in lab,red,red)){.bg-slate-600\/20{background-color:color-mix(in oklab,var(--color-slate-600) 20%,transparent)}}.bg-status-danger-bg,.bg-status-danger-bg\/30{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/30{background-color:color-mix(in oklab,var(--status-danger-bg) 30%,transparent)}}.bg-status-danger-bg\/40{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.bg-status-danger-bg\/40{background-color:color-mix(in oklab,var(--status-danger-bg) 40%,transparent)}}.bg-status-success-bg{background-color:var(--status-success-bg)}.bg-status-warning-bg{background-color:var(--status-warning-bg)}.bg-surface{background-color:var(--app-surface)}.bg-surface-glass{background-color:var(--app-glass)}.bg-surface-strong,.bg-surface-strong\/20{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/20{background-color:color-mix(in oklab,var(--app-glass-strong) 20%,transparent)}}.bg-surface-strong\/30{background-color:var(--app-glass-strong)}@supports (color:color-mix(in lab,red,red)){.bg-surface-strong\/30{background-color:color-mix(in oklab,var(--app-glass-strong) 30%,transparent)}}.bg-surface\/50{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/50{background-color:color-mix(in oklab,var(--app-surface) 50%,transparent)}}.bg-surface\/60{background-color:var(--app-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/60{background-color:color-mix(in oklab,var(--app-surface) 60%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-chip-indigo-bg{--tw-gradient-from:var(--chip-indigo-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400\/90{--tw-gradient-from:#00d294e6}@supports (color:color-mix(in lab,red,red)){.from-emerald-400\/90{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-400) 90%, transparent)}}.from-emerald-400\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-chip-purple-bg{--tw-gradient-to:var(--chip-purple-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600\/90{--tw-gradient-to:#009767e6}@supports (color:color-mix(in lab,red,red)){.to-emerald-600\/90{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-600) 90%, transparent)}}.to-emerald-600\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-1{padding-right:var(--spacing)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.align-\[1px\]{vertical-align:1px}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-chip-amber-text{color:var(--chip-amber-text)}.text-chip-fuchsia-text{color:var(--chip-fuchsia-text)}.text-chip-indigo-text{color:var(--chip-indigo-text)}.text-chip-purple-text{color:var(--chip-purple-text)}.text-chip-sky-text{color:var(--chip-sky-text)}.text-emerald-200{color:var(--color-emerald-200)}.text-ink{color:var(--app-text-primary)}.text-ink-faint{color:var(--app-text-faint)}.text-ink-muted,.text-ink-muted\/50{color:var(--app-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-ink-muted\/50{color:color-mix(in oklab,var(--app-text-muted) 50%,transparent)}}.text-ink-secondary{color:var(--app-text-secondary)}.text-ink\/70{color:var(--app-text-primary)}@supports (color:color-mix(in lab,red,red)){.text-ink\/70{color:color-mix(in oklab,var(--app-text-primary) 70%,transparent)}}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-900{color:var(--color-slate-900)}.text-status-danger-text,.text-status-danger-text\/60{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/60{color:color-mix(in oklab,var(--status-danger-text) 60%,transparent)}}.text-status-danger-text\/70{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/70{color:color-mix(in oklab,var(--status-danger-text) 70%,transparent)}}.text-status-danger-text\/80{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/80{color:color-mix(in oklab,var(--status-danger-text) 80%,transparent)}}.text-status-danger-text\/90{color:var(--status-danger-text)}@supports (color:color-mix(in lab,red,red)){.text-status-danger-text\/90{color:color-mix(in oklab,var(--status-danger-text) 90%,transparent)}}.text-status-success-text{color:var(--status-success-text)}.text-status-warning-text{color:var(--status-warning-text)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-ink-faint::placeholder{color:var(--app-text-faint)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_9999px_rgba\(0\,0\,0\,0\.45\)\]{--tw-shadow:0 0 0 9999px var(--tw-shadow-color,#00000073);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_6px_rgb\(0_0_0\/0\.35\)\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000059);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.12\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff1f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-app{--tw-ring-color:var(--app-bg)}.ring-chip-indigo-border\/40{--tw-ring-color:var(--chip-indigo-border)}@supports (color:color-mix(in lab,red,red)){.ring-chip-indigo-border\/40{--tw-ring-color:color-mix(in oklab, var(--chip-indigo-border) 40%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter\!{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[filter\,box-shadow\,transform\]{transition-property:filter,box-shadow,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-40:is(:where(.group):hover *){opacity:.4}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.selection\:bg-indigo-500 ::selection{background-color:var(--color-indigo-500)}.selection\:bg-indigo-500::selection{background-color:var(--color-indigo-500)}.selection\:text-white ::selection{color:var(--color-white)}.selection\:text-white::selection{color:var(--color-white)}.placeholder\:text-ink-faint::placeholder{color:var(--app-text-faint)}.first\:mt-0:first-child{margin-top:0}.last\:mb-0:last-child{margin-bottom:0}@media(hover:hover){.hover\:-translate-y-px:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-chip-indigo-border:hover{border-color:var(--chip-indigo-border)}.hover\:border-indigo-400:hover{border-color:var(--color-indigo-400)}.hover\:border-indigo-500:hover{border-color:var(--color-indigo-500)}.hover\:border-status-warning-border:hover{border-color:var(--status-warning-border)}.hover\:bg-chip-indigo-bg\/40:hover{background-color:var(--chip-indigo-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-chip-indigo-bg\/40:hover{background-color:color-mix(in oklab,var(--chip-indigo-bg) 40%,transparent)}}.hover\:bg-elevated:hover,.hover\:bg-elevated\/50:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/50:hover{background-color:color-mix(in oklab,var(--app-elevated) 50%,transparent)}}.hover\:bg-elevated\/60:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/60:hover{background-color:color-mix(in oklab,var(--app-elevated) 60%,transparent)}}.hover\:bg-elevated\/70:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/70:hover{background-color:color-mix(in oklab,var(--app-elevated) 70%,transparent)}}.hover\:bg-elevated\/80:hover{background-color:var(--app-elevated)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-elevated\/80:hover{background-color:color-mix(in oklab,var(--app-elevated) 80%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-hover-surface:hover{background-color:var(--app-hover)}.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:bg-indigo-600:hover{background-color:var(--color-indigo-600)}.hover\:bg-status-danger-bg:hover,.hover\:bg-status-danger-bg\/60:hover{background-color:var(--status-danger-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-danger-bg\/60:hover{background-color:color-mix(in oklab,var(--status-danger-bg) 60%,transparent)}}.hover\:bg-status-warning-bg:hover,.hover\:bg-status-warning-bg\/40:hover{background-color:var(--status-warning-bg)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-status-warning-bg\/40:hover{background-color:color-mix(in oklab,var(--status-warning-bg) 40%,transparent)}}.hover\:bg-surface:hover{background-color:var(--app-surface)}.hover\:bg-surface-strong:hover{background-color:var(--app-glass-strong)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:text-chip-indigo-text:hover{color:var(--chip-indigo-text)}.hover\:text-ink:hover{color:var(--app-text-primary)}.hover\:text-status-danger-text:hover{color:var(--status-danger-text)}.hover\:text-status-warning-text:hover{color:var(--status-warning-text)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-40:hover{opacity:.4}.hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_12px_30px_-6px_rgb\(16_185_129\/0\.7\)\]:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 12px 30px -6px var(--tw-shadow-color,#10b981b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:brightness-95:hover{--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-indigo-400:focus-visible{border-color:var(--color-indigo-400)}.focus-visible\:border-indigo-500:focus-visible{border-color:var(--color-indigo-500)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-emerald-400:focus-visible{--tw-ring-color:var(--color-emerald-400)}.focus-visible\:ring-indigo-400:focus-visible{--tw-ring-color:var(--color-indigo-400)}.focus-visible\:ring-indigo-500:focus-visible{--tw-ring-color:var(--color-indigo-500)}.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-indigo-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.focus-visible\:ring-status-danger-border:focus-visible{--tw-ring-color:var(--status-danger-border)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-app:focus-visible{--tw-ring-offset-color:var(--app-bg)}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-indigo-500:focus-visible{outline-color:var(--color-indigo-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:translate-y-0:disabled:hover{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.disabled\:hover\:text-ink-muted:disabled:hover{color:var(--app-text-muted)}.disabled\:hover\:shadow-\[inset_0_1px_0_rgb\(255_255_255\/0\.35\)\,0_8px_24px_-6px_rgb\(16_185_129\/0\.55\)\]:disabled:hover{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff59), 0 8px 24px -6px var(--tw-shadow-color,#10b9818c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\:hover\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-2xl{border-radius:var(--radius-2xl)}.sm\:rounded-xl{border-radius:var(--radius-xl)}.sm\:p-1\.5{padding:calc(var(--spacing) * 1.5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}}@media(min-width:64rem){.lg\:flex{display:flex}}.\[\&_code\]\:bg-transparent code{background-color:#0000}.\[\&_code\]\:px-0 code{padding-inline:0}.\[\&_code\]\:py-0 code{padding-block:0}.\[\&_code\]\:text-inherit code{color:inherit}.animate-modal-in{animation:.15s cubic-bezier(.2,.8,.2,1) modal-in}.animate-overlay-in{animation:.15s ease-out overlay-in}.animate-toast-in{animation:.12s ease-out toast-in}}:where(button,[role=button],input,select,textarea,a,summary,video[tabindex],[tabindex]):focus-visible{outline:2px solid var(--color-indigo-500,#6366f1);outline-offset:2px}:root{color-scheme:light dark;--z-combobox-list:60;--z-syntax-helper:65;--z-context-menu:70;--z-modal:80;--z-drop-overlay:85;--z-toast:90;--z-tooltip:100}:root,[data-theme=dark]{--app-bg:#020617;--app-surface:#0f172a;--app-elevated:#1e293b;--app-hover:#334155;--app-border:#334155;--app-frame-border:#94a3b84d;--app-text-primary:#f8fafc;--app-text-secondary:#cbd5e1;--app-text-muted:#94a3b8;--app-text-faint:#94a3b8;--app-glass:#0f172a99;--app-glass-strong:#020617e6;--app-glass-panel:#0f172ac7;--app-glass-panel-strong:#020617e0;--app-glass-highlight:#ffffff17;--app-panel-shadow:0 24px 60px -12px #0206178c;color-scheme:dark;--chip-indigo-bg:#6366f140;--chip-indigo-border:#818cf880;--chip-indigo-text:#c7d2fe;--chip-purple-bg:#a855f740;--chip-purple-border:#c084fc80;--chip-purple-text:#f3e8ff;--chip-fuchsia-bg:#c026d340;--chip-fuchsia-border:#e879f980;--chip-fuchsia-text:#f5d0fe;--chip-sky-bg:#0ea5e940;--chip-sky-border:#38bdf880;--chip-sky-text:#bae6fd;--chip-amber-bg:#f59e0b40;--chip-amber-border:#fbbf2480;--chip-amber-text:#fde68a;--status-success-bg:#10b98140;--status-success-border:#34d39980;--status-success-text:#a7f3d0;--status-warning-bg:#f59e0b40;--status-warning-border:#fbbf2480;--status-warning-text:#fde68a;--status-danger-bg:#f43f5e40;--status-danger-border:#fb718580;--status-danger-text:#fecdd3}[data-theme=light]{--chip-indigo-bg:#e0e7ff;--chip-indigo-border:#a5b4fc;--chip-indigo-text:#3730a3;--chip-purple-bg:#f3e8ff;--chip-purple-border:#d8b4fe;--chip-purple-text:#6b21a8;--chip-fuchsia-bg:#fae8ff;--chip-fuchsia-border:#f0abfc;--chip-fuchsia-text:#86198f;--chip-sky-bg:#e0f2fe;--chip-sky-border:#7dd3fc;--chip-sky-text:#0369a1;--chip-amber-bg:#fef3c7;--chip-amber-border:#fcd34d;--chip-amber-text:#92400e;--status-success-bg:#d1fae5;--status-success-border:#6ee7b7;--status-success-text:#065f46;--status-warning-bg:#fef3c7;--status-warning-border:#fcd34d;--status-warning-text:#92400e;--status-danger-bg:#ffe4e6;--status-danger-border:#fda4af;--status-danger-text:#9f1239;--app-bg:#f8fafc;--app-surface:#fff;--app-elevated:#f1f5f9;--app-hover:#e2e8f0;--app-border:#cbd5e1;--app-frame-border:#0f172a29;--app-text-primary:#0f172a;--app-text-secondary:#334155;--app-text-muted:#475569;--app-text-faint:#475569;--app-glass:#ffffffb3;--app-glass-strong:#f8fafcf2;--app-glass-panel:#fffc;--app-glass-panel-strong:#f8fafceb;--app-glass-highlight:#ffffffe6;--app-panel-shadow:0 24px 60px -18px #0f172a47;color-scheme:light}body{background-color:var(--app-bg);min-height:100vh;color:var(--app-text-primary);margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;transition:background-color .2s,color .2s}@media(prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@keyframes modal-in{0%{opacity:0;transform:translateY(4px)scale(.995)}to{opacity:1;transform:none}}@keyframes overlay-in{0%{opacity:0}to{opacity:1}}@keyframes toast-in{0%{opacity:0;translate:-50% calc(6px - 50%)}to{opacity:1;translate:-50% -50%}}*{scrollbar-color:var(--app-border) transparent;scrollbar-width:thin}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:var(--app-border);background-clip:content-box;border:2px solid #0000;border-radius:9999px}::-webkit-scrollbar-thumb:hover{background-color:var(--app-text-faint)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/src/profiles/web/dist/index.html b/src/profiles/web/dist/index.html index 4c69d43..26da138 100644 --- a/src/profiles/web/dist/index.html +++ b/src/profiles/web/dist/index.html @@ -5,8 +5,8 @@ ProFiles - - + +
diff --git a/src/profiles/web/dist/sw.js b/src/profiles/web/dist/sw.js index ba90d0e..c0fd788 100644 --- a/src/profiles/web/dist/sw.js +++ b/src/profiles/web/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const d=e=>i(e,t),l={module:{uri:t},exports:o,require:d};s[t]=Promise.all(n.map(e=>l[e]||d(e))).then(e=>(r(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"883b844dd25d5fbc7f95420a48c5dce3"},{url:"assets/index-QRvtM2rd.js",revision:null},{url:"assets/index-NlIXOAvu.css",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()}).then(()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(i[t])return;let o={};const l=e=>s(e,t),c={module:{uri:t},exports:o,require:l};i[t]=Promise.all(n.map(e=>c[e]||l(e))).then(e=>(r(...e),o))}}define(["./workbox-9c191d2f"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"3cd75bc1a240d63a2c86c9f36eb45ee5"},{url:"assets/index-CcQFM_iR.css",revision:null},{url:"assets/index-BRlfnag_.js",revision:null},{url:"manifest.webmanifest",revision:"5a42ebe8b55b07b5831cbbddda834829"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); diff --git a/src/profiles/web/src/index.css b/src/profiles/web/src/index.css index 985418c..47ef9b5 100644 --- a/src/profiles/web/src/index.css +++ b/src/profiles/web/src/index.css @@ -1,5 +1,17 @@ @import "tailwindcss"; +/* Baseline keyboard focus indicator: every interactive element shows a + visible outline on keyboard focus, even raw buttons that carry no + explicit focus utilities (WCAG 2.4.7). :where() keeps specificity at + zero, so elements that already handle focus locally — the .btn / + .focus-ring / focus-visible:ring utilities, which set + focus-visible:outline-none — keep their ring and suppress this one. + Outline follows border radius in modern browsers. */ +:where(button, [role="button"], input, select, textarea, a, summary, video[tabindex], [tabindex]):focus-visible { + outline: 2px solid var(--color-indigo-500, #6366f1); + outline-offset: 2px; +} + :root { color-scheme: dark light; } diff --git a/src/profiles/web/src/utils/useModalA11y.test.tsx b/src/profiles/web/src/utils/useModalA11y.test.tsx new file mode 100644 index 0000000..fb217f2 --- /dev/null +++ b/src/profiles/web/src/utils/useModalA11y.test.tsx @@ -0,0 +1,109 @@ +// @vitest-environment jsdom +import { afterEach, describe, expect, it, vi } from "vitest"; +import { cleanup, render, screen } from "@testing-library/react"; +import { useRef } from "react"; +import { useModalA11y } from "./useModalA11y"; + +/** Minimal dialog wired through the hook, with an app button "behind" it. */ +function Fixture({ onClose }: { onClose: () => void }) { + const dialogRef = useRef(null); + const handleDialogKeyDown = useModalA11y({ isOpen: true, onClose, dialogRef }); + return ( +
+ +
+ + + +
+
+ ); +} + +function pressTab(shift = false): void { + document.body.dispatchEvent( + new KeyboardEvent("keydown", { key: "Tab", bubbles: true, cancelable: true, shiftKey: shift }), + ); +} + +afterEach(() => { + cleanup(); + document.body.innerHTML = ""; +}); + +describe("useModalA11y focus trap", () => { + it("pulls focus into the dialog when Tab is pressed while focus is on body", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + expect(document.activeElement).toBe(document.body); + + pressTab(); + + // Focus lands on the first control INSIDE the dialog — never on the + // app behind the modal. + expect(document.activeElement?.id).toBe("first"); + }); + + it("Shift+Tab from body pulls focus to the last control", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + + pressTab(true); + + expect(document.activeElement?.id).toBe("last"); + }); + + it("wraps forward from the last focusable back to the first", () => { + render(); + screen.getByText("behind-app-button"); + (document.getElementById("last") as HTMLElement).focus(); + + pressTab(); + + expect(document.activeElement?.id).toBe("first"); + }); + + it("wraps backward with Shift+Tab from the first focusable", () => { + render(); + screen.getByText("behind-app-button"); + (document.getElementById("first") as HTMLElement).focus(); + + pressTab(true); + + expect(document.activeElement?.id).toBe("last"); + }); + + it("keeps focus inside the dialog across repeated Tabs", () => { + render(); + screen.getByText("behind-app-button"); + (document.activeElement as HTMLElement | null)?.blur?.(); + + pressTab(); + pressTab(); // last wrap edge (first → last) + pressTab(); + + const dialog = screen.getByRole("dialog"); + expect(dialog.contains(document.activeElement)).toBe(true); + }); + + it("Escape still closes when focus is inside the dialog", () => { + const onClose = vi.fn(); + render(); + screen.getByText("behind-app-button"); + (document.getElementById("first") as HTMLElement).focus(); + + document.getElementById("first")!.dispatchEvent( + new KeyboardEvent("keydown", { key: "Escape", bubbles: true, cancelable: true }), + ); + + expect(onClose).toHaveBeenCalledTimes(1); + }); +}); diff --git a/src/profiles/web/src/utils/useModalA11y.ts b/src/profiles/web/src/utils/useModalA11y.ts index c017f4a..776b2b1 100644 --- a/src/profiles/web/src/utils/useModalA11y.ts +++ b/src/profiles/web/src/utils/useModalA11y.ts @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import type { KeyboardEvent, RefObject } from "react"; +import type { KeyboardEvent as ReactKeyboardEvent, RefObject } from "react"; const FOCUSABLE_SELECTOR = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], video[tabindex], [tabindex]:not([tabindex="-1"])'; @@ -17,14 +17,20 @@ export interface UseModalA11yOptions { /** * Shared dialog a11y: focus trap, initial focus and focus restore * (issue #62). Attach the returned handler to the dialog element's - * `onKeyDown` so Escape and Tab are handled while focus is inside. + * `onKeyDown` so Escape is handled while focus is inside. + * + * The Tab half of the trap deliberately runs at the window capture level + * (see the effect), not in this handler: a dialog-level onKeyDown never + * sees a Tab pressed while focus sits on document.body — e.g. after a + * backdrop click or an unmounted focused node — and the browser would + * then happily move focus into the app behind the modal. */ export function useModalA11y({ isOpen, onClose, dialogRef, initialFocusRef, -}: UseModalA11yOptions): (event: KeyboardEvent) => void { +}: UseModalA11yOptions): (event: ReactKeyboardEvent) => void { useEffect(() => { if (!isOpen) return; @@ -39,34 +45,54 @@ export function useModalA11y({ target?.focus(); }); + // Window-capture Tab trap: owns every Tab press while the modal is + // open, wherever focus currently sits. One listener per open modal; + // for stacked dialogs the most recently opened modal's handler runs + // last and wins, which resolves nesting in favor of the topmost one. + const trapTab = (event: KeyboardEvent) => { + if (event.key !== "Tab") return; + const dialog = dialogRef.current; + if (!dialog) return; + const focusable = Array.from(dialog.querySelectorAll(FOCUSABLE_SELECTOR)); + if (!focusable.length) return; + const first = focusable[0]; + const last = focusable[focusable.length - 1]; + const active = document.activeElement; + const inside = active instanceof Node && dialog.contains(active); + + if (!inside) { + // Focus drifted out: pull it back instead of traversing the app + // behind the modal. + event.preventDefault(); + (event.shiftKey ? last : first).focus(); + return; + } + if (event.shiftKey && (active === first || active === dialog)) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && (active === last || active === dialog)) { + event.preventDefault(); + first.focus(); + } + // Anywhere else inside: leave Tab to native traversal between the + // dialog's own controls. + }; + window.addEventListener("keydown", trapTab, true); + return () => { cancelAnimationFrame(frame); previousFocus?.focus(); + window.removeEventListener("keydown", trapTab, true); }; // Re-run when isOpen flips; refs are stable. // eslint-disable-next-line react-hooks/exhaustive-deps }, [isOpen]); - return (event: KeyboardEvent) => { + return (event: ReactKeyboardEvent) => { if (event.key === "Escape") { event.preventDefault(); event.stopPropagation(); onClose(); - return; - } - if (event.key !== "Tab") return; - - const focusable = dialogRef.current?.querySelectorAll(FOCUSABLE_SELECTOR); - if (!focusable?.length) return; - - const first = focusable[0]; - const last = focusable[focusable.length - 1]; - if (event.shiftKey && document.activeElement === first) { - event.preventDefault(); - last.focus(); - } else if (!event.shiftKey && document.activeElement === last) { - event.preventDefault(); - first.focus(); } }; } diff --git a/src/profiles/web/tsconfig.tsbuildinfo b/src/profiles/web/tsconfig.tsbuildinfo index a57db8b..f2925d6 100644 --- a/src/profiles/web/tsconfig.tsbuildinfo +++ b/src/profiles/web/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.test.ts","./src/api/client.ts","./src/api/types.ts","./src/components/actionbar.tsx","./src/components/barcodemodal.tsx","./src/components/camerabarcodemodal.tsx","./src/components/confirmdialog.tsx","./src/components/contextmenu.tsx","./src/components/directorypickermodal.tsx","./src/components/dropconfigoverlay.tsx","./src/components/editablecombobox.tsx","./src/components/errorboundary.tsx","./src/components/filelisttable.tsx","./src/components/filepropertiesmodal.tsx","./src/components/filtersyntaxhelper.tsx","./src/components/headerbar.tsx","./src/components/initerrorpanel.tsx","./src/components/loadconfigmodal.tsx","./src/components/logviewermodal.tsx","./src/components/markdownmessage.test.tsx","./src/components/markdownmessage.tsx","./src/components/scanstatusstrip.tsx","./src/components/searchbar.tsx","./src/components/shortcutsmodal.tsx","./src/components/singlematchpromptmodal.tsx","./src/components/statusbar.tsx","./src/components/timermodal.tsx","./src/components/tooltip.tsx","./src/components/workflowrunnermodal.test.tsx","./src/components/workflowrunnermodal.tsx","./src/utils/barcodedecoder.test.ts","./src/utils/barcodedecoder.ts","./src/utils/barcodescanner.ts","./src/utils/configdrop.test.ts","./src/utils/configdrop.ts","./src/utils/exportcsv.ts","./src/utils/fileproperties.test.ts","./src/utils/fileproperties.ts","./src/utils/searchsyntax.test.ts","./src/utils/searchsyntax.ts","./src/utils/theme.test.ts","./src/utils/theme.ts","./src/utils/usemodala11y.ts"],"version":"5.7.3"} \ No newline at end of file +{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/api/client.test.ts","./src/api/client.ts","./src/api/types.ts","./src/components/actionbar.tsx","./src/components/barcodemodal.tsx","./src/components/camerabarcodemodal.tsx","./src/components/confirmdialog.tsx","./src/components/contextmenu.tsx","./src/components/directorypickermodal.tsx","./src/components/dropconfigoverlay.tsx","./src/components/editablecombobox.tsx","./src/components/errorboundary.tsx","./src/components/filelisttable.tsx","./src/components/filepropertiesmodal.tsx","./src/components/filtersyntaxhelper.tsx","./src/components/headerbar.tsx","./src/components/initerrorpanel.tsx","./src/components/loadconfigmodal.tsx","./src/components/logviewermodal.tsx","./src/components/markdownmessage.test.tsx","./src/components/markdownmessage.tsx","./src/components/scanstatusstrip.tsx","./src/components/searchbar.tsx","./src/components/shortcutsmodal.tsx","./src/components/singlematchpromptmodal.tsx","./src/components/statusbar.tsx","./src/components/timermodal.tsx","./src/components/tooltip.tsx","./src/components/workflowrunnermodal.test.tsx","./src/components/workflowrunnermodal.tsx","./src/utils/barcodedecoder.test.ts","./src/utils/barcodedecoder.ts","./src/utils/barcodescanner.ts","./src/utils/configdrop.test.ts","./src/utils/configdrop.ts","./src/utils/exportcsv.ts","./src/utils/fileproperties.test.ts","./src/utils/fileproperties.ts","./src/utils/searchsyntax.test.ts","./src/utils/searchsyntax.ts","./src/utils/theme.test.ts","./src/utils/theme.ts","./src/utils/usemodala11y.test.tsx","./src/utils/usemodala11y.ts"],"version":"5.7.3"} \ No newline at end of file