@manojkmfsi/monodog 1.1.32 → 1.1.34

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.
@@ -1,20 +0,0 @@
1
- function mp(r,s){for(var l=0;l<s.length;l++){const i=s[l];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in r)){const d=Object.getOwnPropertyDescriptor(i,c);d&&Object.defineProperty(r,c,d.get?d:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function i(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();function fp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ko={exports:{}},ma={},qo={exports:{}},Ee={};var fm;function hp(){if(fm)return Ee;fm=1;var r=Symbol.for("react.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function k(E){return E===null||typeof E!="object"?null:(E=y&&E[y]||E["@@iterator"],typeof E=="function"?E:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,R={};function b(E,F,re){this.props=E,this.context=F,this.refs=R,this.updater=re||M}b.prototype.isReactComponent={},b.prototype.setState=function(E,F){if(typeof E!="object"&&typeof E!="function"&&E!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,E,F,"setState")},b.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function D(){}D.prototype=b.prototype;function L(E,F,re){this.props=E,this.context=F,this.refs=R,this.updater=re||M}var P=L.prototype=new D;P.constructor=L,N(P,b.prototype),P.isPureReactComponent=!0;var U=Array.isArray,Q=Object.prototype.hasOwnProperty,de={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function Z(E,F,re){var z,W={},q=null,ie=null;if(F!=null)for(z in F.ref!==void 0&&(ie=F.ref),F.key!==void 0&&(q=""+F.key),F)Q.call(F,z)&&!Y.hasOwnProperty(z)&&(W[z]=F[z]);var xe=arguments.length-2;if(xe===1)W.children=re;else if(1<xe){for(var Ae=Array(xe),Le=0;Le<xe;Le++)Ae[Le]=arguments[Le+2];W.children=Ae}if(E&&E.defaultProps)for(z in xe=E.defaultProps,xe)W[z]===void 0&&(W[z]=xe[z]);return{$$typeof:r,type:E,key:q,ref:ie,props:W,_owner:de.current}}function we(E,F){return{$$typeof:r,type:E.type,key:F,ref:E.ref,props:E.props,_owner:E._owner}}function Se(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function ee(E){var F={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(re){return F[re]})}var ve=/\/+/g;function ue(E,F){return typeof E=="object"&&E!==null&&E.key!=null?ee(""+E.key):F.toString(36)}function ge(E,F,re,z,W){var q=typeof E;(q==="undefined"||q==="boolean")&&(E=null);var ie=!1;if(E===null)ie=!0;else switch(q){case"string":case"number":ie=!0;break;case"object":switch(E.$$typeof){case r:case s:ie=!0}}if(ie)return ie=E,W=W(ie),E=z===""?"."+ue(ie,0):z,U(W)?(re="",E!=null&&(re=E.replace(ve,"$&/")+"/"),ge(W,F,re,"",function(Le){return Le})):W!=null&&(Se(W)&&(W=we(W,re+(!W.key||ie&&ie.key===W.key?"":(""+W.key).replace(ve,"$&/")+"/")+E)),F.push(W)),1;if(ie=0,z=z===""?".":z+":",U(E))for(var xe=0;xe<E.length;xe++){q=E[xe];var Ae=z+ue(q,xe);ie+=ge(q,F,re,Ae,W)}else if(Ae=k(E),typeof Ae=="function")for(E=Ae.call(E),xe=0;!(q=E.next()).done;)q=q.value,Ae=z+ue(q,xe++),ie+=ge(q,F,re,Ae,W);else if(q==="object")throw F=String(E),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return ie}function Ie(E,F,re){if(E==null)return E;var z=[],W=0;return ge(E,z,"","",function(q){return F.call(re,q,W++)}),z}function me(E){if(E._status===-1){var F=E._result;F=F(),F.then(function(re){(E._status===0||E._status===-1)&&(E._status=1,E._result=re)},function(re){(E._status===0||E._status===-1)&&(E._status=2,E._result=re)}),E._status===-1&&(E._status=0,E._result=F)}if(E._status===1)return E._result.default;throw E._result}var Ne={current:null},K={transition:null},ae={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:K,ReactCurrentOwner:de};function J(){throw Error("act(...) is not supported in production builds of React.")}return Ee.Children={map:Ie,forEach:function(E,F,re){Ie(E,function(){F.apply(this,arguments)},re)},count:function(E){var F=0;return Ie(E,function(){F++}),F},toArray:function(E){return Ie(E,function(F){return F})||[]},only:function(E){if(!Se(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},Ee.Component=b,Ee.Fragment=l,Ee.Profiler=c,Ee.PureComponent=L,Ee.StrictMode=i,Ee.Suspense=h,Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Ee.act=J,Ee.cloneElement=function(E,F,re){if(E==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var z=N({},E.props),W=E.key,q=E.ref,ie=E._owner;if(F!=null){if(F.ref!==void 0&&(q=F.ref,ie=de.current),F.key!==void 0&&(W=""+F.key),E.type&&E.type.defaultProps)var xe=E.type.defaultProps;for(Ae in F)Q.call(F,Ae)&&!Y.hasOwnProperty(Ae)&&(z[Ae]=F[Ae]===void 0&&xe!==void 0?xe[Ae]:F[Ae])}var Ae=arguments.length-2;if(Ae===1)z.children=re;else if(1<Ae){xe=Array(Ae);for(var Le=0;Le<Ae;Le++)xe[Le]=arguments[Le+2];z.children=xe}return{$$typeof:r,type:E.type,key:W,ref:q,props:z,_owner:ie}},Ee.createContext=function(E){return E={$$typeof:m,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},E.Provider={$$typeof:d,_context:E},E.Consumer=E},Ee.createElement=Z,Ee.createFactory=function(E){var F=Z.bind(null,E);return F.type=E,F},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(E){return{$$typeof:p,render:E}},Ee.isValidElement=Se,Ee.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:me}},Ee.memo=function(E,F){return{$$typeof:g,type:E,compare:F===void 0?null:F}},Ee.startTransition=function(E){var F=K.transition;K.transition={};try{E()}finally{K.transition=F}},Ee.unstable_act=J,Ee.useCallback=function(E,F){return Ne.current.useCallback(E,F)},Ee.useContext=function(E){return Ne.current.useContext(E)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(E){return Ne.current.useDeferredValue(E)},Ee.useEffect=function(E,F){return Ne.current.useEffect(E,F)},Ee.useId=function(){return Ne.current.useId()},Ee.useImperativeHandle=function(E,F,re){return Ne.current.useImperativeHandle(E,F,re)},Ee.useInsertionEffect=function(E,F){return Ne.current.useInsertionEffect(E,F)},Ee.useLayoutEffect=function(E,F){return Ne.current.useLayoutEffect(E,F)},Ee.useMemo=function(E,F){return Ne.current.useMemo(E,F)},Ee.useReducer=function(E,F,re){return Ne.current.useReducer(E,F,re)},Ee.useRef=function(E){return Ne.current.useRef(E)},Ee.useState=function(E){return Ne.current.useState(E)},Ee.useSyncExternalStore=function(E,F,re){return Ne.current.useSyncExternalStore(E,F,re)},Ee.useTransition=function(){return Ne.current.useTransition()},Ee.version="18.3.1",Ee}var hm;function Nc(){return hm||(hm=1,qo.exports=hp()),qo.exports}var pm;function pp(){if(pm)return ma;pm=1;var r=Nc(),s=Symbol.for("react.element"),l=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function m(p,h,g){var v,y={},k=null,M=null;g!==void 0&&(k=""+g),h.key!==void 0&&(k=""+h.key),h.ref!==void 0&&(M=h.ref);for(v in h)i.call(h,v)&&!d.hasOwnProperty(v)&&(y[v]=h[v]);if(p&&p.defaultProps)for(v in h=p.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:s,type:p,key:k,ref:M,props:y,_owner:c.current}}return ma.Fragment=l,ma.jsx=m,ma.jsxs=m,ma}var xm;function xp(){return xm||(xm=1,Ko.exports=pp()),Ko.exports}var t=xp(),Bl={},Yo={exports:{}},Tt={},Qo={exports:{}},Jo={};var gm;function gp(){return gm||(gm=1,(function(r){function s(K,ae){var J=K.length;K.push(ae);e:for(;0<J;){var E=J-1>>>1,F=K[E];if(0<c(F,ae))K[E]=ae,K[J]=F,J=E;else break e}}function l(K){return K.length===0?null:K[0]}function i(K){if(K.length===0)return null;var ae=K[0],J=K.pop();if(J!==ae){K[0]=J;e:for(var E=0,F=K.length,re=F>>>1;E<re;){var z=2*(E+1)-1,W=K[z],q=z+1,ie=K[q];if(0>c(W,J))q<F&&0>c(ie,W)?(K[E]=ie,K[q]=J,E=q):(K[E]=W,K[z]=J,E=z);else if(q<F&&0>c(ie,J))K[E]=ie,K[q]=J,E=q;else break e}}return ae}function c(K,ae){var J=K.sortIndex-ae.sortIndex;return J!==0?J:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;r.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();r.unstable_now=function(){return m.now()-p}}var h=[],g=[],v=1,y=null,k=3,M=!1,N=!1,R=!1,b=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(K){for(var ae=l(g);ae!==null;){if(ae.callback===null)i(g);else if(ae.startTime<=K)i(g),ae.sortIndex=ae.expirationTime,s(h,ae);else break;ae=l(g)}}function U(K){if(R=!1,P(K),!N)if(l(h)!==null)N=!0,me(Q);else{var ae=l(g);ae!==null&&Ne(U,ae.startTime-K)}}function Q(K,ae){N=!1,R&&(R=!1,D(Z),Z=-1),M=!0;var J=k;try{for(P(ae),y=l(h);y!==null&&(!(y.expirationTime>ae)||K&&!ee());){var E=y.callback;if(typeof E=="function"){y.callback=null,k=y.priorityLevel;var F=E(y.expirationTime<=ae);ae=r.unstable_now(),typeof F=="function"?y.callback=F:y===l(h)&&i(h),P(ae)}else i(h);y=l(h)}if(y!==null)var re=!0;else{var z=l(g);z!==null&&Ne(U,z.startTime-ae),re=!1}return re}finally{y=null,k=J,M=!1}}var de=!1,Y=null,Z=-1,we=5,Se=-1;function ee(){return!(r.unstable_now()-Se<we)}function ve(){if(Y!==null){var K=r.unstable_now();Se=K;var ae=!0;try{ae=Y(!0,K)}finally{ae?ue():(de=!1,Y=null)}}else de=!1}var ue;if(typeof L=="function")ue=function(){L(ve)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Ie=ge.port2;ge.port1.onmessage=ve,ue=function(){Ie.postMessage(null)}}else ue=function(){b(ve,0)};function me(K){Y=K,de||(de=!0,ue())}function Ne(K,ae){Z=b(function(){K(r.unstable_now())},ae)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(K){K.callback=null},r.unstable_continueExecution=function(){N||M||(N=!0,me(Q))},r.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):we=0<K?Math.floor(1e3/K):5},r.unstable_getCurrentPriorityLevel=function(){return k},r.unstable_getFirstCallbackNode=function(){return l(h)},r.unstable_next=function(K){switch(k){case 1:case 2:case 3:var ae=3;break;default:ae=k}var J=k;k=ae;try{return K()}finally{k=J}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(K,ae){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var J=k;k=K;try{return ae()}finally{k=J}},r.unstable_scheduleCallback=function(K,ae,J){var E=r.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?E+J:E):J=E,K){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=J+F,K={id:v++,callback:ae,priorityLevel:K,startTime:J,expirationTime:F,sortIndex:-1},J>E?(K.sortIndex=J,s(g,K),l(h)===null&&K===l(g)&&(R?(D(Z),Z=-1):R=!0,Ne(U,J-E))):(K.sortIndex=F,s(h,K),N||M||(N=!0,me(Q))),K},r.unstable_shouldYield=ee,r.unstable_wrapCallback=function(K){var ae=k;return function(){var J=k;k=ae;try{return K.apply(this,arguments)}finally{k=J}}}})(Jo)),Jo}var ym;function yp(){return ym||(ym=1,Qo.exports=gp()),Qo.exports}var vm;function vp(){if(vm)return Tt;vm=1;var r=Nc(),s=yp();function l(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,c={};function d(e,n){m(e,n),m(e+"Capture",n)}function m(e,n){for(c[e]=n,e=0;e<n.length;e++)i.add(n[e])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function k(e){return h.call(y,e)?!0:h.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function M(e,n,a,o){if(a!==null&&a.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function N(e,n,a,o){if(n===null||typeof n>"u"||M(e,n,a,o))return!0;if(o)return!1;if(a!==null)switch(a.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function R(e,n,a,o,u,f,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=u,this.mustUseProperty=a,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=x}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new R(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new R(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new R(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new R(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new R(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new R(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new R(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new R(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new R(e,5,!1,e.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(D,L);b[n]=new R(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(D,L);b[n]=new R(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(D,L);b[n]=new R(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new R(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new R("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new R(e,1,!1,e.toLowerCase(),null,!0,!0)});function P(e,n,a,o){var u=b.hasOwnProperty(n)?b[n]:null;(u!==null?u.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(N(n,a,u,o)&&(a=null),o||u===null?k(n)&&(a===null?e.removeAttribute(n):e.setAttribute(n,""+a)):u.mustUseProperty?e[u.propertyName]=a===null?u.type===3?!1:"":a:(n=u.attributeName,o=u.attributeNamespace,a===null?e.removeAttribute(n):(u=u.type,a=u===3||u===4&&a===!0?"":""+a,o?e.setAttributeNS(o,n,a):e.setAttribute(n,a))))}var U=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Q=Symbol.for("react.element"),de=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),Se=Symbol.for("react.provider"),ee=Symbol.for("react.context"),ve=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),Ie=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),K=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=K&&e[K]||e["@@iterator"],typeof e=="function"?e:null)}var J=Object.assign,E;function F(e){if(E===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);E=n&&n[1]||""}return`
2
- `+E+e}var re=!1;function z(e,n){if(!e||re)return"";re=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(O){var o=O}Reflect.construct(e,[],n)}else{try{n.call()}catch(O){o=O}e.call(n.prototype)}else{try{throw Error()}catch(O){o=O}e()}}catch(O){if(O&&o&&typeof O.stack=="string"){for(var u=O.stack.split(`
3
- `),f=o.stack.split(`
4
- `),x=u.length-1,j=f.length-1;1<=x&&0<=j&&u[x]!==f[j];)j--;for(;1<=x&&0<=j;x--,j--)if(u[x]!==f[j]){if(x!==1||j!==1)do if(x--,j--,0>j||u[x]!==f[j]){var S=`
5
- `+u[x].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),S}while(1<=x&&0<=j);break}}}finally{re=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?F(e):""}function W(e){switch(e.tag){case 5:return F(e.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1),e;case 11:return e=z(e.type.render,!1),e;case 1:return e=z(e.type,!0),e;default:return""}}function q(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case de:return"Portal";case we:return"Profiler";case Z:return"StrictMode";case ue:return"Suspense";case ge:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ee:return(e.displayName||"Context")+".Consumer";case Se:return(e._context.displayName||"Context")+".Provider";case ve:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return n=e.displayName||null,n!==null?n:q(e.type)||"Memo";case me:n=e._payload,e=e._init;try{return q(e(n))}catch{}}return null}function ie(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(n);case 8:return n===Z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Le(e){var n=Ae(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(x){o=""+x,f.call(this,x)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return o},setValue:function(x){o=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Bt(e){e._valueTracker||(e._valueTracker=Le(e))}function jn(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=Ae(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function et(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xt(e,n){var a=n.checked;return J({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function At(e,n){var a=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;a=xe(n.value!=null?n.value:a),e._wrapperState={initialChecked:o,initialValue:a,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function wn(e,n){n=n.checked,n!=null&&P(e,"checked",n,!1)}function gr(e,n){wn(e,n);var a=xe(n.value),o=n.type;if(a!=null)o==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Bn(e,n.type,a):n.hasOwnProperty("defaultValue")&&Bn(e,n.type,xe(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Nn(e,n,a){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,a||n===e.value||(e.value=n),e.defaultValue=n}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function Bn(e,n,a){(n!=="number"||et(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var mn=Array.isArray;function bn(e,n,a,o){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&o&&(e[a].defaultSelected=!0)}else{for(a=""+xe(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,o&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Hr(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(l(91));return J({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _a(e,n){var a=n.value;if(a==null){if(a=n.children,n=n.defaultValue,a!=null){if(n!=null)throw Error(l(92));if(mn(a)){if(1<a.length)throw Error(l(93));a=a[0]}n=a}n==null&&(n=""),a=n}e._wrapperState={initialValue:xe(a)}}function $r(e,n){var a=xe(n.value),o=xe(n.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),n.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),o!=null&&(e.defaultValue=""+o)}function zn(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Sn(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nt(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Sn(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hn,Cs=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,a,o,u){MSApp.execUnsafeLocalFunction(function(){return e(n,a,o,u)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Hn=Hn||document.createElement("div"),Hn.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Hn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function $n(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var Cn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Aa=["Webkit","ms","Moz","O"];Object.keys(Cn).forEach(function(e){Aa.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Cn[n]=Cn[e]})});function yr(e,n,a){return n==null||typeof n=="boolean"||n===""?"":a||typeof n!="number"||n===0||Cn.hasOwnProperty(e)&&Cn[e]?(""+n).trim():n+"px"}function vr(e,n){e=e.style;for(var a in n)if(n.hasOwnProperty(a)){var o=a.indexOf("--")===0,u=yr(a,n[a],o);a==="float"&&(a="cssFloat"),o?e.setProperty(a,u):e[a]=u}}var Xt=J({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fn(e,n){if(n){if(Xt[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(l(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(l(61))}if(n.style!=null&&typeof n.style!="object")throw Error(l(62))}}function jr(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wr=null;function Es(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vn=null,Zt=null,Wn=null;function Gn(e){if(e=Js(e)){if(typeof Vn!="function")throw Error(l(280));var n=e.stateNode;n&&(n=tl(n),Vn(e.stateNode,e.type,n))}}function Pa(e){Zt?Wn?Wn.push(e):Wn=[e]:Zt=e}function La(){if(Zt){var e=Zt,n=Wn;if(Wn=Zt=null,Gn(e),n)for(e=0;e<n.length;e++)Gn(n[e])}}function $e(e,n){return e(n)}function En(){}var ks=!1;function Ts(e,n,a){if(ks)return e(n,a);ks=!0;try{return $e(e,n,a)}finally{ks=!1,(Zt!==null||Wn!==null)&&(En(),La())}}function kn(e,n){var a=e.stateNode;if(a===null)return null;var o=tl(a);if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var Vr=!1;if(p)try{var Kn={};Object.defineProperty(Kn,"passive",{get:function(){Vr=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{Vr=!1}function mi(e,n,a,o,u,f,x,j,S){var O=Array.prototype.slice.call(arguments,3);try{n.apply(a,O)}catch(H){this.onError(H)}}var ct=!1,zt=null,Nr=!1,Wr=null,Rs={onError:function(e){ct=!0,zt=e}};function Oa(e,n,a,o,u,f,x,j,S){ct=!1,zt=null,mi.apply(Rs,arguments)}function en(e,n,a,o,u,f,x,j,S){if(Oa.apply(this,arguments),ct){if(ct){var O=zt;ct=!1,zt=null}else throw Error(l(198));Nr||(Nr=!0,Wr=O)}}function hn(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function _s(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function As(e){if(hn(e)!==e)throw Error(l(188))}function Ia(e){var n=e.alternate;if(!n){if(n=hn(e),n===null)throw Error(l(188));return n!==e?null:e}for(var a=e,o=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(o=u.return,o!==null){a=o;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return As(u),e;if(f===o)return As(u),n;f=f.sibling}throw Error(l(188))}if(a.return!==o.return)a=u,o=f;else{for(var x=!1,j=u.child;j;){if(j===a){x=!0,a=u,o=f;break}if(j===o){x=!0,o=u,a=f;break}j=j.sibling}if(!x){for(j=f.child;j;){if(j===a){x=!0,a=f,o=u;break}if(j===o){x=!0,o=f,a=u;break}j=j.sibling}if(!x)throw Error(l(189))}}if(a.alternate!==o)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:n}function Ma(e){return e=Ia(e),e!==null?ce(e):null}function ce(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=ce(e);if(n!==null)return n;e=e.sibling}return null}var C=s.unstable_scheduleCallback,V=s.unstable_cancelCallback,se=s.unstable_shouldYield,Me=s.unstable_requestPaint,Ce=s.unstable_now,Ve=s.unstable_getCurrentPriorityLevel,tt=s.unstable_ImmediatePriority,Ht=s.unstable_UserBlockingPriority,tn=s.unstable_NormalPriority,Ps=s.unstable_LowPriority,Ye=s.unstable_IdlePriority,br=null,Pt=null;function kh(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(br,e,void 0,(e.current.flags&128)===128)}catch{}}var nn=Math.clz32?Math.clz32:_h,Th=Math.log,Rh=Math.LN2;function _h(e){return e>>>=0,e===0?32:31-(Th(e)/Rh|0)|0}var Da=64,Fa=4194304;function Ls(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ua(e,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,u=e.suspendedLanes,f=e.pingedLanes,x=a&268435455;if(x!==0){var j=x&~u;j!==0?o=Ls(j):(f&=x,f!==0&&(o=Ls(f)))}else x=a&~u,x!==0?o=Ls(x):f!==0&&(o=Ls(f));if(o===0)return 0;if(n!==0&&n!==o&&(n&u)===0&&(u=o&-o,f=n&-n,u>=f||u===16&&(f&4194240)!==0))return n;if((o&4)!==0&&(o|=a&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)a=31-nn(n),u=1<<a,o|=e[a],n&=~u;return o}function Ah(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ph(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes;0<f;){var x=31-nn(f),j=1<<x,S=u[x];S===-1?((j&a)===0||(j&o)!==0)&&(u[x]=Ah(j,n)):S<=n&&(e.expiredLanes|=j),f&=~j}}function fi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Vc(){var e=Da;return Da<<=1,(Da&4194240)===0&&(Da=64),e}function hi(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Os(e,n,a){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-nn(n),e[n]=a}function Lh(e,n){var a=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<a;){var u=31-nn(a),f=1<<u;n[u]=0,o[u]=-1,e[u]=-1,a&=~f}}function pi(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-nn(a),u=1<<o;u&n|e[o]&n&&(e[o]|=n),a&=~u}}var Oe=0;function Wc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Gc,xi,Kc,qc,Yc,gi=!1,Ba=[],qn=null,Yn=null,Qn=null,Is=new Map,Ms=new Map,Jn=[],Oh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Qc(e,n){switch(e){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":Is.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ms.delete(n.pointerId)}}function Ds(e,n,a,o,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:f,targetContainers:[u]},n!==null&&(n=Js(n),n!==null&&xi(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Ih(e,n,a,o,u){switch(n){case"focusin":return qn=Ds(qn,e,n,a,o,u),!0;case"dragenter":return Yn=Ds(Yn,e,n,a,o,u),!0;case"mouseover":return Qn=Ds(Qn,e,n,a,o,u),!0;case"pointerover":var f=u.pointerId;return Is.set(f,Ds(Is.get(f)||null,e,n,a,o,u)),!0;case"gotpointercapture":return f=u.pointerId,Ms.set(f,Ds(Ms.get(f)||null,e,n,a,o,u)),!0}return!1}function Jc(e){var n=Sr(e.target);if(n!==null){var a=hn(n);if(a!==null){if(n=a.tag,n===13){if(n=_s(a),n!==null){e.blockedOn=n,Yc(e.priority,function(){Kc(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function za(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=vi(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);wr=o,a.target.dispatchEvent(o),wr=null}else return n=Js(a),n!==null&&xi(n),e.blockedOn=a,!1;n.shift()}return!0}function Xc(e,n,a){za(e)&&a.delete(n)}function Mh(){gi=!1,qn!==null&&za(qn)&&(qn=null),Yn!==null&&za(Yn)&&(Yn=null),Qn!==null&&za(Qn)&&(Qn=null),Is.forEach(Xc),Ms.forEach(Xc)}function Fs(e,n){e.blockedOn===n&&(e.blockedOn=null,gi||(gi=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Mh)))}function Us(e){function n(u){return Fs(u,e)}if(0<Ba.length){Fs(Ba[0],e);for(var a=1;a<Ba.length;a++){var o=Ba[a];o.blockedOn===e&&(o.blockedOn=null)}}for(qn!==null&&Fs(qn,e),Yn!==null&&Fs(Yn,e),Qn!==null&&Fs(Qn,e),Is.forEach(n),Ms.forEach(n),a=0;a<Jn.length;a++)o=Jn[a],o.blockedOn===e&&(o.blockedOn=null);for(;0<Jn.length&&(a=Jn[0],a.blockedOn===null);)Jc(a),a.blockedOn===null&&Jn.shift()}var Gr=U.ReactCurrentBatchConfig,Ha=!0;function Dh(e,n,a,o){var u=Oe,f=Gr.transition;Gr.transition=null;try{Oe=1,yi(e,n,a,o)}finally{Oe=u,Gr.transition=f}}function Fh(e,n,a,o){var u=Oe,f=Gr.transition;Gr.transition=null;try{Oe=4,yi(e,n,a,o)}finally{Oe=u,Gr.transition=f}}function yi(e,n,a,o){if(Ha){var u=vi(e,n,a,o);if(u===null)Mi(e,n,o,$a,a),Qc(e,o);else if(Ih(u,e,n,a,o))o.stopPropagation();else if(Qc(e,o),n&4&&-1<Oh.indexOf(e)){for(;u!==null;){var f=Js(u);if(f!==null&&Gc(f),f=vi(e,n,a,o),f===null&&Mi(e,n,o,$a,a),f===u)break;u=f}u!==null&&o.stopPropagation()}else Mi(e,n,o,null,a)}}var $a=null;function vi(e,n,a,o){if($a=null,e=Es(o),e=Sr(e),e!==null)if(n=hn(e),n===null)e=null;else if(a=n.tag,a===13){if(e=_s(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return $a=e,null}function Zc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ve()){case tt:return 1;case Ht:return 4;case tn:case Ps:return 16;case Ye:return 536870912;default:return 16}default:return 16}}var Xn=null,ji=null,Va=null;function eu(){if(Va)return Va;var e,n=ji,a=n.length,o,u="value"in Xn?Xn.value:Xn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var x=a-e;for(o=1;o<=x&&n[a-o]===u[f-o];o++);return Va=u.slice(e,1<o?1-o:void 0)}function Wa(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ga(){return!0}function tu(){return!1}function Lt(e){function n(a,o,u,f,x){this._reactName=a,this._targetInst=u,this.type=o,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(a=e[j],this[j]=a?a(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ga:tu,this.isPropagationStopped=tu,this}return J(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ga)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ga)},persist:function(){},isPersistent:Ga}),n}var Kr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wi=Lt(Kr),Bs=J({},Kr,{view:0,detail:0}),Uh=Lt(Bs),Ni,bi,zs,Ka=J({},Bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ci,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==zs&&(zs&&e.type==="mousemove"?(Ni=e.screenX-zs.screenX,bi=e.screenY-zs.screenY):bi=Ni=0,zs=e),Ni)},movementY:function(e){return"movementY"in e?e.movementY:bi}}),nu=Lt(Ka),Bh=J({},Ka,{dataTransfer:0}),zh=Lt(Bh),Hh=J({},Bs,{relatedTarget:0}),Si=Lt(Hh),$h=J({},Kr,{animationName:0,elapsedTime:0,pseudoElement:0}),Vh=Lt($h),Wh=J({},Kr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=Lt(Wh),Kh=J({},Kr,{data:0}),ru=Lt(Kh),qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jh(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Qh[e])?!!n[e]:!1}function Ci(){return Jh}var Xh=J({},Bs,{key:function(e){if(e.key){var n=qh[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Wa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ci,charCode:function(e){return e.type==="keypress"?Wa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zh=Lt(Xh),e0=J({},Ka,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),su=Lt(e0),t0=J({},Bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ci}),n0=Lt(t0),r0=J({},Kr,{propertyName:0,elapsedTime:0,pseudoElement:0}),s0=Lt(r0),a0=J({},Ka,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),l0=Lt(a0),i0=[9,13,27,32],Ei=p&&"CompositionEvent"in window,Hs=null;p&&"documentMode"in document&&(Hs=document.documentMode);var o0=p&&"TextEvent"in window&&!Hs,au=p&&(!Ei||Hs&&8<Hs&&11>=Hs),lu=" ",iu=!1;function ou(e,n){switch(e){case"keyup":return i0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qr=!1;function c0(e,n){switch(e){case"compositionend":return cu(n);case"keypress":return n.which!==32?null:(iu=!0,lu);case"textInput":return e=n.data,e===lu&&iu?null:e;default:return null}}function u0(e,n){if(qr)return e==="compositionend"||!Ei&&ou(e,n)?(e=eu(),Va=ji=Xn=null,qr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return au&&n.locale!=="ko"?null:n.data;default:return null}}var d0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function uu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!d0[e.type]:n==="textarea"}function du(e,n,a,o){Pa(o),n=Xa(n,"onChange"),0<n.length&&(a=new wi("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var $s=null,Vs=null;function m0(e){Ru(e,0)}function qa(e){var n=Zr(e);if(jn(n))return e}function f0(e,n){if(e==="change")return n}var mu=!1;if(p){var ki;if(p){var Ti="oninput"in document;if(!Ti){var fu=document.createElement("div");fu.setAttribute("oninput","return;"),Ti=typeof fu.oninput=="function"}ki=Ti}else ki=!1;mu=ki&&(!document.documentMode||9<document.documentMode)}function hu(){$s&&($s.detachEvent("onpropertychange",pu),Vs=$s=null)}function pu(e){if(e.propertyName==="value"&&qa(Vs)){var n=[];du(n,Vs,e,Es(e)),Ts(m0,n)}}function h0(e,n,a){e==="focusin"?(hu(),$s=n,Vs=a,$s.attachEvent("onpropertychange",pu)):e==="focusout"&&hu()}function p0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qa(Vs)}function x0(e,n){if(e==="click")return qa(n)}function g0(e,n){if(e==="input"||e==="change")return qa(n)}function y0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var rn=typeof Object.is=="function"?Object.is:y0;function Ws(e,n){if(rn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var u=a[o];if(!h.call(n,u)||!rn(e[u],n[u]))return!1}return!0}function xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gu(e,n){var a=xu(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=xu(a)}}function yu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?yu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function vu(){for(var e=window,n=et();n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=et(e.document)}return n}function Ri(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function v0(e){var n=vu(),a=e.focusedElem,o=e.selectionRange;if(n!==a&&a&&a.ownerDocument&&yu(a.ownerDocument.documentElement,a)){if(o!==null&&Ri(a)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in a)a.selectionStart=n,a.selectionEnd=Math.min(e,a.value.length);else if(e=(n=a.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var u=a.textContent.length,f=Math.min(o.start,u);o=o.end===void 0?f:Math.min(o.end,u),!e.extend&&f>o&&(u=o,o=f,f=u),u=gu(a,f);var x=gu(a,o);u&&x&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(u.node,u.offset),e.removeAllRanges(),f>o?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=a;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<n.length;a++)e=n[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var j0=p&&"documentMode"in document&&11>=document.documentMode,Yr=null,_i=null,Gs=null,Ai=!1;function ju(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ai||Yr==null||Yr!==et(o)||(o=Yr,"selectionStart"in o&&Ri(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Gs&&Ws(Gs,o)||(Gs=o,o=Xa(_i,"onSelect"),0<o.length&&(n=new wi("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Yr)))}function Ya(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Qr={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionend:Ya("Transition","TransitionEnd")},Pi={},wu={};p&&(wu=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function Qa(e){if(Pi[e])return Pi[e];if(!Qr[e])return e;var n=Qr[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in wu)return Pi[e]=n[a];return e}var Nu=Qa("animationend"),bu=Qa("animationiteration"),Su=Qa("animationstart"),Cu=Qa("transitionend"),Eu=new Map,ku="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Zn(e,n){Eu.set(e,n),d(n,[e])}for(var Li=0;Li<ku.length;Li++){var Oi=ku[Li],w0=Oi.toLowerCase(),N0=Oi[0].toUpperCase()+Oi.slice(1);Zn(w0,"on"+N0)}Zn(Nu,"onAnimationEnd"),Zn(bu,"onAnimationIteration"),Zn(Su,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(Cu,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),b0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ks));function Tu(e,n,a){var o=e.type||"unknown-event";e.currentTarget=a,en(o,n,void 0,e),e.currentTarget=null}function Ru(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],u=o.event;o=o.listeners;e:{var f=void 0;if(n)for(var x=o.length-1;0<=x;x--){var j=o[x],S=j.instance,O=j.currentTarget;if(j=j.listener,S!==f&&u.isPropagationStopped())break e;Tu(u,j,O),f=S}else for(x=0;x<o.length;x++){if(j=o[x],S=j.instance,O=j.currentTarget,j=j.listener,S!==f&&u.isPropagationStopped())break e;Tu(u,j,O),f=S}}}if(Nr)throw e=Wr,Nr=!1,Wr=null,e}function Fe(e,n){var a=n[Hi];a===void 0&&(a=n[Hi]=new Set);var o=e+"__bubble";a.has(o)||(_u(n,e,2,!1),a.add(o))}function Ii(e,n,a){var o=0;n&&(o|=4),_u(a,e,o,n)}var Ja="_reactListening"+Math.random().toString(36).slice(2);function qs(e){if(!e[Ja]){e[Ja]=!0,i.forEach(function(a){a!=="selectionchange"&&(b0.has(a)||Ii(a,!1,e),Ii(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ja]||(n[Ja]=!0,Ii("selectionchange",!1,n))}}function _u(e,n,a,o){switch(Zc(n)){case 1:var u=Dh;break;case 4:u=Fh;break;default:u=yi}a=u.bind(null,n,a,e),u=void 0,!Vr||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),o?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function Mi(e,n,a,o,u){var f=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var j=o.stateNode.containerInfo;if(j===u||j.nodeType===8&&j.parentNode===u)break;if(x===4)for(x=o.return;x!==null;){var S=x.tag;if((S===3||S===4)&&(S=x.stateNode.containerInfo,S===u||S.nodeType===8&&S.parentNode===u))return;x=x.return}for(;j!==null;){if(x=Sr(j),x===null)return;if(S=x.tag,S===5||S===6){o=f=x;continue e}j=j.parentNode}}o=o.return}Ts(function(){var O=f,H=Es(a),$=[];e:{var B=Eu.get(e);if(B!==void 0){var X=wi,ne=e;switch(e){case"keypress":if(Wa(a)===0)break e;case"keydown":case"keyup":X=Zh;break;case"focusin":ne="focus",X=Si;break;case"focusout":ne="blur",X=Si;break;case"beforeblur":case"afterblur":X=Si;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=zh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=n0;break;case Nu:case bu:case Su:X=Vh;break;case Cu:X=s0;break;case"scroll":X=Uh;break;case"wheel":X=l0;break;case"copy":case"cut":case"paste":X=Gh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=su}var le=(n&4)!==0,Ke=!le&&e==="scroll",_=le?B!==null?B+"Capture":null:B;le=[];for(var T=O,A;T!==null;){A=T;var G=A.stateNode;if(A.tag===5&&G!==null&&(A=G,_!==null&&(G=kn(T,_),G!=null&&le.push(Ys(T,G,A)))),Ke)break;T=T.return}0<le.length&&(B=new X(B,ne,null,a,H),$.push({event:B,listeners:le}))}}if((n&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",B&&a!==wr&&(ne=a.relatedTarget||a.fromElement)&&(Sr(ne)||ne[Tn]))break e;if((X||B)&&(B=H.window===H?H:(B=H.ownerDocument)?B.defaultView||B.parentWindow:window,X?(ne=a.relatedTarget||a.toElement,X=O,ne=ne?Sr(ne):null,ne!==null&&(Ke=hn(ne),ne!==Ke||ne.tag!==5&&ne.tag!==6)&&(ne=null)):(X=null,ne=O),X!==ne)){if(le=nu,G="onMouseLeave",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(le=su,G="onPointerLeave",_="onPointerEnter",T="pointer"),Ke=X==null?B:Zr(X),A=ne==null?B:Zr(ne),B=new le(G,T+"leave",X,a,H),B.target=Ke,B.relatedTarget=A,G=null,Sr(H)===O&&(le=new le(_,T+"enter",ne,a,H),le.target=A,le.relatedTarget=Ke,G=le),Ke=G,X&&ne)t:{for(le=X,_=ne,T=0,A=le;A;A=Jr(A))T++;for(A=0,G=_;G;G=Jr(G))A++;for(;0<T-A;)le=Jr(le),T--;for(;0<A-T;)_=Jr(_),A--;for(;T--;){if(le===_||_!==null&&le===_.alternate)break t;le=Jr(le),_=Jr(_)}le=null}else le=null;X!==null&&Au($,B,X,le,!1),ne!==null&&Ke!==null&&Au($,Ke,ne,le,!0)}}e:{if(B=O?Zr(O):window,X=B.nodeName&&B.nodeName.toLowerCase(),X==="select"||X==="input"&&B.type==="file")var oe=f0;else if(uu(B))if(mu)oe=g0;else{oe=p0;var fe=h0}else(X=B.nodeName)&&X.toLowerCase()==="input"&&(B.type==="checkbox"||B.type==="radio")&&(oe=x0);if(oe&&(oe=oe(e,O))){du($,oe,a,H);break e}fe&&fe(e,B,O),e==="focusout"&&(fe=B._wrapperState)&&fe.controlled&&B.type==="number"&&Bn(B,"number",B.value)}switch(fe=O?Zr(O):window,e){case"focusin":(uu(fe)||fe.contentEditable==="true")&&(Yr=fe,_i=O,Gs=null);break;case"focusout":Gs=_i=Yr=null;break;case"mousedown":Ai=!0;break;case"contextmenu":case"mouseup":case"dragend":Ai=!1,ju($,a,H);break;case"selectionchange":if(j0)break;case"keydown":case"keyup":ju($,a,H)}var he;if(Ei)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else qr?ou(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(au&&a.locale!=="ko"&&(qr||je!=="onCompositionStart"?je==="onCompositionEnd"&&qr&&(he=eu()):(Xn=H,ji="value"in Xn?Xn.value:Xn.textContent,qr=!0)),fe=Xa(O,je),0<fe.length&&(je=new ru(je,e,null,a,H),$.push({event:je,listeners:fe}),he?je.data=he:(he=cu(a),he!==null&&(je.data=he)))),(he=o0?c0(e,a):u0(e,a))&&(O=Xa(O,"onBeforeInput"),0<O.length&&(H=new ru("onBeforeInput","beforeinput",null,a,H),$.push({event:H,listeners:O}),H.data=he))}Ru($,n)})}function Ys(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Xa(e,n){for(var a=n+"Capture",o=[];e!==null;){var u=e,f=u.stateNode;u.tag===5&&f!==null&&(u=f,f=kn(e,a),f!=null&&o.unshift(Ys(e,f,u)),f=kn(e,n),f!=null&&o.push(Ys(e,f,u))),e=e.return}return o}function Jr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Au(e,n,a,o,u){for(var f=n._reactName,x=[];a!==null&&a!==o;){var j=a,S=j.alternate,O=j.stateNode;if(S!==null&&S===o)break;j.tag===5&&O!==null&&(j=O,u?(S=kn(a,f),S!=null&&x.unshift(Ys(a,S,j))):u||(S=kn(a,f),S!=null&&x.push(Ys(a,S,j)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var S0=/\r\n?/g,C0=/\u0000|\uFFFD/g;function Pu(e){return(typeof e=="string"?e:""+e).replace(S0,`
6
- `).replace(C0,"")}function Za(e,n,a){if(n=Pu(n),Pu(e)!==n&&a)throw Error(l(425))}function el(){}var Di=null,Fi=null;function Ui(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bi=typeof setTimeout=="function"?setTimeout:void 0,E0=typeof clearTimeout=="function"?clearTimeout:void 0,Lu=typeof Promise=="function"?Promise:void 0,k0=typeof queueMicrotask=="function"?queueMicrotask:typeof Lu<"u"?function(e){return Lu.resolve(null).then(e).catch(T0)}:Bi;function T0(e){setTimeout(function(){throw e})}function zi(e,n){var a=n,o=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(o===0){e.removeChild(u),Us(n);return}o--}else a!=="$"&&a!=="$?"&&a!=="$!"||o++;a=u}while(a);Us(n)}function er(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Ou(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(n===0)return e;n--}else a==="/$"&&n++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),pn="__reactFiber$"+Xr,Qs="__reactProps$"+Xr,Tn="__reactContainer$"+Xr,Hi="__reactEvents$"+Xr,R0="__reactListeners$"+Xr,_0="__reactHandles$"+Xr;function Sr(e){var n=e[pn];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Tn]||a[pn]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Ou(e);e!==null;){if(a=e[pn])return a;e=Ou(e)}return n}e=a,a=e.parentNode}return null}function Js(e){return e=e[pn]||e[Tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function tl(e){return e[Qs]||null}var $i=[],es=-1;function tr(e){return{current:e}}function Ue(e){0>es||(e.current=$i[es],$i[es]=null,es--)}function De(e,n){es++,$i[es]=e.current,e.current=n}var nr={},ut=tr(nr),bt=tr(!1),Cr=nr;function ts(e,n){var a=e.type.contextTypes;if(!a)return nr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var u={},f;for(f in a)u[f]=n[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=u),u}function St(e){return e=e.childContextTypes,e!=null}function nl(){Ue(bt),Ue(ut)}function Iu(e,n,a){if(ut.current!==nr)throw Error(l(168));De(ut,n),De(bt,a)}function Mu(e,n,a){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return a;o=o.getChildContext();for(var u in o)if(!(u in n))throw Error(l(108,ie(e)||"Unknown",u));return J({},a,o)}function rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||nr,Cr=ut.current,De(ut,e),De(bt,bt.current),!0}function Du(e,n,a){var o=e.stateNode;if(!o)throw Error(l(169));a?(e=Mu(e,n,Cr),o.__reactInternalMemoizedMergedChildContext=e,Ue(bt),Ue(ut),De(ut,e)):Ue(bt),De(bt,a)}var Rn=null,sl=!1,Vi=!1;function Fu(e){Rn===null?Rn=[e]:Rn.push(e)}function A0(e){sl=!0,Fu(e)}function rr(){if(!Vi&&Rn!==null){Vi=!0;var e=0,n=Oe;try{var a=Rn;for(Oe=1;e<a.length;e++){var o=a[e];do o=o(!0);while(o!==null)}Rn=null,sl=!1}catch(u){throw Rn!==null&&(Rn=Rn.slice(e+1)),C(tt,rr),u}finally{Oe=n,Vi=!1}}return null}var ns=[],rs=0,al=null,ll=0,$t=[],Vt=0,Er=null,_n=1,An="";function kr(e,n){ns[rs++]=ll,ns[rs++]=al,al=e,ll=n}function Uu(e,n,a){$t[Vt++]=_n,$t[Vt++]=An,$t[Vt++]=Er,Er=e;var o=_n;e=An;var u=32-nn(o)-1;o&=~(1<<u),a+=1;var f=32-nn(n)+u;if(30<f){var x=u-u%5;f=(o&(1<<x)-1).toString(32),o>>=x,u-=x,_n=1<<32-nn(n)+u|a<<u|o,An=f+e}else _n=1<<f|a<<u|o,An=e}function Wi(e){e.return!==null&&(kr(e,1),Uu(e,1,0))}function Gi(e){for(;e===al;)al=ns[--rs],ns[rs]=null,ll=ns[--rs],ns[rs]=null;for(;e===Er;)Er=$t[--Vt],$t[Vt]=null,An=$t[--Vt],$t[Vt]=null,_n=$t[--Vt],$t[Vt]=null}var Ot=null,It=null,Be=!1,sn=null;function Bu(e,n){var a=qt(5,null,null,0);a.elementType="DELETED",a.stateNode=n,a.return=e,n=e.deletions,n===null?(e.deletions=[a],e.flags|=16):n.push(a)}function zu(e,n){switch(e.tag){case 5:var a=e.type;return n=n.nodeType!==1||a.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Ot=e,It=er(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Ot=e,It=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(a=Er!==null?{id:_n,overflow:An}:null,e.memoizedState={dehydrated:n,treeContext:a,retryLane:1073741824},a=qt(18,null,null,0),a.stateNode=n,a.return=e,e.child=a,Ot=e,It=null,!0):!1;default:return!1}}function Ki(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qi(e){if(Be){var n=It;if(n){var a=n;if(!zu(e,n)){if(Ki(e))throw Error(l(418));n=er(a.nextSibling);var o=Ot;n&&zu(e,n)?Bu(o,a):(e.flags=e.flags&-4097|2,Be=!1,Ot=e)}}else{if(Ki(e))throw Error(l(418));e.flags=e.flags&-4097|2,Be=!1,Ot=e}}}function Hu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ot=e}function il(e){if(e!==Ot)return!1;if(!Be)return Hu(e),Be=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Ui(e.type,e.memoizedProps)),n&&(n=It)){if(Ki(e))throw $u(),Error(l(418));for(;n;)Bu(e,n),n=er(n.nextSibling)}if(Hu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(n===0){It=er(e.nextSibling);break e}n--}else a!=="$"&&a!=="$!"&&a!=="$?"||n++}e=e.nextSibling}It=null}}else It=Ot?er(e.stateNode.nextSibling):null;return!0}function $u(){for(var e=It;e;)e=er(e.nextSibling)}function ss(){It=Ot=null,Be=!1}function Yi(e){sn===null?sn=[e]:sn.push(e)}var P0=U.ReactCurrentBatchConfig;function Xs(e,n,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(l(309));var o=a.stateNode}if(!o)throw Error(l(147,e));var u=o,f=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===f?n.ref:(n=function(x){var j=u.refs;x===null?delete j[f]:j[f]=x},n._stringRef=f,n)}if(typeof e!="string")throw Error(l(284));if(!a._owner)throw Error(l(290,e))}return e}function ol(e,n){throw e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Vu(e){var n=e._init;return n(e._payload)}function Wu(e){function n(_,T){if(e){var A=_.deletions;A===null?(_.deletions=[T],_.flags|=16):A.push(T)}}function a(_,T){if(!e)return null;for(;T!==null;)n(_,T),T=T.sibling;return null}function o(_,T){for(_=new Map;T!==null;)T.key!==null?_.set(T.key,T):_.set(T.index,T),T=T.sibling;return _}function u(_,T){return _=dr(_,T),_.index=0,_.sibling=null,_}function f(_,T,A){return _.index=A,e?(A=_.alternate,A!==null?(A=A.index,A<T?(_.flags|=2,T):A):(_.flags|=2,T)):(_.flags|=1048576,T)}function x(_){return e&&_.alternate===null&&(_.flags|=2),_}function j(_,T,A,G){return T===null||T.tag!==6?(T=zo(A,_.mode,G),T.return=_,T):(T=u(T,A),T.return=_,T)}function S(_,T,A,G){var oe=A.type;return oe===Y?H(_,T,A.props.children,G,A.key):T!==null&&(T.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===me&&Vu(oe)===T.type)?(G=u(T,A.props),G.ref=Xs(_,T,A),G.return=_,G):(G=Pl(A.type,A.key,A.props,null,_.mode,G),G.ref=Xs(_,T,A),G.return=_,G)}function O(_,T,A,G){return T===null||T.tag!==4||T.stateNode.containerInfo!==A.containerInfo||T.stateNode.implementation!==A.implementation?(T=Ho(A,_.mode,G),T.return=_,T):(T=u(T,A.children||[]),T.return=_,T)}function H(_,T,A,G,oe){return T===null||T.tag!==7?(T=Ir(A,_.mode,G,oe),T.return=_,T):(T=u(T,A),T.return=_,T)}function $(_,T,A){if(typeof T=="string"&&T!==""||typeof T=="number")return T=zo(""+T,_.mode,A),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Q:return A=Pl(T.type,T.key,T.props,null,_.mode,A),A.ref=Xs(_,null,T),A.return=_,A;case de:return T=Ho(T,_.mode,A),T.return=_,T;case me:var G=T._init;return $(_,G(T._payload),A)}if(mn(T)||ae(T))return T=Ir(T,_.mode,A,null),T.return=_,T;ol(_,T)}return null}function B(_,T,A,G){var oe=T!==null?T.key:null;if(typeof A=="string"&&A!==""||typeof A=="number")return oe!==null?null:j(_,T,""+A,G);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Q:return A.key===oe?S(_,T,A,G):null;case de:return A.key===oe?O(_,T,A,G):null;case me:return oe=A._init,B(_,T,oe(A._payload),G)}if(mn(A)||ae(A))return oe!==null?null:H(_,T,A,G,null);ol(_,A)}return null}function X(_,T,A,G,oe){if(typeof G=="string"&&G!==""||typeof G=="number")return _=_.get(A)||null,j(T,_,""+G,oe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Q:return _=_.get(G.key===null?A:G.key)||null,S(T,_,G,oe);case de:return _=_.get(G.key===null?A:G.key)||null,O(T,_,G,oe);case me:var fe=G._init;return X(_,T,A,fe(G._payload),oe)}if(mn(G)||ae(G))return _=_.get(A)||null,H(T,_,G,oe,null);ol(T,G)}return null}function ne(_,T,A,G){for(var oe=null,fe=null,he=T,je=T=0,st=null;he!==null&&je<A.length;je++){he.index>je?(st=he,he=null):st=he.sibling;var Pe=B(_,he,A[je],G);if(Pe===null){he===null&&(he=st);break}e&&he&&Pe.alternate===null&&n(_,he),T=f(Pe,T,je),fe===null?oe=Pe:fe.sibling=Pe,fe=Pe,he=st}if(je===A.length)return a(_,he),Be&&kr(_,je),oe;if(he===null){for(;je<A.length;je++)he=$(_,A[je],G),he!==null&&(T=f(he,T,je),fe===null?oe=he:fe.sibling=he,fe=he);return Be&&kr(_,je),oe}for(he=o(_,he);je<A.length;je++)st=X(he,_,je,A[je],G),st!==null&&(e&&st.alternate!==null&&he.delete(st.key===null?je:st.key),T=f(st,T,je),fe===null?oe=st:fe.sibling=st,fe=st);return e&&he.forEach(function(mr){return n(_,mr)}),Be&&kr(_,je),oe}function le(_,T,A,G){var oe=ae(A);if(typeof oe!="function")throw Error(l(150));if(A=oe.call(A),A==null)throw Error(l(151));for(var fe=oe=null,he=T,je=T=0,st=null,Pe=A.next();he!==null&&!Pe.done;je++,Pe=A.next()){he.index>je?(st=he,he=null):st=he.sibling;var mr=B(_,he,Pe.value,G);if(mr===null){he===null&&(he=st);break}e&&he&&mr.alternate===null&&n(_,he),T=f(mr,T,je),fe===null?oe=mr:fe.sibling=mr,fe=mr,he=st}if(Pe.done)return a(_,he),Be&&kr(_,je),oe;if(he===null){for(;!Pe.done;je++,Pe=A.next())Pe=$(_,Pe.value,G),Pe!==null&&(T=f(Pe,T,je),fe===null?oe=Pe:fe.sibling=Pe,fe=Pe);return Be&&kr(_,je),oe}for(he=o(_,he);!Pe.done;je++,Pe=A.next())Pe=X(he,_,je,Pe.value,G),Pe!==null&&(e&&Pe.alternate!==null&&he.delete(Pe.key===null?je:Pe.key),T=f(Pe,T,je),fe===null?oe=Pe:fe.sibling=Pe,fe=Pe);return e&&he.forEach(function(dp){return n(_,dp)}),Be&&kr(_,je),oe}function Ke(_,T,A,G){if(typeof A=="object"&&A!==null&&A.type===Y&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Q:e:{for(var oe=A.key,fe=T;fe!==null;){if(fe.key===oe){if(oe=A.type,oe===Y){if(fe.tag===7){a(_,fe.sibling),T=u(fe,A.props.children),T.return=_,_=T;break e}}else if(fe.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===me&&Vu(oe)===fe.type){a(_,fe.sibling),T=u(fe,A.props),T.ref=Xs(_,fe,A),T.return=_,_=T;break e}a(_,fe);break}else n(_,fe);fe=fe.sibling}A.type===Y?(T=Ir(A.props.children,_.mode,G,A.key),T.return=_,_=T):(G=Pl(A.type,A.key,A.props,null,_.mode,G),G.ref=Xs(_,T,A),G.return=_,_=G)}return x(_);case de:e:{for(fe=A.key;T!==null;){if(T.key===fe)if(T.tag===4&&T.stateNode.containerInfo===A.containerInfo&&T.stateNode.implementation===A.implementation){a(_,T.sibling),T=u(T,A.children||[]),T.return=_,_=T;break e}else{a(_,T);break}else n(_,T);T=T.sibling}T=Ho(A,_.mode,G),T.return=_,_=T}return x(_);case me:return fe=A._init,Ke(_,T,fe(A._payload),G)}if(mn(A))return ne(_,T,A,G);if(ae(A))return le(_,T,A,G);ol(_,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,T!==null&&T.tag===6?(a(_,T.sibling),T=u(T,A),T.return=_,_=T):(a(_,T),T=zo(A,_.mode,G),T.return=_,_=T),x(_)):a(_,T)}return Ke}var as=Wu(!0),Gu=Wu(!1),cl=tr(null),ul=null,ls=null,Qi=null;function Ji(){Qi=ls=ul=null}function Xi(e){var n=cl.current;Ue(cl),e._currentValue=n}function Zi(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function is(e,n){ul=e,Qi=ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Ct=!0),e.firstContext=null)}function Wt(e){var n=e._currentValue;if(Qi!==e)if(e={context:e,memoizedValue:n,next:null},ls===null){if(ul===null)throw Error(l(308));ls=e,ul.dependencies={lanes:0,firstContext:e}}else ls=ls.next=e;return n}var Tr=null;function eo(e){Tr===null?Tr=[e]:Tr.push(e)}function Ku(e,n,a,o){var u=n.interleaved;return u===null?(a.next=a,eo(n)):(a.next=u.next,u.next=a),n.interleaved=a,Pn(e,o)}function Pn(e,n){e.lanes|=n;var a=e.alternate;for(a!==null&&(a.lanes|=n),a=e,e=e.return;e!==null;)e.childLanes|=n,a=e.alternate,a!==null&&(a.childLanes|=n),a=e,e=e.return;return a.tag===3?a.stateNode:null}var sr=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ln(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function ar(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(_e&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,Pn(e,a)}return u=o.interleaved,u===null?(n.next=n,eo(o)):(n.next=u.next,u.next=n),o.interleaved=n,Pn(e,a)}function dl(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,pi(e,a)}}function Yu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};f===null?u=f=x:f=f.next=x,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}function ml(e,n,a,o){var u=e.updateQueue;sr=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var S=j,O=S.next;S.next=null,x===null?f=O:x.next=O,x=S;var H=e.alternate;H!==null&&(H=H.updateQueue,j=H.lastBaseUpdate,j!==x&&(j===null?H.firstBaseUpdate=O:j.next=O,H.lastBaseUpdate=S))}if(f!==null){var $=u.baseState;x=0,H=O=S=null,j=f;do{var B=j.lane,X=j.eventTime;if((o&B)===B){H!==null&&(H=H.next={eventTime:X,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var ne=e,le=j;switch(B=n,X=a,le.tag){case 1:if(ne=le.payload,typeof ne=="function"){$=ne.call(X,$,B);break e}$=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=le.payload,B=typeof ne=="function"?ne.call(X,$,B):ne,B==null)break e;$=J({},$,B);break e;case 2:sr=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,B=u.effects,B===null?u.effects=[j]:B.push(j))}else X={eventTime:X,lane:B,tag:j.tag,payload:j.payload,callback:j.callback,next:null},H===null?(O=H=X,S=$):H=H.next=X,x|=B;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;B=j,j=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);if(H===null&&(S=$),u.baseState=S,u.firstBaseUpdate=O,u.lastBaseUpdate=H,n=u.shared.interleaved,n!==null){u=n;do x|=u.lane,u=u.next;while(u!==n)}else f===null&&(u.shared.lanes=0);Ar|=x,e.lanes=x,e.memoizedState=$}}function Qu(e,n,a){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],u=o.callback;if(u!==null){if(o.callback=null,o=a,typeof u!="function")throw Error(l(191,u));u.call(o)}}}var Zs={},xn=tr(Zs),ea=tr(Zs),ta=tr(Zs);function Rr(e){if(e===Zs)throw Error(l(174));return e}function no(e,n){switch(De(ta,n),De(ea,e),De(xn,Zs),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Nt(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Nt(n,e)}Ue(xn),De(xn,n)}function os(){Ue(xn),Ue(ea),Ue(ta)}function Ju(e){Rr(ta.current);var n=Rr(xn.current),a=Nt(n,e.type);n!==a&&(De(ea,e),De(xn,a))}function ro(e){ea.current===e&&(Ue(xn),Ue(ea))}var ze=tr(0);function fl(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var so=[];function ao(){for(var e=0;e<so.length;e++)so[e]._workInProgressVersionPrimary=null;so.length=0}var hl=U.ReactCurrentDispatcher,lo=U.ReactCurrentBatchConfig,_r=0,He=null,Xe=null,nt=null,pl=!1,na=!1,ra=0,L0=0;function dt(){throw Error(l(321))}function io(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!rn(e[a],n[a]))return!1;return!0}function oo(e,n,a,o,u,f){if(_r=f,He=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,hl.current=e===null||e.memoizedState===null?D0:F0,e=a(o,u),na){f=0;do{if(na=!1,ra=0,25<=f)throw Error(l(301));f+=1,nt=Xe=null,n.updateQueue=null,hl.current=U0,e=a(o,u)}while(na)}if(hl.current=yl,n=Xe!==null&&Xe.next!==null,_r=0,nt=Xe=He=null,pl=!1,n)throw Error(l(300));return e}function co(){var e=ra!==0;return ra=0,e}function gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?He.memoizedState=nt=e:nt=nt.next=e,nt}function Gt(){if(Xe===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var n=nt===null?He.memoizedState:nt.next;if(n!==null)nt=n,Xe=e;else{if(e===null)throw Error(l(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},nt===null?He.memoizedState=nt=e:nt=nt.next=e}return nt}function sa(e,n){return typeof n=="function"?n(e):n}function uo(e){var n=Gt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=Xe,u=o.baseQueue,f=a.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}o.baseQueue=u=f,a.pending=null}if(u!==null){f=u.next,o=o.baseState;var j=x=null,S=null,O=f;do{var H=O.lane;if((_r&H)===H)S!==null&&(S=S.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),o=O.hasEagerState?O.eagerState:e(o,O.action);else{var $={lane:H,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};S===null?(j=S=$,x=o):S=S.next=$,He.lanes|=H,Ar|=H}O=O.next}while(O!==null&&O!==f);S===null?x=o:S.next=j,rn(o,n.memoizedState)||(Ct=!0),n.memoizedState=o,n.baseState=x,n.baseQueue=S,a.lastRenderedState=o}if(e=a.interleaved,e!==null){u=e;do f=u.lane,He.lanes|=f,Ar|=f,u=u.next;while(u!==e)}else u===null&&(a.lanes=0);return[n.memoizedState,a.dispatch]}function mo(e){var n=Gt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var o=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);rn(f,n.memoizedState)||(Ct=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,o]}function Xu(){}function Zu(e,n){var a=He,o=Gt(),u=n(),f=!rn(o.memoizedState,u);if(f&&(o.memoizedState=u,Ct=!0),o=o.queue,fo(nd.bind(null,a,o,e),[e]),o.getSnapshot!==n||f||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,aa(9,td.bind(null,a,o,u,n),void 0,null),rt===null)throw Error(l(349));(_r&30)!==0||ed(a,n,u)}return u}function ed(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=He.updateQueue,n===null?(n={lastEffect:null,stores:null},He.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function td(e,n,a,o){n.value=a,n.getSnapshot=o,rd(n)&&sd(e)}function nd(e,n,a){return a(function(){rd(n)&&sd(e)})}function rd(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!rn(e,a)}catch{return!0}}function sd(e){var n=Pn(e,1);n!==null&&cn(n,e,1,-1)}function ad(e){var n=gn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},n.queue=e,e=e.dispatch=M0.bind(null,He,e),[n.memoizedState,e]}function aa(e,n,a,o){return e={tag:e,create:n,destroy:a,deps:o,next:null},n=He.updateQueue,n===null?(n={lastEffect:null,stores:null},He.updateQueue=n,n.lastEffect=e.next=e):(a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e)),e}function ld(){return Gt().memoizedState}function xl(e,n,a,o){var u=gn();He.flags|=e,u.memoizedState=aa(1|n,a,void 0,o===void 0?null:o)}function gl(e,n,a,o){var u=Gt();o=o===void 0?null:o;var f=void 0;if(Xe!==null){var x=Xe.memoizedState;if(f=x.destroy,o!==null&&io(o,x.deps)){u.memoizedState=aa(n,a,f,o);return}}He.flags|=e,u.memoizedState=aa(1|n,a,f,o)}function id(e,n){return xl(8390656,8,e,n)}function fo(e,n){return gl(2048,8,e,n)}function od(e,n){return gl(4,2,e,n)}function cd(e,n){return gl(4,4,e,n)}function ud(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function dd(e,n,a){return a=a!=null?a.concat([e]):null,gl(4,4,ud.bind(null,n,e),a)}function ho(){}function md(e,n){var a=Gt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&io(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function fd(e,n){var a=Gt();n=n===void 0?null:n;var o=a.memoizedState;return o!==null&&n!==null&&io(n,o[1])?o[0]:(e=e(),a.memoizedState=[e,n],e)}function hd(e,n,a){return(_r&21)===0?(e.baseState&&(e.baseState=!1,Ct=!0),e.memoizedState=a):(rn(a,n)||(a=Vc(),He.lanes|=a,Ar|=a,e.baseState=!0),n)}function O0(e,n){var a=Oe;Oe=a!==0&&4>a?a:4,e(!0);var o=lo.transition;lo.transition={};try{e(!1),n()}finally{Oe=a,lo.transition=o}}function pd(){return Gt().memoizedState}function I0(e,n,a){var o=cr(e);if(a={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null},xd(e))gd(n,a);else if(a=Ku(e,n,a,o),a!==null){var u=yt();cn(a,e,o,u),yd(a,n,o)}}function M0(e,n,a){var o=cr(e),u={lane:o,action:a,hasEagerState:!1,eagerState:null,next:null};if(xd(e))gd(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var x=n.lastRenderedState,j=f(x,a);if(u.hasEagerState=!0,u.eagerState=j,rn(j,x)){var S=n.interleaved;S===null?(u.next=u,eo(n)):(u.next=S.next,S.next=u),n.interleaved=u;return}}catch{}a=Ku(e,n,u,o),a!==null&&(u=yt(),cn(a,e,o,u),yd(a,n,o))}}function xd(e){var n=e.alternate;return e===He||n!==null&&n===He}function gd(e,n){na=pl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function yd(e,n,a){if((a&4194240)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,pi(e,a)}}var yl={readContext:Wt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},D0={readContext:Wt,useCallback:function(e,n){return gn().memoizedState=[e,n===void 0?null:n],e},useContext:Wt,useEffect:id,useImperativeHandle:function(e,n,a){return a=a!=null?a.concat([e]):null,xl(4194308,4,ud.bind(null,n,e),a)},useLayoutEffect:function(e,n){return xl(4194308,4,e,n)},useInsertionEffect:function(e,n){return xl(4,2,e,n)},useMemo:function(e,n){var a=gn();return n=n===void 0?null:n,e=e(),a.memoizedState=[e,n],e},useReducer:function(e,n,a){var o=gn();return n=a!==void 0?a(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=I0.bind(null,He,e),[o.memoizedState,e]},useRef:function(e){var n=gn();return e={current:e},n.memoizedState=e},useState:ad,useDebugValue:ho,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=ad(!1),n=e[0];return e=O0.bind(null,e[1]),gn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,a){var o=He,u=gn();if(Be){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),rt===null)throw Error(l(349));(_r&30)!==0||ed(o,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,id(nd.bind(null,o,f,e),[e]),o.flags|=2048,aa(9,td.bind(null,o,f,a,n),void 0,null),a},useId:function(){var e=gn(),n=rt.identifierPrefix;if(Be){var a=An,o=_n;a=(o&~(1<<32-nn(o)-1)).toString(32)+a,n=":"+n+"R"+a,a=ra++,0<a&&(n+="H"+a.toString(32)),n+=":"}else a=L0++,n=":"+n+"r"+a.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},F0={readContext:Wt,useCallback:md,useContext:Wt,useEffect:fo,useImperativeHandle:dd,useInsertionEffect:od,useLayoutEffect:cd,useMemo:fd,useReducer:uo,useRef:ld,useState:function(){return uo(sa)},useDebugValue:ho,useDeferredValue:function(e){var n=Gt();return hd(n,Xe.memoizedState,e)},useTransition:function(){var e=uo(sa)[0],n=Gt().memoizedState;return[e,n]},useMutableSource:Xu,useSyncExternalStore:Zu,useId:pd,unstable_isNewReconciler:!1},U0={readContext:Wt,useCallback:md,useContext:Wt,useEffect:fo,useImperativeHandle:dd,useInsertionEffect:od,useLayoutEffect:cd,useMemo:fd,useReducer:mo,useRef:ld,useState:function(){return mo(sa)},useDebugValue:ho,useDeferredValue:function(e){var n=Gt();return Xe===null?n.memoizedState=e:hd(n,Xe.memoizedState,e)},useTransition:function(){var e=mo(sa)[0],n=Gt().memoizedState;return[e,n]},useMutableSource:Xu,useSyncExternalStore:Zu,useId:pd,unstable_isNewReconciler:!1};function an(e,n){if(e&&e.defaultProps){n=J({},n),e=e.defaultProps;for(var a in e)n[a]===void 0&&(n[a]=e[a]);return n}return n}function po(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:J({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var vl={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,n,a){e=e._reactInternals;var o=yt(),u=cr(e),f=Ln(o,u);f.payload=n,a!=null&&(f.callback=a),n=ar(e,f,u),n!==null&&(cn(n,e,u,o),dl(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=yt(),u=cr(e),f=Ln(o,u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=ar(e,f,u),n!==null&&(cn(n,e,u,o),dl(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=yt(),o=cr(e),u=Ln(a,o);u.tag=2,n!=null&&(u.callback=n),n=ar(e,u,o),n!==null&&(cn(n,e,o,a),dl(n,e,o))}};function vd(e,n,a,o,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,x):n.prototype&&n.prototype.isPureReactComponent?!Ws(a,o)||!Ws(u,f):!0}function jd(e,n,a){var o=!1,u=nr,f=n.contextType;return typeof f=="object"&&f!==null?f=Wt(f):(u=St(n)?Cr:ut.current,o=n.contextTypes,f=(o=o!=null)?ts(e,u):nr),n=new n(a,f),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=vl,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=f),n}function wd(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&vl.enqueueReplaceState(n,n.state,null)}function xo(e,n,a,o){var u=e.stateNode;u.props=a,u.state=e.memoizedState,u.refs={},to(e);var f=n.contextType;typeof f=="object"&&f!==null?u.context=Wt(f):(f=St(n)?Cr:ut.current,u.context=ts(e,f)),u.state=e.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(po(e,n,f,a),u.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(n=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),n!==u.state&&vl.enqueueReplaceState(u,u.state,null),ml(e,a,u,o),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function cs(e,n){try{var a="",o=n;do a+=W(o),o=o.return;while(o);var u=a}catch(f){u=`
7
- Error generating stack: `+f.message+`
8
- `+f.stack}return{value:e,source:n,stack:u,digest:null}}function go(e,n,a){return{value:e,source:null,stack:a??null,digest:n??null}}function yo(e,n){try{console.error(n.value)}catch(a){setTimeout(function(){throw a})}}var B0=typeof WeakMap=="function"?WeakMap:Map;function Nd(e,n,a){a=Ln(-1,a),a.tag=3,a.payload={element:null};var o=n.value;return a.callback=function(){El||(El=!0,Lo=o),yo(e,n)},a}function bd(e,n,a){a=Ln(-1,a),a.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;a.payload=function(){return o(u)},a.callback=function(){yo(e,n)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(a.callback=function(){yo(e,n),typeof o!="function"&&(ir===null?ir=new Set([this]):ir.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),a}function Sd(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new B0;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(u.add(a),e=ep.bind(null,e,n,a),n.then(e,e))}function Cd(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Ed(e,n,a,o,u){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(n=Ln(-1,1),n.tag=2,ar(a,n,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var z0=U.ReactCurrentOwner,Ct=!1;function gt(e,n,a,o){n.child=e===null?Gu(n,null,a,o):as(n,e.child,a,o)}function kd(e,n,a,o,u){a=a.render;var f=n.ref;return is(n,u),o=oo(e,n,a,o,f,u),a=co(),e!==null&&!Ct?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,On(e,n,u)):(Be&&a&&Wi(n),n.flags|=1,gt(e,n,o,u),n.child)}function Td(e,n,a,o,u){if(e===null){var f=a.type;return typeof f=="function"&&!Bo(f)&&f.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(n.tag=15,n.type=f,Rd(e,n,f,o,u)):(e=Pl(a.type,null,o,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,(e.lanes&u)===0){var x=f.memoizedProps;if(a=a.compare,a=a!==null?a:Ws,a(x,o)&&e.ref===n.ref)return On(e,n,u)}return n.flags|=1,e=dr(f,o),e.ref=n.ref,e.return=n,n.child=e}function Rd(e,n,a,o,u){if(e!==null){var f=e.memoizedProps;if(Ws(f,o)&&e.ref===n.ref)if(Ct=!1,n.pendingProps=o=f,(e.lanes&u)!==0)(e.flags&131072)!==0&&(Ct=!0);else return n.lanes=e.lanes,On(e,n,u)}return vo(e,n,a,o,u)}function _d(e,n,a){var o=n.pendingProps,u=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(ds,Mt),Mt|=a;else{if((a&1073741824)===0)return e=f!==null?f.baseLanes|a:a,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,De(ds,Mt),Mt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:a,De(ds,Mt),Mt|=o}else f!==null?(o=f.baseLanes|a,n.memoizedState=null):o=a,De(ds,Mt),Mt|=o;return gt(e,n,u,a),n.child}function Ad(e,n){var a=n.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(n.flags|=512,n.flags|=2097152)}function vo(e,n,a,o,u){var f=St(a)?Cr:ut.current;return f=ts(n,f),is(n,u),a=oo(e,n,a,o,f,u),o=co(),e!==null&&!Ct?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~u,On(e,n,u)):(Be&&o&&Wi(n),n.flags|=1,gt(e,n,a,u),n.child)}function Pd(e,n,a,o,u){if(St(a)){var f=!0;rl(n)}else f=!1;if(is(n,u),n.stateNode===null)wl(e,n),jd(n,a,o),xo(n,a,o,u),o=!0;else if(e===null){var x=n.stateNode,j=n.memoizedProps;x.props=j;var S=x.context,O=a.contextType;typeof O=="object"&&O!==null?O=Wt(O):(O=St(a)?Cr:ut.current,O=ts(n,O));var H=a.getDerivedStateFromProps,$=typeof H=="function"||typeof x.getSnapshotBeforeUpdate=="function";$||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==o||S!==O)&&wd(n,x,o,O),sr=!1;var B=n.memoizedState;x.state=B,ml(n,o,x,u),S=n.memoizedState,j!==o||B!==S||bt.current||sr?(typeof H=="function"&&(po(n,a,H,o),S=n.memoizedState),(j=sr||vd(n,a,j,o,B,S,O))?($||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=S),x.props=o,x.state=S,x.context=O,o=j):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{x=n.stateNode,qu(e,n),j=n.memoizedProps,O=n.type===n.elementType?j:an(n.type,j),x.props=O,$=n.pendingProps,B=x.context,S=a.contextType,typeof S=="object"&&S!==null?S=Wt(S):(S=St(a)?Cr:ut.current,S=ts(n,S));var X=a.getDerivedStateFromProps;(H=typeof X=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(j!==$||B!==S)&&wd(n,x,o,S),sr=!1,B=n.memoizedState,x.state=B,ml(n,o,x,u);var ne=n.memoizedState;j!==$||B!==ne||bt.current||sr?(typeof X=="function"&&(po(n,a,X,o),ne=n.memoizedState),(O=sr||vd(n,a,O,o,B,ne,S)||!1)?(H||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(o,ne,S),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(o,ne,S)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ne),x.props=o,x.state=ne,x.context=S,o=O):(typeof x.componentDidUpdate!="function"||j===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),o=!1)}return jo(e,n,a,o,f,u)}function jo(e,n,a,o,u,f){Ad(e,n);var x=(n.flags&128)!==0;if(!o&&!x)return u&&Du(n,a,!1),On(e,n,f);o=n.stateNode,z0.current=n;var j=x&&typeof a.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&x?(n.child=as(n,e.child,null,f),n.child=as(n,null,j,f)):gt(e,n,j,f),n.memoizedState=o.state,u&&Du(n,a,!0),n.child}function Ld(e){var n=e.stateNode;n.pendingContext?Iu(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Iu(e,n.context,!1),no(e,n.containerInfo)}function Od(e,n,a,o,u){return ss(),Yi(u),n.flags|=256,gt(e,n,a,o),n.child}var wo={dehydrated:null,treeContext:null,retryLane:0};function No(e){return{baseLanes:e,cachePool:null,transitions:null}}function Id(e,n,a){var o=n.pendingProps,u=ze.current,f=!1,x=(n.flags&128)!==0,j;if((j=x)||(j=e!==null&&e.memoizedState===null?!1:(u&2)!==0),j?(f=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),De(ze,u&1),e===null)return qi(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=o.children,e=o.fallback,f?(o=n.mode,f=n.child,x={mode:"hidden",children:x},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=x):f=Ll(x,o,0,null),e=Ir(e,o,a,null),f.return=n,e.return=n,f.sibling=e,n.child=f,n.child.memoizedState=No(a),n.memoizedState=wo,e):bo(n,x));if(u=e.memoizedState,u!==null&&(j=u.dehydrated,j!==null))return H0(e,n,x,o,j,u,a);if(f){f=o.fallback,x=n.mode,u=e.child,j=u.sibling;var S={mode:"hidden",children:o.children};return(x&1)===0&&n.child!==u?(o=n.child,o.childLanes=0,o.pendingProps=S,n.deletions=null):(o=dr(u,S),o.subtreeFlags=u.subtreeFlags&14680064),j!==null?f=dr(j,f):(f=Ir(f,x,a,null),f.flags|=2),f.return=n,o.return=n,o.sibling=f,n.child=o,o=f,f=n.child,x=e.child.memoizedState,x=x===null?No(a):{baseLanes:x.baseLanes|a,cachePool:null,transitions:x.transitions},f.memoizedState=x,f.childLanes=e.childLanes&~a,n.memoizedState=wo,o}return f=e.child,e=f.sibling,o=dr(f,{mode:"visible",children:o.children}),(n.mode&1)===0&&(o.lanes=a),o.return=n,o.sibling=null,e!==null&&(a=n.deletions,a===null?(n.deletions=[e],n.flags|=16):a.push(e)),n.child=o,n.memoizedState=null,o}function bo(e,n){return n=Ll({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function jl(e,n,a,o){return o!==null&&Yi(o),as(n,e.child,null,a),e=bo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function H0(e,n,a,o,u,f,x){if(a)return n.flags&256?(n.flags&=-257,o=go(Error(l(422))),jl(e,n,x,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(f=o.fallback,u=n.mode,o=Ll({mode:"visible",children:o.children},u,0,null),f=Ir(f,u,x,null),f.flags|=2,o.return=n,f.return=n,o.sibling=f,n.child=o,(n.mode&1)!==0&&as(n,e.child,null,x),n.child.memoizedState=No(x),n.memoizedState=wo,f);if((n.mode&1)===0)return jl(e,n,x,null);if(u.data==="$!"){if(o=u.nextSibling&&u.nextSibling.dataset,o)var j=o.dgst;return o=j,f=Error(l(419)),o=go(f,o,void 0),jl(e,n,x,o)}if(j=(x&e.childLanes)!==0,Ct||j){if(o=rt,o!==null){switch(x&-x){case 4:u=2;break;case 16:u=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(o.suspendedLanes|x))!==0?0:u,u!==0&&u!==f.retryLane&&(f.retryLane=u,Pn(e,u),cn(o,e,u,-1))}return Uo(),o=go(Error(l(421))),jl(e,n,x,o)}return u.data==="$?"?(n.flags|=128,n.child=e.child,n=tp.bind(null,e),u._reactRetry=n,null):(e=f.treeContext,It=er(u.nextSibling),Ot=n,Be=!0,sn=null,e!==null&&($t[Vt++]=_n,$t[Vt++]=An,$t[Vt++]=Er,_n=e.id,An=e.overflow,Er=n),n=bo(n,o.children),n.flags|=4096,n)}function Md(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Zi(e.return,n,a)}function So(e,n,a,o,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:u}:(f.isBackwards=n,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=a,f.tailMode=u)}function Dd(e,n,a){var o=n.pendingProps,u=o.revealOrder,f=o.tail;if(gt(e,n,o.children,a),o=ze.current,(o&2)!==0)o=o&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Md(e,a,n);else if(e.tag===19)Md(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(De(ze,o),(n.mode&1)===0)n.memoizedState=null;else switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&fl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),So(n,!1,u,a,f);break;case"backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&fl(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}So(n,!0,a,null,f);break;case"together":So(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function wl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function On(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Ar|=n.lanes,(a&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,a=dr(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=dr(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function $0(e,n,a){switch(n.tag){case 3:Ld(n),ss();break;case 5:Ju(n);break;case 1:St(n.type)&&rl(n);break;case 4:no(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,u=n.memoizedProps.value;De(cl,o._currentValue),o._currentValue=u;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(De(ze,ze.current&1),n.flags|=128,null):(a&n.child.childLanes)!==0?Id(e,n,a):(De(ze,ze.current&1),e=On(e,n,a),e!==null?e.sibling:null);De(ze,ze.current&1);break;case 19:if(o=(a&n.childLanes)!==0,(e.flags&128)!==0){if(o)return Dd(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),De(ze,ze.current),o)break;return null;case 22:case 23:return n.lanes=0,_d(e,n,a)}return On(e,n,a)}var Fd,Co,Ud,Bd;Fd=function(e,n){for(var a=n.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Co=function(){},Ud=function(e,n,a,o){var u=e.memoizedProps;if(u!==o){e=n.stateNode,Rr(xn.current);var f=null;switch(a){case"input":u=xt(e,u),o=xt(e,o),f=[];break;case"select":u=J({},u,{value:void 0}),o=J({},o,{value:void 0}),f=[];break;case"textarea":u=Hr(e,u),o=Hr(e,o),f=[];break;default:typeof u.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=el)}fn(a,o);var x;a=null;for(O in u)if(!o.hasOwnProperty(O)&&u.hasOwnProperty(O)&&u[O]!=null)if(O==="style"){var j=u[O];for(x in j)j.hasOwnProperty(x)&&(a||(a={}),a[x]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(c.hasOwnProperty(O)?f||(f=[]):(f=f||[]).push(O,null));for(O in o){var S=o[O];if(j=u?.[O],o.hasOwnProperty(O)&&S!==j&&(S!=null||j!=null))if(O==="style")if(j){for(x in j)!j.hasOwnProperty(x)||S&&S.hasOwnProperty(x)||(a||(a={}),a[x]="");for(x in S)S.hasOwnProperty(x)&&j[x]!==S[x]&&(a||(a={}),a[x]=S[x])}else a||(f||(f=[]),f.push(O,a)),a=S;else O==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,j=j?j.__html:void 0,S!=null&&j!==S&&(f=f||[]).push(O,S)):O==="children"?typeof S!="string"&&typeof S!="number"||(f=f||[]).push(O,""+S):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(c.hasOwnProperty(O)?(S!=null&&O==="onScroll"&&Fe("scroll",e),f||j===S||(f=[])):(f=f||[]).push(O,S))}a&&(f=f||[]).push("style",a);var O=f;(n.updateQueue=O)&&(n.flags|=4)}},Bd=function(e,n,a,o){a!==o&&(n.flags|=4)};function la(e,n){if(!Be)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function mt(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags&14680064,o|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,o|=u.subtreeFlags,o|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function V0(e,n,a){var o=n.pendingProps;switch(Gi(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(n),null;case 1:return St(n.type)&&nl(),mt(n),null;case 3:return o=n.stateNode,os(),Ue(bt),Ue(ut),ao(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(il(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,sn!==null&&(Mo(sn),sn=null))),Co(e,n),mt(n),null;case 5:ro(n);var u=Rr(ta.current);if(a=n.type,e!==null&&n.stateNode!=null)Ud(e,n,a,o,u),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(l(166));return mt(n),null}if(e=Rr(xn.current),il(n)){o=n.stateNode,a=n.type;var f=n.memoizedProps;switch(o[pn]=n,o[Qs]=f,e=(n.mode&1)!==0,a){case"dialog":Fe("cancel",o),Fe("close",o);break;case"iframe":case"object":case"embed":Fe("load",o);break;case"video":case"audio":for(u=0;u<Ks.length;u++)Fe(Ks[u],o);break;case"source":Fe("error",o);break;case"img":case"image":case"link":Fe("error",o),Fe("load",o);break;case"details":Fe("toggle",o);break;case"input":At(o,f),Fe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Fe("invalid",o);break;case"textarea":_a(o,f),Fe("invalid",o)}fn(a,f),u=null;for(var x in f)if(f.hasOwnProperty(x)){var j=f[x];x==="children"?typeof j=="string"?o.textContent!==j&&(f.suppressHydrationWarning!==!0&&Za(o.textContent,j,e),u=["children",j]):typeof j=="number"&&o.textContent!==""+j&&(f.suppressHydrationWarning!==!0&&Za(o.textContent,j,e),u=["children",""+j]):c.hasOwnProperty(x)&&j!=null&&x==="onScroll"&&Fe("scroll",o)}switch(a){case"input":Bt(o),Nn(o,f,!0);break;case"textarea":Bt(o),zn(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=el)}o=u,n.updateQueue=o,o!==null&&(n.flags|=4)}else{x=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Sn(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=x.createElement(a,{is:o.is}):(e=x.createElement(a),a==="select"&&(x=e,o.multiple?x.multiple=!0:o.size&&(x.size=o.size))):e=x.createElementNS(e,a),e[pn]=n,e[Qs]=o,Fd(e,n,!1,!1),n.stateNode=e;e:{switch(x=jr(a,o),a){case"dialog":Fe("cancel",e),Fe("close",e),u=o;break;case"iframe":case"object":case"embed":Fe("load",e),u=o;break;case"video":case"audio":for(u=0;u<Ks.length;u++)Fe(Ks[u],e);u=o;break;case"source":Fe("error",e),u=o;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),u=o;break;case"details":Fe("toggle",e),u=o;break;case"input":At(e,o),u=xt(e,o),Fe("invalid",e);break;case"option":u=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},u=J({},o,{value:void 0}),Fe("invalid",e);break;case"textarea":_a(e,o),u=Hr(e,o),Fe("invalid",e);break;default:u=o}fn(a,u),j=u;for(f in j)if(j.hasOwnProperty(f)){var S=j[f];f==="style"?vr(e,S):f==="dangerouslySetInnerHTML"?(S=S?S.__html:void 0,S!=null&&Cs(e,S)):f==="children"?typeof S=="string"?(a!=="textarea"||S!=="")&&$n(e,S):typeof S=="number"&&$n(e,""+S):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(c.hasOwnProperty(f)?S!=null&&f==="onScroll"&&Fe("scroll",e):S!=null&&P(e,f,S,x))}switch(a){case"input":Bt(e),Nn(e,o,!1);break;case"textarea":Bt(e),zn(e);break;case"option":o.value!=null&&e.setAttribute("value",""+xe(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?bn(e,!!o.multiple,f,!1):o.defaultValue!=null&&bn(e,!!o.multiple,o.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=el)}switch(a){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return mt(n),null;case 6:if(e&&n.stateNode!=null)Bd(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(a=Rr(ta.current),Rr(xn.current),il(n)){if(o=n.stateNode,a=n.memoizedProps,o[pn]=n,(f=o.nodeValue!==a)&&(e=Ot,e!==null))switch(e.tag){case 3:Za(o.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Za(o.nodeValue,a,(e.mode&1)!==0)}f&&(n.flags|=4)}else o=(a.nodeType===9?a:a.ownerDocument).createTextNode(o),o[pn]=n,n.stateNode=o}return mt(n),null;case 13:if(Ue(ze),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Be&&It!==null&&(n.mode&1)!==0&&(n.flags&128)===0)$u(),ss(),n.flags|=98560,f=!1;else if(f=il(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[pn]=n}else ss(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;mt(n),f=!1}else sn!==null&&(Mo(sn),sn=null),f=!0;if(!f)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=a,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(ze.current&1)!==0?Ze===0&&(Ze=3):Uo())),n.updateQueue!==null&&(n.flags|=4),mt(n),null);case 4:return os(),Co(e,n),e===null&&qs(n.stateNode.containerInfo),mt(n),null;case 10:return Xi(n.type._context),mt(n),null;case 17:return St(n.type)&&nl(),mt(n),null;case 19:if(Ue(ze),f=n.memoizedState,f===null)return mt(n),null;if(o=(n.flags&128)!==0,x=f.rendering,x===null)if(o)la(f,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=fl(e),x!==null){for(n.flags|=128,la(f,!1),o=x.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=a,a=n.child;a!==null;)f=a,e=o,f.flags&=14680066,x=f.alternate,x===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=x.childLanes,f.lanes=x.lanes,f.child=x.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=x.memoizedProps,f.memoizedState=x.memoizedState,f.updateQueue=x.updateQueue,f.type=x.type,e=x.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return De(ze,ze.current&1|2),n.child}e=e.sibling}f.tail!==null&&Ce()>ms&&(n.flags|=128,o=!0,la(f,!1),n.lanes=4194304)}else{if(!o)if(e=fl(x),e!==null){if(n.flags|=128,o=!0,a=e.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),la(f,!0),f.tail===null&&f.tailMode==="hidden"&&!x.alternate&&!Be)return mt(n),null}else 2*Ce()-f.renderingStartTime>ms&&a!==1073741824&&(n.flags|=128,o=!0,la(f,!1),n.lanes=4194304);f.isBackwards?(x.sibling=n.child,n.child=x):(a=f.last,a!==null?a.sibling=x:n.child=x,f.last=x)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=Ce(),n.sibling=null,a=ze.current,De(ze,o?a&1|2:a&1),n):(mt(n),null);case 22:case 23:return Fo(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&(n.mode&1)!==0?(Mt&1073741824)!==0&&(mt(n),n.subtreeFlags&6&&(n.flags|=8192)):mt(n),null;case 24:return null;case 25:return null}throw Error(l(156,n.tag))}function W0(e,n){switch(Gi(n),n.tag){case 1:return St(n.type)&&nl(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return os(),Ue(bt),Ue(ut),ao(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return ro(n),null;case 13:if(Ue(ze),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));ss()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ue(ze),null;case 4:return os(),null;case 10:return Xi(n.type._context),null;case 22:case 23:return Fo(),null;case 24:return null;default:return null}}var Nl=!1,ft=!1,G0=typeof WeakSet=="function"?WeakSet:Set,te=null;function us(e,n){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(o){We(e,n,o)}else a.current=null}function Eo(e,n,a){try{a()}catch(o){We(e,n,o)}}var zd=!1;function K0(e,n){if(Di=Ha,e=vu(),Ri(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var u=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var x=0,j=-1,S=-1,O=0,H=0,$=e,B=null;t:for(;;){for(var X;$!==a||u!==0&&$.nodeType!==3||(j=x+u),$!==f||o!==0&&$.nodeType!==3||(S=x+o),$.nodeType===3&&(x+=$.nodeValue.length),(X=$.firstChild)!==null;)B=$,$=X;for(;;){if($===e)break t;if(B===a&&++O===u&&(j=x),B===f&&++H===o&&(S=x),(X=$.nextSibling)!==null)break;$=B,B=$.parentNode}$=X}a=j===-1||S===-1?null:{start:j,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(Fi={focusedElem:e,selectionRange:a},Ha=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var le=ne.memoizedProps,Ke=ne.memoizedState,_=n.stateNode,T=_.getSnapshotBeforeUpdate(n.elementType===n.type?le:an(n.type,le),Ke);_.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var A=n.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(G){We(n,n.return,G)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ne=zd,zd=!1,ne}function ia(e,n,a){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&e)===e){var f=u.destroy;u.destroy=void 0,f!==void 0&&Eo(n,a,f)}u=u.next}while(u!==o)}}function bl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var o=a.create;a.destroy=o()}a=a.next}while(a!==n)}}function ko(e){var n=e.ref;if(n!==null){var a=e.stateNode;e.tag,e=a,typeof n=="function"?n(e):n.current=e}}function Hd(e){var n=e.alternate;n!==null&&(e.alternate=null,Hd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[pn],delete n[Qs],delete n[Hi],delete n[R0],delete n[_0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $d(e){return e.tag===5||e.tag===3||e.tag===4}function Vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$d(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function To(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.nodeType===8?a.parentNode.insertBefore(e,n):a.insertBefore(e,n):(a.nodeType===8?(n=a.parentNode,n.insertBefore(e,a)):(n=a,n.appendChild(e)),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=el));else if(o!==4&&(e=e.child,e!==null))for(To(e,n,a),e=e.sibling;e!==null;)To(e,n,a),e=e.sibling}function Ro(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(Ro(e,n,a),e=e.sibling;e!==null;)Ro(e,n,a),e=e.sibling}var it=null,ln=!1;function lr(e,n,a){for(a=a.child;a!==null;)Wd(e,n,a),a=a.sibling}function Wd(e,n,a){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(br,a)}catch{}switch(a.tag){case 5:ft||us(a,n);case 6:var o=it,u=ln;it=null,lr(e,n,a),it=o,ln=u,it!==null&&(ln?(e=it,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):it.removeChild(a.stateNode));break;case 18:it!==null&&(ln?(e=it,a=a.stateNode,e.nodeType===8?zi(e.parentNode,a):e.nodeType===1&&zi(e,a),Us(e)):zi(it,a.stateNode));break;case 4:o=it,u=ln,it=a.stateNode.containerInfo,ln=!0,lr(e,n,a),it=o,ln=u;break;case 0:case 11:case 14:case 15:if(!ft&&(o=a.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){u=o=o.next;do{var f=u,x=f.destroy;f=f.tag,x!==void 0&&((f&2)!==0||(f&4)!==0)&&Eo(a,n,x),u=u.next}while(u!==o)}lr(e,n,a);break;case 1:if(!ft&&(us(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=a.memoizedProps,o.state=a.memoizedState,o.componentWillUnmount()}catch(j){We(a,n,j)}lr(e,n,a);break;case 21:lr(e,n,a);break;case 22:a.mode&1?(ft=(o=ft)||a.memoizedState!==null,lr(e,n,a),ft=o):lr(e,n,a);break;default:lr(e,n,a)}}function Gd(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new G0),n.forEach(function(o){var u=np.bind(null,e,o);a.has(o)||(a.add(o),o.then(u,u))})}}function on(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];try{var f=e,x=n,j=x;e:for(;j!==null;){switch(j.tag){case 5:it=j.stateNode,ln=!1;break e;case 3:it=j.stateNode.containerInfo,ln=!0;break e;case 4:it=j.stateNode.containerInfo,ln=!0;break e}j=j.return}if(it===null)throw Error(l(160));Wd(f,x,u),it=null,ln=!1;var S=u.alternate;S!==null&&(S.return=null),u.return=null}catch(O){We(u,n,O)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Kd(n,e),n=n.sibling}function Kd(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(on(n,e),yn(e),o&4){try{ia(3,e,e.return),bl(3,e)}catch(le){We(e,e.return,le)}try{ia(5,e,e.return)}catch(le){We(e,e.return,le)}}break;case 1:on(n,e),yn(e),o&512&&a!==null&&us(a,a.return);break;case 5:if(on(n,e),yn(e),o&512&&a!==null&&us(a,a.return),e.flags&32){var u=e.stateNode;try{$n(u,"")}catch(le){We(e,e.return,le)}}if(o&4&&(u=e.stateNode,u!=null)){var f=e.memoizedProps,x=a!==null?a.memoizedProps:f,j=e.type,S=e.updateQueue;if(e.updateQueue=null,S!==null)try{j==="input"&&f.type==="radio"&&f.name!=null&&wn(u,f),jr(j,x);var O=jr(j,f);for(x=0;x<S.length;x+=2){var H=S[x],$=S[x+1];H==="style"?vr(u,$):H==="dangerouslySetInnerHTML"?Cs(u,$):H==="children"?$n(u,$):P(u,H,$,O)}switch(j){case"input":gr(u,f);break;case"textarea":$r(u,f);break;case"select":var B=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!f.multiple;var X=f.value;X!=null?bn(u,!!f.multiple,X,!1):B!==!!f.multiple&&(f.defaultValue!=null?bn(u,!!f.multiple,f.defaultValue,!0):bn(u,!!f.multiple,f.multiple?[]:"",!1))}u[Qs]=f}catch(le){We(e,e.return,le)}}break;case 6:if(on(n,e),yn(e),o&4){if(e.stateNode===null)throw Error(l(162));u=e.stateNode,f=e.memoizedProps;try{u.nodeValue=f}catch(le){We(e,e.return,le)}}break;case 3:if(on(n,e),yn(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{Us(n.containerInfo)}catch(le){We(e,e.return,le)}break;case 4:on(n,e),yn(e);break;case 13:on(n,e),yn(e),u=e.child,u.flags&8192&&(f=u.memoizedState!==null,u.stateNode.isHidden=f,!f||u.alternate!==null&&u.alternate.memoizedState!==null||(Po=Ce())),o&4&&Gd(e);break;case 22:if(H=a!==null&&a.memoizedState!==null,e.mode&1?(ft=(O=ft)||H,on(n,e),ft=O):on(n,e),yn(e),o&8192){if(O=e.memoizedState!==null,(e.stateNode.isHidden=O)&&!H&&(e.mode&1)!==0)for(te=e,H=e.child;H!==null;){for($=te=H;te!==null;){switch(B=te,X=B.child,B.tag){case 0:case 11:case 14:case 15:ia(4,B,B.return);break;case 1:us(B,B.return);var ne=B.stateNode;if(typeof ne.componentWillUnmount=="function"){o=B,a=B.return;try{n=o,ne.props=n.memoizedProps,ne.state=n.memoizedState,ne.componentWillUnmount()}catch(le){We(o,a,le)}}break;case 5:us(B,B.return);break;case 22:if(B.memoizedState!==null){Qd($);continue}}X!==null?(X.return=B,te=X):Qd($)}H=H.sibling}e:for(H=null,$=e;;){if($.tag===5){if(H===null){H=$;try{u=$.stateNode,O?(f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(j=$.stateNode,S=$.memoizedProps.style,x=S!=null&&S.hasOwnProperty("display")?S.display:null,j.style.display=yr("display",x))}catch(le){We(e,e.return,le)}}}else if($.tag===6){if(H===null)try{$.stateNode.nodeValue=O?"":$.memoizedProps}catch(le){We(e,e.return,le)}}else if(($.tag!==22&&$.tag!==23||$.memoizedState===null||$===e)&&$.child!==null){$.child.return=$,$=$.child;continue}if($===e)break e;for(;$.sibling===null;){if($.return===null||$.return===e)break e;H===$&&(H=null),$=$.return}H===$&&(H=null),$.sibling.return=$.return,$=$.sibling}}break;case 19:on(n,e),yn(e),o&4&&Gd(e);break;case 21:break;default:on(n,e),yn(e)}}function yn(e){var n=e.flags;if(n&2){try{e:{for(var a=e.return;a!==null;){if($d(a)){var o=a;break e}a=a.return}throw Error(l(160))}switch(o.tag){case 5:var u=o.stateNode;o.flags&32&&($n(u,""),o.flags&=-33);var f=Vd(e);Ro(e,f,u);break;case 3:case 4:var x=o.stateNode.containerInfo,j=Vd(e);To(e,j,x);break;default:throw Error(l(161))}}catch(S){We(e,e.return,S)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function q0(e,n,a){te=e,qd(e)}function qd(e,n,a){for(var o=(e.mode&1)!==0;te!==null;){var u=te,f=u.child;if(u.tag===22&&o){var x=u.memoizedState!==null||Nl;if(!x){var j=u.alternate,S=j!==null&&j.memoizedState!==null||ft;j=Nl;var O=ft;if(Nl=x,(ft=S)&&!O)for(te=u;te!==null;)x=te,S=x.child,x.tag===22&&x.memoizedState!==null?Jd(u):S!==null?(S.return=x,te=S):Jd(u);for(;f!==null;)te=f,qd(f),f=f.sibling;te=u,Nl=j,ft=O}Yd(e)}else(u.subtreeFlags&8772)!==0&&f!==null?(f.return=u,te=f):Yd(e)}}function Yd(e){for(;te!==null;){var n=te;if((n.flags&8772)!==0){var a=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:ft||bl(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!ft)if(a===null)o.componentDidMount();else{var u=n.elementType===n.type?a.memoizedProps:an(n.type,a.memoizedProps);o.componentDidUpdate(u,a.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=n.updateQueue;f!==null&&Qu(n,f,o);break;case 3:var x=n.updateQueue;if(x!==null){if(a=null,n.child!==null)switch(n.child.tag){case 5:a=n.child.stateNode;break;case 1:a=n.child.stateNode}Qu(n,x,a)}break;case 5:var j=n.stateNode;if(a===null&&n.flags&4){a=j;var S=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":S.autoFocus&&a.focus();break;case"img":S.src&&(a.src=S.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var O=n.alternate;if(O!==null){var H=O.memoizedState;if(H!==null){var $=H.dehydrated;$!==null&&Us($)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}ft||n.flags&512&&ko(n)}catch(B){We(n,n.return,B)}}if(n===e){te=null;break}if(a=n.sibling,a!==null){a.return=n.return,te=a;break}te=n.return}}function Qd(e){for(;te!==null;){var n=te;if(n===e){te=null;break}var a=n.sibling;if(a!==null){a.return=n.return,te=a;break}te=n.return}}function Jd(e){for(;te!==null;){var n=te;try{switch(n.tag){case 0:case 11:case 15:var a=n.return;try{bl(4,n)}catch(S){We(n,a,S)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var u=n.return;try{o.componentDidMount()}catch(S){We(n,u,S)}}var f=n.return;try{ko(n)}catch(S){We(n,f,S)}break;case 5:var x=n.return;try{ko(n)}catch(S){We(n,x,S)}}}catch(S){We(n,n.return,S)}if(n===e){te=null;break}var j=n.sibling;if(j!==null){j.return=n.return,te=j;break}te=n.return}}var Y0=Math.ceil,Sl=U.ReactCurrentDispatcher,_o=U.ReactCurrentOwner,Kt=U.ReactCurrentBatchConfig,_e=0,rt=null,Qe=null,ot=0,Mt=0,ds=tr(0),Ze=0,oa=null,Ar=0,Cl=0,Ao=0,ca=null,Et=null,Po=0,ms=1/0,In=null,El=!1,Lo=null,ir=null,kl=!1,or=null,Tl=0,ua=0,Oo=null,Rl=-1,_l=0;function yt(){return(_e&6)!==0?Ce():Rl!==-1?Rl:Rl=Ce()}function cr(e){return(e.mode&1)===0?1:(_e&2)!==0&&ot!==0?ot&-ot:P0.transition!==null?(_l===0&&(_l=Vc()),_l):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:Zc(e.type)),e)}function cn(e,n,a,o){if(50<ua)throw ua=0,Oo=null,Error(l(185));Os(e,a,o),((_e&2)===0||e!==rt)&&(e===rt&&((_e&2)===0&&(Cl|=a),Ze===4&&ur(e,ot)),kt(e,o),a===1&&_e===0&&(n.mode&1)===0&&(ms=Ce()+500,sl&&rr()))}function kt(e,n){var a=e.callbackNode;Ph(e,n);var o=Ua(e,e===rt?ot:0);if(o===0)a!==null&&V(a),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(a!=null&&V(a),n===1)e.tag===0?A0(Zd.bind(null,e)):Fu(Zd.bind(null,e)),k0(function(){(_e&6)===0&&rr()}),a=null;else{switch(Wc(o)){case 1:a=tt;break;case 4:a=Ht;break;case 16:a=tn;break;case 536870912:a=Ye;break;default:a=tn}a=im(a,Xd.bind(null,e))}e.callbackPriority=n,e.callbackNode=a}}function Xd(e,n){if(Rl=-1,_l=0,(_e&6)!==0)throw Error(l(327));var a=e.callbackNode;if(fs()&&e.callbackNode!==a)return null;var o=Ua(e,e===rt?ot:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||n)n=Al(e,o);else{n=o;var u=_e;_e|=2;var f=tm();(rt!==e||ot!==n)&&(In=null,ms=Ce()+500,Lr(e,n));do try{X0();break}catch(j){em(e,j)}while(!0);Ji(),Sl.current=f,_e=u,Qe!==null?n=0:(rt=null,ot=0,n=Ze)}if(n!==0){if(n===2&&(u=fi(e),u!==0&&(o=u,n=Io(e,u))),n===1)throw a=oa,Lr(e,0),ur(e,o),kt(e,Ce()),a;if(n===6)ur(e,o);else{if(u=e.current.alternate,(o&30)===0&&!Q0(u)&&(n=Al(e,o),n===2&&(f=fi(e),f!==0&&(o=f,n=Io(e,f))),n===1))throw a=oa,Lr(e,0),ur(e,o),kt(e,Ce()),a;switch(e.finishedWork=u,e.finishedLanes=o,n){case 0:case 1:throw Error(l(345));case 2:Or(e,Et,In);break;case 3:if(ur(e,o),(o&130023424)===o&&(n=Po+500-Ce(),10<n)){if(Ua(e,0)!==0)break;if(u=e.suspendedLanes,(u&o)!==o){yt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Bi(Or.bind(null,e,Et,In),n);break}Or(e,Et,In);break;case 4:if(ur(e,o),(o&4194240)===o)break;for(n=e.eventTimes,u=-1;0<o;){var x=31-nn(o);f=1<<x,x=n[x],x>u&&(u=x),o&=~f}if(o=u,o=Ce()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Y0(o/1960))-o,10<o){e.timeoutHandle=Bi(Or.bind(null,e,Et,In),o);break}Or(e,Et,In);break;case 5:Or(e,Et,In);break;default:throw Error(l(329))}}}return kt(e,Ce()),e.callbackNode===a?Xd.bind(null,e):null}function Io(e,n){var a=ca;return e.current.memoizedState.isDehydrated&&(Lr(e,n).flags|=256),e=Al(e,n),e!==2&&(n=Et,Et=a,n!==null&&Mo(n)),e}function Mo(e){Et===null?Et=e:Et.push.apply(Et,e)}function Q0(e){for(var n=e;;){if(n.flags&16384){var a=n.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var o=0;o<a.length;o++){var u=a[o],f=u.getSnapshot;u=u.value;try{if(!rn(f(),u))return!1}catch{return!1}}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ur(e,n){for(n&=~Ao,n&=~Cl,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var a=31-nn(n),o=1<<a;e[a]=-1,n&=~o}}function Zd(e){if((_e&6)!==0)throw Error(l(327));fs();var n=Ua(e,0);if((n&1)===0)return kt(e,Ce()),null;var a=Al(e,n);if(e.tag!==0&&a===2){var o=fi(e);o!==0&&(n=o,a=Io(e,o))}if(a===1)throw a=oa,Lr(e,0),ur(e,n),kt(e,Ce()),a;if(a===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Or(e,Et,In),kt(e,Ce()),null}function Do(e,n){var a=_e;_e|=1;try{return e(n)}finally{_e=a,_e===0&&(ms=Ce()+500,sl&&rr())}}function Pr(e){or!==null&&or.tag===0&&(_e&6)===0&&fs();var n=_e;_e|=1;var a=Kt.transition,o=Oe;try{if(Kt.transition=null,Oe=1,e)return e()}finally{Oe=o,Kt.transition=a,_e=n,(_e&6)===0&&rr()}}function Fo(){Mt=ds.current,Ue(ds)}function Lr(e,n){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,E0(a)),Qe!==null)for(a=Qe.return;a!==null;){var o=a;switch(Gi(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&nl();break;case 3:os(),Ue(bt),Ue(ut),ao();break;case 5:ro(o);break;case 4:os();break;case 13:Ue(ze);break;case 19:Ue(ze);break;case 10:Xi(o.type._context);break;case 22:case 23:Fo()}a=a.return}if(rt=e,Qe=e=dr(e.current,null),ot=Mt=n,Ze=0,oa=null,Ao=Cl=Ar=0,Et=ca=null,Tr!==null){for(n=0;n<Tr.length;n++)if(a=Tr[n],o=a.interleaved,o!==null){a.interleaved=null;var u=o.next,f=a.pending;if(f!==null){var x=f.next;f.next=u,o.next=x}a.pending=o}Tr=null}return e}function em(e,n){do{var a=Qe;try{if(Ji(),hl.current=yl,pl){for(var o=He.memoizedState;o!==null;){var u=o.queue;u!==null&&(u.pending=null),o=o.next}pl=!1}if(_r=0,nt=Xe=He=null,na=!1,ra=0,_o.current=null,a===null||a.return===null){Ze=1,oa=n,Qe=null;break}e:{var f=e,x=a.return,j=a,S=n;if(n=ot,j.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){var O=S,H=j,$=H.tag;if((H.mode&1)===0&&($===0||$===11||$===15)){var B=H.alternate;B?(H.updateQueue=B.updateQueue,H.memoizedState=B.memoizedState,H.lanes=B.lanes):(H.updateQueue=null,H.memoizedState=null)}var X=Cd(x);if(X!==null){X.flags&=-257,Ed(X,x,j,f,n),X.mode&1&&Sd(f,O,n),n=X,S=O;var ne=n.updateQueue;if(ne===null){var le=new Set;le.add(S),n.updateQueue=le}else ne.add(S);break e}else{if((n&1)===0){Sd(f,O,n),Uo();break e}S=Error(l(426))}}else if(Be&&j.mode&1){var Ke=Cd(x);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Ed(Ke,x,j,f,n),Yi(cs(S,j));break e}}f=S=cs(S,j),Ze!==4&&(Ze=2),ca===null?ca=[f]:ca.push(f),f=x;do{switch(f.tag){case 3:f.flags|=65536,n&=-n,f.lanes|=n;var _=Nd(f,S,n);Yu(f,_);break e;case 1:j=S;var T=f.type,A=f.stateNode;if((f.flags&128)===0&&(typeof T.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(ir===null||!ir.has(A)))){f.flags|=65536,n&=-n,f.lanes|=n;var G=bd(f,j,n);Yu(f,G);break e}}f=f.return}while(f!==null)}rm(a)}catch(oe){n=oe,Qe===a&&a!==null&&(Qe=a=a.return);continue}break}while(!0)}function tm(){var e=Sl.current;return Sl.current=yl,e===null?yl:e}function Uo(){(Ze===0||Ze===3||Ze===2)&&(Ze=4),rt===null||(Ar&268435455)===0&&(Cl&268435455)===0||ur(rt,ot)}function Al(e,n){var a=_e;_e|=2;var o=tm();(rt!==e||ot!==n)&&(In=null,Lr(e,n));do try{J0();break}catch(u){em(e,u)}while(!0);if(Ji(),_e=a,Sl.current=o,Qe!==null)throw Error(l(261));return rt=null,ot=0,Ze}function J0(){for(;Qe!==null;)nm(Qe)}function X0(){for(;Qe!==null&&!se();)nm(Qe)}function nm(e){var n=lm(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,n===null?rm(e):Qe=n,_o.current=null}function rm(e){var n=e;do{var a=n.alternate;if(e=n.return,(n.flags&32768)===0){if(a=V0(a,n,Mt),a!==null){Qe=a;return}}else{if(a=W0(a,n),a!==null){a.flags&=32767,Qe=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ze=6,Qe=null;return}}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=e}while(n!==null);Ze===0&&(Ze=5)}function Or(e,n,a){var o=Oe,u=Kt.transition;try{Kt.transition=null,Oe=1,Z0(e,n,a,o)}finally{Kt.transition=u,Oe=o}return null}function Z0(e,n,a,o){do fs();while(or!==null);if((_e&6)!==0)throw Error(l(327));a=e.finishedWork;var u=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var f=a.lanes|a.childLanes;if(Lh(e,f),e===rt&&(Qe=rt=null,ot=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||kl||(kl=!0,im(tn,function(){return fs(),null})),f=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||f){f=Kt.transition,Kt.transition=null;var x=Oe;Oe=1;var j=_e;_e|=4,_o.current=null,K0(e,a),Kd(a,e),v0(Fi),Ha=!!Di,Fi=Di=null,e.current=a,q0(a),Me(),_e=j,Oe=x,Kt.transition=f}else e.current=a;if(kl&&(kl=!1,or=e,Tl=u),f=e.pendingLanes,f===0&&(ir=null),kh(a.stateNode),kt(e,Ce()),n!==null)for(o=e.onRecoverableError,a=0;a<n.length;a++)u=n[a],o(u.value,{componentStack:u.stack,digest:u.digest});if(El)throw El=!1,e=Lo,Lo=null,e;return(Tl&1)!==0&&e.tag!==0&&fs(),f=e.pendingLanes,(f&1)!==0?e===Oo?ua++:(ua=0,Oo=e):ua=0,rr(),null}function fs(){if(or!==null){var e=Wc(Tl),n=Kt.transition,a=Oe;try{if(Kt.transition=null,Oe=16>e?16:e,or===null)var o=!1;else{if(e=or,or=null,Tl=0,(_e&6)!==0)throw Error(l(331));var u=_e;for(_e|=4,te=e.current;te!==null;){var f=te,x=f.child;if((te.flags&16)!==0){var j=f.deletions;if(j!==null){for(var S=0;S<j.length;S++){var O=j[S];for(te=O;te!==null;){var H=te;switch(H.tag){case 0:case 11:case 15:ia(8,H,f)}var $=H.child;if($!==null)$.return=H,te=$;else for(;te!==null;){H=te;var B=H.sibling,X=H.return;if(Hd(H),H===O){te=null;break}if(B!==null){B.return=X,te=B;break}te=X}}}var ne=f.alternate;if(ne!==null){var le=ne.child;if(le!==null){ne.child=null;do{var Ke=le.sibling;le.sibling=null,le=Ke}while(le!==null)}}te=f}}if((f.subtreeFlags&2064)!==0&&x!==null)x.return=f,te=x;else e:for(;te!==null;){if(f=te,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:ia(9,f,f.return)}var _=f.sibling;if(_!==null){_.return=f.return,te=_;break e}te=f.return}}var T=e.current;for(te=T;te!==null;){x=te;var A=x.child;if((x.subtreeFlags&2064)!==0&&A!==null)A.return=x,te=A;else e:for(x=T;te!==null;){if(j=te,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:bl(9,j)}}catch(oe){We(j,j.return,oe)}if(j===x){te=null;break e}var G=j.sibling;if(G!==null){G.return=j.return,te=G;break e}te=j.return}}if(_e=u,rr(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(br,e)}catch{}o=!0}return o}finally{Oe=a,Kt.transition=n}}return!1}function sm(e,n,a){n=cs(a,n),n=Nd(e,n,1),e=ar(e,n,1),n=yt(),e!==null&&(Os(e,1,n),kt(e,n))}function We(e,n,a){if(e.tag===3)sm(e,e,a);else for(;n!==null;){if(n.tag===3){sm(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ir===null||!ir.has(o))){e=cs(a,e),e=bd(n,e,1),n=ar(n,e,1),e=yt(),n!==null&&(Os(n,1,e),kt(n,e));break}}n=n.return}}function ep(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),n=yt(),e.pingedLanes|=e.suspendedLanes&a,rt===e&&(ot&a)===a&&(Ze===4||Ze===3&&(ot&130023424)===ot&&500>Ce()-Po?Lr(e,0):Ao|=a),kt(e,n)}function am(e,n){n===0&&((e.mode&1)===0?n=1:(n=Fa,Fa<<=1,(Fa&130023424)===0&&(Fa=4194304)));var a=yt();e=Pn(e,n),e!==null&&(Os(e,n,a),kt(e,a))}function tp(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),am(e,a)}function np(e,n){var a=0;switch(e.tag){case 13:var o=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(l(314))}o!==null&&o.delete(n),am(e,a)}var lm;lm=function(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps||bt.current)Ct=!0;else{if((e.lanes&a)===0&&(n.flags&128)===0)return Ct=!1,$0(e,n,a);Ct=(e.flags&131072)!==0}else Ct=!1,Be&&(n.flags&1048576)!==0&&Uu(n,ll,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;wl(e,n),e=n.pendingProps;var u=ts(n,ut.current);is(n,a),u=oo(null,n,o,e,u,a);var f=co();return n.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,St(o)?(f=!0,rl(n)):f=!1,n.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,to(n),u.updater=vl,n.stateNode=u,u._reactInternals=n,xo(n,o,e,a),n=jo(null,n,o,!0,f,a)):(n.tag=0,Be&&f&&Wi(n),gt(null,n,u,a),n=n.child),n;case 16:o=n.elementType;e:{switch(wl(e,n),e=n.pendingProps,u=o._init,o=u(o._payload),n.type=o,u=n.tag=sp(o),e=an(o,e),u){case 0:n=vo(null,n,o,e,a);break e;case 1:n=Pd(null,n,o,e,a);break e;case 11:n=kd(null,n,o,e,a);break e;case 14:n=Td(null,n,o,an(o.type,e),a);break e}throw Error(l(306,o,""))}return n;case 0:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:an(o,u),vo(e,n,o,u,a);case 1:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:an(o,u),Pd(e,n,o,u,a);case 3:e:{if(Ld(n),e===null)throw Error(l(387));o=n.pendingProps,f=n.memoizedState,u=f.element,qu(e,n),ml(n,o,null,a);var x=n.memoizedState;if(o=x.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){u=cs(Error(l(423)),n),n=Od(e,n,o,a,u);break e}else if(o!==u){u=cs(Error(l(424)),n),n=Od(e,n,o,a,u);break e}else for(It=er(n.stateNode.containerInfo.firstChild),Ot=n,Be=!0,sn=null,a=Gu(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ss(),o===u){n=On(e,n,a);break e}gt(e,n,o,a)}n=n.child}return n;case 5:return Ju(n),e===null&&qi(n),o=n.type,u=n.pendingProps,f=e!==null?e.memoizedProps:null,x=u.children,Ui(o,u)?x=null:f!==null&&Ui(o,f)&&(n.flags|=32),Ad(e,n),gt(e,n,x,a),n.child;case 6:return e===null&&qi(n),null;case 13:return Id(e,n,a);case 4:return no(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=as(n,null,o,a):gt(e,n,o,a),n.child;case 11:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:an(o,u),kd(e,n,o,u,a);case 7:return gt(e,n,n.pendingProps,a),n.child;case 8:return gt(e,n,n.pendingProps.children,a),n.child;case 12:return gt(e,n,n.pendingProps.children,a),n.child;case 10:e:{if(o=n.type._context,u=n.pendingProps,f=n.memoizedProps,x=u.value,De(cl,o._currentValue),o._currentValue=x,f!==null)if(rn(f.value,x)){if(f.children===u.children&&!bt.current){n=On(e,n,a);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var j=f.dependencies;if(j!==null){x=f.child;for(var S=j.firstContext;S!==null;){if(S.context===o){if(f.tag===1){S=Ln(-1,a&-a),S.tag=2;var O=f.updateQueue;if(O!==null){O=O.shared;var H=O.pending;H===null?S.next=S:(S.next=H.next,H.next=S),O.pending=S}}f.lanes|=a,S=f.alternate,S!==null&&(S.lanes|=a),Zi(f.return,a,n),j.lanes|=a;break}S=S.next}}else if(f.tag===10)x=f.type===n.type?null:f.child;else if(f.tag===18){if(x=f.return,x===null)throw Error(l(341));x.lanes|=a,j=x.alternate,j!==null&&(j.lanes|=a),Zi(x,a,n),x=f.sibling}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===n){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}gt(e,n,u.children,a),n=n.child}return n;case 9:return u=n.type,o=n.pendingProps.children,is(n,a),u=Wt(u),o=o(u),n.flags|=1,gt(e,n,o,a),n.child;case 14:return o=n.type,u=an(o,n.pendingProps),u=an(o.type,u),Td(e,n,o,u,a);case 15:return Rd(e,n,n.type,n.pendingProps,a);case 17:return o=n.type,u=n.pendingProps,u=n.elementType===o?u:an(o,u),wl(e,n),n.tag=1,St(o)?(e=!0,rl(n)):e=!1,is(n,a),jd(n,o,u),xo(n,o,u,a),jo(null,n,o,!0,e,a);case 19:return Dd(e,n,a);case 22:return _d(e,n,a)}throw Error(l(156,n.tag))};function im(e,n){return C(e,n)}function rp(e,n,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,n,a,o){return new rp(e,n,a,o)}function Bo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return Bo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ve)return 11;if(e===Ie)return 14}return 2}function dr(e,n){var a=e.alternate;return a===null?(a=qt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Pl(e,n,a,o,u,f){var x=2;if(o=e,typeof e=="function")Bo(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case Y:return Ir(a.children,u,f,n);case Z:x=8,u|=8;break;case we:return e=qt(12,a,n,u|2),e.elementType=we,e.lanes=f,e;case ue:return e=qt(13,a,n,u),e.elementType=ue,e.lanes=f,e;case ge:return e=qt(19,a,n,u),e.elementType=ge,e.lanes=f,e;case Ne:return Ll(a,u,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Se:x=10;break e;case ee:x=9;break e;case ve:x=11;break e;case Ie:x=14;break e;case me:x=16,o=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return n=qt(x,a,n,u),n.elementType=e,n.type=o,n.lanes=f,n}function Ir(e,n,a,o){return e=qt(7,e,o,n),e.lanes=a,e}function Ll(e,n,a,o){return e=qt(22,e,o,n),e.elementType=Ne,e.lanes=a,e.stateNode={isHidden:!1},e}function zo(e,n,a){return e=qt(6,e,null,n),e.lanes=a,e}function Ho(e,n,a){return n=qt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function ap(e,n,a,o,u){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hi(0),this.expirationTimes=hi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.identifierPrefix=o,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function $o(e,n,a,o,u,f,x,j,S){return e=new ap(e,n,a,j,S),n===1?(n=1,f===!0&&(n|=8)):n=0,f=qt(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},to(f),e}function lp(e,n,a){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:de,key:o==null?null:""+o,children:e,containerInfo:n,implementation:a}}function om(e){if(!e)return nr;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(l(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(St(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(l(171))}if(e.tag===1){var a=e.type;if(St(a))return Mu(e,a,n)}return n}function cm(e,n,a,o,u,f,x,j,S){return e=$o(a,o,!0,e,u,f,x,j,S),e.context=om(null),a=e.current,o=yt(),u=cr(a),f=Ln(o,u),f.callback=n??null,ar(a,f,u),e.current.lanes=u,Os(e,u,o),kt(e,o),e}function Ol(e,n,a,o){var u=n.current,f=yt(),x=cr(u);return a=om(a),n.context===null?n.context=a:n.pendingContext=a,n=Ln(f,x),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=ar(u,n,x),e!==null&&(cn(e,u,x,f),dl(e,u,x)),x}function Il(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function um(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Vo(e,n){um(e,n),(e=e.alternate)&&um(e,n)}function ip(){return null}var dm=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wo(e){this._internalRoot=e}Ml.prototype.render=Wo.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));Ol(e,n,null,null)},Ml.prototype.unmount=Wo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Pr(function(){Ol(null,e,null,null)}),n[Tn]=null}};function Ml(e){this._internalRoot=e}Ml.prototype.unstable_scheduleHydration=function(e){if(e){var n=qc();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Jn.length&&n!==0&&n<Jn[a].priority;a++);Jn.splice(a,0,e),a===0&&Jc(e)}};function Go(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mm(){}function op(e,n,a,o,u){if(u){if(typeof o=="function"){var f=o;o=function(){var O=Il(x);f.call(O)}}var x=cm(n,o,e,0,null,!1,!1,"",mm);return e._reactRootContainer=x,e[Tn]=x.current,qs(e.nodeType===8?e.parentNode:e),Pr(),x}for(;u=e.lastChild;)e.removeChild(u);if(typeof o=="function"){var j=o;o=function(){var O=Il(S);j.call(O)}}var S=$o(e,0,!1,null,null,!1,!1,"",mm);return e._reactRootContainer=S,e[Tn]=S.current,qs(e.nodeType===8?e.parentNode:e),Pr(function(){Ol(n,S,a,o)}),S}function Fl(e,n,a,o,u){var f=a._reactRootContainer;if(f){var x=f;if(typeof u=="function"){var j=u;u=function(){var S=Il(x);j.call(S)}}Ol(n,x,e,u)}else x=op(a,n,e,u,o);return Il(x)}Gc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var a=Ls(n.pendingLanes);a!==0&&(pi(n,a|1),kt(n,Ce()),(_e&6)===0&&(ms=Ce()+500,rr()))}break;case 13:Pr(function(){var o=Pn(e,1);if(o!==null){var u=yt();cn(o,e,1,u)}}),Vo(e,1)}},xi=function(e){if(e.tag===13){var n=Pn(e,134217728);if(n!==null){var a=yt();cn(n,e,134217728,a)}Vo(e,134217728)}},Kc=function(e){if(e.tag===13){var n=cr(e),a=Pn(e,n);if(a!==null){var o=yt();cn(a,e,n,o)}Vo(e,n)}},qc=function(){return Oe},Yc=function(e,n){var a=Oe;try{return Oe=e,n()}finally{Oe=a}},Vn=function(e,n,a){switch(n){case"input":if(gr(e,a),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var u=tl(o);if(!u)throw Error(l(90));jn(o),gr(o,u)}}}break;case"textarea":$r(e,a);break;case"select":n=a.value,n!=null&&bn(e,!!a.multiple,n,!1)}},$e=Do,En=Pr;var cp={usingClientEntryPoint:!1,Events:[Js,Zr,tl,Pa,La,Do]},da={findFiberByHostInstance:Sr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},up={bundleType:da.bundleType,version:da.version,rendererPackageName:da.rendererPackageName,rendererConfig:da.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ma(e),e===null?null:e.stateNode},findFiberByHostInstance:da.findFiberByHostInstance||ip,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ul.isDisabled&&Ul.supportsFiber)try{br=Ul.inject(up),Pt=Ul}catch{}}return Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cp,Tt.createPortal=function(e,n){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Go(n))throw Error(l(200));return lp(e,n,null,a)},Tt.createRoot=function(e,n){if(!Go(e))throw Error(l(299));var a=!1,o="",u=dm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),n=$o(e,1,!1,null,null,a,!1,o,u),e[Tn]=n.current,qs(e.nodeType===8?e.parentNode:e),new Wo(n)},Tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=Ma(n),e=e===null?null:e.stateNode,e},Tt.flushSync=function(e){return Pr(e)},Tt.hydrate=function(e,n,a){if(!Dl(n))throw Error(l(200));return Fl(null,e,n,!0,a)},Tt.hydrateRoot=function(e,n,a){if(!Go(e))throw Error(l(405));var o=a!=null&&a.hydratedSources||null,u=!1,f="",x=dm;if(a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),n=cm(n,null,e,1,a??null,u,!1,f,x),e[Tn]=n.current,qs(e),o)for(e=0;e<o.length;e++)a=o[e],u=a._getVersion,u=u(a._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[a,u]:n.mutableSourceEagerHydrationData.push(a,u);return new Ml(n)},Tt.render=function(e,n,a){if(!Dl(n))throw Error(l(200));return Fl(null,e,n,!1,a)},Tt.unmountComponentAtNode=function(e){if(!Dl(e))throw Error(l(40));return e._reactRootContainer?(Pr(function(){Fl(null,null,e,!1,function(){e._reactRootContainer=null,e[Tn]=null})}),!0):!1},Tt.unstable_batchedUpdates=Do,Tt.unstable_renderSubtreeIntoContainer=function(e,n,a,o){if(!Dl(a))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return Fl(e,n,a,!1,o)},Tt.version="18.3.1-next-f1338f8080-20240426",Tt}var jm;function jf(){if(jm)return Yo.exports;jm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(s){console.error(s)}}return r(),Yo.exports=vp(),Yo.exports}var wm;function jp(){if(wm)return Bl;wm=1;var r=jf();return Bl.createRoot=r.createRoot,Bl.hydrateRoot=r.hydrateRoot,Bl}var wp=jp(),w=Nc();const wf=fp(w),Np=mp({__proto__:null,default:wf},[w]);jf();function ja(){return ja=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},ja.apply(this,arguments)}var fr;(function(r){r.Pop="POP",r.Push="PUSH",r.Replace="REPLACE"})(fr||(fr={}));const Nm="popstate";function bp(r){r===void 0&&(r={});function s(i,c){let{pathname:d,search:m,hash:p}=i.location;return cc("",{pathname:d,search:m,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(i,c){return typeof c=="string"?c:ql(c)}return Cp(s,l,null,r)}function qe(r,s){if(r===!1||r===null||typeof r>"u")throw new Error(s)}function bc(r,s){if(!r){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Sp(){return Math.random().toString(36).substr(2,8)}function bm(r,s){return{usr:r.state,key:r.key,idx:s}}function cc(r,s,l,i){return l===void 0&&(l=null),ja({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof s=="string"?js(s):s,{state:l,key:s&&s.key||i||Sp()})}function ql(r){let{pathname:s="/",search:l="",hash:i=""}=r;return l&&l!=="?"&&(s+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(s+=i.charAt(0)==="#"?i:"#"+i),s}function js(r){let s={};if(r){let l=r.indexOf("#");l>=0&&(s.hash=r.substr(l),r=r.substr(0,l));let i=r.indexOf("?");i>=0&&(s.search=r.substr(i),r=r.substr(0,i)),r&&(s.pathname=r)}return s}function Cp(r,s,l,i){i===void 0&&(i={});let{window:c=document.defaultView,v5Compat:d=!1}=i,m=c.history,p=fr.Pop,h=null,g=v();g==null&&(g=0,m.replaceState(ja({},m.state,{idx:g}),""));function v(){return(m.state||{idx:null}).idx}function y(){p=fr.Pop;let b=v(),D=b==null?null:b-g;g=b,h&&h({action:p,location:R.location,delta:D})}function k(b,D){p=fr.Push;let L=cc(R.location,b,D);g=v()+1;let P=bm(L,g),U=R.createHref(L);try{m.pushState(P,"",U)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;c.location.assign(U)}d&&h&&h({action:p,location:R.location,delta:1})}function M(b,D){p=fr.Replace;let L=cc(R.location,b,D);g=v();let P=bm(L,g),U=R.createHref(L);m.replaceState(P,"",U),d&&h&&h({action:p,location:R.location,delta:0})}function N(b){let D=c.location.origin!=="null"?c.location.origin:c.location.href,L=typeof b=="string"?b:ql(b);return L=L.replace(/ $/,"%20"),qe(D,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,D)}let R={get action(){return p},get location(){return r(c,m)},listen(b){if(h)throw new Error("A history only accepts one active listener");return c.addEventListener(Nm,y),h=b,()=>{c.removeEventListener(Nm,y),h=null}},createHref(b){return s(c,b)},createURL:N,encodeLocation(b){let D=N(b);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:k,replace:M,go(b){return m.go(b)}};return R}var Sm;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Sm||(Sm={}));function Ep(r,s,l){return l===void 0&&(l="/"),kp(r,s,l)}function kp(r,s,l,i){let c=typeof s=="string"?js(s):s,d=Sc(c.pathname||"/",l);if(d==null)return null;let m=Nf(r);Tp(m);let p=null;for(let h=0;p==null&&h<m.length;++h){let g=Bp(d);p=Dp(m[h],g)}return p}function Nf(r,s,l,i){s===void 0&&(s=[]),l===void 0&&(l=[]),i===void 0&&(i="");let c=(d,m,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};h.relativePath.startsWith("/")&&(qe(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=hr([i,h.relativePath]),v=l.concat(h);d.children&&d.children.length>0&&(qe(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Nf(d.children,s,v,g)),!(d.path==null&&!d.index)&&s.push({path:g,score:Ip(g,d.index),routesMeta:v})};return r.forEach((d,m)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))c(d,m);else for(let h of bf(d.path))c(d,m,h)}),s}function bf(r){let s=r.split("/");if(s.length===0)return[];let[l,...i]=s,c=l.endsWith("?"),d=l.replace(/\?$/,"");if(i.length===0)return c?[d,""]:[d];let m=bf(i.join("/")),p=[];return p.push(...m.map(h=>h===""?d:[d,h].join("/"))),c&&p.push(...m),p.map(h=>r.startsWith("/")&&h===""?"/":h)}function Tp(r){r.sort((s,l)=>s.score!==l.score?l.score-s.score:Mp(s.routesMeta.map(i=>i.childrenIndex),l.routesMeta.map(i=>i.childrenIndex)))}const Rp=/^:[\w-]+$/,_p=3,Ap=2,Pp=1,Lp=10,Op=-2,Cm=r=>r==="*";function Ip(r,s){let l=r.split("/"),i=l.length;return l.some(Cm)&&(i+=Op),s&&(i+=Ap),l.filter(c=>!Cm(c)).reduce((c,d)=>c+(Rp.test(d)?_p:d===""?Pp:Lp),i)}function Mp(r,s){return r.length===s.length&&r.slice(0,-1).every((i,c)=>i===s[c])?r[r.length-1]-s[s.length-1]:0}function Dp(r,s,l){let{routesMeta:i}=r,c={},d="/",m=[];for(let p=0;p<i.length;++p){let h=i[p],g=p===i.length-1,v=d==="/"?s:s.slice(d.length)||"/",y=Fp({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},v),k=h.route;if(!y)return null;Object.assign(c,y.params),m.push({params:c,pathname:hr([d,y.pathname]),pathnameBase:Wp(hr([d,y.pathnameBase])),route:k}),y.pathnameBase!=="/"&&(d=hr([d,y.pathnameBase]))}return m}function Fp(r,s){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,i]=Up(r.path,r.caseSensitive,r.end),c=s.match(l);if(!c)return null;let d=c[0],m=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:i.reduce((g,v,y)=>{let{paramName:k,isOptional:M}=v;if(k==="*"){let R=p[y]||"";m=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const N=p[y];return M&&!N?g[k]=void 0:g[k]=(N||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:m,pattern:r}}function Up(r,s,l){s===void 0&&(s=!1),l===void 0&&(l=!0),bc(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let i=[],c="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,p,h)=>(i.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(i.push({paramName:"*"}),c+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":r!==""&&r!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,s?void 0:"i"),i]}function Bp(r){try{return r.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return bc(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+s+").")),r}}function Sc(r,s){if(s==="/")return r;if(!r.toLowerCase().startsWith(s.toLowerCase()))return null;let l=s.endsWith("/")?s.length-1:s.length,i=r.charAt(l);return i&&i!=="/"?null:r.slice(l)||"/"}const zp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hp=r=>zp.test(r);function $p(r,s){s===void 0&&(s="/");let{pathname:l,search:i="",hash:c=""}=typeof r=="string"?js(r):r,d;if(l)if(Hp(l))d=l;else{if(l.includes("//")){let m=l;l=l.replace(/\/\/+/g,"/"),bc(!1,"Pathnames cannot have embedded double slashes - normalizing "+(m+" -> "+l))}l.startsWith("/")?d=Em(l.substring(1),"/"):d=Em(l,s)}else d=s;return{pathname:d,search:Gp(i),hash:Kp(c)}}function Em(r,s){let l=s.replace(/\/+$/,"").split("/");return r.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Xo(r,s,l,i){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+s+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+l+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Vp(r){return r.filter((s,l)=>l===0||s.route.path&&s.route.path.length>0)}function Cc(r,s){let l=Vp(r);return s?l.map((i,c)=>c===l.length-1?i.pathname:i.pathnameBase):l.map(i=>i.pathnameBase)}function Ec(r,s,l,i){i===void 0&&(i=!1);let c;typeof r=="string"?c=js(r):(c=ja({},r),qe(!c.pathname||!c.pathname.includes("?"),Xo("?","pathname","search",c)),qe(!c.pathname||!c.pathname.includes("#"),Xo("#","pathname","hash",c)),qe(!c.search||!c.search.includes("#"),Xo("#","search","hash",c)));let d=r===""||c.pathname==="",m=d?"/":c.pathname,p;if(m==null)p=l;else{let y=s.length-1;if(!i&&m.startsWith("..")){let k=m.split("/");for(;k[0]==="..";)k.shift(),y-=1;c.pathname=k.join("/")}p=y>=0?s[y]:"/"}let h=$p(c,p),g=m&&m!=="/"&&m.endsWith("/"),v=(d||m===".")&&l.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const hr=r=>r.join("/").replace(/\/\/+/g,"/"),Wp=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),Gp=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,Kp=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function qp(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const Sf=["post","put","patch","delete"];new Set(Sf);const Yp=["get",...Sf];new Set(Yp);function wa(){return wa=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},wa.apply(this,arguments)}const kc=w.createContext(null),Qp=w.createContext(null),xr=w.createContext(null),ei=w.createContext(null),Fn=w.createContext({outlet:null,matches:[],isDataRoute:!1}),Cf=w.createContext(null);function Jp(r,s){let{relative:l}=s===void 0?{}:s;ws()||qe(!1);let{basename:i,navigator:c}=w.useContext(xr),{hash:d,pathname:m,search:p}=kf(r,{relative:l}),h=m;return i!=="/"&&(h=m==="/"?i:hr([i,m])),c.createHref({pathname:h,search:p,hash:d})}function ws(){return w.useContext(ei)!=null}function Ns(){return ws()||qe(!1),w.useContext(ei).location}function Ef(r){w.useContext(xr).static||w.useLayoutEffect(r)}function Tc(){let{isDataRoute:r}=w.useContext(Fn);return r?dx():Xp()}function Xp(){ws()||qe(!1);let r=w.useContext(kc),{basename:s,future:l,navigator:i}=w.useContext(xr),{matches:c}=w.useContext(Fn),{pathname:d}=Ns(),m=JSON.stringify(Cc(c,l.v7_relativeSplatPath)),p=w.useRef(!1);return Ef(()=>{p.current=!0}),w.useCallback(function(g,v){if(v===void 0&&(v={}),!p.current)return;if(typeof g=="number"){i.go(g);return}let y=Ec(g,JSON.parse(m),d,v.relative==="path");r==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:hr([s,y.pathname])),(v.replace?i.replace:i.push)(y,v.state,v)},[s,i,m,d,r])}function Zp(){let{matches:r}=w.useContext(Fn),s=r[r.length-1];return s?s.params:{}}function kf(r,s){let{relative:l}=s===void 0?{}:s,{future:i}=w.useContext(xr),{matches:c}=w.useContext(Fn),{pathname:d}=Ns(),m=JSON.stringify(Cc(c,i.v7_relativeSplatPath));return w.useMemo(()=>Ec(r,JSON.parse(m),d,l==="path"),[r,m,d,l])}function ex(r,s){return tx(r,s)}function tx(r,s,l,i){ws()||qe(!1);let{navigator:c}=w.useContext(xr),{matches:d}=w.useContext(Fn),m=d[d.length-1],p=m?m.params:{};m&&m.pathname;let h=m?m.pathnameBase:"/";m&&m.route;let g=Ns(),v;if(s){var y;let b=typeof s=="string"?js(s):s;h==="/"||(y=b.pathname)!=null&&y.startsWith(h)||qe(!1),v=b}else v=g;let k=v.pathname||"/",M=k;if(h!=="/"){let b=h.replace(/^\//,"").split("/");M="/"+k.replace(/^\//,"").split("/").slice(b.length).join("/")}let N=Ep(r,{pathname:M}),R=lx(N&&N.map(b=>Object.assign({},b,{params:Object.assign({},p,b.params),pathname:hr([h,c.encodeLocation?c.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?h:hr([h,c.encodeLocation?c.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),d,l,i);return s&&R?w.createElement(ei.Provider,{value:{location:wa({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:fr.Pop}},R):R}function nx(){let r=ux(),s=qp(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,c={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),l?w.createElement("pre",{style:c},l):null,null)}const rx=w.createElement(nx,null);class sx extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,l){return l.location!==s.location||l.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:l.error,location:l.location,revalidation:s.revalidation||l.revalidation}}componentDidCatch(s,l){console.error("React Router caught the following error during render",s,l)}render(){return this.state.error!==void 0?w.createElement(Fn.Provider,{value:this.props.routeContext},w.createElement(Cf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ax(r){let{routeContext:s,match:l,children:i}=r,c=w.useContext(kc);return c&&c.static&&c.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=l.route.id),w.createElement(Fn.Provider,{value:s},i)}function lx(r,s,l,i){var c;if(s===void 0&&(s=[]),l===void 0&&(l=null),i===void 0&&(i=null),r==null){var d;if(!l)return null;if(l.errors)r=l.matches;else if((d=i)!=null&&d.v7_partialHydration&&s.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let m=r,p=(c=l)==null?void 0:c.errors;if(p!=null){let v=m.findIndex(y=>y.route.id&&p?.[y.route.id]!==void 0);v>=0||qe(!1),m=m.slice(0,Math.min(m.length,v+1))}let h=!1,g=-1;if(l&&i&&i.v7_partialHydration)for(let v=0;v<m.length;v++){let y=m[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=v),y.route.id){let{loaderData:k,errors:M}=l,N=y.route.loader&&k[y.route.id]===void 0&&(!M||M[y.route.id]===void 0);if(y.route.lazy||N){h=!0,g>=0?m=m.slice(0,g+1):m=[m[0]];break}}}return m.reduceRight((v,y,k)=>{let M,N=!1,R=null,b=null;l&&(M=p&&y.route.id?p[y.route.id]:void 0,R=y.route.errorElement||rx,h&&(g<0&&k===0?(mx("route-fallback"),N=!0,b=null):g===k&&(N=!0,b=y.route.hydrateFallbackElement||null)));let D=s.concat(m.slice(0,k+1)),L=()=>{let P;return M?P=R:N?P=b:y.route.Component?P=w.createElement(y.route.Component,null):y.route.element?P=y.route.element:P=v,w.createElement(ax,{match:y,routeContext:{outlet:v,matches:D,isDataRoute:l!=null},children:P})};return l&&(y.route.ErrorBoundary||y.route.errorElement||k===0)?w.createElement(sx,{location:l.location,revalidation:l.revalidation,component:R,error:M,children:L(),routeContext:{outlet:null,matches:D,isDataRoute:!0}}):L()},null)}var Tf=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(Tf||{}),Rf=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(Rf||{});function ix(r){let s=w.useContext(kc);return s||qe(!1),s}function ox(r){let s=w.useContext(Qp);return s||qe(!1),s}function cx(r){let s=w.useContext(Fn);return s||qe(!1),s}function _f(r){let s=cx(),l=s.matches[s.matches.length-1];return l.route.id||qe(!1),l.route.id}function ux(){var r;let s=w.useContext(Cf),l=ox(),i=_f();return s!==void 0?s:(r=l.errors)==null?void 0:r[i]}function dx(){let{router:r}=ix(Tf.UseNavigateStable),s=_f(Rf.UseNavigateStable),l=w.useRef(!1);return Ef(()=>{l.current=!0}),w.useCallback(function(c,d){d===void 0&&(d={}),l.current&&(typeof c=="number"?r.navigate(c):r.navigate(c,wa({fromRouteId:s},d)))},[r,s])}const km={};function mx(r,s,l){km[r]||(km[r]=!0)}function fx(r,s){r?.v7_startTransition,r?.v7_relativeSplatPath}function hx(r){let{to:s,replace:l,state:i,relative:c}=r;ws()||qe(!1);let{future:d,static:m}=w.useContext(xr),{matches:p}=w.useContext(Fn),{pathname:h}=Ns(),g=Tc(),v=Ec(s,Cc(p,d.v7_relativeSplatPath),h,c==="path"),y=JSON.stringify(v);return w.useEffect(()=>g(JSON.parse(y),{replace:l,state:i,relative:c}),[g,y,c,l,i]),null}function gs(r){qe(!1)}function px(r){let{basename:s="/",children:l=null,location:i,navigationType:c=fr.Pop,navigator:d,static:m=!1,future:p}=r;ws()&&qe(!1);let h=s.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:h,navigator:d,static:m,future:wa({v7_relativeSplatPath:!1},p)}),[h,p,d,m]);typeof i=="string"&&(i=js(i));let{pathname:v="/",search:y="",hash:k="",state:M=null,key:N="default"}=i,R=w.useMemo(()=>{let b=Sc(v,h);return b==null?null:{location:{pathname:b,search:y,hash:k,state:M,key:N},navigationType:c}},[h,v,y,k,M,N,c]);return R==null?null:w.createElement(xr.Provider,{value:g},w.createElement(ei.Provider,{children:l,value:R}))}function Af(r){let{children:s,location:l}=r;return ex(uc(s),l)}new Promise(()=>{});function uc(r,s){s===void 0&&(s=[]);let l=[];return w.Children.forEach(r,(i,c)=>{if(!w.isValidElement(i))return;let d=[...s,c];if(i.type===w.Fragment){l.push.apply(l,uc(i.props.children,d));return}i.type!==gs&&qe(!1),!i.props.index||!i.props.children||qe(!1);let m={id:i.props.id||d.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=uc(i.props.children,d)),l.push(m)}),l}function dc(){return dc=Object.assign?Object.assign.bind():function(r){for(var s=1;s<arguments.length;s++){var l=arguments[s];for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r[i]=l[i])}return r},dc.apply(this,arguments)}function xx(r,s){if(r==null)return{};var l={},i=Object.keys(r),c,d;for(d=0;d<i.length;d++)c=i[d],!(s.indexOf(c)>=0)&&(l[c]=r[c]);return l}function gx(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function yx(r,s){return r.button===0&&(!s||s==="_self")&&!gx(r)}const vx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],jx="6";try{window.__reactRouterVersion=jx}catch{}const wx="startTransition",Tm=Np[wx];function Nx(r){let{basename:s,children:l,future:i,window:c}=r,d=w.useRef();d.current==null&&(d.current=bp({window:c,v5Compat:!0}));let m=d.current,[p,h]=w.useState({action:m.action,location:m.location}),{v7_startTransition:g}=i||{},v=w.useCallback(y=>{g&&Tm?Tm(()=>h(y)):h(y)},[h,g]);return w.useLayoutEffect(()=>m.listen(v),[m,v]),w.useEffect(()=>fx(i),[i]),w.createElement(px,{basename:s,children:l,location:p.location,navigationType:p.action,navigator:m,future:i})}const bx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mn=w.forwardRef(function(s,l){let{onClick:i,relative:c,reloadDocument:d,replace:m,state:p,target:h,to:g,preventScrollReset:v,viewTransition:y}=s,k=xx(s,vx),{basename:M}=w.useContext(xr),N,R=!1;if(typeof g=="string"&&Sx.test(g)&&(N=g,bx))try{let P=new URL(window.location.href),U=g.startsWith("//")?new URL(P.protocol+g):new URL(g),Q=Sc(U.pathname,M);U.origin===P.origin&&Q!=null?g=Q+U.search+U.hash:R=!0}catch{}let b=Jp(g,{relative:c}),D=Cx(g,{replace:m,state:p,target:h,preventScrollReset:v,relative:c,viewTransition:y});function L(P){i&&i(P),P.defaultPrevented||D(P)}return w.createElement("a",dc({},k,{href:N||b,onClick:R||d?i:L,ref:l,target:h}))});var Rm;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Rm||(Rm={}));var _m;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(_m||(_m={}));function Cx(r,s){let{target:l,replace:i,state:c,preventScrollReset:d,relative:m,viewTransition:p}=s===void 0?{}:s,h=Tc(),g=Ns(),v=kf(r,{relative:m});return w.useCallback(y=>{if(yx(y,l)){y.preventDefault();let k=i!==void 0?i:ql(g)===ql(v);h(r,{replace:k,state:c,preventScrollReset:d,relative:m,viewTransition:p})}},[g,h,v,i,c,l,r,d,m,p])}const Pf=[{path:"/",name:"dashboard",component:"Dashboard",title:"Dashboard",description:"Main dashboard overview",exact:!0},{path:"/packages",name:"packages",component:"PackagesOverview",title:"Packages",description:"Package management and overview",exact:!0},{path:"/packages/:name",name:"package-detail",component:"PackageDetail",title:"Package Details",description:"Detailed view of a specific package"},{path:"/dependencies",name:"dependencies",component:"DependencyGraph",title:"Dependencies",description:"Dependency graph visualization"},{path:"/health",name:"health",component:"HealthStatus",title:"Health Status",description:"Monorepo health monitoring"},{path:"/publish",name:"publish",component:"PublishControl",title:"Publish Control",description:"Package publishing and versioning"},{path:"/release",name:"release",component:"ReleaseManager",title:"Release Manager",description:"Comprehensive release management with Changesets",protected:!0},{path:"/ci",name:"ci",component:"CIIntegration",title:"CI/CD",description:"Continuous integration and deployment"},{path:"/pipeline",name:"pipeline",component:"Pipeline",title:"Release Pipeline",description:"Real-time release pipeline monitoring and management",protected:!0},{path:"/config",name:"config",component:"ConfigInspector",title:"Configuration",description:"Configuration file inspector"}];Pf.filter(r=>!r.path.includes(":")&&r.path!=="/");const pe="w-6 h-6",Ex=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M10.5 3.75H5.625a1.875 1.875 0 0 0-1.875 1.875V20.25a1.875 1.875 0 0 0 1.875 1.875h12.75a1.875 1.875 0 0 0 1.875-1.875V5.625a1.875 1.875 0 0 0-1.875-1.875H13.5m-3 0V3m0 .75H9m1.5 0h1.5m-9 6.75h12m-12 4.5h12"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"})}),Ut=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"})}),ti=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),bs=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),kx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})}):t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:[t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),Tx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.996 0 1.956-.11 2.895-.327m4.326-3.494a11.952 11.952 0 0 0 3.464-5.192c-1.292-4.338-5.31-7.5-10.066-7.5-.996 0-1.956.11-2.895.327m0 0a11.966 11.966 0 0 0-4.576 3.84m4.576-3.84a11.966 11.966 0 0 1 4.576 3.84M6.502 16.503a3 3 0 1 1 4.243-4.243m-4.243 4.243L3.75 19.75"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),Rx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:[t.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25z"}),t.jsx("path",{d:"M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})]}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})}),ni=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M8 5v14l11-7z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.591-.784l12 9c.54.406.54 1.358 0 1.764l-12 9c-.674.614-1.591.07-1.591-.784V5.653z"})}),Rc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M7 14l5-5 5 5z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18"})}),Lf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M7 10l5 5 5-5z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3"})}),_x=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),Am=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 4.5L15.75 12l-7.5 7.5"})}),va=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"})}),Ax=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})}),Dt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Qt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.3 10.3l-1.3 1.3L13.3 15l1.3 1.3-1.3 1.3L12 16.3l-1.3 1.3-1.3-1.3L10.7 15 9.4 13.7l1.3-1.3L10.7 11l-1.3-1.3 1.3-1.3L12 10.3l1.3-1.3 1.3 1.3L13.3 11l1.3 1.3z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),ri=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"})}),Sa=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M5 9.2h3V19H5zM10.6 5h2.8v14h-2.8zm5.6 8H19v6h-2.8z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75zM9.75 6.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v13.5c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V6.875zm6-4.5c-.621 0-1.125.504-1.125 1.125v15.75c0 .621.504 1.125 1.125 1.125h2.25a1.125 1.125 0 0 0 1.125-1.125V3.375c0-.621-.504-1.125-1.125-1.125h-2.25z"})}),_c=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Of=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM16 16v-3.5h-3v3.5h-3l4 4 4-4h-2z"})}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.6 4.6 0 0 1-.88-9.1A5 5 0 1 1 15.9 6L16 6a5 5 0 1 1 .9 9.9m-5 5v-5m0 0L9.7 10.7M12 16l2.3-2.3"})}),Px=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.75 7.5A2.25 2.25 0 0 1 8 5.25h8a2.25 2.25 0 0 1 2.25 2.25v8a2.25 2.25 0 0 1-2.25 2.25H8A2.25 2.25 0 0 1 5.75 15V7.5Z"})}),si=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"})}),Ac=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2z"})}),Yl=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),Pc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 8h10M7 12h10m-7 4h7M9 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-4l-2-2z"})}),Lx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),Ox=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.185 0-2.25 1.065-2.25 2.25v5.338a2.25 2.25 0 0 0 .375 1.322l1.968 2.332c.494.583.745 1.379.745 2.191V17.5a2.25 2.25 0 0 0 2.25 2.25h5a2.25 2.25 0 0 0 2.25-2.25v-1.5a.75.75 0 0 0-1.5 0v1.5a.75.75 0 0 1-.75.75h-5a.75.75 0 0 1-.75-.75V9.991a.75.75 0 0 1-.75-.75V4.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 0 1.5 0V4.5c0-.647-.146-1.262-.406-1.812z"})}),Lc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.402.402.937.629 1.531.629a2.16 2.16 0 0 0 1.532-.629l7.04-7.04a2.16 2.16 0 0 0 .628-1.532c0-.595-.227-1.129-.628-1.531l-9.58-9.581a2.25 2.25 0 0 0-1.592-.659H9.568z"})}),If=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008zM12 15h.008v.008H12V15zm0 2.25h.008v.008H12v-.008zM9.75 15h.008v.008H9.75V15zm0 2.25h.008v.008H9.75v-.008zM7.5 15h.008v.008H7.5V15zm0 2.25h.008v.008H7.5v-.008zM14.25 15h.008v.008H14.25V15zm0 2.25h.008v.008H14.25v-.008zM16.5 15h.008v.008H16.5V15zm0 2.25h.008v.008H16.5v-.008z"})}),Je=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),ai=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.039l1.758-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})}),Un=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5,variant:c="outline"})=>c==="solid"?t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:[t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})," "]}):t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})}),Oc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5z"})}),li=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})}),ys=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0zm-9-3.75h.008v.008H12V8.25z"})}),lt=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})}),pr=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z"})}),Mf=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:[t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Ur=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:[t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Ix=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H8.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0H12.25m4.125 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"})}),Pm=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})}),Lm=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.655.355-1.08.852-1.358 1.446-.201.416-.348.665-.518.923a2.712 2.712 0 0 0-.5 1.703c0 .462.1.946.348 1.384.245.531.645 1.046 1.28 1.696a.75.75 0 0 0 1.067-.03c.635-.64 1.035-1.165 1.28-1.696.248-.438.348-.922.348-1.384a2.712 2.712 0 0 0-.5-1.703c-.17-.258-.317-.507-.518-.923-.278-.594-.703-1.091-1.358-1.446m0 0C9.806 2.94 10.923 2.5 12 2.5c1.077 0 2.194.44 3.15 1.336m-1.8 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296a.75.75 0 0 0-.584 1.28 60.461 60.461 0 0 1-2.694-.449.75.75 0 0 0-.606.073c-.223.145-.456.366-.656.732a2.75 2.75 0 0 0-.426-1.26c0-.45.09-.88.258-1.28H9m0 0c.068.087.137.176.207.266.343.417.682.83 1.013 1.296.31.426.629.846 1.013 1.296M6.75 12a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm12 0a3 3 0 1 1 6 0 3 3 0 0 1-6 0z"})}),Mx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.375 19.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25m-17.25-4.5h17.25"})}),Dx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5.432 15.3a9.01 9.01 0 0 0-2.02 3.991v2.084a2.25 2.25 0 0 0 2.25 2.25h13.636a2.25 2.25 0 0 0 2.25-2.25v-2.084a9.01 9.01 0 0 0-2.02-3.991l-3.659-4.591A2.25 2.25 0 0 1 14.25 8.818v-5.714m0 0L9.75 3.104M14.25 3.104l4.5 0v5.714a2.25 2.25 0 0 1-.659 1.591L18.568 15.3"})}),Fx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6.75v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0zm12 0v10.5a.75.75 0 0 1-1.5 0V6.75m0 0a.75.75 0 0 1 1.5 0z"})}),mc=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9z"})}),Ux=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-6-3.75h.008v.008H12v-.008zm0 2.25h.008v.008H12v-.008zm0-8.25h.008v.008H12V8.25z"})}),Bx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.5 5.5a7.5 7.5 0 0 0 10.5 10.5zm-3-7.5h-3m0 0H9m0 0v3m0-3v-3"})}),zx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})}),Hx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})}),$x=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:i,stroke:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})}),Vx=({className:r=pe,width:s=24,height:l=24,strokeWidth:i=1.5})=>t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:r,width:s,height:l,children:t.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v 3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})}),fc={LOGIN_SUCCESS:"Login successful! Redirecting...",LOGIN_FAILED:"Login failed",LOGOUT_SUCCESS:"You have been logged out",SESSION_EXPIRED:"Your session has expired. Please login again.",AUTH_FAILED:"Authentication failed"},be={UNKNOWN_ERROR:"Unknown error occurred",NETWORK_ERROR:"Network error. Please check your connection.",FAILED_TO_FETCH_PACKAGES:"Failed to fetch workspace packages",FAILED_TO_FETCH_WORKFLOWS:"Failed to fetch workflows",FAILED_TO_TRIGGER_WORKFLOW:"Failed to trigger workflow",FAILED_TO_CANCEL_RUN:"Failed to cancel workflow run",FAILED_TO_RERUN_WORKFLOW:"Failed to rerun workflow",FAILED_TO_FETCH_LOGS:"Failed to fetch job logs",PERMISSION_ERROR:"Permission denied",AUTHENTICATION_ERROR:"Authentication error",FAILED_TO_FETCH_USER_INFO:"Failed to fetch user info",FAILED_TO_REFRESH_SESSION:"Failed to refresh session",FAILED_TO_CHECK_PERMISSION:"Failed to check permission",FAILED_TO_CHECK_ACTION_PERMISSION:"Failed to check action permission",VALIDATION_FAILED:"Validation failed",FAILED_TO_CREATE_CHANGESET:"Failed to create changeset",FAILED_TO_TRIGGER_PUBLISH:"Failed to trigger publish",FAILED_TO_SAVE_CONFIG:"Failed to save configuration"},Wx="Describe the changes in this release (e.g., 'Add new API endpoints for user management')",Gx="Summary must be at least 10 characters",Kx=6e4,Re={AUTH:{LOGIN:"/auth/login",CALLBACK:"/auth/callback",ME:"/auth/me",VALIDATE:"/auth/validate",LOGOUT:"/auth/logout",REFRESH:"/auth/refresh"},PACKAGES:{REFRESH:"/packages/refresh",UPDATE_CONFIG:"/packages/update-config",LIST:"/packages",DETAILS:r=>`/packages/${encodeURIComponent(r)}`},PIPELINES:{LIST:"/pipelines",STATUS:r=>`/pipelines/${r}/status`},PUBLISH:{PREVIEW:"/publish/preview",STATUS:"/publish/status",PACKAGES:"/publish/packages",CHANGESETS:"/publish/changesets",CREATE_CHANGESET:"/publish/changesets/create",TRIGGER:"/publish/trigger"},CONFIG:{FILES:"/config/files",FILE:r=>`/config/files/${encodeURIComponent(r)}`},HEALTH:{PACKAGES:"/health/packages",REFRESH:"/health/refresh"},WORKFLOWS:{LIST:(r,s)=>`/workflows/${r}/${s}`,AVAILABLE:(r,s)=>`/workflows/${r}/${s}/available`,BY_PACKAGE:(r,s,l)=>`/workflows/package/${r}/${s}/${encodeURIComponent(l)}`,RUNS:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}`,LOGS:(r,s,l)=>`/workflows/${r}/${s}/jobs/${l}/logs`,TRIGGER:(r,s)=>`/workflows/${r}/${s}/trigger`,CANCEL:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/cancel`,RERUN:(r,s,l)=>`/workflows/${r}/${s}/runs/${l}/rerun`}};function Df(r,s){return function(){return r.apply(s,arguments)}}const{toString:qx}=Object.prototype,{getPrototypeOf:Ic}=Object,{iterator:ii,toStringTag:Ff}=Symbol,oi=(r=>s=>{const l=qx.call(s);return r[l]||(r[l]=l.slice(8,-1).toLowerCase())})(Object.create(null)),dn=r=>(r=r.toLowerCase(),s=>oi(s)===r),ci=r=>s=>typeof s===r,{isArray:Ss}=Array,vs=ci("undefined");function Ca(r){return r!==null&&!vs(r)&&r.constructor!==null&&!vs(r.constructor)&&Rt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Uf=dn("ArrayBuffer");function Yx(r){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(r):s=r&&r.buffer&&Uf(r.buffer),s}const Qx=ci("string"),Rt=ci("function"),Bf=ci("number"),Ea=r=>r!==null&&typeof r=="object",Jx=r=>r===!0||r===!1,Vl=r=>{if(oi(r)!=="object")return!1;const s=Ic(r);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Ff in r)&&!(ii in r)},Xx=r=>{if(!Ea(r)||Ca(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},Zx=dn("Date"),eg=dn("File"),tg=dn("Blob"),ng=dn("FileList"),rg=r=>Ea(r)&&Rt(r.pipe),sg=r=>{let s;return r&&(typeof FormData=="function"&&r instanceof FormData||Rt(r.append)&&((s=oi(r))==="formdata"||s==="object"&&Rt(r.toString)&&r.toString()==="[object FormData]"))},ag=dn("URLSearchParams"),[lg,ig,og,cg]=["ReadableStream","Request","Response","Headers"].map(dn),ug=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ka(r,s,{allOwnKeys:l=!1}={}){if(r===null||typeof r>"u")return;let i,c;if(typeof r!="object"&&(r=[r]),Ss(r))for(i=0,c=r.length;i<c;i++)s.call(null,r[i],i,r);else{if(Ca(r))return;const d=l?Object.getOwnPropertyNames(r):Object.keys(r),m=d.length;let p;for(i=0;i<m;i++)p=d[i],s.call(null,r[p],p,r)}}function zf(r,s){if(Ca(r))return null;s=s.toLowerCase();const l=Object.keys(r);let i=l.length,c;for(;i-- >0;)if(c=l[i],s===c.toLowerCase())return c;return null}const Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hf=r=>!vs(r)&&r!==Dr;function hc(){const{caseless:r,skipUndefined:s}=Hf(this)&&this||{},l={},i=(c,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const m=r&&zf(l,d)||d;Vl(l[m])&&Vl(c)?l[m]=hc(l[m],c):Vl(c)?l[m]=hc({},c):Ss(c)?l[m]=c.slice():(!s||!vs(c))&&(l[m]=c)};for(let c=0,d=arguments.length;c<d;c++)arguments[c]&&ka(arguments[c],i);return l}const dg=(r,s,l,{allOwnKeys:i}={})=>(ka(s,(c,d)=>{l&&Rt(c)?Object.defineProperty(r,d,{value:Df(c,l),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,d,{value:c,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),r),mg=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),fg=(r,s,l,i)=>{r.prototype=Object.create(s.prototype,i),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:s.prototype}),l&&Object.assign(r.prototype,l)},hg=(r,s,l,i)=>{let c,d,m;const p={};if(s=s||{},r==null)return s;do{for(c=Object.getOwnPropertyNames(r),d=c.length;d-- >0;)m=c[d],(!i||i(m,r,s))&&!p[m]&&(s[m]=r[m],p[m]=!0);r=l!==!1&&Ic(r)}while(r&&(!l||l(r,s))&&r!==Object.prototype);return s},pg=(r,s,l)=>{r=String(r),(l===void 0||l>r.length)&&(l=r.length),l-=s.length;const i=r.indexOf(s,l);return i!==-1&&i===l},xg=r=>{if(!r)return null;if(Ss(r))return r;let s=r.length;if(!Bf(s))return null;const l=new Array(s);for(;s-- >0;)l[s]=r[s];return l},gg=(r=>s=>r&&s instanceof r)(typeof Uint8Array<"u"&&Ic(Uint8Array)),yg=(r,s)=>{const i=(r&&r[ii]).call(r);let c;for(;(c=i.next())&&!c.done;){const d=c.value;s.call(r,d[0],d[1])}},vg=(r,s)=>{let l;const i=[];for(;(l=r.exec(s))!==null;)i.push(l);return i},jg=dn("HTMLFormElement"),wg=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(l,i,c){return i.toUpperCase()+c}),Om=(({hasOwnProperty:r})=>(s,l)=>r.call(s,l))(Object.prototype),Ng=dn("RegExp"),$f=(r,s)=>{const l=Object.getOwnPropertyDescriptors(r),i={};ka(l,(c,d)=>{let m;(m=s(c,d,r))!==!1&&(i[d]=m||c)}),Object.defineProperties(r,i)},bg=r=>{$f(r,(s,l)=>{if(Rt(r)&&["arguments","caller","callee"].indexOf(l)!==-1)return!1;const i=r[l];if(Rt(i)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+l+"'")})}})},Sg=(r,s)=>{const l={},i=c=>{c.forEach(d=>{l[d]=!0})};return Ss(r)?i(r):i(String(r).split(s)),l},Cg=()=>{},Eg=(r,s)=>r!=null&&Number.isFinite(r=+r)?r:s;function kg(r){return!!(r&&Rt(r.append)&&r[Ff]==="FormData"&&r[ii])}const Tg=r=>{const s=new Array(10),l=(i,c)=>{if(Ea(i)){if(s.indexOf(i)>=0)return;if(Ca(i))return i;if(!("toJSON"in i)){s[c]=i;const d=Ss(i)?[]:{};return ka(i,(m,p)=>{const h=l(m,c+1);!vs(h)&&(d[p]=h)}),s[c]=void 0,d}}return i};return l(r,0)},Rg=dn("AsyncFunction"),_g=r=>r&&(Ea(r)||Rt(r))&&Rt(r.then)&&Rt(r.catch),Vf=((r,s)=>r?setImmediate:s?((l,i)=>(Dr.addEventListener("message",({source:c,data:d})=>{c===Dr&&d===l&&i.length&&i.shift()()},!1),c=>{i.push(c),Dr.postMessage(l,"*")}))(`axios@${Math.random()}`,[]):l=>setTimeout(l))(typeof setImmediate=="function",Rt(Dr.postMessage)),Ag=typeof queueMicrotask<"u"?queueMicrotask.bind(Dr):typeof process<"u"&&process.nextTick||Vf,Pg=r=>r!=null&&Rt(r[ii]),I={isArray:Ss,isArrayBuffer:Uf,isBuffer:Ca,isFormData:sg,isArrayBufferView:Yx,isString:Qx,isNumber:Bf,isBoolean:Jx,isObject:Ea,isPlainObject:Vl,isEmptyObject:Xx,isReadableStream:lg,isRequest:ig,isResponse:og,isHeaders:cg,isUndefined:vs,isDate:Zx,isFile:eg,isBlob:tg,isRegExp:Ng,isFunction:Rt,isStream:rg,isURLSearchParams:ag,isTypedArray:gg,isFileList:ng,forEach:ka,merge:hc,extend:dg,trim:ug,stripBOM:mg,inherits:fg,toFlatObject:hg,kindOf:oi,kindOfTest:dn,endsWith:pg,toArray:xg,forEachEntry:yg,matchAll:vg,isHTMLForm:jg,hasOwnProperty:Om,hasOwnProp:Om,reduceDescriptors:$f,freezeMethods:bg,toObjectSet:Sg,toCamelCase:wg,noop:Cg,toFiniteNumber:Eg,findKey:zf,global:Dr,isContextDefined:Hf,isSpecCompliantForm:kg,toJSONObject:Tg,isAsyncFn:Rg,isThenable:_g,setImmediate:Vf,asap:Ag,isIterable:Pg};let ye=class Wf extends Error{static from(s,l,i,c,d,m){const p=new Wf(s.message,l||s.code,i,c,d);return p.cause=s,p.name=s.name,m&&Object.assign(p,m),p}constructor(s,l,i,c,d){super(s),this.name="AxiosError",this.isAxiosError=!0,l&&(this.code=l),i&&(this.config=i),c&&(this.request=c),d&&(this.response=d,this.status=d.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}};ye.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ye.ERR_BAD_OPTION="ERR_BAD_OPTION";ye.ECONNABORTED="ECONNABORTED";ye.ETIMEDOUT="ETIMEDOUT";ye.ERR_NETWORK="ERR_NETWORK";ye.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ye.ERR_DEPRECATED="ERR_DEPRECATED";ye.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ye.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ye.ERR_CANCELED="ERR_CANCELED";ye.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ye.ERR_INVALID_URL="ERR_INVALID_URL";const Lg=null;function pc(r){return I.isPlainObject(r)||I.isArray(r)}function Gf(r){return I.endsWith(r,"[]")?r.slice(0,-2):r}function Im(r,s,l){return r?r.concat(s).map(function(c,d){return c=Gf(c),!l&&d?"["+c+"]":c}).join(l?".":""):s}function Og(r){return I.isArray(r)&&!r.some(pc)}const Ig=I.toFlatObject(I,{},null,function(s){return/^is[A-Z]/.test(s)});function ui(r,s,l){if(!I.isObject(r))throw new TypeError("target must be an object");s=s||new FormData,l=I.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,b){return!I.isUndefined(b[R])});const i=l.metaTokens,c=l.visitor||v,d=l.dots,m=l.indexes,h=(l.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(s);if(!I.isFunction(c))throw new TypeError("visitor must be a function");function g(N){if(N===null)return"";if(I.isDate(N))return N.toISOString();if(I.isBoolean(N))return N.toString();if(!h&&I.isBlob(N))throw new ye("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(N)||I.isTypedArray(N)?h&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function v(N,R,b){let D=N;if(N&&!b&&typeof N=="object"){if(I.endsWith(R,"{}"))R=i?R:R.slice(0,-2),N=JSON.stringify(N);else if(I.isArray(N)&&Og(N)||(I.isFileList(N)||I.endsWith(R,"[]"))&&(D=I.toArray(N)))return R=Gf(R),D.forEach(function(P,U){!(I.isUndefined(P)||P===null)&&s.append(m===!0?Im([R],U,d):m===null?R:R+"[]",g(P))}),!1}return pc(N)?!0:(s.append(Im(b,R,d),g(N)),!1)}const y=[],k=Object.assign(Ig,{defaultVisitor:v,convertValue:g,isVisitable:pc});function M(N,R){if(!I.isUndefined(N)){if(y.indexOf(N)!==-1)throw Error("Circular reference detected in "+R.join("."));y.push(N),I.forEach(N,function(D,L){(!(I.isUndefined(D)||D===null)&&c.call(s,D,I.isString(L)?L.trim():L,R,k))===!0&&M(D,R?R.concat(L):[L])}),y.pop()}}if(!I.isObject(r))throw new TypeError("data must be an object");return M(r),s}function Mm(r){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(i){return s[i]})}function Mc(r,s){this._pairs=[],r&&ui(r,this,s)}const Kf=Mc.prototype;Kf.append=function(s,l){this._pairs.push([s,l])};Kf.toString=function(s){const l=s?function(i){return s.call(this,i,Mm)}:Mm;return this._pairs.map(function(c){return l(c[0])+"="+l(c[1])},"").join("&")};function Mg(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qf(r,s,l){if(!s)return r;const i=l&&l.encode||Mg,c=I.isFunction(l)?{serialize:l}:l,d=c&&c.serialize;let m;if(d?m=d(s,c):m=I.isURLSearchParams(s)?s.toString():new Mc(s,c).toString(i),m){const p=r.indexOf("#");p!==-1&&(r=r.slice(0,p)),r+=(r.indexOf("?")===-1?"?":"&")+m}return r}class Dm{constructor(){this.handlers=[]}use(s,l,i){return this.handlers.push({fulfilled:s,rejected:l,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){I.forEach(this.handlers,function(i){i!==null&&s(i)})}}const Dc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Dg=typeof URLSearchParams<"u"?URLSearchParams:Mc,Fg=typeof FormData<"u"?FormData:null,Ug=typeof Blob<"u"?Blob:null,Bg={isBrowser:!0,classes:{URLSearchParams:Dg,FormData:Fg,Blob:Ug},protocols:["http","https","file","blob","url","data"]},Fc=typeof window<"u"&&typeof document<"u",xc=typeof navigator=="object"&&navigator||void 0,zg=Fc&&(!xc||["ReactNative","NativeScript","NS"].indexOf(xc.product)<0),Hg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$g=Fc&&window.location.href||"http://localhost",Vg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fc,hasStandardBrowserEnv:zg,hasStandardBrowserWebWorkerEnv:Hg,navigator:xc,origin:$g},Symbol.toStringTag,{value:"Module"})),ht={...Vg,...Bg};function Wg(r,s){return ui(r,new ht.classes.URLSearchParams,{visitor:function(l,i,c,d){return ht.isNode&&I.isBuffer(l)?(this.append(i,l.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...s})}function Gg(r){return I.matchAll(/\w+|\[(\w*)]/g,r).map(s=>s[0]==="[]"?"":s[1]||s[0])}function Kg(r){const s={},l=Object.keys(r);let i;const c=l.length;let d;for(i=0;i<c;i++)d=l[i],s[d]=r[d];return s}function Yf(r){function s(l,i,c,d){let m=l[d++];if(m==="__proto__")return!0;const p=Number.isFinite(+m),h=d>=l.length;return m=!m&&I.isArray(c)?c.length:m,h?(I.hasOwnProp(c,m)?c[m]=[c[m],i]:c[m]=i,!p):((!c[m]||!I.isObject(c[m]))&&(c[m]=[]),s(l,i,c[m],d)&&I.isArray(c[m])&&(c[m]=Kg(c[m])),!p)}if(I.isFormData(r)&&I.isFunction(r.entries)){const l={};return I.forEachEntry(r,(i,c)=>{s(Gg(i),c,l,0)}),l}return null}function qg(r,s,l){if(I.isString(r))try{return(s||JSON.parse)(r),I.trim(r)}catch(i){if(i.name!=="SyntaxError")throw i}return(l||JSON.stringify)(r)}const Ta={transitional:Dc,adapter:["xhr","http","fetch"],transformRequest:[function(s,l){const i=l.getContentType()||"",c=i.indexOf("application/json")>-1,d=I.isObject(s);if(d&&I.isHTMLForm(s)&&(s=new FormData(s)),I.isFormData(s))return c?JSON.stringify(Yf(s)):s;if(I.isArrayBuffer(s)||I.isBuffer(s)||I.isStream(s)||I.isFile(s)||I.isBlob(s)||I.isReadableStream(s))return s;if(I.isArrayBufferView(s))return s.buffer;if(I.isURLSearchParams(s))return l.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let p;if(d){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Wg(s,this.formSerializer).toString();if((p=I.isFileList(s))||i.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ui(p?{"files[]":s}:s,h&&new h,this.formSerializer)}}return d||c?(l.setContentType("application/json",!1),qg(s)):s}],transformResponse:[function(s){const l=this.transitional||Ta.transitional,i=l&&l.forcedJSONParsing,c=this.responseType==="json";if(I.isResponse(s)||I.isReadableStream(s))return s;if(s&&I.isString(s)&&(i&&!this.responseType||c)){const m=!(l&&l.silentJSONParsing)&&c;try{return JSON.parse(s,this.parseReviver)}catch(p){if(m)throw p.name==="SyntaxError"?ye.from(p,ye.ERR_BAD_RESPONSE,this,null,this.response):p}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],r=>{Ta.headers[r]={}});const Yg=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qg=r=>{const s={};let l,i,c;return r&&r.split(`
9
- `).forEach(function(m){c=m.indexOf(":"),l=m.substring(0,c).trim().toLowerCase(),i=m.substring(c+1).trim(),!(!l||s[l]&&Yg[l])&&(l==="set-cookie"?s[l]?s[l].push(i):s[l]=[i]:s[l]=s[l]?s[l]+", "+i:i)}),s},Fm=Symbol("internals");function fa(r){return r&&String(r).trim().toLowerCase()}function Wl(r){return r===!1||r==null?r:I.isArray(r)?r.map(Wl):String(r)}function Jg(r){const s=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=l.exec(r);)s[i[1]]=i[2];return s}const Xg=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Zo(r,s,l,i,c){if(I.isFunction(i))return i.call(this,s,l);if(c&&(s=l),!!I.isString(s)){if(I.isString(i))return s.indexOf(i)!==-1;if(I.isRegExp(i))return i.test(s)}}function Zg(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,l,i)=>l.toUpperCase()+i)}function ey(r,s){const l=I.toCamelCase(" "+s);["get","set","has"].forEach(i=>{Object.defineProperty(r,i+l,{value:function(c,d,m){return this[i].call(this,s,c,d,m)},configurable:!0})})}let _t=class{constructor(s){s&&this.set(s)}set(s,l,i){const c=this;function d(p,h,g){const v=fa(h);if(!v)throw new Error("header name must be a non-empty string");const y=I.findKey(c,v);(!y||c[y]===void 0||g===!0||g===void 0&&c[y]!==!1)&&(c[y||h]=Wl(p))}const m=(p,h)=>I.forEach(p,(g,v)=>d(g,v,h));if(I.isPlainObject(s)||s instanceof this.constructor)m(s,l);else if(I.isString(s)&&(s=s.trim())&&!Xg(s))m(Qg(s),l);else if(I.isObject(s)&&I.isIterable(s)){let p={},h,g;for(const v of s){if(!I.isArray(v))throw TypeError("Object iterator must return a key-value pair");p[g=v[0]]=(h=p[g])?I.isArray(h)?[...h,v[1]]:[h,v[1]]:v[1]}m(p,l)}else s!=null&&d(l,s,i);return this}get(s,l){if(s=fa(s),s){const i=I.findKey(this,s);if(i){const c=this[i];if(!l)return c;if(l===!0)return Jg(c);if(I.isFunction(l))return l.call(this,c,i);if(I.isRegExp(l))return l.exec(c);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,l){if(s=fa(s),s){const i=I.findKey(this,s);return!!(i&&this[i]!==void 0&&(!l||Zo(this,this[i],i,l)))}return!1}delete(s,l){const i=this;let c=!1;function d(m){if(m=fa(m),m){const p=I.findKey(i,m);p&&(!l||Zo(i,i[p],p,l))&&(delete i[p],c=!0)}}return I.isArray(s)?s.forEach(d):d(s),c}clear(s){const l=Object.keys(this);let i=l.length,c=!1;for(;i--;){const d=l[i];(!s||Zo(this,this[d],d,s,!0))&&(delete this[d],c=!0)}return c}normalize(s){const l=this,i={};return I.forEach(this,(c,d)=>{const m=I.findKey(i,d);if(m){l[m]=Wl(c),delete l[d];return}const p=s?Zg(d):String(d).trim();p!==d&&delete l[d],l[p]=Wl(c),i[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const l=Object.create(null);return I.forEach(this,(i,c)=>{i!=null&&i!==!1&&(l[c]=s&&I.isArray(i)?i.join(", "):i)}),l}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,l])=>s+": "+l).join(`
10
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...l){const i=new this(s);return l.forEach(c=>i.set(c)),i}static accessor(s){const i=(this[Fm]=this[Fm]={accessors:{}}).accessors,c=this.prototype;function d(m){const p=fa(m);i[p]||(ey(c,m),i[p]=!0)}return I.isArray(s)?s.forEach(d):d(s),this}};_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(_t.prototype,({value:r},s)=>{let l=s[0].toUpperCase()+s.slice(1);return{get:()=>r,set(i){this[l]=i}}});I.freezeMethods(_t);function ec(r,s){const l=this||Ta,i=s||l,c=_t.from(i.headers);let d=i.data;return I.forEach(r,function(p){d=p.call(l,d,c.normalize(),s?s.status:void 0)}),c.normalize(),d}function Qf(r){return!!(r&&r.__CANCEL__)}let Ra=class extends ye{constructor(s,l,i){super(s??"canceled",ye.ERR_CANCELED,l,i),this.name="CanceledError",this.__CANCEL__=!0}};function Jf(r,s,l){const i=l.config.validateStatus;!l.status||!i||i(l.status)?r(l):s(new ye("Request failed with status code "+l.status,[ye.ERR_BAD_REQUEST,ye.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))}function ty(r){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return s&&s[1]||""}function ny(r,s){r=r||10;const l=new Array(r),i=new Array(r);let c=0,d=0,m;return s=s!==void 0?s:1e3,function(h){const g=Date.now(),v=i[d];m||(m=g),l[c]=h,i[c]=g;let y=d,k=0;for(;y!==c;)k+=l[y++],y=y%r;if(c=(c+1)%r,c===d&&(d=(d+1)%r),g-m<s)return;const M=v&&g-v;return M?Math.round(k*1e3/M):void 0}}function ry(r,s){let l=0,i=1e3/s,c,d;const m=(g,v=Date.now())=>{l=v,c=null,d&&(clearTimeout(d),d=null),r(...g)};return[(...g)=>{const v=Date.now(),y=v-l;y>=i?m(g,v):(c=g,d||(d=setTimeout(()=>{d=null,m(c)},i-y)))},()=>c&&m(c)]}const Ql=(r,s,l=3)=>{let i=0;const c=ny(50,250);return ry(d=>{const m=d.loaded,p=d.lengthComputable?d.total:void 0,h=m-i,g=c(h),v=m<=p;i=m;const y={loaded:m,total:p,progress:p?m/p:void 0,bytes:h,rate:g||void 0,estimated:g&&p&&v?(p-m)/g:void 0,event:d,lengthComputable:p!=null,[s?"download":"upload"]:!0};r(y)},l)},Um=(r,s)=>{const l=r!=null;return[i=>s[0]({lengthComputable:l,total:r,loaded:i}),s[1]]},Bm=r=>(...s)=>I.asap(()=>r(...s)),sy=ht.hasStandardBrowserEnv?((r,s)=>l=>(l=new URL(l,ht.origin),r.protocol===l.protocol&&r.host===l.host&&(s||r.port===l.port)))(new URL(ht.origin),ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent)):()=>!0,ay=ht.hasStandardBrowserEnv?{write(r,s,l,i,c,d,m){if(typeof document>"u")return;const p=[`${r}=${encodeURIComponent(s)}`];I.isNumber(l)&&p.push(`expires=${new Date(l).toUTCString()}`),I.isString(i)&&p.push(`path=${i}`),I.isString(c)&&p.push(`domain=${c}`),d===!0&&p.push("secure"),I.isString(m)&&p.push(`SameSite=${m}`),document.cookie=p.join("; ")},read(r){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ly(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function iy(r,s){return s?r.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):r}function Xf(r,s,l){let i=!ly(s);return r&&(i||l==!1)?iy(r,s):s}const zm=r=>r instanceof _t?{...r}:r;function Br(r,s){s=s||{};const l={};function i(g,v,y,k){return I.isPlainObject(g)&&I.isPlainObject(v)?I.merge.call({caseless:k},g,v):I.isPlainObject(v)?I.merge({},v):I.isArray(v)?v.slice():v}function c(g,v,y,k){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g,y,k)}else return i(g,v,y,k)}function d(g,v){if(!I.isUndefined(v))return i(void 0,v)}function m(g,v){if(I.isUndefined(v)){if(!I.isUndefined(g))return i(void 0,g)}else return i(void 0,v)}function p(g,v,y){if(y in s)return i(g,v);if(y in r)return i(void 0,g)}const h={url:d,method:d,data:d,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:p,headers:(g,v,y)=>c(zm(g),zm(v),y,!0)};return I.forEach(Object.keys({...r,...s}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const y=I.hasOwnProp(h,v)?h[v]:c,k=y(r[v],s[v],v);I.isUndefined(k)&&y!==p||(l[v]=k)}),l}const Zf=r=>{const s=Br({},r);let{data:l,withXSRFToken:i,xsrfHeaderName:c,xsrfCookieName:d,headers:m,auth:p}=s;if(s.headers=m=_t.from(m),s.url=qf(Xf(s.baseURL,s.url,s.allowAbsoluteUrls),r.params,r.paramsSerializer),p&&m.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),I.isFormData(l)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(I.isFunction(l.getHeaders)){const h=l.getHeaders(),g=["content-type","content-length"];Object.entries(h).forEach(([v,y])=>{g.includes(v.toLowerCase())&&m.set(v,y)})}}if(ht.hasStandardBrowserEnv&&(i&&I.isFunction(i)&&(i=i(s)),i||i!==!1&&sy(s.url))){const h=c&&d&&ay.read(d);h&&m.set(c,h)}return s},oy=typeof XMLHttpRequest<"u",cy=oy&&function(r){return new Promise(function(l,i){const c=Zf(r);let d=c.data;const m=_t.from(c.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:g}=c,v,y,k,M,N;function R(){M&&M(),N&&N(),c.cancelToken&&c.cancelToken.unsubscribe(v),c.signal&&c.signal.removeEventListener("abort",v)}let b=new XMLHttpRequest;b.open(c.method.toUpperCase(),c.url,!0),b.timeout=c.timeout;function D(){if(!b)return;const P=_t.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),Q={data:!p||p==="text"||p==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:P,config:r,request:b};Jf(function(Y){l(Y),R()},function(Y){i(Y),R()},Q),b=null}"onloadend"in b?b.onloadend=D:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(D)},b.onabort=function(){b&&(i(new ye("Request aborted",ye.ECONNABORTED,r,b)),b=null)},b.onerror=function(U){const Q=U&&U.message?U.message:"Network Error",de=new ye(Q,ye.ERR_NETWORK,r,b);de.event=U||null,i(de),b=null},b.ontimeout=function(){let U=c.timeout?"timeout of "+c.timeout+"ms exceeded":"timeout exceeded";const Q=c.transitional||Dc;c.timeoutErrorMessage&&(U=c.timeoutErrorMessage),i(new ye(U,Q.clarifyTimeoutError?ye.ETIMEDOUT:ye.ECONNABORTED,r,b)),b=null},d===void 0&&m.setContentType(null),"setRequestHeader"in b&&I.forEach(m.toJSON(),function(U,Q){b.setRequestHeader(Q,U)}),I.isUndefined(c.withCredentials)||(b.withCredentials=!!c.withCredentials),p&&p!=="json"&&(b.responseType=c.responseType),g&&([k,N]=Ql(g,!0),b.addEventListener("progress",k)),h&&b.upload&&([y,M]=Ql(h),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",M)),(c.cancelToken||c.signal)&&(v=P=>{b&&(i(!P||P.type?new Ra(null,r,b):P),b.abort(),b=null)},c.cancelToken&&c.cancelToken.subscribe(v),c.signal&&(c.signal.aborted?v():c.signal.addEventListener("abort",v)));const L=ty(c.url);if(L&&ht.protocols.indexOf(L)===-1){i(new ye("Unsupported protocol "+L+":",ye.ERR_BAD_REQUEST,r));return}b.send(d||null)})},uy=(r,s)=>{const{length:l}=r=r?r.filter(Boolean):[];if(s||l){let i=new AbortController,c;const d=function(g){if(!c){c=!0,p();const v=g instanceof Error?g:this.reason;i.abort(v instanceof ye?v:new Ra(v instanceof Error?v.message:v))}};let m=s&&setTimeout(()=>{m=null,d(new ye(`timeout of ${s}ms exceeded`,ye.ETIMEDOUT))},s);const p=()=>{r&&(m&&clearTimeout(m),m=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),r=null)};r.forEach(g=>g.addEventListener("abort",d));const{signal:h}=i;return h.unsubscribe=()=>I.asap(p),h}},dy=function*(r,s){let l=r.byteLength;if(l<s){yield r;return}let i=0,c;for(;i<l;)c=i+s,yield r.slice(i,c),i=c},my=async function*(r,s){for await(const l of fy(r))yield*dy(l,s)},fy=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const s=r.getReader();try{for(;;){const{done:l,value:i}=await s.read();if(l)break;yield i}}finally{await s.cancel()}},Hm=(r,s,l,i)=>{const c=my(r,s);let d=0,m,p=h=>{m||(m=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:g,value:v}=await c.next();if(g){p(),h.close();return}let y=v.byteLength;if(l){let k=d+=y;l(k)}h.enqueue(new Uint8Array(v))}catch(g){throw p(g),g}},cancel(h){return p(h),c.return()}},{highWaterMark:2})},$m=64*1024,{isFunction:zl}=I,hy=(({Request:r,Response:s})=>({Request:r,Response:s}))(I.global),{ReadableStream:Vm,TextEncoder:Wm}=I.global,Gm=(r,...s)=>{try{return!!r(...s)}catch{return!1}},py=r=>{r=I.merge.call({skipUndefined:!0},hy,r);const{fetch:s,Request:l,Response:i}=r,c=s?zl(s):typeof fetch=="function",d=zl(l),m=zl(i);if(!c)return!1;const p=c&&zl(Vm),h=c&&(typeof Wm=="function"?(N=>R=>N.encode(R))(new Wm):async N=>new Uint8Array(await new l(N).arrayBuffer())),g=d&&p&&Gm(()=>{let N=!1;const R=new l(ht.origin,{body:new Vm,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!R}),v=m&&p&&Gm(()=>I.isReadableStream(new i("").body)),y={stream:v&&(N=>N.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!y[N]&&(y[N]=(R,b)=>{let D=R&&R[N];if(D)return D.call(R);throw new ye(`Response type '${N}' is not supported`,ye.ERR_NOT_SUPPORT,b)})});const k=async N=>{if(N==null)return 0;if(I.isBlob(N))return N.size;if(I.isSpecCompliantForm(N))return(await new l(ht.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(I.isArrayBufferView(N)||I.isArrayBuffer(N))return N.byteLength;if(I.isURLSearchParams(N)&&(N=N+""),I.isString(N))return(await h(N)).byteLength},M=async(N,R)=>{const b=I.toFiniteNumber(N.getContentLength());return b??k(R)};return async N=>{let{url:R,method:b,data:D,signal:L,cancelToken:P,timeout:U,onDownloadProgress:Q,onUploadProgress:de,responseType:Y,headers:Z,withCredentials:we="same-origin",fetchOptions:Se}=Zf(N),ee=s||fetch;Y=Y?(Y+"").toLowerCase():"text";let ve=uy([L,P&&P.toAbortSignal()],U),ue=null;const ge=ve&&ve.unsubscribe&&(()=>{ve.unsubscribe()});let Ie;try{if(de&&g&&b!=="get"&&b!=="head"&&(Ie=await M(Z,D))!==0){let E=new l(R,{method:"POST",body:D,duplex:"half"}),F;if(I.isFormData(D)&&(F=E.headers.get("content-type"))&&Z.setContentType(F),E.body){const[re,z]=Um(Ie,Ql(Bm(de)));D=Hm(E.body,$m,re,z)}}I.isString(we)||(we=we?"include":"omit");const me=d&&"credentials"in l.prototype,Ne={...Se,signal:ve,method:b.toUpperCase(),headers:Z.normalize().toJSON(),body:D,duplex:"half",credentials:me?we:void 0};ue=d&&new l(R,Ne);let K=await(d?ee(ue,Se):ee(R,Ne));const ae=v&&(Y==="stream"||Y==="response");if(v&&(Q||ae&&ge)){const E={};["status","statusText","headers"].forEach(W=>{E[W]=K[W]});const F=I.toFiniteNumber(K.headers.get("content-length")),[re,z]=Q&&Um(F,Ql(Bm(Q),!0))||[];K=new i(Hm(K.body,$m,re,()=>{z&&z(),ge&&ge()}),E)}Y=Y||"text";let J=await y[I.findKey(y,Y)||"text"](K,N);return!ae&&ge&&ge(),await new Promise((E,F)=>{Jf(E,F,{data:J,headers:_t.from(K.headers),status:K.status,statusText:K.statusText,config:N,request:ue})})}catch(me){throw ge&&ge(),me&&me.name==="TypeError"&&/Load failed|fetch/i.test(me.message)?Object.assign(new ye("Network Error",ye.ERR_NETWORK,N,ue,me&&me.response),{cause:me.cause||me}):ye.from(me,me&&me.code,N,ue,me&&me.response)}}},xy=new Map,eh=r=>{let s=r&&r.env||{};const{fetch:l,Request:i,Response:c}=s,d=[i,c,l];let m=d.length,p=m,h,g,v=xy;for(;p--;)h=d[p],g=v.get(h),g===void 0&&v.set(h,g=p?new Map:py(s)),v=g;return g};eh();const Uc={http:Lg,xhr:cy,fetch:{get:eh}};I.forEach(Uc,(r,s)=>{if(r){try{Object.defineProperty(r,"name",{value:s})}catch{}Object.defineProperty(r,"adapterName",{value:s})}});const Km=r=>`- ${r}`,gy=r=>I.isFunction(r)||r===null||r===!1;function yy(r,s){r=I.isArray(r)?r:[r];const{length:l}=r;let i,c;const d={};for(let m=0;m<l;m++){i=r[m];let p;if(c=i,!gy(i)&&(c=Uc[(p=String(i)).toLowerCase()],c===void 0))throw new ye(`Unknown adapter '${p}'`);if(c&&(I.isFunction(c)||(c=c.get(s))))break;d[p||"#"+m]=c}if(!c){const m=Object.entries(d).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=l?m.length>1?`since :
11
- `+m.map(Km).join(`
12
- `):" "+Km(m[0]):"as no adapter specified";throw new ye("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return c}const th={getAdapter:yy,adapters:Uc};function tc(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ra(null,r)}function qm(r){return tc(r),r.headers=_t.from(r.headers),r.data=ec.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),th.getAdapter(r.adapter||Ta.adapter,r)(r).then(function(i){return tc(r),i.data=ec.call(r,r.transformResponse,i),i.headers=_t.from(i.headers),i},function(i){return Qf(i)||(tc(r),i&&i.response&&(i.response.data=ec.call(r,r.transformResponse,i.response),i.response.headers=_t.from(i.response.headers))),Promise.reject(i)})}const nh="1.13.5",di={};["object","boolean","number","function","string","symbol"].forEach((r,s)=>{di[r]=function(i){return typeof i===r||"a"+(s<1?"n ":" ")+r}});const Ym={};di.transitional=function(s,l,i){function c(d,m){return"[Axios v"+nh+"] Transitional option '"+d+"'"+m+(i?". "+i:"")}return(d,m,p)=>{if(s===!1)throw new ye(c(m," has been removed"+(l?" in "+l:"")),ye.ERR_DEPRECATED);return l&&!Ym[m]&&(Ym[m]=!0,console.warn(c(m," has been deprecated since v"+l+" and will be removed in the near future"))),s?s(d,m,p):!0}};di.spelling=function(s){return(l,i)=>(console.warn(`${i} is likely a misspelling of ${s}`),!0)};function vy(r,s,l){if(typeof r!="object")throw new ye("options must be an object",ye.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let c=i.length;for(;c-- >0;){const d=i[c],m=s[d];if(m){const p=r[d],h=p===void 0||m(p,d,r);if(h!==!0)throw new ye("option "+d+" must be "+h,ye.ERR_BAD_OPTION_VALUE);continue}if(l!==!0)throw new ye("Unknown option "+d,ye.ERR_BAD_OPTION)}}const Gl={assertOptions:vy,validators:di},Yt=Gl.validators;let Fr=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Dm,response:new Dm}}async request(s,l){try{return await this._request(s,l)}catch(i){if(i instanceof Error){let c={};Error.captureStackTrace?Error.captureStackTrace(c):c=new Error;const d=c.stack?c.stack.replace(/^.+\n/,""):"";try{i.stack?d&&!String(i.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(i.stack+=`
13
- `+d):i.stack=d}catch{}}throw i}}_request(s,l){typeof s=="string"?(l=l||{},l.url=s):l=s||{},l=Br(this.defaults,l);const{transitional:i,paramsSerializer:c,headers:d}=l;i!==void 0&&Gl.assertOptions(i,{silentJSONParsing:Yt.transitional(Yt.boolean),forcedJSONParsing:Yt.transitional(Yt.boolean),clarifyTimeoutError:Yt.transitional(Yt.boolean),legacyInterceptorReqResOrdering:Yt.transitional(Yt.boolean)},!1),c!=null&&(I.isFunction(c)?l.paramsSerializer={serialize:c}:Gl.assertOptions(c,{encode:Yt.function,serialize:Yt.function},!0)),l.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?l.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:l.allowAbsoluteUrls=!0),Gl.assertOptions(l,{baseUrl:Yt.spelling("baseURL"),withXsrfToken:Yt.spelling("withXSRFToken")},!0),l.method=(l.method||this.defaults.method||"get").toLowerCase();let m=d&&I.merge(d.common,d[l.method]);d&&I.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),l.headers=_t.concat(m,d);const p=[];let h=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(l)===!1)return;h=h&&R.synchronous;const b=l.transitional||Dc;b&&b.legacyInterceptorReqResOrdering?p.unshift(R.fulfilled,R.rejected):p.push(R.fulfilled,R.rejected)});const g=[];this.interceptors.response.forEach(function(R){g.push(R.fulfilled,R.rejected)});let v,y=0,k;if(!h){const N=[qm.bind(this),void 0];for(N.unshift(...p),N.push(...g),k=N.length,v=Promise.resolve(l);y<k;)v=v.then(N[y++],N[y++]);return v}k=p.length;let M=l;for(;y<k;){const N=p[y++],R=p[y++];try{M=N(M)}catch(b){R.call(this,b);break}}try{v=qm.call(this,M)}catch(N){return Promise.reject(N)}for(y=0,k=g.length;y<k;)v=v.then(g[y++],g[y++]);return v}getUri(s){s=Br(this.defaults,s);const l=Xf(s.baseURL,s.url,s.allowAbsoluteUrls);return qf(l,s.params,s.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(s){Fr.prototype[s]=function(l,i){return this.request(Br(i||{},{method:s,url:l,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(s){function l(i){return function(d,m,p){return this.request(Br(p||{},{method:s,headers:i?{"Content-Type":"multipart/form-data"}:{},url:d,data:m}))}}Fr.prototype[s]=l(),Fr.prototype[s+"Form"]=l(!0)});let jy=class rh{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(d){l=d});const i=this;this.promise.then(c=>{if(!i._listeners)return;let d=i._listeners.length;for(;d-- >0;)i._listeners[d](c);i._listeners=null}),this.promise.then=c=>{let d;const m=new Promise(p=>{i.subscribe(p),d=p}).then(c);return m.cancel=function(){i.unsubscribe(d)},m},s(function(d,m,p){i.reason||(i.reason=new Ra(d,m,p),l(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const l=this._listeners.indexOf(s);l!==-1&&this._listeners.splice(l,1)}toAbortSignal(){const s=new AbortController,l=i=>{s.abort(i)};return this.subscribe(l),s.signal.unsubscribe=()=>this.unsubscribe(l),s.signal}static source(){let s;return{token:new rh(function(c){s=c}),cancel:s}}};function wy(r){return function(l){return r.apply(null,l)}}function Ny(r){return I.isObject(r)&&r.isAxiosError===!0}const gc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gc).forEach(([r,s])=>{gc[s]=r});function sh(r){const s=new Fr(r),l=Df(Fr.prototype.request,s);return I.extend(l,Fr.prototype,s,{allOwnKeys:!0}),I.extend(l,s,null,{allOwnKeys:!0}),l.create=function(c){return sh(Br(r,c))},l}const Ge=sh(Ta);Ge.Axios=Fr;Ge.CanceledError=Ra;Ge.CancelToken=jy;Ge.isCancel=Qf;Ge.VERSION=nh;Ge.toFormData=ui;Ge.AxiosError=ye;Ge.Cancel=Ge.CanceledError;Ge.all=function(s){return Promise.all(s)};Ge.spread=wy;Ge.isAxiosError=Ny;Ge.mergeConfig=Br;Ge.AxiosHeaders=_t;Ge.formToJSON=r=>Yf(I.isHTMLForm(r)?new FormData(r):r);Ge.getAdapter=th.getAdapter;Ge.HttpStatusCode=gc;Ge.default=Ge;const{Axios:cw,AxiosError:uw,CanceledError:dw,isCancel:mw,CancelToken:fw,VERSION:hw,all:pw,Cancel:xw,isAxiosError:gw,spread:yw,toFormData:vw,AxiosHeaders:jw,HttpStatusCode:ww,formToJSON:Nw,getAdapter:bw,mergeConfig:Sw}=Ge;class Dn extends Error{constructor(s,l,i,c){super(i),this.code=s,this.statusCode=l,this.details=c,this.name="ApiError"}}class by extends Dn{constructor(s){super("TIMEOUT_ERROR",408,s),this.name="TimeoutError"}}class Sy extends Dn{constructor(s,l){super("VALIDATION_ERROR",400,s,l),this.name="ValidationError"}}class Cy extends Dn{constructor(s){super("UNAUTHORIZED",401,s),this.name="UnauthorizedError"}}class Ey extends Dn{constructor(s){super("FORBIDDEN",403,s),this.name="ForbiddenError"}}class ky extends Dn{constructor(s){super("NOT_FOUND",404,s),this.name="NotFoundError"}}class Ty extends Dn{constructor(s,l=500){super("SERVER_ERROR",l,s),this.name="ServerError"}}class Ry{constructor(s={}){const l=s.baseUrl||"http://localhost:8999";if(this.axiosInstance=Ge.create({baseURL:l,timeout:s.timeout||3e4,headers:{"Content-Type":"application/json",...s.headers},withCredentials:!0}),this.retryConfig={maxRetries:s.retryConfig?.maxRetries||3,backoffMultiplier:s.retryConfig?.backoffMultiplier||2,retryableStatusCodes:s.retryConfig?.retryableStatusCodes||[408,429,500,502,503,504]},this.setupRetryInterceptor(),s.interceptors)for(const i of s.interceptors)this.addInterceptor(i)}setupRetryInterceptor(){this.axiosInstance.interceptors.response.use(s=>s,async s=>{const l=s.config;if(!l)return Promise.reject(s);if(l.retryCount=l.retryCount||0,l.retryCount<this.retryConfig.maxRetries&&s.response&&this.retryConfig.retryableStatusCodes.includes(s.response.status)){l.retryCount+=1;const c=1e3*Math.pow(this.retryConfig.backoffMultiplier,l.retryCount-1);return await new Promise(d=>setTimeout(d,c)),this.axiosInstance(l)}return Promise.reject(s)})}addInterceptor(s){this.axiosInstance.interceptors.request.use(async l=>{if(s.onRequest){const i={method:l.method?.toUpperCase(),headers:l.headers,body:l.data,timeout:l.timeout},c=await s.onRequest(i);l.headers=c.headers||l.headers,c.body!==void 0&&(l.data=c.body)}return l},l=>Promise.reject(l)),this.axiosInstance.interceptors.response.use(async l=>{if(s.onResponse){const i={success:!0,data:l.data,meta:{status:l.status,statusText:l.statusText,headers:l.headers,timestamp:Date.now(),duration:0}};await s.onResponse(i)}return l},async l=>{if(s.onError&&l.response){const i=this.createErrorFromStatus(l.response.status,l.response.statusText);await s.onError(i)}return Promise.reject(l)})}createErrorFromStatus(s,l,i){const c=l||`HTTP ${s}`,d=typeof i=="object"?i:void 0;switch(s){case 400:return new Sy(c,d);case 401:return new Cy(c);case 403:return new Ey(c);case 404:return new ky(c);case 408:return new by(c);case 429:return new Dn("RATE_LIMIT",429,"Too many requests",d);case 500:case 502:case 503:case 504:return new Ty(c,s);default:return new Dn(`HTTP_${s}`,s,c,d)}}async request(s,l,i={}){const c=`/api${l}`,d=Date.now();try{const m=await this.axiosInstance.request({method:s.toLowerCase(),url:c,data:i.body,headers:i.headers,timeout:i.timeout}),p=Date.now()-d;return{success:!0,data:m.data,meta:{status:m.status,statusText:m.statusText,headers:m.headers,timestamp:Date.now(),duration:p}}}catch(m){const p=Date.now()-d;if(Ge.isAxiosError(m)){const g=m.response?.status||0,v=m.response?.statusText||m.message,y=this.createErrorFromStatus(g,v,m.response?.data);return console.error(`[${s}] ${c}`,{code:y.code,status:y.statusCode,message:y.message}),{success:!1,error:{code:y.code,message:y.message,status:y.statusCode,details:y.details},meta:{status:g,statusText:v,headers:m.response?.headers||{},timestamp:Date.now(),duration:p}}}const h=new Dn("UNKNOWN_ERROR",0,m instanceof Error?m.message:"Unknown error");return console.error(`[${s}] ${c}`,{code:h.code,message:h.message}),{success:!1,error:{code:h.code,message:h.message,status:h.statusCode},meta:{timestamp:Date.now(),duration:p}}}}get(s,l){return this.request("GET",s,l)}post(s,l,i){return this.request("POST",s,{...i,body:l})}put(s,l,i){return this.request("PUT",s,{...i,body:l})}delete(s,l){return this.request("DELETE",s,l)}patch(s,l,i){return this.request("PATCH",s,{...i,body:l})}}const at={set:(r,s,l=7)=>{const i=new Date;i.setTime(i.getTime()+l*24*60*60*1e3);const c=[`${r}=${encodeURIComponent(s)}`,`expires=${i.toUTCString()}`,"path=/","SameSite=Lax",window.location.protocol==="https:"?"Secure":""].filter(Boolean).join("; ");document.cookie=c},get:r=>{const s=`${r}=`,l=document.cookie.split(";");for(let i=0;i<l.length;i++){const c=l[i].trim();if(c.indexOf(s)===0)return decodeURIComponent(c.substring(s.length))}return null},remove:r=>{document.cookie=`${r}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax`}};var Qm={};function _y(){const r=Qm.REACT_APP_API_URL||Qm.VITE_API_URL;if(r)return r;const s=window.ENV?.API_URL;return s||"http://localhost:8999"}const Ay={onRequest:async r=>{const s=at.get("monodog_session_token");return s?{...r,headers:{...r.headers,Authorization:`Bearer ${s}`}}:r},onError:async r=>(r.statusCode===401&&(at.remove("monodog_session_token"),at.remove("monodog_session_data")),r)},Te=new Ry({baseUrl:_y(),timeout:Kx,headers:{"Content-Type":"application/json"},interceptors:[Ay],retryConfig:{maxRetries:3,retryableStatusCodes:[408,429,500,502,503,504],backoffMultiplier:2}}),ah=w.createContext(void 0),hs="monodog_session_token",ps="monodog_session_data";function Py({children:r}){const[s,l]=w.useState(null),[i,c]=w.useState(!0),[d,m]=w.useState(null);w.useEffect(()=>{const N=at.get(hs),R=at.get(ps);if(N&&R)try{const b=JSON.parse(R);l({sessionToken:N,...b})}catch{at.remove(hs),at.remove(ps)}c(!1)},[]);const p=w.useCallback(async()=>{try{c(!0),m(null);const N=await Te.get(Re.AUTH.LOGIN);if(!N.success)throw new Error(N.error.message||fc.LOGIN_FAILED);N.data.authUrl&&(window.location.href=N.data.authUrl)}catch(N){const R=N instanceof Error?N.message:fc.LOGIN_FAILED;m(R),c(!1)}},[]),h=w.useCallback(async(N,R)=>{try{c(!0),m(null);const b=await Te.get(Re.AUTH.ME,{headers:{Authorization:`Bearer ${N}`}});if(!b.success)throw new Error(be.FAILED_TO_FETCH_USER_INFO);const D=b.data,L={sessionToken:N,user:D.user,scopes:D.scopes||[],expiresAt:D.expiresAt},P={user:D.user,scopes:D.scopes||[],permission:R||D.permission,expiresAt:D.expiresAt};at.set(hs,N),at.set(ps,JSON.stringify(P));const U={...L,permission:R||D.permission};return l(U),!0}catch(b){const D=b instanceof Error?b.message:"Auth failed";return m(D),!1}finally{c(!1)}},[]),g=w.useCallback(async()=>{try{c(!0),s?.sessionToken&&await Te.post(Re.AUTH.LOGOUT,void 0),at.remove(hs),at.remove(ps),l(null)}catch(N){console.error("Logout error:",N)}finally{c(!1)}},[s]),v=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{const N=await Te.post(Re.AUTH.VALIDATE,void 0);return N.success?N.data.valid===!0:(at.remove(hs),at.remove(ps),l(null),!1)}catch(N){return console.error("Session check error:",N),!1}},[s]),y=w.useCallback(async()=>{if(!s?.sessionToken)return!1;try{c(!0);const N=await Te.post(Re.AUTH.REFRESH,void 0);if(!N.success)throw new Error(be.FAILED_TO_REFRESH_SESSION);const R=N.data;if(R.success&&R.sessionToken){const b={sessionToken:R.sessionToken,user:s.user,scopes:s.scopes,expiresAt:R.expiresAt};return at.set(hs,R.sessionToken),at.set(ps,JSON.stringify({user:s.user,scopes:s.scopes,expiresAt:R.expiresAt})),l(b),!0}return!1}catch(N){return console.error("Session refresh error:",N),!1}finally{c(!1)}},[s]);w.useEffect(()=>{if(!s)return;const N=setInterval(()=>{v()},300*1e3);return()=>clearInterval(N)},[s,v]);const k=w.useCallback(N=>{if(!s)return console.warn("[Auth] No session available for permission check"),!1;const R={admin:4,maintain:3,write:2,read:1,none:0};let b="read";const D=s.permission;typeof D=="string"?b=D:D&&typeof D=="object"&&(D.level?b=D.level:D.permission&&(b=D.permission));const L=R[b]||0,P=R[N]||0;return console.debug(`[Auth] Permission check: user=${b}(${L}) required=${N}(${P}) result=${L>=P}`),L>=P},[s]),M={session:s,isAuthenticated:!!s,isLoading:i,error:d,login:p,logout:g,checkSession:v,refreshSession:y,hasPermission:k,permission:(()=>{const N=s?.permission;return N&&N.level||null})()};return window.__authContext={handleOAuthCallback:h},t.jsx(ah.Provider,{value:M,children:r})}function zr(){const r=wf.useContext(ah);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}const Jm=[{name:"Dashboard",href:"/",icon:Ex},{name:"Packages",href:"/packages",icon:Ut},{name:"Dependencies",href:"/dependencies",icon:Sa},{name:"Health Status",href:"/health",icon:_c},{name:"Release",href:"/release",icon:Of},{name:"Pipeline",href:"/pipeline",icon:Un},{name:"Configuration",href:"/config",icon:Ur}];function Ly({children:r}){const s=Ns(),{session:l,logout:i}=zr();return t.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[t.jsxs("div",{className:"fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-medium",children:[t.jsx("div",{className:"flex h-16 items-center justify-center border-b border-neutral-200",children:t.jsx("h1",{className:"text-heading text-xl text-primary-700",children:"MonoDog"})}),t.jsx("nav",{className:"mt-8 px-4",children:t.jsx("ul",{className:"space-y-2",children:Jm.map(c=>{const d=s.pathname===c.href;return t.jsx("li",{children:t.jsxs(Mn,{to:c.href,className:`nav-link ${d?"nav-link-active":"nav-link-inactive"}`,children:[t.jsx(c.icon,{className:"mr-3 h-5 w-5"}),c.name]})},c.name)})})})]}),t.jsxs("div",{className:"pl-64",children:[t.jsxs("header",{className:"bg-white shadow-soft border-b border-neutral-200 flex items-center justify-between px-6 py-4",children:[t.jsx("div",{className:"flex items-center gap-4",children:t.jsx("h2",{className:"text-heading text-lg font-semibold",children:Jm.find(c=>c.href===s.pathname)?.name||"Dashboard"})}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"flex flex-col items-end text-sm",children:t.jsx("button",{className:"font-medium",onClick:i,title:"Logout",children:t.jsx($x,{})})}),t.jsxs("div",{className:"flex flex-col items-end text-sm",children:[l&&t.jsx("span",{className:"font-medium text-primary-700",children:l.user?.login??"anonymous"}),l&&t.jsx("span",{className:"text-neutral-500",children:l.permission?.role??"Denied"})]}),t.jsx("img",{src:l.user?.avatar_url??"",alt:"User Avatar",className:"h-8 w-8 rounded-full border border-neutral-200"})]})]}),t.jsx("main",{className:"p-6",children:r})]})]})}function Oy({isOpen:r,onClose:s,children:l}){return r?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-hidden",onClick:i=>i.stopPropagation(),children:l})}):null}function Iy({onSave:r,onClose:s}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(Mf,{className:"w-6 h-6 text-gray-600"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Dashboard Configuration"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsxs("button",{onClick:r,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[t.jsx(ti,{className:"w-5 h-5"}),t.jsx("span",{children:"Save"})]}),t.jsxs("button",{onClick:s,className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-400 flex items-center space-x-2",children:[t.jsx(bs,{className:"w-5 h-5"}),t.jsx("span",{children:"Cancel"})]})]})]})}const My=()=>[{id:"general",label:"General",icon:t.jsx(Ur,{className:"w-6 h-6 text-primary-600"})},{id:"features",label:"Features",icon:t.jsx(Un,{className:"w-6 h-6 text-primary-600"})},{id:"branding",label:"Branding",icon:"🎨"},{id:"monorepo",label:"Monorepo",icon:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}],Dy=()=>({title:"monodog Dashboard",description:"Visual management of our monorepo packages",packageTypes:["app","lib","tool","service"],customFields:["team","priority","environment"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{logo:"",primaryColor:"#3B82F6",secondaryColor:"#1E40AF"},monorepo:{structure:"standard",packageManager:"pnpm",directories:["apps","packages","libs"],ignorePatterns:["node_modules","dist",".git"]}}),Xm=r=>{const s=Dy();return{...s,...r,features:{...s.features,...r.features},branding:{...s.branding,...r.branding},monorepo:{...s.monorepo,...r.monorepo}}},Fy=r=>{const s=[];return(!r.title||r.title.trim()==="")&&s.push("Dashboard title is required"),r.monorepo?.directories&&r.monorepo.directories.length===0&&s.push("At least one package directory is required"),r.branding?.primaryColor&&!Zm(r.branding.primaryColor)&&s.push("Primary color must be a valid hex color"),r.branding?.secondaryColor&&!Zm(r.branding.secondaryColor)&&s.push("Secondary color must be a valid hex color"),{isValid:s.length===0,errors:s}},Zm=r=>/^#[0-9A-F]{6}$/i.test(r),Jl=r=>r.split(",").map(s=>s.trim()).filter(s=>s.length>0),Xl=r=>r?r.join(", "):"",Uy=r=>r.replace(/([A-Z])/g," $1").trim();function By({activeTab:r,onTabChange:s}){const l=My();return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8 px-6",children:l.map(i=>t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx("span",{children:i.icon}),t.jsx("span",{children:i.label})]},i.id))})})}function ef({config:r,onConfigChange:s}){return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"General Settings"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Dashboard Title"}),t.jsx("input",{type:"text",value:r.title||"",onChange:l=>s({title:l.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"My Monorepo Dashboard"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",value:r.description||"",onChange:l=>s({description:l.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Visual management of our monorepo packages"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Types"}),t.jsx("input",{type:"text",value:Xl(r.packageTypes),onChange:l=>s({packageTypes:Jl(l.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"app, lib, tool, service"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated list of package types"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Custom Fields"}),t.jsx("input",{type:"text",value:Xl(r.customFields),onChange:l=>s({customFields:Jl(l.target.value)}),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"team, priority, environment"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Additional fields to display for packages"})]})]})]})})}function zy({config:r,onConfigChange:s}){const l=(i,c)=>{s({features:{...r.features,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Feature Toggles"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(r.features||{}).map(([i,c])=>t.jsxs("label",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:c,onChange:d=>l(i,d.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),t.jsx("span",{className:"text-sm font-medium text-gray-700 capitalize",children:Uy(i)})]},i))}),t.jsxs("div",{className:"mt-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:"Feature Descriptions"}),t.jsxs("div",{className:"text-xs text-blue-800 space-y-1",children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Health Checks:"})," Monitor package health and status"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"CI Integration:"})," Connect with CI/CD providers"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Dependency Graph:"})," Visualize package dependencies"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Publish Control:"})," Manage package publishing and versioning"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Search And Filter:"})," Advanced search and filtering capabilities"]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Configuration Inspector:"})," View and edit configuration files"]})]})]})]})})}function Hy({config:r,onConfigChange:s}){const l=(i,c)=>{s({branding:{...r.branding,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Branding & Appearance"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Logo URL"}),t.jsx("input",{type:"text",value:r.branding?.logo||"",onChange:i=>l("logo",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://example.com/logo.png"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"URL to your company logo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"color",value:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),t.jsx("input",{type:"text",value:r.branding?.primaryColor||"#3B82F6",onChange:i=>l("primaryColor",i.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#3B82F6"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Primary brand color for buttons and accents"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Color"}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"color",value:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.target.value),className:"h-10 w-20 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),t.jsx("input",{type:"text",value:r.branding?.secondaryColor||"#1E40AF",onChange:i=>l("secondaryColor",i.target.value),className:"flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"#1E40AF"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Secondary color for hover states and highlights"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Color Preview"}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:r.branding?.primaryColor||"#3B82F6"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Primary"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-8 h-8 rounded-lg border border-gray-300",style:{backgroundColor:r.branding?.secondaryColor||"#1E40AF"}}),t.jsx("span",{className:"text-sm text-gray-600",children:"Secondary"})]}),t.jsx("button",{className:"px-4 py-2 rounded-lg text-white text-sm font-medium",style:{backgroundColor:r.branding?.primaryColor||"#3B82F6"},children:"Sample Button"})]})]})]})})}function $y({config:r,onConfigChange:s}){const l=(i,c)=>{s({monorepo:{...r.monorepo,[i]:c}})};return t.jsx("div",{className:"space-y-6",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Monorepo Configuration"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Structure Type"}),t.jsxs("select",{value:r.monorepo?.structure||"standard",onChange:i=>l("structure",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"standard",children:"Standard (apps/packages/libs)"}),t.jsx("option",{value:"custom",children:"Custom Structure"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Choose your monorepo directory structure"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Manager"}),t.jsxs("select",{value:r.monorepo?.packageManager||"pnpm",onChange:i=>l("packageManager",i.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"Yarn"}),t.jsx("option",{value:"lerna",children:"Lerna"}),t.jsx("option",{value:"nx",children:"Nx"})]}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Package manager used in your monorepo"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Package Directories"}),t.jsx("input",{type:"text",value:Xl(r.monorepo?.directories),onChange:i=>l("directories",Jl(i.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"apps, packages, libs, services"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Directories containing packages"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Ignore Patterns"}),t.jsx("input",{type:"text",value:Xl(r.monorepo?.ignorePatterns),onChange:i=>l("ignorePatterns",Jl(i.target.value)),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"node_modules, dist, .git"}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Patterns to ignore when scanning"})]})]}),t.jsxs("div",{className:"mt-6 p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Configuration Preview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Structure:"}),t.jsx("span",{className:"ml-2 text-gray-600 capitalize",children:r.monorepo?.structure||"standard"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Package Manager:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.monorepo?.packageManager||"pnpm"})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Directories:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[r.monorepo?.directories?.length||0," configured"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-700",children:"Ignore Patterns:"}),t.jsxs("span",{className:"ml-2 text-gray-600",children:[r.monorepo?.ignorePatterns?.length||0," patterns"]})]})]})]}),r.monorepo?.packageManager&&t.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("h4",{className:"text-sm font-medium text-blue-900 mb-2",children:[r.monorepo.packageManager.toUpperCase()," Configuration Tips"]}),t.jsxs("div",{className:"text-xs text-blue-800",children:[r.monorepo.packageManager==="pnpm"&&t.jsx("p",{children:"Make sure you have a pnpm-workspace.yaml file in your root directory."}),r.monorepo.packageManager==="npm"&&t.jsx("p",{children:'Configure workspaces in your package.json with the "workspaces" field.'}),r.monorepo.packageManager==="yarn"&&t.jsx("p",{children:"Ensure you have workspaces configured in your package.json."}),r.monorepo.packageManager==="lerna"&&t.jsx("p",{children:"Make sure you have a lerna.json configuration file in your root."}),r.monorepo.packageManager==="nx"&&t.jsx("p",{children:"Ensure you have an nx.json configuration file in your workspace root."})]})]})]})})}function Vy({isOpen:r,onClose:s,onSave:l,currentConfig:i}){const[c,d]=w.useState(Xm(i)),[m,p]=w.useState("general");w.useEffect(()=>{d(Xm(i))},[i]);const h=()=>{const y=Fy(c);y.isValid||console.warn("Configuration validation errors:",y.errors),l(c),s()},g=y=>{d(k=>({...k,...y}))},v=()=>{const y={config:c,onConfigChange:g};switch(m){case"general":return t.jsx(ef,{...y});case"features":return t.jsx(zy,{...y});case"branding":return t.jsx(Hy,{...y});case"monorepo":return t.jsx($y,{...y});default:return t.jsx(ef,{...y})}};return t.jsxs(Oy,{isOpen:r,onClose:s,children:[t.jsx(Iy,{onSave:h,onClose:s}),t.jsx(By,{activeTab:m,onTabChange:p}),t.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:v()})]})}function Wy({isOpen:r,onClose:s,children:l}){return r?t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-2xl w-full max-h-[90vh] overflow-hidden",onClick:i=>i.stopPropagation(),children:l})}):null}function Gy({onClose:r}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Setup Guide"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Configure your monorepo dashboard for optimal performance"})]}),t.jsx("button",{onClick:r,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(bs,{className:"w-6 h-6"})})]})}function Ky({progress:r}){const{currentStep:s,totalSteps:l,completedSteps:i}=r,c=(s+1)/l*100;return t.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("span",{className:"text-sm font-medium text-gray-700",children:["Step ",s+1," of ",l]}),t.jsxs("span",{className:"text-sm text-gray-500",children:[i," completed"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${c}%`}})})]})}function qy({step:r,onStepComplete:s}){const l=()=>{switch(r.id){case"monorepo-structure":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Quick Setup"}),t.jsx("p",{className:"text-blue-800 text-sm mb-3",children:"Choose your monorepo structure to get started quickly:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Standard Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"apps/, packages/, libs/"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-blue-300 rounded-lg hover:bg-blue-100 text-left",children:[t.jsx("div",{className:"font-medium text-blue-900",children:"Custom Structure"}),t.jsx("div",{className:"text-sm text-blue-700",children:"Define your own directories"})]})]})]}),t.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Manual Configuration"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Root Directory"}),t.jsx("input",{type:"text",defaultValue:"/path/to/monorepo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Package Manager"}),t.jsxs("select",{className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm",children:[t.jsx("option",{value:"pnpm",children:"pnpm"}),t.jsx("option",{value:"npm",children:"npm"}),t.jsx("option",{value:"yarn",children:"yarn"})]})]})]})]})]});case"package-scanning":return t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-green-900 mb-2",children:"Automatic Discovery"}),t.jsx("p",{className:"text-green-800 text-sm mb-3",children:"We'll scan your monorepo for packages automatically:"}),t.jsx("button",{onClick:()=>s(r.id),className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 text-sm",children:"Start Package Scan"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(ys,{className:"w-4 h-4 mr-2"}),"Scans for package.json files"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(ys,{className:"w-4 h-4 mr-2"}),"Analyzes dependencies and relationships"]}),t.jsxs("div",{className:"flex items-center text-sm text-gray-600",children:[t.jsx(ys,{className:"w-4 h-4 mr-2"}),"Detects build configurations"]})]})]});case"ci-integration":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-purple-900 mb-2",children:"Connect CI/CD"}),t.jsx("p",{className:"text-purple-800 text-sm mb-3",children:"Choose your CI/CD provider to monitor builds and deployments:"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitHub Actions"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitHub"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"GitLab CI"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with GitLab"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Jenkins"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Connect with Jenkins"})]}),t.jsxs("button",{onClick:()=>s(r.id),className:"p-3 border border-purple-300 rounded-lg hover:bg-purple-100 text-left",children:[t.jsx("div",{className:"font-medium text-purple-900",children:"Skip for now"}),t.jsx("div",{className:"text-sm text-purple-700",children:"Configure later"})]})]})]})});case"health-checks":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-orange-900 mb-2",children:"Health Monitoring"}),t.jsx("p",{className:"text-orange-800 text-sm mb-3",children:"Configure how we monitor your package health:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Monitor build status"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-orange-900",children:"Track test coverage"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Dependency vulnerability scanning"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-orange-900",children:"Performance monitoring"})]})]}),t.jsx("button",{onClick:()=>s(r.id),className:"mt-3 bg-orange-600 text-white px-4 py-2 rounded-lg hover:bg-orange-700 text-sm",children:"Save Settings"})]})});case"notifications":return t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-indigo-900 mb-2",children:"Notification Preferences"}),t.jsx("p",{className:"text-indigo-800 text-sm mb-3",children:"Choose how you want to be notified about important events:"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2",defaultChecked:!0}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Build failures"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Security vulnerabilities"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Dependency updates"})]}),t.jsxs("label",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",className:"mr-2"}),t.jsx("span",{className:"text-sm text-indigo-900",children:"Performance degradation"})]})]}),t.jsx("button",{onClick:()=>s(r.id),className:"mt-3 bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 text-sm",children:"Save Preferences"})]})});default:return t.jsx("div",{className:"text-center py-8",children:t.jsx("p",{className:"text-gray-500",children:"Step content not found"})})}};return t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[50vh]",children:[t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:r.title}),t.jsx("p",{className:"text-gray-600 mb-4",children:r.description})]}),l()]})}function Yy({currentStep:r,totalSteps:s,canGoNext:l,canGoPrevious:i,onNext:c,onPrevious:d,onComplete:m,isLastStep:p}){return t.jsxs("div",{className:"flex items-center justify-between p-6 border-t border-gray-200",children:[t.jsx("button",{onClick:d,disabled:!i,className:`px-4 py-2 text-sm rounded-lg border transition-colors ${i?"border-gray-300 text-gray-700 hover:bg-gray-50":"border-gray-200 text-gray-400 cursor-not-allowed"}`,children:"Previous"}),t.jsx("div",{className:"flex space-x-2",children:Array.from({length:s},(h,g)=>t.jsx("div",{className:`w-2 h-2 rounded-full transition-colors ${g<=r?"bg-blue-600":"bg-gray-300"}`},g))}),p?t.jsxs("button",{onClick:m,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 flex items-center space-x-2 text-sm",children:[t.jsx(ti,{className:"w-4 h-4"}),t.jsx("span",{children:"Complete Setup"})]}):t.jsx("button",{onClick:c,disabled:!l,className:`px-4 py-2 text-sm rounded-lg transition-colors ${l?"bg-blue-600 text-white hover:bg-blue-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Next"})]})}const Qy=()=>[{id:"monorepo-structure",title:"Monorepo Structure",description:"Configure your monorepo directory structure and package manager",completed:!1,required:!0},{id:"package-scanning",title:"Package Scanning",description:"Set up automatic package discovery and dependency analysis",completed:!1,required:!0},{id:"ci-integration",title:"CI/CD Integration",description:"Connect with your CI/CD providers (GitHub Actions, GitLab CI, etc.)",completed:!1,required:!1},{id:"health-checks",title:"Health Monitoring",description:"Configure package health checks and status monitoring",completed:!1,required:!1},{id:"notifications",title:"Notifications",description:"Set up alerts and notifications for important events",completed:!1,required:!1}],Jy=(r,s)=>({currentStep:s,totalSteps:r.length,completedSteps:r.filter(l=>l.completed).length}),Xy=(r,s)=>{const l=r[s];return!l.required||l.completed},Zy=r=>r.filter(l=>l.required).every(l=>l.completed),ev=(r,s)=>r.map(l=>l.id===s?{...l,completed:!0}:l);function tv({isOpen:r,onClose:s,onComplete:l}){const[i,c]=w.useState(0),[d,m]=w.useState(Qy()),p=b=>{const D=ev(d,b);m(D),D[i].completed&&i<d.length-1&&c(P=>P+1)},h=()=>{i<d.length-1&&c(b=>b+1)},g=()=>{i>0&&c(b=>b-1)},v=()=>{Zy(d)&&(l(),s())},y=Jy(d,i),k=Xy(d,i),M=i>0,N=i===d.length-1,R=d[i];return t.jsxs(Wy,{isOpen:r,onClose:s,children:[t.jsx(Gy,{onClose:s}),t.jsx(Ky,{progress:y}),t.jsx(qy,{step:R,onStepComplete:p}),t.jsx(Yy,{currentStep:i,totalSteps:d.length,canGoNext:k,canGoPrevious:M,onNext:h,onPrevious:g,onComplete:v,isLastStep:N})]})}function nv({config:r,onShowSetupGuide:s,onShowConfig:l,onRefresh:i}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-3xl",children:r.title}),t.jsx("p",{className:"text-body mt-2",children:r.description}),t.jsx("button",{onClick:s,className:"hidden text-primary-600 hover:text-primary-700 text-sm font-medium mt-2",children:"First time? Run the setup guide"})]}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsxs("button",{onClick:i,className:"btn-primary flex items-center space-x-2",children:[t.jsx(pr,{className:"w-5 h-5"}),t.jsx("span",{children:"Refresh"})]}),t.jsxs("button",{onClick:l,className:"hidden btn-ghost flex items-center space-x-2",children:[t.jsx(Mf,{className:"w-5 h-5"}),t.jsx("span",{children:"Configure"})]})]})]})}function rv({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:"card p-6 bg-gray-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Packages"}),t.jsx("p",{className:"text-heading text-2xl",children:r.total})]})]})}),t.jsx("div",{className:"card p-6 bg-green-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-secondary-100 rounded-lg",children:t.jsx(Un,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Applications"}),t.jsx("p",{className:"text-heading text-2xl",children:r.apps})]})]})}),t.jsx("div",{className:"card p-6 bg-yellow-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-accent-100 rounded-lg",children:t.jsx(si,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Libraries"}),t.jsx("p",{className:"text-heading text-2xl",children:r.libs})]})]})}),t.jsx("div",{className:"card p-6 bg-blue-100",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(ai,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Dependencies"}),t.jsx("p",{className:"text-heading text-2xl",children:r.totalDependencies})]})]})})]})}function sv(){return t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Quick Actions"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Mn,{to:"/dependencies",className:"p-4 border border-gray-200 rounded-lg hover:border-blue-300 hover:bg-blue-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx(Sa,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Visualize package relationships"})]})]})}),t.jsx(Mn,{to:"/health",className:"p-4 border border-gray-200 rounded-lg hover:border-green-300 hover:bg-green-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(_c,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"Health Check"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Monitor package health"})]})]})}),t.jsx(Mn,{to:"/ci",className:"hidden p-4 border border-gray-200 rounded-lg hover:border-purple-300 hover:bg-purple-50 transition-colors",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:"🧪"})}),t.jsxs("div",{children:[t.jsx("h4",{className:"font-medium text-gray-900",children:"CI/CD Status"}),t.jsx("p",{className:"text-sm text-gray-600",children:"View build status"})]})]})})]})]})}function av({searchTerm:r,selectedType:s,packageTypes:l,onSearchChange:i,onTypeChange:c}){return t.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Oc,{className:"w-5 h-5 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search packages...",value:r,onChange:d=>i(d.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"w-5 h-5 text-gray-400"}),t.jsxs("select",{value:s,onChange:d=>c(d.target.value),className:"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),l.map(d=>t.jsx("option",{value:d,className:"capitalize",children:d},d))]})]})]})}function lv({packages:r,getTypeIcon:s,getStatusColor:l}){return t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(i=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:s(i.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsx("div",{className:"text-sm text-gray-500",children:i.path})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${l(i.type)}`,children:i.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.version}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(i.dependencies).length+Object.keys(i.devDependencies).length+Object.keys(i.peerDependencies).length}),t.jsx("td",{className:"px-6 py-4 text-sm text-gray-900 max-w-xs truncate",children:i.description||"No description"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx(Mn,{to:`/packages/${encodeURIComponent(i.name)}`,className:"text-blue-600 hover:text-blue-500",children:"View Details"})})]},i.name))})]})})}class iv{constructor(){this.mockPackages=[]}async getPackages(){try{const s=await Te.get(Re.PACKAGES.LIST);if(s.success)return s.data;console.error(`getPackages: initial fetch failed with status ${s.error.status}. Attempting refresh...`);try{return await this.refreshPackages()}catch(l){return console.error("getPackages: refresh failed",l),[]}}catch(s){return console.error("getPackages: unexpected error",s),[]}}async getPackage(s){const l=await Te.get(Re.PACKAGES.DETAILS(s));if(!l.success)throw new Error(`Failed to fetch package details for "${s}" (Status: ${l.error.status})`);return l.data}async getDependencies(){await new Promise(l=>setTimeout(l,200));const s=new Set;try{return(await this.getPackages()).forEach(c=>{c.dependencies?.forEach(d=>s.add(d))}),Array.from(s).map(c=>({name:c,version:"unknown",type:"dependency",status:"active"}))}catch(l){return console.error("Error fetching dependencies:",l),[]}}async refreshPackages(){try{const s=await Te.post(Re.PACKAGES.REFRESH);return s.success?s.data:(console.error(`refreshPackages: fetch failed with status ${s.error.status}`),[])}catch(s){return console.error("refreshPackages: unexpected error",s),[]}}async getHealthStatus(){try{let s=await Te.get(Re.HEALTH.PACKAGES);if(!s.success){if(!(await Te.post(Re.HEALTH.REFRESH)).success)throw new Error("Failed to refresh health data");if(await new Promise(i=>setTimeout(i,1e3)),s=await Te.get(Re.HEALTH.PACKAGES),!s.success)throw new Error("Failed to fetch health data after refresh")}return s.data}catch(s){throw console.error("Error fetching health data:",s),s}}async refreshHealthStatus(){try{const s=await Te.post(Re.HEALTH.REFRESH);if(!s.success)throw new Error("Failed to fetch health data");return s.data}catch(s){console.error("Error fetching health data:",s)}}async getFallbackHealthStatus(){await new Promise(c=>setTimeout(c,400));const s=[{name:"Package Count",value:this.mockPackages.length,status:"healthy",description:`${this.mockPackages.length} packages in monorepo`},{name:"Dependency Health",value:85,status:"healthy",description:"Dependencies are up to date"},{name:"Build Status",value:95,status:"healthy",description:"Most builds are successful"}],l=this.mockPackages.map(c=>({package:c.name,score:c.status==="healthy"?90:c.status==="warning"?70:50,issues:c.status==="healthy"?[]:["Needs attention"]}));return{overallScore:85,metrics:s,packageHealth:l}}async updatePackageConfiguration(s,l,i){try{const c=await Te.put(Re.PACKAGES.UPDATE_CONFIG,JSON.stringify({packageName:s,config:l,packagePath:i}));if(!c.success)throw new Error(`HTTP error: ${c.error?.message}`);return c.data}catch(c){throw console.error("Error updating package configuration:",c),c}}async getBuildStatus(){await new Promise(l=>setTimeout(l,500));const s=[];for(const l of this.mockPackages){const i=l.scripts&&l.scripts.build,c=l.scripts&&l.scripts.test;if(i||c){const d=new Date(Date.now()-Math.random()*864e5).toISOString(),m=Math.random()>.8?"failed":Math.random()>.6?"building":Math.random()>.4?"queued":"success";s.push({id:`build-${l.name}-${Date.now()}`,package:l.name,status:m,startTime:d,endTime:m!=="building"?new Date(Date.now()-Math.random()*36e5).toISOString():void 0,duration:m!=="building"?Math.floor(Math.random()*300)+60:void 0,stages:this.generateBuildStages(l,m)})}}return s}async getConfigurationFiles(){try{const s=await Te.get(Re.CONFIG.FILES);if(!s.success)throw new Error(`Failed to fetch config files: ${s.error?.message}`);const l=s.data;if(l.success&&l.files)return l.files;throw new Error("Invalid response format from config files API")}catch(s){return console.error("Error fetching configuration files from backend:",s),[]}}async saveConfigurationFile(s,l){try{const i=await Te.put(Re.CONFIG.FILE(s),JSON.stringify({content:l}));if(!i.success)throw new Error(i.error?.message||"Failed to save file");const c=i.data;if(c.success&&c.file)return c.file;throw new Error("Invalid response format from save file API")}catch(i){throw console.error("Error saving configuration file:",i),i}}generateBuildStages(s,l){const i=[{name:"Install",status:"success",duration:Math.floor(Math.random()*30)+10,logs:["Installing dependencies...","Dependencies installed successfully"]},{name:"Lint",status:l==="failed"&&Math.random()>.7?"failed":"success",duration:Math.floor(Math.random()*20)+5,logs:["Running ESLint...","Linting completed"]},{name:"Test",status:l==="failed"&&Math.random()>.5?"failed":"success",duration:Math.floor(Math.random()*60)+30,logs:["Running tests...","Test suite completed"]},{name:"Build",status:l==="failed"?"failed":"success",duration:Math.floor(Math.random()*120)+60,logs:["Building package...","Build completed successfully"]}];if(l==="building"){const c=Math.floor(Math.random()*i.length);i[c].status="running",i.slice(c+1).forEach(d=>d.status="pending")}return i}}const Ft=new iv,ov=r=>({total:r.length,apps:r.filter(s=>s.type==="app").length,libs:r.filter(s=>s.type==="lib").length,tools:r.filter(s=>s.type==="tool").length,custom:r.filter(s=>!["app","Plib","tool"].includes(s.type)).length,totalDependencies:r.reduce((s,l)=>s+Object.keys(l.dependencies).length+Object.keys(l.peerDependencies).length+Object.keys(l.devDependencies).length,0)}),cv=r=>[...new Set(r.map(s=>s.type))],uv=(r,s,l)=>r.filter(i=>{const c=i.name.toLowerCase().includes(s.toLowerCase())||i.description?.toLowerCase().includes(s.toLowerCase()),d=l==="all"||i.type===l;return c&&d}),dv=r=>{switch(r){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-green-100 text-green-800";case"tool":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},mv=r=>{switch(r){case"app":return t.jsx(Un,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(si,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function Bc({message:r="Loading packages..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function lh({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function fv({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[t.jsx("div",{className:"bg-gray-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.total})]})]})}),t.jsx("div",{className:"bg-green-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(Dt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Healthy"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.healthy})]})]})}),t.jsx("div",{className:"bg-yellow-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-yellow-100 rounded-lg",children:t.jsx(lt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Warnings"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.warnings})]})]})}),t.jsx("div",{className:"bg-red-100 p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(Qt,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Errors"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-600",children:r.errors})]})]})})]})}function hv({filters:r,onFiltersChange:s,availableTypes:l,availableStatuses:i}){return t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between space-y-4 md:space-y-0 md:space-x-4",children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Oc,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),t.jsx("input",{type:"text",placeholder:"Search packages by name, description, or tags...",value:r.search,onChange:c=>s({...r,search:c.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"})]}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-5 w-5 text-gray-400"}),t.jsxs("select",{value:r.type,onChange:c=>s({...r,type:c.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),l.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]}),t.jsxs("select",{value:r.status,onChange:c=>s({...r,status:c.target.value}),className:"border border-gray-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Status"}),i.map(c=>t.jsx("option",{value:c,children:c.charAt(0).toUpperCase()+c.slice(1)},c))]})]})]})})}const pv=r=>({total:r.length,healthy:r.filter(s=>s.status==="healthy").length,warnings:r.filter(s=>s.status==="warning").length,errors:r.filter(s=>s.status==="error").length}),xv=r=>[...new Set(r.map(s=>s.type))],gv=r=>[...new Set(r.map(s=>s.status))],yv=(r,s)=>r.filter(l=>{const i=l.name.toLowerCase().includes(s.search.toLowerCase())||l.description.toLowerCase().includes(s.search.toLowerCase()),c=s.type==="all"||l.type===s.type,d=s.status==="all"||l.status===s.status;return i&&c&&d}),vv=(r,s)=>[...r].sort((l,i)=>{let c,d;switch(s.field){case"name":c=l.name.toLowerCase(),d=i.name.toLowerCase();break;case"version":c=l.version,d=i.version;break;case"lastUpdated":c=new Date(l.lastUpdated),d=new Date(i.lastUpdated);break;case"dependencies":c=Object.keys(l.dependencies).length,d=Object.keys(i.dependencies).length;break;default:return 0}return c<d?s.order==="asc"?-1:1:c>d?s.order==="asc"?1:-1:0}),ih=r=>{switch(r){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";case"building":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},oh=r=>{switch(r){case"app":return"bg-blue-100 text-blue-800";case"lib":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";case"service":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}},jv=r=>{switch(r){case"up-to-date":return"bg-green-100 text-green-800";case"outdated":return"bg-yellow-100 text-yellow-800";case"major-update":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},wv=r=>{switch(r){case"feature":return"bg-blue-100 text-blue-800";case"fix":return"bg-green-100 text-green-800";case"chore":return"bg-gray-100 text-gray-800";case"breaking":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},zc=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),ch=r=>r.startsWith("v")?r:`v${r}`,uh=r=>{switch(r){case"app":return t.jsx(Un,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(si,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";case"service":return"🌐";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}};function Nv({packages:r,sorting:s,onSortChange:l}){const i=d=>{const m=s.field===d&&s.order==="asc"?"desc":"asc";l({field:d,order:m})},c=d=>s.field!==d?null:s.order==="asc"?t.jsx(Rc,{className:"w-4 h-4"}):t.jsx(Lf,{className:"w-4 h-4"});return t.jsx("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),c("name")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("version"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Version"}),c("version")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),c("dependencies")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>i("lastUpdated"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Last Updated"}),c("lastUpdated")]})}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Maintainers"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(d=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:uh(d.type)}),t.jsxs("div",{children:[t.jsx(Mn,{to:`/packages/${encodeURIComponent(d.name)}`,className:"text-sm font-medium text-blue-600 hover:text-blue-500",children:d.name}),t.jsx("div",{className:"text-sm text-gray-500",children:d.description})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-900",children:ch(d.version)})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${oh(d.type)}`,children:d.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ih(d.status)}`,children:d.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:Object.keys(d.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(d.dependencies).slice(0,3).join(", "),Object.keys(d.dependencies).length>3&&` +${Object.keys(d.dependencies).length-3} more`]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:zc(d.lastUpdated)}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex -space-x-1",children:[d.maintainers.slice(0,3).map((m,p)=>t.jsx("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-500 text-xs font-medium text-white",title:m,children:m.charAt(0).toUpperCase()},m)),d.maintainers.length>3&&t.jsxs("div",{className:"inline-flex items-center justify-center h-6 w-6 rounded-full bg-gray-300 text-xs font-medium text-gray-600",children:["+",d.maintainers.length-3]})]})})]},d.name))})]})})})}function bv({packageData:r}){const s=l=>{switch(l){case"healthy":return t.jsx(Dt,{className:"h-5 w-5 text-green-500"});case"warning":return t.jsx(lt,{className:"h-5 w-5 text-yellow-500"});case"error":return t.jsx(lt,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Je,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-6",children:t.jsxs(Mn,{to:"/packages",className:"inline-flex items-center text-sm text-gray-500 hover:text-gray-700",children:[t.jsx(_x,{className:"mr-2 h-4 w-4"}),"Back to Packages"]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border p-6 mb-6",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex items-start space-x-4",children:[t.jsx("div",{className:"text-4xl",children:uh(r.type)}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:r.name}),t.jsx("p",{className:"text-gray-600 mt-1",children:r.description}),t.jsxs("div",{className:"flex items-center space-x-4 mt-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Version:"}),t.jsx("span",{className:"text-sm font-mono bg-gray-100 px-2 py-1 rounded",children:ch(r.version)})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${oh(r.type)}`,children:r.type}),t.jsxs("div",{className:"flex items-center space-x-1",children:[s(r.status),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${ih(r.status)}`,children:r.status})]})]})]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-sm text-gray-500 mb-2",children:"Health Score"}),t.jsxs("div",{className:"text-2xl font-bold text-blue-600",children:[r.packageHealth?.packageOverallScore??"","%"]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mt-6 pt-6 border-t border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(If,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Last Updated"}),t.jsx("div",{className:"text-sm font-medium",children:zc(r.lastUpdated)})]})]}),t.jsxs("div",{className:"hidden flex items-center space-x-2",children:[t.jsx(Ax,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Maintainers"}),t.jsx("div",{className:"text-sm font-medium",children:r.maintainers.length})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Lc,{className:"h-4 w-4 text-gray-400"}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"License"}),t.jsx("div",{className:"text-sm font-medium",children:r.license})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"h-4 w-4 text-gray-400",children:t.jsx(ai,{className:"h-4 w-4 text-gray-400"})}),t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-gray-500",children:"Repository"}),t.jsx("div",{className:"text-sm font-medium truncate",children:t.jsx("a",{href:r.repository.url||"",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-500",children:r.repository?.url?.split("/").pop()})})]})]})]}),r.tags?.length>0&&t.jsxs("div",{className:"mt-4",children:[t.jsx("div",{className:"text-xs text-gray-500 mb-2",children:"Tags"}),t.jsx("div",{className:"flex flex-wrap gap-2",children:r.tags.map(l=>t.jsx("span",{className:"inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-700 rounded-full",children:l},l))})]})]})]})}function Sv({activeTab:r,onTabChange:s}){const l=[{id:"overview",label:"Overview",icon:Ut},{id:"dependencies",label:"Dependencies",icon:Pc},{id:"commits",label:"Recent Commits",icon:Je},{id:"health",label:"Health Metrics",icon:_c},{id:"config",label:"Configuration",icon:Ur}];return t.jsx("div",{className:"border-b border-gray-200",children:t.jsx("nav",{className:"flex space-x-8",children:l.map(i=>{const c=i.icon;return t.jsxs("button",{onClick:()=>s(i.id),className:`py-4 px-1 border-b-2 font-medium text-sm flex items-center space-x-2 ${r===i.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"}`,children:[t.jsx(c,{className:"w-4 h-4"}),t.jsx("span",{children:i.label})]},i.id)})})})}function Cv({packageData:r}){if(!r.dependenciesInfo.length)return t.jsx("p",{className:"py-6 text-gray-600",children:"No dependency found."});const s=(l,i)=>t.jsxs("div",{className:"mb-8",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:i}),t.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:t.jsxs("table",{className:"w-full",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Latest"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:l.map(c=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"text-sm font-medium text-gray-900",children:c.name})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.version})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:"text-sm font-mono text-gray-700",children:c.latest})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${jv(c.status)}`,children:c.status.replace("-"," ")})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm",children:c.status!=="up-to-date"&&t.jsxs("button",{className:"text-blue-600 hover:text-blue-500 flex items-center space-x-1",children:[t.jsx(Rc,{className:"w-4 h-4"}),t.jsx("span",{children:"Update"})]})})]},c.name))})]})})]});return t.jsxs("div",{className:"py-6",children:[s(r.dependenciesInfo.filter(l=>l.type=="dependency"),"Dependencies"),s(r.dependenciesInfo.filter(l=>l.type=="devDependency"),"Dev Dependencies"),s(r.dependenciesInfo.filter(l=>l.type=="peerDependency"),"Peer Dependencies"),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Dependency Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Total Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(l=>l.type=="dependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Dev Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(l=>l.type=="devDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Peer Dependencies:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(l=>l.type=="peerDependency").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Outdated:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(l=>l.status==="outdated").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-blue-800",children:"Major Updates:"}),t.jsx("span",{className:"ml-2 text-blue-700",children:r.dependenciesInfo.filter(l=>l.status==="major-update").length})]})]})]})]})}function Ev({packageData:r}){return t.jsxs("div",{className:"py-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Recent Commits"}),t.jsx("div",{className:"space-y-4",children:r.commits.map(s=>t.jsx("div",{className:"bg-white border rounded-lg p-4 hover:shadow-md transition-shadow",children:t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${wv(s.type)}`,children:s.type}),t.jsx("span",{className:"text-sm font-mono text-gray-500",children:s.hash})]}),t.jsx("p",{className:"text-sm font-medium text-gray-900 mb-2",children:s.message}),t.jsxs("div",{className:"flex items-center space-x-4 text-sm text-gray-500",children:[t.jsxs("span",{children:["by ",s.author]}),t.jsx("span",{children:zc(s.date)})]})]}),t.jsx("div",{className:"hidden ml-4",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm",children:"View Diff"})})]})},s.hash))}),r.commits.length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),t.jsx("p",{className:"text-gray-500",children:"No recent commits found"})]}),t.jsxs("div",{className:"mt-6 bg-gray-50 border border-gray-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Commit Summary"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Features:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="feat").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Fixes:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="fix").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Chores:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="chore").length})]}),t.jsxs("div",{children:[t.jsx("span",{className:"font-medium text-gray-800",children:"Breaking:"}),t.jsx("span",{className:"ml-2 text-gray-600",children:r.commits.filter(s=>s.type==="breaking").length})]})]})]})]})}function kv({packageData:r}){const s=d=>d>=80?"text-green-600":d>=60?"text-yellow-600":"text-red-600",l=d=>{switch(d){case"success":return t.jsx(Dt,{className:"w-5 h-5 text-green-500"});case"failed":return t.jsx(Qt,{className:"w-5 h-5 text-red-500"});case"running":return t.jsx("div",{className:"w-5 h-5 border-2 border-blue-500 border-t-transparent rounded-full animate-spin"});default:return t.jsx(lt,{className:"w-5 h-5 text-gray-500"})}},i=d=>{switch(d){case"success":return"bg-green-100 text-green-800";case"failed":return"bg-red-100 text-red-800";case"running":return"bg-blue-100 text-blue-800";default:return"bg-gray-100 text-gray-800"}},c=d=>{switch(d){case"pass":return"bg-green-100 text-green-800";case"fail":return"bg-red-100 text-red-800";case"warning":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return r.packageHealth?.packageOverallScore?t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Health Score"}),t.jsxs("div",{className:`text-3xl font-bold ${s(r.packageHealth.packageOverallScore)}`,children:[r.packageHealth.packageOverallScore,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-4",children:t.jsx("div",{className:`h-3 rounded-full transition-all duration-300 ${r.packageHealth.packageOverallScore>=80?"bg-green-500":r.packageHealth.packageOverallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageOverallScore}%`}})}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.packageHealth.packageOverallScore>=80&&"Excellent health - package is in great condition",r.packageHealth.packageOverallScore>=60&&r.packageHealth.packageOverallScore<80&&"Good health - minor issues detected",r.packageHealth.packageOverallScore<60&&"Needs attention - several issues require fixing"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Build Status"}),l(r.packageHealth.packageBuildStatus)]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${i(r.packageHealth.packageBuildStatus)}`,children:r.packageHealth.packageBuildStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Logs"})]})]}),t.jsxs("div",{className:"hidden bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Test Coverage"}),t.jsxs("div",{className:`text-lg font-semibold ${r.packageHealth.packageTestCoverage>=80?"text-green-600":r.packageHealth.packageTestCoverage>=60?"text-yellow-600":"text-red-600"}`,children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full ${r.packageHealth.packageTestCoverage>=80?"bg-green-500":r.packageHealth.packageTestCoverage>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${r.packageHealth.packageTestCoverage}%`}})})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:"Lint Status"}),r.packageHealth.packageLintStatus==="pass"&&t.jsx(Dt,{className:"w-5 h-5 text-green-500"}),r.packageHealth.packageLintStatus==="fail"&&t.jsx(Qt,{className:"w-5 h-5 text-red-500"}),r.packageHealth.packageLintStatus==="warning"&&t.jsx(lt,{className:"w-5 h-5 text-yellow-500"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(r.packageHealth.packageLintStatus)}`,children:r.packageHealth.packageLintStatus}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"View Issues"})]})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h4",{className:"text-lg font-medium text-gray-900 mb-4",children:"Detailed Metrics"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Dependencies"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Total Dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(r.dependenciesInfo).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Outdated:"}),t.jsx("span",{className:"font-medium text-yellow-600",children:r.dependenciesInfo.filter(d=>d.status==="outdated").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Major Updates Available:"}),t.jsx("span",{className:"font-medium text-red-600",children:r.dependenciesInfo.filter(d=>d.status==="major-update").length})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-sm font-medium text-gray-700 mb-3",children:"Code Quality"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Build Status:"}),t.jsx("span",{className:`font-medium ${r.packageHealth.packageBuildStatus==="success"?"text-green-600":r.packageHealth.packageBuildStatus==="failed"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageBuildStatus})]}),t.jsxs("div",{className:"hidden flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Test Coverage:"}),t.jsxs("span",{className:"font-medium",children:[r.packageHealth.packageTestCoverage,"%"]})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Lint Status:"}),t.jsx("span",{className:`font-medium ${r.packageHealth.packageLintStatus==="pass"?"text-green-600":r.packageHealth.packageLintStatus==="fail"?"text-red-600":"text-yellow-600"}`,children:r.packageHealth.packageLintStatus})]})]})]})]})]})]}):t.jsx("p",{className:"py-6 text-gray-600",children:"No health data available."})}function Tv({packageData:r}){const[s,l]=w.useState(!1),[i,c]=w.useState(""),[d,m]=w.useState(!1),[p,h]=w.useState(""),[g,v]=w.useState(null),[y,k]=w.useState(!1),M=()=>{const P={name:r.name,version:r.version,description:r.description||"",license:r.license||"",repository:r.repository||{},scripts:r.scripts||{},dependencies:r.dependencies||{},devDependencies:r.devDependencies||{},peerDependencies:r.peerDependencies||{}};return JSON.stringify(P,null,2)};w.useState(()=>{c(M())});const N=()=>{l(!0),c(M()),h("")},R=()=>{l(!1),c(M()),h("")},b=async()=>{if(!i.trim()){h("Configuration cannot be empty");return}m(!0),h("");try{const P=await Ft.updatePackageConfiguration(r.name,i,r.path);if(P.success)h("Configuration updated successfully!"),l(!1);else throw new Error(P.message||"Update failed")}catch(P){console.error("Error saving configuration:",P),h(P instanceof Error?P.message:"Failed to save configuration. Please try again.")}finally{m(!1)}},D=P=>{c(P.target.value),p&&h("")},L=async(P,U,Q)=>{try{await navigator.clipboard.writeText(P),U==="config"?(k(!0),setTimeout(()=>k(!1),4e3)):U==="script"&&Q&&(v(Q),setTimeout(()=>v(null),4e3))}catch(de){console.error("Failed to copy to clipboard:",de);const Y=document.createElement("textarea");Y.value=P,document.body.appendChild(Y),Y.select();try{document.execCommand("copy"),U==="config"?(k(!0),setTimeout(()=>k(!1),2e3)):U==="script"&&Q&&(v(Q),setTimeout(()=>v(null),2e3))}catch(Z){console.error("Fallback copy failed:",Z),U==="config"&&h("Failed to copy to clipboard")}document.body.removeChild(Y)}};return t.jsxs("div",{className:"py-6",children:[t.jsxs("div",{className:"bg-white border rounded-lg p-6 mb-6",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[t.jsx(Pc,{className:"w-5 h-5 text-gray-600"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Scripts"})]}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Object.entries(r.scripts).map(([P,U])=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:P}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("button",{onClick:()=>L(U,"script",P),className:`text-sm flex items-center space-x-1 ${g===P?"text-green-600":"text-gray-600 hover:text-gray-700"}`,title:"Copy command to clipboard",children:g===P?t.jsxs(t.Fragment,{children:[t.jsx(Lm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Pm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})}),t.jsx("button",{className:"hidden text-blue-600 hover:text-blue-500 text-sm",children:"Run"})]})]}),t.jsx("code",{className:"text-xs text-gray-600 bg-gray-100 p-2 rounded block overflow-x-auto",children:U})]},P))}),Object.keys(r.scripts).length===0&&t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"📝"}),t.jsx("p",{className:"text-gray-500",children:"No scripts configured"})]})]}),t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Configuration"}),!s&&t.jsx("div",{className:"text-sm text-gray-500",children:"Read-only preview"})]}),s?t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg",children:t.jsx("textarea",{value:i,onChange:D,className:"w-full h-96 bg-gray-900 text-gray-100 text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-blue-500 rounded",spellCheck:"false"})}),p&&t.jsx("div",{className:`p-3 rounded-lg text-sm ${p.includes("successfully")?"bg-green-50 text-green-700 border border-green-200":"bg-red-50 text-red-700 border border-red-200"}`,children:p}),t.jsxs("div",{className:"flex space-x-3",children:[t.jsx("button",{onClick:b,disabled:d,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-300 disabled:cursor-not-allowed text-sm flex items-center space-x-2",children:d?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),t.jsx("span",{children:"Saving..."})]}):t.jsx("span",{children:"Save Changes"})}),t.jsx("button",{onClick:R,disabled:d,className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed text-sm",children:"Cancel"})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto",children:t.jsx("pre",{className:"text-sm",children:i})}),t.jsxs("div",{className:"mt-4 flex space-x-3",children:[t.jsx("button",{onClick:N,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 text-sm",children:"Edit Configuration"}),t.jsx("button",{onClick:()=>L(s?i:M(),"config"),className:"border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 text-sm flex items-center space-x-2",children:y?t.jsxs(t.Fragment,{children:[t.jsx(Lm,{className:"w-4 h-4 text-green-600"}),t.jsx("span",{children:"Copied!"})]}):t.jsxs(t.Fragment,{children:[t.jsx(Pm,{className:"w-4 h-4"}),t.jsx("span",{children:"Copy"})]})})]})]})]})]})}const tf={title:"Monorepo Dashboard",description:"Visual management and monitoring of your monorepo packages",packageTypes:["app","lib","tool"],features:{healthChecks:!0,ciIntegration:!0,dependencyGraph:!0,publishControl:!0,searchAndFilter:!0,configurationInspector:!0},branding:{primaryColor:"#3B82F6",secondaryColor:"#1E40AF"}};function Rv(){const[r,s]=w.useState(),[l,i]=w.useState(""),[c,d]=w.useState("all"),[m,p]=w.useState(tf),[h,g]=w.useState(!1),[v,y]=w.useState(!1),[k,M]=w.useState(!0),[N,R]=w.useState(null),[b,D]=w.useState(!1);w.useEffect(()=>{(async()=>{try{M(!0);const Z=await Ft.getPackages();s(Z),R(null)}catch(Z){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",Z)}finally{M(!1)}})()},[]),w.useEffect(()=>{const Y=at.get("monodog-config");Y&&p({...tf,...JSON.parse(Y)})},[]);const L=Y=>{p(Y),at.set("monodog-config",JSON.stringify(Y))},P=async()=>{try{D(!0),R(null),M(!0);try{const Y=await Ft.refreshPackages();s(Y),R(null)}catch(Y){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching package data:",Y)}finally{M(!1)}}catch(Y){R(be.FAILED_TO_FETCH_PACKAGES),console.error("Error refreshing package data:",Y)}finally{D(!1)}};if(k&&!r)return t.jsx(Bc,{});if(N)return t.jsx(lh,{error:N,onRetry:P});const U=uv(r??[],l,c),Q=cv(r??[]),de=ov(r??[]);return t.jsxs("div",{className:"p-6 space-y-6",children:[b&&r&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing packages..."})]})}),t.jsx(nv,{config:m,onShowSetupGuide:()=>y(!0),onShowConfig:()=>g(!0),onRefresh:P}),t.jsx(rv,{stats:de}),t.jsx(sv,{}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsx(av,{searchTerm:l,selectedType:c,packageTypes:Q,onSearchChange:i,onTypeChange:d}),t.jsx(lv,{packages:U,getTypeIcon:mv,getStatusColor:dv})]}),t.jsx(Vy,{isOpen:h,onClose:()=>g(!1),onSave:L,currentConfig:m}),t.jsx(tv,{isOpen:v,onClose:()=>y(!1),onComplete:()=>y(!1)})]})}function _v(){const[r,s]=w.useState([]),[l,i]=w.useState(!0),[c,d]=w.useState(null),[m,p]=w.useState({search:"",type:"all",status:"all"}),[h,g]=w.useState({field:"name",order:"asc"});w.useEffect(()=>{(async()=>{try{i(!0);const D=await Ft.getPackages();s(D),d(null)}catch(D){d(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",D)}finally{i(!1)}})()},[]);const v=()=>{window.location.reload()},y=yv(r,m),k=vv(y,h),M=pv(r),N=xv(r),R=gv(r);return l?t.jsx(Bc,{}):c?t.jsx(lh,{error:c,onRetry:v}):t.jsxs("div",{className:"space-y-6",children:[t.jsx("div",{className:"flex items-center justify-between",children:t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"Packages Overview"}),t.jsx("p",{className:"text-body mt-1",children:"Manage and monitor all packages in your monorepo"})]})}),t.jsx(fv,{stats:M}),t.jsx(hv,{filters:m,onFiltersChange:p,availableTypes:N,availableStatuses:R}),t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600",children:[t.jsxs("span",{children:["Showing ",k.length," of ",r.length," packages",m.search&&` matching "${m.search}"`]}),t.jsxs("span",{children:[m.type!=="all"&&`Filtered by type: ${m.type}`,m.status!=="all"&&` • status: ${m.status}`]})]}),t.jsx(Nv,{packages:k,sorting:h,onSortChange:g}),k.length===0&&!l&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-neutral-400 text-6xl mb-4 flex justify-center",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-heading text-lg mb-2",children:"No packages found"}),t.jsx("p",{className:"text-body mb-4",children:m.search||m.type!=="all"||m.status!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first package to the monorepo."}),(m.search||m.type!=="all"||m.status!=="all")&&t.jsx("button",{onClick:()=>p({search:"",type:"all",status:"all"}),className:"text-primary-600 hover:text-primary-500",children:"Clear Filters"})]})]})}function Av(){const{name:r}=Zp(),[s,l]=w.useState(null),[i,c]=w.useState("overview");if(w.useEffect(()=>{(async()=>{try{const p=await Ft.getPackage(r??"");l(p)}catch(p){console.error("Error fetching packages:",p)}})()},[r]),!s)return t.jsx(Bc,{message:"Loading package details..."});const d=()=>{switch(i){case"overview":return t.jsx("div",{className:"py-6",children:t.jsxs("div",{className:"bg-white border rounded-lg p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Package Overview"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("p",{className:"text-gray-600 mb-4",children:s.description}),t.jsx("h4",{className:"hidden text-sm font-medium text-gray-700 mb-2",children:"Maintainers"}),t.jsx("div",{className:"space-y-1",children:Object.keys(s.maintainers).map(m=>t.jsx("div",{className:"text-sm text-gray-600",children:m},m))})]}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Quick Stats"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="dependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Dev Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="devDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Peer Dependencies:"}),t.jsx("span",{className:"font-medium",children:s.dependenciesInfo.filter(m=>m.type=="peerDependency").length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Scripts:"}),t.jsx("span",{className:"font-medium",children:Object.keys(s.scripts).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Recent Commits:"}),t.jsx("span",{className:"font-medium",children:s.commits?.length})]})]})]})]})]})});case"dependencies":return t.jsx(Cv,{packageData:s});case"commits":return t.jsx(Ev,{packageData:s});case"health":return t.jsx(kv,{packageData:s});case"config":return t.jsx(Tv,{packageData:s});default:return null}};return t.jsxs("div",{className:"space-y-6",children:[t.jsx(bv,{packageData:s}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsx(Sv,{activeTab:i,onTabChange:c}),t.jsx("div",{className:"px-6",children:d()})]})]})}function Pv({message:r="Loading dependency graph..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function Lv({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function Ov({onRefresh:r,loading:s=!1}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Dependency Graph"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Visualize package dependencies and relationships"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,className:"hidden bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[t.jsx(pr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function Iv({viewMode:r,onViewModeChange:s,layout:l,onLayoutChange:i,showLegend:c,onToggleLegend:d,zoomLevel:m,onZoomChange:p}){return t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"View:"}),t.jsxs("div",{className:"flex rounded-lg border border-gray-300 overflow-hidden",children:[t.jsxs("button",{onClick:()=>s("graph"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="graph"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Mx,{className:"w-4 h-4"}),t.jsx("span",{children:"Graph"})]}),t.jsxs("button",{onClick:()=>s("list"),className:`px-3 py-2 text-sm font-medium flex items-center space-x-1 ${r==="list"?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"}`,children:[t.jsx(Ix,{className:"w-4 h-4"}),t.jsx("span",{children:"List"})]})]})]}),r==="graph"&&t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Layout:"}),t.jsxs("select",{value:l,onChange:h=>i(h.target.value),className:"border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"hierarchical",children:"Hierarchical"}),t.jsx("option",{value:"circular",children:"Circular"}),t.jsx("option",{value:"force",children:"Force-Directed"})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Zoom:"}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("button",{onClick:()=>p(Math.max(.5,m-.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m<=.5,children:t.jsx(Bx,{className:"w-4 h-4"})}),t.jsxs("span",{className:"text-sm text-gray-600 min-w-[3rem] text-center",children:[Math.round(m*100),"%"]}),t.jsx("button",{onClick:()=>p(Math.min(2,m+.1)),className:"p-1 text-gray-600 hover:text-gray-800 disabled:opacity-50",disabled:m>=2,children:t.jsx(Ux,{className:"w-4 h-4"})})]})]})]}),t.jsxs("button",{onClick:d,className:`px-3 py-2 text-sm font-medium rounded-lg flex items-center space-x-1 transition-colors ${c?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:[t.jsx(ys,{className:"w-4 h-4"}),t.jsx("span",{children:"Legend"})]})]})}const dh=r=>{switch(r){case"healthy":return"text-green-600 bg-green-100";case"warning":return"text-yellow-600 bg-yellow-100";case"error":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},mh=r=>{switch(r){case"app":return"text-blue-600 bg-blue-100";case"lib":return"text-purple-600 bg-purple-100";case"tool":return"text-orange-600 bg-orange-100";default:return"text-gray-600 bg-gray-100"}},nf=(r,s)=>{const l=s.find(i=>i.name===r);if(!l)return"text-gray-400";switch(l.status){case"healthy":return"text-green-500";case"warning":return"text-yellow-500";case"error":return"text-red-500";default:return"text-gray-400"}},Mv=r=>{const s=r.length,l=r.reduce((h,g)=>h+Object.keys(g.dependencies).length,0),i=r.filter(h=>Object.keys(h.dependencies).length===0).length,c=r.filter(h=>h.dependents.length===0).length,d=Dv(r),m=s>0?l/s:0,p=fh(r);return{totalPackages:s,totalDependencies:l,circularDependencies:p.length,leafPackages:i,rootPackages:c,maxDepth:d,avgDependencies:Math.round(m*10)/10}},Dv=r=>{const s=new Set;let l=0;const i=(c,d)=>{if(s.has(c))return d;s.add(c);const m=r.find(h=>h.name===c);if(!m)return d;let p=d;for(const h of Object.keys(m.dependencies)){const g=i(h,d+1);p=Math.max(p,g)}return p};for(const c of r)if(!s.has(c.name)){const d=i(c.name,0);l=Math.max(l,d)}return l},fh=r=>{const s=[],l=new Set,i=new Set,c=[],d=m=>{if(i.has(m)){const h=c.indexOf(m),g=c.slice(h).concat(m);return s.push({cycle:g,severity:g.length>5?"high":g.length>3?"medium":"low",impact:`Circular dependency involving ${g.length} packages`}),!0}if(l.has(m))return!1;l.add(m),i.add(m),c.push(m);const p=r.find(h=>h.name===m);if(p){for(const h of Object.keys(p.dependencies))if(d(h))return!0}return i.delete(m),c.pop(),!1};for(const m of r)l.has(m.name)||d(m.name);return s},Fv=(r,s,l)=>[...r].sort((i,c)=>{let d,m;switch(s){case"name":d=i.name.toLowerCase(),m=c.name.toLowerCase();break;case"dependencies":d=Object.keys(i.dependencies).length,m=Object.keys(c.dependencies).length;break;case"dependents":d=i.dependents.length,m=c.dependents.length;break;case"status":{const p={error:0,warning:1,healthy:2};d=p[i.status]||3,m=p[c.status]||3;break}default:return 0}return d<m?l==="asc"?-1:1:d>m?l==="asc"?1:-1:0}),Uv=(r,s,l=800,i=600)=>{switch(s){case"hierarchical":return Bv(r,l,i);case"circular":return zv(r,l,i);case"force":return Hv(r,l,i);default:return r}},Bv=(r,s,l)=>{const i=[],c=new Set,d=(m,p)=>{if(c.has(m))return;c.add(m),i[p]||(i[p]=[]),i[p].push(m);const h=r.find(g=>g.name===m);h&&h.dependents.forEach(g=>d(g,p+1))};return r.filter(m=>Object.keys(m.dependencies).length===0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),i.length===0&&r.filter(m=>Object.keys(m.dependencies).length>0&&m.dependents.length>0).forEach(m=>{d(m.name,0)}),r.map(m=>{const p=i.findIndex(v=>v.includes(m.name)),h=i[p]?.indexOf(m.name)||0,g=i[p]?.length||1;return{...m,x:s/(i.length+1)*(p+1)-50,y:l/(g+1)*(h+1)-25}})},zv=(r,s,l)=>{const i=s/2,c=l/2,d=Math.min(s,l)/3;return r.map((m,p)=>{const h=2*Math.PI*p/r.length;return{...m,x:i+d*Math.cos(h)-50,y:c+d*Math.sin(h)-25}})},Hv=(r,s,l)=>{const i=r.map((c,d)=>({...c,x:Math.random()*(s-100),y:Math.random()*(l-50)}));for(let c=0;c<50;c++)i.forEach(d=>{let m=0,p=0;i.forEach(h=>{if(h.name!==d.name){const g=d.x-h.x,v=d.y-h.y,y=Math.sqrt(g*g+v*v)||1,k=1e3/(y*y);m+=g/y*k,p+=v/y*k}}),Object.keys(d.dependencies).forEach(h=>{const g=i.find(v=>v.name===h);if(g){const v=g.x-d.x,y=g.y-d.y,k=Math.sqrt(v*v+y*y)||1,M=k*.01;m+=v/k*M,p+=y/k*M}}),d.x+=m*.1,d.y+=p*.1,d.x=Math.max(50,Math.min(s-100,d.x)),d.y=Math.max(25,Math.min(l-50,d.y))});return i},$v=r=>{switch(r){case"app":return t.jsx(Un,{className:"w-6 h-6 text-primary-600"});case"lib":return t.jsx(si,{className:"w-6 h-6 text-primary-600"});case"tool":return"🔧";default:return t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}},Vv=r=>r.length>12?`${r.substring(0,12)}...`:r,Wv=r=>{const s={};return r.forEach(l=>{s[l.name]=[]}),r.forEach(l=>{const i=l.name;[...Object.keys(l.dependencies??{}),...Object.keys(l.devDependencies??{}),...Object.keys(l.peerDependencies??{})].forEach(d=>{s[d]||(s[d]=[]),s[d].includes(i)||s[d].push(i)})}),s};function Gv({packages:r,selectedPackage:s,hoveredPackage:l,onPackageSelect:i,onPackageHover:c,layout:d}){return t.jsxs("div",{className:"relative bg-white rounded-lg shadow-sm border border-gray-200 p-6 min-h-[600px]",children:[t.jsxs("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 800 600",children:[r.map(m=>Object.keys(m.dependencies).map(p=>{const h=r.find(v=>v.name===p);if(!h)return null;const g=l===m.name||l===p||s===m.name||s===p;return t.jsxs("g",{children:[t.jsx("defs",{children:t.jsx("marker",{id:`arrow-${m.name}-${p}`,markerWidth:"10",markerHeight:"10",refX:"9",refY:"3",orient:"auto",markerUnits:"strokeWidth",children:t.jsx("path",{d:"M0,0 L0,6 L9,3 z",fill:g?"#3B82F6":"#6B7280"})})}),t.jsx("line",{x1:h.x+50,y1:h.y+25,x2:m.x,y2:m.y+25,stroke:g?"#3B82F6":"#6B7280",strokeWidth:g?"3":"2",markerEnd:`url(#arrow-${m.name}-${p})`,className:"transition-all duration-200",style:{opacity:g?1:.6}})]},`${m.name}-${p}`)})),r.map(m=>{const p=s===m.name,h=l===m.name,g=s&&(Object.keys(m.dependencies).includes(s)||Object.keys(m.dependents).includes(s));return t.jsxs("g",{children:[t.jsx("rect",{x:m.x,y:m.y,width:"100",height:"50",rx:"8",fill:"white",stroke:p?"#3B82F6":g?"#10B981":h?"#6B7280":"#E5E7EB",strokeWidth:p?"3":"2",className:"cursor-pointer transition-all duration-200",style:{filter:h||p||g?"drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1))":"none"},onMouseEnter:()=>c(m.name),onMouseLeave:()=>c(null),onClick:()=>i(p?null:m.name)}),t.jsx("text",{x:m.x+50,y:m.y+20,textAnchor:"middle",className:"text-xs font-medium fill-gray-900 pointer-events-none",children:Vv(m.name)}),t.jsxs("text",{x:m.x+50,y:m.y+35,textAnchor:"middle",className:"text-xs fill-gray-500 pointer-events-none",children:["v",m.version]}),t.jsx("circle",{cx:m.x+85,cy:m.y+15,r:"6",fill:m.status==="healthy"?"#10B981":m.status==="warning"?"#F59E0B":"#EF4444",className:"pointer-events-none"}),t.jsx("rect",{x:m.x+5,y:m.y+5,width:"12",height:"8",rx:"2",fill:m.type==="app"?"#3B82F6":m.type==="lib"?"#8B5CF6":"#F97316",className:"pointer-events-none"})]},m.name)})]}),r.length===0&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(ai,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No dependencies found"}),t.jsx("p",{className:"text-gray-600",children:"No package dependencies to display."})]})})]})}function Kv({packages:r,selectedPackage:s,onPackageSelect:l,sortBy:i,sortOrder:c,onSortChange:d}){const m=h=>{d(h,i===h&&c==="asc"?"desc":"asc")},p=h=>i!==h?null:c==="asc"?t.jsx(Rc,{className:"w-4 h-4"}):t.jsx(Lf,{className:"w-4 h-4"});return t.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200",children:[t.jsxs("div",{className:"p-6 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Click on a view details to explore its dependencies, commits, configuration and health"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("name"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Package"}),p("name")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("dependencies"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependencies"}),p("dependencies")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100",onClick:()=>m("dependents"),children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{children:"Dependents"}),p("dependents")]})}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(h=>t.jsxs("tr",{className:`hover:bg-gray-50 cursor-pointer transition-colors ${s===h.name?"bg-blue-50":""}`,onClick:()=>l(h.name),children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"text-2xl mr-3",children:$v(h.type)}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:h.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:["v",h.version]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(h.type)}`,children:h.type})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${dh(h.status)}`,children:h.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[Object.keys(h.dependencies).length,Object.keys(h.dependencies).length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[Object.keys(h.dependencies).slice(0,3).join(", "),Object.keys(h.dependencies).length>3&&` +${Object.keys(h.dependencies).length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"text-sm text-gray-900",children:[h.dependents.length,h.dependents.length>0&&t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[h.dependents.slice(0,3).join(", "),h.dependents.length>3&&` +${h.dependents.length-3} more`]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:t.jsx(Mn,{to:`/packages/${encodeURIComponent(h.name)}`,className:"text-blue-600 hover:text-blue-500",onClick:g=>g.stopPropagation(),children:"View Details"})})]},h.name))})]})}),r.length===0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2 flex justify-center",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"No packages found"})]})]})}function qv({package:r,packages:s,onClose:l}){return r?t.jsxs("div",{className:"absolute top-4 right-4 bg-white p-4 rounded-lg shadow-lg border border-gray-200 w-80 max-h-[80vh] overflow-y-auto",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("button",{onClick:l,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(bs,{className:"w-5 h-5"})})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${mh(r.type)}`,children:r.type}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${dh(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"text-sm text-gray-600",children:["Version: ",t.jsx("span",{className:"font-mono",children:r.version})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependencies"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",Object.keys(r.dependencies).length,")"]})]}),Object.keys(r.dependencies).length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:Object.keys(r.dependencies).map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${nf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependencies"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700",children:"Dependents"}),t.jsxs("span",{className:"text-xs text-gray-500",children:["(",r.dependents.length,")"]})]}),r.dependents.length>0?t.jsx("div",{className:"space-y-1 max-h-32 overflow-y-auto",children:r.dependents.map(i=>{const c=s.find(d=>d.name===i);return c?t.jsxs("div",{className:"flex items-center justify-between text-sm py-1",children:[t.jsx("span",{className:"text-gray-600 truncate",children:c.name}),t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-400",children:c.version}),t.jsx("span",{className:`${nf(i,s)} p-1`,children:c.status==="healthy"?t.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}):c.status==="warning"?t.jsx("div",{className:"w-2 h-2 bg-yellow-500 rounded-full"}):t.jsx("div",{className:"w-2 h-2 bg-red-500 rounded-full"})})]})]},i):t.jsxs("div",{className:"text-sm text-gray-400 py-1",children:[i," (not found)"]},i)})}):t.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"No dependents"})]}),t.jsxs("div",{className:"pt-2 border-t border-gray-200",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Impact Analysis"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependencies:"}),t.jsx("span",{className:"font-medium",children:Object.keys(r.dependencies).length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Direct dependents:"}),t.jsx("span",{className:"font-medium",children:r.dependents.length})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{children:"Risk level:"}),t.jsx("span",{className:`font-medium ${r.dependents.length>5?"text-red-600":r.dependents.length>2?"text-yellow-600":"text-green-600"}`,children:r.dependents.length>5?"High":r.dependents.length>2?"Medium":"Low"})]})]})]}),t.jsx("div",{className:"pt-2 border-t border-gray-200",children:t.jsx(Mn,{to:`/packages/${encodeURIComponent(r.name)}`,className:"block w-full text-center bg-blue-600 text-white px-3 py-2 rounded-lg hover:bg-blue-700 text-sm font-medium transition-colors",children:"View Package Details →"})})]})]}):null}function Yv({stats:r,packages:s}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsx("div",{className:"bg-gray-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Total Packages"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.totalPackages})]})]})}),t.jsx("div",{className:"bg-blue-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 rounded-lg",children:t.jsx(ai,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Dependencies"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.totalDependencies})]})]})}),t.jsx("div",{className:`${r.circularDependencies>0?"bg-red-100":"bg-green-100"} p-4 rounded-lg shadow border`,children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`p-2 rounded-lg ${r.circularDependencies>0?"bg-red-100":"bg-green-100"}`,children:t.jsx(lt,{className:`w-6 h-6 ${r.circularDependencies>0?"text-red-600":"text-primary-600"}`})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Circular Deps"}),t.jsx("p",{className:`text-2xl font-semibold ${r.circularDependencies>0?"text-red-600":"text-gray-600"}`,children:r.circularDependencies})]})]})}),t.jsx("div",{className:"bg-purple-100 p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx(Sa,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Max Depth"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.maxDepth})]})]})}),t.jsxs("div",{className:"md:col-span-4 bg-white p-4 rounded-lg shadow border",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Dependency Analysis"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-blue-600",children:r.leafPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Leaf Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependencies"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-green-600",children:r.rootPackages}),t.jsx("div",{className:"text-sm text-gray-600",children:"Root Packages"}),t.jsx("div",{className:"text-xs text-gray-500",children:"No dependents"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-purple-600",children:r.avgDependencies}),t.jsx("div",{className:"text-sm text-gray-600",children:"Avg Dependencies"}),t.jsx("div",{className:"text-xs text-gray-500",children:"Per package"})]}),t.jsxs("div",{className:"text-center bg-gray-100 p-2",children:[t.jsx("div",{className:"text-2xl font-bold text-orange-600",children:s.filter(l=>l.status==="healthy").length}),t.jsx("div",{className:"text-sm text-gray-600",children:"Healthy Packages"}),t.jsxs("div",{className:"text-xs text-gray-500",children:[Math.round(s.filter(l=>l.status==="healthy").length/s.length*100),"% of total"]})]})]})]})]})}function Qv({cycles:r,packages:s,onPackageSelect:l}){const i=d=>{switch(d){case"high":return"bg-red-100 text-red-800 border-red-200";case"medium":return"bg-yellow-100 text-yellow-800 border-yellow-200";case"low":return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},c=d=>{switch(d){case"high":return"🔴";case"medium":return"🟡";case"low":return"🔵";default:return"⚪"}};return r.length===0?t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(lt,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Dependency cycle analysis"})]})]}),t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"text-green-400 text-4xl mb-2"}),t.jsx("h4",{className:"text-green-800 font-medium mb-1",children:"No Circular Dependencies!"}),t.jsx("p",{className:"text-green-700 text-sm",children:"Your dependency graph is clean and free of circular references."})]})]}):t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[t.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:t.jsx(lt,{className:"w-6 h-6 text-red-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Circular Dependencies"}),t.jsxs("p",{className:"text-sm text-gray-600",children:["Found ",r.length," circular dependency cycle",r.length>1?"s":""]})]})]}),t.jsx("div",{className:"space-y-4",children:r.map((d,m)=>t.jsxs("div",{className:`border rounded-lg p-4 ${i(d.severity)}`,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-lg",children:c(d.severity)}),t.jsxs("span",{className:"text-sm font-medium capitalize",children:[d.severity," Severity"]})]}),t.jsxs("span",{className:"text-xs opacity-75",children:[d.cycle.length," packages affected"]})]}),t.jsx("div",{className:"mb-3",children:t.jsx("p",{className:"text-sm mb-2",children:d.impact})}),t.jsx("div",{className:"bg-white bg-opacity-50 rounded-lg p-3",children:t.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[d.cycle.map((p,h)=>t.jsxs(w.Fragment,{children:[t.jsx("button",{onClick:()=>l(p),className:"px-3 py-1 bg-white rounded-lg text-sm font-medium hover:bg-gray-50 transition-colors border shadow-sm",children:p}),h<d.cycle.length-1&&t.jsx(Am,{className:"w-4 h-4 text-gray-400"})]},`${p}-${h}`)),d.cycle.length>1&&t.jsxs(t.Fragment,{children:[t.jsx(Am,{className:"w-4 h-4 text-gray-400"}),t.jsxs("span",{className:"text-sm text-gray-500 italic",children:["(cycles back to ",d.cycle[0],")"]})]})]})}),t.jsxs("div",{className:"mt-3 pt-3 border-t border-current border-opacity-20",children:[t.jsx("h5",{className:"text-xs font-medium mb-1",children:"Recommendation:"}),t.jsxs("p",{className:"text-xs opacity-90",children:[d.severity==="high"&&"Critical: Refactor immediately to break this cycle. Consider dependency inversion or splitting packages.",d.severity==="medium"&&"Important: Plan to refactor this cycle. Review package boundaries and extract common dependencies.",d.severity==="low"&&"Minor: Monitor this cycle. Consider if these packages could be merged or dependencies restructured."]})]})]},m))}),t.jsx("div",{className:"mt-6 pt-4 border-t border-gray-200",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:r.filter(d=>d.severity==="high").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"High Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:r.filter(d=>d.severity==="medium").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Medium Severity"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-blue-600",children:r.filter(d=>d.severity==="low").length}),t.jsx("div",{className:"text-xs text-gray-600",children:"Low Severity"})]})]})})]})}function Jv({show:r}){return r?t.jsxs("div",{className:"bg-white p-4 rounded-lg shadow border",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:"Legend"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Package Types"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-blue-500 rounded"}),t.jsx("span",{children:"App"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-purple-500 rounded"}),t.jsx("span",{children:"Library"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-2 bg-orange-500 rounded"}),t.jsx("span",{children:"Tool"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Health Status"}),t.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-green-500 rounded-full"}),t.jsx("span",{children:"Healthy"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-yellow-500 rounded-full"}),t.jsx("span",{children:"Warning"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-3 h-3 bg-red-500 rounded-full"}),t.jsx("span",{children:"Error"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Visual Elements"}),t.jsxs("div",{className:"space-y-1 text-xs",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(va,{}),t.jsx("span",{children:"Dependency"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 border-2 border-blue-500 rounded bg-white"}),t.jsx("span",{children:"Selected"})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-6 h-4 border-2 border-green-500 rounded bg-white"}),t.jsx("span",{children:"Connected"})]})]})]}),t.jsxs("div",{children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Interactions"}),t.jsxs("div",{className:"space-y-1 text-xs text-gray-600",children:[t.jsx("div",{children:"• Click a package to select and view details"}),t.jsx("div",{children:"• Hover to highlight connections"}),t.jsx("div",{children:"• Use toolbar to change layout and zoom"})]})]})]})]}):null}function Xv(){w.useEffect(()=>{(async()=>{try{s(!0);const me=await Ft.getPackages(),Ne=Wv(me),K=me.map(ae=>({...ae,dependencies:{...ae.dependencies,...ae.devDependencies,...ae.peerDependencies},dependents:Ne[ae.name]}));d(K),i(null)}catch(me){i(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",me)}finally{s(!1)}})()},[]);const[r,s]=w.useState(!1),[l,i]=w.useState(null),[c,d]=w.useState([]),[m,p]=w.useState("graph"),[h,g]=w.useState("hierarchical"),[v,y]=w.useState(null),[k,M]=w.useState(null),[N,R]=w.useState(!0),[b,D]=w.useState(1),[L,P]=w.useState("name"),[U,Q]=w.useState("asc"),de=w.useMemo(()=>Uv(c??[],h,800,600),[c,h]),Y=w.useMemo(()=>Fv(c,L,U),[c,L,U]),Z=w.useMemo(()=>Mv(c),[c]),we=w.useMemo(()=>fh(c),[c]),Se=v&&c.find(Ie=>Ie.name===v)||null,ee=()=>{},ve=Ie=>{y(Ie)},ue=(Ie,me)=>{P(Ie),Q(me)},ge=()=>{window.location.reload()};return r?t.jsx(Pv,{}):l?t.jsx(Lv,{error:l,onRetry:ge}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(Ov,{onRefresh:ee,loading:r}),t.jsx(Yv,{stats:Z,packages:c??[]}),we.length>0&&t.jsx(Qv,{cycles:we,packages:c,onPackageSelect:ve}),t.jsx(Iv,{viewMode:m,onViewModeChange:p,layout:h,onLayoutChange:g,showLegend:N,onToggleLegend:()=>R(!N),zoomLevel:b,onZoomChange:D}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[t.jsx("div",{className:`${N?"lg:col-span-3":"lg:col-span-4"}`,children:m==="graph"?t.jsxs("div",{className:"relative",children:[t.jsx("div",{style:{transform:`scale(${b})`,transformOrigin:"top left"},children:t.jsx(Gv,{packages:de,selectedPackage:v,hoveredPackage:k,onPackageSelect:ve,onPackageHover:M,layout:h})}),t.jsx(qv,{package:Se,packages:c,onClose:()=>y(null)})]}):t.jsx(Kv,{packages:Y,selectedPackage:v,onPackageSelect:ve,sortBy:L,sortOrder:U,onSortChange:ue})}),N&&t.jsx("div",{className:"lg:col-span-1",children:t.jsx(Jv,{show:N})})]})]})}function Zv(){const[r,s]=w.useState(0),[l,i]=w.useState(null),[c,d]=w.useState(!0),[m,p]=w.useState(null),[h,g]=w.useState(!1);w.useEffect(()=>{(async()=>{try{d(!0);const P=await Ft.getHealthStatus();i(P),p(null)}catch(P){p(be.UNKNOWN_ERROR),console.error("Error fetching health data:",P)}finally{d(!1)}})()},[r]);const v=async()=>{try{g(!0),p(null),d(!0);try{const L=await Ft.refreshHealthStatus();i(L),p(null)}catch(L){p(be.UNKNOWN_ERROR),console.error("Error fetching health data:",L)}finally{d(!1)}}catch(L){p(be.UNKNOWN_ERROR),console.error("Error refreshing health data:",L)}finally{g(!1)}},y=()=>{s(L=>L+1)},k=L=>{switch(L){case"healthy":case"success":case"pass":case"up-to-date":return"bg-green-100 text-green-800";case"warning":case"warn":case"outdated":return"bg-yellow-100 text-yellow-800";case"error":case"failed":case"fail":case"vulnerable":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};if(c&&!l)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading health data..."})]})});if(m)return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:m}),t.jsx("button",{onClick:y,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})});const M=l?l.summary?.averageScore:0,N=l?l?.packages?.filter(L=>L.health.overallScore>=80).length:0,R=l?l?.packages?.filter(L=>L.health.overallScore>=60&&L.health.overallScore<80).length:0,b=l?l?.packages?.filter(L=>L.health.overallScore<60).length:0,D=[{name:"Package Health",value:N||0,status:(()=>{const L=N||0,P=l?.packages.length||0;if(P===0)return"healthy";const U=L/P;return U>=.8?"healthy":U>=.6?"warning":"error"})(),description:`${N||0} healthy packages out of ${l?.packages.length||0}`},{name:"Overall Score",value:Math.round(M),status:Math.round(M)>=80?"healthy":Math.round(M)>=60?"warning":"error",description:`Average health score: ${Math.round(M)}/100`},{name:"Unhealthy Packages",value:R+b||0,status:(R+b||0)===0?"healthy":(R+b||0)<=2?"warning":"error",description:`${R+b||0} packages need attention`}];return t.jsxs("div",{className:"",children:[t.jsxs("div",{className:"flex items-center justify-between my-3",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Health Status"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Monitor the health and performance of your monorepo packages"})]}),t.jsxs("button",{onClick:v,disabled:h,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[h?t.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}):t.jsx(pr,{className:"w-5 h-5"}),t.jsx("span",{children:h?"Refreshing...":"Refresh"})]})]}),h&&l&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-700",children:"Refreshing health data..."})]})}),t.jsxs("div",{className:"my-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg p-6 text-white",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Overall Monorepo Health"}),t.jsx("p",{className:"text-blue-100 mt-1",children:"Based on all package metrics and recent activity"})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("div",{className:"text-4xl font-bold",children:M?.toFixed(2)}),t.jsx("div",{className:"text-blue-100",children:"out of 100"})]})]}),t.jsxs("div",{className:"mt-4 flex space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Dt,{className:"w-5 h-5 text-green-300"}),t.jsxs("span",{children:[N," Healthy"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(lt,{className:"w-5 h-5 text-yellow-300"}),t.jsxs("span",{children:[R," Warnings"]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(Qt,{className:"w-5 h-5 text-red-300"}),t.jsxs("span",{children:[b," Errors"]})]})]})]}),t.jsx("div",{className:"my-3 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:D.map(L=>t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow border",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:L.name}),t.jsx("div",{className:`w-3 h-3 rounded-full ${L.status==="healthy"?"bg-green-500":L.status==="warning"?"bg-yellow-500":"bg-red-500"}`})]}),t.jsx("div",{className:"flex items-end space-x-2",children:t.jsx("span",{className:"text-3xl font-bold text-gray-900",children:L.value})}),t.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(L.status)}`,children:L.status}),t.jsx("span",{className:"text-sm text-gray-500",children:L.description})]})]},L.name))}),t.jsxs("div",{className:"my-3 bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Health Details"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Overall Score"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Build Status"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Test Coverage"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Lint Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Security"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Dependencies"}),t.jsx("th",{className:"hidden px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:l?.packages?.map(L=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx("div",{className:"text-sm",children:t.jsx(Ut,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:L.packageName}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Score: ",L.health.overallScore,"/100"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-16 bg-gray-200 rounded-full h-2 mr-2",children:t.jsx("div",{className:`h-2 rounded-full ${L.health.overallScore>=80?"bg-green-500":L.health.overallScore>=60?"bg-yellow-500":"bg-red-500"}`,style:{width:`${L.health.overallScore}%`}})}),t.jsx("span",{className:"text-sm font-medium text-gray-900",children:L.health.overallScore})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:`w-3 h-3 rounded-full ${L.health.buildStatus==="success"?"bg-green-500":L.health.buildStatus==="unknown"?"bg-yellow-500":"bg-red-500"}`}),t.jsx("span",{className:`ml-2 inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(L.health.buildStatus==="success"?"healthy":L.health.buildStatus==="unknown"?"warning":"error")}`,children:L.health.buildStatus==="success"?"healthy":L.health.buildStatus==="unknown"?"warning":"error"})]})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx(Dx,{className:"w-4 h-4 text-gray-400 mr-1"}),t.jsx("span",{className:"text-sm text-gray-900",children:"-"})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(L.health.lintStatus==="pass"?"pass":L.health.lintStatus==="unknown"?"warn":"fail")}`,children:L.health.lintStatus==="pass"?"pass":L.health.lintStatus==="unknown"?"warn":"fail"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("div",{className:"flex items-center",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(L.health.securityAudit==="pass"?"pass":L.health.securityAudit==="unknown"?"warn":"fail")}`,children:L.health.securityAudit==="pass"?"pass":L.health.securityAudit==="unknown"?"warn":"fail"})})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${k(L.health.overallScore>=80?"up-to-date":L.health.overallScore>=60?"outdated":"vulnerable")}`,children:L.health.overallScore>=80?"up-to-date":L.health.overallScore>=60?"outdated":"vulnerable"})}),t.jsx("td",{className:"hidden px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsx("div",{className:"flex space-x-2",children:t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"})})})]},L.packageName))})]})})]}),t.jsxs("div",{className:"hidden bg-white rounded-lg shadow border p-6",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Health Recommendations"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:[t.jsx(lt,{className:"w-5 h-5 text-yellow-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-yellow-800",children:"Test Coverage Below Target"}),t.jsx("p",{className:"text-sm text-yellow-700",children:"Consider adding more tests to improve coverage above 90%"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-red-50 rounded-lg border border-red-200",children:[t.jsx(Qt,{className:"w-5 h-5 text-red-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-red-800",children:"Build Failures Detected"}),t.jsx("p",{className:"text-sm text-red-700",children:"monorepo-scanner package has build failures that need immediate attention"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg border border-blue-200",children:[t.jsx(Sa,{className:"w-5 h-5 text-blue-600 mt-0.5"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-blue-800",children:"Performance Improvements Available"}),t.jsx("p",{className:"text-sm text-blue-700",children:"Consider optimizing build times and dependency resolution"})]})]})]})]})]})}function e1({packageCount:r,onNewRelease:s}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Publish Control"}),t.jsxs("p",{className:"text-gray-600 mt-1",children:["Manage package releases and versioning across your monorepo (",r," packages)"]})]}),t.jsxs("button",{onClick:s,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 flex items-center space-x-2",children:[t.jsx(Of,{className:"w-5 h-5"}),t.jsx("span",{children:"New Release"})]})]})}function t1({stats:r}){return t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:t.jsx(ni,{className:"w-6 h-6 text-green-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Ready to Publish"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.readyToPublish})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:t.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"In Progress"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.inProgress})]})]})}),t.jsx("div",{className:"bg-white p-6 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:t.jsx("span",{className:"text-2xl",children:t.jsx(Un,{className:"w-6 h-6 text-primary-600"})})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Published Today"}),t.jsx("p",{className:"text-2xl font-semibold text-gray-900",children:r.published})]})]})})]})}const n1=r=>({readyToPublish:r.filter(s=>s.status==="ready").length,inProgress:r.filter(s=>s.status==="building"||s.status==="testing").length,published:r.filter(s=>s.status==="published").length}),hh=r=>{switch(r){case"ready":case"completed":return"bg-green-100 text-green-800";case"building":case"testing":case"in-progress":return"bg-blue-100 text-blue-800";case"published":return"bg-purple-100 text-purple-800";case"failed":return"bg-red-100 text-red-800";case"scheduled":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},r1=r=>{switch(r){case"patch":return"bg-green-100 text-green-800";case"minor":return"bg-blue-100 text-blue-800";case"major":return"bg-red-100 text-red-800";case"prerelease":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}},s1=(r,s)=>s==="all"?r:r.filter(l=>l.name===s);function a1({packages:r,selectedPackage:s,onPackageChange:l}){return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Package Release Status"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by package:"}),t.jsxs("select",{value:s,onChange:i=>l(i.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Packages"}),[...new Set(r.map(i=>i.name))].map(i=>t.jsx("option",{value:i,children:i},i))]})]})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Package"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Current Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Next Version"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Type"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Commits"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Last Published"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.map(i=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center",children:t.jsx(Lc,{className:"w-4 h-4 text-gray-600"})}),t.jsxs("div",{className:"ml-3",children:[t.jsx("div",{className:"text-sm font-medium text-gray-900",children:i.name}),t.jsxs("div",{className:"text-sm text-gray-500",children:[Object.keys(i.dependencies).length," dependencies"]})]})]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.currentVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.nextVersion}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${r1(i.publishType)}`,children:i.publishType})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hh(i.status)}`,children:i.status})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:i.commits}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsxs("div",{className:"flex items-center text-sm text-gray-900",children:[t.jsx(Je,{className:"w-4 h-4 mr-1 text-gray-400"}),i.lastPublished]})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex space-x-2",children:[i.status==="ready"&&t.jsx("button",{className:"text-green-600 hover:text-green-900",children:"Publish"}),t.jsx("button",{className:"text-blue-600 hover:text-blue-900",children:"Details"}),t.jsx("button",{className:"text-purple-600 hover:text-purple-900",children:"Changelog"})]})})]},i.name))})]})})]})}function l1({releases:r,selectedStatus:s,onStatusChange:l}){const i=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 11:00 AM",startedAt:"2024-01-16 11:05 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"}];return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Release Schedule"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("span",{className:"text-sm text-gray-500",children:"Filter by status:"}),t.jsxs("select",{value:s,onChange:c=>l(c.target.value),className:"px-3 py-1 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Status"}),t.jsx("option",{value:"scheduled",children:"Scheduled"}),t.jsx("option",{value:"in-progress",children:"In Progress"}),t.jsx("option",{value:"completed",children:"Completed"}),t.jsx("option",{value:"failed",children:"Failed"})]})]})]})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-4",children:i.map(c=>t.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-100 flex items-center justify-center",children:t.jsx(If,{className:"w-4 h-4 text-purple-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[c.packageName," v",c.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["by ",c.author]})]})]}),t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${hh(c.status)}`,children:c.status}),t.jsxs("div",{className:"text-sm text-gray-500 flex items-center",children:[t.jsx(Je,{className:"w-4 h-4 mr-1"}),c.scheduledFor]})]})]}),t.jsx("div",{className:"mt-3 text-sm text-gray-700",children:c.changelog})]},c.id))})})]})}function i1(){const r=[{id:"1",packageName:"dashboard",version:"1.0.0",date:"2024-01-15",changes:["Added new dashboard layout","Improved search functionality","Fixed responsive design issues"],author:"team-frontend",type:"feature"},{id:"2",packageName:"backend",version:"1.2.0",date:"2024-01-14",changes:["Added authentication middleware","Implemented rate limiting","Fixed database connection pool"],author:"team-backend",type:"feature"}],s=l=>{switch(l){case"feature":return"bg-green-100 text-green-800";case"bugfix":return"bg-blue-100 text-blue-800";case"breaking":return"bg-red-100 text-red-800";case"docs":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}};return t.jsxs("div",{className:"bg-white rounded-lg shadow border overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Changelogs"})}),t.jsx("div",{className:"p-6",children:t.jsx("div",{className:"space-y-6",children:r.map(l=>t.jsxs("div",{className:"border-l-4 border-blue-500 pl-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-100 flex items-center justify-center",children:t.jsx(Lc,{className:"w-4 h-4 text-blue-600"})}),t.jsxs("div",{children:[t.jsxs("div",{className:"text-sm font-medium text-gray-900",children:[l.packageName," v",l.version]}),t.jsxs("div",{className:"text-sm text-gray-500",children:[l.date," • by ",l.author]})]})]}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${s(l.type)}`,children:l.type})]}),t.jsx("div",{className:"space-y-1",children:l.changes.map((i,c)=>t.jsxs("div",{className:"flex items-start space-x-2",children:[t.jsx(Pc,{className:"w-4 h-4 text-gray-400 mt-0.5 flex-shrink-0"}),t.jsx("span",{className:"text-sm text-gray-700",children:i})]},c))})]},l.id))})})]})}function o1(){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading package data..."})]})})}function c1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}const rf=[{name:"dashboard",currentVersion:"1.0.0",nextVersion:"1.0.1",status:"ready",lastPublished:"2024-01-10",changelog:"Bug fixes and performance improvements",commits:15,dependencies:["react","tailwindcss"],publishType:"patch"},{name:"backend",currentVersion:"1.2.0",nextVersion:"1.3.0",status:"building",lastPublished:"2024-01-08",changelog:"New API endpoints and enhanced security",commits:28,dependencies:["express","prisma"],publishType:"minor"},{name:"utils",currentVersion:"0.5.2",nextVersion:"1.0.0",status:"ready",lastPublished:"2024-01-05",changelog:"Major refactor with breaking changes",commits:42,dependencies:["lodash"],publishType:"major"},{name:"ci-status",currentVersion:"0.3.1",nextVersion:"0.4.0",status:"testing",lastPublished:"2024-01-12",changelog:"Enhanced CI monitoring and reporting",commits:18,dependencies:["axios","ws"],publishType:"minor"}],u1=[{id:"1",packageName:"dashboard",version:"1.0.1",status:"scheduled",scheduledFor:"2024-01-16 10:00 AM",changelog:"Bug fixes and performance improvements",author:"team-frontend"},{id:"2",packageName:"backend",version:"1.3.0",status:"in-progress",scheduledFor:"2024-01-16 09:00 AM",startedAt:"2024-01-16 09:00 AM",changelog:"New API endpoints and enhanced security",author:"team-backend"},{id:"3",packageName:"utils",version:"1.0.0",status:"completed",scheduledFor:"2024-01-15 02:00 PM",startedAt:"2024-01-15 02:00 PM",completedAt:"2024-01-15 02:15 PM",changelog:"Major refactor with breaking changes",author:"team-shared"}];function d1(){const[r,s]=w.useState("all"),[l,i]=w.useState("all"),[c,d]=w.useState(rf),[m,p]=w.useState(!1),[h,g]=w.useState(null);w.useEffect(()=>{(async()=>{try{p(!0);const P=(await Ft.getPackages()).map(U=>({name:U.name,currentVersion:U.version,nextVersion:v(U.version),status:y(U.status),lastPublished:U.lastUpdated,changelog:U.description||"No changelog available",commits:Math.floor(Math.random()*20)+1,dependencies:U.dependencies||[],publishType:k()}));d(P),g(null)}catch(L){g(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching packages:",L),d(rf)}finally{p(!1)}})()},[]);const v=D=>{const L=D.split(".").map(Number);return L[2]+=1,L.join(".")},y=D=>{switch(D){case"healthy":return"ready";case"warning":return"testing";case"error":return"failed";case"building":return"building";default:return"ready"}},k=()=>{const D=["patch","minor","major","prerelease"];return D[Math.floor(Math.random()*D.length)]},M=()=>{},N=()=>{window.location.reload()},R=s1(c,r),b=n1(c);return m?t.jsx(o1,{}):h?t.jsx(c1,{error:h,onRetry:N}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(e1,{packageCount:c.length,onNewRelease:M}),t.jsx(t1,{stats:b}),t.jsx(a1,{packages:R,selectedPackage:r,onPackageChange:s}),t.jsx(l1,{releases:u1,selectedStatus:l,onStatusChange:i}),t.jsx(i1,{})]})}function m1({message:r="Loading CI/CD data..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function f1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function h1({onTriggerBuild:r,onCreatePipeline:s}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-heading text-2xl",children:"CI/CD Integration"}),t.jsx("p",{className:"text-body mt-1",children:"Monitor and manage continuous integration and deployment pipelines"})]}),t.jsxs("div",{className:"flex space-x-2",children:[t.jsxs("button",{onClick:r,className:"btn-secondary flex items-center space-x-2",children:[t.jsx(ni,{className:"w-5 h-5"}),t.jsx("span",{children:"Trigger Build"})]}),t.jsxs("button",{onClick:s,className:"btn-primary flex items-center space-x-2",children:[t.jsx(Px,{className:"w-5 h-5"}),t.jsx("span",{children:"New Pipeline"})]})]})]})}const Zl=r=>{switch(r){case"success":case"active":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-yellow-100 text-yellow-800";case"failed":case"cancelled":return"bg-red-100 text-red-800";case"paused":return"bg-gray-100 text-gray-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},p1=r=>{switch(r){case"success":return"bg-green-100 text-green-800";case"running":return"bg-blue-100 text-blue-800";case"pending":return"bg-gray-100 text-gray-800";case"failed":return"bg-red-100 text-red-800";case"skipped":return"bg-gray-100 text-gray-600";default:return"bg-gray-100 text-gray-800"}},x1=r=>{const s=r.length,l=r.filter(h=>h.status==="success").length,i=r.filter(h=>h.status==="failed").length,c=r.filter(h=>h.status==="running").length,d=s>0?Math.round(l/s*100):0,m=r.filter(h=>h.duration),p=m.length>0?Math.round(m.reduce((h,g)=>h+(g.duration||0),0)/m.length):0;return{total:s,successful:l,failed:i,running:c,successRate:d,avgDuration:p}},g1=(r,s)=>r.filter(l=>{const i=s.package==="all"||l.packageName===s.package,c=s.status==="all"||l.status===s.status;return i&&c&&!0}),y1=r=>[...new Set(r.map(s=>s.packageName))],v1=r=>[...new Set(r.map(s=>s.status))],Na=r=>{if(r<60)return`${r}s`;if(r<3600){const s=Math.floor(r/60),l=r%60;return l>0?`${s}m ${l}s`:`${s}m`}else{const s=Math.floor(r/3600),l=Math.floor(r%3600/60);return l>0?`${s}h ${l}m`:`${s}h`}},sf=r=>new Date(r).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),ph=r=>{const s=new Date(r),i=new Date().getTime()-s.getTime(),c=Math.floor(i/(1e3*60)),d=Math.floor(c/60),m=Math.floor(d/24);return c<1?"Just now":c<60?`${c} min ago`:d<24?`${d} hour${d>1?"s":""} ago`:`${m} day${m>1?"s":""} ago`},j1=r=>{if(r.status==="success"||r.status==="failed"||r.status==="cancelled")return 100;if(r.status==="pending")return 0;const s=r.stages.length;if(s===0)return 0;const l=r.stages.filter(d=>d.status==="success"||d.status==="failed"||d.status==="skipped").length,i=r.stages.filter(d=>d.status==="running").length,c=(l+i*.5)/s;return Math.round(c*100)},w1=r=>{const s=r.toLowerCase();return s.includes("build")||s.includes("compile")?"🔨":s.includes("test")?"🧪":s.includes("lint")||s.includes("format")?"✨":s.includes("deploy")||s.includes("publish")?t.jsx(Un,{className:"w-6 h-6 text-primary-600"}):s.includes("security")||s.includes("audit")?"🔒":s.includes("install")||s.includes("dependencies")?t.jsx(Ut,{className:"w-6 h-6 text-primary-600"}):t.jsx(Ur,{className:"w-6 h-6 text-primary-600"})},N1=r=>r.status==="failed"?"critical":r.status==="paused"?"warning":r.successRate<70?"critical":r.successRate<85?"warning":"healthy",xh=r=>r.substring(0,8);function b1({stats:r,onRefresh:s,loading:l=!1}){return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-heading text-lg",children:"Build Statistics"}),t.jsxs("button",{onClick:s,disabled:l,className:"btn-ghost",children:[t.jsx(pr,{className:`w-4 h-4 mr-2 ${l?"animate-spin":""}`}),"Refresh"]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-primary-100 rounded-lg",children:t.jsx(Sa,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Total Builds"}),t.jsx("p",{className:"text-heading text-2xl",children:r.total})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-success-100 rounded-lg",children:t.jsx(Dt,{className:"w-6 h-6 text-success-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Successful"}),t.jsx("p",{className:"text-heading text-2xl text-success-600",children:r.successful})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-error-100 rounded-lg",children:t.jsx(Qt,{className:"w-6 h-6 text-error-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Failed"}),t.jsx("p",{className:"text-heading text-2xl text-error-600",children:r.failed})]})]})}),t.jsx("div",{className:"card p-4",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"p-2 bg-info-100 rounded-lg",children:t.jsx(Je,{className:"w-6 h-6 text-info-600"})}),t.jsxs("div",{className:"ml-4",children:[t.jsx("p",{className:"text-caption font-medium",children:"Running"}),t.jsx("p",{className:"text-heading text-2xl text-info-600",children:r.running})]})]})}),t.jsxs("div",{className:"card p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("p",{className:"text-caption font-medium",children:"Success Rate"}),t.jsxs("span",{className:`text-lg font-bold ${r.successRate>=90?"text-success-600":r.successRate>=70?"text-warning-600":"text-error-600"}`,children:[r.successRate,"%"]})]}),t.jsx("div",{className:"w-full bg-neutral-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${r.successRate>=90?"bg-success-500":r.successRate>=70?"bg-warning-500":"bg-error-500"}`,style:{width:`${r.successRate}%`}})})]})]}),t.jsxs("div",{className:"card p-6",children:[t.jsx("h3",{className:"text-heading text-lg mb-4",children:"Performance Metrics"}),t.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-primary-600",children:Na(r.avgDuration)}),t.jsx("div",{className:"text-caption",children:"Avg Duration"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-success-600",children:[r.total>0?Math.round(r.successful/r.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Success Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsxs("div",{className:"text-heading text-2xl text-error-600",children:[r.total>0?Math.round(r.failed/r.total*100):0,"%"]}),t.jsx("div",{className:"text-caption",children:"Failure Rate"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-heading text-2xl text-accent-600",children:r.running}),t.jsx("div",{className:"text-caption",children:"Active Builds"})]})]})]})]})}function S1({builds:r,selectedBuild:s,onBuildSelect:l,filters:i,onFiltersChange:c}){const d=y1(r),m=v1(r),p=h=>{switch(h){case"success":return t.jsx(Dt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Je,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Qt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(mc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Je,{className:"h-5 w-5 text-gray-500"})}};return t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:"bg-white p-4 rounded-lg shadow border",children:t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.package,onChange:h=>c({...i,package:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Packages"}),d.map(h=>t.jsx("option",{value:h,children:h},h))]})]}),t.jsxs("select",{value:i.status,onChange:h=>c({...i,status:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Statuses"}),m.map(h=>t.jsx("option",{value:h,children:h.charAt(0).toUpperCase()+h.slice(1)},h))]}),t.jsxs("select",{value:i.dateRange,onChange:h=>c({...i,dateRange:h.target.value}),className:"border border-gray-300 rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Time"}),t.jsx("option",{value:"today",children:"Today"}),t.jsx("option",{value:"week",children:"This Week"}),t.jsx("option",{value:"month",children:"This Month"})]})]})}),t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Recent Builds"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[r.length," build",r.length!==1?"s":""," found"]})]}),r.length===0?t.jsxs("div",{className:"p-8 text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:"🔨"}),t.jsx("p",{className:"text-gray-500",children:"No builds found matching your filters"})]}):t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(h=>{const g=j1(h),v=s===h.id;return t.jsxs("div",{className:`p-4 cursor-pointer transition-colors ${v?"bg-blue-50 border-l-4 border-blue-500":"hover:bg-gray-50"}`,onClick:()=>l(v?null:h.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[p(h.status),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:h.packageName}),t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:h.branch}),t.jsx("span",{className:"text-xs text-gray-500 font-mono",children:xh(h.commit)})]}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zl(h.status)}`,children:h.status}),t.jsxs("span",{className:"text-xs text-gray-500",children:["by ",h.triggeredBy]}),t.jsx("span",{className:"text-xs text-gray-500",children:ph(h.startTime)})]})]})]}),t.jsxs("div",{className:"text-right",children:[h.duration&&t.jsx("div",{className:"text-sm font-medium text-gray-900",children:Na(h.duration)}),h.status==="running"&&t.jsx("div",{className:"mt-1",children:t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-20 bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:`${g}%`}})}),t.jsxs("span",{className:"text-xs text-gray-500",children:[g,"%"]})]})})]})]}),v&&h.stages.length>0&&t.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100",children:t.jsx("div",{className:"flex items-center space-x-2",children:h.stages.map((y,k)=>t.jsx("div",{className:`flex items-center px-2 py-1 text-xs rounded ${Zl(y.status)}`,title:`${y.name}: ${y.status}`,children:y.name},y.name))})})]},h.id)})})]})]})}function C1({pipelines:r,onPipelineSelect:s,onPipelineToggle:l}){const i=d=>{switch(d){case"healthy":return t.jsx(Dt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"critical":return t.jsx(Qt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(Ur,{className:"w-5 h-5 text-gray-500"})}},c=d=>{switch(d){case"healthy":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"critical":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}};return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(Ur,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Pipelines Configured"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by creating your first CI/CD pipeline to automate builds and deployments."}),t.jsx("button",{className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Pipeline Status"}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[r.length," pipeline",r.length!==1?"s":""," ","configured"]})]}),t.jsx("div",{className:"divide-y divide-gray-200",children:r.map(d=>{const m=N1(d);return t.jsxs("div",{className:"p-4 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>s(d.id),children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[i(m),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.name}),t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 text-gray-800",children:d.packageName})]}),t.jsxs("div",{className:"flex items-center space-x-4 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zl(d.status)}`,children:d.status}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${c(m)}`,children:m})]})]})]}),t.jsx("div",{className:"flex items-center space-x-4",children:t.jsx("button",{onClick:p=>{p.stopPropagation(),l(d.id,d.status!=="active")},className:`p-2 rounded-lg transition-colors ${d.status==="active"?"text-green-600 hover:bg-green-100":"text-gray-400 hover:bg-gray-100"}`,title:d.status==="active"?"Pause Pipeline":"Activate Pipeline",children:d.status==="active"?t.jsx(Fx,{className:"w-5 h-5"}):t.jsx(ni,{className:"w-5 h-5"})})})]}),t.jsxs("div",{className:"mt-3 grid grid-cols-4 gap-4 text-xs",children:[t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Success Rate:"}),t.jsxs("div",{className:`font-medium ${d.successRate>=90?"text-green-600":d.successRate>=70?"text-yellow-600":"text-red-600"}`,children:[d.successRate,"%"]})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Avg Duration:"}),t.jsx("div",{className:"font-medium text-gray-900",children:Na(d.avgDuration)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Last Run:"}),t.jsx("div",{className:"font-medium text-gray-900",children:ph(d.lastRun)})]}),t.jsxs("div",{children:[t.jsx("span",{className:"text-gray-500",children:"Triggers:"}),t.jsx("div",{className:"font-medium text-gray-900",children:d.triggers.length})]})]}),t.jsxs("div",{className:"mt-3",children:[t.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[t.jsx("span",{className:"text-gray-500",children:"Pipeline Health"}),t.jsxs("span",{className:"font-medium text-gray-900",children:[d.successRate,"%"]})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${d.successRate>=90?"bg-green-500":d.successRate>=70?"bg-yellow-500":"bg-red-500"}`,style:{width:`${d.successRate}%`}})})]}),t.jsx("div",{className:"mt-3",children:t.jsxs("div",{className:"flex items-center space-x-1",children:[t.jsx("span",{className:"text-xs text-gray-500",children:"Triggers:"}),d.triggers.map(p=>t.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-blue-100 text-blue-800",children:p},p))]})})]},d.id)})})]})}function E1({build:r,onClose:s,onCancel:l,onRetry:i}){if(!r)return null;const c=d=>{switch(d){case"success":return t.jsx(Dt,{className:"h-5 w-5 text-green-500"});case"running":return t.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-blue-500 border-t-transparent"});case"pending":return t.jsx(Je,{className:"h-5 w-5 text-yellow-500"});case"failed":return t.jsx(Qt,{className:"h-5 w-5 text-red-500"});case"cancelled":return t.jsx(mc,{className:"h-5 w-5 text-red-500"});default:return t.jsx(Je,{className:"h-5 w-5 text-gray-500"})}};return t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[c(r.status),t.jsxs("div",{children:[t.jsxs("h2",{className:"text-xl font-semibold text-gray-900",children:[r.packageName," Build"]}),t.jsxs("p",{className:"text-sm text-gray-600",children:[r.branch," • ",xh(r.commit)]})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[r.status==="running"&&l&&t.jsxs("button",{onClick:()=>l(r.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-red-700 bg-red-100 rounded-lg hover:bg-red-200 transition-colors",children:[t.jsx(mc,{className:"w-4 h-4 mr-1"}),"Cancel"]}),(r.status==="failed"||r.status==="cancelled")&&i&&t.jsxs("button",{onClick:()=>i(r.id),className:"inline-flex items-center px-3 py-2 text-sm font-medium text-green-700 bg-green-100 rounded-lg hover:bg-green-200 transition-colors",children:[t.jsx(pr,{className:"w-4 h-4 mr-1"}),"Retry"]}),t.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 transition-colors",children:t.jsx(bs,{className:"w-6 h-6"})})]})]}),t.jsxs("div",{className:"p-6 overflow-y-auto max-h-[70vh]",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Build Information"}),t.jsxs("div",{className:"space-y-2 text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Status:"}),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${Zl(r.status)}`,children:r.status})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Started:"}),t.jsx("span",{className:"font-medium",children:sf(r.startTime)})]}),r.endTime&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Ended:"}),t.jsx("span",{className:"font-medium",children:sf(r.endTime)})]}),r.duration&&t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Duration:"}),t.jsx("span",{className:"font-medium",children:Na(r.duration)})]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsx("span",{className:"text-gray-600",children:"Triggered by:"}),t.jsx("span",{className:"font-medium",children:r.triggeredBy})]})]})]})}),t.jsx("div",{className:"space-y-4",children:t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Artifacts"}),r.artifacts.length>0?t.jsx("div",{className:"space-y-1",children:r.artifacts.map((d,m)=>t.jsx("div",{className:"text-sm",children:t.jsx("a",{href:"#",className:"text-blue-600 hover:text-blue-500 font-medium",children:d})},m))}):t.jsx("p",{className:"text-sm text-gray-500",children:"No artifacts generated"})]})})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Build Stages"}),t.jsx("div",{className:"space-y-4",children:r.stages.map((d,m)=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("span",{className:"text-2xl",children:w1(d.name)}),t.jsxs("div",{children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:d.name}),t.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${p1(d.status)}`,children:d.status}),d.duration&&t.jsx("span",{className:"text-xs text-gray-500",children:Na(d.duration)})]})]})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",m+1," of ",r.stages.length]})]}),d.logs&&d.logs.length>0&&t.jsxs("div",{className:"mt-3",children:[t.jsx("h5",{className:"text-xs font-medium text-gray-700 mb-2",children:"Logs"}),t.jsx("div",{className:"bg-gray-900 text-gray-100 p-3 rounded-lg text-xs font-mono max-h-32 overflow-y-auto",children:d.logs.map((p,h)=>t.jsx("div",{className:"mb-1",children:p},h))})]})]},d.name))})]})]})]})})}const k1=[{id:"1",name:"Dashboard CI",packageName:"dashboard",status:"active",lastRun:"2024-01-16T09:00:00Z",nextRun:"2024-01-16T10:00:00Z",successRate:95,avgDuration:420,triggers:["push","pull_request"]},{id:"2",name:"Backend CI",packageName:"backend",status:"active",lastRun:"2024-01-16T08:30:00Z",nextRun:"2024-01-16T09:30:00Z",successRate:88,avgDuration:900,triggers:["push","pull_request","tag"]},{id:"3",name:"Utils CI",packageName:"utils",status:"paused",lastRun:"2024-01-16T08:00:00Z",successRate:75,avgDuration:600,triggers:["push","pull_request"]}];function T1(){const[r,s]=w.useState(!0),[l,i]=w.useState(null),[c,d]=w.useState([]),[m]=w.useState(k1),[p,h]=w.useState(null),[g,v]=w.useState({package:"all",status:"all",pipeline:"all",dateRange:"all"});w.useEffect(()=>{(async()=>{try{s(!0);const we=(await Ft.getBuildStatus()).map(Se=>({id:Se.id||Math.random().toString(36).substr(2,9),packageName:Se.package||Se.packageName||"unknown",branch:Se.branch||"main",commit:Se.commit||"unknown",status:Se.status||"pending",startTime:Se.startTime||new Date().toISOString(),endTime:Se.endTime,duration:Se.duration,stages:Se.stages||[],triggeredBy:Se.triggeredBy||"system",artifacts:Se.artifacts||[]}));d(we),i(null)}catch(Z){i(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching build data:",Z)}finally{s(!1)}})()},[]);const y=g1(c,g),k=x1(c),M=p&&c.find(Y=>Y.id===p)||null,N=()=>{window.location.reload()},R=()=>{console.log("Triggering new build...")},b=()=>{console.log("Creating new pipeline...")},D=Y=>{h(Y)},L=Y=>{console.log("Selected pipeline:",Y)},P=(Y,Z)=>{console.log("Toggle pipeline:",Y,"active:",Z)},U=Y=>{console.log("Cancelling build:",Y),h(null)},Q=Y=>{console.log("Retrying build:",Y),h(null)},de=()=>{window.location.reload()};return r?t.jsx(m1,{}):l?t.jsx(f1,{error:l,onRetry:de}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(h1,{onTriggerBuild:R,onCreatePipeline:b}),t.jsx(b1,{stats:k,onRefresh:N,loading:r}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(S1,{builds:y,selectedBuild:p,onBuildSelect:D,filters:g,onFiltersChange:v})}),t.jsx("div",{className:"lg:col-span-1",children:t.jsx(C1,{pipelines:m,onPipelineSelect:L,onPipelineToggle:P})})]}),t.jsx(E1,{build:M,onClose:()=>h(null),onCancel:U,onRetry:Q}),y.length===0&&c.length>0&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔨"}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No builds found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"No builds match your current filters. Try adjusting your search criteria."}),t.jsx("button",{onClick:()=>v({package:"all",status:"all",pipeline:"all",dateRange:"all"}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]}),c.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:t.jsx(Un,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No CI/CD data available"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"Get started by triggering your first build or setting up a pipeline."}),t.jsxs("div",{className:"flex justify-center space-x-4",children:[t.jsx("button",{onClick:R,className:"bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors",children:"Trigger Build"}),t.jsx("button",{onClick:b,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Create Pipeline"})]})]})]})}function R1({message:r="Loading configuration files..."}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:r})]})})}function _1({error:r,onRetry:s}){return t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx(lt,{className:"w-12 h-12 text-red-500 mx-auto"}),t.jsx("p",{className:"mt-4 text-red-600",children:r}),s&&t.jsx("button",{onClick:s,className:"mt-4 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors",children:"Retry"})]})})}function A1({onRefresh:r,loading:s=!1}){return t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Configuration Inspector"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"View and manage configuration files across your monorepo"})]}),r&&t.jsxs("button",{onClick:r,disabled:s,className:"bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center space-x-2 transition-colors",children:[t.jsx(pr,{className:`w-5 h-5 ${s?"animate-spin":""}`}),t.jsx("span",{children:"Refresh"})]})]})}function gh(r){return typeof r>"u"||r===null}function P1(r){return typeof r=="object"&&r!==null}function L1(r){return Array.isArray(r)?r:gh(r)?[]:[r]}function O1(r,s){var l,i,c,d;if(s)for(d=Object.keys(s),l=0,i=d.length;l<i;l+=1)c=d[l],r[c]=s[c];return r}function I1(r,s){var l="",i;for(i=0;i<s;i+=1)l+=r;return l}function M1(r){return r===0&&Number.NEGATIVE_INFINITY===1/r}var D1=gh,F1=P1,U1=L1,B1=I1,z1=M1,H1=O1,Hc={isNothing:D1,isObject:F1,toArray:U1,repeat:B1,isNegativeZero:z1,extend:H1};function yh(r,s){var l="",i=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(l+='in "'+r.mark.name+'" '),l+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!s&&r.mark.snippet&&(l+=`
14
-
15
- `+r.mark.snippet),i+" "+l):i}function ba(r,s){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=s,this.message=yh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ba.prototype=Object.create(Error.prototype);ba.prototype.constructor=ba;ba.prototype.toString=function(s){return this.name+": "+yh(this,s)};var Mr=ba,$1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],V1=["scalar","sequence","mapping"];function W1(r){var s={};return r!==null&&Object.keys(r).forEach(function(l){r[l].forEach(function(i){s[String(i)]=l})}),s}function G1(r,s){if(s=s||{},Object.keys(s).forEach(function(l){if($1.indexOf(l)===-1)throw new Mr('Unknown option "'+l+'" is met in definition of "'+r+'" YAML type.')}),this.options=s,this.tag=r,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(l){return l},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=W1(s.styleAliases||null),V1.indexOf(this.kind)===-1)throw new Mr('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}var pt=G1;function af(r,s){var l=[];return r[s].forEach(function(i){var c=l.length;l.forEach(function(d,m){d.tag===i.tag&&d.kind===i.kind&&d.multi===i.multi&&(c=m)}),l[c]=i}),l}function K1(){var r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},s,l;function i(c){c.multi?(r.multi[c.kind].push(c),r.multi.fallback.push(c)):r[c.kind][c.tag]=r.fallback[c.tag]=c}for(s=0,l=arguments.length;s<l;s+=1)arguments[s].forEach(i);return r}function yc(r){return this.extend(r)}yc.prototype.extend=function(s){var l=[],i=[];if(s instanceof pt)i.push(s);else if(Array.isArray(s))i=i.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(l=l.concat(s.implicit)),s.explicit&&(i=i.concat(s.explicit));else throw new Mr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");l.forEach(function(d){if(!(d instanceof pt))throw new Mr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new Mr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new Mr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(d){if(!(d instanceof pt))throw new Mr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var c=Object.create(yc.prototype);return c.implicit=(this.implicit||[]).concat(l),c.explicit=(this.explicit||[]).concat(i),c.compiledImplicit=af(c,"implicit"),c.compiledExplicit=af(c,"explicit"),c.compiledTypeMap=K1(c.compiledImplicit,c.compiledExplicit),c};var q1=yc,Y1=new pt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}}),Q1=new pt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}}),J1=new pt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}}),X1=new q1({explicit:[Y1,Q1,J1]});function Z1(r){if(r===null)return!0;var s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function ej(){return null}function tj(r){return r===null}var nj=new pt("tag:yaml.org,2002:null",{kind:"scalar",resolve:Z1,construct:ej,predicate:tj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function rj(r){if(r===null)return!1;var s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function sj(r){return r==="true"||r==="True"||r==="TRUE"}function aj(r){return Object.prototype.toString.call(r)==="[object Boolean]"}var lj=new pt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rj,construct:sj,predicate:aj,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"});function ij(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function oj(r){return 48<=r&&r<=55}function cj(r){return 48<=r&&r<=57}function uj(r){if(r===null)return!1;var s=r.length,l=0,i=!1,c;if(!s)return!1;if(c=r[l],(c==="-"||c==="+")&&(c=r[++l]),c==="0"){if(l+1===s)return!0;if(c=r[++l],c==="b"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(c!=="0"&&c!=="1")return!1;i=!0}return i&&c!=="_"}if(c==="x"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(!ij(r.charCodeAt(l)))return!1;i=!0}return i&&c!=="_"}if(c==="o"){for(l++;l<s;l++)if(c=r[l],c!=="_"){if(!oj(r.charCodeAt(l)))return!1;i=!0}return i&&c!=="_"}}if(c==="_")return!1;for(;l<s;l++)if(c=r[l],c!=="_"){if(!cj(r.charCodeAt(l)))return!1;i=!0}return!(!i||c==="_")}function dj(r){var s=r,l=1,i;if(s.indexOf("_")!==-1&&(s=s.replace(/_/g,"")),i=s[0],(i==="-"||i==="+")&&(i==="-"&&(l=-1),s=s.slice(1),i=s[0]),s==="0")return 0;if(i==="0"){if(s[1]==="b")return l*parseInt(s.slice(2),2);if(s[1]==="x")return l*parseInt(s.slice(2),16);if(s[1]==="o")return l*parseInt(s.slice(2),8)}return l*parseInt(s,10)}function mj(r){return Object.prototype.toString.call(r)==="[object Number]"&&r%1===0&&!Hc.isNegativeZero(r)}var fj=new pt("tag:yaml.org,2002:int",{kind:"scalar",resolve:uj,construct:dj,predicate:mj,represent:{binary:function(r){return r>=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0o"+r.toString(8):"-0o"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),hj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pj(r){return!(r===null||!hj.test(r)||r[r.length-1]==="_")}function xj(r){var s,l;return s=r.replace(/_/g,"").toLowerCase(),l=s[0]==="-"?-1:1,"+-".indexOf(s[0])>=0&&(s=s.slice(1)),s===".inf"?l===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:s===".nan"?NaN:l*parseFloat(s,10)}var gj=/^[-+]?[0-9]+e/;function yj(r,s){var l;if(isNaN(r))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Hc.isNegativeZero(r))return"-0.0";return l=r.toString(10),gj.test(l)?l.replace("e",".e"):l}function vj(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||Hc.isNegativeZero(r))}var jj=new pt("tag:yaml.org,2002:float",{kind:"scalar",resolve:pj,construct:xj,predicate:vj,represent:yj,defaultStyle:"lowercase"}),wj=X1.extend({implicit:[nj,lj,fj,jj]}),Nj=wj,vh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),jh=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function bj(r){return r===null?!1:vh.exec(r)!==null||jh.exec(r)!==null}function Sj(r){var s,l,i,c,d,m,p,h=0,g=null,v,y,k;if(s=vh.exec(r),s===null&&(s=jh.exec(r)),s===null)throw new Error("Date resolve error");if(l=+s[1],i=+s[2]-1,c=+s[3],!s[4])return new Date(Date.UTC(l,i,c));if(d=+s[4],m=+s[5],p=+s[6],s[7]){for(h=s[7].slice(0,3);h.length<3;)h+="0";h=+h}return s[9]&&(v=+s[10],y=+(s[11]||0),g=(v*60+y)*6e4,s[9]==="-"&&(g=-g)),k=new Date(Date.UTC(l,i,c,d,m,p,h)),g&&k.setTime(k.getTime()-g),k}function Cj(r){return r.toISOString()}var Ej=new pt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bj,construct:Sj,instanceOf:Date,represent:Cj});function kj(r){return r==="<<"||r===null}var Tj=new pt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:kj}),$c=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
- \r`;function Rj(r){if(r===null)return!1;var s,l,i=0,c=r.length,d=$c;for(l=0;l<c;l++)if(s=d.indexOf(r.charAt(l)),!(s>64)){if(s<0)return!1;i+=6}return i%8===0}function _j(r){var s,l,i=r.replace(/[\r\n=]/g,""),c=i.length,d=$c,m=0,p=[];for(s=0;s<c;s++)s%4===0&&s&&(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)),m=m<<6|d.indexOf(i.charAt(s));return l=c%4*6,l===0?(p.push(m>>16&255),p.push(m>>8&255),p.push(m&255)):l===18?(p.push(m>>10&255),p.push(m>>2&255)):l===12&&p.push(m>>4&255),new Uint8Array(p)}function Aj(r){var s="",l=0,i,c,d=r.length,m=$c;for(i=0;i<d;i++)i%3===0&&i&&(s+=m[l>>18&63],s+=m[l>>12&63],s+=m[l>>6&63],s+=m[l&63]),l=(l<<8)+r[i];return c=d%3,c===0?(s+=m[l>>18&63],s+=m[l>>12&63],s+=m[l>>6&63],s+=m[l&63]):c===2?(s+=m[l>>10&63],s+=m[l>>4&63],s+=m[l<<2&63],s+=m[64]):c===1&&(s+=m[l>>2&63],s+=m[l<<4&63],s+=m[64],s+=m[64]),s}function Pj(r){return Object.prototype.toString.call(r)==="[object Uint8Array]"}var Lj=new pt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Rj,construct:_j,predicate:Pj,represent:Aj}),Oj=Object.prototype.hasOwnProperty,Ij=Object.prototype.toString;function Mj(r){if(r===null)return!0;var s=[],l,i,c,d,m,p=r;for(l=0,i=p.length;l<i;l+=1){if(c=p[l],m=!1,Ij.call(c)!=="[object Object]")return!1;for(d in c)if(Oj.call(c,d))if(!m)m=!0;else return!1;if(!m)return!1;if(s.indexOf(d)===-1)s.push(d);else return!1}return!0}function Dj(r){return r!==null?r:[]}var Fj=new pt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Mj,construct:Dj}),Uj=Object.prototype.toString;function Bj(r){if(r===null)return!0;var s,l,i,c,d,m=r;for(d=new Array(m.length),s=0,l=m.length;s<l;s+=1){if(i=m[s],Uj.call(i)!=="[object Object]"||(c=Object.keys(i),c.length!==1))return!1;d[s]=[c[0],i[c[0]]]}return!0}function zj(r){if(r===null)return[];var s,l,i,c,d,m=r;for(d=new Array(m.length),s=0,l=m.length;s<l;s+=1)i=m[s],c=Object.keys(i),d[s]=[c[0],i[c[0]]];return d}var Hj=new pt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Bj,construct:zj}),$j=Object.prototype.hasOwnProperty;function Vj(r){if(r===null)return!0;var s,l=r;for(s in l)if($j.call(l,s)&&l[s]!==null)return!1;return!0}function Wj(r){return r!==null?r:{}}var Gj=new pt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Vj,construct:Wj});Nj.extend({implicit:[Ej,Tj],explicit:[Lj,Fj,Hj,Gj]});function lf(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?`
17
- `:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}var Kj=new Array(256),qj=new Array(256);for(var xs=0;xs<256;xs++)Kj[xs]=lf(xs)?1:0,qj[xs]=lf(xs);const Yj=r=>{switch(r){case"workspace":return"bg-blue-100 text-blue-800";case"package":return"bg-green-100 text-green-800";case"environment":return"bg-purple-100 text-purple-800";case"tool":return"bg-orange-100 text-orange-800";default:return"bg-gray-100 text-gray-800"}},of=r=>{switch(r){case"valid":return"bg-green-100 text-green-800";case"warning":return"bg-yellow-100 text-yellow-800";case"error":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},Qj=(r,s)=>r.filter(l=>{const i=s.section==="all"||l.id===s.section,c=s.type==="all"||l.type===s.type,d=s.status==="all"||s.status==="secrets"&&l.hasSecrets||s.status==="standard"&&!l.hasSecrets,m=!s.search||l.name.toLowerCase().includes(s.search.toLowerCase())||l.path.toLowerCase().includes(s.search.toLowerCase());return i&&c&&d&&m}),Jj=r=>[...new Set(r.map(s=>s.type))],Xj=r=>{if(r===0)return"0 Bytes";const s=1024,l=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(s));return parseFloat((r/Math.pow(s,i)).toFixed(2))+" "+l[i]},Zj=r=>new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),wh=r=>{const s=r.split(".").pop()?.toLowerCase(),l={json:"json",yaml:"yaml",yml:"yaml",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",env:"env",config:"text",rc:"text",lock:"text",md:"markdown",txt:"text"};return r==="package.json"?"json":r==="docker-compose.yml"||r==="docker-compose.yaml"?"yaml":r===".eslintrc.js"||r===".prettierrc.js"?"javascript":r==="tsconfig.json"?"json":l[s||""]||"text"},e2=r=>{const s=[/^([A-Z_]+(?:PASSWORD|SECRET|KEY|TOKEN|AUTH)[A-Z_]*)\s*=\s*(.+)$/gim,/"([^"]*(?:password|secret|key|token|auth)[^"]*)"\s*:\s*"([^"]+)"/gi,/^(\s*[^:\s]*(?:password|secret|key|token|auth)[^:\s]*)\s*:\s*(.+)$/gim];let l=r;return s.forEach(i=>{l=l.replace(i,(c,d,m)=>{const p="*".repeat(Math.min(m.length,8));return c.replace(m,p)})}),l},t2=r=>{switch(wh(r)){case"json":return t.jsx(Yl,{className:"w-6 h-6 text-primary-600"});case"yaml":return t.jsx(Yl,{className:"w-6 h-6 text-primary-600"});case"javascript":case"typescript":return t.jsx(Ur,{className:"w-6 h-6 text-primary-600"});case"env":return"🔐";case"markdown":return"📝";default:return t.jsx(Ac,{className:"w-6 h-6 text-primary-600"})}};function n2({configs:r,selectedConfig:s,onConfigSelect:l,filters:i,onFiltersChange:c}){const d=Jj(r);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col max-h-[calc(100vh-180px)]",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Configuration Files"}),t.jsxs("div",{className:"relative mb-4",children:[t.jsx(Oc,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),t.jsx("input",{type:"text",placeholder:"Search config files...",value:i.search,onChange:m=>c({...i,search:m.target.value}),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent text-sm"})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx(li,{className:"h-4 w-4 text-gray-400"}),t.jsxs("select",{value:i.type,onChange:m=>c({...i,type:m.target.value}),className:"flex-1 border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Types"}),d.map(m=>t.jsx("option",{value:m,children:m.charAt(0).toUpperCase()+m.slice(1)},m))]})]}),t.jsxs("select",{value:i.status,onChange:m=>c({...i,status:m.target.value}),className:"w-full border border-gray-300 rounded-md px-3 py-1 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[t.jsx("option",{value:"all",children:"All Files"}),t.jsx("option",{value:"standard",children:"Standard Files"}),t.jsx("option",{value:"secrets",children:"Files with Secrets"})]})]})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsxs("div",{className:"p-4 text-center text-gray-500",children:[t.jsx("div",{className:"text-4xl mb-2",children:t.jsx(Ac,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-sm",children:"No configuration files found"})]}):t.jsx("div",{className:"p-2",children:r.map(m=>t.jsx("button",{onClick:()=>l(m.id),className:`w-full text-left p-3 rounded-lg mb-2 transition-colors ${s===m.id?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:t.jsxs("div",{className:"flex items-start space-x-3",children:[t.jsx("div",{className:"text-2xl",children:t2(m.name)}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("p",{className:"text-sm font-medium text-gray-900 truncate",children:m.name}),m.hasSecrets&&t.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒"})]}),t.jsx("p",{className:"text-xs text-gray-500 truncate mb-1",children:m.path}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${Yj(m.type)}`,children:m.type}),t.jsx("span",{className:"text-xs text-gray-400",children:Xj(m.size)})]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:Zj(m.lastModified)})]})]})},m.id))})}),t.jsx("div",{className:"p-4 border-t border-gray-200",children:t.jsxs("div",{className:"text-xs text-gray-500",children:[r.length," file",r.length!==1?"s":""," found"]})})]})}function r2({isEditing:r,canEdit:s,hasSecrets:l,showSecrets:i,saving:c,onStartEdit:d,onSaveEdit:m,onCancelEdit:p,onToggleSecrets:h,onRefresh:g,content:v}){const[y,k]=w.useState(!1),M=async()=>{try{const N=v||"No content available";await navigator.clipboard.writeText(N),k(!0),setTimeout(()=>{k(!1)},4e3)}catch(N){console.error("Failed to copy to clipboard:",N),k(!0),setTimeout(()=>k(!1),2e3)}};return c?t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsx("div",{className:"flex items-center space-x-2",children:t.jsxs("div",{className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-orange-600 bg-white border border-gray-300 rounded-lg",children:[t.jsx(pr,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]})}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsxs("button",{onClick:g,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(pr,{className:"w-4 h-4 mr-1"}),"Refresh"]})})]}):t.jsxs("div",{className:"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[r?t.jsxs(t.Fragment,{children:[t.jsxs("button",{onClick:m,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors",children:[t.jsx(ti,{className:"w-4 h-4 mr-1"}),"Save"]}),t.jsxs("button",{onClick:p,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(bs,{className:"w-4 h-4 mr-1"}),"Cancel"]})]}):s&&t.jsxs("button",{onClick:d,className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[t.jsx(Rx,{className:"w-4 h-4 mr-1"}),"Edit"]}),l&&t.jsx("button",{onClick:h,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${i?"text-red-700 bg-red-100 hover:bg-red-200":"text-yellow-700 bg-yellow-100 hover:bg-yellow-200"}`,children:i?t.jsxs(t.Fragment,{children:[t.jsx(Tx,{className:"w-4 h-4 mr-1"}),"Hide Secrets"]}):t.jsxs(t.Fragment,{children:[t.jsx(kx,{className:"w-4 h-4 mr-1"}),"Show Secrets"]})})]}),t.jsx("div",{className:"flex items-center space-x-2",children:t.jsx("button",{onClick:M,className:`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${y?"text-green-700 bg-green-100 border border-green-300":"text-gray-700 bg-white border border-gray-300 hover:bg-gray-50"}`,children:y?t.jsxs(t.Fragment,{children:[t.jsx(Lx,{className:"w-4 h-4 mr-1"}),"Copied!"]}):t.jsxs(t.Fragment,{children:[t.jsx(Ox,{className:"w-4 h-4 mr-1"}),"Copy"]})})})]})}function s2({config:r,isEditing:s,editValue:l,onStartEdit:i,onSaveEdit:c,onCancelEdit:d,onValueChange:m,showSecrets:p,onToggleSecrets:h}){if(!r)return t.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 rounded-lg",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-4xl mb-2",children:t.jsx(Yl,{className:"w-6 h-6 text-primary-600"})}),t.jsx("p",{className:"text-gray-500",children:"Select a configuration file to view or edit"})]})});const g=wh(r.name),v=p?r.content:e2(r.content);return t.jsxs("div",{className:"bg-white rounded-lg shadow border h-full flex flex-col",children:[t.jsx("div",{className:"p-4 border-b border-gray-200",children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("div",{className:"text-2xl",children:t.jsx(Yl,{className:"w-6 h-6 text-primary-600"})}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:r.name}),t.jsx("p",{className:"text-sm text-gray-500",children:r.path})]})]})}),t.jsx("div",{className:"flex-1 p-4",children:s?t.jsx("div",{className:"h-full",children:t.jsx("textarea",{value:l,onChange:y=>m(y.target.value),className:"w-full h-full font-mono text-sm border border-gray-300 rounded-lg p-4 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none",placeholder:"Enter configuration content...",spellCheck:!1})}):t.jsx("div",{className:"h-full",children:t.jsx("pre",{className:"w-full h-full font-mono text-sm bg-gray-50 border border-gray-200 rounded-lg p-4 overflow-auto whitespace-pre-wrap",children:t.jsx("code",{className:`language-${g}`,children:v})})})}),t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs("span",{children:["Language: ",g.toUpperCase()]}),t.jsxs("span",{children:["Size: ",r.content.length," characters"]}),r.hasSecrets&&t.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800",children:"🔒 Contains secrets"})]}),t.jsx("div",{children:s?t.jsx("span",{className:"text-blue-600 font-medium",children:"Editing mode"}):r.isEditable?t.jsx("span",{className:"text-green-600",children:"Editable"}):t.jsx("span",{className:"text-gray-400",children:"Read-only"})})]})})]})}function a2({validation:r,configName:s}){const l=h=>{switch(h){case"valid":return t.jsx(Dt,{className:"w-5 h-5 text-green-500"});case"warning":return t.jsx(lt,{className:"w-5 h-5 text-yellow-500"});case"error":return t.jsx(Qt,{className:"w-5 h-5 text-red-500"});default:return t.jsx(ys,{className:"w-5 h-5 text-gray-500"})}},c=r.some(h=>h.status==="error")?"error":r.some(h=>h.status==="warning")?"warning":"valid",d=r.filter(h=>h.status==="error").length,m=r.filter(h=>h.status==="warning").length,p=r.filter(h=>h.status==="valid").length;return r.length===0?t.jsx("div",{className:"bg-white rounded-lg shadow border p-6",children:t.jsxs("div",{className:"text-center",children:[t.jsx(ys,{className:"w-8 h-8 text-gray-400 mx-auto mb-2"}),t.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-1",children:"No Validation Results"}),t.jsx("p",{className:"text-sm text-gray-500",children:"Select a configuration file to see validation results."})]})}):t.jsxs("div",{className:"bg-white rounded-lg shadow border",children:[t.jsxs("div",{className:"p-4 border-b border-gray-200",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-medium text-gray-900",children:"Validation Results"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[l(c),t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${of(c)}`,children:c.toUpperCase()})]})]}),t.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:["Validation results for ",s]})]}),t.jsx("div",{className:"p-4 border-b border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-green-600",children:p}),t.jsx("div",{className:"text-xs text-gray-600",children:"Valid"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-yellow-600",children:m}),t.jsx("div",{className:"text-xs text-gray-600",children:"Warnings"})]}),t.jsxs("div",{children:[t.jsx("div",{className:"text-lg font-bold text-red-600",children:d}),t.jsx("div",{className:"text-xs text-gray-600",children:"Errors"})]})]})}),t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"space-y-3",children:r.map((h,g)=>t.jsx("div",{className:`p-3 rounded-lg border ${h.status==="error"?"border-red-200 bg-red-50":h.status==="warning"?"border-yellow-200 bg-yellow-50":"border-green-200 bg-green-50"}`,children:t.jsxs("div",{className:"flex items-start space-x-3",children:[l(h.status),t.jsxs("div",{className:"flex-1",children:[t.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[t.jsx("h4",{className:"text-sm font-medium text-gray-900",children:h.field}),t.jsx("span",{className:`inline-flex px-2 py-0.5 text-xs font-semibold rounded-full ${of(h.status)}`,children:h.status})]}),t.jsx("p",{className:"text-sm text-gray-600",children:h.message})]})]})},g))})}),(d>0||m>0)&&t.jsx("div",{className:"p-4 border-t border-gray-200 bg-gray-50",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[d>0&&t.jsxs("span",{className:"text-red-600 font-medium",children:[d," error",d>1?"s":""," need attention"]}),m>0&&d===0&&t.jsxs("span",{className:"text-yellow-600 font-medium",children:[m," warning",m>1?"s":""," to review"]})]}),t.jsx("button",{className:"text-blue-600 hover:text-blue-500 text-sm font-medium",children:"View Details"})]})})]})}function l2(){const[r,s]=w.useState(!0),[l,i]=w.useState(!1),[c,d]=w.useState(null),[m,p]=w.useState([]),[h,g]=w.useState(null),[v,y]=w.useState(!1),[k,M]=w.useState(""),[N,R]=w.useState(!1),[b,D]=w.useState({section:"all",type:"all",status:"all",search:""});w.useEffect(()=>{(async()=>{try{s(!0);const ue=(await Ft.getConfigurationFiles()).map(ge=>({id:ge.id||ge.name,name:ge.name,path:ge.path||ge.name,type:ge.type||"text",content:ge.content||"",size:ge.content?.length||0,lastModified:ge.lastModified||new Date().toISOString(),hasSecrets:ge.hasSecrets||!1,isEditable:ge.isEditable!==!1,validation:ge.validation||[]}));p(ue),d(null)}catch(ve){d(be.FAILED_TO_FETCH_PACKAGES),console.error("Error fetching config files:",ve)}finally{s(!1)}})()},[]);const L=Qj(m,b),P=h&&m.find(ee=>ee.id===h)||null,U=()=>{window.location.reload()},Q=ee=>{g(ee),y(!1),M("")},de=()=>{P&&(y(!0),M(P.content))},Y=async()=>{if(P&&!l)try{i(!0),d(null);const ee=await Ft.saveConfigurationFile(P.id,k);p(ve=>ve.map(ue=>ue.id===h?{...ee,isEditable:ue.isEditable}:ue)),h===P.id&&g(P.id),y(!1),M("")}catch(ee){console.error("Error saving config file:",ee),d(`${be.FAILED_TO_SAVE_CONFIG}: ${ee.message}`)}finally{i(!1)}},Z=()=>{y(!1),M("")},we=()=>{R(!N)},Se=()=>{window.location.reload()};return r?t.jsx(R1,{}):c?t.jsx(_1,{error:c,onRetry:Se}):t.jsxs("div",{className:"space-y-6",children:[t.jsx(A1,{onRefresh:U,loading:r}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-[800px]",children:[t.jsx("div",{className:"lg:col-span-1",children:t.jsx(n2,{configs:L,selectedConfig:h,onConfigSelect:Q,filters:b,onFiltersChange:D})}),t.jsxs("div",{className:"lg:col-span-2 flex flex-col",children:[P&&t.jsx("div",{className:"mb-4",children:t.jsx(r2,{isEditing:v,canEdit:P.isEditable,hasSecrets:P.hasSecrets,showSecrets:N,saving:l,onStartEdit:de,onSaveEdit:Y,onCancelEdit:Z,onToggleSecrets:we,onRefresh:U,content:v?k:P?.content})}),t.jsx("div",{className:"flex-1",children:t.jsx(s2,{config:P,isEditing:v,editValue:k,saving:l,onStartEdit:de,onSaveEdit:Y,onCancelEdit:Z,onValueChange:M,showSecrets:N,onToggleSecrets:we})})]}),t.jsx("div",{className:"lg:col-span-1 space-y-6",children:t.jsx(a2,{validation:P?.validation||[],configName:P?.name||"No file selected"})})]}),L.length===0&&!r&&t.jsxs("div",{className:"text-center py-12",children:[t.jsx("div",{className:"flex justify-center text-gray-400 text-6xl mb-4",children:t.jsx(Ac,{className:"w-6 h-6 text-primary-600"})}),t.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No configuration files found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:b.search||b.type!=="all"||b.status!=="all"?"Try adjusting your filters to see more results.":"No configuration files are available to inspect."}),(b.search||b.type!=="all"||b.status!=="all")&&t.jsx("button",{onClick:()=>D({section:"all",type:"all",status:"all",search:""}),className:"text-blue-600 hover:text-blue-500",children:"Clear Filters"})]})]})}function i2({packages:r,onConfirm:s,loading:l}){const[i,c]=w.useState(new Set),[d,m]=w.useState(""),p=w.useMemo(()=>r.filter(y=>!y.private&&y.name.toLowerCase().includes(d.toLowerCase())),[r,d]),h=y=>{const k=new Set(i);k.has(y)?k.delete(y):k.add(y),c(k)},g=()=>{i.size===p.length?c(new Set):c(new Set(p.map(y=>y.name)))},v=()=>{const y=r.filter(k=>i.has(k.name));s(y)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 1: Select Packages"}),t.jsx("p",{className:"text-gray-600",children:"Choose which packages you want to release. You can select multiple packages."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Search Packages"}),t.jsx("input",{type:"text",value:d,onChange:y=>m(y.target.value),placeholder:"Search by package name...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent"})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("label",{className:"text-sm font-medium text-gray-700",children:["Available Packages (",p.length,")"]}),p.length>0&&t.jsx("button",{onClick:g,className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:i.size===p.length?"Deselect All":"Select All"})]}),t.jsx("div",{className:"border border-gray-200 rounded-lg divide-y max-h-96 overflow-y-auto",children:p.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No packages found"}):p.map(y=>t.jsx("div",{className:"p-4 hover:bg-gray-50 cursor-pointer transition",onClick:()=>h(y.name),children:t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx("input",{type:"checkbox",checked:i.has(y.name),onChange:()=>h(y.name),className:"w-4 h-4 text-primary-600 rounded focus:ring-2 focus:ring-primary-500"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"font-medium text-gray-900",children:y.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",y.version]})]}),y.dependencies&&y.dependencies.length>0&&t.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:[y.dependencies.length," deps"]})]})},y.name))})]}),t.jsx("div",{className:"flex gap-3 justify-end",children:t.jsxs("button",{onClick:v,disabled:i.size===0||l,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:["Continue (",i.size," selected)"]})})]})}const o2={major:"Breaking changes, incompatible API changes",minor:"New features, backward compatible",patch:"Bug fixes, patches, backward compatible"};function c2({packages:r,onConfirm:s,onBack:l}){const[i,c]=w.useState(r.reduce((h,g)=>({...h,[g.name]:g.bumpType}),{})),d=(h,g)=>{const v=h.split(".").map(Number);return g==="major"?`${v[0]+1}.0.0`:g==="minor"?`${v[0]}.${v[1]+1}.0`:`${v[0]}.${v[1]}.${v[2]+1}`},m=(h,g)=>{c(v=>({...v,[h]:g}))},p=()=>{const h=r.map(g=>({...g,bumpType:i[g.name],newVersion:d(g.currentVersion,i[g.name])}));s(h)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 2: Select Version Bumps"}),t.jsx("p",{className:"text-gray-600",children:"Choose the version bump type for each package. This determines the new version number."})]}),t.jsx("div",{className:"grid grid-cols-3 gap-4",children:Object.entries(o2).map(([h,g])=>t.jsxs("div",{className:"p-4 bg-gray-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-gray-900 capitalize mb-1",children:h}),t.jsx("p",{className:"text-sm text-gray-600",children:g})]},h))}),t.jsx("div",{className:"space-y-4",children:r.map(h=>t.jsxs("div",{className:"border border-gray-200 rounded-lg p-4",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:h.name}),t.jsxs("p",{className:"text-sm text-gray-500",children:["Current: v",h.currentVersion]})]}),t.jsxs("div",{className:"text-right",children:[t.jsx("p",{className:"text-sm text-gray-500",children:"New Version:"}),t.jsxs("p",{className:"text-lg font-bold text-primary-600",children:["v",d(h.currentVersion,i[h.name])]})]})]}),t.jsx("div",{className:"grid grid-cols-3 gap-3",children:["major","minor","patch"].map(g=>t.jsx("button",{onClick:()=>m(h.name,g),className:`p-3 rounded-lg border-2 transition font-medium text-sm ${i[h.name]===g?"border-primary-600 bg-primary-50 text-primary-700":"border-gray-200 bg-white text-gray-700 hover:border-gray-300"}`,children:t.jsx("span",{className:"capitalize",children:g})},g))}),h.affectedDependencies.length>0&&t.jsxs("div",{className:"mt-4 p-3 bg-blue-50 rounded-lg",children:[t.jsxs("p",{className:"text-sm font-medium text-blue-900",children:["ℹ️ ",h.affectedDependencies.length," dependent package(s)"]}),t.jsx("p",{className:"text-xs text-blue-700 mt-1",children:"Will be auto-bumped when this package is released"})]})]},h.name))}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:l,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",children:"Back"}),t.jsx("button",{onClick:p,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Continue"})]})]})}function u2({packages:r,existingChangesets:s,onConfirm:l,onBack:i,loading:c}){const[d,m]=w.useState(""),[p,h]=w.useState([]),g=()=>{const y=[];return d.trim()||y.push("Please enter a changelog summary"),d.trim().length<10&&y.push(Gx),h(y),y.length===0},v=()=>{g()&&l(d)};return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 3: Preview Changeset"}),t.jsx("p",{className:"text-gray-600",children:"Review the changeset that will be created. Enter a summary of the changes."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Changelog Summary"}),t.jsx("textarea",{value:d,onChange:y=>{m(y.target.value),g()},placeholder:Wx,rows:4,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent font-mono text-sm"}),p.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:p.map((y,k)=>t.jsx("p",{className:"text-sm text-red-600",children:y},k))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages to Release"}),t.jsx("div",{className:"space-y-3",children:r.map(y=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:y.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:[y.currentVersion," ",t.jsx(va,{})," ",y.newVersion]})]}),t.jsx("div",{className:"text-right",children:t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:y.bumpType.charAt(0).toUpperCase()+y.bumpType.slice(1)})})]},y.name))})]}),s.length>0&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-800 font-medium",children:"Unpublished Changesets"}),t.jsxs("p",{className:"text-yellow-700 text-sm mt-1",children:["There are ",s.length," existing unpublished changeset(s). Creating new ones will accumulate until published."]})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:v,disabled:c||p.length>0,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:c?"Processing...":"Continue to Validation"})]})]})}function d2({validation:r,packages:s,onConfirm:l,onBack:i,loading:c}){const d=[{name:"User Permissions",passed:r.checks.permissions},{name:"Working Tree Clean",passed:r.checks.workingTreeClean},{name:"CI Tests Passing",passed:r.checks.ciPassing},{name:"Version Available on npm",passed:r.checks.versionAvailable}];return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Step 4: Validate Release"}),t.jsx("p",{className:"text-gray-600",children:"Checking if the release is safe to proceed. All checks must pass."})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{className:`p-4 rounded-lg ${r.isValid?"bg-green-50":"bg-red-50"}`,children:[t.jsx("p",{className:`font-medium ${r.isValid?"text-green-900":"text-red-900"}`,children:r.isValid?"Ready to Release":"Not Ready"}),t.jsx("p",{className:`text-sm mt-1 ${r.isValid?"text-green-700":"text-red-700"}`,children:r.isValid?"All checks passed. Safe to proceed.":`${r.errors.length} error(s) need resolution`})]}),t.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg",children:[t.jsx("p",{className:"font-medium text-blue-900",children:"Release Summary"}),t.jsxs("p",{className:"text-sm text-blue-700 mt-1",children:[s.length," package(s) will be released"]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Pre-release Checks"}),t.jsx("div",{className:"space-y-3",children:d.map((m,p)=>t.jsxs("div",{className:`flex items-center space-x-3 p-3 rounded-lg ${m.passed?"bg-green-50":"bg-red-50"}`,children:[t.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center font-bold text-white p-1 ${m.passed?"bg-green-500":"bg-red-500"}`,children:m.passed?t.jsx(ti,{}):t.jsx(bs,{})}),t.jsx("span",{className:`font-medium ${m.passed?"text-green-900":"text-red-900"}`,children:m.name})]},p))})]}),r.errors.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-red-900 mb-4",children:"Errors"}),t.jsx("div",{className:"space-y-2",children:r.errors.map((m,p)=>t.jsxs("p",{className:"text-red-700 text-sm",children:["• ",m]},p))})]}),r.warnings.length>0&&t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-yellow-900 mb-4",children:"Warnings"}),t.jsx("div",{className:"space-y-2",children:r.warnings.map((m,p)=>t.jsx("p",{className:"text-yellow-700 text-sm",children:m},p))})]}),t.jsxs("div",{className:"flex gap-3 justify-end",children:[t.jsx("button",{onClick:i,className:"px-6 py-2 border border-gray-300 text-gray-700 rounded-lg font-medium hover:bg-gray-50 transition",disabled:c,children:"Back"}),t.jsx("button",{onClick:l,disabled:!r.isValid||c,className:"px-6 py-2 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition",children:c?"Publishing...":"Confirm & Publish"})]})]})}function m2({packages:r,summary:s,onReset:l}){const i=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return t.jsxs("div",{className:"bg-white rounded-lg shadow p-6 space-y-6",children:[t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:t.jsx("svg",{className:"w-10 h-10 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Release Initiated!"}),t.jsxs("p",{className:"text-gray-600 text-lg mb-4",children:["Changeset created and publishing workflow started for ",r.length," package(s)"]}),t.jsxs("p",{className:"text-gray-500 text-sm",children:["Initiated on ",i]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"What Happens Next"}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"1. Changeset Created"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"A changeset has been created with your release information"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsx("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"2. Publishing Workflow Started"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"GitHub Actions workflow has been triggered to publish your packages"})]})]}),t.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-blue-50 rounded-lg",children:[t.jsx("div",{className:"flex-shrink-0 text-blue-600 mt-0.5",children:t.jsxs("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:[t.jsx("path",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),t.jsx("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]})}),t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-blue-900",children:"3. Monitor Progress"}),t.jsx("p",{className:"text-sm text-blue-700 mt-1",children:"Check GitHub Actions for the workflow status and npm registry for package updates"})]})]})]})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Packages Released"}),t.jsx("div",{className:"space-y-2",children:r.map(c=>t.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-gray-900",children:c.name}),t.jsxs("p",{className:"flex items-center gap-2 text-sm text-gray-500",children:["v",c.currentVersion," ",t.jsx(va,{})," v",c.newVersion]})]}),t.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-800",children:c.bumpType.charAt(0).toUpperCase()+c.bumpType.slice(1)})]},c.name))})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-4",children:"Changelog Summary"}),t.jsx("div",{className:"p-4 bg-gray-50 rounded-lg",children:t.jsx("p",{className:"text-gray-700 whitespace-pre-wrap",children:s})})]}),t.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[t.jsx("h4",{className:"font-medium text-blue-900 mb-2",children:"Next Steps"}),t.jsxs("ul",{className:"text-sm text-blue-700 space-y-2",children:[t.jsx("li",{children:"Changeset created and committed"}),t.jsx("li",{children:"Package versions updated"}),t.jsx("li",{children:"Release pipeline triggered"}),t.jsx("li",{children:"GitHub release created (in progress)"}),t.jsx("li",{children:"npm registry will be updated shortly"})]})]}),t.jsx("div",{className:"flex gap-3 justify-center",children:t.jsx("button",{onClick:l,className:"px-8 py-3 bg-primary-600 text-white rounded-lg font-medium hover:bg-primary-700 transition",children:"Release Another Package"})}),t.jsxs("div",{className:"border-t pt-6 flex gap-4 justify-center",children:[t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View Release on GitHub ",t.jsx(va,{})]}),t.jsxs("a",{href:"#",className:"flex items-center gap-2 gap-2 text-primary-600 hover:text-primary-700 font-medium text-sm",children:["View on npm ",t.jsx(va,{})]})]})]})}function f2({message:r="Loading..."}){return t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-gray-200 border-t-primary-500 animate-spin mb-4"}),t.jsx("p",{className:"text-gray-600",children:r})]})}function h2({error:r,onRetry:s}){return t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:t.jsxs("div",{className:"flex items-start",children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),t.jsxs("div",{className:"ml-3 flex-1",children:[t.jsx("h3",{className:"text-lg font-medium text-red-800",children:"Error"}),t.jsx("p",{className:"mt-2 text-sm text-red-700",children:r}),t.jsx("button",{onClick:s,className:"mt-4 px-4 py-2 bg-red-600 text-white rounded-lg font-medium hover:bg-red-700 transition",children:"Try Again"})]})]})})}function p2(){const{isAuthenticated:r,hasPermission:s}=zr(),[l,i]=w.useState("select"),[c,d]=w.useState([]),[m,p]=w.useState(""),[h,g]=w.useState(!1),[v,y]=w.useState(null),[k,M]=w.useState(null),[N,R]=w.useState([]),[b,D]=w.useState([]);w.useEffect(()=>{L()},[]);const L=async()=>{try{g(!0);const ee=await Te.get(Re.PUBLISH.PACKAGES);if(ee.success)R(ee.data.packages||[]);else{console.warn("Failed to fetch packages:",ee.error?.message);const ue=await Te.get(Re.PACKAGES.LIST);ue.success&&R(ue.data||[])}const ve=await Te.get(Re.PUBLISH.CHANGESETS);ve.success?D(ve.data.changesets||[]):(ve.error?.status===401||ve.error?.status===403)&&(window.location.href="/login"),y(null)}catch(ee){const ve=ee instanceof Error?ee.message:be.FAILED_TO_FETCH_PACKAGES;y(ve),console.error("Error fetching workspace data:",ee)}finally{g(!1)}},P=ee=>{const ve=ee.map(ue=>({name:ue.name,currentVersion:ue.version,newVersion:ue.version,bumpType:"patch",affectedDependencies:ue.dependents||[]}));d(ve),i("bump")},U=ee=>{d(ee),i("preview")},Q=ee=>{p(ee),de(c,ee)},de=async(ee,ve)=>{try{g(!0);const ue=await Te.post(Re.PUBLISH.PREVIEW,{packages:ee.map(me=>me.name),bumps:ee.map(me=>({package:me.name,bumpType:me.bumpType})),summary:ve});if(!ue.success)throw new Error(be.VALIDATION_FAILED);const ge=ue.data,Ie={isValid:ge.isValid??!0,errors:ge.errors??[],warnings:ge.warnings??[],checks:ge.checks??{permissions:!0,workingTreeClean:!0,ciPassing:!0,versionAvailable:!0}};M(Ie),i("validate"),y(null)}catch(ue){const ge=ue instanceof Error?ue.message:"Validation error";y(ge),console.error("Validation error:",ue)}finally{g(!1)}},Y=async()=>{try{if(!s("maintain")){y(be.PERMISSION_ERROR);return}if(g(!0),!(await Te.post(Re.PUBLISH.CHANGESETS,{packages:c.map(ue=>ue.name),bumps:c.map(ue=>({package:ue.name,bumpType:ue.bumpType})),summary:m})).success)throw new Error(be.FAILED_TO_CREATE_CHANGESET);if(!(await Te.post(Re.PUBLISH.TRIGGER,{packages:c})).success)throw new Error(be.FAILED_TO_TRIGGER_PUBLISH);i("confirm"),y(null)}catch(ee){const ve=ee instanceof Error?ee.message:"Publishing error";y(ve)}finally{g(!1)}},Z=()=>{i("select"),d([]),p(""),M(null),y(null),L()};if(!r)return t.jsx("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg",children:t.jsx("p",{className:"text-yellow-800",children:"Please log in to access release management."})});if(h&&l==="select"&&N.length===0)return t.jsx(f2,{message:"Loading workspace packages..."});if(v&&l==="select")return t.jsx(h2,{error:v,onRetry:L});const we=s("write"),Se=s("maintain");return t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Release Manager"}),t.jsx("p",{className:"text-gray-600 mt-1",children:"Manage package versions and publish releases with Changesets"})]}),t.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",["select","bump","preview","validate","confirm"].indexOf(l)+1," of 5"]})]}),!we&&t.jsxs("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[t.jsx("p",{className:"text-yellow-700 font-medium",children:" Limited Access"}),t.jsx("p",{className:"text-yellow-600 text-sm mt-1",children:"You do not have write permission to create and publish changesets. Contact your repository administrator to request access."})]}),v&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Error"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:v})]}),b.length>0&&l==="select"&&t.jsxs("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[t.jsxs("p",{className:"text-blue-700 font-medium",children:[b.length," unpublished changeset(s) detected"]}),t.jsx("p",{className:"text-blue-600 text-sm mt-1",children:"Consider reviewing existing changesets before creating new ones"})]}),l==="select"&&!we&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have write permission to create changesets. Contact your repository administrator."})]}),l==="select"&&we&&t.jsx(i2,{packages:N,onConfirm:P,loading:h}),l==="bump"&&we&&t.jsx(c2,{packages:c,onConfirm:U,onBack:()=>i("select")}),l==="preview"&&we&&t.jsx(u2,{packages:c,existingChangesets:b,onConfirm:Q,onBack:()=>i("bump"),loading:h}),l==="validate"&&!Se&&t.jsxs("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:[t.jsx("p",{className:"text-red-700 font-medium",children:"Access Denied"}),t.jsx("p",{className:"text-red-600 text-sm mt-1",children:"You do not have maintain permission to publish changesets. Contact your repository administrator."})]}),l==="validate"&&Se&&k&&t.jsx(d2,{validation:k,packages:c,onConfirm:Y,onBack:()=>i("preview"),loading:h}),l==="confirm"&&t.jsx(m2,{packages:c,summary:m,onReset:Z}),t.jsx("div",{className:"flex gap-2 justify-center",children:["select","bump","preview","validate","confirm"].map((ee,ve)=>t.jsx("div",{className:`h-2 flex-1 rounded-full transition-colors ${["select","bump","preview","validate","confirm"].indexOf(l)>=ve?"bg-primary-500":"bg-gray-300"}`},ee))})]})}const{entries:Nh,setPrototypeOf:cf,isFrozen:x2,getPrototypeOf:g2,getOwnPropertyDescriptor:y2}=Object;let{freeze:jt,seal:Jt,create:vc}=Object,{apply:jc,construct:wc}=typeof Reflect<"u"&&Reflect;jt||(jt=function(s){return s});Jt||(Jt=function(s){return s});jc||(jc=function(s,l){for(var i=arguments.length,c=new Array(i>2?i-2:0),d=2;d<i;d++)c[d-2]=arguments[d];return s.apply(l,c)});wc||(wc=function(s){for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return new s(...i)});const Hl=wt(Array.prototype.forEach),v2=wt(Array.prototype.lastIndexOf),uf=wt(Array.prototype.pop),ha=wt(Array.prototype.push),j2=wt(Array.prototype.splice),Kl=wt(String.prototype.toLowerCase),nc=wt(String.prototype.toString),rc=wt(String.prototype.match),pa=wt(String.prototype.replace),w2=wt(String.prototype.indexOf),N2=wt(String.prototype.trim),un=wt(Object.prototype.hasOwnProperty),vt=wt(RegExp.prototype.test),xa=b2(TypeError);function wt(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var l=arguments.length,i=new Array(l>1?l-1:0),c=1;c<l;c++)i[c-1]=arguments[c];return jc(r,s,i)}}function b2(r){return function(){for(var s=arguments.length,l=new Array(s),i=0;i<s;i++)l[i]=arguments[i];return wc(r,l)}}function ke(r,s){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Kl;cf&&cf(r,null);let i=s.length;for(;i--;){let c=s[i];if(typeof c=="string"){const d=l(c);d!==c&&(x2(s)||(s[i]=d),c=d)}r[c]=!0}return r}function S2(r){for(let s=0;s<r.length;s++)un(r,s)||(r[s]=null);return r}function vn(r){const s=vc(null);for(const[l,i]of Nh(r))un(r,l)&&(Array.isArray(i)?s[l]=S2(i):i&&typeof i=="object"&&i.constructor===Object?s[l]=vn(i):s[l]=i);return s}function ga(r,s){for(;r!==null;){const i=y2(r,s);if(i){if(i.get)return wt(i.get);if(typeof i.value=="function")return wt(i.value)}r=g2(r)}function l(){return null}return l}const df=jt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),sc=jt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ac=jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C2=jt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),lc=jt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),E2=jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mf=jt(["#text"]),ff=jt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ic=jt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hf=jt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$l=jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k2=Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),T2=Jt(/<%[\w\W]*|[\w\W]*%>/gm),R2=Jt(/\$\{[\w\W]*/gm),_2=Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),A2=Jt(/^aria-[\-\w]+$/),bh=Jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),P2=Jt(/^(?:\w+script|data):/i),L2=Jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sh=Jt(/^html$/i),O2=Jt(/^[a-z][.\w]*(-[.\w]+)+$/i);var pf=Object.freeze({__proto__:null,ARIA_ATTR:A2,ATTR_WHITESPACE:L2,CUSTOM_ELEMENT:O2,DATA_ATTR:_2,DOCTYPE_NAME:Sh,ERB_EXPR:T2,IS_ALLOWED_URI:bh,IS_SCRIPT_OR_DATA:P2,MUSTACHE_EXPR:k2,TMPLIT_EXPR:R2});const ya={element:1,text:3,progressingInstruction:7,comment:8,document:9},I2=function(){return typeof window>"u"?null:window},M2=function(s,l){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let i=null;const c="data-tt-policy-suffix";l&&l.hasAttribute(c)&&(i=l.getAttribute(c));const d="dompurify"+(i?"#"+i:"");try{return s.createPolicy(d,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},xf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ch(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I2();const s=ce=>Ch(ce);if(s.version="3.3.1",s.removed=[],!r||!r.document||r.document.nodeType!==ya.document||!r.Element)return s.isSupported=!1,s;let{document:l}=r;const i=l,c=i.currentScript,{DocumentFragment:d,HTMLTemplateElement:m,Node:p,Element:h,NodeFilter:g,NamedNodeMap:v=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:y,DOMParser:k,trustedTypes:M}=r,N=h.prototype,R=ga(N,"cloneNode"),b=ga(N,"remove"),D=ga(N,"nextSibling"),L=ga(N,"childNodes"),P=ga(N,"parentNode");if(typeof m=="function"){const ce=l.createElement("template");ce.content&&ce.content.ownerDocument&&(l=ce.content.ownerDocument)}let U,Q="";const{implementation:de,createNodeIterator:Y,createDocumentFragment:Z,getElementsByTagName:we}=l,{importNode:Se}=i;let ee=xf();s.isSupported=typeof Nh=="function"&&typeof P=="function"&&de&&de.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ve,ERB_EXPR:ue,TMPLIT_EXPR:ge,DATA_ATTR:Ie,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:Ne,ATTR_WHITESPACE:K,CUSTOM_ELEMENT:ae}=pf;let{IS_ALLOWED_URI:J}=pf,E=null;const F=ke({},[...df,...sc,...ac,...lc,...mf]);let re=null;const z=ke({},[...ff,...ic,...hf,...$l]);let W=Object.seal(vc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,ie=null;const xe=Object.seal(vc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ae=!0,Le=!0,Bt=!1,jn=!0,et=!1,xt=!0,At=!1,wn=!1,gr=!1,Nn=!1,Bn=!1,mn=!1,bn=!0,Hr=!1;const _a="user-content-";let $r=!0,zn=!1,Sn={},Nt=null;const Hn=ke({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Cs=null;const $n=ke({},["audio","video","img","source","image","track"]);let Cn=null;const Aa=ke({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yr="http://www.w3.org/1998/Math/MathML",vr="http://www.w3.org/2000/svg",Xt="http://www.w3.org/1999/xhtml";let fn=Xt,jr=!1,wr=null;const Es=ke({},[yr,vr,Xt],nc);let Vn=ke({},["mi","mo","mn","ms","mtext"]),Zt=ke({},["annotation-xml"]);const Wn=ke({},["title","style","font","a","script"]);let Gn=null;const Pa=["application/xhtml+xml","text/html"],La="text/html";let $e=null,En=null;const ks=l.createElement("form"),Ts=function(C){return C instanceof RegExp||C instanceof Function},kn=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(En&&En===C)){if((!C||typeof C!="object")&&(C={}),C=vn(C),Gn=Pa.indexOf(C.PARSER_MEDIA_TYPE)===-1?La:C.PARSER_MEDIA_TYPE,$e=Gn==="application/xhtml+xml"?nc:Kl,E=un(C,"ALLOWED_TAGS")?ke({},C.ALLOWED_TAGS,$e):F,re=un(C,"ALLOWED_ATTR")?ke({},C.ALLOWED_ATTR,$e):z,wr=un(C,"ALLOWED_NAMESPACES")?ke({},C.ALLOWED_NAMESPACES,nc):Es,Cn=un(C,"ADD_URI_SAFE_ATTR")?ke(vn(Aa),C.ADD_URI_SAFE_ATTR,$e):Aa,Cs=un(C,"ADD_DATA_URI_TAGS")?ke(vn($n),C.ADD_DATA_URI_TAGS,$e):$n,Nt=un(C,"FORBID_CONTENTS")?ke({},C.FORBID_CONTENTS,$e):Hn,q=un(C,"FORBID_TAGS")?ke({},C.FORBID_TAGS,$e):vn({}),ie=un(C,"FORBID_ATTR")?ke({},C.FORBID_ATTR,$e):vn({}),Sn=un(C,"USE_PROFILES")?C.USE_PROFILES:!1,Ae=C.ALLOW_ARIA_ATTR!==!1,Le=C.ALLOW_DATA_ATTR!==!1,Bt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,jn=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,et=C.SAFE_FOR_TEMPLATES||!1,xt=C.SAFE_FOR_XML!==!1,At=C.WHOLE_DOCUMENT||!1,Nn=C.RETURN_DOM||!1,Bn=C.RETURN_DOM_FRAGMENT||!1,mn=C.RETURN_TRUSTED_TYPE||!1,gr=C.FORCE_BODY||!1,bn=C.SANITIZE_DOM!==!1,Hr=C.SANITIZE_NAMED_PROPS||!1,$r=C.KEEP_CONTENT!==!1,zn=C.IN_PLACE||!1,J=C.ALLOWED_URI_REGEXP||bh,fn=C.NAMESPACE||Xt,Vn=C.MATHML_TEXT_INTEGRATION_POINTS||Vn,Zt=C.HTML_INTEGRATION_POINTS||Zt,W=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&Ts(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&Ts(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),et&&(Le=!1),Bn&&(Nn=!0),Sn&&(E=ke({},mf),re=[],Sn.html===!0&&(ke(E,df),ke(re,ff)),Sn.svg===!0&&(ke(E,sc),ke(re,ic),ke(re,$l)),Sn.svgFilters===!0&&(ke(E,ac),ke(re,ic),ke(re,$l)),Sn.mathMl===!0&&(ke(E,lc),ke(re,hf),ke(re,$l))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?xe.tagCheck=C.ADD_TAGS:(E===F&&(E=vn(E)),ke(E,C.ADD_TAGS,$e))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?xe.attributeCheck=C.ADD_ATTR:(re===z&&(re=vn(re)),ke(re,C.ADD_ATTR,$e))),C.ADD_URI_SAFE_ATTR&&ke(Cn,C.ADD_URI_SAFE_ATTR,$e),C.FORBID_CONTENTS&&(Nt===Hn&&(Nt=vn(Nt)),ke(Nt,C.FORBID_CONTENTS,$e)),C.ADD_FORBID_CONTENTS&&(Nt===Hn&&(Nt=vn(Nt)),ke(Nt,C.ADD_FORBID_CONTENTS,$e)),$r&&(E["#text"]=!0),At&&ke(E,["html","head","body"]),E.table&&(ke(E,["tbody"]),delete q.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw xa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');U=C.TRUSTED_TYPES_POLICY,Q=U.createHTML("")}else U===void 0&&(U=M2(M,c)),U!==null&&typeof Q=="string"&&(Q=U.createHTML(""));jt&&jt(C),En=C}},Vr=ke({},[...sc,...ac,...C2]),Kn=ke({},[...lc,...E2]),mi=function(C){let V=P(C);(!V||!V.tagName)&&(V={namespaceURI:fn,tagName:"template"});const se=Kl(C.tagName),Me=Kl(V.tagName);return wr[C.namespaceURI]?C.namespaceURI===vr?V.namespaceURI===Xt?se==="svg":V.namespaceURI===yr?se==="svg"&&(Me==="annotation-xml"||Vn[Me]):!!Vr[se]:C.namespaceURI===yr?V.namespaceURI===Xt?se==="math":V.namespaceURI===vr?se==="math"&&Zt[Me]:!!Kn[se]:C.namespaceURI===Xt?V.namespaceURI===vr&&!Zt[Me]||V.namespaceURI===yr&&!Vn[Me]?!1:!Kn[se]&&(Wn[se]||!Vr[se]):!!(Gn==="application/xhtml+xml"&&wr[C.namespaceURI]):!1},ct=function(C){ha(s.removed,{element:C});try{P(C).removeChild(C)}catch{b(C)}},zt=function(C,V){try{ha(s.removed,{attribute:V.getAttributeNode(C),from:V})}catch{ha(s.removed,{attribute:null,from:V})}if(V.removeAttribute(C),C==="is")if(Nn||Bn)try{ct(V)}catch{}else try{V.setAttribute(C,"")}catch{}},Nr=function(C){let V=null,se=null;if(gr)C="<remove></remove>"+C;else{const Ve=rc(C,/^[\r\n\t ]+/);se=Ve&&Ve[0]}Gn==="application/xhtml+xml"&&fn===Xt&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");const Me=U?U.createHTML(C):C;if(fn===Xt)try{V=new k().parseFromString(Me,Gn)}catch{}if(!V||!V.documentElement){V=de.createDocument(fn,"template",null);try{V.documentElement.innerHTML=jr?Q:Me}catch{}}const Ce=V.body||V.documentElement;return C&&se&&Ce.insertBefore(l.createTextNode(se),Ce.childNodes[0]||null),fn===Xt?we.call(V,At?"html":"body")[0]:At?V.documentElement:Ce},Wr=function(C){return Y.call(C.ownerDocument||C,C,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},Rs=function(C){return C instanceof y&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof v)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Oa=function(C){return typeof p=="function"&&C instanceof p};function en(ce,C,V){Hl(ce,se=>{se.call(s,C,V,En)})}const hn=function(C){let V=null;if(en(ee.beforeSanitizeElements,C,null),Rs(C))return ct(C),!0;const se=$e(C.nodeName);if(en(ee.uponSanitizeElement,C,{tagName:se,allowedTags:E}),xt&&C.hasChildNodes()&&!Oa(C.firstElementChild)&&vt(/<[/\w!]/g,C.innerHTML)&&vt(/<[/\w!]/g,C.textContent)||C.nodeType===ya.progressingInstruction||xt&&C.nodeType===ya.comment&&vt(/<[/\w]/g,C.data))return ct(C),!0;if(!(xe.tagCheck instanceof Function&&xe.tagCheck(se))&&(!E[se]||q[se])){if(!q[se]&&As(se)&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,se)||W.tagNameCheck instanceof Function&&W.tagNameCheck(se)))return!1;if($r&&!Nt[se]){const Me=P(C)||C.parentNode,Ce=L(C)||C.childNodes;if(Ce&&Me){const Ve=Ce.length;for(let tt=Ve-1;tt>=0;--tt){const Ht=R(Ce[tt],!0);Ht.__removalCount=(C.__removalCount||0)+1,Me.insertBefore(Ht,D(C))}}}return ct(C),!0}return C instanceof h&&!mi(C)||(se==="noscript"||se==="noembed"||se==="noframes")&&vt(/<\/no(script|embed|frames)/i,C.innerHTML)?(ct(C),!0):(et&&C.nodeType===ya.text&&(V=C.textContent,Hl([ve,ue,ge],Me=>{V=pa(V,Me," ")}),C.textContent!==V&&(ha(s.removed,{element:C.cloneNode()}),C.textContent=V)),en(ee.afterSanitizeElements,C,null),!1)},_s=function(C,V,se){if(bn&&(V==="id"||V==="name")&&(se in l||se in ks))return!1;if(!(Le&&!ie[V]&&vt(Ie,V))){if(!(Ae&&vt(me,V))){if(!(xe.attributeCheck instanceof Function&&xe.attributeCheck(V,C))){if(!re[V]||ie[V]){if(!(As(C)&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,C)||W.tagNameCheck instanceof Function&&W.tagNameCheck(C))&&(W.attributeNameCheck instanceof RegExp&&vt(W.attributeNameCheck,V)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(V,C))||V==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&vt(W.tagNameCheck,se)||W.tagNameCheck instanceof Function&&W.tagNameCheck(se))))return!1}else if(!Cn[V]){if(!vt(J,pa(se,K,""))){if(!((V==="src"||V==="xlink:href"||V==="href")&&C!=="script"&&w2(se,"data:")===0&&Cs[C])){if(!(Bt&&!vt(Ne,pa(se,K,"")))){if(se)return!1}}}}}}}return!0},As=function(C){return C!=="annotation-xml"&&rc(C,ae)},Ia=function(C){en(ee.beforeSanitizeAttributes,C,null);const{attributes:V}=C;if(!V||Rs(C))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:re,forceKeepAttr:void 0};let Me=V.length;for(;Me--;){const Ce=V[Me],{name:Ve,namespaceURI:tt,value:Ht}=Ce,tn=$e(Ve),Ps=Ht;let Ye=Ve==="value"?Ps:N2(Ps);if(se.attrName=tn,se.attrValue=Ye,se.keepAttr=!0,se.forceKeepAttr=void 0,en(ee.uponSanitizeAttribute,C,se),Ye=se.attrValue,Hr&&(tn==="id"||tn==="name")&&(zt(Ve,C),Ye=_a+Ye),xt&&vt(/((--!?|])>)|<\/(style|title|textarea)/i,Ye)){zt(Ve,C);continue}if(tn==="attributename"&&rc(Ye,"href")){zt(Ve,C);continue}if(se.forceKeepAttr)continue;if(!se.keepAttr){zt(Ve,C);continue}if(!jn&&vt(/\/>/i,Ye)){zt(Ve,C);continue}et&&Hl([ve,ue,ge],Pt=>{Ye=pa(Ye,Pt," ")});const br=$e(C.nodeName);if(!_s(br,tn,Ye)){zt(Ve,C);continue}if(U&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!tt)switch(M.getAttributeType(br,tn)){case"TrustedHTML":{Ye=U.createHTML(Ye);break}case"TrustedScriptURL":{Ye=U.createScriptURL(Ye);break}}if(Ye!==Ps)try{tt?C.setAttributeNS(tt,Ve,Ye):C.setAttribute(Ve,Ye),Rs(C)?ct(C):uf(s.removed)}catch{zt(Ve,C)}}en(ee.afterSanitizeAttributes,C,null)},Ma=function ce(C){let V=null;const se=Wr(C);for(en(ee.beforeSanitizeShadowDOM,C,null);V=se.nextNode();)en(ee.uponSanitizeShadowNode,V,null),hn(V),Ia(V),V.content instanceof d&&ce(V.content);en(ee.afterSanitizeShadowDOM,C,null)};return s.sanitize=function(ce){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=null,se=null,Me=null,Ce=null;if(jr=!ce,jr&&(ce="<!-->"),typeof ce!="string"&&!Oa(ce))if(typeof ce.toString=="function"){if(ce=ce.toString(),typeof ce!="string")throw xa("dirty is not a string, aborting")}else throw xa("toString is not a function");if(!s.isSupported)return ce;if(wn||kn(C),s.removed=[],typeof ce=="string"&&(zn=!1),zn){if(ce.nodeName){const Ht=$e(ce.nodeName);if(!E[Ht]||q[Ht])throw xa("root node is forbidden and cannot be sanitized in-place")}}else if(ce instanceof p)V=Nr("<!---->"),se=V.ownerDocument.importNode(ce,!0),se.nodeType===ya.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?V=se:V.appendChild(se);else{if(!Nn&&!et&&!At&&ce.indexOf("<")===-1)return U&&mn?U.createHTML(ce):ce;if(V=Nr(ce),!V)return Nn?null:mn?Q:""}V&&gr&&ct(V.firstChild);const Ve=Wr(zn?ce:V);for(;Me=Ve.nextNode();)hn(Me),Ia(Me),Me.content instanceof d&&Ma(Me.content);if(zn)return ce;if(Nn){if(Bn)for(Ce=Z.call(V.ownerDocument);V.firstChild;)Ce.appendChild(V.firstChild);else Ce=V;return(re.shadowroot||re.shadowrootmode)&&(Ce=Se.call(i,Ce,!0)),Ce}let tt=At?V.outerHTML:V.innerHTML;return At&&E["!doctype"]&&V.ownerDocument&&V.ownerDocument.doctype&&V.ownerDocument.doctype.name&&vt(Sh,V.ownerDocument.doctype.name)&&(tt="<!DOCTYPE "+V.ownerDocument.doctype.name+`>
18
- `+tt),et&&Hl([ve,ue,ge],Ht=>{tt=pa(tt,Ht," ")}),U&&mn?U.createHTML(tt):tt},s.setConfig=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kn(ce),wn=!0},s.clearConfig=function(){En=null,wn=!1},s.isValidAttribute=function(ce,C,V){En||kn({});const se=$e(ce),Me=$e(C);return _s(se,Me,V)},s.addHook=function(ce,C){typeof C=="function"&&ha(ee[ce],C)},s.removeHook=function(ce,C){if(C!==void 0){const V=v2(ee[ce],C);return V===-1?void 0:j2(ee[ce],V,1)[0]}return uf(ee[ce])},s.removeHooks=function(ce){ee[ce]=[]},s.removeAllHooks=function(){ee=xf()},s}var D2=Ch();function F2(r){const s=/\u001b\[([0-9;]*m|K)|(\u001b\(B|\u001b\[m)/g;let l="",i={};const c=Array.from(r.matchAll(s)),d={30:"#000000",31:"#e06c75",32:"#98c379",33:"#e5c07b",34:"#61afef",35:"#c678dd",36:"#56b6c2",37:"#abb2bf"},m={90:"#5c6370",91:"#ff7b86",92:"#98c379",93:"#e5c07b",94:"#61afef",95:"#c678dd",96:"#56b6c2",97:"#ffffff"};let p=0,h="";for(const v of c){const y=r.substring(p,v.index);h+=gf(y);const k=v[1];if(p=v.index+v[0].length,k==="m"||k==="0m")h&&(l+=oc(h,i),h=""),i={};else if(k==="1m")i.fontWeight="bold";else if(k==="2m")i.opacity="0.5";else if(k==="3m")i.fontStyle="italic";else if(k==="4m")i.textDecoration="underline";else if(k.includes(";")){const M=k.split(";").filter(N=>N);for(const N of M){const R=parseInt(N);if(R===0)h&&(l+=oc(h,i),h=""),i={};else if(R===1)i.fontWeight="bold";else if(R===2)i.opacity="0.5";else if(R===3)i.fontStyle="italic";else if(R===4)i.textDecoration="underline";else if(d[R])i.color=d[R];else if(m[R])i.color=m[R];else if(R>=40&&R<=47){const b=d[R-10];b&&(i.backgroundColor=b)}else if(R>=100&&R<=107){const b=m[R-60];b&&(i.backgroundColor=b)}}}else{const M=parseInt(k);d[M]?i.color=d[M]:m[M]&&(i.color=m[M])}}const g=r.substring(p);return h+=gf(g),h&&(l+=oc(h,i)),l}function gf(r){const s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,l=>s[l])}function oc(r,s){return!r||Object.keys(s).length===0?r:`<span style="${Object.entries(s).map(([i,c])=>`${i.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${c}`).join("; ")}">${r}</span>`}function U2(r,s){if(r==="completed"){if(s==="success")return t.jsx(Dt,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(ri,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Qt,{className:"h-6 w-6 text-gray-600"})}return t.jsx(Je,{className:"h-6 w-6 text-blue-600"})}function Eh({step:r,onToggle:s,expandedSteps:l,stepIndex:i}){const c=w.useRef(null),[d,m]=w.useState(!1),p=l.has(r.stepNumber),h=r.children&&r.children.length>0||r.logs.length>0,g=w.useMemo(()=>d?r.logs:r.logs.slice(0,1e3),[r.logs,d]);w.useEffect(()=>{if(r.status==="in_progress"&&p&&c.current){const k=c.current;k.scrollTop=k.scrollHeight}},[r.logs.length,p,r.status]);const v=w.useMemo(()=>!r.startedAt||!r.completedAt?0:Math.round((new Date(r.completedAt).getTime()-new Date(r.startedAt).getTime())/100)/10,[r.startedAt,r.completedAt]),y={marginLeft:`${r.level*20}px`};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"border-b border-gray-200 bg-white",style:y,children:[t.jsxs("button",{onClick:()=>s(r.stepNumber),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-gray-50 transition-colors group",children:[t.jsx("span",{className:"text-gray-400 group-hover:text-gray-600 flex-shrink-0",children:h?p?t.jsx(zx,{className:"h-5 w-5"}):t.jsx(Hx,{className:"h-5 w-5"}):t.jsx("span",{className:"h-5 w-5"})}),t.jsx("span",{className:"text-xs font-bold text-gray-500 bg-gray-100 rounded px-2 py-1 min-w-fit",children:i+1}),t.jsx("span",{className:"flex-1 text-left",children:t.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r.stepName})}),t.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[r.status==="in_progress"&&t.jsx("span",{className:"flex h-2 w-2 rounded-full bg-blue-500 animate-pulse"}),t.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:[v,"s"]})]})]}),p&&r.logs.length>0&&t.jsx("div",{className:"border-t border-gray-200 bg-[#0d1117]",children:t.jsxs("div",{ref:c,className:"text-gray-300 font-mono text-xs max-h-[600px] overflow-y-auto",children:[g.length===0?t.jsx("div",{className:"px-10 py-6 italic text-gray-500 text-center",children:"No logs available yet"}):t.jsx("div",{className:"py-2 px-0",children:g.map((k,M)=>t.jsxs("div",{className:"flex hover:bg-gray-800/40 transition-colors leading-6 group",children:[t.jsx("span",{className:"w-12 text-right pr-4 text-gray-600 select-none border-r border-gray-800 flex-shrink-0 group-hover:bg-gray-800/20",children:k.lineNumber}),t.jsx("span",{className:"pl-4 pr-3 text-gray-500 select-none opacity-50 text-xs flex-shrink-0",children:k.timestamp.split("T")[1]?.slice(0,8)}),t.jsx("span",{className:"flex-1 whitespace-pre break-all pr-4 text-gray-300",dangerouslySetInnerHTML:{__html:D2.sanitize(F2(k.ansiContent))}})]},`${r.stepNumber}-${k.lineNumber}`))}),!d&&r.logs.length>1e3&&t.jsx("div",{className:"px-4 py-2 border-t border-gray-800 text-center",children:t.jsxs("button",{onClick:()=>m(!0),className:"text-blue-400 hover:text-blue-300 text-xs font-medium transition-colors",children:["Show all ",r.logs.length," lines"]})})]})})]}),p&&r.children&&r.children.length>0&&t.jsx(t.Fragment,{children:r.children.map((k,M)=>t.jsx(Eh,{step:k,onToggle:s,expandedSteps:l,stepIndex:M},k.stepNumber))})]})}function B2({steps:r,jobName:s,jobStatus:l,jobConclusion:i,gitHubLogsUrl:c}){const[d,m]=w.useState(new Set([r[0]?.stepNumber])),p=g=>{m(v=>{const y=new Set(v);return y.has(g)?y.delete(g):y.add(g),y})},h=g=>g.reduce((v,y)=>{let k=1;return y.children&&y.children.length>0&&(k+=h(y.children)),v+k},0);return t.jsxs("div",{className:"flex flex-col h-full bg-white border border-gray-200 rounded-lg overflow-hidden",children:[t.jsxs("div",{className:"px-4 py-3 bg-gray-50 border-b border-gray-200 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-lg font-semibold ",children:U2(l,i)}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-semibold text-gray-900",children:s}),t.jsxs("p",{className:"text-xs text-gray-500",children:[h(r)," step",h(r)!==1?"s":""]})]})]}),t.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-xs px-3 py-2 bg-blue-50 text-blue-600 hover:bg-blue-100 rounded border border-blue-200 transition-colors",children:"View on GitHub"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",children:r.length===0?t.jsx("div",{className:"p-4 text-center text-gray-500",children:"No steps available"}):r.map((g,v)=>t.jsx(Eh,{step:g,onToggle:p,expandedSteps:d,stepIndex:v},g.stepNumber))})]})}function z2(r,s){if(r==="completed"){if(s==="success")return t.jsx(Dt,{className:"h-5 w-5 text-green-600"});if(s==="failure")return t.jsx(ri,{className:"h-5 w-5 text-red-600"})}return t.jsx(Je,{className:"h-5 w-5 text-yellow-600"})}function H2(r,s){if(r==="completed"){if(s==="success")return"bg-green-100 text-green-800";if(s==="failure")return"bg-red-100 text-red-800"}return"bg-yellow-100 text-yellow-800"}function $2(r){const s=new Date(r),i=Math.floor((new Date().getTime()-s.getTime())/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const d=Math.floor(c/60);if(d<24)return`${d}h ago`;const m=Math.floor(d/24);return m<7?`${m}d ago`:s.toLocaleDateString()}function V2({owner:r,repo:s,packageName:l,onSelectRun:i,runId:c,limit:d=10,pipelineId:m}){const[p,h]=w.useState([]),[g,v]=w.useState(!0),[y,k]=w.useState(null),[M,N]=w.useState(null),{isAuthenticated:R,hasPermission:b}=zr();w.useEffect(()=>{const P=async()=>{try{v(!0),k(null);let Q=Re.WORKFLOWS.LIST(r,s)+`?per_page=${d}`;l&&(Q=Re.WORKFLOWS.BY_PACKAGE(r,s,l));const de=await Te.get(Q);if(!de.success)throw new Error(be.FAILED_TO_FETCH_WORKFLOWS);const Y=de.data;let Z=[];if(l)if(Array.isArray(Y))Z=Y.flatMap(we=>we.runs||[]).slice(0,d);else{const we=Y;Z=(Array.isArray(we.runs)?we.runs:[]).slice(0,d)}else Z=Array.isArray(Y.runs)?Y.runs:[];h(Z)}catch(Q){k(Q instanceof Error?Q.message:be.UNKNOWN_ERROR)}finally{v(!1)}},U=setInterval(P,5e3);return P(),()=>clearInterval(U)},[r,s,l,d]);const D=async(P,U)=>{P.stopPropagation(),N(U.id);try{if((await Te.post(Re.WORKFLOWS.CANCEL(r,s,U.id),{pipelineId:m})).success)h(p.map(de=>de.id===U.id?{...de,status:"completed",conclusion:"cancelled"}:de));else throw new Error(be.FAILED_TO_CANCEL_RUN)}catch(Q){console.error("Failed to cancel run:",Q),k(Q instanceof Error?Q.message:be.FAILED_TO_CANCEL_RUN)}finally{N(null)}},L=async(P,U)=>{P.stopPropagation(),N(U.id);try{if((await Te.post(Re.WORKFLOWS.RERUN(r,s,U.id),{pipelineId:m,failedOnly:!1})).success)h(p.map(de=>de.id===U.id?{...de,status:"in_progress",conclusion:null}:de));else throw new Error(be.FAILED_TO_RERUN_WORKFLOW)}catch(Q){console.error("Failed to rerun workflow:",Q),k(Q instanceof Error?Q.message:be.FAILED_TO_RERUN_WORKFLOW)}finally{N(null)}};return g&&p.length===0?t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Je,{className:"h-6 w-6 text-blue-600"})})}):y?t.jsx("div",{className:"rounded-lg bg-red-50 p-4 border border-red-200",children:t.jsxs("p",{className:"text-sm text-red-800",children:["Error: ",y]})}):t.jsx("div",{className:"space-y-2",children:!p||p.length===0?t.jsx("p",{className:"text-sm text-gray-500 py-4",children:"No workflow runs found"}):p.map(P=>t.jsxs("div",{className:`text-left p-3 rounded-lg border transition-colors ${c===P.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:[t.jsx("button",{onClick:()=>i?.(P.id),className:"w-full text-left",children:t.jsxs("div",{className:"flex items-start gap-2",children:[z2(P.status,P.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900",children:P.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${H2(P.status,P.conclusion)}`,children:P.conclusion??P.status}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["Branch: ",P.head_branch]}),t.jsx("span",{children:" • "}),t.jsxs("span",{children:["by ",P.actor.login]}),t.jsx("span",{children:" • "}),t.jsx("span",{children:$2(P.created_at)})]})]})]})}),b("maintain")&&t.jsxs("div",{className:"flex gap-2 mt-3",children:[P.status==="in_progress"&&t.jsx("button",{onClick:U=>D(U,P),disabled:M===P.id,className:"flex-1 px-3 py-2 text-sm font-medium text-red-700 bg-red-50 border border-red-200 rounded hover:bg-red-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Cancel this workflow run",children:M===P.id?"Cancelling...":"Cancel Run"}),(P.conclusion==="cancelled"||P.conclusion==="failure")&&t.jsx("button",{onClick:U=>L(U,P),disabled:M===P.id,className:"flex-1 px-3 py-2 text-sm font-medium text-blue-700 bg-blue-50 border border-blue-200 rounded hover:bg-blue-100 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",title:"Rerun this workflow",children:M===P.id?"Rerunning...":"Rerun"})]})]},P.id))})}function W2({owner:r,repo:s,defaultBranch:l="main",onSuccess:i,onError:c,pipelineId:d}){const[m,p]=w.useState(!1),[h,g]=w.useState(l),[v,y]=w.useState({}),[k,M]=w.useState(!1),[N,R]=w.useState(null),[b,D]=w.useState([]),[L,P]=w.useState(),[U,Q]=w.useState(!1);w.useEffect(()=>{m&&b.length===0&&de()},[m]);const de=async()=>{try{Q(!0);const Z=await Te.get(Re.WORKFLOWS.AVAILABLE(r,s));Z.success&&(D(Z.data.workflows||[]),Z.data.workflows?.length>0&&!L&&P(Z.data.workflows[0].path))}catch(Z){console.error("Failed to fetch workflows:",Z)}finally{Q(!1)}},Y=async()=>{try{M(!0),R(null);const Z=await Te.post(Re.WORKFLOWS.TRIGGER(r,s),{workflow:L,ref:h,inputs:v,pipelineId:d,workflowId:b.find(Se=>Se.path==L)?.id??""});if(!Z.success)throw new Error(be.FAILED_TO_TRIGGER_WORKFLOW);const we=Z.data;if(we.success)i?.(we.runUrl||`https://github.com/${r}/${s}/actions`),p(!1),g(l),y({});else throw new Error(we.message||be.FAILED_TO_TRIGGER_WORKFLOW)}catch(Z){const we=Z instanceof Error?Z.message:be.UNKNOWN_ERROR;R(we),c?.(we)}finally{M(!1)}};return t.jsxs("div",{className:"relative",children:[t.jsxs("button",{onClick:()=>p(!m),disabled:k,className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[t.jsx(ni,{className:"h-4 w-4"}),"Trigger Workflow"]}),m&&t.jsxs("div",{className:"absolute right-0 mt-2 w-96 bg-white border border-gray-200 rounded-lg shadow-lg z-10 p-6",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Trigger Workflow"}),N&&t.jsxs("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[t.jsx(ri,{className:"h-5 w-5 text-red-600 flex-shrink-0 mt-0.5"}),t.jsx("p",{className:"text-sm text-red-700",children:N})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Workflow"}),U?t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-500",children:"Loading workflows..."}):b.length>0?t.jsx("select",{value:L,onChange:Z=>P(Z.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",children:b.map(Z=>t.jsxs("option",{value:Z.path,children:[Z.name," (",Z.path,")"]},Z.id))}):t.jsx("div",{className:"w-full px-3 py-2 border border-gray-300 rounded-lg bg-yellow-50 text-yellow-700 text-sm",children:"No workflows available"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Branch"}),t.jsx("input",{type:"text",value:h,onChange:Z=>g(Z.target.value),placeholder:"main",className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex gap-2 pt-4",children:[t.jsx("button",{onClick:Y,disabled:k||!h,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",children:k?"Triggering...":"Trigger"}),t.jsx("button",{onClick:()=>p(!1),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded-lg hover:bg-gray-50 transition-colors font-medium",children:"Cancel"})]})]})]})]})}const G2=()=>{try{const r=at.get("monodog_session_data");return r?JSON.parse(r).permission:null}catch(r){return console.error("Failed to parse session data",r),null}};function K2(r){const s=r.split(`
19
- `),l=[];let i=null;const c=[];for(let d=0;d<s.length;d++){const m=s[d],p=m.trim(),h=m.match(/^(\s*)/)?.[1].length||0,g=Math.floor(h/2);if(m.includes("##[group]")){const v=m.match(/##\[group\](.*?)(?:##\[endgroup\]|$)/),k={name:v?v[1].trim():`Step ${l.length+1}`,logs:[],level:g,children:[],startIndex:d};for(;c.length>0&&c[c.length-1].level>=k.level;)c.pop();if(c.length>0){const M=c[c.length-1];M.children||(M.children=[]),M.children.push(k)}else l.push(k);c.push(k),i=k}else{if(m.includes("##[endgroup]"))continue;p&&i&&i.logs.push(m)}}return l}function yf(r,s,l=!1){if(l)return t.jsx(Je,{className:"h-6 w-6 text-yellow-500 animate-spin"});if(r==="completed"){if(s==="success")return t.jsx(Dt,{className:"h-6 w-6 text-green-600"});if(s==="failure")return t.jsx(ri,{className:"h-6 w-6 text-red-600"});if(s==="cancelled")return t.jsx(Qt,{className:"h-6 w-6 text-gray-600"});if(s==="skipped")return t.jsx(Je,{className:"h-6 w-6 text-gray-600"})}return r==="in_progress"||r==="queued"?t.jsx(Je,{className:"h-6 w-6 text-blue-600"}):t.jsx(Je,{className:"h-6 w-6 text-gray-600"})}function q2({packageName:r,onNavigate:s}){const[l,i]=w.useState([]),[c,d]=w.useState(null),[m,p]=w.useState(null),[h,g]=w.useState([]),[v,y]=w.useState(null),[k,M]=w.useState(null),[N,R]=w.useState(!0),[b,D]=w.useState(null),[L,P]=w.useState(new Set),{hasPermission:U}=zr(),[Q,de]=w.useState(0),[Y,Z]=w.useState(!1),[we,Se]=w.useState(0),[ee,ve]=w.useState(!1),ue=10,ge=20,Ie=20,{owner:me,repo:Ne}=w.useMemo(()=>G2()||{},[]);w.useEffect(()=>{const z=async()=>{try{const q=Re.PIPELINES.LIST,ie=await Te.get(q);if(!ie.success){if(ie.error?.status===401||ie.error?.status===403){window.location.href="/login";return}if(ie.error?.status===404){console.warn("Pipelines endpoint not available"),i([]),R(!1);return}throw new Error(`Failed to fetch pipelines: ${ie.error?.message}`)}const xe=Array.isArray(ie.data)?ie.data:[];i(xe),xe.length>0&&!c&&d(xe[0]),R(!1)}catch(q){D(q instanceof Error?q.message:"Unknown error"),R(!1)}};z();const W=setInterval(z,5e3);return()=>clearInterval(W)},[c,me,Ne,r]),w.useEffect(()=>{const z=async()=>{try{l.forEach(async q=>{if(q.workflowId&&q.currentStatus!=="completed"&&!L.has(q.workflowId)){const ie=Re.WORKFLOWS.LIST(me,Ne)+`?workflow_id=${q.workflowId}&per_page=${ge}&page=1`,xe=await Te.get(ie);if(xe.success){const Ae=xe.data,Le=Ae.workflow_runs?.[0]||Ae.runs?.[0];if(Le){const Bt=Le.status!==q.currentStatus,jn=Le.conclusion!==q.currentConclusion;if(Bt||jn){P(et=>new Set(et).add(q.workflowId));try{const et=await Te.put(Re.PIPELINES.STATUS(q.id),{currentStatus:Le.status,currentConclusion:Le.conclusion||null,lastRunId:Le.id}),xt={...q,currentStatus:Le.status,currentConclusion:Le.conclusion||null,lastRunId:Le.id};if(console.log(xt),xt.currentStatus=="completed"){const At=await Ft.refreshPackages()}i(At=>At.map(wn=>wn.id===q.id?xt:wn))}catch(et){console.warn("Failed to update pipeline status:",et)}finally{P(et=>{const xt=new Set(et);return xt.delete(q.workflowId),xt})}}}}}})}catch(q){console.warn("Failed to poll pipeline status:",q)}};z();const W=setInterval(z,1e4);return()=>clearInterval(W)},[c,l,me,Ne]),w.useEffect(()=>{if(!m||!c)return;const z=async()=>{try{const q=await Te.get(Re.WORKFLOWS.RUNS(me,Ne,m));if(!q.success){if(q.error?.status===401||q.error?.status===403){window.location.href="/login";return}throw new Error(`Failed to fetch jobs: ${q.error?.message}`)}g(q.data.jobs||[])}catch(q){D(q instanceof Error?q.message:"Unknown error")}},W=setInterval(z,5e3);return z(),()=>clearInterval(W)},[m,me,Ne]),w.useEffect(()=>{if(!v||!c)return;const z=async()=>{try{const W=await Te.get(Re.WORKFLOWS.LOGS(me,Ne,v.gitHubJobId));if(!W.success){if(W.error?.status===403)D(be.PERMISSION_ERROR);else if(W.error?.status===401)D(fc.SESSION_EXPIRED),window.location.href="/login";else{const ie=W.error?.details||W.error?.message||"Unknown error";D(`${be.FAILED_TO_FETCH_LOGS}: ${ie}`)}return}const q=W.data;q.meta&&q.meta.isEmpty?(M(""),D(be.FAILED_TO_FETCH_LOGS)):(M(q.logs||q),D(null))}catch(W){const q=W instanceof Error?W.message:be.FAILED_TO_FETCH_LOGS;D(`${be.FAILED_TO_FETCH_LOGS}: ${q}`)}};if(z(),v.status!=="completed"){const W=setInterval(z,5e3);return()=>clearInterval(W)}},[v,me,Ne]);const K=z=>{y(z),M(null)},ae=z=>{const W=z.currentTarget;W.scrollHeight-W.scrollTop-W.clientHeight<100&&!Y&&l.length>=ue&&J()},J=async()=>{if(!Y){Z(!0);try{const z=Re.PIPELINES.LIST+`?offset=${Q+ue}&limit=${ue}`,W=await Te.get(z);if(!W.success)throw new Error("Failed to fetch more pipelines");const q=W.data;i(ie=>[...ie,...q]),de(ie=>ie+ue)}catch(z){console.error("Error loading more pipelines:",z)}finally{Z(!1)}}},E=z=>{const W=z.currentTarget;W.scrollHeight-W.scrollTop-W.clientHeight<100&&!ee&&h.length>=Ie&&m&&F()},F=async()=>{if(!(ee||!m)){ve(!0);try{const z=await Te.get(Re.WORKFLOWS.RUNS(me,Ne,m)+`?page=${Math.floor(we/Ie)+2}`);if(!z.success)throw new Error("Failed to fetch more jobs");const q=(z.data.jobs||[]).map(ie=>({id:ie.id,gitHubJobId:ie.id,name:ie.name,status:ie.status,conclusion:ie.conclusion||null,htmlUrl:ie.html_url,startedAt:ie.started_at,completedAt:ie.completed_at}));g(ie=>[...ie,...q]),Se(ie=>ie+Ie)}catch(z){console.error("Error loading more jobs:",z)}finally{ve(!1)}}},re=z=>{p(z),y(null),g([]),Se(0)};return N&&l.length===0?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Je,{className:"h-8 w-8 text-blue-600"})})}):t.jsxs("div",{children:[t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 h-[50vh] overflow-hidden",children:[t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",onScroll:ae,children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Pipelines"}),c&&U("maintain")&&t.jsx(W2,{owner:me,repo:Ne})]}),b&&t.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:t.jsx("p",{className:"text-xs text-red-700",children:b})}),t.jsx("div",{className:"space-y-2",children:l.length===0?t.jsx("p",{className:"text-sm text-gray-500",children:"No pipelines found"}):t.jsxs(t.Fragment,{children:[l.map(z=>t.jsx("button",{onClick:()=>{d(z),p(null),g([])},className:`w-full text-left p-3 rounded-lg border transition-colors ${c?.id===z.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:t.jsxs("div",{className:"flex items-start gap-2",children:[yf(z.currentStatus,z.currentConclusion||null,L.has(z.id)),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:z.packageName}),t.jsxs("p",{className:"text-xs text-gray-500",children:["v",z.releaseVersion]}),t.jsx("p",{className:"text-xs text-gray-400 mt-1",children:z.workflowName})]})]})},z.id)),Y&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Je,{className:"h-5 w-5 text-blue-600"})})})]})})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Runs"}),c&&t.jsx(V2,{owner:me,repo:Ne,packageName:r,onSelectRun:re,runId:m,limit:ge,pipelineId:c.id})]})}),t.jsx("div",{className:"lg:col-span-1 overflow-y-auto border-r border-gray-200",onScroll:E,children:t.jsxs("div",{className:"p-4 space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Jobs"}),t.jsx("div",{className:"space-y-2",children:h.length===0?t.jsx("p",{className:"text-sm text-gray-500",children:"No jobs available"}):t.jsxs(t.Fragment,{children:[h.map(z=>{const W=z.startedAt&&z.completedAt?Math.round((new Date(z.completedAt).getTime()-new Date(z.startedAt).getTime())/1e3):0;return z.status==="in_progress"||z.status,z.conclusion,t.jsx("div",{className:`rounded-lg border transition-colors ${v?.id===z.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:bg-gray-50"}`,children:t.jsx("button",{onClick:()=>K(z),className:"w-full text-left p-3",children:t.jsxs("div",{className:"flex items-start gap-2",children:[yf(z.status,z.conclusion),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium text-sm text-gray-900 truncate",children:z.name}),t.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[z.status," • ",W,"s"]})]})]})})},z.id)}),ee&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Je,{className:"h-5 w-5 text-blue-600"})})})]})})]})})]}),t.jsx("div",{className:"lg:col-span-1 overflow-hidden border-t pt-2 h-[50vh]",children:t.jsxs("div",{className:"p-4 h-full overflow-hidden flex flex-col",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Logs"}),v&&k?t.jsx(B2,{steps:(()=>{const z=K2(k);let W=0;const q=ie=>ie.map(xe=>{W++;const Ae=xe.logs.at(0)?.split(" ")[0],Le=xe.logs.at(-1)?.split(" ")[0];return{stepNumber:W,stepName:xe.name,level:xe.level,status:"",conclusion:"",startedAt:Ae,completedAt:Le,logs:xe.logs.map((Bt,jn)=>({lineNumber:jn+1,timestamp:new Date().toISOString(),content:Bt,ansiContent:Bt})),children:xe.children?q(xe.children):void 0}});return q(z)})(),jobName:v.name,jobStatus:v.status,jobConclusion:v.conclusion,gitHubLogsUrl:v.htmlUrl}):v?t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"animate-spin",children:t.jsx(Je,{className:"h-8 w-8 text-blue-600"})})}):t.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:t.jsx("p",{className:"text-sm",children:"Select a job to view logs"})})]})})]})}function Y2(){const{session:r}=zr();return r?t.jsx("div",{className:"h-screen overflow-hidden",children:t.jsx(q2,{})}):t.jsx("div",{className:"flex items-center justify-center h-screen",children:t.jsx("p",{className:"text-gray-600",children:"Please sign in to view pipelines"})})}const Q2={Dashboard:Rv,PackagesOverview:_v,PackageDetail:Av,DependencyGraph:Xv,HealthStatus:Zv,PublishControl:d1,CIIntegration:T1,ConfigInspector:l2,ReleaseManager:p2,Pipeline:Y2},J2=({componentName:r})=>{const s=Q2[r];return s?t.jsx(s,{}):t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Page Not Found"}),t.jsx("p",{className:"text-gray-600",children:"The requested page could not be found."})]})})};function X2(){return t.jsxs(Af,{children:[Pf.map(r=>t.jsx(gs,{path:r.path,element:t.jsx(J2,{componentName:r.component})},r.path)),t.jsx(gs,{path:"*",element:t.jsx("div",{className:"flex items-center justify-center h-64",children:t.jsxs("div",{className:"text-center",children:[t.jsx("div",{className:"text-gray-400 text-6xl mb-4",children:"🔍"}),t.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:"404 - Page Not Found"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"The page you're looking for doesn't exist or has been moved."}),t.jsx("a",{href:"/",className:"text-blue-600 hover:text-blue-500 font-medium",children:"Go back to Dashboard"})]})})})]})}const Z2=w.createContext(void 0);function ew({children:r}){const[s,l]=w.useState(new Map),[i,c]=w.useState(!1),[d,m]=w.useState(null),p=(M,N)=>`${M}/${N}`,h=w.useCallback(async(M,N,R)=>{try{c(!0),m(null);const b=p(N,R);if(s.has(b))return s.get(b)||null;const D=await Te.get(`/permissions/${N}/${R}`);if(!D.success)throw D.error.status===401?new Error(be.AUTHENTICATION_ERROR):new Error(be.FAILED_TO_CHECK_PERMISSION);const L=D.data,P={permission:L.permission,role:L.role,canAdmin:L.canAdmin,canMaintain:L.canMaintain,canWrite:L.canWrite,canRead:L.canRead,denied:L.denied};return l(U=>{const Q=new Map(U);return Q.set(b,P),Q}),P}catch(b){const D=b instanceof Error?b.message:"Permission check failed";return m(D),null}finally{c(!1)}},[s]),g=w.useCallback(async(M,N,R,b)=>{try{c(!0),m(null);const D=await Te.post(`/permissions/${N}/${R}/can-action`,{action:b});if(!D.success)throw new Error(be.FAILED_TO_CHECK_ACTION_PERMISSION);return D.data.can===!0}catch(D){return console.error("Action permission check error:",D),!1}finally{c(!1)}},[]),v=w.useCallback((M,N)=>{const R=p(M,N);l(b=>{const D=new Map(b);return D.delete(R),D})},[]),y=w.useCallback(()=>{l(new Map)},[]),k={permissions:s,isLoading:i,error:d,checkPermission:h,canPerformAction:g,invalidatePermission:v,invalidateAll:y};return t.jsx(Z2.Provider,{value:k,children:r})}function tw(){const{login:r,isLoading:s,error:l}=zr(),[i,c]=w.useState(!1),d=async()=>{c(!0),await r()};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br p-5",children:t.jsxs("div",{className:"bg-white rounded-xl shadow-2xl max-w-md w-full overflow-hidden",children:[t.jsxs("div",{className:"bg-gradient-to-br from-primary-500 to-primary-700 text-white p-8 text-center",children:[t.jsx("h1",{className:"text-4xl font-bold m-0",children:"MonoDog"}),t.jsx("p",{className:"text-sm opacity-90 font-medium mt-2 m-0",children:"Monorepo Analytics & Management"})]}),t.jsxs("div",{className:"p-10",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-900 text-center mb-8",children:"Sign in to your account"}),l&&t.jsx("div",{className:"bg-red-100 text-red-700 px-4 py-3 rounded-lg mb-5 text-sm border-l-4 border-red-700",children:l}),t.jsxs("button",{onClick:d,disabled:s||i,className:"w-full flex items-center justify-center gap-3 px-5 py-3 bg-primary-600 text-white rounded-lg font-semibold text-base cursor-pointer transition-all duration-300 disabled:opacity-60 disabled:cursor-not-allowed hover:enabled:bg-primary-700 hover:enabled:-translate-y-0.5 hover:enabled:shadow-lg mb-8",children:[t.jsx(Vx,{}),"Continue with GitHub"]}),t.jsxs("div",{className:"flex items-center gap-3 my-8 text-gray-400 text-xs font-semibold uppercase tracking-widest",children:[t.jsx("div",{className:"flex-1 h-px bg-gray-200"}),t.jsx("span",{children:"GitHub OAuth Authentication"}),t.jsx("div",{className:"flex-1 h-px bg-gray-200"})]}),t.jsxs("div",{className:"bg-primary-50 rounded-lg p-5 border-l-4 border-primary-500",children:[t.jsx("h4",{className:"text-xs font-semibold text-gray-900 mb-3 uppercase tracking-wide",children:"Requested Permissions"}),t.jsxs("ul",{className:"m-0 p-0 list-none space-y-2",children:[t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"read:user"})," - Read your profile information"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"user:email"})," - Access your email address"]}),t.jsxs("li",{className:"text-sm text-gray-700",children:[t.jsx("code",{className:"bg-white text-primary-500 px-1.5 py-0.5 rounded text-xs font-semibold",children:"repo"})," - Access your repositories (required for private repos)"]})]})]})]}),t.jsx("div",{className:"bg-gray-50 px-10 py-5 border-t border-gray-200 text-center",children:t.jsx("p",{className:"text-xs text-gray-500 leading-relaxed m-0",children:"By signing in, you agree to our Terms of Service and Privacy Policy"})})]})})}function nw(){const r=Tc(),[s,l]=w.useState(!0),[i,c]=w.useState(null);return w.useEffect(()=>{(async()=>{try{const m=new URLSearchParams(window.location.search),p=m.get("code"),h=m.get("state"),g=m.get("error"),v=m.get("error_description");if(g){c(`${g}: ${v}`),l(!1);return}if(!p||!h){c("Missing authorization code or state"),l(!1);return}const y=await Te.get(Re.AUTH.CALLBACK+`?code=${p}&state=${h}`);if(!y.success){c(y.error?.message||"Authentication failed"),l(!1);return}const k=y.data;if(!k.success||!k.sessionToken){c(be.AUTHENTICATION_ERROR),l(!1);return}const M=window.__authContext;if(M&&M.handleOAuthCallback)if(await M.handleOAuthCallback(k.sessionToken,k.permission)){const R=k.redirectUrl||"/";r(R)}else c(be.AUTHENTICATION_ERROR);else c(be.AUTHENTICATION_ERROR)}catch(m){const p=m instanceof Error?m.message:be.UNKNOWN_ERROR;c(p)}finally{l(!1)}})()},[r]),t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-primary-500 to-primary-700 p-5",children:t.jsx("div",{className:"bg-white rounded-xl shadow-2xl max-w-sm text-center p-10",children:s?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"w-10 h-10 border-4 border-gray-200 border-t-indigo-500 rounded-full animate-spin mx-auto my-5"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mt-5 mb-2",children:"Completing Authentication..."}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed",children:"Please wait while we verify your GitHub account."})]}):i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"text-5xl mb-5",children:"Warning!"}),t.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Authentication Failed"}),t.jsx("p",{className:"text-gray-700 text-sm leading-relaxed mb-5",children:i}),t.jsx("button",{onClick:()=>r("/login"),className:"inline-block px-6 py-3 bg-primary-500 text-white rounded-lg font-semibold text-sm cursor-pointer transition-all duration-300 hover:bg-primary-600 hover:-translate-y-0.5 hover:shadow-lg",children:"Return to Login"})]}):null})})}function rw({message:r="Loading..."}){return t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-gray-200 border-t-primary-500 animate-spin mb-4"}),t.jsx("p",{className:"text-gray-600",children:r})]})}function sw({children:r}){const{isAuthenticated:s,isLoading:l}=zr();return l?t.jsx(rw,{}):s?t.jsx(t.Fragment,{children:r}):t.jsx(hx,{to:"/login",replace:!0})}function aw(){return t.jsx(Nx,{children:t.jsx(Py,{children:t.jsx(ew,{children:t.jsxs(Af,{children:[t.jsx(gs,{path:"/login",element:t.jsx(tw,{})}),t.jsx(gs,{path:"/auth/callback",element:t.jsx(nw,{})}),t.jsx(gs,{path:"/*",element:t.jsx(sw,{children:t.jsx(Ly,{children:t.jsx(X2,{})})})})]})})})})}const vf=document.getElementById("root");vf&&wp.createRoot(vf).render(t.jsx(aw,{}));
20
- //# sourceMappingURL=index-BKi7VQTX.js.map