dslinter 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dashboard-dist/assets/{DashboardLayoutAuto-B4P-sy4z.js → DashboardLayoutAuto-BWuyjHPD.js} +1 -1
- package/dashboard-dist/assets/{axe-CaxTXfM9.js → axe-DHHCqGjV.js} +1 -1
- package/dashboard-dist/assets/{index-B432JkIx.js → index-Bxk7tA3F.js} +4 -4
- package/dashboard-dist/index.html +1 -1
- package/index.cjs +52 -52
- package/package.json +6 -6
- package/src/mcp/css-color.test.ts +52 -0
- package/src/mcp/css-color.ts +73 -0
- package/src/mcp/rule-catalog.json +3 -3
- package/src/mcp/verify-loop.test.ts +24 -0
- package/src/mcp/verify-loop.ts +28 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardLayoutAuto-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardLayoutAuto-BWuyjHPD.js","assets/DashboardLayoutAuto-CAO6F6-q.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
function _$(e,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(o,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(i){if(i.ep)return;i.ep=!0;const c=r(i);fetch(i.href,c)}})();function l0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jf={exports:{}},Vs={};var Wy;function w$(){if(Wy)return Vs;Wy=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var d in i)d!=="key"&&(c[d]=i[d])}else c=i;return i=c.ref,{$$typeof:e,type:o,key:u,ref:i!==void 0?i:null,props:c}}return Vs.Fragment=n,Vs.jsx=r,Vs.jsxs=r,Vs}var Zy;function S$(){return Zy||(Zy=1,jf.exports=w$()),jf.exports}var g=S$(),Tf={exports:{}},_e={};var Qy;function C$(){if(Qy)return _e;Qy=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),_=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=_&&T[_]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,$={};function E(T,R,q){this.props=T,this.context=R,this.refs=$,this.updater=q||S}E.prototype.isReactComponent={},E.prototype.setState=function(T,R){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,R,"setState")},E.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function N(){}N.prototype=E.prototype;function j(T,R,q){this.props=T,this.context=R,this.refs=$,this.updater=q||S}var z=j.prototype=new N;z.constructor=j,k(z,E.prototype),z.isPureReactComponent=!0;var G=Array.isArray;function H(){}var D={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function re(T,R,q){var Q=q.ref;return{$$typeof:e,type:T,key:R,ref:Q!==void 0?Q:null,props:q}}function se(T,R){return re(T.type,R,T.props)}function de(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function oe(T){var R={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(q){return R[q]})}var be=/\/+/g;function le(T,R){return typeof T=="object"&&T!==null&&T.key!=null?oe(""+T.key):R.toString(36)}function pe(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(H,H):(T.status="pending",T.then(function(R){T.status==="pending"&&(T.status="fulfilled",T.value=R)},function(R){T.status==="pending"&&(T.status="rejected",T.reason=R)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,R,q,Q,Y){var te=typeof T;(te==="undefined"||te==="boolean")&&(T=null);var Z=!1;if(T===null)Z=!0;else switch(te){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(T.$$typeof){case e:case n:Z=!0;break;case b:return Z=T._init,O(Z(T._payload),R,q,Q,Y)}}if(Z)return Y=Y(T),Z=Q===""?"."+le(T,0):Q,G(Y)?(q="",Z!=null&&(q=Z.replace(be,"$&/")+"/"),O(Y,R,q,"",function(ke){return ke})):Y!=null&&(de(Y)&&(Y=se(Y,q+(Y.key==null||T&&T.key===Y.key?"":(""+Y.key).replace(be,"$&/")+"/")+Z)),R.push(Y)),1;Z=0;var ge=Q===""?".":Q+":";if(G(T))for(var ae=0;ae<T.length;ae++)Q=T[ae],te=ge+le(Q,ae),Z+=O(Q,R,q,te,Y);else if(ae=w(T),typeof ae=="function")for(T=ae.call(T),ae=0;!(Q=T.next()).done;)Q=Q.value,te=ge+le(Q,ae++),Z+=O(Q,R,q,te,Y);else if(te==="object"){if(typeof T.then=="function")return O(pe(T),R,q,Q,Y);throw R=String(T),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return Z}function X(T,R,q){if(T==null)return T;var Q=[],Y=0;return O(T,Q,"","",function(te){return R.call(q,te,Y++)}),Q}function J(T){if(T._status===-1){var R=T._result;R=R(),R.then(function(q){(T._status===0||T._status===-1)&&(T._status=1,T._result=q)},function(q){(T._status===0||T._status===-1)&&(T._status=2,T._result=q)}),T._status===-1&&(T._status=0,T._result=R)}if(T._status===1)return T._result.default;throw T._result}var fe=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ee={map:X,forEach:function(T,R,q){X(T,function(){R.apply(this,arguments)},q)},count:function(T){var R=0;return X(T,function(){R++}),R},toArray:function(T){return X(T,function(R){return R})||[]},only:function(T){if(!de(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return _e.Activity=y,_e.Children=ee,_e.Component=E,_e.Fragment=r,_e.Profiler=i,_e.PureComponent=j,_e.StrictMode=o,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,_e.__COMPILER_RUNTIME={__proto__:null,c:function(T){return D.H.useMemoCache(T)}},_e.cache=function(T){return function(){return T.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(T,R,q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=k({},T.props),Y=T.key;if(R!=null)for(te in R.key!==void 0&&(Y=""+R.key),R)!P.call(R,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&R.ref===void 0||(Q[te]=R[te]);var te=arguments.length-2;if(te===1)Q.children=q;else if(1<te){for(var Z=Array(te),ge=0;ge<te;ge++)Z[ge]=arguments[ge+2];Q.children=Z}return re(T.type,Y,Q)},_e.createContext=function(T){return T={$$typeof:u,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:c,_context:T},T},_e.createElement=function(T,R,q){var Q,Y={},te=null;if(R!=null)for(Q in R.key!==void 0&&(te=""+R.key),R)P.call(R,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(Y[Q]=R[Q]);var Z=arguments.length-2;if(Z===1)Y.children=q;else if(1<Z){for(var ge=Array(Z),ae=0;ae<Z;ae++)ge[ae]=arguments[ae+2];Y.children=ge}if(T&&T.defaultProps)for(Q in Z=T.defaultProps,Z)Y[Q]===void 0&&(Y[Q]=Z[Q]);return re(T,te,Y)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(T){return{$$typeof:d,render:T}},_e.isValidElement=de,_e.lazy=function(T){return{$$typeof:b,_payload:{_status:-1,_result:T},_init:J}},_e.memo=function(T,R){return{$$typeof:h,type:T,compare:R===void 0?null:R}},_e.startTransition=function(T){var R=D.T,q={};D.T=q;try{var Q=T(),Y=D.S;Y!==null&&Y(q,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(H,fe)}catch(te){fe(te)}finally{R!==null&&q.types!==null&&(R.types=q.types),D.T=R}},_e.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},_e.use=function(T){return D.H.use(T)},_e.useActionState=function(T,R,q){return D.H.useActionState(T,R,q)},_e.useCallback=function(T,R){return D.H.useCallback(T,R)},_e.useContext=function(T){return D.H.useContext(T)},_e.useDebugValue=function(){},_e.useDeferredValue=function(T,R){return D.H.useDeferredValue(T,R)},_e.useEffect=function(T,R){return D.H.useEffect(T,R)},_e.useEffectEvent=function(T){return D.H.useEffectEvent(T)},_e.useId=function(){return D.H.useId()},_e.useImperativeHandle=function(T,R,q){return D.H.useImperativeHandle(T,R,q)},_e.useInsertionEffect=function(T,R){return D.H.useInsertionEffect(T,R)},_e.useLayoutEffect=function(T,R){return D.H.useLayoutEffect(T,R)},_e.useMemo=function(T,R){return D.H.useMemo(T,R)},_e.useOptimistic=function(T,R){return D.H.useOptimistic(T,R)},_e.useReducer=function(T,R,q){return D.H.useReducer(T,R,q)},_e.useRef=function(T){return D.H.useRef(T)},_e.useState=function(T){return D.H.useState(T)},_e.useSyncExternalStore=function(T,R,q){return D.H.useSyncExternalStore(T,R,q)},_e.useTransition=function(){return D.H.useTransition()},_e.version="19.2.6",_e}var Jy;function am(){return Jy||(Jy=1,Tf.exports=C$()),Tf.exports}var v=am();const dt=l0(v),rm=_$({__proto__:null,default:dt},[v]);var Rf={exports:{}},Ys={},Mf={exports:{}},Of={};var ex;function k$(){return ex||(ex=1,(function(e){function n(O,X){var J=O.length;O.push(X);e:for(;0<J;){var fe=J-1>>>1,ee=O[fe];if(0<i(ee,X))O[fe]=X,O[J]=ee,J=fe;else break e}}function r(O){return O.length===0?null:O[0]}function o(O){if(O.length===0)return null;var X=O[0],J=O.pop();if(J!==X){O[0]=J;e:for(var fe=0,ee=O.length,T=ee>>>1;fe<T;){var R=2*(fe+1)-1,q=O[R],Q=R+1,Y=O[Q];if(0>i(q,J))Q<ee&&0>i(Y,q)?(O[fe]=Y,O[Q]=J,fe=Q):(O[fe]=q,O[R]=J,fe=R);else if(Q<ee&&0>i(Y,J))O[fe]=Y,O[Q]=J,fe=Q;else break e}}return X}function i(O,X){var J=O.sortIndex-X.sortIndex;return J!==0?J:O.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var p=[],h=[],b=1,y=null,_=3,w=!1,S=!1,k=!1,$=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function z(O){for(var X=r(h);X!==null;){if(X.callback===null)o(h);else if(X.startTime<=O)o(h),X.sortIndex=X.expirationTime,n(p,X);else break;X=r(h)}}function G(O){if(k=!1,z(O),!S)if(r(p)!==null)S=!0,H||(H=!0,oe());else{var X=r(h);X!==null&&pe(G,X.startTime-O)}}var H=!1,D=-1,P=5,re=-1;function se(){return $?!0:!(e.unstable_now()-re<P)}function de(){if($=!1,H){var O=e.unstable_now();re=O;var X=!0;try{e:{S=!1,k&&(k=!1,N(D),D=-1),w=!0;var J=_;try{t:{for(z(O),y=r(p);y!==null&&!(y.expirationTime>O&&se());){var fe=y.callback;if(typeof fe=="function"){y.callback=null,_=y.priorityLevel;var ee=fe(y.expirationTime<=O);if(O=e.unstable_now(),typeof ee=="function"){y.callback=ee,z(O),X=!0;break t}y===r(p)&&o(p),z(O)}else o(p);y=r(p)}if(y!==null)X=!0;else{var T=r(h);T!==null&&pe(G,T.startTime-O),X=!1}}break e}finally{y=null,_=J,w=!1}X=void 0}}finally{X?oe():H=!1}}}var oe;if(typeof j=="function")oe=function(){j(de)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,le=be.port2;be.port1.onmessage=de,oe=function(){le.postMessage(null)}}else oe=function(){E(de,0)};function pe(O,X){D=E(function(){O(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(O){switch(_){case 1:case 2:case 3:var X=3;break;default:X=_}var J=_;_=X;try{return O()}finally{_=J}},e.unstable_requestPaint=function(){$=!0},e.unstable_runWithPriority=function(O,X){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var J=_;_=O;try{return X()}finally{_=J}},e.unstable_scheduleCallback=function(O,X,J){var fe=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?fe+J:fe):J=fe,O){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=J+ee,O={id:b++,callback:X,priorityLevel:O,startTime:J,expirationTime:ee,sortIndex:-1},J>fe?(O.sortIndex=J,n(h,O),r(p)===null&&O===r(h)&&(k?(N(D),D=-1):k=!0,pe(G,J-fe))):(O.sortIndex=ee,n(p,O),S||w||(S=!0,H||(H=!0,oe()))),O},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(O){var X=_;return function(){var J=_;_=X;try{return O.apply(this,arguments)}finally{_=J}}}})(Of)),Of}var tx;function $$(){return tx||(tx=1,Mf.exports=k$()),Mf.exports}var Df={exports:{}},$t={};var nx;function E$(){if(nx)return $t;nx=1;var e=am();function n(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(p,h,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:p,containerInfo:h,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,$t.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return c(p,h,null,b)},$t.flushSync=function(p){var h=u.T,b=o.p;try{if(u.T=null,o.p=2,p)return p()}finally{u.T=h,o.p=b,o.d.f()}},$t.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(p,h))},$t.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},$t.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,y=d(b,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?o.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:_,fetchPriority:w}):b==="script"&&o.d.X(p,{crossOrigin:y,integrity:_,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},$t.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=d(h.as,h.crossOrigin);o.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(p)},$t.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,y=d(b,h.crossOrigin);o.d.L(p,b,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},$t.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=d(h.as,h.crossOrigin);o.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(p)},$t.requestFormReset=function(p){o.d.r(p)},$t.unstable_batchedUpdates=function(p,h){return p(h)},$t.useFormState=function(p,h,b){return u.H.useFormState(p,h,b)},$t.useFormStatus=function(){return u.H.useHostTransitionStatus()},$t.version="19.2.6",$t}var ax;function c0(){if(ax)return Df.exports;ax=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Df.exports=E$(),Df.exports}var rx;function N$(){if(rx)return Ys;rx=1;var e=$$(),n=am(),r=c0();function o(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var a=t,s=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(s=a.return),t=a.return;while(t)}return a.tag===3?s:null}function u(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function d(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function p(t){if(c(t)!==t)throw Error(o(188))}function h(t){var a=t.alternate;if(!a){if(a=c(t),a===null)throw Error(o(188));return a!==t?null:t}for(var s=t,l=a;;){var f=s.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){s=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===s)return p(f),t;if(m===l)return p(f),a;m=m.sibling}throw Error(o(188))}if(s.return!==l.return)s=f,l=m;else{for(var x=!1,C=f.child;C;){if(C===s){x=!0,s=f,l=m;break}if(C===l){x=!0,l=f,s=m;break}C=C.sibling}if(!x){for(C=m.child;C;){if(C===s){x=!0,s=m,l=f;break}if(C===l){x=!0,l=m,s=f;break}C=C.sibling}if(!x)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:a}function b(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=b(t),a!==null)return a;t=t.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function oe(t){return t===null||typeof t!="object"?null:(t=de&&t[de]||t["@@iterator"],typeof t=="function"?t:null)}var be=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===be?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case E:return"Profiler";case $:return"StrictMode";case G:return"Suspense";case H:return"SuspenseList";case re:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case j:return t.displayName||"Context";case N:return(t._context.displayName||"Context")+".Consumer";case z:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case D:return a=t.displayName||null,a!==null?a:le(t.type)||"Memo";case P:a=t._payload,t=t._init;try{return le(t(a))}catch{}}return null}var pe=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},fe=[],ee=-1;function T(t){return{current:t}}function R(t){0>ee||(t.current=fe[ee],fe[ee]=null,ee--)}function q(t,a){ee++,fe[ee]=t.current,t.current=a}var Q=T(null),Y=T(null),te=T(null),Z=T(null);function ge(t,a){switch(q(te,a),q(Y,t),q(Q,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?xy(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=xy(a),t=vy(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}R(Q),q(Q,t)}function ae(){R(Q),R(Y),R(te)}function ke(t){t.memoizedState!==null&&q(Z,t);var a=Q.current,s=vy(a,t.type);a!==s&&(q(Y,t),q(Q,s))}function Re(t){Y.current===t&&(R(Q),R(Y)),Z.current===t&&(R(Z),Gs._currentValue=J)}var he,Ne;function Ge(t){if(he===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);he=a&&a[1]||"",Ne=-1<s.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+he+t+Ne}var Ut=!1;function Jt(t,a){if(!t||Ut)return"";Ut=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(F){var I=F}Reflect.construct(t,[],W)}else{try{W.call()}catch(F){I=F}t.call(W.prototype)}}else{try{throw Error()}catch(F){I=F}(W=t())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(F){if(F&&I&&typeof F.stack=="string")return[F.stack,I.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),x=m[0],C=m[1];if(x&&C){var A=x.split(`
|
|
@@ -20,7 +20,7 @@ Error generating stack: `+l.message+`
|
|
|
20
20
|
</${e.root}>`:`<${e.root}>
|
|
21
21
|
<${u}>Open menu</${u}>
|
|
22
22
|
${c}>…</${n}>
|
|
23
|
-
</${e.root}>`}function $E(e){return e.content??e.trigger}function S0(e,n,r,o,i,c){const u=e.exports.get(n);if(!u||!mn(r,n))return null;const d=yE(i,n),p=vE(u,d,c.controlOverrides??{},n),h=c.staticDefaults?.[n]??{},b=w=>{const S=wE(_E(p,w,n),h);return CE(e,n,r,S)};function y({values:w}){return b(w)}const _={id:n,title:n,...e.group?{group:e.group}:{}};return{id:n,meta:_,modulePath:o,controls:p,usageSnippet:w=>kE(e,n,w,p),renderPreview:b,Preview:y}}function EE(e,n,r){if(!e)return[];const o=[],i=w0(e);for(const c of i){const u=r.globKeyFromRelPath(c.relPath),d=zc(c.relPath,n,r.globKeyFromRelPath),p=d?n[d]:void 0;if(p&&mn(p,c.root))for(const h of c.exports.keys()){if(h===c.root||r.existingIds.has(h))continue;const b=S0(c,h,p,d??u,e,r);b&&o.push(b)}}return o.sort((c,u)=>c.meta.title.localeCompare(u.meta.title)),o}function NE(e,n,r,o){const i=w0(n);for(const c of i){const u=$E(c);if(!u||u===c.root)continue;const d=o.globKeyFromRelPath(c.relPath),p=zc(c.relPath,r,o.globKeyFromRelPath),h=p??d,b=p?r[p]:void 0;if(!b)continue;const y=e.findIndex(S=>S.id===c.root&&S.modulePath===h);if(y<0)continue;const _=S0(c,u,b,h,n,o);if(!_)continue;const w=e[y];e[y]={...w,controls:_.controls,renderPreview:_.renderPreview,Preview:_.Preview,usageSnippet:_.usageSnippet}}}function AE(e){return/[<>{}&]/.test(e)?`{JSON.stringify(${JSON.stringify(e)})}`:e}function jE(e,n){switch(e.type){case"boolean":return!!n===e.default;case"number":{const r=typeof n=="number"?n:Number(n);return Number.isFinite(r)&&r===e.default}case"string":case"node":case"select":return String(n??"")===String(e.default);default:return!1}}function TE(e,n,r){const o=new Map(r.map(_=>[_.key,_])),i=_=>{const w=o.get(_);return w?!jE(w,n[_]):!0},c=Object.prototype.hasOwnProperty.call(n,"children"),u=c?n.children:void 0,d=Object.keys(n).filter(_=>_!=="children").filter(i).sort((_,w)=>_.localeCompare(w)),p=d.map(_=>`${_}={${JSON.stringify(n[_])}}`).join(" "),h=d.length===0?`<${e}`:`<${e} ${p}`;if(!c)return d.length===0?`<${e} />`:`${h} />`;if(typeof u=="boolean"){const _=Object.keys(n).filter(i).sort((S,k)=>S.localeCompare(k)),w=_.map(S=>`${S}={${JSON.stringify(n[S])}}`).join(" ");return _.length===0?`<${e} />`:`<${e} ${w} />`}const b=String(typeof u=="number"?u:u??"");if(b.length===0)return d.length===0?`<${e} />`:`${h} />`;const y=AE(b);return d.length===0?`<${e}>${y}</${e}>`:`${h}>${y}</${e}>`}function RE(e){if(e==="boolean"||e==="string"||e==="number"||e==="node"||e==="unknown")return e}function ME(e){if(!e||typeof e!="object")return;const n={};for(const[r,o]of Object.entries(e)){const i=RE(o);i&&i!=="unknown"&&(n[r]=i)}return Object.keys(n).length?n:void 0}function OE(e,n){return e.length>0?e.map(r=>r.key):n.filter(r=>r!=="key"&&r!=="ref")}function DE(e,n,r,o,i){const c={};for(const u of OE(e,n)){if(Bc.has(u))continue;if(Uo(u)){const p=r[u];if(p==null||String(p).length===0)continue;c[u]=String(p);continue}if(u==="children"){const p=f0(i,r.children);p!==void 0&&(c[u]=p);continue}const d=o?.[u];if(d==="boolean"){c[u]=!!r[u];continue}if(d==="number"){const p=r[u],h=typeof p=="number"?p:Number(p);c[u]=Number.isFinite(h)?h:0;continue}if(d==="string"||d==="node"){c[u]=r[u];continue}if(p0(u)){c[u]=!!r[u];continue}c[u]=r[u]}return c}function BE(e,n){const r={...e};for(const[o,i]of Object.entries(n)){const c=r[o];(c===void 0||c===""&&o!=="children")&&(r[o]=i)}return r}function zE(e){if(!e||typeof e!="object")return!1;const n=e;if(typeof n.playgroundMeta!="object"||n.playgroundMeta===null)return!1;const r=n.playgroundMeta;return typeof r.id=="string"&&typeof r.title=="string"&&(r.group===void 0||typeof r.group=="string")&&Array.isArray(n.playgroundControls)&&typeof n.PlaygroundPreview=="function"}function LE(e,n){return e.playgrounds?.find(r=>r.export_name===n||r.id===n)}function UE(e,n,r){const o=n?.rootPropBindings??[];if(o.length>0)return o;const i=LE(r,e.id);if(!i)return[];const c=new Set(e.controls.map(u=>u.key));return(i.declared_props??[]).filter(u=>c.has(u)).map(u=>({component:i.export_name,prop:u,param:u}))}function fx(e,n,r){if(!r)return e;const o=new Map;for(const i of Object.values(n))if(!(!i||typeof i!="object"))for(const[c,u]of Object.entries(i)){if(!zE(u))continue;const d=u.playgroundMeta.id||v0(c)||"";d&&o.set(d,u)}return e.map(i=>{const c=o.get(i.id),u=UE(i,c?.playgroundKitHints,r);if(!u.length)return i;const d=U$(i.controls,u,r,i.id);return d===i.controls?i:{...i,controls:d}})}function PE(e,n){return e?.usage_by_component?.find(r=>r.component===n)}function IE(e){return e.export_name}function GE(e,n){const r=e.find(o=>o.id===n);return r||e.find(o=>o.meta.title===n||o.modulePath.includes(`/${n}.`)||o.modulePath.endsWith(`/${n}.tsx`)||o.modulePath.endsWith(`/${n}.jsx`))}function L4(e,n,r={}){const o=e?.playgrounds,i=r.globKeyFromRelPath??_0,c=r.controlOverrides??{},u=r.staticDefaults??{},d=o?.length?aE(e,n,{globKeyFromRelPath:i}):[];r.logJoinSkips&&rE(d);const p=[];if(!o?.length){const _=fx(sx(n),n,e);return{entries:ix([],_),skipped:d}}for(const _ of o){let w=function({values:se}){return P(se)};const S=i(_.rel_path),k=zc(_.rel_path,n,i),$=k?n[k]:void 0;if(!$)continue;const E=mn($,_.export_name);if(!E)continue;const N=IE(_),j=_.declared_props??[],z=ME(_.declared_prop_kinds),G=PE(e,_.export_name),H=O$(h0(N,j,z,_.declared_prop_options,_.declared_prop_defaults,c,_.export_name),M$(j,G),_.export_name),D=u[N]??u[_.id]??{},P=se=>{const de=DE(H,j,se,z,_.export_name),oe=BE(de,D);return v.createElement(E,oe)},re={id:N,title:N,..._.group?{group:_.group}:{}};p.push({id:N,meta:re,modulePath:k??S,controls:H,usageSnippet:se=>TE(_.export_name,se,H),renderPreview:P,Preview:w})}e&&NE(p,e,n,{globKeyFromRelPath:i,controlOverrides:c,staticDefaults:u});const h=EE(e,n,{globKeyFromRelPath:i,controlOverrides:c,staticDefaults:u,existingIds:new Set(p.map(_=>_.id))}),b=fx(sx(n),n,e),y=ix([...p,...h],b);return{entries:FE(e,y),skipped:d}}function HE(e,n){if(!e)return[n.modulePath];const r=sm(e,n.meta.id);return r.length>0?r:[n.modulePath]}function FE(e,n){return e?n.filter(r=>!om(r.meta.id,e,HE(e,r))):n}function qE(e){const n=new Map;for(const o of e.colors){const i=`--color-${o.token}${o.shade==="DEFAULT"?"":`-${o.shade}`}`;n.set(i,o.tw)}for(const o of e.spacing)n.set(`--spacing-${o.token}`,o.tw);for(const o of e.radius)n.set(`--radius-${o.token}`,o.tw);const r=e.typography;if(r){for(const o of r.families)n.set(`--font-${o.key}`,o.tw);for(const o of r.sizes)n.set(`--font-size-${o.token}`,o.tw)}return n}function VE(e){const n=new Map;for(const r of e.colors){const o=`--color-${r.token}${r.shade==="DEFAULT"?"":`-${r.shade}`}`;n.set(o,r.value)}for(const r of e.spacing)n.set(`--spacing-${r.token}`,r.value);for(const r of e.radius)n.set(`--radius-${r.token}`,r.value);return n}function YE(e){const n=e.trim();return/^#[0-9a-fA-F]{3,8}$/.test(n)||n.startsWith("rgb(")||n.startsWith("oklch(")||n.startsWith("hsl(")}function XE(e,n){const r=e?.css_tokens;if(!r?.definitions?.length)return n?{source:"manual",rows:[],totalCount:0,usedCount:0}:null;const o=new Set(r.unused_tokens??[]),i=new Map((r.usage_by_token??[]).map(b=>[b.name,b])),c=n?qE(n):new Map,u=n?VE(n):new Map,d=r.definitions.map(b=>{const y=i.get(b.name),_=y?.reference_count??0,w=o.has(b.name),S=u.get(b.name),k=S??(b.category==="color"&&YE(b.value)?b.value:b.value.startsWith("var(")?S:b.value);return{cssName:b.name,value:b.value,category:b.category,scope:b.scope,path:b.path,line:b.line,referenceCount:_,fileCount:y?.file_count??0,isUnused:w,tw:c.get(b.name),displayValue:k??b.value,usageFiles:y?.files??[]}});d.sort((b,y)=>b.cssName.localeCompare(y.cssName));const p=d.filter(b=>b.scope==="theme"||b.scope==="root"),h=p.filter(b=>!b.isUnused).length;return{source:n?"hybrid":"scan",rows:d,usedCount:h,totalCount:p.length}}function C0(e){return`${e.cssName}|${e.scope}|${e.path}|${e.line}`}function KE(e,n){return n==="all"?e:n==="used"?e.filter(r=>!r.isUnused):e.filter(r=>r.isUnused)}const WE=[{token:"xs",value:"0.75rem (12px)",tw:"text-xs"},{token:"sm",value:"0.875rem (14px)",tw:"text-sm"},{token:"base",value:"1rem (16px)",tw:"text-base"},{token:"lg",value:"1.125rem (18px)",tw:"text-lg"},{token:"xl",value:"1.25rem (20px)",tw:"text-xl"},{token:"2xl",value:"1.5rem (24px)",tw:"text-2xl"},{token:"3xl",value:"1.875rem (30px)",tw:"text-3xl"},{token:"4xl",value:"2.25rem (36px)",tw:"text-4xl"},{token:"5xl",value:"3rem (48px)",tw:"text-5xl"},{token:"6xl",value:"3.75rem (60px)",tw:"text-6xl"},{token:"7xl",value:"4.5rem (72px)",tw:"text-7xl"},{token:"8xl",value:"6rem (96px)",tw:"text-8xl"},{token:"9xl",value:"8rem (128px)",tw:"text-9xl"}],ZE=[{token:"thin",tw:"font-thin",value:"100"},{token:"extralight",tw:"font-extralight",value:"200"},{token:"light",tw:"font-light",value:"300"},{token:"normal",tw:"font-normal",value:"400"},{token:"medium",tw:"font-medium",value:"500"},{token:"semibold",tw:"font-semibold",value:"600"},{token:"bold",tw:"font-bold",value:"700"},{token:"extrabold",tw:"font-extrabold",value:"800"},{token:"black",tw:"font-black",value:"900"}],QE=[{key:"sans",tw:"font-sans",value:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"'},{key:"serif",tw:"font-serif",value:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},{key:"mono",tw:"font-mono",value:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'}],JE="modulepreload",e2=function(e){return"/"+e},px={},k0=function(n,r,o){let i=Promise.resolve();if(r&&r.length>0){let p=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");i=p(r.map(h=>{if(h=e2(h),h in px)return;px[h]=!0;const b=h.endsWith(".css"),y=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const _=document.createElement("link");if(_.rel=b?"stylesheet":JE,b||(_.as="script"),_.crossOrigin="",_.href=h,d&&_.setAttribute("nonce",d),document.head.appendChild(_),b)return new Promise((w,S)=>{_.addEventListener("load",w),_.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return i.then(u=>{for(const d of u||[])d.status==="rejected"&&c(d.reason);return n().catch(c)})},t2=[{rule_id:"a11y-img-alt",pillar:"a11y",default_severity:"warning",description:"`<img>` must include an `alt` attribute for screen readers.",fix_hint:'Add alt="" for decorative images or a descriptive alt for meaningful images.'},{rule_id:"a11y-button-name",pillar:"a11y",default_severity:"warning",description:"`<button>` must have an accessible name (text content or aria-label).",fix_hint:"Add visible text, aria-label, or aria-labelledby."},{rule_id:"a11y-input-label",pillar:"a11y",default_severity:"warning",description:"`<input>` should have an associated label or aria-label.",fix_hint:"Wrap with <Label htmlFor=...> or add aria-label."},{rule_id:"a11y-anchor-href",pillar:"a11y",default_severity:"warning",description:"`<a>` should have a meaningful href.",fix_hint:"Use a valid href or replace with <button> for actions."},{rule_id:"a11y-anchor-placeholder-href",pillar:"a11y",default_severity:"warning",description:'`<a href="#">` is a placeholder link pattern.',fix_hint:'Use <button type="button"> or a real destination URL.'},{rule_id:"a11y-dark-mode-contrast",pillar:"a11y",default_severity:"warning",description:"Light-mode color classes may lack a dark: variant.",fix_hint:"Add matching dark: text/background utilities or theme tokens."},{rule_id:"token-hardcoded-color",pillar:"token",default_severity:"warning",description:"Hardcoded hex/rgb color instead of design tokens.",fix_hint:"Replace with a CSS variable or Tailwind theme utility from css_tokens."},{rule_id:"token-tailwind-arbitrary",pillar:"token",default_severity:"warning",description:"Tailwind arbitrary value (e.g. bg-[#fff]) bypasses the token system.",fix_hint:"Use a named theme utility or CSS custom property."},{rule_id:"token-unused-css-var",pillar:"token",default_severity:"info",description:"CSS custom property defined but never referenced.",fix_hint:"Remove unused token or reference it via var(--name) or Tailwind."},{rule_id:"deprecated-component",pillar:"usage",default_severity:"warning",description:"Component is listed as deprecated in .dslinter.json.",fix_hint:"Replace with the canonical component from the catalog (check usage_by_component)."},{rule_id:"duplicate-component",pillar:"usage",default_severity:"warning",description:"Same component name is defined in multiple files.",fix_hint:"Consolidate into one definition and update imports."},{rule_id:"unused-prop",pillar:"usage",default_severity:"info",description:"Declared prop is never passed at any call site.",fix_hint:"Remove unused prop from the API or document why it exists."},{rule_id:"variant-explosion",pillar:"usage",default_severity:"info",description:"Component has an unusually large prop surface at call sites.",fix_hint:"Split into smaller components or reduce optional props."},{rule_id:"code-console",pillar:"code",default_severity:"info",description:"console.log (or similar) left in component code.",fix_hint:"Remove debug logging before shipping."},{rule_id:"code-console-error",pillar:"code",default_severity:"warning",description:"console.error in component code.",fix_hint:"Use proper error handling or remove."},{rule_id:"code-debugger",pillar:"code",default_severity:"error",description:"debugger statement in source.",fix_hint:"Remove debugger."},{rule_id:"code-inline-style",pillar:"code",default_severity:"warning",description:"Inline JSX style={{}} bypasses token/Tailwind conventions.",fix_hint:"Use className with theme utilities."},{rule_id:"code-empty-catch",pillar:"code",default_severity:"warning",description:"Empty catch block swallows errors.",fix_hint:"Handle or rethrow the error."},{rule_id:"code-large-file",pillar:"code",default_severity:"info",description:"File exceeds size heuristic for maintainability.",fix_hint:"Split into smaller modules."},{rule_id:"code-redundant-fragment",pillar:"code",default_severity:"info",description:"Redundant React fragment wrapper.",fix_hint:"Remove unnecessary <>...</>."},{rule_id:"code-suppression-comment",pillar:"code",default_severity:"info",description:"Lint/TS suppression comment present.",fix_hint:"Fix the underlying issue instead of suppressing."},{rule_id:"code-todo-marker",pillar:"code",default_severity:"info",description:"TODO/FIXME marker in source.",fix_hint:"Resolve or track in issue tracker."}],n2=t2,a2=new Map(n2.map(e=>[e.rule_id,e]));function $0(e){const n=a2.get(e);return n?n.pillar:e.startsWith("a11y-")?"a11y":e.startsWith("token-")?"token":e.startsWith("code-")?"code":"usage"}const r2=new Set(["function","class","const_arrow","const_function","wrapped_component"]);function o2(e){return r2.has(e.kind)}function E0(e){return(e.split("/").pop()??e).replace(/\.(tsx|jsx)$/i,"")}function s2(e){return e.split(/[-_]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join("")}function mx(e){return e.replace(/\.playground$/i,"").split("").filter(n=>n!=="-"&&n!=="_").join("").toLowerCase()}function mi(e){const n=new Map;for(const r of e.files??[])for(const o of r.definitions??[]){const i=n.get(o.name)??[];i.push({kind:o.kind,path:r.path,line:o.line}),n.set(o.name,i)}for(const[,r]of n)r.sort((o,i)=>o.path.localeCompare(i.path)||o.line-i.line);return n}function im(e){const n=new Map,r=(i,c)=>{if(!c?.length)return;let u=n.get(i);u||(u=new Set,n.set(i,u));for(const d of c)u.add(d)};for(const i of e.files??[])for(const c of i.definitions??[])r(c.name,c.declared_props);for(const i of e.playgrounds??[])r(i.export_name,i.declared_props);const o=new Map;for(const[i,c]of n)o.set(i,[...c]);return o}function hi(e){const n=new Map;for(const r of e.usage_by_component??[])n.set(r.component,r);return n}function yp(e,n){return!om(n,e,sm(e,n))}function N0(e,n,r){const o=new Set;for(const i of e.keys())yp(r,i)&&o.add(i);for(const i of n.keys())yp(r,i)&&o.add(i);return[...o].sort((i,c)=>i.localeCompare(c))}function gi(e){return e?N0(mi(e),hi(e),e):[]}function lm(e){if(!e)return[];const n=mi(e),r=hi(e),o=[];for(const[i,c]of n){if(!yp(e,i))continue;const u=r.get(i);u&&u.reference_count>0||o.push({name:i,definitionPaths:c.map(d=>d.path)})}return o.sort((i,c)=>i.name.localeCompare(c.name)),o}function A0(e){const n={all:0,a11y:0,code:0,token:0,unused:0};if(!e)return n;for(const r of e.findings??[]){n.all+=1;const o=$0(r.rule_id);o==="a11y"?n.a11y+=1:o==="code"?n.code+=1:o==="token"&&(n.token+=1)}return n.unused=lm(e).length,n}function i2(e,n){if(!e||n==="unused")return[];const r=e.findings??[];return n==="all"?r:r.filter(o=>$0(o.rule_id)===n)}function l2(e,n){const r=(e.definitions??[]).filter(i=>o2(i)?!om(i.name,n,[e.path]):!1);if(r.length<2)return null;const o=r.map(i=>i.name).sort((i,c)=>i.localeCompare(c));return{parent:s2(E0(e.path)),children:o,path:e.path}}function c2(e,n){if(n===e)return!0;if(!n.startsWith(e)||n.length<=e.length)return!1;const r=n.charAt(e.length);return r===r.toUpperCase()&&r!==r.toLowerCase()}function u2(e,n,r){return n.children.includes(e)?!1:e===n.parent?!0:r.length>0?r.every(o=>o===n.path):c2(n.parent,e)}function d2(e,n,r){const o=new Set(e.children);for(const i of n)u2(i,e,sm(r,i))&&o.add(i);return{...e,children:[...o].sort((i,c)=>i.localeCompare(c))}}function j0(e){if(!e)return[];const n=gi(e),r=new Map;for(const o of e.files??[]){const i=l2(o,e);i&&r.set(i.path,d2(i,n,e))}return[...r.values()].sort((o,i)=>o.parent.localeCompare(i.parent))}function T0(e,n){if(n.includes(e.parent))return e.parent;const r=mx(E0(e.path)),o=e.children.find(i=>mx(i)===r);return o||(e.children[0]??e.parent)}function hx(e){return e.type==="family"?e.parent:e.name}function R0(e){const n=gi(e),r=j0(e),o=new Set(r.flatMap(u=>u.children)),i=new Set(r.map(u=>u.parent)),c=[];for(const u of r)c.push({type:"family",...u});for(const u of n)o.has(u)||i.has(u)||c.push({type:"component",name:u});return c.sort((u,d)=>hx(u).localeCompare(hx(d)))}function M0(e,n){return j0(e).find(r=>r.parent===n||r.children.includes(n))}function O0(e,n){return e?e.children.includes(n)?e.children.filter(r=>r!==n):e.parent===n?e.children:[]:[]}function gx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Fa(...e){return n=>{let r=!1;const o=e.map(i=>{const c=gx(i,n);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let i=0;i<o.length;i++){const c=o[i];typeof c=="function"?c():gx(e[i],null)}}}}function Qe(...e){return v.useCallback(Fa(...e),e)}var f2=Symbol.for("react.lazy"),pc=rm[" use ".trim().toString()];function p2(e){return typeof e=="object"&&e!==null&&"then"in e}function D0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===f2&&"_payload"in e&&p2(e._payload)}function B0(e){const n=m2(e),r=v.forwardRef((o,i)=>{let{children:c,...u}=o;D0(c)&&typeof pc=="function"&&(c=pc(c._payload));const d=v.Children.toArray(c),p=d.find(g2);if(p){const h=p.props.children,b=d.map(y=>y===p?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...u,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,b):null})}return g.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}var z0=B0("Slot");function m2(e){const n=v.forwardRef((r,o)=>{let{children:i,...c}=r;if(D0(i)&&typeof pc=="function"&&(i=pc(i._payload)),v.isValidElement(i)){const u=y2(i),d=b2(c,i.props);return i.type!==v.Fragment&&(d.ref=o?Fa(o,u):u),v.cloneElement(i,d)}return v.Children.count(i)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var h2=Symbol("radix.slottable");function g2(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h2}function b2(e,n){const r={...n};for(const o in n){const i=e[o],c=n[o];/^on[A-Z]/.test(o)?i&&c?r[o]=(...d)=>{const p=c(...d);return i(...d),p}:i&&(r[o]=i):o==="style"?r[o]={...i,...c}:o==="className"&&(r[o]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function y2(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function L0(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=L0(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function U0(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=L0(e))&&(o&&(o+=" "),o+=n);return o}const bx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yx=U0,Lc=(e,n)=>r=>{var o;if(n?.variants==null)return yx(e,r?.class,r?.className);const{variants:i,defaultVariants:c}=n,u=Object.keys(i).map(h=>{const b=r?.[h],y=c?.[h];if(b===null)return null;const _=bx(b)||bx(y);return i[h][_]}),d=r&&Object.entries(r).reduce((h,b)=>{let[y,_]=b;return _===void 0||(h[y]=_),h},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((h,b)=>{let{class:y,className:_,...w}=b;return Object.entries(w).every(S=>{let[k,$]=S;return Array.isArray($)?$.includes({...c,...d}[k]):{...c,...d}[k]===$})?[...h,y,_]:h},[]);return yx(e,u,p,r?.class,r?.className)},x2=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},v2=(e,n)=>({classGroupId:e,validator:n}),P0=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),mc="-",xx=[],_2="arbitrary..",w2=e=>{const n=C2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return S2(u);const d=u.split(mc),p=d[0]===""&&d.length>1?1:0;return I0(d,p,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const p=o[u],h=r[u];return p?h?x2(h,p):p:h||xx}return r[u]||xx}}},I0=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],c=r.nextPart.get(i);if(c){const h=I0(e,n+1,c);if(h)return h}const u=r.validators;if(u===null)return;const d=n===0?e.join(mc):e.slice(n).join(mc),p=u.length;for(let h=0;h<p;h++){const b=u[h];if(b.validator(d))return b.classGroupId}},S2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?_2+o:void 0})(),C2=e=>{const{theme:n,classGroups:r}=e;return k2(r,n)},k2=(e,n)=>{const r=P0();for(const o in e){const i=e[o];cm(i,r,o,n)}return r},cm=(e,n,r,o)=>{const i=e.length;for(let c=0;c<i;c++){const u=e[c];$2(u,n,r,o)}},$2=(e,n,r,o)=>{if(typeof e=="string"){E2(e,n,r);return}if(typeof e=="function"){N2(e,n,r,o);return}A2(e,n,r,o)},E2=(e,n,r)=>{const o=e===""?n:G0(n,e);o.classGroupId=r},N2=(e,n,r,o)=>{if(j2(e)){cm(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(v2(r,e))},A2=(e,n,r,o)=>{const i=Object.entries(e),c=i.length;for(let u=0;u<c;u++){const[d,p]=i[u];cm(p,G0(n,d),r,o)}},G0=(e,n)=>{let r=e;const o=n.split(mc),i=o.length;for(let c=0;c<i;c++){const u=o[c];let d=r.nextPart.get(u);d||(d=P0(),r.nextPart.set(u,d)),r=d}return r},j2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,T2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(c,u)=>{r[c]=u,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=o[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},xp="!",vx=":",R2=[],_x=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),M2=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const c=[];let u=0,d=0,p=0,h;const b=i.length;for(let k=0;k<b;k++){const $=i[k];if(u===0&&d===0){if($===vx){c.push(i.slice(p,k)),p=k+1;continue}if($==="/"){h=k;continue}}$==="["?u++:$==="]"?u--:$==="("?d++:$===")"&&d--}const y=c.length===0?i:i.slice(p);let _=y,w=!1;y.endsWith(xp)?(_=y.slice(0,-1),w=!0):y.startsWith(xp)&&(_=y.slice(1),w=!0);const S=h&&h>p?h-p:void 0;return _x(c,w,_,S)};if(n){const i=n+vx,c=o;o=u=>u.startsWith(i)?c(u.slice(i.length)):_x(R2,!1,u,void 0,!0)}if(r){const i=o;o=c=>r({className:c,parseClassName:i})}return o},O2=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let c=0;c<r.length;c++){const u=r[c],d=u[0]==="[",p=n.has(u);d||p?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(u)):i.push(u)}return i.length>0&&(i.sort(),o.push(...i)),o}},D2=e=>({cache:T2(e.cacheSize),parseClassName:M2(e),sortModifiers:O2(e),postfixLookupClassGroupIds:B2(e),...w2(e)}),B2=e=>{const n=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let o=0;o<r.length;o++)n[r[o]]=!0;return n},z2=/\s+/,L2=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:c,postfixLookupClassGroupIds:u}=n,d=[],p=e.trim().split(z2);let h="";for(let b=p.length-1;b>=0;b-=1){const y=p[b],{isExternal:_,modifiers:w,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:$}=r(y);if(_){h=y+(h.length>0?" "+h:h);continue}let E=!!$,N;if(E){const D=k.substring(0,$);N=o(D);const P=N&&u[N]?o(k):void 0;P&&P!==N&&(N=P,E=!1)}else N=o(k);if(!N){if(!E){h=y+(h.length>0?" "+h:h);continue}if(N=o(k),!N){h=y+(h.length>0?" "+h:h);continue}E=!1}const j=w.length===0?"":w.length===1?w[0]:c(w).join(":"),z=S?j+xp:j,G=z+N;if(d.indexOf(G)>-1)continue;d.push(G);const H=i(N,E);for(let D=0;D<H.length;++D){const P=H[D];d.push(z+P)}h=y+(h.length>0?" "+h:h)}return h},U2=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=H0(r))&&(i&&(i+=" "),i+=o);return i},H0=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=H0(e[o]))&&(r&&(r+=" "),r+=n);return r},P2=(e,...n)=>{let r,o,i,c;const u=p=>{const h=n.reduce((b,y)=>y(b),e());return r=D2(h),o=r.cache.get,i=r.cache.set,c=d,d(p)},d=p=>{const h=o(p);if(h)return h;const b=L2(p,r);return i(p,b),b};return c=u,(...p)=>c(U2(...p))},I2=[],mt=e=>{const n=r=>r[e]||I2;return n.isThemeGetter=!0,n},F0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,G2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,H2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,V2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,La=e=>G2.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),Tn=e=>!!e&&Number.isInteger(Number(e)),zf=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),ra=e=>H2.test(e),V0=()=>!0,X2=e=>F2.test(e)&&!q2.test(e),um=()=>!1,K2=e=>V2.test(e),W2=e=>Y2.test(e),Z2=e=>!ie(e)&&!ce(e),Q2=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),J2=e=>Wa(e,K0,um),ie=e=>F0.test(e),xr=e=>Wa(e,W0,X2),wx=e=>Wa(e,iN,Ae),eN=e=>Wa(e,Q0,V0),tN=e=>Wa(e,Z0,um),Sx=e=>Wa(e,Y0,um),nN=e=>Wa(e,X0,W2),Hl=e=>Wa(e,J0,K2),ce=e=>q0.test(e),Xs=e=>Dr(e,W0),aN=e=>Dr(e,Z0),Cx=e=>Dr(e,Y0),rN=e=>Dr(e,K0),oN=e=>Dr(e,X0),Fl=e=>Dr(e,J0,!0),sN=e=>Dr(e,Q0,!0),Wa=(e,n,r)=>{const o=F0.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},Dr=(e,n,r=!1)=>{const o=q0.exec(e);return o?o[1]?n(o[1]):r:!1},Y0=e=>e==="position"||e==="percentage",X0=e=>e==="image"||e==="url",K0=e=>e==="length"||e==="size"||e==="bg-size",W0=e=>e==="length",iN=e=>e==="number",Z0=e=>e==="family-name",Q0=e=>e==="number"||e==="weight",J0=e=>e==="shadow",lN=()=>{const e=mt("color"),n=mt("font"),r=mt("text"),o=mt("font-weight"),i=mt("tracking"),c=mt("leading"),u=mt("breakpoint"),d=mt("container"),p=mt("spacing"),h=mt("radius"),b=mt("shadow"),y=mt("inset-shadow"),_=mt("text-shadow"),w=mt("drop-shadow"),S=mt("blur"),k=mt("perspective"),$=mt("aspect"),E=mt("ease"),N=mt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...z(),ce,ie],H=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],P=()=>[ce,ie,p],re=()=>[La,"full","auto",...P()],se=()=>[Tn,"none","subgrid",ce,ie],de=()=>["auto",{span:["full",Tn,ce,ie]},Tn,ce,ie],oe=()=>[Tn,"auto",ce,ie],be=()=>["auto","min","max","fr",ce,ie],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...P()],X=()=>[La,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],J=()=>[La,"screen","full","dvw","lvw","svw","min","max","fit",...P()],fe=()=>[La,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],ee=()=>[e,ce,ie],T=()=>[...z(),Cx,Sx,{position:[ce,ie]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",rN,J2,{size:[ce,ie]}],Q=()=>[zf,Xs,xr],Y=()=>["","none","full",h,ce,ie],te=()=>["",Ae,Xs,xr],Z=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ae,zf,Cx,Sx],ke=()=>["","none",S,ce,ie],Re=()=>["none",Ae,ce,ie],he=()=>["none",Ae,ce,ie],Ne=()=>[Ae,ce,ie],Ge=()=>[La,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ra],breakpoint:[ra],color:[V0],container:[ra],"drop-shadow":[ra],ease:["in","out","in-out"],font:[Z2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ra],shadow:[ra],spacing:["px",Ae],text:[ra],"text-shadow":[ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",La,ie,ce,$]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,ie]}],"container-named":[Q2],columns:[{columns:[Ae,ie,ce,d]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:G()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Tn,"auto",ce,ie]}],basis:[{basis:[La,"full","auto",d,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,La,"auto","initial","none",ie]}],grow:[{grow:["",Ae,ce,ie]}],shrink:[{shrink:["",Ae,ce,ie]}],order:[{order:[Tn,"first","last","none",ce,ie]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...X()]}],"min-w":[{"min-w":[d,"screen","none",...X()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Xs,xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,sN,eN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zf,ie]}],"font-family":[{font:[aN,tN,n]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ce,ie]}],"line-clamp":[{"line-clamp":[Ae,"none",ce,wx]}],leading:[{leading:[c,...P()]}],"list-image":[{"list-image":["none",ce,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",ce,xr]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ae,"auto",ce,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Tn,ce,ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tn,ce,ie],radial:["",ce,ie],conic:[Tn,ce,ie]},oN,nN]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,ce,ie]}],"outline-w":[{outline:["",Ae,Xs,xr]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",b,Fl,Hl]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",y,Fl,Hl]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ae,xr]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",_,Fl,Hl]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ae,ce,ie]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ce,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ie]}],filter:[{filter:["","none",ce,ie]}],blur:[{blur:ke()}],brightness:[{brightness:[Ae,ce,ie]}],contrast:[{contrast:[Ae,ce,ie]}],"drop-shadow":[{"drop-shadow":["","none",w,Fl,Hl]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ae,ce,ie]}],"hue-rotate":[{"hue-rotate":[Ae,ce,ie]}],invert:[{invert:["",Ae,ce,ie]}],saturate:[{saturate:[Ae,ce,ie]}],sepia:[{sepia:["",Ae,ce,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ie]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,ce,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,ce,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,ce,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,ce,ie]}],"backdrop-invert":[{"backdrop-invert":["",Ae,ce,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,ce,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,ce,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,ce,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",ce,ie]}],ease:[{ease:["linear","initial",E,ce,ie]}],delay:[{delay:[Ae,ce,ie]}],animate:[{animate:["none",N,ce,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ce,ie]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ce,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],zoom:[{zoom:[Tn,ce,ie]}],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ee()}],"scrollbar-track-color":[{"scrollbar-track":ee()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ie]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ae,Xs,xr,wx]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cN=P2(lN);function xe(...e){return cN(U0(e))}const uN=Lc("inline-flex rounded-full items-center justify-center border font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"},size:{default:"px-3 py-0.5 text-xs",sm:"px-2 py-0.5 font-mono text-xs font-normal leading-tight"}},defaultVariants:{variant:"default",size:"default"}}),Er=v.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},c)=>{const u=o?z0:"span";return g.jsx(u,{"data-slot":"badge",className:xe(uN({variant:n,size:r}),e),ref:c,...i})});Er.displayName="Badge";function Bn({className:e,...n}){return g.jsx("div",{"data-slot":"table-container",className:xe("relative w-full overflow-x-auto rounded-lg border border-border bg-card",e),children:g.jsx("table",{"data-slot":"table",className:"w-full caption-bottom relative text-sm",...n})})}function zn({className:e,...n}){return g.jsx("thead",{"data-slot":"table-header",className:xe("[&_tr]:border-b",e),...n})}function Ln({className:e,...n}){return g.jsx("tbody",{"data-slot":"table-body",className:xe("[&_tr:last-child]:border-0",e),...n})}function ft({className:e,...n}){return g.jsx("tr",{"data-slot":"table-row",className:xe("border-b hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...n})}function Ue({className:e,...n}){return g.jsx("th",{"data-slot":"table-head",className:xe("h-8 text-xs py-1 px-4 text-left align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pr-0 has-[[role=checkbox]]:translate-y-0.5","sticky top-0 z-30 bg-muted/50",e),...n})}function Pe({className:e,...n}){return g.jsx("td",{"data-slot":"table-cell",className:xe("px-4 py-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pr-0 has-[[role=checkbox]]:translate-y-0.5",e),...n})}const dN=new Set(["sheep","fish","deer","hay","moose","series","species","aircraft","bison","buffalo","cod","elk","halibut","hovercraft","lego","mackerel","salmon","spacecraft","swine","trout","tuna"]),kx=new Map([["addendum","addenda"],["agendum","agenda"],["alumnus","alumni"],["analysis","analyses"],["anathema","anathemata"],["appendix","appendices"],["axis","axes"],["bacterium","bacteria"],["basis","bases"],["cactus","cacti"],["cherub","cherubim"],["child","children"],["corrigendum","corrigenda"],["crisis","crises"],["criterion","criteria"],["curriculum","curricula"],["custom","customs"],["datum","data"],["diagnosis","diagnoses"],["dogma","dogmata"],["ellipsis","ellipses"],["elf","elves"],["erratum","errata"],["focus","foci"],["foot","feet"],["forum","fora"],["fungus","fungi"],["genus","genera"],["goose","geese"],["half","halves"],["hypothesis","hypotheses"],["index","indices"],["knife","knives"],["leaf","leaves"],["lemma","lemmata"],["life","lives"],["loaf","loaves"],["man","men"],["matrix","matrices"],["medium","media"],["memorandum","memoranda"],["millennium","millennia"],["mouse","mice"],["nucleus","nuclei"],["oasis","oases"],["ovum","ova"],["ox","oxen"],["parenthesis","parentheses"],["person","people"],["phenomenon","phenomena"],["potato","potatoes"],["radius","radii"],["schema","schemata"],["stimulus","stimuli"],["stigma","stigmata"],["stoma","stomata"],["stratum","strata"],["syllabus","syllabi"],["symposium","symposia"],["synthesis","syntheses"],["thesis","theses"],["tooth","teeth"],["tomato","tomatoes"],["vertex","vertices"],["wife","wives"],["woman","women"]]);function oi(e,n){if(n===1||!e||typeof e!="string"||(e=e.trim().toLowerCase(),dN.has(e)))return e;if(kx.has(e))return kx.get(e);const r=new Map([["ch","ches"],["ss","sses"],["sh","shes"],["x","xes"],["s","ses"],["z","zes"],["o","oes"],["us","i"],["f","ves"],["fe","ves"]]);if(e.endsWith("y")){const o=e.slice(-2,-1);if(!["a","e","i","o","u"].includes(o))return e.slice(0,-1)+"ies"}for(const[o,i]of r)if(e.endsWith(o))return e.slice(0,-o.length)+i;return e+"s"}function fN(){if(typeof window>"u")return null;const e=window.innerWidth;return e<640?"xs":e<768?"sm":e<1024?"md":e<1280?"lg":e<1536?"xl":"2xl"}function pN(e){if(typeof window>"u")return null;if(!(e&&e instanceof HTMLElement))return console.log("element is not an instance of HTMLElement"),null;const n=e.getBoundingClientRect().width;return n<320?"@xs":n<384?"@sm":n<448?"@md":n<512?"@lg":n<576?"@xl":n<672?"@2xl":n<768?"@3xl":n<896?"@4xl":n<1024?"@5xl":n<1152?"@6xl":"@7xl"}const mN=new Set(["children"]);function Uc(e){return e.filter(n=>!mN.has(n))}function dm(e,n){return(e.usage_by_component??[]).find(o=>o.component===n)?.prop_frequencies??{}}function e_(e,n,r){const o=new Set,i=dm(e,n);for(const c of Uc(r))(i[c]??0)===0&&o.add(`${n}/${c}`);return o}function hN(e){return[...Uc(e)].sort((n,r)=>n.localeCompare(r))}function gN({usedPropCount:e,totalPropCount:n}){return g.jsxs("p",{className:"text-sm text-muted-foreground",children:[e,"/",n," ",oi("prop",e)," used in the workspace snapshot."]})}function bN({props:e,propFrequencies:n}){return g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Prop"}),g.jsx(Ue,{className:"w-20 text-right",children:"Uses"})]})}),g.jsx(Ln,{children:e.map(r=>{const o=n[r]??0,i=o===0;return g.jsxs(ft,{className:i?"text-muted-foreground":void 0,children:[g.jsx(Pe,{className:"font-mono text-xs",children:r}),g.jsx(Pe,{className:"text-right tabular-nums",children:o})]},r)})})]})}function yN({props:e,propFrequencies:n}){return g.jsx("div",{className:"flex flex-wrap gap-1",children:e.map(r=>{const o=n[r]??0,i=o>0;return g.jsx(Er,{variant:i?"secondary":"outline",size:"sm",className:xe(!i&&"text-muted-foreground"),title:i?`${o} uses`:"Never passed",children:r},r)})})}function t_({component:e,declared:n,unusedProps:r,propFrequencies:o={},variant:i="table"}){const c=hN(n),u=c.filter(d=>!r.has(`${e}/${d}`)).length;return c.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"No declared props recorded for this component."}):g.jsxs("div",{className:i==="compact"?"space-y-2":"space-y-4",children:[g.jsx(gN,{usedPropCount:u,totalPropCount:c.length}),i==="compact"?g.jsx(yN,{props:c,propFrequencies:o}):g.jsx(bN,{props:c,propFrequencies:o})]})}function si(e){return e.replace(/\\/g,"/")}function Pc(e,n){const r=si(n.replace(/^\.\.\//,"")),o=r.startsWith("components/")?`src/${r}`:r;return`${si(e).replace(/\/$/,"")}/${o}`}const xN="src/components/";function $x(e){const n=si(e),r=n.indexOf(xN);return r===-1?null:n.slice(r)}function Ic(e,n){const r=si(e),o=si(n);if(r===o)return!0;const i=$x(r),c=$x(o);return i&&c?i===c:!1}const vN="/.../";function qa(e){return e.replace(/\\/g,"/").replace(/\/$/,"")}function Po(e,n){const r=qa(e),o=qa(n);return o.startsWith(r+"/")?o.slice(r.length+1):o.split("/").slice(-3).join("/")}function _N(e,n){const r=qa(e),o=qa(n);return o.startsWith(r+"/")||o===r?o:`${r}/${o}`}function wN(e,n){const r=qa(e);if(r.length<=n||n<=0)return r;const o=r.split("/"),i=o.pop()??"";if(o.length===0)return i;for(let c=o.length;c>=0;c--){const u=o.slice(0,c).join("/"),d=c===0?`.../${i}`:`${u}${vN}${i}`;if(d.length<=n)return d}return i}function SN(e){const n=e.clientWidth;if(n<=0)return 1;const r=getComputedStyle(e),o=document.createElement("span");o.textContent="m",o.style.position="absolute",o.style.visibility="hidden",o.style.whiteSpace="pre",o.style.font=r.font,document.body.appendChild(o);const i=o.getBoundingClientRect().width;return o.remove(),i<=0?1:Math.max(1,Math.floor(n/i))}const Ex="@dslinter-scan/";function CN(e,n){const r=qa(n);return r.startsWith(Ex)?`${qa(e)}/${r.slice(Ex.length)}`:Pc(e,n)}const kN="/dslinter/open-file";async function n_(e,n,r=1){if(typeof window>"u")return;const o=new URLSearchParams({path:e});n!=null&&o.set("line",String(n)),o.set("column",String(r));try{if((await fetch(`${kN}?${o}`,{method:"POST"})).ok)return}catch{}window.location.assign($N(e,n,r,"cursor"))}function $N(e,n,r=1,o="vscode"){const i=qa(e),c=n!=null?`:${n}:${r}`:"";if(/^[a-zA-Z]:/.test(i)){const d=i.slice(0,2).toLowerCase(),p=i.slice(2).replace(/^\//,"").split("/").map(encodeURIComponent).join("/");return`${o}://file/${d}/${p}${c}`}const u=i.split("/").map((d,p)=>p===0&&d===""?"":encodeURIComponent(d)).join("/");return`${o}://file${u}${c}`}function Nr({children:e,className:n}){return g.jsx("div",{className:xe("rounded-lg border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground",n),children:e})}function Ho({path:e,className:n,title:r}){const o=v.useRef(null),[i,c]=v.useState(e);return v.useLayoutEffect(()=>{const u=o.current;if(!u)return;const d=()=>{const h=SN(u);c(wN(e,h))};d();const p=new ResizeObserver(d);return p.observe(u),()=>p.disconnect()},[e]),g.jsx("span",{ref:o,className:xe("block min-w-0 font-mono",n),title:r??e,children:i})}function EN(e){return e.props.length?e.props.map(n=>e.prop_values?.[n]!=null?`${n}=${JSON.stringify(e.prop_values[n])}`:n).join(", "):"—"}function NN(e){const n=[...e??[]];return n.sort((r,o)=>r.path.localeCompare(o.path)||r.line-o.line),n}function AN({root:e,loc:n}){const r=Po(e,n.path),o=`${r}:${n.line}`,i=_N(e,n.path),c=v.useCallback(()=>{n_(i,n.line).catch(u=>{const d=u instanceof Error?u.message:String(u);window.alert(`Could not open file: ${d}`)})},[i,n.line]);return g.jsx("button",{type:"button",onClick:c,className:"block min-w-0 w-full text-left text-xs text-muted-foreground transition-colors hover:text-foreground hover:underline",title:o,children:g.jsx(Ho,{path:`${r}:${n.line}`,className:"text-xs",title:void 0})})}function a_({report:e,componentId:n}){const r=v.useMemo(()=>{if(e)return hi(e).get(n)},[e,n]);if(!e)return g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Load ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," to see where this component is used in the workspace."]});if(!r)return g.jsxs(Nr,{children:["0 imports of ",n," found in codebase"]});const o=NN(r.usage_locations);return o.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Usage totals exist but individual call sites were not recorded in this report."}):g.jsxs(Bn,{className:"[&>table]:table-fixed [&>table]:w-full",children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{className:"w-[40%] min-w-0",children:"Location"}),g.jsx(Ue,{className:"min-w-0",children:"Props at this call site"})]})}),g.jsx(Ln,{children:o.map((i,c)=>{const u=EN(i);return g.jsxs(ft,{children:[g.jsx(Pe,{className:"min-w-0",children:g.jsx(AN,{root:e.root,loc:i})}),g.jsx(Pe,{className:"min-w-0",children:g.jsx("span",{className:"block truncate font-mono text-xs text-foreground",title:u,children:u})})]},`${i.path}-${i.line}-${c}`)})})]})}var bi=c0();const jN=l0(bi);function ii(e){const n=TN(e),r=v.forwardRef((o,i)=>{const{children:c,...u}=o,d=v.Children.toArray(c),p=d.find(MN);if(p){const h=p.props.children,b=d.map(y=>y===p?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...u,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,b):null})}return g.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}function TN(e){const n=v.forwardRef((r,o)=>{const{children:i,...c}=r;if(v.isValidElement(i)){const u=DN(i),d=ON(c,i.props);return i.type!==v.Fragment&&(d.ref=o?Fa(o,u):u),v.cloneElement(i,d)}return v.Children.count(i)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var RN=Symbol("radix.slottable");function MN(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RN}function ON(e,n){const r={...n};for(const o in n){const i=e[o],c=n[o];/^on[A-Z]/.test(o)?i&&c?r[o]=(...d)=>{const p=c(...d);return i(...d),p}:i&&(r[o]=i):o==="style"?r[o]={...i,...c}:o==="className"&&(r[o]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function DN(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=BN.reduce((e,n)=>{const r=ii(`Primitive.${n}`),o=v.forwardRef((i,c)=>{const{asChild:u,...d}=i,p=u?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...d,ref:c})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function zN(e,n){e&&bi.flushSync(()=>e.dispatchEvent(n))}var r_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),LN="VisuallyHidden",UN=v.forwardRef((e,n)=>g.jsx(Be.span,{...e,ref:n,style:{...r_,...e.style}}));UN.displayName=LN;function PN(e,n){const r=v.createContext(n),o=c=>{const{children:u,...d}=c,p=v.useMemo(()=>d,Object.values(d));return g.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function i(c){const u=v.useContext(r);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[o,i]}function Za(e,n=[]){let r=[];function o(c,u){const d=v.createContext(u),p=r.length;r=[...r,u];const h=y=>{const{scope:_,children:w,...S}=y,k=_?.[e]?.[p]||d,$=v.useMemo(()=>S,Object.values(S));return g.jsx(k.Provider,{value:$,children:w})};h.displayName=c+"Provider";function b(y,_){const w=_?.[e]?.[p]||d,S=v.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[h,b]}const i=()=>{const c=r.map(u=>v.createContext(u));return function(d){const p=d?.[e]||c;return v.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,IN(i,...n)]}function IN(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const u=o.reduce((d,{useScope:p,scopeName:h})=>{const y=p(c)[`__scope${h}`];return{...d,...y}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return r.scopeName=n.scopeName,r}function o_(e){const n=e+"CollectionProvider",[r,o]=Za(n),[i,c]=r(n,{collectionRef:{current:null},itemMap:new Map}),u=k=>{const{scope:$,children:E}=k,N=dt.useRef(null),j=dt.useRef(new Map).current;return g.jsx(i,{scope:$,itemMap:j,collectionRef:N,children:E})};u.displayName=n;const d=e+"CollectionSlot",p=ii(d),h=dt.forwardRef((k,$)=>{const{scope:E,children:N}=k,j=c(d,E),z=Qe($,j.collectionRef);return g.jsx(p,{ref:z,children:N})});h.displayName=d;const b=e+"CollectionItemSlot",y="data-radix-collection-item",_=ii(b),w=dt.forwardRef((k,$)=>{const{scope:E,children:N,...j}=k,z=dt.useRef(null),G=Qe($,z),H=c(b,E);return dt.useEffect(()=>(H.itemMap.set(z,{ref:z,...j}),()=>{H.itemMap.delete(z)})),g.jsx(_,{[y]:"",ref:G,children:N})});w.displayName=b;function S(k){const $=c(e+"CollectionConsumer",k);return dt.useCallback(()=>{const N=$.collectionRef.current;if(!N)return[];const j=Array.from(N.querySelectorAll(`[${y}]`));return Array.from($.itemMap.values()).sort((H,D)=>j.indexOf(H.ref.current)-j.indexOf(D.ref.current))},[$.collectionRef,$.itemMap])}return[{Provider:u,Slot:h,ItemSlot:w},S,o]}function Se(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return n?.(i)}}var At=globalThis?.document?v.useLayoutEffect:()=>{},GN=rm[" useInsertionEffect ".trim().toString()]||At;function la({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,c,u]=HN({defaultProp:n,onChange:r}),d=e!==void 0,p=d?e:i;{const b=v.useRef(e!==void 0);v.useEffect(()=>{const y=b.current;y!==d&&console.warn(`${o} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=d},[d,o])}const h=v.useCallback(b=>{if(d){const y=FN(b)?b(e):b;y!==e&&u.current?.(y)}else c(b)},[d,e,c,u]);return[p,h]}function HN({defaultProp:e,onChange:n}){const[r,o]=v.useState(e),i=v.useRef(r),c=v.useRef(n);return GN(()=>{c.current=n},[n]),v.useEffect(()=>{i.current!==r&&(c.current?.(r),i.current=r)},[r,i]),[r,o,c]}function FN(e){return typeof e=="function"}function qN(e,n){return v.useReducer((r,o)=>n[r][o]??r,e)}var Br=e=>{const{present:n,children:r}=e,o=VN(n),i=typeof r=="function"?r({present:o.isPresent}):v.Children.only(r),c=Qe(o.ref,YN(i));return typeof r=="function"||o.isPresent?v.cloneElement(i,{ref:c}):null};Br.displayName="Presence";function VN(e){const[n,r]=v.useState(),o=v.useRef(null),i=v.useRef(e),c=v.useRef("none"),u=e?"mounted":"unmounted",[d,p]=qN(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=ql(o.current);c.current=d==="mounted"?h:"none"},[d]),At(()=>{const h=o.current,b=i.current;if(b!==e){const _=c.current,w=ql(h);e?p("MOUNT"):w==="none"||h?.display==="none"?p("UNMOUNT"):p(b&&_!==w?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),At(()=>{if(n){let h;const b=n.ownerDocument.defaultView??window,y=w=>{const k=ql(o.current).includes(CSS.escape(w.animationName));if(w.target===n&&k&&(p("ANIMATION_END"),!i.current)){const $=n.style.animationFillMode;n.style.animationFillMode="forwards",h=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=$)})}},_=w=>{w.target===n&&(c.current=ql(o.current))};return n.addEventListener("animationstart",_),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{b.clearTimeout(h),n.removeEventListener("animationstart",_),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:v.useCallback(h=>{o.current=h?getComputedStyle(h):null,r(h)},[])}}function ql(e){return e?.animationName||"none"}function YN(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var XN=rm[" useId ".trim().toString()]||(()=>{}),KN=0;function Zt(e){const[n,r]=v.useState(XN());return At(()=>{r(o=>o??String(KN++))},[e]),e||(n?`radix-${n}`:"")}var WN=v.createContext(void 0);function fm(e){const n=v.useContext(WN);return e||n||"ltr"}function Va(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...r)=>n.current?.(...r),[])}function ZN(e,n=globalThis?.document){const r=Va(e);v.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var QN="DismissableLayer",vp="dismissableLayer.update",JN="dismissableLayer.pointerDownOutside",eA="dismissableLayer.focusOutside",Nx,s_=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gc=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...p}=e,h=v.useContext(s_),[b,y]=v.useState(null),_=b?.ownerDocument??globalThis?.document,[,w]=v.useState({}),S=Qe(n,D=>y(D)),k=Array.from(h.layers),[$]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf($),N=b?k.indexOf(b):-1,j=h.layersWithOutsidePointerEventsDisabled.size>0,z=N>=E,G=aA(D=>{const P=D.target,re=[...h.branches].some(se=>se.contains(P));!z||re||(i?.(D),u?.(D),D.defaultPrevented||d?.())},_),H=rA(D=>{const P=D.target;[...h.branches].some(se=>se.contains(P))||(c?.(D),u?.(D),D.defaultPrevented||d?.())},_);return ZN(D=>{N===h.layers.size-1&&(o?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},_),v.useEffect(()=>{if(b)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Nx=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(b)),h.layers.add(b),Ax(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=Nx)}},[b,_,r,h]),v.useEffect(()=>()=>{b&&(h.layers.delete(b),h.layersWithOutsidePointerEventsDisabled.delete(b),Ax())},[b,h]),v.useEffect(()=>{const D=()=>w({});return document.addEventListener(vp,D),()=>document.removeEventListener(vp,D)},[]),g.jsx(Be.div,{...p,ref:S,style:{pointerEvents:j?z?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,H.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,G.onPointerDownCapture)})});Gc.displayName=QN;var tA="DismissableLayerBranch",nA=v.forwardRef((e,n)=>{const r=v.useContext(s_),o=v.useRef(null),i=Qe(n,o);return v.useEffect(()=>{const c=o.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),g.jsx(Be.div,{...e,ref:i})});nA.displayName=tA;function aA(e,n=globalThis?.document){const r=Va(e),o=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const c=d=>{if(d.target&&!o.current){let p=function(){i_(JN,r,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=p,n.addEventListener("click",i.current,{once:!0})):p()}else n.removeEventListener("click",i.current);o.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function rA(e,n=globalThis?.document){const r=Va(e),o=v.useRef(!1);return v.useEffect(()=>{const i=c=>{c.target&&!o.current&&i_(eA,r,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ax(){const e=new CustomEvent(vp);document.dispatchEvent(e)}function i_(e,n,r,{discrete:o}){const i=r.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?zN(i,c):i.dispatchEvent(c)}var Lf="focusScope.autoFocusOnMount",Uf="focusScope.autoFocusOnUnmount",jx={bubbles:!1,cancelable:!0},oA="FocusScope",pm=v.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=e,[d,p]=v.useState(null),h=Va(i),b=Va(c),y=v.useRef(null),_=Qe(n,k=>p(k)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(o){let k=function(j){if(w.paused||!d)return;const z=j.target;d.contains(z)?y.current=z:Ua(y.current,{select:!0})},$=function(j){if(w.paused||!d)return;const z=j.relatedTarget;z!==null&&(d.contains(z)||Ua(y.current,{select:!0}))},E=function(j){if(document.activeElement===document.body)for(const G of j)G.removedNodes.length>0&&Ua(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",$);const N=new MutationObserver(E);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",$),N.disconnect()}}},[o,d,w.paused]),v.useEffect(()=>{if(d){Rx.add(w);const k=document.activeElement;if(!d.contains(k)){const E=new CustomEvent(Lf,jx);d.addEventListener(Lf,h),d.dispatchEvent(E),E.defaultPrevented||(sA(dA(l_(d)),{select:!0}),document.activeElement===k&&Ua(d))}return()=>{d.removeEventListener(Lf,h),setTimeout(()=>{const E=new CustomEvent(Uf,jx);d.addEventListener(Uf,b),d.dispatchEvent(E),E.defaultPrevented||Ua(k??document.body,{select:!0}),d.removeEventListener(Uf,b),Rx.remove(w)},0)}}},[d,h,b,w]);const S=v.useCallback(k=>{if(!r&&!o||w.paused)return;const $=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if($&&E){const N=k.currentTarget,[j,z]=iA(N);j&&z?!k.shiftKey&&E===z?(k.preventDefault(),r&&Ua(j,{select:!0})):k.shiftKey&&E===j&&(k.preventDefault(),r&&Ua(z,{select:!0})):E===N&&k.preventDefault()}},[r,o,w.paused]);return g.jsx(Be.div,{tabIndex:-1,...u,ref:_,onKeyDown:S})});pm.displayName=oA;function sA(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(Ua(o,{select:n}),document.activeElement!==r)return}function iA(e){const n=l_(e),r=Tx(n,e),o=Tx(n.reverse(),e);return[r,o]}function l_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Tx(e,n){for(const r of e)if(!lA(r,{upTo:n}))return r}function lA(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cA(e){return e instanceof HTMLInputElement&&"select"in e}function Ua(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&cA(e)&&n&&e.select()}}var Rx=uA();function uA(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=Mx(e,n),e.unshift(n)},remove(n){e=Mx(e,n),e[0]?.resume()}}}function Mx(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function dA(e){return e.filter(n=>n.tagName!=="A")}var fA="Portal",Hc=v.forwardRef((e,n)=>{const{container:r,...o}=e,[i,c]=v.useState(!1);At(()=>c(!0),[]);const u=r||i&&globalThis?.document?.body;return u?jN.createPortal(g.jsx(Be.div,{...o,ref:n}),u):null});Hc.displayName=fA;var Pf=0;function c_(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ox()),document.body.insertAdjacentElement("beforeend",e[1]??Ox()),Pf++,()=>{Pf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Pf--}},[])}function Ox(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mn=function(){return Mn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(n[c]=r[c])}return n},Mn.apply(this,arguments)};function u_(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function pA(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,c;o<i;o++)(c||!(o in n))&&(c||(c=Array.prototype.slice.call(n,0,o)),c[o]=n[o]);return e.concat(c||Array.prototype.slice.call(n))}var sc="right-scroll-bar-position",ic="width-before-scroll-bar",mA="with-scroll-bars-hidden",hA="--removed-body-scroll-bar-size";function If(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function gA(e,n){var r=v.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var bA=typeof window<"u"?v.useLayoutEffect:v.useEffect,Dx=new WeakMap;function yA(e,n){var r=gA(null,function(o){return e.forEach(function(i){return If(i,o)})});return bA(function(){var o=Dx.get(r);if(o){var i=new Set(o),c=new Set(e),u=r.current;i.forEach(function(d){c.has(d)||If(d,null)}),c.forEach(function(d){i.has(d)||If(d,u)})}Dx.set(r,e)},[e]),r}function xA(e){return e}function vA(e,n){n===void 0&&(n=xA);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(c){var u=n(c,o);return r.push(u),function(){r=r.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(o=!0;r.length;){var u=r;r=[],u.forEach(c)}r={push:function(d){return c(d)},filter:function(){return r}}},assignMedium:function(c){o=!0;var u=[];if(r.length){var d=r;r=[],d.forEach(c),u=r}var p=function(){var b=u;u=[],b.forEach(c)},h=function(){return Promise.resolve().then(p)};h(),r={push:function(b){u.push(b),h()},filter:function(b){return u=u.filter(b),r}}}};return i}function _A(e){e===void 0&&(e={});var n=vA(null);return n.options=Mn({async:!0,ssr:!1},e),n}var d_=function(e){var n=e.sideCar,r=u_(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return v.createElement(o,Mn({},r))};d_.isSideCarExport=!0;function wA(e,n){return e.useMedium(n),d_}var f_=_A(),Gf=function(){},Fc=v.forwardRef(function(e,n){var r=v.useRef(null),o=v.useState({onScrollCapture:Gf,onWheelCapture:Gf,onTouchMoveCapture:Gf}),i=o[0],c=o[1],u=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,b=e.enabled,y=e.shards,_=e.sideCar,w=e.noRelative,S=e.noIsolation,k=e.inert,$=e.allowPinchZoom,E=e.as,N=E===void 0?"div":E,j=e.gapMode,z=u_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),G=_,H=yA([r,n]),D=Mn(Mn({},z),i);return v.createElement(v.Fragment,null,b&&v.createElement(G,{sideCar:f_,removeScrollBar:h,shards:y,noRelative:w,noIsolation:S,inert:k,setCallbacks:c,allowPinchZoom:!!$,lockRef:r,gapMode:j}),u?v.cloneElement(v.Children.only(d),Mn(Mn({},D),{ref:H})):v.createElement(N,Mn({},D,{className:p,ref:H}),d))});Fc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fc.classNames={fullWidth:ic,zeroRight:sc};var SA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=SA();return n&&e.setAttribute("nonce",n),e}function kA(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function $A(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var EA=function(){var e=0,n=null;return{add:function(r){e==0&&(n=CA())&&(kA(n,r),$A(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},NA=function(){var e=EA();return function(n,r){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},p_=function(){var e=NA(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},AA={left:0,top:0,right:0,gap:0},Hf=function(e){return parseInt(e||"",10)||0},jA=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[Hf(r),Hf(o),Hf(i)]},TA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return AA;var n=jA(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},RA=p_(),Do="data-scroll-locked",MA=function(e,n,r,o){var i=e.left,c=e.top,u=e.right,d=e.gap;return r===void 0&&(r="margin"),`
|
|
23
|
+
</${e.root}>`}function $E(e){return e.content??e.trigger}function S0(e,n,r,o,i,c){const u=e.exports.get(n);if(!u||!mn(r,n))return null;const d=yE(i,n),p=vE(u,d,c.controlOverrides??{},n),h=c.staticDefaults?.[n]??{},b=w=>{const S=wE(_E(p,w,n),h);return CE(e,n,r,S)};function y({values:w}){return b(w)}const _={id:n,title:n,...e.group?{group:e.group}:{}};return{id:n,meta:_,modulePath:o,controls:p,usageSnippet:w=>kE(e,n,w,p),renderPreview:b,Preview:y}}function EE(e,n,r){if(!e)return[];const o=[],i=w0(e);for(const c of i){const u=r.globKeyFromRelPath(c.relPath),d=zc(c.relPath,n,r.globKeyFromRelPath),p=d?n[d]:void 0;if(p&&mn(p,c.root))for(const h of c.exports.keys()){if(h===c.root||r.existingIds.has(h))continue;const b=S0(c,h,p,d??u,e,r);b&&o.push(b)}}return o.sort((c,u)=>c.meta.title.localeCompare(u.meta.title)),o}function NE(e,n,r,o){const i=w0(n);for(const c of i){const u=$E(c);if(!u||u===c.root)continue;const d=o.globKeyFromRelPath(c.relPath),p=zc(c.relPath,r,o.globKeyFromRelPath),h=p??d,b=p?r[p]:void 0;if(!b)continue;const y=e.findIndex(S=>S.id===c.root&&S.modulePath===h);if(y<0)continue;const _=S0(c,u,b,h,n,o);if(!_)continue;const w=e[y];e[y]={...w,controls:_.controls,renderPreview:_.renderPreview,Preview:_.Preview,usageSnippet:_.usageSnippet}}}function AE(e){return/[<>{}&]/.test(e)?`{JSON.stringify(${JSON.stringify(e)})}`:e}function jE(e,n){switch(e.type){case"boolean":return!!n===e.default;case"number":{const r=typeof n=="number"?n:Number(n);return Number.isFinite(r)&&r===e.default}case"string":case"node":case"select":return String(n??"")===String(e.default);default:return!1}}function TE(e,n,r){const o=new Map(r.map(_=>[_.key,_])),i=_=>{const w=o.get(_);return w?!jE(w,n[_]):!0},c=Object.prototype.hasOwnProperty.call(n,"children"),u=c?n.children:void 0,d=Object.keys(n).filter(_=>_!=="children").filter(i).sort((_,w)=>_.localeCompare(w)),p=d.map(_=>`${_}={${JSON.stringify(n[_])}}`).join(" "),h=d.length===0?`<${e}`:`<${e} ${p}`;if(!c)return d.length===0?`<${e} />`:`${h} />`;if(typeof u=="boolean"){const _=Object.keys(n).filter(i).sort((S,k)=>S.localeCompare(k)),w=_.map(S=>`${S}={${JSON.stringify(n[S])}}`).join(" ");return _.length===0?`<${e} />`:`<${e} ${w} />`}const b=String(typeof u=="number"?u:u??"");if(b.length===0)return d.length===0?`<${e} />`:`${h} />`;const y=AE(b);return d.length===0?`<${e}>${y}</${e}>`:`${h}>${y}</${e}>`}function RE(e){if(e==="boolean"||e==="string"||e==="number"||e==="node"||e==="unknown")return e}function ME(e){if(!e||typeof e!="object")return;const n={};for(const[r,o]of Object.entries(e)){const i=RE(o);i&&i!=="unknown"&&(n[r]=i)}return Object.keys(n).length?n:void 0}function OE(e,n){return e.length>0?e.map(r=>r.key):n.filter(r=>r!=="key"&&r!=="ref")}function DE(e,n,r,o,i){const c={};for(const u of OE(e,n)){if(Bc.has(u))continue;if(Uo(u)){const p=r[u];if(p==null||String(p).length===0)continue;c[u]=String(p);continue}if(u==="children"){const p=f0(i,r.children);p!==void 0&&(c[u]=p);continue}const d=o?.[u];if(d==="boolean"){c[u]=!!r[u];continue}if(d==="number"){const p=r[u],h=typeof p=="number"?p:Number(p);c[u]=Number.isFinite(h)?h:0;continue}if(d==="string"||d==="node"){c[u]=r[u];continue}if(p0(u)){c[u]=!!r[u];continue}c[u]=r[u]}return c}function BE(e,n){const r={...e};for(const[o,i]of Object.entries(n)){const c=r[o];(c===void 0||c===""&&o!=="children")&&(r[o]=i)}return r}function zE(e){if(!e||typeof e!="object")return!1;const n=e;if(typeof n.playgroundMeta!="object"||n.playgroundMeta===null)return!1;const r=n.playgroundMeta;return typeof r.id=="string"&&typeof r.title=="string"&&(r.group===void 0||typeof r.group=="string")&&Array.isArray(n.playgroundControls)&&typeof n.PlaygroundPreview=="function"}function LE(e,n){return e.playgrounds?.find(r=>r.export_name===n||r.id===n)}function UE(e,n,r){const o=n?.rootPropBindings??[];if(o.length>0)return o;const i=LE(r,e.id);if(!i)return[];const c=new Set(e.controls.map(u=>u.key));return(i.declared_props??[]).filter(u=>c.has(u)).map(u=>({component:i.export_name,prop:u,param:u}))}function fx(e,n,r){if(!r)return e;const o=new Map;for(const i of Object.values(n))if(!(!i||typeof i!="object"))for(const[c,u]of Object.entries(i)){if(!zE(u))continue;const d=u.playgroundMeta.id||v0(c)||"";d&&o.set(d,u)}return e.map(i=>{const c=o.get(i.id),u=UE(i,c?.playgroundKitHints,r);if(!u.length)return i;const d=U$(i.controls,u,r,i.id);return d===i.controls?i:{...i,controls:d}})}function PE(e,n){return e?.usage_by_component?.find(r=>r.component===n)}function IE(e){return e.export_name}function GE(e,n){const r=e.find(o=>o.id===n);return r||e.find(o=>o.meta.title===n||o.modulePath.includes(`/${n}.`)||o.modulePath.endsWith(`/${n}.tsx`)||o.modulePath.endsWith(`/${n}.jsx`))}function L4(e,n,r={}){const o=e?.playgrounds,i=r.globKeyFromRelPath??_0,c=r.controlOverrides??{},u=r.staticDefaults??{},d=o?.length?aE(e,n,{globKeyFromRelPath:i}):[];r.logJoinSkips&&rE(d);const p=[];if(!o?.length){const _=fx(sx(n),n,e);return{entries:ix([],_),skipped:d}}for(const _ of o){let w=function({values:se}){return P(se)};const S=i(_.rel_path),k=zc(_.rel_path,n,i),$=k?n[k]:void 0;if(!$)continue;const E=mn($,_.export_name);if(!E)continue;const N=IE(_),j=_.declared_props??[],z=ME(_.declared_prop_kinds),G=PE(e,_.export_name),H=O$(h0(N,j,z,_.declared_prop_options,_.declared_prop_defaults,c,_.export_name),M$(j,G),_.export_name),D=u[N]??u[_.id]??{},P=se=>{const de=DE(H,j,se,z,_.export_name),oe=BE(de,D);return v.createElement(E,oe)},re={id:N,title:N,..._.group?{group:_.group}:{}};p.push({id:N,meta:re,modulePath:k??S,controls:H,usageSnippet:se=>TE(_.export_name,se,H),renderPreview:P,Preview:w})}e&&NE(p,e,n,{globKeyFromRelPath:i,controlOverrides:c,staticDefaults:u});const h=EE(e,n,{globKeyFromRelPath:i,controlOverrides:c,staticDefaults:u,existingIds:new Set(p.map(_=>_.id))}),b=fx(sx(n),n,e),y=ix([...p,...h],b);return{entries:FE(e,y),skipped:d}}function HE(e,n){if(!e)return[n.modulePath];const r=sm(e,n.meta.id);return r.length>0?r:[n.modulePath]}function FE(e,n){return e?n.filter(r=>!om(r.meta.id,e,HE(e,r))):n}function qE(e){const n=new Map;for(const o of e.colors){const i=`--color-${o.token}${o.shade==="DEFAULT"?"":`-${o.shade}`}`;n.set(i,o.tw)}for(const o of e.spacing)n.set(`--spacing-${o.token}`,o.tw);for(const o of e.radius)n.set(`--radius-${o.token}`,o.tw);const r=e.typography;if(r){for(const o of r.families)n.set(`--font-${o.key}`,o.tw);for(const o of r.sizes)n.set(`--font-size-${o.token}`,o.tw)}return n}function VE(e){const n=new Map;for(const r of e.colors){const o=`--color-${r.token}${r.shade==="DEFAULT"?"":`-${r.shade}`}`;n.set(o,r.value)}for(const r of e.spacing)n.set(`--spacing-${r.token}`,r.value);for(const r of e.radius)n.set(`--radius-${r.token}`,r.value);return n}function YE(e){const n=e.trim();return/^#[0-9a-fA-F]{3,8}$/.test(n)||n.startsWith("rgb(")||n.startsWith("oklch(")||n.startsWith("hsl(")}function XE(e,n){const r=e?.css_tokens;if(!r?.definitions?.length)return n?{source:"manual",rows:[],totalCount:0,usedCount:0}:null;const o=new Set(r.unused_tokens??[]),i=new Map((r.usage_by_token??[]).map(b=>[b.name,b])),c=n?qE(n):new Map,u=n?VE(n):new Map,d=r.definitions.map(b=>{const y=i.get(b.name),_=y?.reference_count??0,w=o.has(b.name),S=u.get(b.name),k=S??(b.category==="color"&&YE(b.value)?b.value:b.value.startsWith("var(")?S:b.value);return{cssName:b.name,value:b.value,category:b.category,scope:b.scope,path:b.path,line:b.line,referenceCount:_,fileCount:y?.file_count??0,isUnused:w,tw:c.get(b.name),displayValue:k??b.value,usageFiles:y?.files??[]}});d.sort((b,y)=>b.cssName.localeCompare(y.cssName));const p=d.filter(b=>b.scope==="theme"||b.scope==="root"),h=p.filter(b=>!b.isUnused).length;return{source:n?"hybrid":"scan",rows:d,usedCount:h,totalCount:p.length}}function C0(e){return`${e.cssName}|${e.scope}|${e.path}|${e.line}`}function KE(e,n){return n==="all"?e:n==="used"?e.filter(r=>!r.isUnused):e.filter(r=>r.isUnused)}const WE=[{token:"xs",value:"0.75rem (12px)",tw:"text-xs"},{token:"sm",value:"0.875rem (14px)",tw:"text-sm"},{token:"base",value:"1rem (16px)",tw:"text-base"},{token:"lg",value:"1.125rem (18px)",tw:"text-lg"},{token:"xl",value:"1.25rem (20px)",tw:"text-xl"},{token:"2xl",value:"1.5rem (24px)",tw:"text-2xl"},{token:"3xl",value:"1.875rem (30px)",tw:"text-3xl"},{token:"4xl",value:"2.25rem (36px)",tw:"text-4xl"},{token:"5xl",value:"3rem (48px)",tw:"text-5xl"},{token:"6xl",value:"3.75rem (60px)",tw:"text-6xl"},{token:"7xl",value:"4.5rem (72px)",tw:"text-7xl"},{token:"8xl",value:"6rem (96px)",tw:"text-8xl"},{token:"9xl",value:"8rem (128px)",tw:"text-9xl"}],ZE=[{token:"thin",tw:"font-thin",value:"100"},{token:"extralight",tw:"font-extralight",value:"200"},{token:"light",tw:"font-light",value:"300"},{token:"normal",tw:"font-normal",value:"400"},{token:"medium",tw:"font-medium",value:"500"},{token:"semibold",tw:"font-semibold",value:"600"},{token:"bold",tw:"font-bold",value:"700"},{token:"extrabold",tw:"font-extrabold",value:"800"},{token:"black",tw:"font-black",value:"900"}],QE=[{key:"sans",tw:"font-sans",value:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"'},{key:"serif",tw:"font-serif",value:'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif'},{key:"mono",tw:"font-mono",value:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'}],JE="modulepreload",e2=function(e){return"/"+e},px={},k0=function(n,r,o){let i=Promise.resolve();if(r&&r.length>0){let p=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");i=p(r.map(h=>{if(h=e2(h),h in px)return;px[h]=!0;const b=h.endsWith(".css"),y=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const _=document.createElement("link");if(_.rel=b?"stylesheet":JE,b||(_.as="script"),_.crossOrigin="",_.href=h,d&&_.setAttribute("nonce",d),document.head.appendChild(_),b)return new Promise((w,S)=>{_.addEventListener("load",w),_.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function c(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return i.then(u=>{for(const d of u||[])d.status==="rejected"&&c(d.reason);return n().catch(c)})},t2=[{rule_id:"a11y-img-alt",pillar:"a11y",default_severity:"warning",description:"`<img>` must include an `alt` attribute for screen readers.",fix_hint:'Add alt="" for decorative images or a descriptive alt for meaningful images.'},{rule_id:"a11y-button-name",pillar:"a11y",default_severity:"warning",description:"`<button>` must have an accessible name (text content or aria-label).",fix_hint:"Add visible text, aria-label, or aria-labelledby."},{rule_id:"a11y-input-label",pillar:"a11y",default_severity:"warning",description:"`<input>` should have an associated label or aria-label.",fix_hint:"Wrap with <Label htmlFor=...> or add aria-label."},{rule_id:"a11y-anchor-href",pillar:"a11y",default_severity:"warning",description:"`<a>` should have a meaningful href.",fix_hint:"Use a valid href or replace with <button> for actions."},{rule_id:"a11y-anchor-placeholder-href",pillar:"a11y",default_severity:"warning",description:'`<a href="#">` is a placeholder link pattern.',fix_hint:'Use <button type="button"> or a real destination URL.'},{rule_id:"a11y-dark-mode-contrast",pillar:"a11y",default_severity:"warning",description:"Light-mode color classes may lack a dark: variant.",fix_hint:"Add matching dark: text/background utilities or theme tokens."},{rule_id:"token-hardcoded-color",pillar:"token",default_severity:"warning",description:"Hardcoded hex/rgb color with no matching value in scanned CSS design tokens (className, style, or literals).",fix_hint:"Replace with a CSS variable or Tailwind theme utility from css_tokens."},{rule_id:"token-tailwind-arbitrary",pillar:"token",default_severity:"warning",description:"Tailwind arbitrary color or redundant size that duplicates the default scale or @theme spacing tokens.",fix_hint:"Use a named theme utility (e.g. w-20, p-layout-md) instead of an arbitrary bracket value."},{rule_id:"token-unused-css-var",pillar:"token",default_severity:"info",description:"CSS custom property defined but never referenced.",fix_hint:"Remove unused token or reference it via var(--name) or Tailwind."},{rule_id:"deprecated-component",pillar:"usage",default_severity:"warning",description:"Component is listed as deprecated in .dslinter.json.",fix_hint:"Replace with the canonical component from the catalog (check usage_by_component)."},{rule_id:"duplicate-component",pillar:"usage",default_severity:"warning",description:"Same component name is defined in multiple files.",fix_hint:"Consolidate into one definition and update imports."},{rule_id:"unused-prop",pillar:"usage",default_severity:"info",description:"Declared prop is never passed at any call site.",fix_hint:"Remove unused prop from the API or document why it exists."},{rule_id:"variant-explosion",pillar:"usage",default_severity:"info",description:"Component has an unusually large prop surface at call sites.",fix_hint:"Split into smaller components or reduce optional props."},{rule_id:"code-console",pillar:"code",default_severity:"info",description:"console.log (or similar) left in component code.",fix_hint:"Remove debug logging before shipping."},{rule_id:"code-console-error",pillar:"code",default_severity:"warning",description:"console.error in component code.",fix_hint:"Use proper error handling or remove."},{rule_id:"code-debugger",pillar:"code",default_severity:"error",description:"debugger statement in source.",fix_hint:"Remove debugger."},{rule_id:"code-inline-style",pillar:"code",default_severity:"warning",description:"Inline JSX style={{}} bypasses token/Tailwind conventions.",fix_hint:"Use className with theme utilities."},{rule_id:"code-empty-catch",pillar:"code",default_severity:"warning",description:"Empty catch block swallows errors.",fix_hint:"Handle or rethrow the error."},{rule_id:"code-large-file",pillar:"code",default_severity:"info",description:"File exceeds size heuristic for maintainability.",fix_hint:"Split into smaller modules."},{rule_id:"code-redundant-fragment",pillar:"code",default_severity:"info",description:"Redundant React fragment wrapper.",fix_hint:"Remove unnecessary <>...</>."},{rule_id:"code-suppression-comment",pillar:"code",default_severity:"info",description:"Lint/TS suppression comment present.",fix_hint:"Fix the underlying issue instead of suppressing."},{rule_id:"code-todo-marker",pillar:"code",default_severity:"info",description:"TODO/FIXME marker in source.",fix_hint:"Resolve or track in issue tracker."}],n2=t2,a2=new Map(n2.map(e=>[e.rule_id,e]));function $0(e){const n=a2.get(e);return n?n.pillar:e.startsWith("a11y-")?"a11y":e.startsWith("token-")?"token":e.startsWith("code-")?"code":"usage"}const r2=new Set(["function","class","const_arrow","const_function","wrapped_component"]);function o2(e){return r2.has(e.kind)}function E0(e){return(e.split("/").pop()??e).replace(/\.(tsx|jsx)$/i,"")}function s2(e){return e.split(/[-_]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join("")}function mx(e){return e.replace(/\.playground$/i,"").split("").filter(n=>n!=="-"&&n!=="_").join("").toLowerCase()}function mi(e){const n=new Map;for(const r of e.files??[])for(const o of r.definitions??[]){const i=n.get(o.name)??[];i.push({kind:o.kind,path:r.path,line:o.line}),n.set(o.name,i)}for(const[,r]of n)r.sort((o,i)=>o.path.localeCompare(i.path)||o.line-i.line);return n}function im(e){const n=new Map,r=(i,c)=>{if(!c?.length)return;let u=n.get(i);u||(u=new Set,n.set(i,u));for(const d of c)u.add(d)};for(const i of e.files??[])for(const c of i.definitions??[])r(c.name,c.declared_props);for(const i of e.playgrounds??[])r(i.export_name,i.declared_props);const o=new Map;for(const[i,c]of n)o.set(i,[...c]);return o}function hi(e){const n=new Map;for(const r of e.usage_by_component??[])n.set(r.component,r);return n}function yp(e,n){return!om(n,e,sm(e,n))}function N0(e,n,r){const o=new Set;for(const i of e.keys())yp(r,i)&&o.add(i);for(const i of n.keys())yp(r,i)&&o.add(i);return[...o].sort((i,c)=>i.localeCompare(c))}function gi(e){return e?N0(mi(e),hi(e),e):[]}function lm(e){if(!e)return[];const n=mi(e),r=hi(e),o=[];for(const[i,c]of n){if(!yp(e,i))continue;const u=r.get(i);u&&u.reference_count>0||o.push({name:i,definitionPaths:c.map(d=>d.path)})}return o.sort((i,c)=>i.name.localeCompare(c.name)),o}function A0(e){const n={all:0,a11y:0,code:0,token:0,unused:0};if(!e)return n;for(const r of e.findings??[]){n.all+=1;const o=$0(r.rule_id);o==="a11y"?n.a11y+=1:o==="code"?n.code+=1:o==="token"&&(n.token+=1)}return n.unused=lm(e).length,n}function i2(e,n){if(!e||n==="unused")return[];const r=e.findings??[];return n==="all"?r:r.filter(o=>$0(o.rule_id)===n)}function l2(e,n){const r=(e.definitions??[]).filter(i=>o2(i)?!om(i.name,n,[e.path]):!1);if(r.length<2)return null;const o=r.map(i=>i.name).sort((i,c)=>i.localeCompare(c));return{parent:s2(E0(e.path)),children:o,path:e.path}}function c2(e,n){if(n===e)return!0;if(!n.startsWith(e)||n.length<=e.length)return!1;const r=n.charAt(e.length);return r===r.toUpperCase()&&r!==r.toLowerCase()}function u2(e,n,r){return n.children.includes(e)?!1:e===n.parent?!0:r.length>0?r.every(o=>o===n.path):c2(n.parent,e)}function d2(e,n,r){const o=new Set(e.children);for(const i of n)u2(i,e,sm(r,i))&&o.add(i);return{...e,children:[...o].sort((i,c)=>i.localeCompare(c))}}function j0(e){if(!e)return[];const n=gi(e),r=new Map;for(const o of e.files??[]){const i=l2(o,e);i&&r.set(i.path,d2(i,n,e))}return[...r.values()].sort((o,i)=>o.parent.localeCompare(i.parent))}function T0(e,n){if(n.includes(e.parent))return e.parent;const r=mx(E0(e.path)),o=e.children.find(i=>mx(i)===r);return o||(e.children[0]??e.parent)}function hx(e){return e.type==="family"?e.parent:e.name}function R0(e){const n=gi(e),r=j0(e),o=new Set(r.flatMap(u=>u.children)),i=new Set(r.map(u=>u.parent)),c=[];for(const u of r)c.push({type:"family",...u});for(const u of n)o.has(u)||i.has(u)||c.push({type:"component",name:u});return c.sort((u,d)=>hx(u).localeCompare(hx(d)))}function M0(e,n){return j0(e).find(r=>r.parent===n||r.children.includes(n))}function O0(e,n){return e?e.children.includes(n)?e.children.filter(r=>r!==n):e.parent===n?e.children:[]:[]}function gx(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Fa(...e){return n=>{let r=!1;const o=e.map(i=>{const c=gx(i,n);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let i=0;i<o.length;i++){const c=o[i];typeof c=="function"?c():gx(e[i],null)}}}}function Qe(...e){return v.useCallback(Fa(...e),e)}var f2=Symbol.for("react.lazy"),pc=rm[" use ".trim().toString()];function p2(e){return typeof e=="object"&&e!==null&&"then"in e}function D0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===f2&&"_payload"in e&&p2(e._payload)}function B0(e){const n=m2(e),r=v.forwardRef((o,i)=>{let{children:c,...u}=o;D0(c)&&typeof pc=="function"&&(c=pc(c._payload));const d=v.Children.toArray(c),p=d.find(g2);if(p){const h=p.props.children,b=d.map(y=>y===p?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...u,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,b):null})}return g.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}var z0=B0("Slot");function m2(e){const n=v.forwardRef((r,o)=>{let{children:i,...c}=r;if(D0(i)&&typeof pc=="function"&&(i=pc(i._payload)),v.isValidElement(i)){const u=y2(i),d=b2(c,i.props);return i.type!==v.Fragment&&(d.ref=o?Fa(o,u):u),v.cloneElement(i,d)}return v.Children.count(i)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var h2=Symbol("radix.slottable");function g2(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===h2}function b2(e,n){const r={...n};for(const o in n){const i=e[o],c=n[o];/^on[A-Z]/.test(o)?i&&c?r[o]=(...d)=>{const p=c(...d);return i(...d),p}:i&&(r[o]=i):o==="style"?r[o]={...i,...c}:o==="className"&&(r[o]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function y2(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function L0(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=L0(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function U0(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=L0(e))&&(o&&(o+=" "),o+=n);return o}const bx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yx=U0,Lc=(e,n)=>r=>{var o;if(n?.variants==null)return yx(e,r?.class,r?.className);const{variants:i,defaultVariants:c}=n,u=Object.keys(i).map(h=>{const b=r?.[h],y=c?.[h];if(b===null)return null;const _=bx(b)||bx(y);return i[h][_]}),d=r&&Object.entries(r).reduce((h,b)=>{let[y,_]=b;return _===void 0||(h[y]=_),h},{}),p=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((h,b)=>{let{class:y,className:_,...w}=b;return Object.entries(w).every(S=>{let[k,$]=S;return Array.isArray($)?$.includes({...c,...d}[k]):{...c,...d}[k]===$})?[...h,y,_]:h},[]);return yx(e,u,p,r?.class,r?.className)},x2=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},v2=(e,n)=>({classGroupId:e,validator:n}),P0=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),mc="-",xx=[],_2="arbitrary..",w2=e=>{const n=C2(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return S2(u);const d=u.split(mc),p=d[0]===""&&d.length>1?1:0;return I0(d,p,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const p=o[u],h=r[u];return p?h?x2(h,p):p:h||xx}return r[u]||xx}}},I0=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],c=r.nextPart.get(i);if(c){const h=I0(e,n+1,c);if(h)return h}const u=r.validators;if(u===null)return;const d=n===0?e.join(mc):e.slice(n).join(mc),p=u.length;for(let h=0;h<p;h++){const b=u[h];if(b.validator(d))return b.classGroupId}},S2=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?_2+o:void 0})(),C2=e=>{const{theme:n,classGroups:r}=e;return k2(r,n)},k2=(e,n)=>{const r=P0();for(const o in e){const i=e[o];cm(i,r,o,n)}return r},cm=(e,n,r,o)=>{const i=e.length;for(let c=0;c<i;c++){const u=e[c];$2(u,n,r,o)}},$2=(e,n,r,o)=>{if(typeof e=="string"){E2(e,n,r);return}if(typeof e=="function"){N2(e,n,r,o);return}A2(e,n,r,o)},E2=(e,n,r)=>{const o=e===""?n:G0(n,e);o.classGroupId=r},N2=(e,n,r,o)=>{if(j2(e)){cm(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(v2(r,e))},A2=(e,n,r,o)=>{const i=Object.entries(e),c=i.length;for(let u=0;u<c;u++){const[d,p]=i[u];cm(p,G0(n,d),r,o)}},G0=(e,n)=>{let r=e;const o=n.split(mc),i=o.length;for(let c=0;c<i;c++){const u=o[c];let d=r.nextPart.get(u);d||(d=P0(),r.nextPart.set(u,d)),r=d}return r},j2=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,T2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(c,u)=>{r[c]=u,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=o[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},xp="!",vx=":",R2=[],_x=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),M2=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const c=[];let u=0,d=0,p=0,h;const b=i.length;for(let k=0;k<b;k++){const $=i[k];if(u===0&&d===0){if($===vx){c.push(i.slice(p,k)),p=k+1;continue}if($==="/"){h=k;continue}}$==="["?u++:$==="]"?u--:$==="("?d++:$===")"&&d--}const y=c.length===0?i:i.slice(p);let _=y,w=!1;y.endsWith(xp)?(_=y.slice(0,-1),w=!0):y.startsWith(xp)&&(_=y.slice(1),w=!0);const S=h&&h>p?h-p:void 0;return _x(c,w,_,S)};if(n){const i=n+vx,c=o;o=u=>u.startsWith(i)?c(u.slice(i.length)):_x(R2,!1,u,void 0,!0)}if(r){const i=o;o=c=>r({className:c,parseClassName:i})}return o},O2=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let c=0;c<r.length;c++){const u=r[c],d=u[0]==="[",p=n.has(u);d||p?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(u)):i.push(u)}return i.length>0&&(i.sort(),o.push(...i)),o}},D2=e=>({cache:T2(e.cacheSize),parseClassName:M2(e),sortModifiers:O2(e),postfixLookupClassGroupIds:B2(e),...w2(e)}),B2=e=>{const n=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let o=0;o<r.length;o++)n[r[o]]=!0;return n},z2=/\s+/,L2=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:c,postfixLookupClassGroupIds:u}=n,d=[],p=e.trim().split(z2);let h="";for(let b=p.length-1;b>=0;b-=1){const y=p[b],{isExternal:_,modifiers:w,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:$}=r(y);if(_){h=y+(h.length>0?" "+h:h);continue}let E=!!$,N;if(E){const D=k.substring(0,$);N=o(D);const P=N&&u[N]?o(k):void 0;P&&P!==N&&(N=P,E=!1)}else N=o(k);if(!N){if(!E){h=y+(h.length>0?" "+h:h);continue}if(N=o(k),!N){h=y+(h.length>0?" "+h:h);continue}E=!1}const j=w.length===0?"":w.length===1?w[0]:c(w).join(":"),z=S?j+xp:j,G=z+N;if(d.indexOf(G)>-1)continue;d.push(G);const H=i(N,E);for(let D=0;D<H.length;++D){const P=H[D];d.push(z+P)}h=y+(h.length>0?" "+h:h)}return h},U2=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=H0(r))&&(i&&(i+=" "),i+=o);return i},H0=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=H0(e[o]))&&(r&&(r+=" "),r+=n);return r},P2=(e,...n)=>{let r,o,i,c;const u=p=>{const h=n.reduce((b,y)=>y(b),e());return r=D2(h),o=r.cache.get,i=r.cache.set,c=d,d(p)},d=p=>{const h=o(p);if(h)return h;const b=L2(p,r);return i(p,b),b};return c=u,(...p)=>c(U2(...p))},I2=[],mt=e=>{const n=r=>r[e]||I2;return n.isThemeGetter=!0,n},F0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,G2=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,H2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,q2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,V2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,La=e=>G2.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),Tn=e=>!!e&&Number.isInteger(Number(e)),zf=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),ra=e=>H2.test(e),V0=()=>!0,X2=e=>F2.test(e)&&!q2.test(e),um=()=>!1,K2=e=>V2.test(e),W2=e=>Y2.test(e),Z2=e=>!ie(e)&&!ce(e),Q2=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),J2=e=>Wa(e,K0,um),ie=e=>F0.test(e),xr=e=>Wa(e,W0,X2),wx=e=>Wa(e,iN,Ae),eN=e=>Wa(e,Q0,V0),tN=e=>Wa(e,Z0,um),Sx=e=>Wa(e,Y0,um),nN=e=>Wa(e,X0,W2),Hl=e=>Wa(e,J0,K2),ce=e=>q0.test(e),Xs=e=>Dr(e,W0),aN=e=>Dr(e,Z0),Cx=e=>Dr(e,Y0),rN=e=>Dr(e,K0),oN=e=>Dr(e,X0),Fl=e=>Dr(e,J0,!0),sN=e=>Dr(e,Q0,!0),Wa=(e,n,r)=>{const o=F0.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},Dr=(e,n,r=!1)=>{const o=q0.exec(e);return o?o[1]?n(o[1]):r:!1},Y0=e=>e==="position"||e==="percentage",X0=e=>e==="image"||e==="url",K0=e=>e==="length"||e==="size"||e==="bg-size",W0=e=>e==="length",iN=e=>e==="number",Z0=e=>e==="family-name",Q0=e=>e==="number"||e==="weight",J0=e=>e==="shadow",lN=()=>{const e=mt("color"),n=mt("font"),r=mt("text"),o=mt("font-weight"),i=mt("tracking"),c=mt("leading"),u=mt("breakpoint"),d=mt("container"),p=mt("spacing"),h=mt("radius"),b=mt("shadow"),y=mt("inset-shadow"),_=mt("text-shadow"),w=mt("drop-shadow"),S=mt("blur"),k=mt("perspective"),$=mt("aspect"),E=mt("ease"),N=mt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],G=()=>[...z(),ce,ie],H=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],P=()=>[ce,ie,p],re=()=>[La,"full","auto",...P()],se=()=>[Tn,"none","subgrid",ce,ie],de=()=>["auto",{span:["full",Tn,ce,ie]},Tn,ce,ie],oe=()=>[Tn,"auto",ce,ie],be=()=>["auto","min","max","fr",ce,ie],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...P()],X=()=>[La,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],J=()=>[La,"screen","full","dvw","lvw","svw","min","max","fit",...P()],fe=()=>[La,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],ee=()=>[e,ce,ie],T=()=>[...z(),Cx,Sx,{position:[ce,ie]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",rN,J2,{size:[ce,ie]}],Q=()=>[zf,Xs,xr],Y=()=>["","none","full",h,ce,ie],te=()=>["",Ae,Xs,xr],Z=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ae,zf,Cx,Sx],ke=()=>["","none",S,ce,ie],Re=()=>["none",Ae,ce,ie],he=()=>["none",Ae,ce,ie],Ne=()=>[Ae,ce,ie],Ge=()=>[La,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ra],breakpoint:[ra],color:[V0],container:[ra],"drop-shadow":[ra],ease:["in","out","in-out"],font:[Z2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ra],shadow:[ra],spacing:["px",Ae],text:[ra],"text-shadow":[ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",La,ie,ce,$]}],container:["container"],"container-type":[{"@container":["","normal","size",ce,ie]}],"container-named":[Q2],columns:[{columns:[Ae,ie,ce,d]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:G()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{"inset-s":re(),start:re()}],end:[{"inset-e":re(),end:re()}],"inset-bs":[{"inset-bs":re()}],"inset-be":[{"inset-be":re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[Tn,"auto",ce,ie]}],basis:[{basis:[La,"full","auto",d,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,La,"auto","initial","none",ie]}],grow:[{grow:["",Ae,ce,ie]}],shrink:[{shrink:["",Ae,ce,ie]}],order:[{order:[Tn,"first","last","none",ce,ie]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":be()}],"auto-rows":[{"auto-rows":be()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...X()]}],"min-w":[{"min-w":[d,"screen","none",...X()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Xs,xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,sN,eN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zf,ie]}],"font-family":[{font:[aN,tN,n]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ce,ie]}],"line-clamp":[{"line-clamp":[Ae,"none",ce,wx]}],leading:[{leading:[c,...P()]}],"list-image":[{"list-image":["none",ce,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",ce,xr]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ae,"auto",ce,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Tn,ce,ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tn,ce,ie],radial:["",ce,ie],conic:[Tn,ce,ie]},oN,nN]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,ce,ie]}],"outline-w":[{outline:["",Ae,Xs,xr]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",b,Fl,Hl]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",y,Fl,Hl]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ae,xr]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",_,Fl,Hl]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ae,ce,ie]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ce,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ie]}],filter:[{filter:["","none",ce,ie]}],blur:[{blur:ke()}],brightness:[{brightness:[Ae,ce,ie]}],contrast:[{contrast:[Ae,ce,ie]}],"drop-shadow":[{"drop-shadow":["","none",w,Fl,Hl]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ae,ce,ie]}],"hue-rotate":[{"hue-rotate":[Ae,ce,ie]}],invert:[{invert:["",Ae,ce,ie]}],saturate:[{saturate:[Ae,ce,ie]}],sepia:[{sepia:["",Ae,ce,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ie]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,ce,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,ce,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,ce,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,ce,ie]}],"backdrop-invert":[{"backdrop-invert":["",Ae,ce,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,ce,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,ce,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,ce,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",ce,ie]}],ease:[{ease:["linear","initial",E,ce,ie]}],delay:[{delay:[Ae,ce,ie]}],animate:[{animate:["none",N,ce,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ce,ie]}],"perspective-origin":[{"perspective-origin":G()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ce,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:G()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],zoom:[{zoom:[Tn,ce,ie]}],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ee()}],"scrollbar-track-color":[{"scrollbar-track":ee()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ie]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ae,Xs,xr,wx]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cN=P2(lN);function xe(...e){return cN(U0(e))}const uN=Lc("inline-flex rounded-full items-center justify-center border font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"},size:{default:"px-3 py-0.5 text-xs",sm:"px-2 py-0.5 font-mono text-xs font-normal leading-tight"}},defaultVariants:{variant:"default",size:"default"}}),Er=v.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},c)=>{const u=o?z0:"span";return g.jsx(u,{"data-slot":"badge",className:xe(uN({variant:n,size:r}),e),ref:c,...i})});Er.displayName="Badge";function Bn({className:e,...n}){return g.jsx("div",{"data-slot":"table-container",className:xe("relative w-full overflow-x-auto rounded-lg border border-border bg-card",e),children:g.jsx("table",{"data-slot":"table",className:"w-full caption-bottom relative text-sm",...n})})}function zn({className:e,...n}){return g.jsx("thead",{"data-slot":"table-header",className:xe("[&_tr]:border-b",e),...n})}function Ln({className:e,...n}){return g.jsx("tbody",{"data-slot":"table-body",className:xe("[&_tr:last-child]:border-0",e),...n})}function ft({className:e,...n}){return g.jsx("tr",{"data-slot":"table-row",className:xe("border-b hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...n})}function Ue({className:e,...n}){return g.jsx("th",{"data-slot":"table-head",className:xe("h-8 text-xs py-1 px-4 text-left align-middle font-medium whitespace-nowrap text-foreground has-[[role=checkbox]]:pr-0 has-[[role=checkbox]]:translate-y-0.5","sticky top-0 z-30 bg-muted/50",e),...n})}function Pe({className:e,...n}){return g.jsx("td",{"data-slot":"table-cell",className:xe("px-4 py-2 align-middle whitespace-nowrap has-[[role=checkbox]]:pr-0 has-[[role=checkbox]]:translate-y-0.5",e),...n})}const dN=new Set(["sheep","fish","deer","hay","moose","series","species","aircraft","bison","buffalo","cod","elk","halibut","hovercraft","lego","mackerel","salmon","spacecraft","swine","trout","tuna"]),kx=new Map([["addendum","addenda"],["agendum","agenda"],["alumnus","alumni"],["analysis","analyses"],["anathema","anathemata"],["appendix","appendices"],["axis","axes"],["bacterium","bacteria"],["basis","bases"],["cactus","cacti"],["cherub","cherubim"],["child","children"],["corrigendum","corrigenda"],["crisis","crises"],["criterion","criteria"],["curriculum","curricula"],["custom","customs"],["datum","data"],["diagnosis","diagnoses"],["dogma","dogmata"],["ellipsis","ellipses"],["elf","elves"],["erratum","errata"],["focus","foci"],["foot","feet"],["forum","fora"],["fungus","fungi"],["genus","genera"],["goose","geese"],["half","halves"],["hypothesis","hypotheses"],["index","indices"],["knife","knives"],["leaf","leaves"],["lemma","lemmata"],["life","lives"],["loaf","loaves"],["man","men"],["matrix","matrices"],["medium","media"],["memorandum","memoranda"],["millennium","millennia"],["mouse","mice"],["nucleus","nuclei"],["oasis","oases"],["ovum","ova"],["ox","oxen"],["parenthesis","parentheses"],["person","people"],["phenomenon","phenomena"],["potato","potatoes"],["radius","radii"],["schema","schemata"],["stimulus","stimuli"],["stigma","stigmata"],["stoma","stomata"],["stratum","strata"],["syllabus","syllabi"],["symposium","symposia"],["synthesis","syntheses"],["thesis","theses"],["tooth","teeth"],["tomato","tomatoes"],["vertex","vertices"],["wife","wives"],["woman","women"]]);function oi(e,n){if(n===1||!e||typeof e!="string"||(e=e.trim().toLowerCase(),dN.has(e)))return e;if(kx.has(e))return kx.get(e);const r=new Map([["ch","ches"],["ss","sses"],["sh","shes"],["x","xes"],["s","ses"],["z","zes"],["o","oes"],["us","i"],["f","ves"],["fe","ves"]]);if(e.endsWith("y")){const o=e.slice(-2,-1);if(!["a","e","i","o","u"].includes(o))return e.slice(0,-1)+"ies"}for(const[o,i]of r)if(e.endsWith(o))return e.slice(0,-o.length)+i;return e+"s"}function fN(){if(typeof window>"u")return null;const e=window.innerWidth;return e<640?"xs":e<768?"sm":e<1024?"md":e<1280?"lg":e<1536?"xl":"2xl"}function pN(e){if(typeof window>"u")return null;if(!(e&&e instanceof HTMLElement))return console.log("element is not an instance of HTMLElement"),null;const n=e.getBoundingClientRect().width;return n<320?"@xs":n<384?"@sm":n<448?"@md":n<512?"@lg":n<576?"@xl":n<672?"@2xl":n<768?"@3xl":n<896?"@4xl":n<1024?"@5xl":n<1152?"@6xl":"@7xl"}const mN=new Set(["children"]);function Uc(e){return e.filter(n=>!mN.has(n))}function dm(e,n){return(e.usage_by_component??[]).find(o=>o.component===n)?.prop_frequencies??{}}function e_(e,n,r){const o=new Set,i=dm(e,n);for(const c of Uc(r))(i[c]??0)===0&&o.add(`${n}/${c}`);return o}function hN(e){return[...Uc(e)].sort((n,r)=>n.localeCompare(r))}function gN({usedPropCount:e,totalPropCount:n}){return g.jsxs("p",{className:"text-sm text-muted-foreground",children:[e,"/",n," ",oi("prop",e)," used in the workspace snapshot."]})}function bN({props:e,propFrequencies:n}){return g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Prop"}),g.jsx(Ue,{className:"w-20 text-right",children:"Uses"})]})}),g.jsx(Ln,{children:e.map(r=>{const o=n[r]??0,i=o===0;return g.jsxs(ft,{className:i?"text-muted-foreground":void 0,children:[g.jsx(Pe,{className:"font-mono text-xs",children:r}),g.jsx(Pe,{className:"text-right tabular-nums",children:o})]},r)})})]})}function yN({props:e,propFrequencies:n}){return g.jsx("div",{className:"flex flex-wrap gap-1",children:e.map(r=>{const o=n[r]??0,i=o>0;return g.jsx(Er,{variant:i?"secondary":"outline",size:"sm",className:xe(!i&&"text-muted-foreground"),title:i?`${o} uses`:"Never passed",children:r},r)})})}function t_({component:e,declared:n,unusedProps:r,propFrequencies:o={},variant:i="table"}){const c=hN(n),u=c.filter(d=>!r.has(`${e}/${d}`)).length;return c.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"No declared props recorded for this component."}):g.jsxs("div",{className:i==="compact"?"space-y-2":"space-y-4",children:[g.jsx(gN,{usedPropCount:u,totalPropCount:c.length}),i==="compact"?g.jsx(yN,{props:c,propFrequencies:o}):g.jsx(bN,{props:c,propFrequencies:o})]})}function si(e){return e.replace(/\\/g,"/")}function Pc(e,n){const r=si(n.replace(/^\.\.\//,"")),o=r.startsWith("components/")?`src/${r}`:r;return`${si(e).replace(/\/$/,"")}/${o}`}const xN="src/components/";function $x(e){const n=si(e),r=n.indexOf(xN);return r===-1?null:n.slice(r)}function Ic(e,n){const r=si(e),o=si(n);if(r===o)return!0;const i=$x(r),c=$x(o);return i&&c?i===c:!1}const vN="/.../";function qa(e){return e.replace(/\\/g,"/").replace(/\/$/,"")}function Po(e,n){const r=qa(e),o=qa(n);return o.startsWith(r+"/")?o.slice(r.length+1):o.split("/").slice(-3).join("/")}function _N(e,n){const r=qa(e),o=qa(n);return o.startsWith(r+"/")||o===r?o:`${r}/${o}`}function wN(e,n){const r=qa(e);if(r.length<=n||n<=0)return r;const o=r.split("/"),i=o.pop()??"";if(o.length===0)return i;for(let c=o.length;c>=0;c--){const u=o.slice(0,c).join("/"),d=c===0?`.../${i}`:`${u}${vN}${i}`;if(d.length<=n)return d}return i}function SN(e){const n=e.clientWidth;if(n<=0)return 1;const r=getComputedStyle(e),o=document.createElement("span");o.textContent="m",o.style.position="absolute",o.style.visibility="hidden",o.style.whiteSpace="pre",o.style.font=r.font,document.body.appendChild(o);const i=o.getBoundingClientRect().width;return o.remove(),i<=0?1:Math.max(1,Math.floor(n/i))}const Ex="@dslinter-scan/";function CN(e,n){const r=qa(n);return r.startsWith(Ex)?`${qa(e)}/${r.slice(Ex.length)}`:Pc(e,n)}const kN="/dslinter/open-file";async function n_(e,n,r=1){if(typeof window>"u")return;const o=new URLSearchParams({path:e});n!=null&&o.set("line",String(n)),o.set("column",String(r));try{if((await fetch(`${kN}?${o}`,{method:"POST"})).ok)return}catch{}window.location.assign($N(e,n,r,"cursor"))}function $N(e,n,r=1,o="vscode"){const i=qa(e),c=n!=null?`:${n}:${r}`:"";if(/^[a-zA-Z]:/.test(i)){const d=i.slice(0,2).toLowerCase(),p=i.slice(2).replace(/^\//,"").split("/").map(encodeURIComponent).join("/");return`${o}://file/${d}/${p}${c}`}const u=i.split("/").map((d,p)=>p===0&&d===""?"":encodeURIComponent(d)).join("/");return`${o}://file${u}${c}`}function Nr({children:e,className:n}){return g.jsx("div",{className:xe("rounded-lg border border-border bg-muted/50 px-4 py-3 text-sm text-muted-foreground",n),children:e})}function Ho({path:e,className:n,title:r}){const o=v.useRef(null),[i,c]=v.useState(e);return v.useLayoutEffect(()=>{const u=o.current;if(!u)return;const d=()=>{const h=SN(u);c(wN(e,h))};d();const p=new ResizeObserver(d);return p.observe(u),()=>p.disconnect()},[e]),g.jsx("span",{ref:o,className:xe("block min-w-0 font-mono",n),title:r??e,children:i})}function EN(e){return e.props.length?e.props.map(n=>e.prop_values?.[n]!=null?`${n}=${JSON.stringify(e.prop_values[n])}`:n).join(", "):"—"}function NN(e){const n=[...e??[]];return n.sort((r,o)=>r.path.localeCompare(o.path)||r.line-o.line),n}function AN({root:e,loc:n}){const r=Po(e,n.path),o=`${r}:${n.line}`,i=_N(e,n.path),c=v.useCallback(()=>{n_(i,n.line).catch(u=>{const d=u instanceof Error?u.message:String(u);window.alert(`Could not open file: ${d}`)})},[i,n.line]);return g.jsx("button",{type:"button",onClick:c,className:"block min-w-0 w-full text-left text-xs text-muted-foreground transition-colors hover:text-foreground hover:underline",title:o,children:g.jsx(Ho,{path:`${r}:${n.line}`,className:"text-xs",title:void 0})})}function a_({report:e,componentId:n}){const r=v.useMemo(()=>{if(e)return hi(e).get(n)},[e,n]);if(!e)return g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Load ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," to see where this component is used in the workspace."]});if(!r)return g.jsxs(Nr,{children:["0 imports of ",n," found in codebase"]});const o=NN(r.usage_locations);return o.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Usage totals exist but individual call sites were not recorded in this report."}):g.jsxs(Bn,{className:"[&>table]:table-fixed [&>table]:w-full",children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{className:"w-[40%] min-w-0",children:"Location"}),g.jsx(Ue,{className:"min-w-0",children:"Props at this call site"})]})}),g.jsx(Ln,{children:o.map((i,c)=>{const u=EN(i);return g.jsxs(ft,{children:[g.jsx(Pe,{className:"min-w-0",children:g.jsx(AN,{root:e.root,loc:i})}),g.jsx(Pe,{className:"min-w-0",children:g.jsx("span",{className:"block truncate font-mono text-xs text-foreground",title:u,children:u})})]},`${i.path}-${i.line}-${c}`)})})]})}var bi=c0();const jN=l0(bi);function ii(e){const n=TN(e),r=v.forwardRef((o,i)=>{const{children:c,...u}=o,d=v.Children.toArray(c),p=d.find(MN);if(p){const h=p.props.children,b=d.map(y=>y===p?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:y);return g.jsx(n,{...u,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,b):null})}return g.jsx(n,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}function TN(e){const n=v.forwardRef((r,o)=>{const{children:i,...c}=r;if(v.isValidElement(i)){const u=DN(i),d=ON(c,i.props);return i.type!==v.Fragment&&(d.ref=o?Fa(o,u):u),v.cloneElement(i,d)}return v.Children.count(i)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var RN=Symbol("radix.slottable");function MN(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===RN}function ON(e,n){const r={...n};for(const o in n){const i=e[o],c=n[o];/^on[A-Z]/.test(o)?i&&c?r[o]=(...d)=>{const p=c(...d);return i(...d),p}:i&&(r[o]=i):o==="style"?r[o]={...i,...c}:o==="className"&&(r[o]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function DN(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Be=BN.reduce((e,n)=>{const r=ii(`Primitive.${n}`),o=v.forwardRef((i,c)=>{const{asChild:u,...d}=i,p=u?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...d,ref:c})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function zN(e,n){e&&bi.flushSync(()=>e.dispatchEvent(n))}var r_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),LN="VisuallyHidden",UN=v.forwardRef((e,n)=>g.jsx(Be.span,{...e,ref:n,style:{...r_,...e.style}}));UN.displayName=LN;function PN(e,n){const r=v.createContext(n),o=c=>{const{children:u,...d}=c,p=v.useMemo(()=>d,Object.values(d));return g.jsx(r.Provider,{value:p,children:u})};o.displayName=e+"Provider";function i(c){const u=v.useContext(r);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[o,i]}function Za(e,n=[]){let r=[];function o(c,u){const d=v.createContext(u),p=r.length;r=[...r,u];const h=y=>{const{scope:_,children:w,...S}=y,k=_?.[e]?.[p]||d,$=v.useMemo(()=>S,Object.values(S));return g.jsx(k.Provider,{value:$,children:w})};h.displayName=c+"Provider";function b(y,_){const w=_?.[e]?.[p]||d,S=v.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[h,b]}const i=()=>{const c=r.map(u=>v.createContext(u));return function(d){const p=d?.[e]||c;return v.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,IN(i,...n)]}function IN(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const u=o.reduce((d,{useScope:p,scopeName:h})=>{const y=p(c)[`__scope${h}`];return{...d,...y}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return r.scopeName=n.scopeName,r}function o_(e){const n=e+"CollectionProvider",[r,o]=Za(n),[i,c]=r(n,{collectionRef:{current:null},itemMap:new Map}),u=k=>{const{scope:$,children:E}=k,N=dt.useRef(null),j=dt.useRef(new Map).current;return g.jsx(i,{scope:$,itemMap:j,collectionRef:N,children:E})};u.displayName=n;const d=e+"CollectionSlot",p=ii(d),h=dt.forwardRef((k,$)=>{const{scope:E,children:N}=k,j=c(d,E),z=Qe($,j.collectionRef);return g.jsx(p,{ref:z,children:N})});h.displayName=d;const b=e+"CollectionItemSlot",y="data-radix-collection-item",_=ii(b),w=dt.forwardRef((k,$)=>{const{scope:E,children:N,...j}=k,z=dt.useRef(null),G=Qe($,z),H=c(b,E);return dt.useEffect(()=>(H.itemMap.set(z,{ref:z,...j}),()=>{H.itemMap.delete(z)})),g.jsx(_,{[y]:"",ref:G,children:N})});w.displayName=b;function S(k){const $=c(e+"CollectionConsumer",k);return dt.useCallback(()=>{const N=$.collectionRef.current;if(!N)return[];const j=Array.from(N.querySelectorAll(`[${y}]`));return Array.from($.itemMap.values()).sort((H,D)=>j.indexOf(H.ref.current)-j.indexOf(D.ref.current))},[$.collectionRef,$.itemMap])}return[{Provider:u,Slot:h,ItemSlot:w},S,o]}function Se(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return n?.(i)}}var At=globalThis?.document?v.useLayoutEffect:()=>{},GN=rm[" useInsertionEffect ".trim().toString()]||At;function la({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,c,u]=HN({defaultProp:n,onChange:r}),d=e!==void 0,p=d?e:i;{const b=v.useRef(e!==void 0);v.useEffect(()=>{const y=b.current;y!==d&&console.warn(`${o} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=d},[d,o])}const h=v.useCallback(b=>{if(d){const y=FN(b)?b(e):b;y!==e&&u.current?.(y)}else c(b)},[d,e,c,u]);return[p,h]}function HN({defaultProp:e,onChange:n}){const[r,o]=v.useState(e),i=v.useRef(r),c=v.useRef(n);return GN(()=>{c.current=n},[n]),v.useEffect(()=>{i.current!==r&&(c.current?.(r),i.current=r)},[r,i]),[r,o,c]}function FN(e){return typeof e=="function"}function qN(e,n){return v.useReducer((r,o)=>n[r][o]??r,e)}var Br=e=>{const{present:n,children:r}=e,o=VN(n),i=typeof r=="function"?r({present:o.isPresent}):v.Children.only(r),c=Qe(o.ref,YN(i));return typeof r=="function"||o.isPresent?v.cloneElement(i,{ref:c}):null};Br.displayName="Presence";function VN(e){const[n,r]=v.useState(),o=v.useRef(null),i=v.useRef(e),c=v.useRef("none"),u=e?"mounted":"unmounted",[d,p]=qN(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=ql(o.current);c.current=d==="mounted"?h:"none"},[d]),At(()=>{const h=o.current,b=i.current;if(b!==e){const _=c.current,w=ql(h);e?p("MOUNT"):w==="none"||h?.display==="none"?p("UNMOUNT"):p(b&&_!==w?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),At(()=>{if(n){let h;const b=n.ownerDocument.defaultView??window,y=w=>{const k=ql(o.current).includes(CSS.escape(w.animationName));if(w.target===n&&k&&(p("ANIMATION_END"),!i.current)){const $=n.style.animationFillMode;n.style.animationFillMode="forwards",h=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=$)})}},_=w=>{w.target===n&&(c.current=ql(o.current))};return n.addEventListener("animationstart",_),n.addEventListener("animationcancel",y),n.addEventListener("animationend",y),()=>{b.clearTimeout(h),n.removeEventListener("animationstart",_),n.removeEventListener("animationcancel",y),n.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:v.useCallback(h=>{o.current=h?getComputedStyle(h):null,r(h)},[])}}function ql(e){return e?.animationName||"none"}function YN(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var XN=rm[" useId ".trim().toString()]||(()=>{}),KN=0;function Zt(e){const[n,r]=v.useState(XN());return At(()=>{r(o=>o??String(KN++))},[e]),e||(n?`radix-${n}`:"")}var WN=v.createContext(void 0);function fm(e){const n=v.useContext(WN);return e||n||"ltr"}function Va(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...r)=>n.current?.(...r),[])}function ZN(e,n=globalThis?.document){const r=Va(e);v.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var QN="DismissableLayer",vp="dismissableLayer.update",JN="dismissableLayer.pointerDownOutside",eA="dismissableLayer.focusOutside",Nx,s_=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gc=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:d,...p}=e,h=v.useContext(s_),[b,y]=v.useState(null),_=b?.ownerDocument??globalThis?.document,[,w]=v.useState({}),S=Qe(n,D=>y(D)),k=Array.from(h.layers),[$]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf($),N=b?k.indexOf(b):-1,j=h.layersWithOutsidePointerEventsDisabled.size>0,z=N>=E,G=aA(D=>{const P=D.target,re=[...h.branches].some(se=>se.contains(P));!z||re||(i?.(D),u?.(D),D.defaultPrevented||d?.())},_),H=rA(D=>{const P=D.target;[...h.branches].some(se=>se.contains(P))||(c?.(D),u?.(D),D.defaultPrevented||d?.())},_);return ZN(D=>{N===h.layers.size-1&&(o?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},_),v.useEffect(()=>{if(b)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Nx=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(b)),h.layers.add(b),Ax(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=Nx)}},[b,_,r,h]),v.useEffect(()=>()=>{b&&(h.layers.delete(b),h.layersWithOutsidePointerEventsDisabled.delete(b),Ax())},[b,h]),v.useEffect(()=>{const D=()=>w({});return document.addEventListener(vp,D),()=>document.removeEventListener(vp,D)},[]),g.jsx(Be.div,{...p,ref:S,style:{pointerEvents:j?z?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,H.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,G.onPointerDownCapture)})});Gc.displayName=QN;var tA="DismissableLayerBranch",nA=v.forwardRef((e,n)=>{const r=v.useContext(s_),o=v.useRef(null),i=Qe(n,o);return v.useEffect(()=>{const c=o.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),g.jsx(Be.div,{...e,ref:i})});nA.displayName=tA;function aA(e,n=globalThis?.document){const r=Va(e),o=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const c=d=>{if(d.target&&!o.current){let p=function(){i_(JN,r,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=p,n.addEventListener("click",i.current,{once:!0})):p()}else n.removeEventListener("click",i.current);o.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",c),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function rA(e,n=globalThis?.document){const r=Va(e),o=v.useRef(!1);return v.useEffect(()=>{const i=c=>{c.target&&!o.current&&i_(eA,r,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ax(){const e=new CustomEvent(vp);document.dispatchEvent(e)}function i_(e,n,r,{discrete:o}){const i=r.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?zN(i,c):i.dispatchEvent(c)}var Lf="focusScope.autoFocusOnMount",Uf="focusScope.autoFocusOnUnmount",jx={bubbles:!1,cancelable:!0},oA="FocusScope",pm=v.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=e,[d,p]=v.useState(null),h=Va(i),b=Va(c),y=v.useRef(null),_=Qe(n,k=>p(k)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(o){let k=function(j){if(w.paused||!d)return;const z=j.target;d.contains(z)?y.current=z:Ua(y.current,{select:!0})},$=function(j){if(w.paused||!d)return;const z=j.relatedTarget;z!==null&&(d.contains(z)||Ua(y.current,{select:!0}))},E=function(j){if(document.activeElement===document.body)for(const G of j)G.removedNodes.length>0&&Ua(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",$);const N=new MutationObserver(E);return d&&N.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",$),N.disconnect()}}},[o,d,w.paused]),v.useEffect(()=>{if(d){Rx.add(w);const k=document.activeElement;if(!d.contains(k)){const E=new CustomEvent(Lf,jx);d.addEventListener(Lf,h),d.dispatchEvent(E),E.defaultPrevented||(sA(dA(l_(d)),{select:!0}),document.activeElement===k&&Ua(d))}return()=>{d.removeEventListener(Lf,h),setTimeout(()=>{const E=new CustomEvent(Uf,jx);d.addEventListener(Uf,b),d.dispatchEvent(E),E.defaultPrevented||Ua(k??document.body,{select:!0}),d.removeEventListener(Uf,b),Rx.remove(w)},0)}}},[d,h,b,w]);const S=v.useCallback(k=>{if(!r&&!o||w.paused)return;const $=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if($&&E){const N=k.currentTarget,[j,z]=iA(N);j&&z?!k.shiftKey&&E===z?(k.preventDefault(),r&&Ua(j,{select:!0})):k.shiftKey&&E===j&&(k.preventDefault(),r&&Ua(z,{select:!0})):E===N&&k.preventDefault()}},[r,o,w.paused]);return g.jsx(Be.div,{tabIndex:-1,...u,ref:_,onKeyDown:S})});pm.displayName=oA;function sA(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(Ua(o,{select:n}),document.activeElement!==r)return}function iA(e){const n=l_(e),r=Tx(n,e),o=Tx(n.reverse(),e);return[r,o]}function l_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Tx(e,n){for(const r of e)if(!lA(r,{upTo:n}))return r}function lA(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cA(e){return e instanceof HTMLInputElement&&"select"in e}function Ua(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&cA(e)&&n&&e.select()}}var Rx=uA();function uA(){let e=[];return{add(n){const r=e[0];n!==r&&r?.pause(),e=Mx(e,n),e.unshift(n)},remove(n){e=Mx(e,n),e[0]?.resume()}}}function Mx(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function dA(e){return e.filter(n=>n.tagName!=="A")}var fA="Portal",Hc=v.forwardRef((e,n)=>{const{container:r,...o}=e,[i,c]=v.useState(!1);At(()=>c(!0),[]);const u=r||i&&globalThis?.document?.body;return u?jN.createPortal(g.jsx(Be.div,{...o,ref:n}),u):null});Hc.displayName=fA;var Pf=0;function c_(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ox()),document.body.insertAdjacentElement("beforeend",e[1]??Ox()),Pf++,()=>{Pf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Pf--}},[])}function Ox(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Mn=function(){return Mn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(n[c]=r[c])}return n},Mn.apply(this,arguments)};function u_(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function pA(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,c;o<i;o++)(c||!(o in n))&&(c||(c=Array.prototype.slice.call(n,0,o)),c[o]=n[o]);return e.concat(c||Array.prototype.slice.call(n))}var sc="right-scroll-bar-position",ic="width-before-scroll-bar",mA="with-scroll-bars-hidden",hA="--removed-body-scroll-bar-size";function If(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function gA(e,n){var r=v.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var bA=typeof window<"u"?v.useLayoutEffect:v.useEffect,Dx=new WeakMap;function yA(e,n){var r=gA(null,function(o){return e.forEach(function(i){return If(i,o)})});return bA(function(){var o=Dx.get(r);if(o){var i=new Set(o),c=new Set(e),u=r.current;i.forEach(function(d){c.has(d)||If(d,null)}),c.forEach(function(d){i.has(d)||If(d,u)})}Dx.set(r,e)},[e]),r}function xA(e){return e}function vA(e,n){n===void 0&&(n=xA);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(c){var u=n(c,o);return r.push(u),function(){r=r.filter(function(d){return d!==u})}},assignSyncMedium:function(c){for(o=!0;r.length;){var u=r;r=[],u.forEach(c)}r={push:function(d){return c(d)},filter:function(){return r}}},assignMedium:function(c){o=!0;var u=[];if(r.length){var d=r;r=[],d.forEach(c),u=r}var p=function(){var b=u;u=[],b.forEach(c)},h=function(){return Promise.resolve().then(p)};h(),r={push:function(b){u.push(b),h()},filter:function(b){return u=u.filter(b),r}}}};return i}function _A(e){e===void 0&&(e={});var n=vA(null);return n.options=Mn({async:!0,ssr:!1},e),n}var d_=function(e){var n=e.sideCar,r=u_(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return v.createElement(o,Mn({},r))};d_.isSideCarExport=!0;function wA(e,n){return e.useMedium(n),d_}var f_=_A(),Gf=function(){},Fc=v.forwardRef(function(e,n){var r=v.useRef(null),o=v.useState({onScrollCapture:Gf,onWheelCapture:Gf,onTouchMoveCapture:Gf}),i=o[0],c=o[1],u=e.forwardProps,d=e.children,p=e.className,h=e.removeScrollBar,b=e.enabled,y=e.shards,_=e.sideCar,w=e.noRelative,S=e.noIsolation,k=e.inert,$=e.allowPinchZoom,E=e.as,N=E===void 0?"div":E,j=e.gapMode,z=u_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),G=_,H=yA([r,n]),D=Mn(Mn({},z),i);return v.createElement(v.Fragment,null,b&&v.createElement(G,{sideCar:f_,removeScrollBar:h,shards:y,noRelative:w,noIsolation:S,inert:k,setCallbacks:c,allowPinchZoom:!!$,lockRef:r,gapMode:j}),u?v.cloneElement(v.Children.only(d),Mn(Mn({},D),{ref:H})):v.createElement(N,Mn({},D,{className:p,ref:H}),d))});Fc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fc.classNames={fullWidth:ic,zeroRight:sc};var SA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=SA();return n&&e.setAttribute("nonce",n),e}function kA(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function $A(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var EA=function(){var e=0,n=null;return{add:function(r){e==0&&(n=CA())&&(kA(n,r),$A(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},NA=function(){var e=EA();return function(n,r){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},p_=function(){var e=NA(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},AA={left:0,top:0,right:0,gap:0},Hf=function(e){return parseInt(e||"",10)||0},jA=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[Hf(r),Hf(o),Hf(i)]},TA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return AA;var n=jA(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},RA=p_(),Do="data-scroll-locked",MA=function(e,n,r,o){var i=e.left,c=e.top,u=e.right,d=e.gap;return r===void 0&&(r="margin"),`
|
|
24
24
|
.`.concat(mA,` {
|
|
25
25
|
overflow: hidden `).concat(o,`;
|
|
26
26
|
padding-right: `).concat(d,"px ").concat(o,`;
|
|
@@ -215,5 +215,5 @@ XID_Continue XIDC
|
|
|
215
215
|
XID_Start XIDS`.split(/\s/).map(e=>[fu(e),e])),XD=new Map([["s",ht(383)],[ht(383),"s"]]),KD=new Map([[ht(223),ht(7838)],[ht(107),ht(8490)],[ht(229),ht(8491)],[ht(969),ht(8486)]]),WD=new Map([Pa(453),Pa(456),Pa(459),Pa(498),...sp(8072,8079),...sp(8088,8095),...sp(8104,8111),Pa(8124),Pa(8140),Pa(8188)]),ZD=new Map([["alnum",we`[\p{Alpha}\p{Nd}]`],["alpha",we`\p{Alpha}`],["ascii",we`\p{ASCII}`],["blank",we`[\p{Zs}\t]`],["cntrl",we`\p{Cc}`],["digit",we`\p{Nd}`],["graph",we`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",we`\p{Lower}`],["print",we`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",we`[\p{P}\p{S}]`],["space",we`\p{space}`],["upper",we`\p{Upper}`],["word",we`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",we`\p{AHex}`]]);function QD(e,n){const r=[];for(let o=e;o<=n;o++)r.push(o);return r}function Pa(e){const n=ht(e);return[n.toLowerCase(),n]}function sp(e,n){return QD(e,n).map(r=>Pa(r))}var T1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function JD(e,n){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...n};R1(e);const o={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Qp(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ai(e,e9,o);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},c={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:o.subroutineRefMap};ai(e,t9,c);const u={groupsByName:c.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:c.reffedNodesByReferencer};return ai(e,n9,u),e._originMap=c.groupOriginByCopy,e._strategy=o.strategy,e}var e9={AbsenceFunction({node:e,parent:n,replaceWith:r}){const{body:o,kind:i}=e;if(i==="repeater"){const c=wn();c.body[0].body.push(Sr({negate:!0,body:o}),To("Any"));const u=wn();u.body[0].body.push(S1("greedy",0,1/0,c)),r(ot(u,n),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:n,key:r},{flagDirectivesByAlt:o}){const i=e.body.filter(c=>c.kind==="flags");for(let c=r+1;c<n.body.length;c++){const u=n.body[c];pi(o,u,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:n}){if(n.get(e)?.length){const r=O1(n.get(e));if(r){const o=wn({flags:r});o.body[0].body=e.body,e.body=[ot(o,e)]}}}},Assertion({node:e,parent:n,key:r,container:o,root:i,remove:c,replaceWith:u},d){const{kind:p,negate:h}=e,{asciiWordBoundaries:b,avoidSubclass:y,supportedGNodes:_,wordIsAscii:w}=d;if(p==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(p==="line_end")u(ot(Sr({body:[Mr({body:[Xp("string_end")]}),Mr({body:[du(10)]})]}),n));else if(p==="line_start")u(ot(sa(we`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),n));else if(p==="search_start")if(_.has(e))i.flags.sticky=!0,c();else{const S=o[r-1];if(S&&l9(S))u(ot(Sr({negate:!0}),n));else{if(y)throw new Error(we`Uses "\G" in a way that requires a subclass`);u(Ia(Xp("string_start"),n)),d.strategy="clip_search"}}else if(!(p==="string_end"||p==="string_start"))if(p==="string_end_newline")u(ot(sa(we`(?=\n?\z)`),n));else if(p==="word_boundary"){if(!w&&!b){const S=`(?:(?<=${oa})(?!${oa})|(?<!${oa})(?=${oa}))`,k=`(?:(?<=${oa})(?=${oa})|(?<!${oa})(?!${oa}))`;u(ot(sa(h?k:S),n))}}else throw new Error(`Unexpected assertion kind "${p}"`)},Backreference({node:e},{jsGroupNameMap:n}){let{ref:r}=e;typeof r=="string"&&!lp(r)&&(r=ip(r,n),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:n,subroutineRefMap:r}){let{name:o}=e;o&&!lp(o)&&(o=ip(o,n),e.name=o),r.set(e.number,e),o&&r.set(o,e)},CharacterClassRange({node:e,parent:n,replaceWith:r}){if(n.kind==="intersection"){const o=dc({body:[e]});r(ot(o,n),{traverse:!0})}},CharacterSet({node:e,parent:n,replaceWith:r},{accuracy:o,minTargetEs2024:i,digitIsAscii:c,spaceIsAscii:u,wordIsAscii:d}){const{kind:p,negate:h,value:b}=e;if(c&&(p==="digit"||b==="digit")){r(Ia(Wp("digit",{negate:h}),n));return}if(u&&(p==="space"||b==="space")){r(ot(cp(sa(VD),h),n));return}if(d&&(p==="word"||b==="word")){r(Ia(Wp("word",{negate:h}),n));return}if(p==="any")r(Ia(To("Any"),n));else if(p==="digit")r(Ia(To("Nd",{negate:h}),n));else if(p!=="dot")if(p==="text_segment"){if(o==="strict")throw new Error(we`Use of "\X" requires non-strict accuracy`);const y="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",_=we`\p{RI}{2}|${y}(?:\u200D${y})*`;r(ot(sa(we`(?>\r\n|${i?we`\p{RGI_Emoji}`:_}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),n))}else if(p==="hex")r(Ia(To("AHex",{negate:h}),n));else if(p==="newline")r(ot(sa(h?`[^
|
|
216
216
|
]`:`(?>\r
|
|
217
217
|
?|[
|
|
218
|
-
\v\f
\u2028\u2029])`),n));else if(p==="posix")if(!i&&(b==="graph"||b==="print")){if(o==="strict")throw new Error(`POSIX class "${b}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[b];h&&(y=`\0-${ht(y.codePointAt(0)-1)}${ht(y.codePointAt(2)+1)}-`),r(ot(sa(`[${y}]`),n))}else r(ot(cp(sa(ZD.get(b)),h),n));else if(p==="property")Fm.has(fu(b))||(e.key="sc");else if(p==="space")r(Ia(To("space",{negate:h}),n));else if(p==="word")r(ot(cp(sa(oa),h),n));else throw new Error(`Unexpected character set kind "${p}"`)},Directive({node:e,parent:n,root:r,remove:o,replaceWith:i,removeAllPrevSiblings:c,removeAllNextSiblings:u}){const{kind:d,flags:p}=e;if(d==="flags")if(!p.enable&&!p.disable)o();else{const h=wn({flags:p});h.body[0].body=u(),i(ot(h,n),{traverse:!0})}else if(d==="keep"){const h=r.body[0],y=r.body.length===1&&v1(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:r;if(n.parent!==y||y.body.length>1)throw new Error(we`Uses "\K" in a way that's unsupported`);const _=Sr({behind:!0});_.body[0].body=c(),i(ot(_,n))}else throw new Error(`Unexpected directive kind "${d}"`)},Flags({node:e,parent:n}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:n,disable:r}=e.flags;n?.extended&&delete n.extended,r?.extended&&delete r.extended,n?.dotAll&&r?.dotAll&&delete n.dotAll,n?.ignoreCase&&r?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},n){const{kind:r}=e;r==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:e,parent:n,replaceWith:r}){const{kind:o}=e;if(o==="fail")r(ot(Sr({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${o.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const n=wn();n.body[0].body.push(e.body),e.body=ot(n,e)}},Regex:{enter({node:e},{supportedGNodes:n}){const r=[];let o=!1,i=!1;for(const c of e.body)if(c.body.length===1&&c.body[0].kind==="search_start")c.body.pop();else{const u=B1(c.body);u?(o=!0,Array.isArray(u)?r.push(...u):r.push(u)):i=!0}o&&!i&&r.forEach(c=>n.add(c))},exit(e,{accuracy:n,passedLookbehind:r,strategy:o}){if(n==="strict"&&r&&o)throw new Error(we`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:n}){let{ref:r}=e;typeof r=="string"&&!lp(r)&&(r=ip(r,n),e.ref=r)}},t9={Backreference({node:e},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:r}){const{orphan:o,ref:i}=e;o||r.set(e,[...n.get(i).map(({node:c})=>c)])},CapturingGroup:{enter({node:e,parent:n,replaceWith:r,skip:o},{groupOriginByCopy:i,groupsByName:c,multiplexCapturesToLeftByRef:u,openRefs:d,reffedNodesByReferencer:p}){const h=i.get(e);if(h&&d.has(e.number)){const y=Ia(Fv(e.number),n);p.set(y,d.get(e.number)),r(y);return}d.set(e.number,e),u.set(e.number,[]),e.name&&pi(u,e.name,[]);const b=u.get(e.name??e.number);for(let y=0;y<b.length;y++){const _=b[y];if(h===_.node||h&&h===_.origin||e===_.origin){b.splice(y,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const y=pi(c,e.name,new Map);let _=!1;if(h)_=!0;else for(const w of y.values())if(!w.hasDuplicateNameToRemove){_=!0;break}c.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:n}){n.get(e.number)===e&&n.delete(e.number)}},Group:{enter({node:e},n){n.prevFlags=n.currentFlags,e.flags&&(n.currentFlags=Oc(n.currentFlags,e.flags))},exit(e,n){n.currentFlags=n.prevFlags}},Subroutine({node:e,parent:n,replaceWith:r},o){const{isRecursive:i,ref:c}=e;if(i){let b=n;for(;(b=b.parent)&&!(b.type==="CapturingGroup"&&(b.name===c||b.number===c)););o.reffedNodesByReferencer.set(e,b);return}const u=o.subroutineRefMap.get(c),d=c===0,p=d?Fv(0):M1(u,o.groupOriginByCopy,null);let h=p;if(!d){const b=O1(o9(u,_=>_.type==="Group"&&!!_.flags)),y=b?Oc(o.globalFlags,b):o.globalFlags;a9(y,o.currentFlags)||(h=wn({flags:s9(y)}),h.body[0].body.push(p))}r(ot(h,n),{traverse:!d})}},n9={Backreference({node:e,parent:n,replaceWith:r},o){if(e.orphan){o.highestOrphanBackref=Math.max(o.highestOrphanBackref,e.ref);return}const c=o.reffedNodesByReferencer.get(e).filter(u=>r9(u,e));if(!c.length)r(ot(Sr({negate:!0}),n));else if(c.length>1){const u=wn({atomic:!0,body:c.reverse().map(d=>Mr({body:[Kp(d.number)]}))});r(ot(u,n))}else e.ref=c[0].number},CapturingGroup({node:e},n){e.number=++n.numCapturesToLeft,e.name&&n.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},n){const r=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let o=0;o<r;o++){const i=w1();e.body.at(-1).body.push(i)}}},Subroutine({node:e},n){!e.isRecursive||e.ref===0||(e.ref=n.reffedNodesByReferencer.get(e).number)}};function R1(e){ai(e,{"*"({node:n,parent:r}){n.parent=r}})}function a9(e,n){return e.dotAll===n.dotAll&&e.ignoreCase===n.ignoreCase}function r9(e,n){let r=n;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const o=D1(r.parent);for(const i of o){if(i===r)break;if(i===e||z1(i,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function M1(e,n,r,o){const i=Array.isArray(e)?[]:{};for(const[c,u]of Object.entries(e))c==="parent"?i.parent=Array.isArray(r)?o:r:u&&typeof u=="object"?i[c]=M1(u,n,i,r):(c==="type"&&u==="CapturingGroup"&&n.set(i,n.get(e)??e),i[c]=u);return i}function Fv(e){const n=C1(e);return n.isRecursive=!0,n}function o9(e,n){const r=[];for(;e=e.parent;)(!n||n(e))&&r.push(e);return r}function ip(e,n){if(n.has(e))return n.get(e);const r=`$${n.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(e,r),r}function O1(e){const n=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:o})=>{n.forEach(i=>{o.enable?.[i]&&(delete r.disable[i],r.enable[i]=!0),o.disable?.[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function s9({dotAll:e,ignoreCase:n}){const r={};return(e||n)&&(r.enable={},e&&(r.enable.dotAll=!0),n&&(r.enable.ignoreCase=!0)),(!e||!n)&&(r.disable={},!e&&(r.disable.dotAll=!0),!n&&(r.disable.ignoreCase=!0)),r}function D1(e){if(!e)throw new Error("Node expected");const{body:n}=e;return Array.isArray(n)?n:n?[n]:null}function B1(e){const n=e.find(r=>r.kind==="search_start"||c9(r,{negate:!1})||!i9(r));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const r=[];for(const o of n.body){const i=B1(o.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function z1(e,n){const r=D1(e)??[];for(const o of r)if(o===n||z1(o,n))return!0;return!1}function i9({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function l9(e){const n=["Character","CharacterClass","CharacterSet"];return n.includes(e.type)||e.type==="Quantifier"&&e.min&&n.includes(e.body.type)}function c9(e,n){const r={negate:null,...n};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&v1(e.body[0],{type:"Assertion",kind:"search_start"})}function lp(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function sa(e,n){const o=_1(e,{...n,unicodePropertyMap:Fm}).body;return o.length>1||o[0].body.length>1?wn({body:o}):o[0].body[0]}function cp(e,n){return e.negate=n,e}function Ia(e,n){return e.parent=n,e}function ot(e,n){return R1(e),e.parent=n,e}function u9(e,n){const r=A1(n),o=Qp(r.target,"ES2024"),i=Qp(r.target,"ES2025"),c=r.rules.recursionLimit;if(!Number.isInteger(c)||c<2||c>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,d=null;if(!i){const w=[e.flags.ignoreCase];ai(e,d9,{getCurrentModI:()=>w.at(-1),popModI(){w.pop()},pushModI(S){w.push(S)},setHasCasedChar(){w.at(-1)?u=!0:d=!0}})}const p={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!d)};let h=e;const b={accuracy:r.accuracy,appliedGlobalFlags:p,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:c,useAppliedIgnoreCase:!!(!i&&u&&d),useFlagMods:i,useFlagV:o,verbose:r.verbose};function y(w){return b.lastNode=h,h=w,FD(f9[w.type],`Unexpected node type "${w.type}"`)(w,b,y)}const _={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return o||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],b.captureMap.forEach((w,S)=>{w.hidden&&_._hiddenCaptures.push(S),w.transferTo&&pi(_._captureTransfers,w.transferTo,[]).push(S)}),_}var d9={"*":{enter({node:e},n){if(Vv(e)){const r=n.getCurrentModI();n.pushModI(e.flags?Oc({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},n){Vv(e)&&n.popModI()}},Backreference(e,n){n.setHasCasedChar()},Character({node:e},n){qm(ht(e.value))&&n.setHasCasedChar()},CharacterClassRange({node:e,skip:n},r){n(),L1(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},n){e.kind==="property"&&T1.has(e.value)&&n.setHasCasedChar()}},f9={Alternative({body:e},n,r){return e.map(r).join("")},Assertion({kind:e,negate:n}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return n?we`\B`:we`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},n){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,n,r){const{body:o,name:i,number:c}=e,u={ignoreCase:n.currentFlags.ignoreCase},d=n.originMap.get(e);return d&&(u.hidden=!0,c>d.number&&(u.transferTo=d.number)),n.captureMap.set(c,u),`(${i?`?<${i}>`:""}${o.map(r).join("|")})`},Character({value:e},n){const r=ht(e),o=Ao(e,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(o!==r)return o;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&qm(r)){const i=j1(r);return n.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(e,n,r){const{kind:o,negate:i,parent:c}=e;let{body:u}=e;if(o==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Sn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&u.some(Yv)&&(u=[du(45),...u.filter(h=>!Yv(h))]);const d=()=>`[${i?"^":""}${u.map(r).join(o==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||Sn.bugNestedClassIgnoresNegation)&&!i){const b=u.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(b.length){const y=wn(),_=y.body[0];return y.parent=c,_.parent=y,u=u.filter(w=>!b.includes(w)),e.body=u,u.length?(e.parent=_,_.body.push(e)):y.body.pop(),b.forEach(w=>{const S=Mr({body:[w]});w.parent=S,S.parent=y,y.body.push(S)}),r(y)}}n.inCharClass=!0;const h=d();return n.inCharClass=!1,h}const p=u[0];if(o==="union"&&!i&&p&&((!n.useFlagV||!n.verbose)&&c.kind==="union"&&!(Sn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&c.kind==="intersection"&&u.length===1&&p.type!=="CharacterClassRange"))return u.map(r).join("");if(!n.useFlagV&&c.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return d()},CharacterClassRange(e,n){const r=e.min.value,o=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},c=Ao(r,i),u=Ao(o,i),d=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const p=L1(e);b9(p).forEach(b=>{d.add(Array.isArray(b)?`${Ao(b[0],i)}-${Ao(b[1],i)}`:Ao(b,i))})}return`${c}-${u}${[...d].join("")}`},CharacterSet({kind:e,negate:n,value:r,key:o},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":we`[^\n]`;if(e==="digit")return n?we`\D`:we`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&T1.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${n?we`\P`:we`\p`}{${o?`${o}=`:""}${r}}`}if(e==="word")return n?we`\W`:we`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:n,flags:r,parent:o},i,c){const u=i.currentFlags;r&&(i.currentFlags=Oc(u,r));const d=n.map(c).join("|"),p=!i.verbose&&n.length===1&&o.type!=="Quantifier"&&!e&&(!i.useFlagMods||!r)?d:`(?${y9(e,r,i.useFlagMods)}${d})`;return i.currentFlags=u,p},LookaroundAssertion({body:e,kind:n,negate:r},o,i){return`(?${`${n==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,n,r){return r(e.body)+x9(e)},Subroutine({isRecursive:e,ref:n},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const o=r.recursionLimit;return n===0?`(?R=${o})`:we`\g<${n}&R=${o}>`}},p9=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),m9=new Set(["-","\\","]","^","["]),h9=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),qv=new Map([[9,we`\t`],[10,we`\n`],[11,we`\v`],[12,we`\f`],[13,we`\r`],[8232,we`\u2028`],[8233,we`\u2029`],[65279,we`\uFEFF`]]),g9=new RegExp("^\\p{Cased}$","u");function qm(e){return g9.test(e)}function L1(e,n){const r=!!n?.firstOnly,o=e.min.value,i=e.max.value,c=[];if(o<65&&(i===65535||i>=131071)||o===65536&&i>=131071)return c;for(let u=o;u<=i;u++){const d=ht(u);if(!qm(d))continue;const p=j1(d).filter(h=>{const b=h.codePointAt(0);return b<o||b>i});if(p.length&&(c.push(...p),r))break}return c}function Ao(e,{escDigit:n,inCharClass:r,useFlagV:o}){if(qv.has(e))return qv.get(e);if(e<32||e>126&&e<160||e>262143||n&&v9(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?o?h9:m9:p9,c=ht(e);return(i.has(c)?"\\":"")+c}function b9(e){const n=e.map(i=>i.codePointAt(0)).sort((i,c)=>i-c),r=[];let o=null;for(let i=0;i<n.length;i++)n[i+1]===n[i]+1?o??=n[i]:o===null?r.push(n[i]):(r.push([o,n[i]]),o=null);return r}function y9(e,n,r){if(e)return">";let o="";if(n&&r){const{enable:i,disable:c}=n;o=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(c?"-":"")+(c?.ignoreCase?"i":"")+(c?.dotAll?"s":"")}return`${o}:`}function x9({kind:e,max:n,min:r}){let o;return!r&&n===1?o="?":!r&&n===1/0?o="*":r===1&&n===1/0?o="+":r===n?o=`{${r}}`:o=`{${r},${n===1/0?"":n}}`,o+{greedy:"",lazy:"?",possessive:"+"}[e]}function Vv({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function v9(e){return e>47&&e<58}function Yv({type:e,value:n}){return e==="Character"&&n===45}var _9=class Jp extends RegExp{#t=new Map;#e=null;#a;#n=null;#r=null;rawOptions={};get source(){return this.#a||"(?:)"}constructor(n,r,o){const i=!!o?.lazyCompile;if(n instanceof RegExp){if(o)throw new Error("Cannot provide options when copying a regexp");const c=n;super(c,r),this.#a=c.source,c instanceof Jp&&(this.#t=c.#t,this.#n=c.#n,this.#r=c.#r,this.rawOptions=c.rawOptions)}else{const c={hiddenCaptures:[],strategy:null,transfers:[],...o};super(i?"":n,r),this.#a=n,this.#t=S9(c.hiddenCaptures,c.transfers),this.#r=c.strategy,this.rawOptions=o??{}}i||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:i,...c}=this.rawOptions;this.#e=new Jp(this.#a,this.flags,c)}const r=this.global||this.sticky,o=this.lastIndex;if(this.#r==="clip_search"&&r&&o){this.lastIndex=0;const i=this.#o(n.slice(o));return i&&(w9(i,o,n,this.hasIndices),this.lastIndex+=o),i}return this.#o(n)}#o(n){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const o=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const c=[0];for(let u=1;u<o.length;u++){const{hidden:d,transferTo:p}=this.#t.get(u)??{};if(d?c.push(null):(c.push(r.length),r.push(o[u]),this.hasIndices&&r.indices.push(i[u])),p&&o[u]!==void 0){const h=c[p];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=o[u],this.hasIndices&&(r.indices[h]=i[u]),r.groups){this.#n||(this.#n=C9(this.source));const b=this.#n.get(p);b&&(r.groups[b]=o[u],this.hasIndices&&(r.indices.groups[b]=i[u]))}}}return r}};function w9(e,n,r,o){if(e.index+=n,e.input=r,o){const i=e.indices;for(let u=0;u<i.length;u++){const d=i[u];d&&(i[u]=[d[0]+n,d[1]+n])}const c=i.groups;c&&Object.keys(c).forEach(u=>{const d=c[u];d&&(c[u]=[d[0]+n,d[1]+n])})}}function S9(e,n){const r=new Map;for(const o of e)r.set(o,{hidden:!0});for(const[o,i]of n)for(const c of i)pi(r,c,{}).transferTo=o;return r}function C9(e){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let o=0,i=0,c;for(;c=n.exec(e);){const{0:u,groups:{capture:d,name:p}}=c;u==="["?o++:o?u==="]"&&o--:d&&(i++,p&&r.set(i,p))}return r}function k9(e,n){const r=$9(e,n);return r.options?new _9(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function $9(e,n){const r=A1(n),o=_1(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Fm}),i=JD(o,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),c=u9(i,r),u=GD(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),d=PD(u.pattern),p=UD(d.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:p.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const b=p.hiddenCaptures.sort((S,k)=>S-k),y=Array.from(p.captureTransfers),_=i._strategy,w=h.pattern.length>=r.lazyCompileLength;(b.length||y.length||_||w)&&(h.options={...b.length&&{hiddenCaptures:b},...y.length&&{transfers:y},..._&&{strategy:_},...w&&{lazyCompile:w}})}return h}function E9(e,n){return k9(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function N9(e={}){const n=Object.assign({target:"auto",cache:new Map},e);return n.regexConstructor||=r=>E9(r,{target:n.target}),{createScanner(r){return new H3(r,n)},createString(r){return{content:r}}}}const A9={light:"github-light",dark:"github-dark"},j9="tsx";let up=null;function T9(){return up==null&&(up=G3({themes:[eM,JR],langs:[QR],engine:N9()})),up}function R9(e){if(e?.aborted)throw new DOMException("Aborted","AbortError")}async function M9(e,n,r){const o=await T9();return R9(r),o.codeToHtml(e,{lang:j9,theme:A9[n]})}const Xv="playground-usage-shiki mt-4 overflow-x-auto rounded-lg border border-border p-4 text-sm leading-relaxed text-foreground [&_.shiki]:!bg-transparent [&_pre.shiki]:!m-0 [&_pre.shiki]:!bg-transparent [&_pre.shiki]:!p-0",O9="m-0 whitespace-pre font-mono text-sm leading-relaxed text-foreground";function D9({source:e}){const{theme:n}=Wm(),[r,o]=v.useState(null),i=v.useRef(0);return v.useEffect(()=>{const c=++i.current,u=new AbortController;return o(null),(async()=>{try{const d=await M9(e,n,u.signal);if(c!==i.current)return;o(d)}catch(d){if(d.name==="AbortError"||c!==i.current)return;o(null)}})(),()=>u.abort()},[e,n]),r?g.jsx("div",{className:Xv,dangerouslySetInnerHTML:{__html:r}}):g.jsx("pre",{className:Xv,children:g.jsx("code",{className:O9,children:e})})}function B9({entry:e,values:n}){const r=e.usageSnippet?.(n)??`<${e.id} />`;return g.jsx(fn,{id:"usage",title:"Usage",children:g.jsx(D9,{source:r})})}function z9({findings:e,reportReady:n}){return g.jsx(g.Fragment,{children:n&&e.length>0?g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:e.map((r,o)=>g.jsxs(ft,{children:[g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:r.rule_id}),g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:r.line??"—"}),g.jsx(Pe,{children:g.jsx(Er,{variant:"secondary",size:"sm",children:r.severity})}),g.jsx(Pe,{children:r.message})]},`${r.rule_id}-${r.line??"x"}-${o}`))})]}):n&&e.length===0?g.jsx(Nr,{children:"No hardcoded or arbitrary token color findings on this file in the current report."}):g.jsxs(Nr,{children:["Token findings update when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function L9({codeScore:e,reportReady:n}){const{findings:r}=e,o=n&&r.length>0;return g.jsx(g.Fragment,{children:o?g.jsx(g.Fragment,{children:g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:r.map((i,c)=>g.jsxs(ft,{children:[g.jsx(Pe,{children:i.rule_id}),g.jsx(Pe,{children:i.line??"—"}),g.jsx(Pe,{children:i.severity}),g.jsx(Pe,{children:i.message})]},`${i.rule_id}-${i.line??"x"}-${c}`))})]})}):n&&r.length===0?g.jsx(Nr,{children:"No quality findings on this file in the current report."}):g.jsxs(Nr,{children:["Code score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function U9({a11y:e,reportReady:n,variantScanPending:r=!1}){const o=n&&e.findings.length>0,i=e.findings.some(c=>c.variant_label!=null&&c.variant_label!=="");return g.jsx(g.Fragment,{children:o?g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[i?g.jsx(Ue,{children:"Variant"}):null,g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:e.findings.map((c,u)=>g.jsxs(ft,{children:[i?g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:c.variant_label??"—"}):null,g.jsx(Pe,{children:c.rule_id}),g.jsx(Pe,{children:c.line??"—"}),g.jsx(Pe,{children:c.severity}),g.jsx(Pe,{children:c.message})]},`${c.rule_id}-${c.line??"x"}-${c.variant_label??""}-${u}`))})]}):n&&e.issueCount===0?g.jsx(Nr,{children:r?"Scanning variant previews for color contrast…":"No accessibility findings on this file or its variant previews in the current report."}):g.jsxs(Nr,{children:["A11y score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function P9({controls:e,values:n,onChange:r,onReset:o,declaredPropsFromScan:i=[],governanceReportLoaded:c=!1}){if(e.length===0)return null;const u=v.useCallback((p,h)=>{r(b=>({...b,[p]:h}))},[r]),d=FR(e);return g.jsx(fn,{id:"api-reference",title:"API reference",actions:g.jsx(ru,{type:"button",variant:"outline",size:"sm",onClick:o,children:"Reset defaults"}),children:g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Prop"}),g.jsx(Ue,{children:"Type"}),g.jsx(Ue,{children:"Value"})]})}),g.jsx(Ln,{children:e.map(p=>{const h=d.find(b=>b.prop===p.key);return h?g.jsxs(ft,{children:[g.jsx(Pe,{className:"font-medium",children:h.prop}),g.jsx(Pe,{children:p.type==="select"?g.jsx("div",{className:"flex flex-wrap items-center gap-1",children:p.options.map(b=>{const _=String(n[p.key]??p.default??"")===b.value;return g.jsx(Er,{variant:"outline",size:"sm",asChild:!0,className:xe(_&&"border-transparent bg-primary text-primary-foreground hover:bg-primary/90"),children:g.jsx("button",{type:"button",className:"cursor-pointer",onClick:()=>u(p.key,b.value),"aria-pressed":_,"aria-label":`Set ${p.label} to ${b.label}`,children:b.value})},b.value)})}):g.jsxs("span",{className:"font-mono text-xs flex items-center gap-1",children:[h.type,h.defaultBadge?g.jsx(Er,{variant:"secondary",size:"sm",children:h.defaultBadge}):null]})}),g.jsx(Pe,{children:g.jsx(WR,{control:p,values:n,patch:u,idPrefix:"api",layout:"table"})})]},h.prop):null})})]})})}const I9=["dashboard-theme.css","dslinter/theme.css"];function G9(e){const n=e.replace(/\\/g,"/");return I9.some(r=>n.includes(r))}function U1(e,n){if(G9(e.path))return!1;const r=e.path.replace(/\\/g,"/");if(r.includes("/packages/dashboard/"))return!1;if(n){const o=n.replace(/\\/g,"/").replace(/\/$/,"");if(r.startsWith(o))return!0}return/(?:^|\/)(resources\/css|src\/|app\/|styles\/)/.test(r)}function Kv(e,n,r){const o=n==="light"?new Set(["root","theme"]):new Set(["selector"]),i=new Map;for(const c of e)U1(c,r)&&o.has(c.scope)&&(i.has(c.name)||i.set(c.name,c.value));return i}function Wv(e){const n=new Map,r=/var\(\s*(--[a-zA-Z0-9_-]+)(?:\s*,[^)]+)?\s*\)/g,o=(i,c)=>{const u=n.get(i);if(u!=null)return u;const d=e.get(i);if(d==null)return`var(${i})`;if(c.has(i))return d;c.add(i);const p=d.replace(r,(h,b)=>e.has(b)?o(b,c):`var(${b})`);return c.delete(i),n.set(i,p),p};for(const i of e.keys())o(i,new Set);return Object.fromEntries(n)}function H9(e,n){const r=e?.definitions;if(!r?.length)return null;const o=Wv(Kv(r,"light",n)),i=Wv(Kv(r,"dark",n)),c=[...new Set(r.filter(p=>U1(p,n)).map(p=>p.path.replace(/\\/g,"/")))].sort(),u=Object.keys(o).some(p=>!p.startsWith("--color-")&&!p.startsWith("--spacing-")),d=Object.keys(i).some(p=>!p.startsWith("--color-")&&!p.startsWith("--spacing-"));return!u&&!d?null:{light:o,dark:i,sourcePaths:c}}function F9(e){return e?.css_tokens?H9(e.css_tokens,e.root):null}function q9(e,n){return n==="dark"&&Object.keys(e.dark).length>0?{...e.light,...e.dark}:e.light}const V9=v.forwardRef(function({children:n,workspaceReport:r,className:o},i){const{resolvedTheme:c}=Wm(),u=v.useMemo(()=>F9(r),[r]),d=c==="dark",p=u!=null&&Object.keys(u.dark).length>0;if(!u)return g.jsx("div",{ref:i,className:xe(d&&"dark",o),"data-app-preview-theme":c,children:n});if(d&&!p)return g.jsx("div",{ref:i,className:xe("ds-playground-app-preview",o),"data-app-preview-theme":c,children:n});const y={...q9(u,d?"dark":"light"),colorScheme:d&&p?"dark":"light"};return g.jsx("div",{ref:i,className:xe("ds-playground-app-preview",d&&"dark",o),style:y,"data-app-preview-theme":c,children:n})});class Y9 extends v.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){}componentDidUpdate(n){n.children!==this.props.children&&this.state.error&&this.setState({error:null})}render(){if(this.state.error){const n=this.props.componentName??"Component";return g.jsxs("div",{className:"rounded-md border border-border bg-muted/40 px-4 py-6 text-sm text-muted-foreground",children:[g.jsxs("p",{className:"font-medium text-foreground",children:["Preview could not render ",n]}),g.jsx("p",{className:"mt-2",children:"This component may need Inertia page props, a provider, or other app context. The scanner snapshot and governance panels still reflect static analysis."}),g.jsx("p",{className:"mt-2 font-mono text-xs",children:this.state.error.message})]})}return this.props.children}}const Zv=4;function X9(e){return e===void 0?"?":typeof e=="string"?e:JSON.stringify(e)}function K9(e,n){return n.map(r=>`${r}=${X9(e[r])}`).join(" ")}function W9(e){return e==="critical"||e==="serious"?"error":e==="moderate"?"warning":"info"}async function Z9(){return(await k0(()=>import("./axe-CaxTXfM9.js").then(n=>n.a),[])).default}async function Q9(e,n){const o=await(await Z9()).run(e,{runOnly:{type:"rule",values:["color-contrast"]}}),i=[];for(const c of o.violations){const u=W9(c.impact),d=c.help||c.description;for(const p of c.nodes)i.push({rule_id:`a11y-playground-${c.id}`,message:p.failureSummary?`${d} (${p.failureSummary})`:d,path:"",line:null,severity:u,variant_label:n})}return i}async function J9(e){const n=[];for(let r=0;r<e.length;r+=Zv){const o=e.slice(r,r+Zv),i=await Promise.all(o.map(({element:c,combo:u,axisKeys:d})=>Q9(c,K9(u,d))));n.push(...i.flat())}return n}function P1(e,n){return[...e,...n]}function eB(e,n){return wS(P1(e,n))}const em=200;function tB(e){const n=[];for(const r of e)r.type==="boolean"?n.push({key:r.key,values:[!1,!0]}):r.type==="select"&&r.options.length>0&&n.push({key:r.key,values:r.options.map(o=>o.value)});return n}function nB(e,n){const r=tB(e);if(r.length===0)return{combinations:[],totalCount:0,capped:!1,finiteAxisKeys:[]};let o=1;for(const p of r)o*=p.values.length;const i=r.map(p=>p.key),c=[],u=o>em,d=(p,h)=>{if(c.length>=em)return;if(p>=r.length){c.push({...h});return}const b=r[p];for(const y of b.values)d(p+1,{...h,[b.key]:y})};return d(0,{...n}),{combinations:c,totalCount:o,capped:u,finiteAxisKeys:i}}function I1(e){return typeof e=="string"?e:JSON.stringify(e)}function Qv(e,n){return n.map(r=>`${r}:${I1(e[r]??"")}`).join("|")}function aB({renderPreview:e,combinations:n,finiteAxisKeys:r,totalCount:o,capped:i,onVariantA11yScan:c}){const u=v.useRef(new Map),d=n.filter(y=>y.asChild!==!0),p=r.filter(y=>y!=="asChild"),b=r.includes("asChild")?Math.ceil(o/2):o;return v.useEffect(()=>{if(!c||d.length===0)return;let y=!1;const _=requestAnimationFrame(()=>{(async()=>{if(await new Promise(S=>{requestAnimationFrame(()=>S())}),y)return;const w=d.flatMap(S=>{const k=Qv(S,p),$=u.current.get(k);return $?[{element:$,combo:S,axisKeys:p}]:[]});if(w.length===0){y||c([]);return}try{const S=await J9(w);y||c(S)}catch{y||c([])}})()});return()=>{y=!0,cancelAnimationFrame(_)}},[c,d,p]),d.length===0?null:g.jsxs(g.Fragment,{children:[i?g.jsxs("p",{className:"rounded-md border border-border px-3 py-2 text-sm text-muted-foreground",children:["Showing ",d.length," of ",b," ","combinations (limit ",em,"). Reduce select options or split controls to preview more here."]}):null,g.jsx("div",{className:"mt-4 flex flex-col gap-4",children:d.map(y=>{const _=Qv(y,p);return g.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xs",children:[g.jsx("div",{className:"flex flex-wrap gap-1 border-b p-2",children:p.map(w=>{const S=y[w];return g.jsxs(Er,{variant:"outline",size:"sm",className:"font-mono text-xs",children:[w,"=",S===void 0?"?":I1(S)]},w)})}),g.jsx("div",{ref:w=>{w?u.current.set(_,w):u.current.delete(_)},className:"min-w-0 p-3",children:e(y)})]},_)})})]})}function rB({filePath:e,line:n}){const[r,o]=v.useState(!1),i=v.useCallback(async()=>{o(!0);try{await n_(e,n)}catch(c){const u=c instanceof Error?c.message:String(c);window.alert(`Could not open file: ${u}`)}finally{o(!1)}},[e,n]);return g.jsx(ru,{type:"button",size:"sm",variant:"outline",disabled:r,onClick:()=>{i()},children:r?"Opening…":"Open in Editor"})}function oB(e){return e>=90?"good":e>=50?"average":"poor"}const sB={good:{stroke:"stroke-success",track:"stroke-success/15",text:"text-success"},average:{stroke:"stroke-warning",track:"stroke-warning/15",text:"text-warning"},poor:{stroke:"stroke-destructive",track:"stroke-destructive/15",text:"text-destructive"}},iB={stroke:"stroke-muted-foreground",track:"stroke-border",text:"text-muted-foreground"},vn=56,dp=4;function lB(e,n){if(n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;const r=e.startsWith("#")?e.slice(1):e,o=r?document.getElementById(r):null;o&&(n.preventDefault(),o.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${r}`))}function Jv({label:e,value:n,href:r,pending:o=!1,className:i}){const c=(vn-dp)/2,u=2*Math.PI*c,d=n==null?0:Math.max(0,Math.min(100,Math.round(n))),p=n==null?iB:sB[oB(d)],h=n==null?u:u-d/100*u,b=g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"relative shrink-0",style:{width:vn,height:vn},"aria-hidden":!0,children:[g.jsxs("svg",{width:vn,height:vn,viewBox:`0 0 ${vn} ${vn}`,className:"-rotate-90",fill:"none",children:[g.jsx("circle",{cx:vn/2,cy:vn/2,r:c,className:xe("fill-none",p.track),strokeWidth:dp}),n!=null?g.jsx("circle",{cx:vn/2,cy:vn/2,r:c,className:xe("fill-none",p.stroke),strokeWidth:dp,strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:h}):null]}),g.jsx("span",{className:xe("absolute inset-0 flex items-center justify-center text-base font-semibold tabular-nums",p.text),children:n==null?"—":d})]}),g.jsxs("span",{className:"mt-1 max-w-22 text-center text-xs leading-tight text-muted-foreground",children:[e,o?"…":null]})]}),y=xe("flex flex-col items-center gap-0",r&&"rounded-lg transition hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i);return r?g.jsx("a",{href:r,onClick:_=>lB(r,_),className:y,"aria-label":n==null?`${e}: not available`:`${e}: ${d} out of 100${o?", updating":""}`,children:b}):g.jsx("div",{className:y,role:"img","aria-label":n==null?`${e}: not available`:`${e}: ${d} out of 100${o?", updating":""}`,children:b})}const cB=280,e0=1024;function Oo(e,n){if(!Number.isFinite(n)||n<=0)return e;const r=Math.min(cB,n);return Math.min(Math.max(e,r),n)}function uB(e,n,r){return n<=0?Oo(r,r):r<n?Oo(e,r):Math.abs(e-n)<=2?Oo(r,r):Oo(e,r)}function t0({side:e,onPointerDown:n}){const r=e==="left"?"left-0 -translate-x-1/2":"right-0 translate-x-1/2";return g.jsx("button",{type:"button",className:`absolute top-0 bottom-0 z-10 flex w-4 ${r} cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":"Resize preview from center (drag left or right)",onPointerDown:n,children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})})}function dB({href:e,children:n}){const r=o=>{if(o.defaultPrevented||o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)return;const i=e.startsWith("#")?e.slice(1):e,c=i?document.getElementById(i):null;c&&(o.preventDefault(),c.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${i}`))};return g.jsx("a",{href:e,onClick:r,className:"block rounded-md py-1 text-muted-foreground transition hover:bg-accent hover:text-accent-foreground",children:n})}function fB({entry:e,workspaceReport:n,reportReady:r,onOpenComponent:o,onHideFromCatalog:i}){const{renderPreview:c}=e,u=n?.root?CN(n.root,e.modulePath):void 0,[d,p]=v.useState(()=>Bf(e.controls));v.useEffect(()=>{p(Bf(e.controls))},[e.id]);const h=v.useMemo(()=>zR(r?n:null,e.modulePath),[n,e.modulePath,r]),b=v.useMemo(()=>IR(r?n:null,e.modulePath),[n,e.modulePath,r]),y=v.useMemo(()=>UR(r?n:null,e.modulePath),[n,e.modulePath,r]),_=v.useMemo(()=>{if(!(!r||!n))return hi(n).get(e.id)},[n,e.id,r]),w=v.useMemo(()=>!r||!n?[]:im(n).get(e.id)??[],[n,e.id,r]),S=v.useRef(null),k=v.useRef(null),$=v.useRef(null),E=v.useRef(e0),N=v.useRef(0),[j,z]=v.useState(0),[G,H]=v.useState(e0),[D,P]=v.useState(null),[re,se]=v.useState(null);v.useEffect(()=>{E.current=G},[G]);const de=v.useCallback(he=>{const Ne=Oo(he,N.current);E.current=Ne;const Ge=k.current;Ge&&(Ge.style.width=`${Ne}px`);const Ut=$.current;return Ut&&(Ut.textContent=`${Math.round(Ne)}px`),Ne},[]),oe=v.useCallback(he=>{if(!Number.isFinite(he)||he<=0)return;const Ne=N.current;N.current=he,z(he),H(Ge=>uB(Ge,Ne,he))},[]);v.useLayoutEffect(()=>{const he=S.current;if(!he)return;const Ne=new ResizeObserver(()=>{oe(he.clientWidth)});return Ne.observe(he),oe(he.clientWidth),()=>Ne.disconnect()},[oe]);const be=v.useCallback(()=>{P(fN());const he=k.current;se(he?pN(he):null)},[]);v.useLayoutEffect(()=>{const he=k.current;if(!he)return;const Ne=new ResizeObserver(()=>{be()});return Ne.observe(he),be(),()=>Ne.disconnect()},[be]),v.useEffect(()=>(be(),window.addEventListener("resize",be),()=>window.removeEventListener("resize",be)),[be]);const le=v.useCallback(he=>Ne=>{if(Ne.button!==0)return;Ne.preventDefault();const Ge=Ne.currentTarget;Ge.setPointerCapture(Ne.pointerId);let Ut=Ne.clientX,Jt=E.current,gn=0;const Ci=he==="right"?1:-1,Zo=document.body.style.cursor,Qo=document.body.style.userSelect;document.body.style.cursor="ew-resize",document.body.style.userSelect="none";const Jo=()=>{gn=0,de(Jt)},ki=bt=>{const gu=bt.clientX-Ut;Ut=bt.clientX,Jt=Oo(Jt+Ci*2*gu,N.current),gn||(gn=requestAnimationFrame(Jo))},Ur=bt=>{gn&&(cancelAnimationFrame(gn),de(Jt)),H(E.current),document.body.style.cursor=Zo,document.body.style.userSelect=Qo,Ge.releasePointerCapture(bt.pointerId),window.removeEventListener("pointermove",ki),window.removeEventListener("pointerup",Ur),window.removeEventListener("pointercancel",Ur)};window.addEventListener("pointermove",ki),window.addEventListener("pointerup",Ur),window.addEventListener("pointercancel",Ur)},[de]),pe=e.controls.length>0,O=v.useMemo(()=>nB(e.controls,d),[e.controls,d]),X=pe&&(O.combinations.length>0||O.totalCount===0),[J,fe]=v.useState([]),[ee,T]=v.useState(!1);v.useEffect(()=>{fe([]),T(!1)},[e.id,O.combinations]);const R=v.useCallback(he=>{fe(he),T(!0)},[]),q=v.useMemo(()=>{const he=P1(h.findings,J);return{...h,findings:he,issueCount:he.length,score:eB(h.findings,J)}},[h,J]),Y=O.combinations.length>0&&!ee,te=r||ee?`${q.score}/100${Y?"…":""}`:"—",Z=r?n:null,ge=v.useMemo(()=>M0(Z,e.id),[Z,e.id]),ae=O0(ge,e.id),ke=()=>p(Bf(e.controls)),Re=[{href:"#api-reference",label:"API reference",show:pe},{href:"#usage",label:"Usage"},{href:"#subcomponents",label:"Subcomponents",show:ae.length>0},{href:"#repo-usage",label:"Repo usage"},{href:"#design-tokens",label:"Design tokens"},{href:"#code-score",label:"Code score"},{href:"#accessibility",label:"Accessibility"},{href:"#variants",label:"Variants",show:X}];return g.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[g.jsxs("header",{id:"source",className:"scroll-mt-20 border-b border-border bg-card p-6 flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-medium text-muted-foreground",children:["Components",e.meta.group?g.jsxs(g.Fragment,{children:[" ",g.jsx("span",{className:"text-muted-foreground/40",children:"/"})," ",g.jsx("span",{className:"capitalize text-foreground/80",children:e.meta.group})]}):null]}),g.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:e.meta.title})]}),g.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u?g.jsx(rB,{filePath:u}):null,i?g.jsx(_S,{componentName:e.meta.id,onHidden:i}):null]}),g.jsxs("div",{className:"flex items-start gap-5",children:[g.jsx(Jv,{label:"Code score",value:r?y.score:null,href:"#code-score"}),g.jsx(Jv,{label:"Accessibility",value:r||ee?q.score:null,href:"#accessibility",pending:Y})]})]})]}),g.jsx("section",{id:"examples",className:"ds-playground-dot-surface border-b px-16 py-10",children:g.jsxs("div",{ref:S,children:[g.jsx("div",{className:"flex justify-center",children:g.jsxs("div",{ref:k,className:"relative min-w-0 shrink-0 select-none rounded-lg border border-border bg-background shadow-xs will-change-[width]",style:{width:G},children:[g.jsx(t0,{side:"left",onPointerDown:le("left")}),g.jsx(t0,{side:"right",onPointerDown:le("right")}),g.jsx(V9,{workspaceReport:Z,className:"min-w-0 p-8",children:g.jsx(Y9,{componentName:e.meta.title,children:c(d)})})]})}),j>0?g.jsxs("div",{className:"mx-auto mt-4 flex h-6 w-fit items-center overflow-hidden rounded-sm border border-border bg-card text-center font-mono text-xs/none tabular-nums text-muted-foreground divide-x divide-border",children:[g.jsxs("span",{ref:$,className:"p-2.5",children:[Math.round(G),"px"]}),g.jsxs("span",{className:"p-2.5",title:"usemods detectBreakpoint",children:["Screen: ",D??"—"]}),g.jsxs("span",{className:"p-2.5",title:"usemods detectContainerBreakpoint",children:["Container: ",re??"—"]})]}):null]})}),g.jsx("div",{className:"min-w-0 w-full px-6 py-10 lg:px-12",children:g.jsxs("div",{className:"xl:grid xl:grid-cols-[minmax(0,1fr)_12rem] xl:gap-14",children:[g.jsxs("div",{className:"min-w-0 space-y-14",children:[pe?g.jsx(P9,{entry:e,controls:e.controls,values:d,onChange:p,onReset:ke,reportUsage:_,declaredPropsFromScan:w,governanceReportLoaded:Z!=null}):null,g.jsx(B9,{entry:e,values:d}),g.jsx(fn,{id:"repo-usage",title:"Repo usage",description:"",children:g.jsx(a_,{report:Z,componentId:e.id})}),g.jsx(fn,{id:"design-tokens",title:"Design tokens and colors",description:"Hardcoded colors and non-token styling flagged by DSLinter for this module's source file.",children:g.jsx(z9,{findings:b,reportReady:r})}),g.jsx(fn,{id:"code-score",title:`Code score: ${r?y.score:"—"}/100`,description:"Static quality rules and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(L9,{codeScore:y,reportReady:r})}),g.jsx(fn,{id:"accessibility",title:`Accessibility: ${te}`,description:"Static accessibility rules from the DSLinter report, plus runtime color-contrast checks on each variant preview below.",children:g.jsx(U9,{a11y:q,reportReady:r||ee,variantScanPending:Y})})]}),g.jsx("aside",{className:"mt-12 hidden self-start sticky top-8 xl:mt-0 xl:block",children:g.jsxs("nav",{"aria-label":"On this page",className:"space-y-0.5 border-l border-border pl-4 text-sm",children:[g.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"On this page"}),Re.map(({href:he,label:Ne,show:Ge=!0})=>Ge?g.jsx(dB,{href:he,children:Ne},he):null)]})})]})}),O.combinations.length>0?g.jsx("section",{id:"variants",className:"ds-playground-dot-surface mt-8 w-full scroll-mt-20 border-t pt-10 pb-12",children:g.jsxs("div",{className:"min-w-0 w-full px-6 lg:px-12",children:[g.jsx("h2",{className:"w-fit bg-card text-xl font-semibold tracking-tight text-foreground",children:"All variants"}),g.jsx(aB,{renderPreview:c,combinations:O.combinations,finiteAxisKeys:O.finiteAxisKeys,totalCount:O.totalCount,capped:O.capped,onVariantA11yScan:R})]})}):null]})})}function Vm({...e}){return g.jsx(VT,{"data-slot":"hover-card",...e})}function Ym({...e}){return g.jsx(YT,{"data-slot":"hover-card-trigger",...e})}function Xm({className:e,align:n="center",sideOffset:r=4,...o}){return g.jsx(XT,{"data-slot":"hover-card-portal",children:g.jsx(KT,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:xe("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})})}const G1="cursor-default text-xs underline decoration-dotted underline-offset-2 hover:text-foreground";function pB({report:e,component:n,declared:r,unusedProps:o,usedPropCount:i}){const c=Uc(r);return g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsx("button",{type:"button",className:G1,children:g.jsxs("span",{className:"text-muted-foreground",children:[i,"/",c.length," ",oi("prop",i)," used"]})})}),g.jsx(Xm,{align:"start",className:"w-64 p-3",children:g.jsx(t_,{component:n,declared:r,unusedProps:o,propFrequencies:dm(e,n),variant:"compact"})})]})}function mB({root:e,fileCount:n,files:r}){const o=[...r].sort((i,c)=>i.localeCompare(c));return g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsxs("button",{type:"button",className:G1,children:[n," ",oi("file",n)]})}),g.jsxs(Xm,{align:"start",className:"w-72 p-3",children:[g.jsxs("p",{className:"text-xs font-medium text-foreground",children:[n," ",oi("file",n)]}),g.jsx("ul",{className:"mt-2 max-h-48 space-y-0.5 overflow-y-auto font-mono text-xs text-muted-foreground",children:o.map(i=>g.jsx("li",{className:"min-w-0",children:g.jsx(Ho,{path:Po(e,i),className:"text-xs text-muted-foreground"})},i))})]})]})}function hB({report:e,onOpenComponent:n}){const r=mi(e),o=hi(e),i=N0(r,o,e),{unusedProps:c,declaredByName:u}=v.useMemo(()=>{const d=im(e),p=new Set;for(const[h,b]of d){const y=e_(e,h,b);for(const _ of y)p.add(_)}return{unusedProps:p,declaredByName:d}},[e]);return g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{scope:"col",children:"Component"}),g.jsx(Ue,{scope:"col",children:"Prop Usage"}),g.jsx(Ue,{scope:"col",children:"App Usage"})]})}),g.jsx(Ln,{children:i.map(d=>{const p=o.get(d),h=u.get(d)??[],b=Uc(h),y=b.filter(_=>!c.has(`${d}/${_}`)).length;return g.jsxs(ft,{children:[g.jsx(Pe,{children:n?g.jsx("button",{type:"button",onClick:()=>n(d),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:d}):d}),g.jsx(Pe,{children:b.length>0?g.jsx(pB,{report:e,component:d,declared:h,unusedProps:c,usedPropCount:y}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})}),g.jsx(Pe,{children:p&&p.files.length>0?g.jsx(mB,{root:e.root,fileCount:p.file_count,files:p.files}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})})]},d)})})]})}function gB({dslinterReport:e,dslinterReportHint:n="npm run dslinter:report",onOpenComponent:r,onBackToGovernance:o,landing:i}){const{report:c,error:u,loading:d}=e,p=c?gi(c).length:0;return u?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[i,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"All components"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:u}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:n})]})]})]}):d||!c?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[i,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading component catalog…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[i,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[o?g.jsx("button",{type:"button",onClick:o,className:"mb-2 text-xs font-medium text-muted-foreground transition hover:text-foreground",children:"← Governance"}):null,g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["All components",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",p," components"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Full catalog with prop usage and app references from the latest scan."})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(hB,{report:c,onOpenComponent:r})})]})}const H1=[{id:"all",label:"All issues"},{id:"a11y",label:"Accessibility"},{id:"code",label:"Code quality"},{id:"token",label:"Tokens"},{id:"unused",label:"Unused"}];function bB(e){return H1.some(n=>n.id===e)}function yB({value:e,onChange:n,counts:r}){return g.jsx(Tm,{type:"single",value:e,onValueChange:o=>{bB(o)&&n(o)},variant:"outline",size:"sm","aria-label":"Filter governance inventory",className:"contents",children:H1.map(o=>g.jsxs(Cr,{value:o.id,className:"rounded-full px-2.5 text-xs font-medium",children:[o.label,g.jsx("span",{className:"ml-1 tabular-nums text-muted-foreground",children:r[o.id]})]},o.id))})}function xB({scores:e}){const n=[{label:"System health",value:e.design_system_health},{label:"UX consistency",value:e.ux_consistency},{label:"Accessibility",value:e.accessibility},{label:"Maintainability",value:e.maintainability}];return g.jsx("section",{className:"grid grid-cols-2 gap-1 rounded-xl border border-border bg-muted/30 p-1 md:grid-cols-4",children:n.map(({label:r,value:o})=>g.jsxs("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-card-foreground shadow-xs",children:[g.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:r}),g.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:o})]},r))})}function vB({components:e,root:n,onOpenComponent:r}){return e.length===0?g.jsx("p",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-4 py-8 text-center text-sm text-muted-foreground",children:"No unused components — every scanned definition has at least one JSX reference in the workspace."}):g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{scope:"col",children:"Component"}),g.jsx(Ue,{scope:"col",children:"Defined in"})]})}),g.jsx(Ln,{children:e.map(({name:o,definitionPaths:i})=>g.jsxs(ft,{children:[g.jsx(Pe,{children:r?g.jsx("button",{type:"button",onClick:()=>r(o),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:o}):o}),g.jsx(Pe,{className:"min-w-0 font-mono text-xs text-muted-foreground",children:i.length===1?g.jsx(Ho,{path:Po(n,i[0]),className:"text-xs"}):g.jsxs("span",{title:i.map(c=>Po(n,c)).join(`
|
|
219
|
-
`),children:[i.length," ",oi("file",i.length)]})})]},o))})]})}const _B={all:{id:"issues",title:"Issues",description:"All findings from the workspace DSLinter report."},a11y:{id:"accessibility-issues",title:"Accessibility issues",description:"Findings from accessibility rules in the latest snapshot."},code:{id:"code-issues",title:"Code quality issues",description:"Findings from code quality rules in the latest snapshot."},token:{id:"token-issues",title:"Token issues",description:"Findings from design token rules in the latest snapshot."},unused:{id:"unused-components",title:"Unused components",description:"Scanned definitions with no JSX references elsewhere in the workspace."}};function wB({report:e,onOpenComponent:n,onOpenCatalog:r}){const[o,i]=v.useState("all"),c=v.useMemo(()=>A0(e),[e]),u=v.useMemo(()=>i2(e,o),[e,o]),d=v.useMemo(()=>lm(e),[e]),p=_B[o];return g.jsxs("div",{className:"space-y-10",children:[g.jsx(xB,{scores:e.scores}),e.duplicate_components.length>0?g.jsxs("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-xs text-amber-950",children:[g.jsx("span",{className:"font-semibold",children:"Duplicate component names: "}),e.duplicate_components.map(h=>h.name).join(", ")]}):null,g.jsx(yB,{value:o,onChange:i,counts:c}),g.jsx(fn,{id:p.id,title:p.title,description:p.description,children:o==="unused"?g.jsx(vB,{components:d,root:e.root,onOpenComponent:n}):g.jsx(vS,{findings:u,root:e.root})}),r?g.jsxs("p",{className:"text-sm text-muted-foreground",children:[g.jsx("button",{type:"button",onClick:r,className:"font-medium text-foreground underline decoration-dotted underline-offset-2 transition hover:decoration-solid",children:"View all components"})," ","for prop usage and app reference details."]}):null]})}function SB({landing:e,reportUrl:n="/dslinter-report.json",dslinterReportHint:r="npm run dslinter:report",dslinterReport:o,onOpenComponent:i,onOpenCatalog:c}){const{report:u,error:d,loading:p}=o,h=u?gi(u).length:0,b=u?lm(u).length:0,y=u?A0(u).all:0;return d?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"Governance"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:d}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:r})]})]})]}):p||!u?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[e,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading inventory…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["Governance",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",y," ",y===1?"issue":"issues"," ·"," ",b," unused · ",h," total"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Governance scores, workspace findings, and components with no usage from the latest DSLinter snapshot"})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(wB,{report:u,onOpenComponent:i,onOpenCatalog:c})})]})}function CB(){const[e,n]=v.useState("⌘K");return v.useEffect(()=>{const r=/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent);n(r?"⌘K":"Ctrl+K")},[]),g.jsx("kbd",{className:"pointer-events-none select-none rounded border border-sidebar-border bg-sidebar-accent px-1 py-px font-mono text-[10px] font-medium leading-tight text-sidebar-foreground/80 tabular-nums",children:e})}function Ws(e){return`w-full rounded-md truncate px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function kB(e){return`min-w-0 flex-1 rounded-l-md truncate px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function $B(e){return`flex h-[32px] w-8 shrink-0 items-center justify-center rounded-r-md transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function n0(e){return g.jsx("p",{className:"mb-1.5 mt-4 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50 first:mt-0",children:e})}function EB(e){const n=e.querySelector('[data-nav-active="true"]');if(!n)return;const r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r.bottom>o.top&&r.top<o.bottom)return;const c=r.top-o.top;e.scrollTop+=c}function NB({report:e,reportLoading:n,reportError:r,route:o,onNavigate:i,onOpenCommandPalette:c,theme:u,onThemeChange:d,catalogNames:p}){const h=v.useMemo(()=>R0(e),[e]),b=v.useRef(null),[y,_]=v.useState(()=>new Set),w=o.view==="tokens",S=o.view==="governance",k=o.view==="catalog";v.useEffect(()=>{if(o.view!=="component")return;const E=h.find(N=>N.type==="family"&&(N.parent===o.componentId||N.children.includes(o.componentId)));!E||E.type!=="family"||_(N=>{if(N.has(E.parent))return N;const j=new Set(N);return j.add(E.parent),j})},[h,o]),v.useEffect(()=>{const E=b.current;if(!E)return;const N=requestAnimationFrame(()=>EB(E));return()=>cancelAnimationFrame(N)},[o,h,y,p.length]);const $=E=>{E!=="light"&&E!=="dark"||d(E)};return g.jsxs("aside",{className:"fixed flex h-full w-[240px] shrink-0 flex-col overflow-hidden border-r border-border bg-background text-sidebar-foreground",children:[g.jsx("div",{className:"sticky top-0 z-10 shrink-0 border-b border-border bg-background px-6 py-4",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"flex items-center text-foreground",children:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:g.jsxs("g",{fill:"currentColor",children:[g.jsx("path",{d:"m22.346,4.836l-3.182-3.182c-.779-.78-2.049-.78-2.828,0l-3.182,3.182c-.78.78-.78,2.048,0,2.828l3.182,3.182c.39.39.902.585,1.414.585s1.024-.195,1.414-.585l3.182-3.182c.78-.78.78-2.048,0-2.828Z",fill:"currentColor",strokeWidth:"0"}),g.jsx("rect",{x:"2",y:"2",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"13",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"2",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"})]})})}),g.jsxs("button",{type:"button",onClick:c,className:"flex shrink-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-foreground/70 transition hover:bg-accent hover:text-accent-foreground","aria-label":"Search components and views",children:[g.jsx(Rm,{className:"size-4 shrink-0","aria-hidden":!0}),g.jsx(CB,{})]})]})}),g.jsxs("nav",{ref:b,className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[n0("Explore"),g.jsx("button",{type:"button",onClick:()=>i({view:"governance"}),className:Ws(S),"data-nav-active":S?"true":void 0,children:"Governance"}),g.jsx("button",{type:"button",onClick:()=>i({view:"catalog"}),className:Ws(k),"data-nav-active":k?"true":void 0,children:"All components"}),g.jsx("button",{type:"button",onClick:()=>i({view:"tokens"}),className:Ws(w),"data-nav-active":w?"true":void 0,children:"Design tokens"}),n0(p.length>0?`Components (${p.length})`:"Components"),g.jsxs("div",{className:"space-y-0.5",children:[n&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Loading components…"}):null,r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Could not load report"}):null,!n&&!r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"No components in scan"}):null,h.map(E=>{if(E.type==="component"){const D=o.view==="component"&&o.componentId===E.name;return g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:E.name}),className:Ws(D),"data-nav-active":D?"true":void 0,children:E.name},E.name)}const N=o.view==="component"&&o.componentId===E.parent,j=o.view==="component"&&E.children.includes(o.componentId),z=N||j,G=N&&!j,H=y.has(E.parent);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex min-w-0",children:[g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:T0(E,p)}),className:kB(z),"data-nav-active":G?"true":void 0,children:E.parent}),g.jsx("button",{type:"button",onClick:()=>_(D=>{const P=new Set(D);return P.has(E.parent)?P.delete(E.parent):P.add(E.parent),P}),className:$B(z),"aria-label":H?`Collapse ${E.parent} subcomponents`:`Expand ${E.parent} subcomponents`,"aria-expanded":H,children:g.jsx(ou,{className:`size-4 transition-transform ${H?"rotate-180":""}`,"aria-hidden":!0})})]}),H?g.jsx("div",{className:"mt-0.5 space-y-0.5 border-l border-sidebar-border/70 pl-3",children:E.children.map(D=>{const P=o.view==="component"&&o.componentId===D;return g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:D}),className:`${Ws(P)} text-xs`,"data-nav-active":P?"true":void 0,children:D},D)})}):null]},E.path)})]})]}),g.jsxs("div",{className:"shrink-0 border-t border-sidebar-border px-3 py-3",children:[g.jsx("p",{className:"mb-2 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:"Appearance"}),g.jsxs(Tm,{type:"single",variant:"outline",size:"sm",spacing:0,className:"w-full",value:u,onValueChange:$,"aria-label":"Color theme",children:[g.jsx(Cr,{value:"light",className:"flex-1","aria-label":"Light theme",title:"Light",children:g.jsx(kS,{className:"size-4","aria-hidden":!0})}),g.jsx(Cr,{value:"dark",className:"flex-1","aria-label":"Dark theme",title:"Dark",children:g.jsx($S,{className:"size-4","aria-hidden":!0})})]})]})]})}function AB(e){const n=e.typography;return n?n.families.length>0||n.sizes.length>0||(n.weights?.length??0)>0:!1}function jB({catalog:e}){const n=e.typography,r=n?.weights??[];return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Colors"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"From Tailwind theme extensions."}),g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:e.colors.map(o=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:o.value,children:[g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:o.value})}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"truncate font-mono text-xs text-foreground",children:[o.token,"/",o.shade]}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:o.value}),g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:o.tw})]})]},`${o.token}-${o.shade}`))})]}),AB(e)&&n?g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Typography"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Font stacks and Tailwind utilities — preview matches your theme tokens."})]}),n.families.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font families"}),g.jsx("ul",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:n.families.map(o=>g.jsxs("li",{className:"rounded-lg border border-border bg-card px-3 py-3",title:o.value,children:[g.jsx("p",{className:`${o.tw} text-sm text-foreground`,children:"The quick brown fox jumps over the lazy dog."}),g.jsx("p",{className:"mt-2 truncate font-mono text-xs text-foreground",children:o.tw}),g.jsx("p",{className:"mt-1 break-all text-xs leading-snug text-muted-foreground",children:o.value})]},o.key))})]}):null,n.families.length>0&&n.sizes.length>0?n.families.map(o=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Type scale · ",o.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(i=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:i.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:i.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate ${o.tw} ${i.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},`${o.key}-${i.token}`))})]},o.key)):n.sizes.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Type scale · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(o=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:o.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:o.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate font-sans ${o.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},o.token))})]}):null,n.families.length>0&&r.length>0?n.families.map(o=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Font weights · ",o.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(i=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:i.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:i.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 ${o.tw} ${i.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},`${o.key}-${i.token}`))})]},`w-${o.key}`)):r.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font weights · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(o=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:o.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:o.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 font-sans ${o.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},o.token))})]}):null]}):null,g.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Spacing"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.spacing.map(o=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:o.token}),g.jsx("span",{className:"text-muted-foreground",children:o.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:o.tw})]},o.token))})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Radius"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.radius.map(o=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:o.token}),g.jsx("span",{className:"text-muted-foreground",children:o.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:o.tw})]},o.token))})]})]})]})}const TB=[{id:"all",label:"All"},{id:"used",label:"Used"},{id:"unused",label:"Unused"}];function F1({title:e,subtitle:n,children:r}){return g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n}),r]})}function a0({row:e}){return e.isUnused?g.jsx("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"unused"}):g.jsxs("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[e.fileCount," ",e.fileCount===1?"file":"files"]})}function q1({row:e}){return e.referenceCount===0?g.jsx(a0,{row:e}):g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsx("button",{type:"button",className:"shrink-0",children:g.jsx(a0,{row:e})})}),g.jsxs(Xm,{className:"w-80 text-xs",align:"end",children:[g.jsxs("p",{className:"font-medium text-foreground",children:[e.referenceCount," reference",e.referenceCount===1?"":"s"]}),g.jsxs("ul",{className:"mt-2 max-h-40 space-y-1 overflow-y-auto text-muted-foreground",children:[e.usageFiles.slice(0,12).map(n=>g.jsx("li",{className:"min-w-0",children:g.jsx(Ho,{path:n,className:"text-xs"})},n)),e.usageFiles.length>12?g.jsxs("li",{className:"text-muted-foreground/80",children:["+",e.usageFiles.length-12," more"]}):null]})]})]})}function V1({row:e,className:n}){return g.jsxs("div",{className:xe("min-w-0",n),children:[g.jsx("p",{className:"truncate font-mono text-xs text-foreground",children:e.cssName}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.value}),e.tw?g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:e.tw}):null]})}function RB({rows:e}){const n=e.filter(r=>r.category==="color");return n.length===0?null:g.jsx(F1,{title:"Colors",subtitle:"CSS custom properties from @theme and :root.",children:g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:n.map(r=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card p-2 pr-3.5",title:r.value,children:[r.displayValue&&/^(#|rgb|oklch|hsl)/.test(r.displayValue.trim())?g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:r.displayValue})}):g.jsx("div",{className:"h-9 w-9 shrink-0 rounded border border-border bg-muted"}),g.jsx(V1,{row:r,className:"flex-1"}),g.jsx(q1,{row:r})]},C0(r)))})})}function rc({title:e,subtitle:n,rows:r,category:o}){const i=r.filter(c=>c.category===o);return i.length===0?null:g.jsx(F1,{title:e,subtitle:n,children:g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:i.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2 text-xs",children:[g.jsx(V1,{row:c,className:"flex-1"}),g.jsx(q1,{row:c})]},C0(c)))})})}function MB({view:e}){const[n,r]=v.useState("all"),o=v.useMemo(()=>KE(e.rows,n),[e.rows,n]);return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-medium text-foreground",children:[e.usedCount,"/",e.totalCount," theme tokens used"]}),g.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Scanned from CSS sources",e.source==="hybrid"?" · enriched with manual catalog":""]})]}),g.jsx("div",{className:"flex gap-1 rounded-lg border border-border bg-muted/50 p-0.5",children:TB.map(i=>g.jsx("button",{type:"button",onClick:()=>r(i.id),className:xe("rounded-md px-3 py-1 text-xs font-medium transition-colors",n===i.id?"bg-card text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),children:i.label},i.id))})]}),g.jsx(RB,{rows:o}),g.jsx(rc,{title:"Spacing",subtitle:"--spacing-* custom properties.",rows:o,category:"spacing"}),g.jsx(rc,{title:"Radius",subtitle:"--radius-* custom properties.",rows:o,category:"radius"}),g.jsx(rc,{title:"Typography",subtitle:"--font-* custom properties.",rows:o,category:"typography"}),g.jsx(rc,{title:"Other",subtitle:"Additional CSS variables.",rows:o,category:"other"})]})}function OB({tokenCatalog:e,dslinterReport:n}){const r=v.useMemo(()=>XE(n,e),[n,e]),o=r!=null&&r.rows.length>0,i=e!=null;return g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"System"}),g.jsx("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:"Design tokens"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:o?"CSS variables discovered from your stylesheets, with used vs unused usage across the repo.":"Supply a catalog object (same shape as your Tailwind theme docs) — keep it aligned with your design tokens."})]}),g.jsx("div",{className:"min-w-0 w-full px-8 py-8",children:o&&r?g.jsx(MB,{view:r}):i?g.jsx(jB,{catalog:e}):g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Run ",g.jsx("span",{className:"font-mono",children:"dslinter --json"})," on a project with CSS token sources, or pass a"," ",g.jsx("span",{className:"font-mono",children:"tokenCatalog"})," prop."]})})]})}var r0=1,DB=.9,BB=.8,zB=.17,fp=.1,pp=.999,LB=.9999,UB=.99,PB=/[\\\/_+.#"@\[\(\{&]/,IB=/[\\\/_+.#"@\[\(\{&]/g,GB=/[\s-]/,Y1=/[\s-]/g;function tm(e,n,r,o,i,c,u){if(c===n.length)return i===e.length?r0:UB;var d=`${i},${c}`;if(u[d]!==void 0)return u[d];for(var p=o.charAt(c),h=r.indexOf(p,i),b=0,y,_,w,S;h>=0;)y=tm(e,n,r,o,h+1,c+1,u),y>b&&(h===i?y*=r0:PB.test(e.charAt(h-1))?(y*=BB,w=e.slice(i,h-1).match(IB),w&&i>0&&(y*=Math.pow(pp,w.length))):GB.test(e.charAt(h-1))?(y*=DB,S=e.slice(i,h-1).match(Y1),S&&i>0&&(y*=Math.pow(pp,S.length))):(y*=zB,i>0&&(y*=Math.pow(pp,h-i))),e.charAt(h)!==n.charAt(c)&&(y*=LB)),(y<fp&&r.charAt(h-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&r.charAt(h-1)!==o.charAt(c))&&(_=tm(e,n,r,o,h+1,c+2,u),_*fp>y&&(y=_*fp)),y>b&&(b=y),h=r.indexOf(p,h+1);return u[d]=b,b}function o0(e){return e.toLowerCase().replace(Y1," ")}function HB(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,tm(e,n,o0(e),o0(n),0,0,{})}var Zs='[cmdk-group=""]',mp='[cmdk-group-items=""]',FB='[cmdk-group-heading=""]',X1='[cmdk-item=""]',s0=`${X1}:not([aria-disabled="true"])`,nm="cmdk-item-select",Ro="data-value",qB=(e,n,r)=>HB(e,n,r),K1=v.createContext(void 0),Si=()=>v.useContext(K1),W1=v.createContext(void 0),Km=()=>v.useContext(W1),Z1=v.createContext(void 0),Q1=v.forwardRef((e,n)=>{let r=Mo(()=>{var R,q;return{search:"",value:(q=(R=e.value)!=null?R:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Mo(()=>new Set),i=Mo(()=>new Map),c=Mo(()=>new Map),u=Mo(()=>new Set),d=J1(e),{label:p,children:h,value:b,onValueChange:y,filter:_,shouldFilter:w,loop:S,disablePointerSelection:k=!1,vimBindings:$=!0,...E}=e,N=Zt(),j=Zt(),z=Zt(),G=v.useRef(null),H=n4();Or(()=>{if(b!==void 0){let R=b.trim();r.current.value=R,D.emit()}},[b]),Or(()=>{H(6,be)},[]);let D=v.useMemo(()=>({subscribe:R=>(u.current.add(R),()=>u.current.delete(R)),snapshot:()=>r.current,setState:(R,q,Q)=>{var Y,te,Z,ge;if(!Object.is(r.current[R],q)){if(r.current[R]=q,R==="search")oe(),se(),H(1,de);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ae=document.getElementById(z);ae?ae.focus():(Y=document.getElementById(N))==null||Y.focus()}if(H(7,()=>{var ae;r.current.selectedItemId=(ae=le())==null?void 0:ae.id,D.emit()}),Q||H(5,be),((te=d.current)==null?void 0:te.value)!==void 0){let ae=q??"";(ge=(Z=d.current).onValueChange)==null||ge.call(Z,ae);return}}D.emit()}},emit:()=>{u.current.forEach(R=>R())}}),[]),P=v.useMemo(()=>({value:(R,q,Q)=>{var Y;q!==((Y=c.current.get(R))==null?void 0:Y.value)&&(c.current.set(R,{value:q,keywords:Q}),r.current.filtered.items.set(R,re(q,Q)),H(2,()=>{se(),D.emit()}))},item:(R,q)=>(o.current.add(R),q&&(i.current.has(q)?i.current.get(q).add(R):i.current.set(q,new Set([R]))),H(3,()=>{oe(),se(),r.current.value||de(),D.emit()}),()=>{c.current.delete(R),o.current.delete(R),r.current.filtered.items.delete(R);let Q=le();H(4,()=>{oe(),Q?.getAttribute("id")===R&&de(),D.emit()})}),group:R=>(i.current.has(R)||i.current.set(R,new Set),()=>{c.current.delete(R),i.current.delete(R)}),filter:()=>d.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:N,inputId:z,labelId:j,listInnerRef:G}),[]);function re(R,q){var Q,Y;let te=(Y=(Q=d.current)==null?void 0:Q.filter)!=null?Y:qB;return R?te(R,r.current.search,q):0}function se(){if(!r.current.search||d.current.shouldFilter===!1)return;let R=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(Y=>{let te=i.current.get(Y),Z=0;te.forEach(ge=>{let ae=R.get(ge);Z=Math.max(ae,Z)}),q.push([Y,Z])});let Q=G.current;pe().sort((Y,te)=>{var Z,ge;let ae=Y.getAttribute("id"),ke=te.getAttribute("id");return((Z=R.get(ke))!=null?Z:0)-((ge=R.get(ae))!=null?ge:0)}).forEach(Y=>{let te=Y.closest(mp);te?te.appendChild(Y.parentElement===te?Y:Y.closest(`${mp} > *`)):Q.appendChild(Y.parentElement===Q?Y:Y.closest(`${mp} > *`))}),q.sort((Y,te)=>te[1]-Y[1]).forEach(Y=>{var te;let Z=(te=G.current)==null?void 0:te.querySelector(`${Zs}[${Ro}="${encodeURIComponent(Y[0])}"]`);Z?.parentElement.appendChild(Z)})}function de(){let R=pe().find(Q=>Q.getAttribute("aria-disabled")!=="true"),q=R?.getAttribute(Ro);D.setState("value",q||void 0)}function oe(){var R,q,Q,Y;if(!r.current.search||d.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let te=0;for(let Z of o.current){let ge=(q=(R=c.current.get(Z))==null?void 0:R.value)!=null?q:"",ae=(Y=(Q=c.current.get(Z))==null?void 0:Q.keywords)!=null?Y:[],ke=re(ge,ae);r.current.filtered.items.set(Z,ke),ke>0&&te++}for(let[Z,ge]of i.current)for(let ae of ge)if(r.current.filtered.items.get(ae)>0){r.current.filtered.groups.add(Z);break}r.current.filtered.count=te}function be(){var R,q,Q;let Y=le();Y&&(((R=Y.parentElement)==null?void 0:R.firstChild)===Y&&((Q=(q=Y.closest(Zs))==null?void 0:q.querySelector(FB))==null||Q.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function le(){var R;return(R=G.current)==null?void 0:R.querySelector(`${X1}[aria-selected="true"]`)}function pe(){var R;return Array.from(((R=G.current)==null?void 0:R.querySelectorAll(s0))||[])}function O(R){let q=pe()[R];q&&D.setState("value",q.getAttribute(Ro))}function X(R){var q;let Q=le(),Y=pe(),te=Y.findIndex(ge=>ge===Q),Z=Y[te+R];(q=d.current)!=null&&q.loop&&(Z=te+R<0?Y[Y.length-1]:te+R===Y.length?Y[0]:Y[te+R]),Z&&D.setState("value",Z.getAttribute(Ro))}function J(R){let q=le(),Q=q?.closest(Zs),Y;for(;Q&&!Y;)Q=R>0?e4(Q,Zs):t4(Q,Zs),Y=Q?.querySelector(s0);Y?D.setState("value",Y.getAttribute(Ro)):X(R)}let fe=()=>O(pe().length-1),ee=R=>{R.preventDefault(),R.metaKey?fe():R.altKey?J(1):X(1)},T=R=>{R.preventDefault(),R.metaKey?O(0):R.altKey?J(-1):X(-1)};return v.createElement(fa.div,{ref:n,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:R=>{var q;(q=E.onKeyDown)==null||q.call(E,R);let Q=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||Q))switch(R.key){case"n":case"j":{$&&R.ctrlKey&&ee(R);break}case"ArrowDown":{ee(R);break}case"p":case"k":{$&&R.ctrlKey&&T(R);break}case"ArrowUp":{T(R);break}case"Home":{R.preventDefault(),O(0);break}case"End":{R.preventDefault(),fe();break}case"Enter":{R.preventDefault();let Y=le();if(Y){let te=new Event(nm);Y.dispatchEvent(te)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:r4},p),hu(e,R=>v.createElement(W1.Provider,{value:D},v.createElement(K1.Provider,{value:P},R))))}),VB=v.forwardRef((e,n)=>{var r,o;let i=Zt(),c=v.useRef(null),u=v.useContext(Z1),d=Si(),p=J1(e),h=(o=(r=p.current)==null?void 0:r.forceMount)!=null?o:u?.forceMount;Or(()=>{if(!h)return d.item(i,u?.id)},[h]);let b=eC(i,c,[e.value,e.children,c],e.keywords),y=Km(),_=Ka(H=>H.value&&H.value===b.current),w=Ka(H=>h||d.filter()===!1?!0:H.search?H.filtered.items.get(i)>0:!0);v.useEffect(()=>{let H=c.current;if(!(!H||e.disabled))return H.addEventListener(nm,S),()=>H.removeEventListener(nm,S)},[w,e.onSelect,e.disabled]);function S(){var H,D;k(),(D=(H=p.current).onSelect)==null||D.call(H,b.current)}function k(){y.setState("value",b.current,!0)}if(!w)return null;let{disabled:$,value:E,onSelect:N,forceMount:j,keywords:z,...G}=e;return v.createElement(fa.div,{ref:Fa(c,n),...G,id:i,"cmdk-item":"",role:"option","aria-disabled":!!$,"aria-selected":!!_,"data-disabled":!!$,"data-selected":!!_,onPointerMove:$||d.getDisablePointerSelection()?void 0:k,onClick:$?void 0:S},e.children)}),YB=v.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...c}=e,u=Zt(),d=v.useRef(null),p=v.useRef(null),h=Zt(),b=Si(),y=Ka(w=>i||b.filter()===!1?!0:w.search?w.filtered.groups.has(u):!0);Or(()=>b.group(u),[]),eC(u,d,[e.value,e.heading,p]);let _=v.useMemo(()=>({id:u,forceMount:i}),[i]);return v.createElement(fa.div,{ref:Fa(d,n),...c,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),hu(e,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(Z1.Provider,{value:_},w))))}),XB=v.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=v.useRef(null),c=Ka(u=>!u.search);return!r&&!c?null:v.createElement(fa.div,{ref:Fa(i,n),...o,"cmdk-separator":"",role:"separator"})}),KB=v.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,c=Km(),u=Ka(h=>h.search),d=Ka(h=>h.selectedItemId),p=Si();return v.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),v.createElement(fa.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":d,id:p.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||c.setState("search",h.target.value),r?.(h.target.value)}})}),WB=v.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,c=v.useRef(null),u=v.useRef(null),d=Ka(h=>h.selectedItemId),p=Si();return v.useEffect(()=>{if(u.current&&c.current){let h=u.current,b=c.current,y,_=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=h.offsetHeight;b.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return _.observe(h),()=>{cancelAnimationFrame(y),_.unobserve(h)}}},[]),v.createElement(fa.div,{ref:Fa(c,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":o,id:p.listId},hu(e,h=>v.createElement("div",{ref:Fa(u,p.listInnerRef),"cmdk-list-sizer":""},h)))}),ZB=v.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:c,container:u,...d}=e;return v.createElement(O_,{open:r,onOpenChange:o},v.createElement(D_,{container:u},v.createElement(B_,{"cmdk-overlay":"",className:i}),v.createElement(z_,{"aria-label":e.label,"cmdk-dialog":"",className:c},v.createElement(Q1,{ref:n,...d}))))}),QB=v.forwardRef((e,n)=>Ka(r=>r.filtered.count===0)?v.createElement(fa.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),JB=v.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...c}=e;return v.createElement(fa.div,{ref:n,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},hu(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),Wo=Object.assign(Q1,{List:WB,Item:VB,Input:KB,Group:YB,Separator:XB,Dialog:ZB,Empty:QB,Loading:JB});function e4(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function t4(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function J1(e){let n=v.useRef(e);return Or(()=>{n.current=e}),n}var Or=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Mo(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function Ka(e){let n=Km(),r=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,r,r)}function eC(e,n,r,o=[]){let i=v.useRef(),c=Si();return Or(()=>{var u;let d=(()=>{var h;for(let b of r){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(h=b.current.textContent)==null?void 0:h.trim():i.current}})(),p=o.map(h=>h.trim());c.value(e,d,p),(u=n.current)==null||u.setAttribute(Ro,d),i.current=d}),i}var n4=()=>{let[e,n]=v.useState(),r=Mo(()=>new Map);return Or(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function a4(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function hu({asChild:e,children:n},r){return e&&v.isValidElement(n)?v.cloneElement(a4(n),{ref:n.ref},r(n.props.children)):r(n)}var r4={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function o4({...e}){return g.jsx(O_,{"data-slot":"dialog",...e})}function s4({...e}){return g.jsx(D_,{"data-slot":"dialog-portal",...e})}function i4({className:e,...n}){return g.jsx(B_,{"data-slot":"dialog-overlay",className:xe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...n})}function l4({className:e,children:n,showCloseButton:r=!0,...o}){return g.jsxs(s4,{"data-slot":"dialog-portal",children:[g.jsx(i4,{}),g.jsxs(z_,{"data-slot":"dialog-content",className:xe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...o,children:[n,r&&g.jsxs(uj,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(CS,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function c4({className:e,...n}){return g.jsx("div",{"data-slot":"dialog-header",className:xe("flex flex-col gap-2 text-center sm:text-left",e),...n})}function u4({className:e,...n}){return g.jsx(lj,{"data-slot":"dialog-title",className:xe("text-lg leading-none font-semibold",e),...n})}function d4({className:e,...n}){return g.jsx(cj,{"data-slot":"dialog-description",className:xe("text-sm text-muted-foreground",e),...n})}function f4({className:e,...n}){return g.jsx(Wo,{"data-slot":"command",className:xe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n})}function p4({title:e="Command Palette",description:n="Search for a command to run...",children:r,className:o,showCloseButton:i=!0,...c}){return g.jsxs(o4,{...c,children:[g.jsxs(c4,{className:"sr-only",children:[g.jsx(u4,{children:e}),g.jsx(d4,{children:n})]}),g.jsx(l4,{className:xe("overflow-hidden p-0",o),showCloseButton:i,children:g.jsx(f4,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function m4({className:e,...n}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(Rm,{className:"size-4 shrink-0 opacity-50","aria-hidden":!0}),g.jsx(Wo.Input,{"data-slot":"command-input",className:xe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function h4({className:e,...n}){return g.jsx(Wo.List,{"data-slot":"command-list",className:xe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function g4({...e}){return g.jsx(Wo.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function hp({className:e,...n}){return g.jsx(Wo.Group,{"data-slot":"command-group",className:xe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n})}function oc({className:e,...n}){return g.jsx(Wo.Item,{"data-slot":"command-item",className:xe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n})}function b4(e){if(!e||!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"}function y4({catalogEntries:e,onNavigate:n,open:r,onOpenChange:o}){const i=v.useCallback(()=>o(!1),[o]);return v.useEffect(()=>{const c=u=>{!(u.metaKey||u.ctrlKey)||u.key!=="k"||!r&&b4(u.target)||(u.preventDefault(),o(!r))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[r,o]),g.jsxs(p4,{open:r,onOpenChange:o,title:"Jump to",description:"Search components and views",children:[g.jsx(m4,{placeholder:"Search components…"}),g.jsxs(h4,{children:[g.jsx(g4,{children:"No matches."}),g.jsxs(hp,{heading:"Explore",children:[g.jsx(oc,{value:"governance explore overview",onSelect:()=>{n({view:"governance"}),i()},children:"Governance"}),g.jsx(oc,{value:"catalog all components inventory",onSelect:()=>{n({view:"catalog"}),i()},children:"All components"})]}),e.length>0?g.jsx(hp,{heading:"Components",children:e.map(({name:c,label:u})=>g.jsx(oc,{value:`${c} ${u}`,onSelect:()=>{n({view:"component",componentId:c}),i()},children:u},c))}):null,g.jsx(hp,{heading:"System",children:g.jsx(oc,{value:"tokens design system colors",onSelect:()=>{n({view:"tokens"}),i()},children:"Design tokens"})})]})]})}function x4(e){let n=e.length;for(;n>1&&e[n-1]==="/";)n--;return e.slice(0,n)}function v4(e){const n=e.trim();return n.startsWith("/")?x4(n):n.length>0?`/${n}`:"/"}function _4(e){const n=v4(e);if(n==="/"||n==="/overview"||n==="/governance")return{view:"governance"};if(n==="/tokens")return{view:"tokens"};if(n==="/catalog"||n==="/governance/catalog")return{view:"catalog"};if(n.startsWith("/component/")){const r=decodeURIComponent(n.slice(11));if(r.length>0)return{view:"component",componentId:r}}return{view:"governance"}}function w4(e){switch(e.view){case"tokens":return"/tokens";case"governance":return"/governance";case"catalog":return"/catalog";case"component":return`/component/${encodeURIComponent(e.componentId)}`;default:return"/governance"}}function i0(){if(!window.location.hash.startsWith("#!/"))return!1;const e=window.location.pathname+window.location.search;return window.history.replaceState(null,"",e||"/governance"),!0}const Dc="dslinter:navigate";function S4(e){return window.addEventListener("popstate",e),window.addEventListener(Dc,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Dc,e)}}function C4(){return window.location.pathname||"/governance"}function k4(){return"/governance"}function $4(){const e=v.useSyncExternalStore(S4,C4,k4),n=_4(e);v.useEffect(()=>{i0()&&window.dispatchEvent(new Event(Dc))},[]);const r=v.useCallback(o=>{const i=w4(o),c=i!==window.location.pathname;c&&window.history.pushState(null,"",i),(i0()||c)&&window.dispatchEvent(new Event(Dc))},[]);return[n,r]}const E4=v.lazy(()=>k0(()=>import("./DashboardLayoutAuto-B4P-sy4z.js"),__vite__mapDeps([0,1]))),ri="dslinter-dashboard-theme";function N4(){if(typeof window>"u")return null;try{const e="dslinter-workbench-theme";let n=localStorage.getItem(ri);if(n==null&&(n=localStorage.getItem(e),(n==="light"||n==="dark")&&(localStorage.setItem(ri,n),localStorage.removeItem(e))),n==="light"||n==="dark")return n;if(n!=null)return localStorage.setItem(ri,"light"),"light"}catch{}return null}function A4(){return N4()??"light"}const tC=v.createContext(null);function j4({children:e}){const[n,r]=v.useState(()=>A4()),o=v.useCallback(c=>{r(c)},[]);v.useEffect(()=>{try{localStorage.setItem(ri,n)}catch{}},[n]),v.useEffect(()=>{const c=u=>{u.key!==ri||u.newValue==null||(u.newValue==="light"||u.newValue==="dark")&&r(u.newValue)};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]);const i=v.useMemo(()=>({theme:n,setTheme:o,resolvedTheme:n}),[n,o]);return g.jsx(tC.Provider,{value:i,children:e})}function Wm(){const e=v.useContext(tC);if(!e)throw new Error("useDashboardTheme must be used within DashboardThemeProvider");return e}function T4({playgroundEntries:e,playgroundJoinSkips:n,tokenCatalog:r,overview:o,reportUrl:i,dslinterReportHint:c,dslinterReport:u}){const[d,p]=$4(),[h,b]=v.useState(!1),[y,_]=v.useState([]),{theme:w,setTheme:S,resolvedTheme:k}=Wm(),$=v.useMemo(()=>Y$(u.report,y),[u.report,y]),E=v.useMemo(()=>gi($),[$]),N=v.useMemo(()=>R0($).flatMap(D=>D.type==="component"?[{name:D.name,label:D.name}]:[{name:T0(D,E),label:D.parent},...D.children.map(P=>({name:P,label:`${D.parent} / ${P}`}))]),[$,E]),j=v.useCallback(H=>{_(D=>D.includes(H)?D:[...D,H]),d.view==="component"&&d.componentId===H&&p({view:"governance"})},[d,p]),z=!u.loading&&u.error==null&&u.report!=null;let G;if(d.view==="tokens")G=g.jsx(OB,{tokenCatalog:r,dslinterReport:u.report});else if(d.view==="governance")G=g.jsx(SB,{landing:o,reportUrl:i,dslinterReportHint:c,dslinterReport:u,onOpenComponent:H=>p({view:"component",componentId:H}),onOpenCatalog:()=>p({view:"catalog"})});else if(d.view==="catalog")G=g.jsx(gB,{landing:o,dslinterReportHint:c,dslinterReport:u,onOpenComponent:H=>p({view:"component",componentId:H}),onBackToGovernance:()=>p({view:"governance"})});else if(d.view==="component"){const H=d.componentId,D=GE(e,H),P=E.includes(H),re=u.report?.playgrounds?.some(se=>se.export_name===H||se.id===H)??!1;D?G=g.jsx(fB,{entry:D,workspaceReport:u.report,reportReady:z,onOpenComponent:se=>p({view:"component",componentId:se}),onHideFromCatalog:j}):P?G=g.jsx(DR,{componentId:H,workspaceReport:u.report,reportReady:z,hasPlaygroundSpec:re,playgroundJoinSkip:sE(n,H),onOpenComponent:se=>p({view:"component",componentId:se}),onHideFromCatalog:j}):G=g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-muted/40 px-8 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Unknown component"}),g.jsxs("p",{className:"max-w-md text-xs text-muted-foreground",children:[g.jsx("span",{className:"font-mono",children:H})," is not in the latest scan catalog."]})]})}return g.jsxs("div",{"data-dashboard-theme":k,className:"flex h-screen min-h-0 bg-background text-foreground",children:[g.jsx(y4,{catalogEntries:N,onNavigate:p,open:h,onOpenChange:b}),g.jsx(NB,{report:$??null,reportLoading:u.loading,reportError:u.error,route:d,onNavigate:p,onOpenCommandPalette:()=>b(!0),theme:w,onThemeChange:S,catalogNames:E}),g.jsx("div",{className:"ml-[240px] flex min-h-0 min-w-0 flex-1 flex-col",children:G})]})}function R4(e){return g.jsx(j4,{children:e.autoPlayground?g.jsx(v.Suspense,{fallback:null,children:g.jsx(E4,{...e})}):g.jsx(T4,{...e,playgroundEntries:e.playgroundEntries??[],playgroundJoinSkips:e.playgroundJoinSkips})})}async function M4(e){const n=await fetch(e,{cache:"no-store"});if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);return n.json()}function O4(e="/dslinter-report.json"){const{reportUrl:n="/dslinter-report.json",watchUrl:r,refreshIntervalMs:o=0}=typeof e=="string"?{reportUrl:e}:e,[i,c]=v.useState(null),[u,d]=v.useState(null),[p,h]=v.useState(!0),b=v.useRef(null),y=v.useRef(!1),_=v.useRef(!1),w=v.useRef(!1),S=(k,$,E)=>{const N=E?.showLoading!==!1;N&&(d(null),h(!0)),M4(k).then(j=>{$.current||c(j)}).catch(j=>{$.current||d(j instanceof Error?j.message:"Failed to load report")}).finally(()=>{!$.current&&N&&h(!1)})};return v.useEffect(()=>(y.current=!1,S(n,y,{showLoading:!0}),()=>{y.current=!0}),[n]),v.useEffect(()=>{if(!r)return;const k=new EventSource(r);return _.current=!1,k.onmessage=$=>{_.current||$.data==="updated"&&S(n,_,{showLoading:!1})},k.onerror=()=>{},()=>{_.current=!0,k.close()}},[r,n]),v.useEffect(()=>{if(r||o<=0)return;w.current=!1;const k=setInterval(async()=>{if(!w.current)try{const $=await fetch(n,{method:"HEAD",cache:"no-store"}),E=$.headers.get("ETag")??$.headers.get("Last-Modified")??null;if(E&&E===b.current)return;b.current=E,S(n,w,{showLoading:!1})}catch{}},o);return()=>{w.current=!0,clearInterval(k)}},[r,o,n]),{report:i,error:u,loading:p}}const D4={colors:[{token:"primary",shade:"DEFAULT",value:"#2563eb",tw:"bg-primary"},{token:"primary",shade:"foreground",value:"#ffffff",tw:"text-primary-foreground"},{token:"surface",shade:"DEFAULT",value:"#f8fafc",tw:"bg-surface"},{token:"surface",shade:"elevated",value:"#ffffff",tw:"bg-surface-elevated"},{token:"surface",shade:"border",value:"#e2e8f0",tw:"border-surface-border"},{token:"danger",shade:"DEFAULT",value:"#dc2626",tw:"text-danger"}],spacing:[{token:"layout-xs",value:"0.5rem",tw:"p-layout-xs"},{token:"layout-sm",value:"1rem",tw:"p-layout-sm"},{token:"layout-md",value:"1.5rem",tw:"p-layout-md"},{token:"layout-lg",value:"2rem",tw:"p-layout-lg"}],radius:[{token:"ds",value:"0.5rem",tw:"rounded-ds"},{token:"ds-lg",value:"0.75rem",tw:"rounded-ds-lg"}],typography:{families:[...QE],sizes:[...WE],weights:[...ZE]}};function B4(){const e=O4({reportUrl:"/dslinter-report.json",watchUrl:"/events",refreshIntervalMs:0});return g.jsx(R4,{autoPlayground:!0,tokenCatalog:D4,dslinterReport:e,dslinterReportHint:"dslinter (watch + serve)"})}j$.createRoot(document.getElementById("root")).render(g.jsx(dt.StrictMode,{children:g.jsx(B4,{})}));export{R4 as D,dt as R,T4 as a,L4 as b,j$ as c,tE as d,z4 as e,QE as f,WE as g,ZE as h,l0 as i,g as j,v as r,O4 as u};
|
|
218
|
+
\v\f
\u2028\u2029])`),n));else if(p==="posix")if(!i&&(b==="graph"||b==="print")){if(o==="strict")throw new Error(`POSIX class "${b}" requires min target ES2024 or non-strict accuracy`);let y={graph:"!-~",print:" -~"}[b];h&&(y=`\0-${ht(y.codePointAt(0)-1)}${ht(y.codePointAt(2)+1)}-`),r(ot(sa(`[${y}]`),n))}else r(ot(cp(sa(ZD.get(b)),h),n));else if(p==="property")Fm.has(fu(b))||(e.key="sc");else if(p==="space")r(Ia(To("space",{negate:h}),n));else if(p==="word")r(ot(cp(sa(oa),h),n));else throw new Error(`Unexpected character set kind "${p}"`)},Directive({node:e,parent:n,root:r,remove:o,replaceWith:i,removeAllPrevSiblings:c,removeAllNextSiblings:u}){const{kind:d,flags:p}=e;if(d==="flags")if(!p.enable&&!p.disable)o();else{const h=wn({flags:p});h.body[0].body=u(),i(ot(h,n),{traverse:!0})}else if(d==="keep"){const h=r.body[0],y=r.body.length===1&&v1(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:r;if(n.parent!==y||y.body.length>1)throw new Error(we`Uses "\K" in a way that's unsupported`);const _=Sr({behind:!0});_.body[0].body=c(),i(ot(_,n))}else throw new Error(`Unexpected directive kind "${d}"`)},Flags({node:e,parent:n}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:n,disable:r}=e.flags;n?.extended&&delete n.extended,r?.extended&&delete r.extended,n?.dotAll&&r?.dotAll&&delete n.dotAll,n?.ignoreCase&&r?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},n){const{kind:r}=e;r==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:e,parent:n,replaceWith:r}){const{kind:o}=e;if(o==="fail")r(ot(Sr({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${o.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const n=wn();n.body[0].body.push(e.body),e.body=ot(n,e)}},Regex:{enter({node:e},{supportedGNodes:n}){const r=[];let o=!1,i=!1;for(const c of e.body)if(c.body.length===1&&c.body[0].kind==="search_start")c.body.pop();else{const u=B1(c.body);u?(o=!0,Array.isArray(u)?r.push(...u):r.push(u)):i=!0}o&&!i&&r.forEach(c=>n.add(c))},exit(e,{accuracy:n,passedLookbehind:r,strategy:o}){if(n==="strict"&&r&&o)throw new Error(we`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:n}){let{ref:r}=e;typeof r=="string"&&!lp(r)&&(r=ip(r,n),e.ref=r)}},t9={Backreference({node:e},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:r}){const{orphan:o,ref:i}=e;o||r.set(e,[...n.get(i).map(({node:c})=>c)])},CapturingGroup:{enter({node:e,parent:n,replaceWith:r,skip:o},{groupOriginByCopy:i,groupsByName:c,multiplexCapturesToLeftByRef:u,openRefs:d,reffedNodesByReferencer:p}){const h=i.get(e);if(h&&d.has(e.number)){const y=Ia(Fv(e.number),n);p.set(y,d.get(e.number)),r(y);return}d.set(e.number,e),u.set(e.number,[]),e.name&&pi(u,e.name,[]);const b=u.get(e.name??e.number);for(let y=0;y<b.length;y++){const _=b[y];if(h===_.node||h&&h===_.origin||e===_.origin){b.splice(y,1);break}}if(u.get(e.number).push({node:e,origin:h}),e.name&&u.get(e.name).push({node:e,origin:h}),e.name){const y=pi(c,e.name,new Map);let _=!1;if(h)_=!0;else for(const w of y.values())if(!w.hasDuplicateNameToRemove){_=!0;break}c.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:n}){n.get(e.number)===e&&n.delete(e.number)}},Group:{enter({node:e},n){n.prevFlags=n.currentFlags,e.flags&&(n.currentFlags=Oc(n.currentFlags,e.flags))},exit(e,n){n.currentFlags=n.prevFlags}},Subroutine({node:e,parent:n,replaceWith:r},o){const{isRecursive:i,ref:c}=e;if(i){let b=n;for(;(b=b.parent)&&!(b.type==="CapturingGroup"&&(b.name===c||b.number===c)););o.reffedNodesByReferencer.set(e,b);return}const u=o.subroutineRefMap.get(c),d=c===0,p=d?Fv(0):M1(u,o.groupOriginByCopy,null);let h=p;if(!d){const b=O1(o9(u,_=>_.type==="Group"&&!!_.flags)),y=b?Oc(o.globalFlags,b):o.globalFlags;a9(y,o.currentFlags)||(h=wn({flags:s9(y)}),h.body[0].body.push(p))}r(ot(h,n),{traverse:!d})}},n9={Backreference({node:e,parent:n,replaceWith:r},o){if(e.orphan){o.highestOrphanBackref=Math.max(o.highestOrphanBackref,e.ref);return}const c=o.reffedNodesByReferencer.get(e).filter(u=>r9(u,e));if(!c.length)r(ot(Sr({negate:!0}),n));else if(c.length>1){const u=wn({atomic:!0,body:c.reverse().map(d=>Mr({body:[Kp(d.number)]}))});r(ot(u,n))}else e.ref=c[0].number},CapturingGroup({node:e},n){e.number=++n.numCapturesToLeft,e.name&&n.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},n){const r=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let o=0;o<r;o++){const i=w1();e.body.at(-1).body.push(i)}}},Subroutine({node:e},n){!e.isRecursive||e.ref===0||(e.ref=n.reffedNodesByReferencer.get(e).number)}};function R1(e){ai(e,{"*"({node:n,parent:r}){n.parent=r}})}function a9(e,n){return e.dotAll===n.dotAll&&e.ignoreCase===n.ignoreCase}function r9(e,n){let r=n;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const o=D1(r.parent);for(const i of o){if(i===r)break;if(i===e||z1(i,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function M1(e,n,r,o){const i=Array.isArray(e)?[]:{};for(const[c,u]of Object.entries(e))c==="parent"?i.parent=Array.isArray(r)?o:r:u&&typeof u=="object"?i[c]=M1(u,n,i,r):(c==="type"&&u==="CapturingGroup"&&n.set(i,n.get(e)??e),i[c]=u);return i}function Fv(e){const n=C1(e);return n.isRecursive=!0,n}function o9(e,n){const r=[];for(;e=e.parent;)(!n||n(e))&&r.push(e);return r}function ip(e,n){if(n.has(e))return n.get(e);const r=`$${n.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(e,r),r}function O1(e){const n=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:o})=>{n.forEach(i=>{o.enable?.[i]&&(delete r.disable[i],r.enable[i]=!0),o.disable?.[i]&&(r.disable[i]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function s9({dotAll:e,ignoreCase:n}){const r={};return(e||n)&&(r.enable={},e&&(r.enable.dotAll=!0),n&&(r.enable.ignoreCase=!0)),(!e||!n)&&(r.disable={},!e&&(r.disable.dotAll=!0),!n&&(r.disable.ignoreCase=!0)),r}function D1(e){if(!e)throw new Error("Node expected");const{body:n}=e;return Array.isArray(n)?n:n?[n]:null}function B1(e){const n=e.find(r=>r.kind==="search_start"||c9(r,{negate:!1})||!i9(r));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const r=[];for(const o of n.body){const i=B1(o.body);if(!i)return null;Array.isArray(i)?r.push(...i):r.push(i)}return r}return null}function z1(e,n){const r=D1(e)??[];for(const o of r)if(o===n||z1(o,n))return!0;return!1}function i9({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function l9(e){const n=["Character","CharacterClass","CharacterSet"];return n.includes(e.type)||e.type==="Quantifier"&&e.min&&n.includes(e.body.type)}function c9(e,n){const r={negate:null,...n};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&v1(e.body[0],{type:"Assertion",kind:"search_start"})}function lp(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function sa(e,n){const o=_1(e,{...n,unicodePropertyMap:Fm}).body;return o.length>1||o[0].body.length>1?wn({body:o}):o[0].body[0]}function cp(e,n){return e.negate=n,e}function Ia(e,n){return e.parent=n,e}function ot(e,n){return R1(e),e.parent=n,e}function u9(e,n){const r=A1(n),o=Qp(r.target,"ES2024"),i=Qp(r.target,"ES2025"),c=r.rules.recursionLimit;if(!Number.isInteger(c)||c<2||c>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,d=null;if(!i){const w=[e.flags.ignoreCase];ai(e,d9,{getCurrentModI:()=>w.at(-1),popModI(){w.pop()},pushModI(S){w.push(S)},setHasCasedChar(){w.at(-1)?u=!0:d=!0}})}const p={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!d)};let h=e;const b={accuracy:r.accuracy,appliedGlobalFlags:p,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:c,useAppliedIgnoreCase:!!(!i&&u&&d),useFlagMods:i,useFlagV:o,verbose:r.verbose};function y(w){return b.lastNode=h,h=w,FD(f9[w.type],`Unexpected node type "${w.type}"`)(w,b,y)}const _={pattern:e.body.map(y).join("|"),flags:y(e.flags),options:{...e.options}};return o||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],b.captureMap.forEach((w,S)=>{w.hidden&&_._hiddenCaptures.push(S),w.transferTo&&pi(_._captureTransfers,w.transferTo,[]).push(S)}),_}var d9={"*":{enter({node:e},n){if(Vv(e)){const r=n.getCurrentModI();n.pushModI(e.flags?Oc({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},n){Vv(e)&&n.popModI()}},Backreference(e,n){n.setHasCasedChar()},Character({node:e},n){qm(ht(e.value))&&n.setHasCasedChar()},CharacterClassRange({node:e,skip:n},r){n(),L1(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},n){e.kind==="property"&&T1.has(e.value)&&n.setHasCasedChar()}},f9={Alternative({body:e},n,r){return e.map(r).join("")},Assertion({kind:e,negate:n}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return n?we`\B`:we`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},n){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,n,r){const{body:o,name:i,number:c}=e,u={ignoreCase:n.currentFlags.ignoreCase},d=n.originMap.get(e);return d&&(u.hidden=!0,c>d.number&&(u.transferTo=d.number)),n.captureMap.set(c,u),`(${i?`?<${i}>`:""}${o.map(r).join("|")})`},Character({value:e},n){const r=ht(e),o=Ao(e,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(o!==r)return o;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&qm(r)){const i=j1(r);return n.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return r},CharacterClass(e,n,r){const{kind:o,negate:i,parent:c}=e;let{body:u}=e;if(o==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Sn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&u.some(Yv)&&(u=[du(45),...u.filter(h=>!Yv(h))]);const d=()=>`[${i?"^":""}${u.map(r).join(o==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||Sn.bugNestedClassIgnoresNegation)&&!i){const b=u.filter(y=>y.type==="CharacterClass"&&y.kind==="union"&&y.negate);if(b.length){const y=wn(),_=y.body[0];return y.parent=c,_.parent=y,u=u.filter(w=>!b.includes(w)),e.body=u,u.length?(e.parent=_,_.body.push(e)):y.body.pop(),b.forEach(w=>{const S=Mr({body:[w]});w.parent=S,S.parent=y,y.body.push(S)}),r(y)}}n.inCharClass=!0;const h=d();return n.inCharClass=!1,h}const p=u[0];if(o==="union"&&!i&&p&&((!n.useFlagV||!n.verbose)&&c.kind==="union"&&!(Sn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&c.kind==="intersection"&&u.length===1&&p.type!=="CharacterClassRange"))return u.map(r).join("");if(!n.useFlagV&&c.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return d()},CharacterClassRange(e,n){const r=e.min.value,o=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},c=Ao(r,i),u=Ao(o,i),d=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const p=L1(e);b9(p).forEach(b=>{d.add(Array.isArray(b)?`${Ao(b[0],i)}-${Ao(b[1],i)}`:Ao(b,i))})}return`${c}-${u}${[...d].join("")}`},CharacterSet({kind:e,negate:n,value:r,key:o},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":we`[^\n]`;if(e==="digit")return n?we`\D`:we`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&T1.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${n?we`\P`:we`\p`}{${o?`${o}=`:""}${r}}`}if(e==="word")return n?we`\W`:we`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:n,flags:r,parent:o},i,c){const u=i.currentFlags;r&&(i.currentFlags=Oc(u,r));const d=n.map(c).join("|"),p=!i.verbose&&n.length===1&&o.type!=="Quantifier"&&!e&&(!i.useFlagMods||!r)?d:`(?${y9(e,r,i.useFlagMods)}${d})`;return i.currentFlags=u,p},LookaroundAssertion({body:e,kind:n,negate:r},o,i){return`(?${`${n==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,n,r){return r(e.body)+x9(e)},Subroutine({isRecursive:e,ref:n},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const o=r.recursionLimit;return n===0?`(?R=${o})`:we`\g<${n}&R=${o}>`}},p9=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),m9=new Set(["-","\\","]","^","["]),h9=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),qv=new Map([[9,we`\t`],[10,we`\n`],[11,we`\v`],[12,we`\f`],[13,we`\r`],[8232,we`\u2028`],[8233,we`\u2029`],[65279,we`\uFEFF`]]),g9=new RegExp("^\\p{Cased}$","u");function qm(e){return g9.test(e)}function L1(e,n){const r=!!n?.firstOnly,o=e.min.value,i=e.max.value,c=[];if(o<65&&(i===65535||i>=131071)||o===65536&&i>=131071)return c;for(let u=o;u<=i;u++){const d=ht(u);if(!qm(d))continue;const p=j1(d).filter(h=>{const b=h.codePointAt(0);return b<o||b>i});if(p.length&&(c.push(...p),r))break}return c}function Ao(e,{escDigit:n,inCharClass:r,useFlagV:o}){if(qv.has(e))return qv.get(e);if(e<32||e>126&&e<160||e>262143||n&&v9(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=r?o?h9:m9:p9,c=ht(e);return(i.has(c)?"\\":"")+c}function b9(e){const n=e.map(i=>i.codePointAt(0)).sort((i,c)=>i-c),r=[];let o=null;for(let i=0;i<n.length;i++)n[i+1]===n[i]+1?o??=n[i]:o===null?r.push(n[i]):(r.push([o,n[i]]),o=null);return r}function y9(e,n,r){if(e)return">";let o="";if(n&&r){const{enable:i,disable:c}=n;o=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(c?"-":"")+(c?.ignoreCase?"i":"")+(c?.dotAll?"s":"")}return`${o}:`}function x9({kind:e,max:n,min:r}){let o;return!r&&n===1?o="?":!r&&n===1/0?o="*":r===1&&n===1/0?o="+":r===n?o=`{${r}}`:o=`{${r},${n===1/0?"":n}}`,o+{greedy:"",lazy:"?",possessive:"+"}[e]}function Vv({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function v9(e){return e>47&&e<58}function Yv({type:e,value:n}){return e==="Character"&&n===45}var _9=class Jp extends RegExp{#t=new Map;#e=null;#a;#n=null;#r=null;rawOptions={};get source(){return this.#a||"(?:)"}constructor(n,r,o){const i=!!o?.lazyCompile;if(n instanceof RegExp){if(o)throw new Error("Cannot provide options when copying a regexp");const c=n;super(c,r),this.#a=c.source,c instanceof Jp&&(this.#t=c.#t,this.#n=c.#n,this.#r=c.#r,this.rawOptions=c.rawOptions)}else{const c={hiddenCaptures:[],strategy:null,transfers:[],...o};super(i?"":n,r),this.#a=n,this.#t=S9(c.hiddenCaptures,c.transfers),this.#r=c.strategy,this.rawOptions=o??{}}i||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:i,...c}=this.rawOptions;this.#e=new Jp(this.#a,this.flags,c)}const r=this.global||this.sticky,o=this.lastIndex;if(this.#r==="clip_search"&&r&&o){this.lastIndex=0;const i=this.#o(n.slice(o));return i&&(w9(i,o,n,this.hasIndices),this.lastIndex+=o),i}return this.#o(n)}#o(n){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const o=[...r];r.length=1;let i;this.hasIndices&&(i=[...r.indices],r.indices.length=1);const c=[0];for(let u=1;u<o.length;u++){const{hidden:d,transferTo:p}=this.#t.get(u)??{};if(d?c.push(null):(c.push(r.length),r.push(o[u]),this.hasIndices&&r.indices.push(i[u])),p&&o[u]!==void 0){const h=c[p];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=o[u],this.hasIndices&&(r.indices[h]=i[u]),r.groups){this.#n||(this.#n=C9(this.source));const b=this.#n.get(p);b&&(r.groups[b]=o[u],this.hasIndices&&(r.indices.groups[b]=i[u]))}}}return r}};function w9(e,n,r,o){if(e.index+=n,e.input=r,o){const i=e.indices;for(let u=0;u<i.length;u++){const d=i[u];d&&(i[u]=[d[0]+n,d[1]+n])}const c=i.groups;c&&Object.keys(c).forEach(u=>{const d=c[u];d&&(c[u]=[d[0]+n,d[1]+n])})}}function S9(e,n){const r=new Map;for(const o of e)r.set(o,{hidden:!0});for(const[o,i]of n)for(const c of i)pi(r,c,{}).transferTo=o;return r}function C9(e){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let o=0,i=0,c;for(;c=n.exec(e);){const{0:u,groups:{capture:d,name:p}}=c;u==="["?o++:o?u==="]"&&o--:d&&(i++,p&&r.set(i,p))}return r}function k9(e,n){const r=$9(e,n);return r.options?new _9(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function $9(e,n){const r=A1(n),o=_1(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Fm}),i=JD(o,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),c=u9(i,r),u=GD(c.pattern,{captureTransfers:c._captureTransfers,hiddenCaptures:c._hiddenCaptures,mode:"external"}),d=PD(u.pattern),p=UD(d.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),h={pattern:p.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${c.flags}${c.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const b=p.hiddenCaptures.sort((S,k)=>S-k),y=Array.from(p.captureTransfers),_=i._strategy,w=h.pattern.length>=r.lazyCompileLength;(b.length||y.length||_||w)&&(h.options={...b.length&&{hiddenCaptures:b},...y.length&&{transfers:y},..._&&{strategy:_},...w&&{lazyCompile:w}})}return h}function E9(e,n){return k9(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function N9(e={}){const n=Object.assign({target:"auto",cache:new Map},e);return n.regexConstructor||=r=>E9(r,{target:n.target}),{createScanner(r){return new H3(r,n)},createString(r){return{content:r}}}}const A9={light:"github-light",dark:"github-dark"},j9="tsx";let up=null;function T9(){return up==null&&(up=G3({themes:[eM,JR],langs:[QR],engine:N9()})),up}function R9(e){if(e?.aborted)throw new DOMException("Aborted","AbortError")}async function M9(e,n,r){const o=await T9();return R9(r),o.codeToHtml(e,{lang:j9,theme:A9[n]})}const Xv="playground-usage-shiki mt-4 overflow-x-auto rounded-lg border border-border p-4 text-sm leading-relaxed text-foreground [&_.shiki]:!bg-transparent [&_pre.shiki]:!m-0 [&_pre.shiki]:!bg-transparent [&_pre.shiki]:!p-0",O9="m-0 whitespace-pre font-mono text-sm leading-relaxed text-foreground";function D9({source:e}){const{theme:n}=Wm(),[r,o]=v.useState(null),i=v.useRef(0);return v.useEffect(()=>{const c=++i.current,u=new AbortController;return o(null),(async()=>{try{const d=await M9(e,n,u.signal);if(c!==i.current)return;o(d)}catch(d){if(d.name==="AbortError"||c!==i.current)return;o(null)}})(),()=>u.abort()},[e,n]),r?g.jsx("div",{className:Xv,dangerouslySetInnerHTML:{__html:r}}):g.jsx("pre",{className:Xv,children:g.jsx("code",{className:O9,children:e})})}function B9({entry:e,values:n}){const r=e.usageSnippet?.(n)??`<${e.id} />`;return g.jsx(fn,{id:"usage",title:"Usage",children:g.jsx(D9,{source:r})})}function z9({findings:e,reportReady:n}){return g.jsx(g.Fragment,{children:n&&e.length>0?g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:e.map((r,o)=>g.jsxs(ft,{children:[g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:r.rule_id}),g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:r.line??"—"}),g.jsx(Pe,{children:g.jsx(Er,{variant:"secondary",size:"sm",children:r.severity})}),g.jsx(Pe,{children:r.message})]},`${r.rule_id}-${r.line??"x"}-${o}`))})]}):n&&e.length===0?g.jsx(Nr,{children:"No hardcoded or arbitrary token color findings on this file in the current report."}):g.jsxs(Nr,{children:["Token findings update when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function L9({codeScore:e,reportReady:n}){const{findings:r}=e,o=n&&r.length>0;return g.jsx(g.Fragment,{children:o?g.jsx(g.Fragment,{children:g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:r.map((i,c)=>g.jsxs(ft,{children:[g.jsx(Pe,{children:i.rule_id}),g.jsx(Pe,{children:i.line??"—"}),g.jsx(Pe,{children:i.severity}),g.jsx(Pe,{children:i.message})]},`${i.rule_id}-${i.line??"x"}-${c}`))})]})}):n&&r.length===0?g.jsx(Nr,{children:"No quality findings on this file in the current report."}):g.jsxs(Nr,{children:["Code score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function U9({a11y:e,reportReady:n,variantScanPending:r=!1}){const o=n&&e.findings.length>0,i=e.findings.some(c=>c.variant_label!=null&&c.variant_label!=="");return g.jsx(g.Fragment,{children:o?g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[i?g.jsx(Ue,{children:"Variant"}):null,g.jsx(Ue,{children:"Rule"}),g.jsx(Ue,{children:"Line"}),g.jsx(Ue,{children:"Severity"}),g.jsx(Ue,{children:"Message"})]})}),g.jsx(Ln,{children:e.findings.map((c,u)=>g.jsxs(ft,{children:[i?g.jsx(Pe,{className:"font-mono text-xs text-muted-foreground",children:c.variant_label??"—"}):null,g.jsx(Pe,{children:c.rule_id}),g.jsx(Pe,{children:c.line??"—"}),g.jsx(Pe,{children:c.severity}),g.jsx(Pe,{children:c.message})]},`${c.rule_id}-${c.line??"x"}-${c.variant_label??""}-${u}`))})]}):n&&e.issueCount===0?g.jsx(Nr,{children:r?"Scanning variant previews for color contrast…":"No accessibility findings on this file or its variant previews in the current report."}):g.jsxs(Nr,{children:["A11y score updates when"," ",g.jsx("span",{className:"font-mono",children:"dslinter-report.json"})," is available (same fetch as Governance)."]})})}function P9({controls:e,values:n,onChange:r,onReset:o,declaredPropsFromScan:i=[],governanceReportLoaded:c=!1}){if(e.length===0)return null;const u=v.useCallback((p,h)=>{r(b=>({...b,[p]:h}))},[r]),d=FR(e);return g.jsx(fn,{id:"api-reference",title:"API reference",actions:g.jsx(ru,{type:"button",variant:"outline",size:"sm",onClick:o,children:"Reset defaults"}),children:g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{children:"Prop"}),g.jsx(Ue,{children:"Type"}),g.jsx(Ue,{children:"Value"})]})}),g.jsx(Ln,{children:e.map(p=>{const h=d.find(b=>b.prop===p.key);return h?g.jsxs(ft,{children:[g.jsx(Pe,{className:"font-medium",children:h.prop}),g.jsx(Pe,{children:p.type==="select"?g.jsx("div",{className:"flex flex-wrap items-center gap-1",children:p.options.map(b=>{const _=String(n[p.key]??p.default??"")===b.value;return g.jsx(Er,{variant:"outline",size:"sm",asChild:!0,className:xe(_&&"border-transparent bg-primary text-primary-foreground hover:bg-primary/90"),children:g.jsx("button",{type:"button",className:"cursor-pointer",onClick:()=>u(p.key,b.value),"aria-pressed":_,"aria-label":`Set ${p.label} to ${b.label}`,children:b.value})},b.value)})}):g.jsxs("span",{className:"font-mono text-xs flex items-center gap-1",children:[h.type,h.defaultBadge?g.jsx(Er,{variant:"secondary",size:"sm",children:h.defaultBadge}):null]})}),g.jsx(Pe,{children:g.jsx(WR,{control:p,values:n,patch:u,idPrefix:"api",layout:"table"})})]},h.prop):null})})]})})}const I9=["dashboard-theme.css","dslinter/theme.css"];function G9(e){const n=e.replace(/\\/g,"/");return I9.some(r=>n.includes(r))}function U1(e,n){if(G9(e.path))return!1;const r=e.path.replace(/\\/g,"/");if(r.includes("/packages/dashboard/"))return!1;if(n){const o=n.replace(/\\/g,"/").replace(/\/$/,"");if(r.startsWith(o))return!0}return/(?:^|\/)(resources\/css|src\/|app\/|styles\/)/.test(r)}function Kv(e,n,r){const o=n==="light"?new Set(["root","theme"]):new Set(["selector"]),i=new Map;for(const c of e)U1(c,r)&&o.has(c.scope)&&(i.has(c.name)||i.set(c.name,c.value));return i}function Wv(e){const n=new Map,r=/var\(\s*(--[a-zA-Z0-9_-]+)(?:\s*,[^)]+)?\s*\)/g,o=(i,c)=>{const u=n.get(i);if(u!=null)return u;const d=e.get(i);if(d==null)return`var(${i})`;if(c.has(i))return d;c.add(i);const p=d.replace(r,(h,b)=>e.has(b)?o(b,c):`var(${b})`);return c.delete(i),n.set(i,p),p};for(const i of e.keys())o(i,new Set);return Object.fromEntries(n)}function H9(e,n){const r=e?.definitions;if(!r?.length)return null;const o=Wv(Kv(r,"light",n)),i=Wv(Kv(r,"dark",n)),c=[...new Set(r.filter(p=>U1(p,n)).map(p=>p.path.replace(/\\/g,"/")))].sort(),u=Object.keys(o).some(p=>!p.startsWith("--color-")&&!p.startsWith("--spacing-")),d=Object.keys(i).some(p=>!p.startsWith("--color-")&&!p.startsWith("--spacing-"));return!u&&!d?null:{light:o,dark:i,sourcePaths:c}}function F9(e){return e?.css_tokens?H9(e.css_tokens,e.root):null}function q9(e,n){return n==="dark"&&Object.keys(e.dark).length>0?{...e.light,...e.dark}:e.light}const V9=v.forwardRef(function({children:n,workspaceReport:r,className:o},i){const{resolvedTheme:c}=Wm(),u=v.useMemo(()=>F9(r),[r]),d=c==="dark",p=u!=null&&Object.keys(u.dark).length>0;if(!u)return g.jsx("div",{ref:i,className:xe(d&&"dark",o),"data-app-preview-theme":c,children:n});if(d&&!p)return g.jsx("div",{ref:i,className:xe("ds-playground-app-preview",o),"data-app-preview-theme":c,children:n});const y={...q9(u,d?"dark":"light"),colorScheme:d&&p?"dark":"light"};return g.jsx("div",{ref:i,className:xe("ds-playground-app-preview",d&&"dark",o),style:y,"data-app-preview-theme":c,children:n})});class Y9 extends v.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){}componentDidUpdate(n){n.children!==this.props.children&&this.state.error&&this.setState({error:null})}render(){if(this.state.error){const n=this.props.componentName??"Component";return g.jsxs("div",{className:"rounded-md border border-border bg-muted/40 px-4 py-6 text-sm text-muted-foreground",children:[g.jsxs("p",{className:"font-medium text-foreground",children:["Preview could not render ",n]}),g.jsx("p",{className:"mt-2",children:"This component may need Inertia page props, a provider, or other app context. The scanner snapshot and governance panels still reflect static analysis."}),g.jsx("p",{className:"mt-2 font-mono text-xs",children:this.state.error.message})]})}return this.props.children}}const Zv=4;function X9(e){return e===void 0?"?":typeof e=="string"?e:JSON.stringify(e)}function K9(e,n){return n.map(r=>`${r}=${X9(e[r])}`).join(" ")}function W9(e){return e==="critical"||e==="serious"?"error":e==="moderate"?"warning":"info"}async function Z9(){return(await k0(()=>import("./axe-DHHCqGjV.js").then(n=>n.a),[])).default}async function Q9(e,n){const o=await(await Z9()).run(e,{runOnly:{type:"rule",values:["color-contrast"]}}),i=[];for(const c of o.violations){const u=W9(c.impact),d=c.help||c.description;for(const p of c.nodes)i.push({rule_id:`a11y-playground-${c.id}`,message:p.failureSummary?`${d} (${p.failureSummary})`:d,path:"",line:null,severity:u,variant_label:n})}return i}async function J9(e){const n=[];for(let r=0;r<e.length;r+=Zv){const o=e.slice(r,r+Zv),i=await Promise.all(o.map(({element:c,combo:u,axisKeys:d})=>Q9(c,K9(u,d))));n.push(...i.flat())}return n}function P1(e,n){return[...e,...n]}function eB(e,n){return wS(P1(e,n))}const em=200;function tB(e){const n=[];for(const r of e)r.type==="boolean"?n.push({key:r.key,values:[!1,!0]}):r.type==="select"&&r.options.length>0&&n.push({key:r.key,values:r.options.map(o=>o.value)});return n}function nB(e,n){const r=tB(e);if(r.length===0)return{combinations:[],totalCount:0,capped:!1,finiteAxisKeys:[]};let o=1;for(const p of r)o*=p.values.length;const i=r.map(p=>p.key),c=[],u=o>em,d=(p,h)=>{if(c.length>=em)return;if(p>=r.length){c.push({...h});return}const b=r[p];for(const y of b.values)d(p+1,{...h,[b.key]:y})};return d(0,{...n}),{combinations:c,totalCount:o,capped:u,finiteAxisKeys:i}}function I1(e){return typeof e=="string"?e:JSON.stringify(e)}function Qv(e,n){return n.map(r=>`${r}:${I1(e[r]??"")}`).join("|")}function aB({renderPreview:e,combinations:n,finiteAxisKeys:r,totalCount:o,capped:i,onVariantA11yScan:c}){const u=v.useRef(new Map),d=n.filter(y=>y.asChild!==!0),p=r.filter(y=>y!=="asChild"),b=r.includes("asChild")?Math.ceil(o/2):o;return v.useEffect(()=>{if(!c||d.length===0)return;let y=!1;const _=requestAnimationFrame(()=>{(async()=>{if(await new Promise(S=>{requestAnimationFrame(()=>S())}),y)return;const w=d.flatMap(S=>{const k=Qv(S,p),$=u.current.get(k);return $?[{element:$,combo:S,axisKeys:p}]:[]});if(w.length===0){y||c([]);return}try{const S=await J9(w);y||c(S)}catch{y||c([])}})()});return()=>{y=!0,cancelAnimationFrame(_)}},[c,d,p]),d.length===0?null:g.jsxs(g.Fragment,{children:[i?g.jsxs("p",{className:"rounded-md border border-border px-3 py-2 text-sm text-muted-foreground",children:["Showing ",d.length," of ",b," ","combinations (limit ",em,"). Reduce select options or split controls to preview more here."]}):null,g.jsx("div",{className:"mt-4 flex flex-col gap-4",children:d.map(y=>{const _=Qv(y,p);return g.jsxs("div",{className:"flex min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-card text-card-foreground shadow-xs",children:[g.jsx("div",{className:"flex flex-wrap gap-1 border-b p-2",children:p.map(w=>{const S=y[w];return g.jsxs(Er,{variant:"outline",size:"sm",className:"font-mono text-xs",children:[w,"=",S===void 0?"?":I1(S)]},w)})}),g.jsx("div",{ref:w=>{w?u.current.set(_,w):u.current.delete(_)},className:"min-w-0 p-3",children:e(y)})]},_)})})]})}function rB({filePath:e,line:n}){const[r,o]=v.useState(!1),i=v.useCallback(async()=>{o(!0);try{await n_(e,n)}catch(c){const u=c instanceof Error?c.message:String(c);window.alert(`Could not open file: ${u}`)}finally{o(!1)}},[e,n]);return g.jsx(ru,{type:"button",size:"sm",variant:"outline",disabled:r,onClick:()=>{i()},children:r?"Opening…":"Open in Editor"})}function oB(e){return e>=90?"good":e>=50?"average":"poor"}const sB={good:{stroke:"stroke-success",track:"stroke-success/15",text:"text-success"},average:{stroke:"stroke-warning",track:"stroke-warning/15",text:"text-warning"},poor:{stroke:"stroke-destructive",track:"stroke-destructive/15",text:"text-destructive"}},iB={stroke:"stroke-muted-foreground",track:"stroke-border",text:"text-muted-foreground"},vn=56,dp=4;function lB(e,n){if(n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey)return;const r=e.startsWith("#")?e.slice(1):e,o=r?document.getElementById(r):null;o&&(n.preventDefault(),o.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${r}`))}function Jv({label:e,value:n,href:r,pending:o=!1,className:i}){const c=(vn-dp)/2,u=2*Math.PI*c,d=n==null?0:Math.max(0,Math.min(100,Math.round(n))),p=n==null?iB:sB[oB(d)],h=n==null?u:u-d/100*u,b=g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"relative shrink-0",style:{width:vn,height:vn},"aria-hidden":!0,children:[g.jsxs("svg",{width:vn,height:vn,viewBox:`0 0 ${vn} ${vn}`,className:"-rotate-90",fill:"none",children:[g.jsx("circle",{cx:vn/2,cy:vn/2,r:c,className:xe("fill-none",p.track),strokeWidth:dp}),n!=null?g.jsx("circle",{cx:vn/2,cy:vn/2,r:c,className:xe("fill-none",p.stroke),strokeWidth:dp,strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:h}):null]}),g.jsx("span",{className:xe("absolute inset-0 flex items-center justify-center text-base font-semibold tabular-nums",p.text),children:n==null?"—":d})]}),g.jsxs("span",{className:"mt-1 max-w-22 text-center text-xs leading-tight text-muted-foreground",children:[e,o?"…":null]})]}),y=xe("flex flex-col items-center gap-0",r&&"rounded-lg transition hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",i);return r?g.jsx("a",{href:r,onClick:_=>lB(r,_),className:y,"aria-label":n==null?`${e}: not available`:`${e}: ${d} out of 100${o?", updating":""}`,children:b}):g.jsx("div",{className:y,role:"img","aria-label":n==null?`${e}: not available`:`${e}: ${d} out of 100${o?", updating":""}`,children:b})}const cB=280,e0=1024;function Oo(e,n){if(!Number.isFinite(n)||n<=0)return e;const r=Math.min(cB,n);return Math.min(Math.max(e,r),n)}function uB(e,n,r){return n<=0?Oo(r,r):r<n?Oo(e,r):Math.abs(e-n)<=2?Oo(r,r):Oo(e,r)}function t0({side:e,onPointerDown:n}){const r=e==="left"?"left-0 -translate-x-1/2":"right-0 translate-x-1/2";return g.jsx("button",{type:"button",className:`absolute top-0 bottom-0 z-10 flex w-4 ${r} cursor-ew-resize touch-none items-center justify-center rounded border-0 bg-muted p-0 shadow-xs ring-1 ring-border hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":"Resize preview from center (drag left or right)",onPointerDown:n,children:g.jsx("span",{className:"h-10 w-px rounded-full bg-muted-foreground/40","aria-hidden":!0})})}function dB({href:e,children:n}){const r=o=>{if(o.defaultPrevented||o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)return;const i=e.startsWith("#")?e.slice(1):e,c=i?document.getElementById(i):null;c&&(o.preventDefault(),c.scrollIntoView({behavior:"smooth",block:"start"}),typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${i}`))};return g.jsx("a",{href:e,onClick:r,className:"block rounded-md py-1 text-muted-foreground transition hover:bg-accent hover:text-accent-foreground",children:n})}function fB({entry:e,workspaceReport:n,reportReady:r,onOpenComponent:o,onHideFromCatalog:i}){const{renderPreview:c}=e,u=n?.root?CN(n.root,e.modulePath):void 0,[d,p]=v.useState(()=>Bf(e.controls));v.useEffect(()=>{p(Bf(e.controls))},[e.id]);const h=v.useMemo(()=>zR(r?n:null,e.modulePath),[n,e.modulePath,r]),b=v.useMemo(()=>IR(r?n:null,e.modulePath),[n,e.modulePath,r]),y=v.useMemo(()=>UR(r?n:null,e.modulePath),[n,e.modulePath,r]),_=v.useMemo(()=>{if(!(!r||!n))return hi(n).get(e.id)},[n,e.id,r]),w=v.useMemo(()=>!r||!n?[]:im(n).get(e.id)??[],[n,e.id,r]),S=v.useRef(null),k=v.useRef(null),$=v.useRef(null),E=v.useRef(e0),N=v.useRef(0),[j,z]=v.useState(0),[G,H]=v.useState(e0),[D,P]=v.useState(null),[re,se]=v.useState(null);v.useEffect(()=>{E.current=G},[G]);const de=v.useCallback(he=>{const Ne=Oo(he,N.current);E.current=Ne;const Ge=k.current;Ge&&(Ge.style.width=`${Ne}px`);const Ut=$.current;return Ut&&(Ut.textContent=`${Math.round(Ne)}px`),Ne},[]),oe=v.useCallback(he=>{if(!Number.isFinite(he)||he<=0)return;const Ne=N.current;N.current=he,z(he),H(Ge=>uB(Ge,Ne,he))},[]);v.useLayoutEffect(()=>{const he=S.current;if(!he)return;const Ne=new ResizeObserver(()=>{oe(he.clientWidth)});return Ne.observe(he),oe(he.clientWidth),()=>Ne.disconnect()},[oe]);const be=v.useCallback(()=>{P(fN());const he=k.current;se(he?pN(he):null)},[]);v.useLayoutEffect(()=>{const he=k.current;if(!he)return;const Ne=new ResizeObserver(()=>{be()});return Ne.observe(he),be(),()=>Ne.disconnect()},[be]),v.useEffect(()=>(be(),window.addEventListener("resize",be),()=>window.removeEventListener("resize",be)),[be]);const le=v.useCallback(he=>Ne=>{if(Ne.button!==0)return;Ne.preventDefault();const Ge=Ne.currentTarget;Ge.setPointerCapture(Ne.pointerId);let Ut=Ne.clientX,Jt=E.current,gn=0;const Ci=he==="right"?1:-1,Zo=document.body.style.cursor,Qo=document.body.style.userSelect;document.body.style.cursor="ew-resize",document.body.style.userSelect="none";const Jo=()=>{gn=0,de(Jt)},ki=bt=>{const gu=bt.clientX-Ut;Ut=bt.clientX,Jt=Oo(Jt+Ci*2*gu,N.current),gn||(gn=requestAnimationFrame(Jo))},Ur=bt=>{gn&&(cancelAnimationFrame(gn),de(Jt)),H(E.current),document.body.style.cursor=Zo,document.body.style.userSelect=Qo,Ge.releasePointerCapture(bt.pointerId),window.removeEventListener("pointermove",ki),window.removeEventListener("pointerup",Ur),window.removeEventListener("pointercancel",Ur)};window.addEventListener("pointermove",ki),window.addEventListener("pointerup",Ur),window.addEventListener("pointercancel",Ur)},[de]),pe=e.controls.length>0,O=v.useMemo(()=>nB(e.controls,d),[e.controls,d]),X=pe&&(O.combinations.length>0||O.totalCount===0),[J,fe]=v.useState([]),[ee,T]=v.useState(!1);v.useEffect(()=>{fe([]),T(!1)},[e.id,O.combinations]);const R=v.useCallback(he=>{fe(he),T(!0)},[]),q=v.useMemo(()=>{const he=P1(h.findings,J);return{...h,findings:he,issueCount:he.length,score:eB(h.findings,J)}},[h,J]),Y=O.combinations.length>0&&!ee,te=r||ee?`${q.score}/100${Y?"…":""}`:"—",Z=r?n:null,ge=v.useMemo(()=>M0(Z,e.id),[Z,e.id]),ae=O0(ge,e.id),ke=()=>p(Bf(e.controls)),Re=[{href:"#api-reference",label:"API reference",show:pe},{href:"#usage",label:"Usage"},{href:"#subcomponents",label:"Subcomponents",show:ae.length>0},{href:"#repo-usage",label:"Repo usage"},{href:"#design-tokens",label:"Design tokens"},{href:"#code-score",label:"Code score"},{href:"#accessibility",label:"Accessibility"},{href:"#variants",label:"Variants",show:X}];return g.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[g.jsxs("header",{id:"source",className:"scroll-mt-20 border-b border-border bg-card p-6 flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"text-sm font-medium text-muted-foreground",children:["Components",e.meta.group?g.jsxs(g.Fragment,{children:[" ",g.jsx("span",{className:"text-muted-foreground/40",children:"/"})," ",g.jsx("span",{className:"capitalize text-foreground/80",children:e.meta.group})]}):null]}),g.jsx("h1",{className:"text-3xl font-semibold tracking-tight text-foreground",children:e.meta.title})]}),g.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-4",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u?g.jsx(rB,{filePath:u}):null,i?g.jsx(_S,{componentName:e.meta.id,onHidden:i}):null]}),g.jsxs("div",{className:"flex items-start gap-5",children:[g.jsx(Jv,{label:"Code score",value:r?y.score:null,href:"#code-score"}),g.jsx(Jv,{label:"Accessibility",value:r||ee?q.score:null,href:"#accessibility",pending:Y})]})]})]}),g.jsx("section",{id:"examples",className:"ds-playground-dot-surface border-b px-16 py-10",children:g.jsxs("div",{ref:S,children:[g.jsx("div",{className:"flex justify-center",children:g.jsxs("div",{ref:k,className:"relative min-w-0 shrink-0 select-none rounded-lg border border-border bg-background shadow-xs will-change-[width]",style:{width:G},children:[g.jsx(t0,{side:"left",onPointerDown:le("left")}),g.jsx(t0,{side:"right",onPointerDown:le("right")}),g.jsx(V9,{workspaceReport:Z,className:"min-w-0 p-8",children:g.jsx(Y9,{componentName:e.meta.title,children:c(d)})})]})}),j>0?g.jsxs("div",{className:"mx-auto mt-4 flex h-6 w-fit items-center overflow-hidden rounded-sm border border-border bg-card text-center font-mono text-xs/none tabular-nums text-muted-foreground divide-x divide-border",children:[g.jsxs("span",{ref:$,className:"p-2.5",children:[Math.round(G),"px"]}),g.jsxs("span",{className:"p-2.5",title:"usemods detectBreakpoint",children:["Screen: ",D??"—"]}),g.jsxs("span",{className:"p-2.5",title:"usemods detectContainerBreakpoint",children:["Container: ",re??"—"]})]}):null]})}),g.jsx("div",{className:"min-w-0 w-full px-6 py-10 lg:px-12",children:g.jsxs("div",{className:"xl:grid xl:grid-cols-[minmax(0,1fr)_12rem] xl:gap-14",children:[g.jsxs("div",{className:"min-w-0 space-y-14",children:[pe?g.jsx(P9,{entry:e,controls:e.controls,values:d,onChange:p,onReset:ke,reportUsage:_,declaredPropsFromScan:w,governanceReportLoaded:Z!=null}):null,g.jsx(B9,{entry:e,values:d}),g.jsx(fn,{id:"repo-usage",title:"Repo usage",description:"",children:g.jsx(a_,{report:Z,componentId:e.id})}),g.jsx(fn,{id:"design-tokens",title:"Design tokens and colors",description:"Hardcoded colors and non-token styling flagged by DSLinter for this module's source file.",children:g.jsx(z9,{findings:b,reportReady:r})}),g.jsx(fn,{id:"code-score",title:`Code score: ${r?y.score:"—"}/100`,description:"Static quality rules and findings from the workspace DSLinter report scoped to this file.",children:g.jsx(L9,{codeScore:y,reportReady:r})}),g.jsx(fn,{id:"accessibility",title:`Accessibility: ${te}`,description:"Static accessibility rules from the DSLinter report, plus runtime color-contrast checks on each variant preview below.",children:g.jsx(U9,{a11y:q,reportReady:r||ee,variantScanPending:Y})})]}),g.jsx("aside",{className:"mt-12 hidden self-start sticky top-8 xl:mt-0 xl:block",children:g.jsxs("nav",{"aria-label":"On this page",className:"space-y-0.5 border-l border-border pl-4 text-sm",children:[g.jsx("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"On this page"}),Re.map(({href:he,label:Ne,show:Ge=!0})=>Ge?g.jsx(dB,{href:he,children:Ne},he):null)]})})]})}),O.combinations.length>0?g.jsx("section",{id:"variants",className:"ds-playground-dot-surface mt-8 w-full scroll-mt-20 border-t pt-10 pb-12",children:g.jsxs("div",{className:"min-w-0 w-full px-6 lg:px-12",children:[g.jsx("h2",{className:"w-fit bg-card text-xl font-semibold tracking-tight text-foreground",children:"All variants"}),g.jsx(aB,{renderPreview:c,combinations:O.combinations,finiteAxisKeys:O.finiteAxisKeys,totalCount:O.totalCount,capped:O.capped,onVariantA11yScan:R})]})}):null]})})}function Vm({...e}){return g.jsx(VT,{"data-slot":"hover-card",...e})}function Ym({...e}){return g.jsx(YT,{"data-slot":"hover-card-trigger",...e})}function Xm({className:e,align:n="center",sideOffset:r=4,...o}){return g.jsx(XT,{"data-slot":"hover-card-portal",children:g.jsx(KT,{"data-slot":"hover-card-content",align:n,sideOffset:r,className:xe("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})})}const G1="cursor-default text-xs underline decoration-dotted underline-offset-2 hover:text-foreground";function pB({report:e,component:n,declared:r,unusedProps:o,usedPropCount:i}){const c=Uc(r);return g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsx("button",{type:"button",className:G1,children:g.jsxs("span",{className:"text-muted-foreground",children:[i,"/",c.length," ",oi("prop",i)," used"]})})}),g.jsx(Xm,{align:"start",className:"w-64 p-3",children:g.jsx(t_,{component:n,declared:r,unusedProps:o,propFrequencies:dm(e,n),variant:"compact"})})]})}function mB({root:e,fileCount:n,files:r}){const o=[...r].sort((i,c)=>i.localeCompare(c));return g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsxs("button",{type:"button",className:G1,children:[n," ",oi("file",n)]})}),g.jsxs(Xm,{align:"start",className:"w-72 p-3",children:[g.jsxs("p",{className:"text-xs font-medium text-foreground",children:[n," ",oi("file",n)]}),g.jsx("ul",{className:"mt-2 max-h-48 space-y-0.5 overflow-y-auto font-mono text-xs text-muted-foreground",children:o.map(i=>g.jsx("li",{className:"min-w-0",children:g.jsx(Ho,{path:Po(e,i),className:"text-xs text-muted-foreground"})},i))})]})]})}function hB({report:e,onOpenComponent:n}){const r=mi(e),o=hi(e),i=N0(r,o,e),{unusedProps:c,declaredByName:u}=v.useMemo(()=>{const d=im(e),p=new Set;for(const[h,b]of d){const y=e_(e,h,b);for(const _ of y)p.add(_)}return{unusedProps:p,declaredByName:d}},[e]);return g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{scope:"col",children:"Component"}),g.jsx(Ue,{scope:"col",children:"Prop Usage"}),g.jsx(Ue,{scope:"col",children:"App Usage"})]})}),g.jsx(Ln,{children:i.map(d=>{const p=o.get(d),h=u.get(d)??[],b=Uc(h),y=b.filter(_=>!c.has(`${d}/${_}`)).length;return g.jsxs(ft,{children:[g.jsx(Pe,{children:n?g.jsx("button",{type:"button",onClick:()=>n(d),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:d}):d}),g.jsx(Pe,{children:b.length>0?g.jsx(pB,{report:e,component:d,declared:h,unusedProps:c,usedPropCount:y}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})}),g.jsx(Pe,{children:p&&p.files.length>0?g.jsx(mB,{root:e.root,fileCount:p.file_count,files:p.files}):g.jsx("span",{className:"text-muted-foreground/70",children:"—"})})]},d)})})]})}function gB({dslinterReport:e,dslinterReportHint:n="npm run dslinter:report",onOpenComponent:r,onBackToGovernance:o,landing:i}){const{report:c,error:u,loading:d}=e,p=c?gi(c).length:0;return u?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[i,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"All components"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:u}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:n})]})]})]}):d||!c?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[i,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading component catalog…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[i,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[o?g.jsx("button",{type:"button",onClick:o,className:"mb-2 text-xs font-medium text-muted-foreground transition hover:text-foreground",children:"← Governance"}):null,g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["All components",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",p," components"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Full catalog with prop usage and app references from the latest scan."})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(hB,{report:c,onOpenComponent:r})})]})}const H1=[{id:"all",label:"All issues"},{id:"a11y",label:"Accessibility"},{id:"code",label:"Code quality"},{id:"token",label:"Tokens"},{id:"unused",label:"Unused"}];function bB(e){return H1.some(n=>n.id===e)}function yB({value:e,onChange:n,counts:r}){return g.jsx(Tm,{type:"single",value:e,onValueChange:o=>{bB(o)&&n(o)},variant:"outline",size:"sm","aria-label":"Filter governance inventory",className:"contents",children:H1.map(o=>g.jsxs(Cr,{value:o.id,className:"rounded-full px-2.5 text-xs font-medium",children:[o.label,g.jsx("span",{className:"ml-1 tabular-nums text-muted-foreground",children:r[o.id]})]},o.id))})}function xB({scores:e}){const n=[{label:"System health",value:e.design_system_health},{label:"UX consistency",value:e.ux_consistency},{label:"Accessibility",value:e.accessibility},{label:"Maintainability",value:e.maintainability}];return g.jsx("section",{className:"grid grid-cols-2 gap-1 rounded-xl border border-border bg-muted/30 p-1 md:grid-cols-4",children:n.map(({label:r,value:o})=>g.jsxs("div",{className:"rounded-lg border border-border bg-card px-4 py-3 text-card-foreground shadow-xs",children:[g.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:r}),g.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:o})]},r))})}function vB({components:e,root:n,onOpenComponent:r}){return e.length===0?g.jsx("p",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-4 py-8 text-center text-sm text-muted-foreground",children:"No unused components — every scanned definition has at least one JSX reference in the workspace."}):g.jsxs(Bn,{children:[g.jsx(zn,{children:g.jsxs(ft,{children:[g.jsx(Ue,{scope:"col",children:"Component"}),g.jsx(Ue,{scope:"col",children:"Defined in"})]})}),g.jsx(Ln,{children:e.map(({name:o,definitionPaths:i})=>g.jsxs(ft,{children:[g.jsx(Pe,{children:r?g.jsx("button",{type:"button",onClick:()=>r(o),className:"text-left font-medium text-foreground underline decoration-transparent underline-offset-2 transition hover:decoration-current",children:o}):o}),g.jsx(Pe,{className:"min-w-0 font-mono text-xs text-muted-foreground",children:i.length===1?g.jsx(Ho,{path:Po(n,i[0]),className:"text-xs"}):g.jsxs("span",{title:i.map(c=>Po(n,c)).join(`
|
|
219
|
+
`),children:[i.length," ",oi("file",i.length)]})})]},o))})]})}const _B={all:{id:"issues",title:"Issues",description:"All findings from the workspace DSLinter report."},a11y:{id:"accessibility-issues",title:"Accessibility issues",description:"Findings from accessibility rules in the latest snapshot."},code:{id:"code-issues",title:"Code quality issues",description:"Findings from code quality rules in the latest snapshot."},token:{id:"token-issues",title:"Token issues",description:"Findings from design token rules in the latest snapshot."},unused:{id:"unused-components",title:"Unused components",description:"Scanned definitions with no JSX references elsewhere in the workspace."}};function wB({report:e,onOpenComponent:n,onOpenCatalog:r}){const[o,i]=v.useState("all"),c=v.useMemo(()=>A0(e),[e]),u=v.useMemo(()=>i2(e,o),[e,o]),d=v.useMemo(()=>lm(e),[e]),p=_B[o];return g.jsxs("div",{className:"space-y-10",children:[g.jsx(xB,{scores:e.scores}),e.duplicate_components.length>0?g.jsxs("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-xs text-amber-950",children:[g.jsx("span",{className:"font-semibold",children:"Duplicate component names: "}),e.duplicate_components.map(h=>h.name).join(", ")]}):null,g.jsx(yB,{value:o,onChange:i,counts:c}),g.jsx(fn,{id:p.id,title:p.title,description:p.description,children:o==="unused"?g.jsx(vB,{components:d,root:e.root,onOpenComponent:n}):g.jsx(vS,{findings:u,root:e.root})}),r?g.jsxs("p",{className:"text-sm text-muted-foreground",children:[g.jsx("button",{type:"button",onClick:r,className:"font-medium text-foreground underline decoration-dotted underline-offset-2 transition hover:decoration-solid",children:"View all components"})," ","for prop usage and app reference details."]}):null]})}function SB({landing:e,reportUrl:n="/dslinter-report.json",dslinterReportHint:r="npm run dslinter:report",dslinterReport:o,onOpenComponent:i,onOpenCatalog:c}){const{report:u,error:d,loading:p}=o,h=u?gi(u).length:0,b=u?lm(u).length:0,y=u?A0(u).all:0;return d?g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsx("header",{className:"border-b border-border bg-card px-8 py-6",children:g.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"Governance"})}),g.jsxs("div",{className:"mx-auto max-w-lg px-8 py-16 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Could not load DSLinter report"}),g.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:d}),g.jsxs("p",{className:"mt-6 text-xs text-muted-foreground",children:["Regenerate the JSON, then refresh. Example:"," ",g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-foreground",children:r})]})]})]}):p||!u?g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-auto bg-muted/40",children:[e,g.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading inventory…"})]}):g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[e,g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Inventory"}),g.jsxs("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:["Governance",g.jsxs("span",{className:"font-normal text-muted-foreground",children:[" ","· ",y," ",y===1?"issue":"issues"," ·"," ",b," unused · ",h," total"]})]}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Governance scores, workspace findings, and components with no usage from the latest DSLinter snapshot"})]}),g.jsx("div",{className:"min-w-0 w-full px-6 py-8",children:g.jsx(wB,{report:u,onOpenComponent:i,onOpenCatalog:c})})]})}function CB(){const[e,n]=v.useState("⌘K");return v.useEffect(()=>{const r=/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent);n(r?"⌘K":"Ctrl+K")},[]),g.jsx("kbd",{className:"pointer-events-none select-none rounded border border-sidebar-border bg-sidebar-accent px-1 py-px font-mono text-[10px] font-medium leading-tight text-sidebar-foreground/80 tabular-nums",children:e})}function Ws(e){return`w-full rounded-md truncate px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function kB(e){return`min-w-0 flex-1 rounded-l-md truncate px-2.5 py-1.5 text-left text-sm transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/80 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function $B(e){return`flex h-[32px] w-8 shrink-0 items-center justify-center rounded-r-md transition ${e?"bg-sidebar-primary text-sidebar-primary-foreground shadow-xs":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"}`}function n0(e){return g.jsx("p",{className:"mb-1.5 mt-4 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50 first:mt-0",children:e})}function EB(e){const n=e.querySelector('[data-nav-active="true"]');if(!n)return;const r=n.getBoundingClientRect(),o=e.getBoundingClientRect();if(r.bottom>o.top&&r.top<o.bottom)return;const c=r.top-o.top;e.scrollTop+=c}function NB({report:e,reportLoading:n,reportError:r,route:o,onNavigate:i,onOpenCommandPalette:c,theme:u,onThemeChange:d,catalogNames:p}){const h=v.useMemo(()=>R0(e),[e]),b=v.useRef(null),[y,_]=v.useState(()=>new Set),w=o.view==="tokens",S=o.view==="governance",k=o.view==="catalog";v.useEffect(()=>{if(o.view!=="component")return;const E=h.find(N=>N.type==="family"&&(N.parent===o.componentId||N.children.includes(o.componentId)));!E||E.type!=="family"||_(N=>{if(N.has(E.parent))return N;const j=new Set(N);return j.add(E.parent),j})},[h,o]),v.useEffect(()=>{const E=b.current;if(!E)return;const N=requestAnimationFrame(()=>EB(E));return()=>cancelAnimationFrame(N)},[o,h,y,p.length]);const $=E=>{E!=="light"&&E!=="dark"||d(E)};return g.jsxs("aside",{className:"fixed flex h-full w-[240px] shrink-0 flex-col overflow-hidden border-r border-border bg-background text-sidebar-foreground",children:[g.jsx("div",{className:"sticky top-0 z-10 shrink-0 border-b border-border bg-background px-6 py-4",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"flex items-center text-foreground",children:g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:g.jsxs("g",{fill:"currentColor",children:[g.jsx("path",{d:"m22.346,4.836l-3.182-3.182c-.779-.78-2.049-.78-2.828,0l-3.182,3.182c-.78.78-.78,2.048,0,2.828l3.182,3.182c.39.39.902.585,1.414.585s1.024-.195,1.414-.585l3.182-3.182c.78-.78.78-2.048,0-2.828Z",fill:"currentColor",strokeWidth:"0"}),g.jsx("rect",{x:"2",y:"2",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"13",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"}),g.jsx("rect",{x:"2",y:"13",width:"9",height:"9",rx:"2",ry:"2",strokeWidth:"0",fill:"currentColor"})]})})}),g.jsxs("button",{type:"button",onClick:c,className:"flex shrink-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-foreground/70 transition hover:bg-accent hover:text-accent-foreground","aria-label":"Search components and views",children:[g.jsx(Rm,{className:"size-4 shrink-0","aria-hidden":!0}),g.jsx(CB,{})]})]})}),g.jsxs("nav",{ref:b,className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[n0("Explore"),g.jsx("button",{type:"button",onClick:()=>i({view:"governance"}),className:Ws(S),"data-nav-active":S?"true":void 0,children:"Governance"}),g.jsx("button",{type:"button",onClick:()=>i({view:"catalog"}),className:Ws(k),"data-nav-active":k?"true":void 0,children:"All components"}),g.jsx("button",{type:"button",onClick:()=>i({view:"tokens"}),className:Ws(w),"data-nav-active":w?"true":void 0,children:"Design tokens"}),n0(p.length>0?`Components (${p.length})`:"Components"),g.jsxs("div",{className:"space-y-0.5",children:[n&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Loading components…"}):null,r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"Could not load report"}):null,!n&&!r&&p.length===0?g.jsx("p",{className:"px-2.5 py-1.5 text-sm text-sidebar-foreground/50",children:"No components in scan"}):null,h.map(E=>{if(E.type==="component"){const D=o.view==="component"&&o.componentId===E.name;return g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:E.name}),className:Ws(D),"data-nav-active":D?"true":void 0,children:E.name},E.name)}const N=o.view==="component"&&o.componentId===E.parent,j=o.view==="component"&&E.children.includes(o.componentId),z=N||j,G=N&&!j,H=y.has(E.parent);return g.jsxs("div",{children:[g.jsxs("div",{className:"flex min-w-0",children:[g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:T0(E,p)}),className:kB(z),"data-nav-active":G?"true":void 0,children:E.parent}),g.jsx("button",{type:"button",onClick:()=>_(D=>{const P=new Set(D);return P.has(E.parent)?P.delete(E.parent):P.add(E.parent),P}),className:$B(z),"aria-label":H?`Collapse ${E.parent} subcomponents`:`Expand ${E.parent} subcomponents`,"aria-expanded":H,children:g.jsx(ou,{className:`size-4 transition-transform ${H?"rotate-180":""}`,"aria-hidden":!0})})]}),H?g.jsx("div",{className:"mt-0.5 space-y-0.5 border-l border-sidebar-border/70 pl-3",children:E.children.map(D=>{const P=o.view==="component"&&o.componentId===D;return g.jsx("button",{type:"button",onClick:()=>i({view:"component",componentId:D}),className:`${Ws(P)} text-xs`,"data-nav-active":P?"true":void 0,children:D},D)})}):null]},E.path)})]})]}),g.jsxs("div",{className:"shrink-0 border-t border-sidebar-border px-3 py-3",children:[g.jsx("p",{className:"mb-2 px-2.5 text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/50",children:"Appearance"}),g.jsxs(Tm,{type:"single",variant:"outline",size:"sm",spacing:0,className:"w-full",value:u,onValueChange:$,"aria-label":"Color theme",children:[g.jsx(Cr,{value:"light",className:"flex-1","aria-label":"Light theme",title:"Light",children:g.jsx(kS,{className:"size-4","aria-hidden":!0})}),g.jsx(Cr,{value:"dark",className:"flex-1","aria-label":"Dark theme",title:"Dark",children:g.jsx($S,{className:"size-4","aria-hidden":!0})})]})]})]})}function AB(e){const n=e.typography;return n?n.families.length>0||n.sizes.length>0||(n.weights?.length??0)>0:!1}function jB({catalog:e}){const n=e.typography,r=n?.weights??[];return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Colors"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"From Tailwind theme extensions."}),g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:e.colors.map(o=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card px-3 py-2",title:o.value,children:[g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:o.value})}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("p",{className:"truncate font-mono text-xs text-foreground",children:[o.token,"/",o.shade]}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:o.value}),g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:o.tw})]})]},`${o.token}-${o.shade}`))})]}),AB(e)&&n?g.jsxs("div",{className:"space-y-8",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Typography"}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Font stacks and Tailwind utilities — preview matches your theme tokens."})]}),n.families.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font families"}),g.jsx("ul",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:n.families.map(o=>g.jsxs("li",{className:"rounded-lg border border-border bg-card px-3 py-3",title:o.value,children:[g.jsx("p",{className:`${o.tw} text-sm text-foreground`,children:"The quick brown fox jumps over the lazy dog."}),g.jsx("p",{className:"mt-2 truncate font-mono text-xs text-foreground",children:o.tw}),g.jsx("p",{className:"mt-1 break-all text-xs leading-snug text-muted-foreground",children:o.value})]},o.key))})]}):null,n.families.length>0&&n.sizes.length>0?n.families.map(o=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Type scale · ",o.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(i=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:i.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:i.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate ${o.tw} ${i.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},`${o.key}-${i.token}`))})]},o.key)):n.sizes.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Type scale · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border overflow-x-auto rounded-lg border border-border bg-card",children:n.sizes.map(o=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2.5 text-xs sm:flex-nowrap",children:[g.jsx("span",{className:"w-24 shrink-0 font-mono text-foreground/90",children:o.tw}),g.jsx("span",{className:"hidden w-36 shrink-0 text-muted-foreground sm:inline",children:o.value}),g.jsx("span",{className:`min-w-0 flex-1 truncate font-sans ${o.tw} text-foreground`,children:"Aa Bb Cc 0123456789"})]},o.token))})]}):null,n.families.length>0&&r.length>0?n.families.map(o=>g.jsxs("div",{children:[g.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["Font weights · ",o.tw]}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(i=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:i.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:i.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 ${o.tw} ${i.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},`${o.key}-${i.token}`))})]},`w-${o.key}`)):r.length>0?g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Font weights · font-sans"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:r.map(o=>g.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 px-3 py-2 text-xs",children:[g.jsx("span",{className:"w-28 shrink-0 font-mono text-foreground/90",children:o.tw}),g.jsx("span",{className:"w-10 shrink-0 tabular-nums text-muted-foreground",children:o.value??"—"}),g.jsx("span",{className:`min-w-0 flex-1 font-sans ${o.tw} text-base text-foreground`,children:"Agile beige sharks vex polite judges."})]},o.token))})]}):null]}):null,g.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Spacing"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.spacing.map(o=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:o.token}),g.jsx("span",{className:"text-muted-foreground",children:o.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:o.tw})]},o.token))})]}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Radius"}),g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:e.radius.map(o=>g.jsxs("li",{className:"flex justify-between gap-4 px-3 py-2 text-xs",children:[g.jsx("span",{className:"font-mono text-foreground/90",children:o.token}),g.jsx("span",{className:"text-muted-foreground",children:o.value}),g.jsx("span",{className:"hidden font-mono text-muted-foreground/70 sm:inline",children:o.tw})]},o.token))})]})]})]})}const TB=[{id:"all",label:"All"},{id:"used",label:"Used"},{id:"unused",label:"Unused"}];function F1({title:e,subtitle:n,children:r}){return g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e}),g.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:n}),r]})}function a0({row:e}){return e.isUnused?g.jsx("span",{className:"shrink-0 rounded-full bg-muted px-2 py-0.5 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"unused"}):g.jsxs("span",{className:"shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:[e.fileCount," ",e.fileCount===1?"file":"files"]})}function q1({row:e}){return e.referenceCount===0?g.jsx(a0,{row:e}):g.jsxs(Vm,{openDelay:200,closeDelay:100,children:[g.jsx(Ym,{asChild:!0,children:g.jsx("button",{type:"button",className:"shrink-0",children:g.jsx(a0,{row:e})})}),g.jsxs(Xm,{className:"w-80 text-xs",align:"end",children:[g.jsxs("p",{className:"font-medium text-foreground",children:[e.referenceCount," reference",e.referenceCount===1?"":"s"]}),g.jsxs("ul",{className:"mt-2 max-h-40 space-y-1 overflow-y-auto text-muted-foreground",children:[e.usageFiles.slice(0,12).map(n=>g.jsx("li",{className:"min-w-0",children:g.jsx(Ho,{path:n,className:"text-xs"})},n)),e.usageFiles.length>12?g.jsxs("li",{className:"text-muted-foreground/80",children:["+",e.usageFiles.length-12," more"]}):null]})]})]})}function V1({row:e,className:n}){return g.jsxs("div",{className:xe("min-w-0",n),children:[g.jsx("p",{className:"truncate font-mono text-xs text-foreground",children:e.cssName}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:e.value}),e.tw?g.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground/70",children:e.tw}):null]})}function RB({rows:e}){const n=e.filter(r=>r.category==="color");return n.length===0?null:g.jsx(F1,{title:"Colors",subtitle:"CSS custom properties from @theme and :root.",children:g.jsx("ul",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:n.map(r=>g.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-card p-2 pr-3.5",title:r.value,children:[r.displayValue&&/^(#|rgb|oklch|hsl)/.test(r.displayValue.trim())?g.jsx("svg",{className:"h-9 w-9 shrink-0 overflow-hidden rounded border border-border shadow-inner",viewBox:"0 0 36 36","aria-hidden":!0,children:g.jsx("rect",{width:"36",height:"36",fill:r.displayValue})}):g.jsx("div",{className:"h-9 w-9 shrink-0 rounded border border-border bg-muted"}),g.jsx(V1,{row:r,className:"flex-1"}),g.jsx(q1,{row:r})]},C0(r)))})})}function rc({title:e,subtitle:n,rows:r,category:o}){const i=r.filter(c=>c.category===o);return i.length===0?null:g.jsx(F1,{title:e,subtitle:n,children:g.jsx("ul",{className:"mt-3 divide-y divide-border rounded-lg border border-border bg-card",children:i.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2 text-xs",children:[g.jsx(V1,{row:c,className:"flex-1"}),g.jsx(q1,{row:c})]},C0(c)))})})}function MB({view:e}){const[n,r]=v.useState("all"),o=v.useMemo(()=>KE(e.rows,n),[e.rows,n]);return g.jsxs("section",{className:"space-y-6",children:[g.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"text-sm font-medium text-foreground",children:[e.usedCount,"/",e.totalCount," theme tokens used"]}),g.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Scanned from CSS sources",e.source==="hybrid"?" · enriched with manual catalog":""]})]}),g.jsx("div",{className:"flex gap-1 rounded-lg border border-border bg-muted/50 p-0.5",children:TB.map(i=>g.jsx("button",{type:"button",onClick:()=>r(i.id),className:xe("rounded-md px-3 py-1 text-xs font-medium transition-colors",n===i.id?"bg-card text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"),children:i.label},i.id))})]}),g.jsx(RB,{rows:o}),g.jsx(rc,{title:"Spacing",subtitle:"--spacing-* custom properties.",rows:o,category:"spacing"}),g.jsx(rc,{title:"Radius",subtitle:"--radius-* custom properties.",rows:o,category:"radius"}),g.jsx(rc,{title:"Typography",subtitle:"--font-* custom properties.",rows:o,category:"typography"}),g.jsx(rc,{title:"Other",subtitle:"Additional CSS variables.",rows:o,category:"other"})]})}function OB({tokenCatalog:e,dslinterReport:n}){const r=v.useMemo(()=>XE(n,e),[n,e]),o=r!=null&&r.rows.length>0,i=e!=null;return g.jsxs("div",{className:"min-h-0 flex-1 overflow-auto bg-muted/40",children:[g.jsxs("header",{className:"border-b border-border bg-card px-8 py-6",children:[g.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"System"}),g.jsx("h1",{className:"mt-1 text-lg font-semibold tracking-tight text-foreground",children:"Design tokens"}),g.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:o?"CSS variables discovered from your stylesheets, with used vs unused usage across the repo.":"Supply a catalog object (same shape as your Tailwind theme docs) — keep it aligned with your design tokens."})]}),g.jsx("div",{className:"min-w-0 w-full px-8 py-8",children:o&&r?g.jsx(MB,{view:r}):i?g.jsx(jB,{catalog:e}):g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Run ",g.jsx("span",{className:"font-mono",children:"dslinter --json"})," on a project with CSS token sources, or pass a"," ",g.jsx("span",{className:"font-mono",children:"tokenCatalog"})," prop."]})})]})}var r0=1,DB=.9,BB=.8,zB=.17,fp=.1,pp=.999,LB=.9999,UB=.99,PB=/[\\\/_+.#"@\[\(\{&]/,IB=/[\\\/_+.#"@\[\(\{&]/g,GB=/[\s-]/,Y1=/[\s-]/g;function tm(e,n,r,o,i,c,u){if(c===n.length)return i===e.length?r0:UB;var d=`${i},${c}`;if(u[d]!==void 0)return u[d];for(var p=o.charAt(c),h=r.indexOf(p,i),b=0,y,_,w,S;h>=0;)y=tm(e,n,r,o,h+1,c+1,u),y>b&&(h===i?y*=r0:PB.test(e.charAt(h-1))?(y*=BB,w=e.slice(i,h-1).match(IB),w&&i>0&&(y*=Math.pow(pp,w.length))):GB.test(e.charAt(h-1))?(y*=DB,S=e.slice(i,h-1).match(Y1),S&&i>0&&(y*=Math.pow(pp,S.length))):(y*=zB,i>0&&(y*=Math.pow(pp,h-i))),e.charAt(h)!==n.charAt(c)&&(y*=LB)),(y<fp&&r.charAt(h-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&r.charAt(h-1)!==o.charAt(c))&&(_=tm(e,n,r,o,h+1,c+2,u),_*fp>y&&(y=_*fp)),y>b&&(b=y),h=r.indexOf(p,h+1);return u[d]=b,b}function o0(e){return e.toLowerCase().replace(Y1," ")}function HB(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,tm(e,n,o0(e),o0(n),0,0,{})}var Zs='[cmdk-group=""]',mp='[cmdk-group-items=""]',FB='[cmdk-group-heading=""]',X1='[cmdk-item=""]',s0=`${X1}:not([aria-disabled="true"])`,nm="cmdk-item-select",Ro="data-value",qB=(e,n,r)=>HB(e,n,r),K1=v.createContext(void 0),Si=()=>v.useContext(K1),W1=v.createContext(void 0),Km=()=>v.useContext(W1),Z1=v.createContext(void 0),Q1=v.forwardRef((e,n)=>{let r=Mo(()=>{var R,q;return{search:"",value:(q=(R=e.value)!=null?R:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Mo(()=>new Set),i=Mo(()=>new Map),c=Mo(()=>new Map),u=Mo(()=>new Set),d=J1(e),{label:p,children:h,value:b,onValueChange:y,filter:_,shouldFilter:w,loop:S,disablePointerSelection:k=!1,vimBindings:$=!0,...E}=e,N=Zt(),j=Zt(),z=Zt(),G=v.useRef(null),H=n4();Or(()=>{if(b!==void 0){let R=b.trim();r.current.value=R,D.emit()}},[b]),Or(()=>{H(6,be)},[]);let D=v.useMemo(()=>({subscribe:R=>(u.current.add(R),()=>u.current.delete(R)),snapshot:()=>r.current,setState:(R,q,Q)=>{var Y,te,Z,ge;if(!Object.is(r.current[R],q)){if(r.current[R]=q,R==="search")oe(),se(),H(1,de);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ae=document.getElementById(z);ae?ae.focus():(Y=document.getElementById(N))==null||Y.focus()}if(H(7,()=>{var ae;r.current.selectedItemId=(ae=le())==null?void 0:ae.id,D.emit()}),Q||H(5,be),((te=d.current)==null?void 0:te.value)!==void 0){let ae=q??"";(ge=(Z=d.current).onValueChange)==null||ge.call(Z,ae);return}}D.emit()}},emit:()=>{u.current.forEach(R=>R())}}),[]),P=v.useMemo(()=>({value:(R,q,Q)=>{var Y;q!==((Y=c.current.get(R))==null?void 0:Y.value)&&(c.current.set(R,{value:q,keywords:Q}),r.current.filtered.items.set(R,re(q,Q)),H(2,()=>{se(),D.emit()}))},item:(R,q)=>(o.current.add(R),q&&(i.current.has(q)?i.current.get(q).add(R):i.current.set(q,new Set([R]))),H(3,()=>{oe(),se(),r.current.value||de(),D.emit()}),()=>{c.current.delete(R),o.current.delete(R),r.current.filtered.items.delete(R);let Q=le();H(4,()=>{oe(),Q?.getAttribute("id")===R&&de(),D.emit()})}),group:R=>(i.current.has(R)||i.current.set(R,new Set),()=>{c.current.delete(R),i.current.delete(R)}),filter:()=>d.current.shouldFilter,label:p||e["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:N,inputId:z,labelId:j,listInnerRef:G}),[]);function re(R,q){var Q,Y;let te=(Y=(Q=d.current)==null?void 0:Q.filter)!=null?Y:qB;return R?te(R,r.current.search,q):0}function se(){if(!r.current.search||d.current.shouldFilter===!1)return;let R=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(Y=>{let te=i.current.get(Y),Z=0;te.forEach(ge=>{let ae=R.get(ge);Z=Math.max(ae,Z)}),q.push([Y,Z])});let Q=G.current;pe().sort((Y,te)=>{var Z,ge;let ae=Y.getAttribute("id"),ke=te.getAttribute("id");return((Z=R.get(ke))!=null?Z:0)-((ge=R.get(ae))!=null?ge:0)}).forEach(Y=>{let te=Y.closest(mp);te?te.appendChild(Y.parentElement===te?Y:Y.closest(`${mp} > *`)):Q.appendChild(Y.parentElement===Q?Y:Y.closest(`${mp} > *`))}),q.sort((Y,te)=>te[1]-Y[1]).forEach(Y=>{var te;let Z=(te=G.current)==null?void 0:te.querySelector(`${Zs}[${Ro}="${encodeURIComponent(Y[0])}"]`);Z?.parentElement.appendChild(Z)})}function de(){let R=pe().find(Q=>Q.getAttribute("aria-disabled")!=="true"),q=R?.getAttribute(Ro);D.setState("value",q||void 0)}function oe(){var R,q,Q,Y;if(!r.current.search||d.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let te=0;for(let Z of o.current){let ge=(q=(R=c.current.get(Z))==null?void 0:R.value)!=null?q:"",ae=(Y=(Q=c.current.get(Z))==null?void 0:Q.keywords)!=null?Y:[],ke=re(ge,ae);r.current.filtered.items.set(Z,ke),ke>0&&te++}for(let[Z,ge]of i.current)for(let ae of ge)if(r.current.filtered.items.get(ae)>0){r.current.filtered.groups.add(Z);break}r.current.filtered.count=te}function be(){var R,q,Q;let Y=le();Y&&(((R=Y.parentElement)==null?void 0:R.firstChild)===Y&&((Q=(q=Y.closest(Zs))==null?void 0:q.querySelector(FB))==null||Q.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function le(){var R;return(R=G.current)==null?void 0:R.querySelector(`${X1}[aria-selected="true"]`)}function pe(){var R;return Array.from(((R=G.current)==null?void 0:R.querySelectorAll(s0))||[])}function O(R){let q=pe()[R];q&&D.setState("value",q.getAttribute(Ro))}function X(R){var q;let Q=le(),Y=pe(),te=Y.findIndex(ge=>ge===Q),Z=Y[te+R];(q=d.current)!=null&&q.loop&&(Z=te+R<0?Y[Y.length-1]:te+R===Y.length?Y[0]:Y[te+R]),Z&&D.setState("value",Z.getAttribute(Ro))}function J(R){let q=le(),Q=q?.closest(Zs),Y;for(;Q&&!Y;)Q=R>0?e4(Q,Zs):t4(Q,Zs),Y=Q?.querySelector(s0);Y?D.setState("value",Y.getAttribute(Ro)):X(R)}let fe=()=>O(pe().length-1),ee=R=>{R.preventDefault(),R.metaKey?fe():R.altKey?J(1):X(1)},T=R=>{R.preventDefault(),R.metaKey?O(0):R.altKey?J(-1):X(-1)};return v.createElement(fa.div,{ref:n,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:R=>{var q;(q=E.onKeyDown)==null||q.call(E,R);let Q=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||Q))switch(R.key){case"n":case"j":{$&&R.ctrlKey&&ee(R);break}case"ArrowDown":{ee(R);break}case"p":case"k":{$&&R.ctrlKey&&T(R);break}case"ArrowUp":{T(R);break}case"Home":{R.preventDefault(),O(0);break}case"End":{R.preventDefault(),fe();break}case"Enter":{R.preventDefault();let Y=le();if(Y){let te=new Event(nm);Y.dispatchEvent(te)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:r4},p),hu(e,R=>v.createElement(W1.Provider,{value:D},v.createElement(K1.Provider,{value:P},R))))}),VB=v.forwardRef((e,n)=>{var r,o;let i=Zt(),c=v.useRef(null),u=v.useContext(Z1),d=Si(),p=J1(e),h=(o=(r=p.current)==null?void 0:r.forceMount)!=null?o:u?.forceMount;Or(()=>{if(!h)return d.item(i,u?.id)},[h]);let b=eC(i,c,[e.value,e.children,c],e.keywords),y=Km(),_=Ka(H=>H.value&&H.value===b.current),w=Ka(H=>h||d.filter()===!1?!0:H.search?H.filtered.items.get(i)>0:!0);v.useEffect(()=>{let H=c.current;if(!(!H||e.disabled))return H.addEventListener(nm,S),()=>H.removeEventListener(nm,S)},[w,e.onSelect,e.disabled]);function S(){var H,D;k(),(D=(H=p.current).onSelect)==null||D.call(H,b.current)}function k(){y.setState("value",b.current,!0)}if(!w)return null;let{disabled:$,value:E,onSelect:N,forceMount:j,keywords:z,...G}=e;return v.createElement(fa.div,{ref:Fa(c,n),...G,id:i,"cmdk-item":"",role:"option","aria-disabled":!!$,"aria-selected":!!_,"data-disabled":!!$,"data-selected":!!_,onPointerMove:$||d.getDisablePointerSelection()?void 0:k,onClick:$?void 0:S},e.children)}),YB=v.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...c}=e,u=Zt(),d=v.useRef(null),p=v.useRef(null),h=Zt(),b=Si(),y=Ka(w=>i||b.filter()===!1?!0:w.search?w.filtered.groups.has(u):!0);Or(()=>b.group(u),[]),eC(u,d,[e.value,e.heading,p]);let _=v.useMemo(()=>({id:u,forceMount:i}),[i]);return v.createElement(fa.div,{ref:Fa(d,n),...c,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&v.createElement("div",{ref:p,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),hu(e,w=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},v.createElement(Z1.Provider,{value:_},w))))}),XB=v.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=v.useRef(null),c=Ka(u=>!u.search);return!r&&!c?null:v.createElement(fa.div,{ref:Fa(i,n),...o,"cmdk-separator":"",role:"separator"})}),KB=v.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,c=Km(),u=Ka(h=>h.search),d=Ka(h=>h.selectedItemId),p=Si();return v.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),v.createElement(fa.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":p.listId,"aria-labelledby":p.labelId,"aria-activedescendant":d,id:p.inputId,type:"text",value:i?e.value:u,onChange:h=>{i||c.setState("search",h.target.value),r?.(h.target.value)}})}),WB=v.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,c=v.useRef(null),u=v.useRef(null),d=Ka(h=>h.selectedItemId),p=Si();return v.useEffect(()=>{if(u.current&&c.current){let h=u.current,b=c.current,y,_=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=h.offsetHeight;b.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return _.observe(h),()=>{cancelAnimationFrame(y),_.unobserve(h)}}},[]),v.createElement(fa.div,{ref:Fa(c,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":o,id:p.listId},hu(e,h=>v.createElement("div",{ref:Fa(u,p.listInnerRef),"cmdk-list-sizer":""},h)))}),ZB=v.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:c,container:u,...d}=e;return v.createElement(O_,{open:r,onOpenChange:o},v.createElement(D_,{container:u},v.createElement(B_,{"cmdk-overlay":"",className:i}),v.createElement(z_,{"aria-label":e.label,"cmdk-dialog":"",className:c},v.createElement(Q1,{ref:n,...d}))))}),QB=v.forwardRef((e,n)=>Ka(r=>r.filtered.count===0)?v.createElement(fa.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),JB=v.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...c}=e;return v.createElement(fa.div,{ref:n,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},hu(e,u=>v.createElement("div",{"aria-hidden":!0},u)))}),Wo=Object.assign(Q1,{List:WB,Item:VB,Input:KB,Group:YB,Separator:XB,Dialog:ZB,Empty:QB,Loading:JB});function e4(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function t4(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function J1(e){let n=v.useRef(e);return Or(()=>{n.current=e}),n}var Or=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Mo(e){let n=v.useRef();return n.current===void 0&&(n.current=e()),n}function Ka(e){let n=Km(),r=()=>e(n.snapshot());return v.useSyncExternalStore(n.subscribe,r,r)}function eC(e,n,r,o=[]){let i=v.useRef(),c=Si();return Or(()=>{var u;let d=(()=>{var h;for(let b of r){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(h=b.current.textContent)==null?void 0:h.trim():i.current}})(),p=o.map(h=>h.trim());c.value(e,d,p),(u=n.current)==null||u.setAttribute(Ro,d),i.current=d}),i}var n4=()=>{let[e,n]=v.useState(),r=Mo(()=>new Map);return Or(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function a4(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function hu({asChild:e,children:n},r){return e&&v.isValidElement(n)?v.cloneElement(a4(n),{ref:n.ref},r(n.props.children)):r(n)}var r4={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function o4({...e}){return g.jsx(O_,{"data-slot":"dialog",...e})}function s4({...e}){return g.jsx(D_,{"data-slot":"dialog-portal",...e})}function i4({className:e,...n}){return g.jsx(B_,{"data-slot":"dialog-overlay",className:xe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...n})}function l4({className:e,children:n,showCloseButton:r=!0,...o}){return g.jsxs(s4,{"data-slot":"dialog-portal",children:[g.jsx(i4,{}),g.jsxs(z_,{"data-slot":"dialog-content",className:xe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...o,children:[n,r&&g.jsxs(uj,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(CS,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function c4({className:e,...n}){return g.jsx("div",{"data-slot":"dialog-header",className:xe("flex flex-col gap-2 text-center sm:text-left",e),...n})}function u4({className:e,...n}){return g.jsx(lj,{"data-slot":"dialog-title",className:xe("text-lg leading-none font-semibold",e),...n})}function d4({className:e,...n}){return g.jsx(cj,{"data-slot":"dialog-description",className:xe("text-sm text-muted-foreground",e),...n})}function f4({className:e,...n}){return g.jsx(Wo,{"data-slot":"command",className:xe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n})}function p4({title:e="Command Palette",description:n="Search for a command to run...",children:r,className:o,showCloseButton:i=!0,...c}){return g.jsxs(o4,{...c,children:[g.jsxs(c4,{className:"sr-only",children:[g.jsx(u4,{children:e}),g.jsx(d4,{children:n})]}),g.jsx(l4,{className:xe("overflow-hidden p-0",o),showCloseButton:i,children:g.jsx(f4,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})]})}function m4({className:e,...n}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(Rm,{className:"size-4 shrink-0 opacity-50","aria-hidden":!0}),g.jsx(Wo.Input,{"data-slot":"command-input",className:xe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]})}function h4({className:e,...n}){return g.jsx(Wo.List,{"data-slot":"command-list",className:xe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...n})}function g4({...e}){return g.jsx(Wo.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function hp({className:e,...n}){return g.jsx(Wo.Group,{"data-slot":"command-group",className:xe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n})}function oc({className:e,...n}){return g.jsx(Wo.Item,{"data-slot":"command-item",className:xe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...n})}function b4(e){if(!e||!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"}function y4({catalogEntries:e,onNavigate:n,open:r,onOpenChange:o}){const i=v.useCallback(()=>o(!1),[o]);return v.useEffect(()=>{const c=u=>{!(u.metaKey||u.ctrlKey)||u.key!=="k"||!r&&b4(u.target)||(u.preventDefault(),o(!r))};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[r,o]),g.jsxs(p4,{open:r,onOpenChange:o,title:"Jump to",description:"Search components and views",children:[g.jsx(m4,{placeholder:"Search components…"}),g.jsxs(h4,{children:[g.jsx(g4,{children:"No matches."}),g.jsxs(hp,{heading:"Explore",children:[g.jsx(oc,{value:"governance explore overview",onSelect:()=>{n({view:"governance"}),i()},children:"Governance"}),g.jsx(oc,{value:"catalog all components inventory",onSelect:()=>{n({view:"catalog"}),i()},children:"All components"})]}),e.length>0?g.jsx(hp,{heading:"Components",children:e.map(({name:c,label:u})=>g.jsx(oc,{value:`${c} ${u}`,onSelect:()=>{n({view:"component",componentId:c}),i()},children:u},c))}):null,g.jsx(hp,{heading:"System",children:g.jsx(oc,{value:"tokens design system colors",onSelect:()=>{n({view:"tokens"}),i()},children:"Design tokens"})})]})]})}function x4(e){let n=e.length;for(;n>1&&e[n-1]==="/";)n--;return e.slice(0,n)}function v4(e){const n=e.trim();return n.startsWith("/")?x4(n):n.length>0?`/${n}`:"/"}function _4(e){const n=v4(e);if(n==="/"||n==="/overview"||n==="/governance")return{view:"governance"};if(n==="/tokens")return{view:"tokens"};if(n==="/catalog"||n==="/governance/catalog")return{view:"catalog"};if(n.startsWith("/component/")){const r=decodeURIComponent(n.slice(11));if(r.length>0)return{view:"component",componentId:r}}return{view:"governance"}}function w4(e){switch(e.view){case"tokens":return"/tokens";case"governance":return"/governance";case"catalog":return"/catalog";case"component":return`/component/${encodeURIComponent(e.componentId)}`;default:return"/governance"}}function i0(){if(!window.location.hash.startsWith("#!/"))return!1;const e=window.location.pathname+window.location.search;return window.history.replaceState(null,"",e||"/governance"),!0}const Dc="dslinter:navigate";function S4(e){return window.addEventListener("popstate",e),window.addEventListener(Dc,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Dc,e)}}function C4(){return window.location.pathname||"/governance"}function k4(){return"/governance"}function $4(){const e=v.useSyncExternalStore(S4,C4,k4),n=_4(e);v.useEffect(()=>{i0()&&window.dispatchEvent(new Event(Dc))},[]);const r=v.useCallback(o=>{const i=w4(o),c=i!==window.location.pathname;c&&window.history.pushState(null,"",i),(i0()||c)&&window.dispatchEvent(new Event(Dc))},[]);return[n,r]}const E4=v.lazy(()=>k0(()=>import("./DashboardLayoutAuto-BWuyjHPD.js"),__vite__mapDeps([0,1]))),ri="dslinter-dashboard-theme";function N4(){if(typeof window>"u")return null;try{const e="dslinter-workbench-theme";let n=localStorage.getItem(ri);if(n==null&&(n=localStorage.getItem(e),(n==="light"||n==="dark")&&(localStorage.setItem(ri,n),localStorage.removeItem(e))),n==="light"||n==="dark")return n;if(n!=null)return localStorage.setItem(ri,"light"),"light"}catch{}return null}function A4(){return N4()??"light"}const tC=v.createContext(null);function j4({children:e}){const[n,r]=v.useState(()=>A4()),o=v.useCallback(c=>{r(c)},[]);v.useEffect(()=>{try{localStorage.setItem(ri,n)}catch{}},[n]),v.useEffect(()=>{const c=u=>{u.key!==ri||u.newValue==null||(u.newValue==="light"||u.newValue==="dark")&&r(u.newValue)};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]);const i=v.useMemo(()=>({theme:n,setTheme:o,resolvedTheme:n}),[n,o]);return g.jsx(tC.Provider,{value:i,children:e})}function Wm(){const e=v.useContext(tC);if(!e)throw new Error("useDashboardTheme must be used within DashboardThemeProvider");return e}function T4({playgroundEntries:e,playgroundJoinSkips:n,tokenCatalog:r,overview:o,reportUrl:i,dslinterReportHint:c,dslinterReport:u}){const[d,p]=$4(),[h,b]=v.useState(!1),[y,_]=v.useState([]),{theme:w,setTheme:S,resolvedTheme:k}=Wm(),$=v.useMemo(()=>Y$(u.report,y),[u.report,y]),E=v.useMemo(()=>gi($),[$]),N=v.useMemo(()=>R0($).flatMap(D=>D.type==="component"?[{name:D.name,label:D.name}]:[{name:T0(D,E),label:D.parent},...D.children.map(P=>({name:P,label:`${D.parent} / ${P}`}))]),[$,E]),j=v.useCallback(H=>{_(D=>D.includes(H)?D:[...D,H]),d.view==="component"&&d.componentId===H&&p({view:"governance"})},[d,p]),z=!u.loading&&u.error==null&&u.report!=null;let G;if(d.view==="tokens")G=g.jsx(OB,{tokenCatalog:r,dslinterReport:u.report});else if(d.view==="governance")G=g.jsx(SB,{landing:o,reportUrl:i,dslinterReportHint:c,dslinterReport:u,onOpenComponent:H=>p({view:"component",componentId:H}),onOpenCatalog:()=>p({view:"catalog"})});else if(d.view==="catalog")G=g.jsx(gB,{landing:o,dslinterReportHint:c,dslinterReport:u,onOpenComponent:H=>p({view:"component",componentId:H}),onBackToGovernance:()=>p({view:"governance"})});else if(d.view==="component"){const H=d.componentId,D=GE(e,H),P=E.includes(H),re=u.report?.playgrounds?.some(se=>se.export_name===H||se.id===H)??!1;D?G=g.jsx(fB,{entry:D,workspaceReport:u.report,reportReady:z,onOpenComponent:se=>p({view:"component",componentId:se}),onHideFromCatalog:j}):P?G=g.jsx(DR,{componentId:H,workspaceReport:u.report,reportReady:z,hasPlaygroundSpec:re,playgroundJoinSkip:sE(n,H),onOpenComponent:se=>p({view:"component",componentId:se}),onHideFromCatalog:j}):G=g.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-muted/40 px-8 text-center",children:[g.jsx("p",{className:"text-sm font-medium text-foreground",children:"Unknown component"}),g.jsxs("p",{className:"max-w-md text-xs text-muted-foreground",children:[g.jsx("span",{className:"font-mono",children:H})," is not in the latest scan catalog."]})]})}return g.jsxs("div",{"data-dashboard-theme":k,className:"flex h-screen min-h-0 bg-background text-foreground",children:[g.jsx(y4,{catalogEntries:N,onNavigate:p,open:h,onOpenChange:b}),g.jsx(NB,{report:$??null,reportLoading:u.loading,reportError:u.error,route:d,onNavigate:p,onOpenCommandPalette:()=>b(!0),theme:w,onThemeChange:S,catalogNames:E}),g.jsx("div",{className:"ml-[240px] flex min-h-0 min-w-0 flex-1 flex-col",children:G})]})}function R4(e){return g.jsx(j4,{children:e.autoPlayground?g.jsx(v.Suspense,{fallback:null,children:g.jsx(E4,{...e})}):g.jsx(T4,{...e,playgroundEntries:e.playgroundEntries??[],playgroundJoinSkips:e.playgroundJoinSkips})})}async function M4(e){const n=await fetch(e,{cache:"no-store"});if(!n.ok)throw new Error(`${n.status} ${n.statusText}`);return n.json()}function O4(e="/dslinter-report.json"){const{reportUrl:n="/dslinter-report.json",watchUrl:r,refreshIntervalMs:o=0}=typeof e=="string"?{reportUrl:e}:e,[i,c]=v.useState(null),[u,d]=v.useState(null),[p,h]=v.useState(!0),b=v.useRef(null),y=v.useRef(!1),_=v.useRef(!1),w=v.useRef(!1),S=(k,$,E)=>{const N=E?.showLoading!==!1;N&&(d(null),h(!0)),M4(k).then(j=>{$.current||c(j)}).catch(j=>{$.current||d(j instanceof Error?j.message:"Failed to load report")}).finally(()=>{!$.current&&N&&h(!1)})};return v.useEffect(()=>(y.current=!1,S(n,y,{showLoading:!0}),()=>{y.current=!0}),[n]),v.useEffect(()=>{if(!r)return;const k=new EventSource(r);return _.current=!1,k.onmessage=$=>{_.current||$.data==="updated"&&S(n,_,{showLoading:!1})},k.onerror=()=>{},()=>{_.current=!0,k.close()}},[r,n]),v.useEffect(()=>{if(r||o<=0)return;w.current=!1;const k=setInterval(async()=>{if(!w.current)try{const $=await fetch(n,{method:"HEAD",cache:"no-store"}),E=$.headers.get("ETag")??$.headers.get("Last-Modified")??null;if(E&&E===b.current)return;b.current=E,S(n,w,{showLoading:!1})}catch{}},o);return()=>{w.current=!0,clearInterval(k)}},[r,o,n]),{report:i,error:u,loading:p}}const D4={colors:[{token:"primary",shade:"DEFAULT",value:"#2563eb",tw:"bg-primary"},{token:"primary",shade:"foreground",value:"#ffffff",tw:"text-primary-foreground"},{token:"surface",shade:"DEFAULT",value:"#f8fafc",tw:"bg-surface"},{token:"surface",shade:"elevated",value:"#ffffff",tw:"bg-surface-elevated"},{token:"surface",shade:"border",value:"#e2e8f0",tw:"border-surface-border"},{token:"danger",shade:"DEFAULT",value:"#dc2626",tw:"text-danger"}],spacing:[{token:"layout-xs",value:"0.5rem",tw:"p-layout-xs"},{token:"layout-sm",value:"1rem",tw:"p-layout-sm"},{token:"layout-md",value:"1.5rem",tw:"p-layout-md"},{token:"layout-lg",value:"2rem",tw:"p-layout-lg"}],radius:[{token:"ds",value:"0.5rem",tw:"rounded-ds"},{token:"ds-lg",value:"0.75rem",tw:"rounded-ds-lg"}],typography:{families:[...QE],sizes:[...WE],weights:[...ZE]}};function B4(){const e=O4({reportUrl:"/dslinter-report.json",watchUrl:"/events",refreshIntervalMs:0});return g.jsx(R4,{autoPlayground:!0,tokenCatalog:D4,dslinterReport:e,dslinterReportHint:"dslinter (watch + serve)"})}j$.createRoot(document.getElementById("root")).render(g.jsx(dt.StrictMode,{children:g.jsx(B4,{})}));export{R4 as D,dt as R,T4 as a,L4 as b,j$ as c,tE as d,z4 as e,QE as f,WE as g,ZE as h,l0 as i,g as j,v as r,O4 as u};
|