@ggui-ai/console 0.1.0-rc.3 → 0.2.0-alpha.1
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,196 +0,0 @@
|
|
|
1
|
-
var Rb=Object.defineProperty;var Ob=(e,n,i)=>n in e?Rb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var Bn=(e,n,i)=>Ob(e,typeof n!="symbol"?n+"":n,i);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}})();function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vd={exports:{}},qo={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Hm;function Ab(){if(Hm)return qo;Hm=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(s,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var p in c)p!=="key"&&(u[p]=c[p])}else u=c;return c=u.ref,{$$typeof:e,type:s,key:d,ref:c!==void 0?c:null,props:u}}return qo.Fragment=n,qo.jsx=i,qo.jsxs=i,qo}var Bm;function Db(){return Bm||(Bm=1,Vd.exports=Ab()),Vd.exports}var r=Db(),Hd={exports:{}},Te={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var qm;function Ib(){if(qm)return Te;qm=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function j(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,C={};function z(D,U,ee){this.props=D,this.context=U,this.refs=C,this.updater=ee||k}z.prototype.isReactComponent={},z.prototype.setState=function(D,U){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,U,"setState")},z.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=z.prototype;function $(D,U,ee){this.props=D,this.context=U,this.refs=C,this.updater=ee||k}var w=$.prototype=new N;w.constructor=$,b(w,z.prototype),w.isPureReactComponent=!0;var R=Array.isArray,x={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function T(D,U,ee,B,E,V){return ee=V.ref,{$$typeof:e,type:D,key:U,ref:ee!==void 0?ee:null,props:V}}function A(D,U){return T(D.type,U,void 0,void 0,void 0,D.props)}function I(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function P(D){var U={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ee){return U[ee]})}var H=/\/+/g;function J(D,U){return typeof D=="object"&&D!==null&&D.key!=null?P(""+D.key):U.toString(36)}function re(){}function le(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(re,re):(D.status="pending",D.then(function(U){D.status==="pending"&&(D.status="fulfilled",D.value=U)},function(U){D.status==="pending"&&(D.status="rejected",D.reason=U)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function $e(D,U,ee,B,E){var V=typeof D;(V==="undefined"||V==="boolean")&&(D=null);var W=!1;if(D===null)W=!0;else switch(V){case"bigint":case"string":case"number":W=!0;break;case"object":switch(D.$$typeof){case e:case n:W=!0;break;case y:return W=D._init,$e(W(D._payload),U,ee,B,E)}}if(W)return E=E(D),W=B===""?"."+J(D,0):B,R(E)?(ee="",W!=null&&(ee=W.replace(H,"$&/")+"/"),$e(E,U,ee,"",function(we){return we})):E!=null&&(I(E)&&(E=A(E,ee+(E.key==null||D&&D.key===E.key?"":(""+E.key).replace(H,"$&/")+"/")+W)),U.push(E)),1;W=0;var he=B===""?".":B+":";if(R(D))for(var pe=0;pe<D.length;pe++)B=D[pe],V=he+J(B,pe),W+=$e(B,U,ee,V,E);else if(pe=j(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(B=D.next()).done;)B=B.value,V=he+J(B,pe++),W+=$e(B,U,ee,V,E);else if(V==="object"){if(typeof D.then=="function")return $e(le(D),U,ee,B,E);throw U=String(D),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return W}function ce(D,U,ee){if(D==null)return D;var B=[],E=0;return $e(D,B,"","",function(V){return U.call(ee,V,E++)}),B}function me(D){if(D._status===-1){var U=D._result;U=U(),U.then(function(ee){(D._status===0||D._status===-1)&&(D._status=1,D._result=ee)},function(ee){(D._status===0||D._status===-1)&&(D._status=2,D._result=ee)}),D._status===-1&&(D._status=0,D._result=U)}if(D._status===1)return D._result.default;throw D._result}var fe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)};function Ee(){}return Te.Children={map:ce,forEach:function(D,U,ee){ce(D,function(){U.apply(this,arguments)},ee)},count:function(D){var U=0;return ce(D,function(){U++}),U},toArray:function(D){return ce(D,function(U){return U})||[]},only:function(D){if(!I(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Te.Component=z,Te.Fragment=i,Te.Profiler=c,Te.PureComponent=$,Te.StrictMode=s,Te.Suspense=g,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,Te.act=function(){throw Error("act(...) is not supported in production builds of React.")},Te.cache=function(D){return function(){return D.apply(null,arguments)}},Te.cloneElement=function(D,U,ee){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var B=b({},D.props),E=D.key,V=void 0;if(U!=null)for(W in U.ref!==void 0&&(V=void 0),U.key!==void 0&&(E=""+U.key),U)!_.call(U,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&U.ref===void 0||(B[W]=U[W]);var W=arguments.length-2;if(W===1)B.children=ee;else if(1<W){for(var he=Array(W),pe=0;pe<W;pe++)he[pe]=arguments[pe+2];B.children=he}return T(D.type,E,void 0,void 0,V,B)},Te.createContext=function(D){return D={$$typeof:d,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},Te.createElement=function(D,U,ee){var B,E={},V=null;if(U!=null)for(B in U.key!==void 0&&(V=""+U.key),U)_.call(U,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(E[B]=U[B]);var W=arguments.length-2;if(W===1)E.children=ee;else if(1<W){for(var he=Array(W),pe=0;pe<W;pe++)he[pe]=arguments[pe+2];E.children=he}if(D&&D.defaultProps)for(B in W=D.defaultProps,W)E[B]===void 0&&(E[B]=W[B]);return T(D,V,void 0,void 0,null,E)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(D){return{$$typeof:p,render:D}},Te.isValidElement=I,Te.lazy=function(D){return{$$typeof:y,_payload:{_status:-1,_result:D},_init:me}},Te.memo=function(D,U){return{$$typeof:h,type:D,compare:U===void 0?null:U}},Te.startTransition=function(D){var U=x.T,ee={};x.T=ee;try{var B=D(),E=x.S;E!==null&&E(ee,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(Ee,fe)}catch(V){fe(V)}finally{x.T=U}},Te.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},Te.use=function(D){return x.H.use(D)},Te.useActionState=function(D,U,ee){return x.H.useActionState(D,U,ee)},Te.useCallback=function(D,U){return x.H.useCallback(D,U)},Te.useContext=function(D){return x.H.useContext(D)},Te.useDebugValue=function(){},Te.useDeferredValue=function(D,U){return x.H.useDeferredValue(D,U)},Te.useEffect=function(D,U){return x.H.useEffect(D,U)},Te.useId=function(){return x.H.useId()},Te.useImperativeHandle=function(D,U,ee){return x.H.useImperativeHandle(D,U,ee)},Te.useInsertionEffect=function(D,U){return x.H.useInsertionEffect(D,U)},Te.useLayoutEffect=function(D,U){return x.H.useLayoutEffect(D,U)},Te.useMemo=function(D,U){return x.H.useMemo(D,U)},Te.useOptimistic=function(D,U){return x.H.useOptimistic(D,U)},Te.useReducer=function(D,U,ee){return x.H.useReducer(D,U,ee)},Te.useRef=function(D){return x.H.useRef(D)},Te.useState=function(D){return x.H.useState(D)},Te.useSyncExternalStore=function(D,U,ee){return x.H.useSyncExternalStore(D,U,ee)},Te.useTransition=function(){return x.H.useTransition()},Te.version="19.0.0",Te}var Pm;function Of(){return Pm||(Pm=1,Hd.exports=Ib()),Hd.exports}var O=Of();const Ai=as(O);var Bd={exports:{}},Po={},qd={exports:{}},Pd={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Zm;function Ub(){return Zm||(Zm=1,(function(e){function n(ce,me){var fe=ce.length;ce.push(me);e:for(;0<fe;){var Ee=fe-1>>>1,D=ce[Ee];if(0<c(D,me))ce[Ee]=me,ce[fe]=D,fe=Ee;else break e}}function i(ce){return ce.length===0?null:ce[0]}function s(ce){if(ce.length===0)return null;var me=ce[0],fe=ce.pop();if(fe!==me){ce[0]=fe;e:for(var Ee=0,D=ce.length,U=D>>>1;Ee<U;){var ee=2*(Ee+1)-1,B=ce[ee],E=ee+1,V=ce[E];if(0>c(B,fe))E<D&&0>c(V,B)?(ce[Ee]=V,ce[E]=fe,Ee=E):(ce[Ee]=B,ce[ee]=fe,Ee=ee);else if(E<D&&0>c(V,fe))ce[Ee]=V,ce[E]=fe,Ee=E;else break e}}return me}function c(ce,me){var fe=ce.sortIndex-me.sortIndex;return fe!==0?fe:ce.id-me.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var g=[],h=[],y=1,v=null,j=3,k=!1,b=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function w(ce){for(var me=i(h);me!==null;){if(me.callback===null)s(h);else if(me.startTime<=ce)s(h),me.sortIndex=me.expirationTime,n(g,me);else break;me=i(h)}}function R(ce){if(C=!1,w(ce),!b)if(i(g)!==null)b=!0,le();else{var me=i(h);me!==null&&$e(R,me.startTime-ce)}}var x=!1,_=-1,T=5,A=-1;function I(){return!(e.unstable_now()-A<T)}function P(){if(x){var ce=e.unstable_now();A=ce;var me=!0;try{e:{b=!1,C&&(C=!1,N(_),_=-1),k=!0;var fe=j;try{t:{for(w(ce),v=i(g);v!==null&&!(v.expirationTime>ce&&I());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,j=v.priorityLevel;var D=Ee(v.expirationTime<=ce);if(ce=e.unstable_now(),typeof D=="function"){v.callback=D,w(ce),me=!0;break t}v===i(g)&&s(g),w(ce)}else s(g);v=i(g)}if(v!==null)me=!0;else{var U=i(h);U!==null&&$e(R,U.startTime-ce),me=!1}}break e}finally{v=null,j=fe,k=!1}me=void 0}}finally{me?H():x=!1}}}var H;if(typeof $=="function")H=function(){$(P)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=P,H=function(){re.postMessage(null)}}else H=function(){z(P,0)};function le(){x||(x=!0,H())}function $e(ce,me){_=z(function(){ce(e.unstable_now())},me)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ce){ce.callback=null},e.unstable_continueExecution=function(){b||k||(b=!0,le())},e.unstable_forceFrameRate=function(ce){0>ce||125<ce?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<ce?Math.floor(1e3/ce):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_getFirstCallbackNode=function(){return i(g)},e.unstable_next=function(ce){switch(j){case 1:case 2:case 3:var me=3;break;default:me=j}var fe=j;j=me;try{return ce()}finally{j=fe}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ce,me){switch(ce){case 1:case 2:case 3:case 4:case 5:break;default:ce=3}var fe=j;j=ce;try{return me()}finally{j=fe}},e.unstable_scheduleCallback=function(ce,me,fe){var Ee=e.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?Ee+fe:Ee):fe=Ee,ce){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=fe+D,ce={id:y++,callback:me,priorityLevel:ce,startTime:fe,expirationTime:D,sortIndex:-1},fe>Ee?(ce.sortIndex=fe,n(h,ce),i(g)===null&&ce===i(h)&&(C?(N(_),_=-1):C=!0,$e(R,fe-Ee))):(ce.sortIndex=D,n(g,ce),b||k||(b=!0,le())),ce},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(ce){var me=j;return function(){var fe=j;j=me;try{return ce.apply(this,arguments)}finally{j=fe}}}})(Pd)),Pd}var Gm;function Lb(){return Gm||(Gm=1,qd.exports=Ub()),qd.exports}var Zd={exports:{}},qt={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Fm;function Vb(){if(Fm)return qt;Fm=1;var e=Of();function n(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(g,h,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:g,containerInfo:h,implementation:y}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,qt.createPortal=function(g,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return u(g,h,null,y)},qt.flushSync=function(g){var h=d.T,y=s.p;try{if(d.T=null,s.p=2,g)return g()}finally{d.T=h,s.p=y,s.d.f()}},qt.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(g,h))},qt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},qt.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var y=h.as,v=p(y,h.crossOrigin),j=typeof h.integrity=="string"?h.integrity:void 0,k=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?s.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:j,fetchPriority:k}):y==="script"&&s.d.X(g,{crossOrigin:v,integrity:j,fetchPriority:k,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=p(h.as,h.crossOrigin);s.d.M(g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(g)},qt.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,v=p(y,h.crossOrigin);s.d.L(g,y,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(g,h){if(typeof g=="string")if(h){var y=p(h.as,h.crossOrigin);s.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(g)},qt.requestFormReset=function(g){s.d.r(g)},qt.unstable_batchedUpdates=function(g,h){return g(h)},qt.useFormState=function(g,h,y){return d.H.useFormState(g,h,y)},qt.useFormStatus=function(){return d.H.useHostTransitionStatus()},qt.version="19.0.0",qt}var Ym;function Hb(){if(Ym)return Zd.exports;Ym=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Zd.exports=Vb(),Zd.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Km;function Bb(){if(Km)return Po;Km=1;var e=Lb(),n=Of(),i=Hb();function s(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}var u=Symbol.for("react.element"),d=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),j=Symbol.for("react.consumer"),k=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),R=Symbol.for("react.memo_cache_sentinel"),x=Symbol.iterator;function _(t){return t===null||typeof t!="object"?null:(t=x&&t[x]||t["@@iterator"],typeof t=="function"?t:null)}var T=Symbol.for("react.client.reference");function A(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===T?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case g:return"Fragment";case p:return"Portal";case y:return"Profiler";case h:return"StrictMode";case C:return"Suspense";case z:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case k:return(t.displayName||"Context")+".Provider";case j:return(t._context.displayName||"Context")+".Consumer";case b:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case N:return a=t.displayName||null,a!==null?a:A(t.type)||"Memo";case $:a=t._payload,t=t._init;try{return A(t(a))}catch{}}return null}var I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.assign,H,J;function re(t){if(H===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);H=a&&a[1]||"",J=-1<o.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+H+t+J}var le=!1;function $e(t,a){if(!t||le)return"";le=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(a){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var te=ae}Reflect.construct(t,[],ue)}else{try{ue.call()}catch(ae){te=ae}t.call(ue.prototype)}}else{try{throw Error()}catch(ae){te=ae}(ue=t())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),S=m[0],M=m[1];if(S&&M){var L=S.split(`
|
|
44
|
-
`),Z=M.split(`
|
|
45
|
-
`);for(f=l=0;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;for(;f<Z.length&&!Z[f].includes("DetermineComponentFrameRoot");)f++;if(l===L.length||f===Z.length)for(l=L.length-1,f=Z.length-1;1<=l&&0<=f&&L[l]!==Z[f];)f--;for(;1<=l&&0<=f;l--,f--)if(L[l]!==Z[f]){if(l!==1||f!==1)do if(l--,f--,0>f||L[l]!==Z[f]){var ie=`
|
|
46
|
-
`+L[l].replace(" at new "," at ");return t.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",t.displayName)),ie}while(1<=l&&0<=f);break}}}finally{le=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?re(o):""}function ce(t){switch(t.tag){case 26:case 27:case 5:return re(t.type);case 16:return re("Lazy");case 13:return re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return t=$e(t.type,!1),t;case 11:return t=$e(t.type.render,!1),t;case 1:return t=$e(t.type,!0),t;default:return""}}function me(t){try{var a="";do a+=ce(t),t=t.return;while(t);return a}catch(o){return`
|
|
47
|
-
Error generating stack: `+o.message+`
|
|
48
|
-
`+o.stack}}function fe(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function Ee(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function D(t){if(fe(t)!==t)throw Error(s(188))}function U(t){var a=t.alternate;if(!a){if(a=fe(t),a===null)throw Error(s(188));return a!==t?null:t}for(var o=t,l=a;;){var f=o.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){o=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===o)return D(f),t;if(m===l)return D(f),a;m=m.sibling}throw Error(s(188))}if(o.return!==l.return)o=f,l=m;else{for(var S=!1,M=f.child;M;){if(M===o){S=!0,o=f,l=m;break}if(M===l){S=!0,l=f,o=m;break}M=M.sibling}if(!S){for(M=m.child;M;){if(M===o){S=!0,o=m,l=f;break}if(M===l){S=!0,l=m,o=f;break}M=M.sibling}if(!S)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:a}function ee(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=ee(t),a!==null)return a;t=t.sibling}return null}var B=Array.isArray,E=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},W=[],he=-1;function pe(t){return{current:t}}function we(t){0>he||(t.current=W[he],W[he]=null,he--)}function xe(t,a){he++,W[he]=t.current,t.current=a}var G=pe(null),Q=pe(null),oe=pe(null),ge=pe(null);function be(t,a){switch(xe(oe,a),xe(Q,t),xe(G,null),t=a.nodeType,t){case 9:case 11:a=(a=a.documentElement)&&(a=a.namespaceURI)?hm(a):0;break;default:if(t=t===8?a.parentNode:a,a=t.tagName,t=t.namespaceURI)t=hm(t),a=ym(t,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}we(G),xe(G,a)}function ze(){we(G),we(Q),we(oe)}function gt(t){t.memoizedState!==null&&xe(ge,t);var a=G.current,o=ym(a,t.type);a!==o&&(xe(Q,t),xe(G,o))}function Vt(t){Q.current===t&&(we(G),we(Q)),ge.current===t&&(we(ge),Uo._currentValue=V)}var zt=Object.prototype.hasOwnProperty,Ct=e.unstable_scheduleCallback,mt=e.unstable_cancelCallback,yn=e.unstable_shouldYield,Qt=e.unstable_requestPaint,ea=e.unstable_now,Zi=e.unstable_getCurrentPriorityLevel,vn=e.unstable_ImmediatePriority,Gr=e.unstable_UserBlockingPriority,hr=e.unstable_NormalPriority,is=e.unstable_LowPriority,os=e.unstable_IdlePriority,m$=e.log,h$=e.unstable_setDisableYieldValue,Gi=null,la=null;function y$(t){if(la&&typeof la.onCommitFiberRoot=="function")try{la.onCommitFiberRoot(Gi,t,void 0,(t.current.flags&128)===128)}catch{}}function $n(t){if(typeof m$=="function"&&h$(t),la&&typeof la.setStrictMode=="function")try{la.setStrictMode(Gi,t)}catch{}}var ca=Math.clz32?Math.clz32:b$,v$=Math.log,$$=Math.LN2;function b$(t){return t>>>=0,t===0?32:31-(v$(t)/$$|0)|0}var ss=128,ls=4194304;function yr(t){var a=t&42;if(a!==0)return a;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function cs(t,a){var o=t.pendingLanes;if(o===0)return 0;var l=0,f=t.suspendedLanes,m=t.pingedLanes,S=t.warmLanes;t=t.finishedLanes!==0;var M=o&134217727;return M!==0?(o=M&~f,o!==0?l=yr(o):(m&=M,m!==0?l=yr(m):t||(S=M&~S,S!==0&&(l=yr(S))))):(M=o&~f,M!==0?l=yr(M):m!==0?l=yr(m):t||(S=o&~S,S!==0&&(l=yr(S)))),l===0?0:a!==0&&a!==l&&(a&f)===0&&(f=l&-l,S=a&-a,f>=S||f===32&&(S&4194176)!==0)?a:l}function Fi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function x$(t,a){switch(t){case 1:case 2:case 4:case 8:return a+250;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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function lp(){var t=ss;return ss<<=1,(ss&4194176)===0&&(ss=128),t}function cp(){var t=ls;return ls<<=1,(ls&62914560)===0&&(ls=4194304),t}function Ac(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function Yi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function j$(t,a,o,l,f,m){var S=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var M=t.entanglements,L=t.expirationTimes,Z=t.hiddenUpdates;for(o=S&~o;0<o;){var ie=31-ca(o),ue=1<<ie;M[ie]=0,L[ie]=-1;var te=Z[ie];if(te!==null)for(Z[ie]=null,ie=0;ie<te.length;ie++){var ae=te[ie];ae!==null&&(ae.lane&=-536870913)}o&=~ue}l!==0&&up(t,l,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~a))}function up(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var l=31-ca(a);t.entangledLanes|=a,t.entanglements[l]=t.entanglements[l]|1073741824|o&4194218}function dp(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var l=31-ca(o),f=1<<l;f&a|t[l]&a&&(t[l]|=a),o&=~f}}function fp(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function pp(){var t=E.p;return t!==0?t:(t=window.event,t===void 0?32:Am(t.type))}function _$(t,a){var o=E.p;try{return E.p=t,a()}finally{E.p=o}}var bn=Math.random().toString(36).slice(2),Ht="__reactFiber$"+bn,ta="__reactProps$"+bn,Fr="__reactContainer$"+bn,Dc="__reactEvents$"+bn,S$="__reactListeners$"+bn,w$="__reactHandles$"+bn,gp="__reactResources$"+bn,Ki="__reactMarker$"+bn;function Ic(t){delete t[Ht],delete t[ta],delete t[Dc],delete t[S$],delete t[w$]}function vr(t){var a=t[Ht];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Fr]||o[Ht]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=bm(t);t!==null;){if(o=t[Ht])return o;t=bm(t)}return a}t=o,o=t.parentNode}return null}function Yr(t){if(t=t[Ht]||t[Fr]){var a=t.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return t}return null}function Wi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(s(33))}function Kr(t){var a=t[gp];return a||(a=t[gp]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Et(t){t[Ki]=!0}var mp=new Set,hp={};function $r(t,a){Wr(t,a),Wr(t+"Capture",a)}function Wr(t,a){for(hp[t]=a,t=0;t<a.length;t++)mp.add(a[t])}var Ga=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),k$=RegExp("^[: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]*$"),yp={},vp={};function N$(t){return zt.call(vp,t)?!0:zt.call(yp,t)?!1:k$.test(t)?vp[t]=!0:(yp[t]=!0,!1)}function us(t,a,o){if(N$(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var l=a.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function ds(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function Fa(t,a,o,l){if(l===null)t.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+l)}}function ya(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function $p(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function z$(t){var a=$p(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),l=""+t[a];if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return f.call(this)},set:function(S){l=""+S,m.call(this,S)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function fs(t){t._valueTracker||(t._valueTracker=z$(t))}function bp(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),l="";return t&&(l=$p(t)?t.checked?"true":"false":t.value),t=l,t!==o?(a.setValue(t),!0):!1}function ps(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var C$=/[\n"\\]/g;function va(t){return t.replace(C$,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Uc(t,a,o,l,f,m,S,M){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),a!=null?S==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+ya(a)):t.value!==""+ya(a)&&(t.value=""+ya(a)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),a!=null?Lc(t,S,ya(a)):o!=null?Lc(t,S,ya(o)):l!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?t.name=""+ya(M):t.removeAttribute("name")}function xp(t,a,o,l,f,m,S,M){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||o!=null){if(!(m!=="submit"&&m!=="reset"||a!=null))return;o=o!=null?""+ya(o):"",a=a!=null?""+ya(a):o,M||a===t.value||(t.value=a),t.defaultValue=a}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=M?t.checked:!!l,t.defaultChecked=!!l,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S)}function Lc(t,a,o){a==="number"&&ps(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function Xr(t,a,o,l){if(t=t.options,a){a={};for(var f=0;f<o.length;f++)a["$"+o[f]]=!0;for(o=0;o<t.length;o++)f=a.hasOwnProperty("$"+t[o].value),t[o].selected!==f&&(t[o].selected=f),f&&l&&(t[o].defaultSelected=!0)}else{for(o=""+ya(o),a=null,f=0;f<t.length;f++){if(t[f].value===o){t[f].selected=!0,l&&(t[f].defaultSelected=!0);return}a!==null||t[f].disabled||(a=t[f])}a!==null&&(a.selected=!0)}}function jp(t,a,o){if(a!=null&&(a=""+ya(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+ya(o):""}function _p(t,a,o,l){if(a==null){if(l!=null){if(o!=null)throw Error(s(92));if(B(l)){if(1<l.length)throw Error(s(93));l=l[0]}o=l}o==null&&(o=""),a=o}o=ya(a),t.defaultValue=o,l=t.textContent,l===o&&l!==""&&l!==null&&(t.value=l)}function Jr(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var E$=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Sp(t,a,o){var l=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":l?t.setProperty(a,o):typeof o!="number"||o===0||E$.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function wp(t,a,o){if(a!=null&&typeof a!="object")throw Error(s(62));if(t=t.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||a!=null&&a.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var f in a)l=a[f],a.hasOwnProperty(f)&&o[f]!==l&&Sp(t,f,l)}else for(var m in a)a.hasOwnProperty(m)&&Sp(t,m,a[m])}function Vc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 T$=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),M$=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gs(t){return M$.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Hc=null;function Bc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Qr=null,ei=null;function kp(t){var a=Yr(t);if(a&&(t=a.stateNode)){var o=t[ta]||null;e:switch(t=a.stateNode,a.type){case"input":if(Uc(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+va(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var l=o[a];if(l!==t&&l.form===t.form){var f=l[ta]||null;if(!f)throw Error(s(90));Uc(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<o.length;a++)l=o[a],l.form===t.form&&bp(l)}break e;case"textarea":jp(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Xr(t,!!o.multiple,a,!1)}}}var qc=!1;function Np(t,a,o){if(qc)return t(a,o);qc=!0;try{var l=t(a);return l}finally{if(qc=!1,(Qr!==null||ei!==null)&&(Xs(),Qr&&(a=Qr,t=ei,ei=Qr=null,kp(a),t)))for(a=0;a<t.length;a++)kp(t[a])}}function Xi(t,a){var o=t.stateNode;if(o===null)return null;var l=o[ta]||null;if(l===null)return null;o=l[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(s(231,a,typeof o));return o}var Pc=!1;if(Ga)try{var Ji={};Object.defineProperty(Ji,"passive",{get:function(){Pc=!0}}),window.addEventListener("test",Ji,Ji),window.removeEventListener("test",Ji,Ji)}catch{Pc=!1}var xn=null,Zc=null,ms=null;function zp(){if(ms)return ms;var t,a=Zc,o=a.length,l,f="value"in xn?xn.value:xn.textContent,m=f.length;for(t=0;t<o&&a[t]===f[t];t++);var S=o-t;for(l=1;l<=S&&a[o-l]===f[m-l];l++);return ms=f.slice(t,1<l?1-l:void 0)}function hs(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function ys(){return!0}function Cp(){return!1}function aa(t){function a(o,l,f,m,S){this._reactName=o,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var M in t)t.hasOwnProperty(M)&&(o=t[M],this[M]=o?o(m):m[M]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ys:Cp,this.isPropagationStopped=Cp,this}return P(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),a}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vs=aa(br),Qi=P({},br,{view:0,detail:0}),R$=aa(Qi),Gc,Fc,eo,$s=P({},Qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==eo&&(eo&&t.type==="mousemove"?(Gc=t.screenX-eo.screenX,Fc=t.screenY-eo.screenY):Fc=Gc=0,eo=t),Gc)},movementY:function(t){return"movementY"in t?t.movementY:Fc}}),Ep=aa($s),O$=P({},$s,{dataTransfer:0}),A$=aa(O$),D$=P({},Qi,{relatedTarget:0}),Yc=aa(D$),I$=P({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),U$=aa(I$),L$=P({},br,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),V$=aa(L$),H$=P({},br,{data:0}),Tp=aa(H$),B$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q$={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"},P$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z$(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=P$[t])?!!a[t]:!1}function Kc(){return Z$}var G$=P({},Qi,{key:function(t){if(t.key){var a=B$[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=hs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?q$[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kc,charCode:function(t){return t.type==="keypress"?hs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?hs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),F$=aa(G$),Y$=P({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=aa(Y$),K$=P({},Qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kc}),W$=aa(K$),X$=P({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),J$=aa(X$),Q$=P({},$s,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),e2=aa(Q$),t2=P({},br,{newState:0,oldState:0}),a2=aa(t2),n2=[9,13,27,32],Wc=Ga&&"CompositionEvent"in window,to=null;Ga&&"documentMode"in document&&(to=document.documentMode);var r2=Ga&&"TextEvent"in window&&!to,Rp=Ga&&(!Wc||to&&8<to&&11>=to),Op=" ",Ap=!1;function Dp(t,a){switch(t){case"keyup":return n2.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ip(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ti=!1;function i2(t,a){switch(t){case"compositionend":return Ip(a);case"keypress":return a.which!==32?null:(Ap=!0,Op);case"textInput":return t=a.data,t===Op&&Ap?null:t;default:return null}}function o2(t,a){if(ti)return t==="compositionend"||!Wc&&Dp(t,a)?(t=zp(),ms=Zc=xn=null,ti=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Rp&&a.locale!=="ko"?null:a.data;default:return null}}var s2={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 Up(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!s2[t.type]:a==="textarea"}function Lp(t,a,o,l){Qr?ei?ei.push(l):ei=[l]:Qr=l,a=al(a,"onChange"),0<a.length&&(o=new vs("onChange","change",null,o,l),t.push({event:o,listeners:a}))}var ao=null,no=null;function l2(t){dm(t,0)}function bs(t){var a=Wi(t);if(bp(a))return t}function Vp(t,a){if(t==="change")return a}var Hp=!1;if(Ga){var Xc;if(Ga){var Jc="oninput"in document;if(!Jc){var Bp=document.createElement("div");Bp.setAttribute("oninput","return;"),Jc=typeof Bp.oninput=="function"}Xc=Jc}else Xc=!1;Hp=Xc&&(!document.documentMode||9<document.documentMode)}function qp(){ao&&(ao.detachEvent("onpropertychange",Pp),no=ao=null)}function Pp(t){if(t.propertyName==="value"&&bs(no)){var a=[];Lp(a,no,t,Bc(t)),Np(l2,a)}}function c2(t,a,o){t==="focusin"?(qp(),ao=a,no=o,ao.attachEvent("onpropertychange",Pp)):t==="focusout"&&qp()}function u2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return bs(no)}function d2(t,a){if(t==="click")return bs(a)}function f2(t,a){if(t==="input"||t==="change")return bs(a)}function p2(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var ua=typeof Object.is=="function"?Object.is:p2;function ro(t,a){if(ua(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),l=Object.keys(a);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var f=o[l];if(!zt.call(a,f)||!ua(t[f],a[f]))return!1}return!0}function Zp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Gp(t,a){var o=Zp(t);t=0;for(var l;o;){if(o.nodeType===3){if(l=t+o.textContent.length,t<=a&&l>=a)return{node:o,offset:a-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Zp(o)}}function Fp(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Fp(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Yp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=ps(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=ps(t.document)}return a}function Qc(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}function g2(t,a){var o=Yp(a);a=t.focusedElem;var l=t.selectionRange;if(o!==a&&a&&a.ownerDocument&&Fp(a.ownerDocument.documentElement,a)){if(l!==null&&Qc(a)){if(t=l.start,o=l.end,o===void 0&&(o=t),"selectionStart"in a)a.selectionStart=t,a.selectionEnd=Math.min(o,a.value.length);else if(o=(t=a.ownerDocument||document)&&t.defaultView||window,o.getSelection){o=o.getSelection();var f=a.textContent.length,m=Math.min(l.start,f);l=l.end===void 0?m:Math.min(l.end,f),!o.extend&&m>l&&(f=l,l=m,m=f),f=Gp(a,m);var S=Gp(a,l);f&&S&&(o.rangeCount!==1||o.anchorNode!==f.node||o.anchorOffset!==f.offset||o.focusNode!==S.node||o.focusOffset!==S.offset)&&(t=t.createRange(),t.setStart(f.node,f.offset),o.removeAllRanges(),m>l?(o.addRange(t),o.extend(S.node,S.offset)):(t.setEnd(S.node,S.offset),o.addRange(t)))}}for(t=[],o=a;o=o.parentNode;)o.nodeType===1&&t.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<t.length;a++)o=t[a],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var m2=Ga&&"documentMode"in document&&11>=document.documentMode,ai=null,eu=null,io=null,tu=!1;function Kp(t,a,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;tu||ai==null||ai!==ps(l)||(l=ai,"selectionStart"in l&&Qc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),io&&ro(io,l)||(io=l,l=al(eu,"onSelect"),0<l.length&&(a=new vs("onSelect","select",null,a,o),t.push({event:a,listeners:l}),a.target=ai)))}function xr(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var ni={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionrun:xr("Transition","TransitionRun"),transitionstart:xr("Transition","TransitionStart"),transitioncancel:xr("Transition","TransitionCancel"),transitionend:xr("Transition","TransitionEnd")},au={},Wp={};Ga&&(Wp=document.createElement("div").style,"AnimationEvent"in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),"TransitionEvent"in window||delete ni.transitionend.transition);function jr(t){if(au[t])return au[t];if(!ni[t])return t;var a=ni[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in Wp)return au[t]=a[o];return t}var Xp=jr("animationend"),Jp=jr("animationiteration"),Qp=jr("animationstart"),h2=jr("transitionrun"),y2=jr("transitionstart"),v2=jr("transitioncancel"),e0=jr("transitionend"),t0=new Map,a0="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function Ta(t,a){t0.set(t,a),$r(a,[t])}var $a=[],ri=0,nu=0;function xs(){for(var t=ri,a=nu=ri=0;a<t;){var o=$a[a];$a[a++]=null;var l=$a[a];$a[a++]=null;var f=$a[a];$a[a++]=null;var m=$a[a];if($a[a++]=null,l!==null&&f!==null){var S=l.pending;S===null?f.next=f:(f.next=S.next,S.next=f),l.pending=f}m!==0&&n0(o,f,m)}}function js(t,a,o,l){$a[ri++]=t,$a[ri++]=a,$a[ri++]=o,$a[ri++]=l,nu|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function ru(t,a,o,l){return js(t,a,o,l),_s(t)}function jn(t,a){return js(t,null,null,a),_s(t)}function n0(t,a,o){t.lanes|=o;var l=t.alternate;l!==null&&(l.lanes|=o);for(var f=!1,m=t.return;m!==null;)m.childLanes|=o,l=m.alternate,l!==null&&(l.childLanes|=o),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;f&&a!==null&&t.tag===3&&(m=t.stateNode,f=31-ca(o),m=m.hiddenUpdates,t=m[f],t===null?m[f]=[a]:t.push(a),a.lane=o|536870912)}function _s(t){if(50<To)throw To=0,ud=null,Error(s(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var ii={},r0=new WeakMap;function ba(t,a){if(typeof t=="object"&&t!==null){var o=r0.get(t);return o!==void 0?o:(a={value:t,source:a,stack:me(a)},r0.set(t,a),a)}return{value:t,source:a,stack:me(a)}}var oi=[],si=0,Ss=null,ws=0,xa=[],ja=0,_r=null,Ya=1,Ka="";function Sr(t,a){oi[si++]=ws,oi[si++]=Ss,Ss=t,ws=a}function i0(t,a,o){xa[ja++]=Ya,xa[ja++]=Ka,xa[ja++]=_r,_r=t;var l=Ya;t=Ka;var f=32-ca(l)-1;l&=~(1<<f),o+=1;var m=32-ca(a)+f;if(30<m){var S=f-f%5;m=(l&(1<<S)-1).toString(32),l>>=S,f-=S,Ya=1<<32-ca(a)+f|o<<f|l,Ka=m+t}else Ya=1<<m|o<<f|l,Ka=t}function iu(t){t.return!==null&&(Sr(t,1),i0(t,1,0))}function ou(t){for(;t===Ss;)Ss=oi[--si],oi[si]=null,ws=oi[--si],oi[si]=null;for(;t===_r;)_r=xa[--ja],xa[ja]=null,Ka=xa[--ja],xa[ja]=null,Ya=xa[--ja],xa[ja]=null}var Ft=null,At=null,Pe=!1,Ma=null,Ia=!1,su=Error(s(519));function wr(t){var a=Error(s(418,""));throw lo(ba(a,t)),su}function o0(t){var a=t.stateNode,o=t.type,l=t.memoizedProps;switch(a[Ht]=t,a[ta]=l,o){case"dialog":Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":case"embed":Ve("load",a);break;case"video":case"audio":for(o=0;o<Ro.length;o++)Ve(Ro[o],a);break;case"source":Ve("error",a);break;case"img":case"image":case"link":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"input":Ve("invalid",a),xp(a,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),fs(a);break;case"select":Ve("invalid",a);break;case"textarea":Ve("invalid",a),_p(a,l.value,l.defaultValue,l.children),fs(a)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||l.suppressHydrationWarning===!0||mm(a.textContent,o)?(l.popover!=null&&(Ve("beforetoggle",a),Ve("toggle",a)),l.onScroll!=null&&Ve("scroll",a),l.onScrollEnd!=null&&Ve("scrollend",a),l.onClick!=null&&(a.onclick=nl),a=!0):a=!1,a||wr(t)}function s0(t){for(Ft=t.return;Ft;)switch(Ft.tag){case 3:case 27:Ia=!0;return;case 5:case 13:Ia=!1;return;default:Ft=Ft.return}}function oo(t){if(t!==Ft)return!1;if(!Pe)return s0(t),Pe=!0,!1;var a=!1,o;if((o=t.tag!==3&&t.tag!==27)&&((o=t.tag===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||Nd(t.type,t.memoizedProps)),o=!o),o&&(a=!0),a&&At&&wr(t),s0(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,a=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(a===0){At=Oa(t.nextSibling);break e}a--}else o!=="$"&&o!=="$!"&&o!=="$?"||a++;t=t.nextSibling}At=null}}else At=Ft?Oa(t.stateNode.nextSibling):null;return!0}function so(){At=Ft=null,Pe=!1}function lo(t){Ma===null?Ma=[t]:Ma.push(t)}var co=Error(s(460)),l0=Error(s(474)),lu={then:function(){}};function c0(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ks(){}function u0(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(ks,ks),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,t===co?Error(s(483)):t;default:if(typeof a.status=="string")a.then(ks,ks);else{if(t=Qe,t!==null&&100<t.shellSuspendCounter)throw Error(s(482));t=a,t.status="pending",t.then(function(l){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=l}},function(l){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=l}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,t===co?Error(s(483)):t}throw uo=a,co}}var uo=null;function d0(){if(uo===null)throw Error(s(459));var t=uo;return uo=null,t}var li=null,fo=0;function Ns(t){var a=fo;return fo+=1,li===null&&(li=[]),u0(li,t,a)}function po(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function zs(t,a){throw a.$$typeof===u?Error(s(525)):(t=Object.prototype.toString.call(a),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function f0(t){var a=t._init;return a(t._payload)}function p0(t){function a(Y,q){if(t){var X=Y.deletions;X===null?(Y.deletions=[q],Y.flags|=16):X.push(q)}}function o(Y,q){if(!t)return null;for(;q!==null;)a(Y,q),q=q.sibling;return null}function l(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function f(Y,q){return Y=On(Y,q),Y.index=0,Y.sibling=null,Y}function m(Y,q,X){return Y.index=X,t?(X=Y.alternate,X!==null?(X=X.index,X<q?(Y.flags|=33554434,q):X):(Y.flags|=33554434,q)):(Y.flags|=1048576,q)}function S(Y){return t&&Y.alternate===null&&(Y.flags|=33554434),Y}function M(Y,q,X,se){return q===null||q.tag!==6?(q=ad(X,Y.mode,se),q.return=Y,q):(q=f(q,X),q.return=Y,q)}function L(Y,q,X,se){var ve=X.type;return ve===g?ie(Y,q,X.props.children,se,X.key):q!==null&&(q.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&f0(ve)===q.type)?(q=f(q,X.props),po(q,X),q.return=Y,q):(q=Gs(X.type,X.key,X.props,null,Y.mode,se),po(q,X),q.return=Y,q)}function Z(Y,q,X,se){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=nd(X,Y.mode,se),q.return=Y,q):(q=f(q,X.children||[]),q.return=Y,q)}function ie(Y,q,X,se,ve){return q===null||q.tag!==7?(q=Ar(X,Y.mode,se,ve),q.return=Y,q):(q=f(q,X),q.return=Y,q)}function ue(Y,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=ad(""+q,Y.mode,X),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case d:return X=Gs(q.type,q.key,q.props,null,Y.mode,X),po(X,q),X.return=Y,X;case p:return q=nd(q,Y.mode,X),q.return=Y,q;case $:var se=q._init;return q=se(q._payload),ue(Y,q,X)}if(B(q)||_(q))return q=Ar(q,Y.mode,X,null),q.return=Y,q;if(typeof q.then=="function")return ue(Y,Ns(q),X);if(q.$$typeof===k)return ue(Y,qs(Y,q),X);zs(Y,q)}return null}function te(Y,q,X,se){var ve=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return ve!==null?null:M(Y,q,""+X,se);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case d:return X.key===ve?L(Y,q,X,se):null;case p:return X.key===ve?Z(Y,q,X,se):null;case $:return ve=X._init,X=ve(X._payload),te(Y,q,X,se)}if(B(X)||_(X))return ve!==null?null:ie(Y,q,X,se,null);if(typeof X.then=="function")return te(Y,q,Ns(X),se);if(X.$$typeof===k)return te(Y,q,qs(Y,X),se);zs(Y,X)}return null}function ae(Y,q,X,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Y=Y.get(X)||null,M(q,Y,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case d:return Y=Y.get(se.key===null?X:se.key)||null,L(q,Y,se,ve);case p:return Y=Y.get(se.key===null?X:se.key)||null,Z(q,Y,se,ve);case $:var Ie=se._init;return se=Ie(se._payload),ae(Y,q,X,se,ve)}if(B(se)||_(se))return Y=Y.get(X)||null,ie(q,Y,se,ve,null);if(typeof se.then=="function")return ae(Y,q,X,Ns(se),ve);if(se.$$typeof===k)return ae(Y,q,X,qs(q,se),ve);zs(q,se)}return null}function je(Y,q,X,se){for(var ve=null,Ie=null,Se=q,ke=q=0,Rt=null;Se!==null&&ke<X.length;ke++){Se.index>ke?(Rt=Se,Se=null):Rt=Se.sibling;var Ze=te(Y,Se,X[ke],se);if(Ze===null){Se===null&&(Se=Rt);break}t&&Se&&Ze.alternate===null&&a(Y,Se),q=m(Ze,q,ke),Ie===null?ve=Ze:Ie.sibling=Ze,Ie=Ze,Se=Rt}if(ke===X.length)return o(Y,Se),Pe&&Sr(Y,ke),ve;if(Se===null){for(;ke<X.length;ke++)Se=ue(Y,X[ke],se),Se!==null&&(q=m(Se,q,ke),Ie===null?ve=Se:Ie.sibling=Se,Ie=Se);return Pe&&Sr(Y,ke),ve}for(Se=l(Se);ke<X.length;ke++)Rt=ae(Se,Y,ke,X[ke],se),Rt!==null&&(t&&Rt.alternate!==null&&Se.delete(Rt.key===null?ke:Rt.key),q=m(Rt,q,ke),Ie===null?ve=Rt:Ie.sibling=Rt,Ie=Rt);return t&&Se.forEach(function(Hn){return a(Y,Hn)}),Pe&&Sr(Y,ke),ve}function Ce(Y,q,X,se){if(X==null)throw Error(s(151));for(var ve=null,Ie=null,Se=q,ke=q=0,Rt=null,Ze=X.next();Se!==null&&!Ze.done;ke++,Ze=X.next()){Se.index>ke?(Rt=Se,Se=null):Rt=Se.sibling;var Hn=te(Y,Se,Ze.value,se);if(Hn===null){Se===null&&(Se=Rt);break}t&&Se&&Hn.alternate===null&&a(Y,Se),q=m(Hn,q,ke),Ie===null?ve=Hn:Ie.sibling=Hn,Ie=Hn,Se=Rt}if(Ze.done)return o(Y,Se),Pe&&Sr(Y,ke),ve;if(Se===null){for(;!Ze.done;ke++,Ze=X.next())Ze=ue(Y,Ze.value,se),Ze!==null&&(q=m(Ze,q,ke),Ie===null?ve=Ze:Ie.sibling=Ze,Ie=Ze);return Pe&&Sr(Y,ke),ve}for(Se=l(Se);!Ze.done;ke++,Ze=X.next())Ze=ae(Se,Y,ke,Ze.value,se),Ze!==null&&(t&&Ze.alternate!==null&&Se.delete(Ze.key===null?ke:Ze.key),q=m(Ze,q,ke),Ie===null?ve=Ze:Ie.sibling=Ze,Ie=Ze);return t&&Se.forEach(function(Mb){return a(Y,Mb)}),Pe&&Sr(Y,ke),ve}function ut(Y,q,X,se){if(typeof X=="object"&&X!==null&&X.type===g&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case d:e:{for(var ve=X.key;q!==null;){if(q.key===ve){if(ve=X.type,ve===g){if(q.tag===7){o(Y,q.sibling),se=f(q,X.props.children),se.return=Y,Y=se;break e}}else if(q.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===$&&f0(ve)===q.type){o(Y,q.sibling),se=f(q,X.props),po(se,X),se.return=Y,Y=se;break e}o(Y,q);break}else a(Y,q);q=q.sibling}X.type===g?(se=Ar(X.props.children,Y.mode,se,X.key),se.return=Y,Y=se):(se=Gs(X.type,X.key,X.props,null,Y.mode,se),po(se,X),se.return=Y,Y=se)}return S(Y);case p:e:{for(ve=X.key;q!==null;){if(q.key===ve)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){o(Y,q.sibling),se=f(q,X.children||[]),se.return=Y,Y=se;break e}else{o(Y,q);break}else a(Y,q);q=q.sibling}se=nd(X,Y.mode,se),se.return=Y,Y=se}return S(Y);case $:return ve=X._init,X=ve(X._payload),ut(Y,q,X,se)}if(B(X))return je(Y,q,X,se);if(_(X)){if(ve=_(X),typeof ve!="function")throw Error(s(150));return X=ve.call(X),Ce(Y,q,X,se)}if(typeof X.then=="function")return ut(Y,q,Ns(X),se);if(X.$$typeof===k)return ut(Y,q,qs(Y,X),se);zs(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(o(Y,q.sibling),se=f(q,X),se.return=Y,Y=se):(o(Y,q),se=ad(X,Y.mode,se),se.return=Y,Y=se),S(Y)):o(Y,q)}return function(Y,q,X,se){try{fo=0;var ve=ut(Y,q,X,se);return li=null,ve}catch(Se){if(Se===co)throw Se;var Ie=ka(29,Se,null,Y.mode);return Ie.lanes=se,Ie.return=Y,Ie}finally{}}}var kr=p0(!0),g0=p0(!1),ci=pe(null),Cs=pe(0);function m0(t,a){t=sn,xe(Cs,t),xe(ci,a),sn=t|a.baseLanes}function cu(){xe(Cs,sn),xe(ci,ci.current)}function uu(){sn=Cs.current,we(ci),we(Cs)}var _a=pe(null),Ua=null;function _n(t){var a=t.alternate;xe(wt,wt.current&1),xe(_a,t),Ua===null&&(a===null||ci.current!==null||a.memoizedState!==null)&&(Ua=t)}function h0(t){if(t.tag===22){if(xe(wt,wt.current),xe(_a,t),Ua===null){var a=t.alternate;a!==null&&a.memoizedState!==null&&(Ua=t)}}else Sn()}function Sn(){xe(wt,wt.current),xe(_a,_a.current)}function Wa(t){we(_a),Ua===t&&(Ua=null),we(wt)}var wt=pe(0);function Es(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var $2=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,l){t.push(l)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},b2=e.unstable_scheduleCallback,x2=e.unstable_NormalPriority,kt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function du(){return{controller:new $2,data:new Map,refCount:0}}function go(t){t.refCount--,t.refCount===0&&b2(x2,function(){t.controller.abort()})}var mo=null,fu=0,ui=0,di=null;function j2(t,a){if(mo===null){var o=mo=[];fu=0,ui=vd(),di={status:"pending",value:void 0,then:function(l){o.push(l)}}}return fu++,a.then(y0,y0),a}function y0(){if(--fu===0&&mo!==null){di!==null&&(di.status="fulfilled");var t=mo;mo=null,ui=0,di=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function _2(t,a){var o=[],l={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return t.then(function(){l.status="fulfilled",l.value=a;for(var f=0;f<o.length;f++)(0,o[f])(a)},function(f){for(l.status="rejected",l.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),l}var v0=I.S;I.S=function(t,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&j2(t,a),v0!==null&&v0(t,a)};var Nr=pe(null);function pu(){var t=Nr.current;return t!==null?t:Qe.pooledCache}function Ts(t,a){a===null?xe(Nr,Nr.current):xe(Nr,a.pool)}function $0(){var t=pu();return t===null?null:{parent:kt._currentValue,pool:t}}var wn=0,Oe=null,Ye=null,vt=null,Ms=!1,fi=!1,zr=!1,Rs=0,ho=0,pi=null,S2=0;function ht(){throw Error(s(321))}function gu(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!ua(t[o],a[o]))return!1;return!0}function mu(t,a,o,l,f,m){return wn=m,Oe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=t===null||t.memoizedState===null?Cr:kn,zr=!1,m=o(l,f),zr=!1,fi&&(m=x0(a,o,l,f)),b0(t),m}function b0(t){I.H=La;var a=Ye!==null&&Ye.next!==null;if(wn=0,vt=Ye=Oe=null,Ms=!1,ho=0,pi=null,a)throw Error(s(300));t===null||Tt||(t=t.dependencies,t!==null&&Bs(t)&&(Tt=!0))}function x0(t,a,o,l){Oe=t;var f=0;do{if(fi&&(pi=null),ho=0,fi=!1,25<=f)throw Error(s(301));if(f+=1,vt=Ye=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}I.H=Er,m=a(o,l)}while(fi);return m}function w2(){var t=I.H,a=t.useState()[0];return a=typeof a.then=="function"?yo(a):a,t=t.useState()[0],(Ye!==null?Ye.memoizedState:null)!==t&&(Oe.flags|=1024),a}function hu(){var t=Rs!==0;return Rs=0,t}function yu(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function vu(t){if(Ms){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Ms=!1}wn=0,vt=Ye=Oe=null,fi=!1,ho=Rs=0,pi=null}function na(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Oe.memoizedState=vt=t:vt=vt.next=t,vt}function $t(){if(Ye===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=Ye.next;var a=vt===null?Oe.memoizedState:vt.next;if(a!==null)vt=a,Ye=t;else{if(t===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));Ye=t,t={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},vt===null?Oe.memoizedState=vt=t:vt=vt.next=t}return vt}var Os;Os=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function yo(t){var a=ho;return ho+=1,pi===null&&(pi=[]),t=u0(pi,t,a),a=Oe,(vt===null?a.memoizedState:vt.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Cr:kn),t}function As(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return yo(t);if(t.$$typeof===k)return Bt(t)}throw Error(s(438,String(t)))}function $u(t){var a=null,o=Oe.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var l=Oe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(a={data:l.data.map(function(f){return f.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Os(),Oe.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),l=0;l<t;l++)o[l]=R;return a.index++,o}function Xa(t,a){return typeof a=="function"?a(t):a}function Ds(t){var a=$t();return bu(a,Ye,t)}function bu(t,a,o){var l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=o;var f=t.baseQueue,m=l.pending;if(m!==null){if(f!==null){var S=f.next;f.next=m.next,m.next=S}a.baseQueue=f=m,l.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{a=f.next;var M=S=null,L=null,Z=a,ie=!1;do{var ue=Z.lane&-536870913;if(ue!==Z.lane?(Be&ue)===ue:(wn&ue)===ue){var te=Z.revertLane;if(te===0)L!==null&&(L=L.next={lane:0,revertLane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ue===ui&&(ie=!0);else if((wn&te)===te){Z=Z.next,te===ui&&(ie=!0);continue}else ue={lane:0,revertLane:Z.revertLane,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},L===null?(M=L=ue,S=m):L=L.next=ue,Oe.lanes|=te,An|=te;ue=Z.action,zr&&o(m,ue),m=Z.hasEagerState?Z.eagerState:o(m,ue)}else te={lane:ue,revertLane:Z.revertLane,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},L===null?(M=L=te,S=m):L=L.next=te,Oe.lanes|=ue,An|=ue;Z=Z.next}while(Z!==null&&Z!==a);if(L===null?S=m:L.next=M,!ua(m,t.memoizedState)&&(Tt=!0,ie&&(o=di,o!==null)))throw o;t.memoizedState=m,t.baseState=S,t.baseQueue=L,l.lastRenderedState=m}return f===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function xu(t){var a=$t(),o=a.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=o.dispatch,f=o.pending,m=a.memoizedState;if(f!==null){o.pending=null;var S=f=f.next;do m=t(m,S.action),S=S.next;while(S!==f);ua(m,a.memoizedState)||(Tt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),o.lastRenderedState=m}return[m,l]}function j0(t,a,o){var l=Oe,f=$t(),m=Pe;if(m){if(o===void 0)throw Error(s(407));o=o()}else o=a();var S=!ua((Ye||f).memoizedState,o);if(S&&(f.memoizedState=o,Tt=!0),f=f.queue,Su(w0.bind(null,l,f,t),[t]),f.getSnapshot!==a||S||vt!==null&&vt.memoizedState.tag&1){if(l.flags|=2048,gi(9,S0.bind(null,l,f,o,a),{destroy:void 0},null),Qe===null)throw Error(s(349));m||(wn&60)!==0||_0(l,a,o)}return o}function _0(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=Oe.updateQueue,a===null?(a=Os(),Oe.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function S0(t,a,o,l){a.value=o,a.getSnapshot=l,k0(a)&&N0(t)}function w0(t,a,o){return o(function(){k0(a)&&N0(t)})}function k0(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!ua(t,o)}catch{return!0}}function N0(t){var a=jn(t,2);a!==null&&Yt(a,t,2)}function ju(t){var a=na();if(typeof t=="function"){var o=t;if(t=o(),zr){$n(!0);try{o()}finally{$n(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:t},a}function z0(t,a,o,l){return t.baseState=o,bu(t,Ye,typeof l=="function"?l:Xa)}function k2(t,a,o,l,f){if(Ls(t))throw Error(s(485));if(t=a.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};I.T!==null?o(!0):m.isTransition=!1,l(m),o=a.pending,o===null?(m.next=a.pending=m,C0(a,m)):(m.next=o.next,a.pending=o.next=m)}}function C0(t,a){var o=a.action,l=a.payload,f=t.state;if(a.isTransition){var m=I.T,S={};I.T=S;try{var M=o(f,l),L=I.S;L!==null&&L(S,M),E0(t,a,M)}catch(Z){_u(t,a,Z)}finally{I.T=m}}else try{m=o(f,l),E0(t,a,m)}catch(Z){_u(t,a,Z)}}function E0(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){T0(t,a,l)},function(l){return _u(t,a,l)}):T0(t,a,o)}function T0(t,a,o){a.status="fulfilled",a.value=o,M0(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,C0(t,o)))}function _u(t,a,o){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do a.status="rejected",a.reason=o,M0(a),a=a.next;while(a!==l)}t.action=null}function M0(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function R0(t,a){return a}function O0(t,a){if(Pe){var o=Qe.formState;if(o!==null){e:{var l=Oe;if(Pe){if(At){t:{for(var f=At,m=Ia;f.nodeType!==8;){if(!m){f=null;break t}if(f=Oa(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){At=Oa(f.nextSibling),l=f.data==="F!";break e}}wr(l)}l=!1}l&&(a=o[0])}}return o=na(),o.memoizedState=o.baseState=a,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:R0,lastRenderedState:a},o.queue=l,o=J0.bind(null,Oe,l),l.dispatch=o,l=ju(!1),m=Cu.bind(null,Oe,!1,l.queue),l=na(),f={state:a,dispatch:null,action:t,pending:null},l.queue=f,o=k2.bind(null,Oe,f,m,o),f.dispatch=o,l.memoizedState=t,[a,o,!1]}function A0(t){var a=$t();return D0(a,Ye,t)}function D0(t,a,o){a=bu(t,a,R0)[0],t=Ds(Xa)[0],a=typeof a=="object"&&a!==null&&typeof a.then=="function"?yo(a):a;var l=$t(),f=l.queue,m=f.dispatch;return o!==l.memoizedState&&(Oe.flags|=2048,gi(9,N2.bind(null,f,o),{destroy:void 0},null)),[a,m,t]}function N2(t,a){t.action=a}function I0(t){var a=$t(),o=Ye;if(o!==null)return D0(a,o,t);$t(),a=a.memoizedState,o=$t();var l=o.queue.dispatch;return o.memoizedState=t,[a,l,!1]}function gi(t,a,o,l){return t={tag:t,create:a,inst:o,deps:l,next:null},a=Oe.updateQueue,a===null&&(a=Os(),Oe.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(l=o.next,o.next=t,t.next=l,a.lastEffect=t),t}function U0(){return $t().memoizedState}function Is(t,a,o,l){var f=na();Oe.flags|=t,f.memoizedState=gi(1|a,o,{destroy:void 0},l===void 0?null:l)}function Us(t,a,o,l){var f=$t();l=l===void 0?null:l;var m=f.memoizedState.inst;Ye!==null&&l!==null&&gu(l,Ye.memoizedState.deps)?f.memoizedState=gi(a,o,m,l):(Oe.flags|=t,f.memoizedState=gi(1|a,o,m,l))}function L0(t,a){Is(8390656,8,t,a)}function Su(t,a){Us(2048,8,t,a)}function V0(t,a){return Us(4,2,t,a)}function H0(t,a){return Us(4,4,t,a)}function B0(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function q0(t,a,o){o=o!=null?o.concat([t]):null,Us(4,4,B0.bind(null,a,t),o)}function wu(){}function P0(t,a){var o=$t();a=a===void 0?null:a;var l=o.memoizedState;return a!==null&&gu(a,l[1])?l[0]:(o.memoizedState=[t,a],t)}function Z0(t,a){var o=$t();a=a===void 0?null:a;var l=o.memoizedState;if(a!==null&&gu(a,l[1]))return l[0];if(l=t(),zr){$n(!0);try{t()}finally{$n(!1)}}return o.memoizedState=[l,a],l}function ku(t,a,o){return o===void 0||(wn&1073741824)!==0?t.memoizedState=a:(t.memoizedState=o,t=Fg(),Oe.lanes|=t,An|=t,o)}function G0(t,a,o,l){return ua(o,a)?o:ci.current!==null?(t=ku(t,o,l),ua(t,a)||(Tt=!0),t):(wn&42)===0?(Tt=!0,t.memoizedState=o):(t=Fg(),Oe.lanes|=t,An|=t,a)}function F0(t,a,o,l,f){var m=E.p;E.p=m!==0&&8>m?m:8;var S=I.T,M={};I.T=M,Cu(t,!1,a,o);try{var L=f(),Z=I.S;if(Z!==null&&Z(M,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ie=_2(L,l);vo(t,a,ie,ga(t))}else vo(t,a,l,ga(t))}catch(ue){vo(t,a,{then:function(){},status:"rejected",reason:ue},ga())}finally{E.p=m,I.T=S}}function z2(){}function Nu(t,a,o,l){if(t.tag!==5)throw Error(s(476));var f=Y0(t).queue;F0(t,f,a,V,o===null?z2:function(){return K0(t),o(l)})}function Y0(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:V},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function K0(t){var a=Y0(t).next.queue;vo(t,a,{},ga())}function zu(){return Bt(Uo)}function W0(){return $t().memoizedState}function X0(){return $t().memoizedState}function C2(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=ga();t=Cn(o);var l=En(a,t,o);l!==null&&(Yt(l,a,o),xo(l,a,o)),a={cache:du()},t.payload=a;return}a=a.return}}function E2(t,a,o){var l=ga();o={lane:l,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},Ls(t)?Q0(a,o):(o=ru(t,a,o,l),o!==null&&(Yt(o,t,l),eg(o,a,l)))}function J0(t,a,o){var l=ga();vo(t,a,o,l)}function vo(t,a,o,l){var f={lane:l,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(Ls(t))Q0(a,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var S=a.lastRenderedState,M=m(S,o);if(f.hasEagerState=!0,f.eagerState=M,ua(M,S))return js(t,a,f,0),Qe===null&&xs(),!1}catch{}finally{}if(o=ru(t,a,f,l),o!==null)return Yt(o,t,l),eg(o,a,l),!0}return!1}function Cu(t,a,o,l){if(l={lane:2,revertLane:vd(),action:l,hasEagerState:!1,eagerState:null,next:null},Ls(t)){if(a)throw Error(s(479))}else a=ru(t,o,l,2),a!==null&&Yt(a,t,2)}function Ls(t){var a=t.alternate;return t===Oe||a!==null&&a===Oe}function Q0(t,a){fi=Ms=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function eg(t,a,o){if((o&4194176)!==0){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,dp(t,o)}}var La={readContext:Bt,use:As,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht};La.useCacheRefresh=ht,La.useMemoCache=ht,La.useHostTransitionStatus=ht,La.useFormState=ht,La.useActionState=ht,La.useOptimistic=ht;var Cr={readContext:Bt,use:As,useCallback:function(t,a){return na().memoizedState=[t,a===void 0?null:a],t},useContext:Bt,useEffect:L0,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,Is(4194308,4,B0.bind(null,a,t),o)},useLayoutEffect:function(t,a){return Is(4194308,4,t,a)},useInsertionEffect:function(t,a){Is(4,2,t,a)},useMemo:function(t,a){var o=na();a=a===void 0?null:a;var l=t();if(zr){$n(!0);try{t()}finally{$n(!1)}}return o.memoizedState=[l,a],l},useReducer:function(t,a,o){var l=na();if(o!==void 0){var f=o(a);if(zr){$n(!0);try{o(a)}finally{$n(!1)}}}else f=a;return l.memoizedState=l.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},l.queue=t,t=t.dispatch=E2.bind(null,Oe,t),[l.memoizedState,t]},useRef:function(t){var a=na();return t={current:t},a.memoizedState=t},useState:function(t){t=ju(t);var a=t.queue,o=J0.bind(null,Oe,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:wu,useDeferredValue:function(t,a){var o=na();return ku(o,t,a)},useTransition:function(){var t=ju(!1);return t=F0.bind(null,Oe,t.queue,!0,!1),na().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var l=Oe,f=na();if(Pe){if(o===void 0)throw Error(s(407));o=o()}else{if(o=a(),Qe===null)throw Error(s(349));(Be&60)!==0||_0(l,a,o)}f.memoizedState=o;var m={value:o,getSnapshot:a};return f.queue=m,L0(w0.bind(null,l,m,t),[t]),l.flags|=2048,gi(9,S0.bind(null,l,m,o,a),{destroy:void 0},null),o},useId:function(){var t=na(),a=Qe.identifierPrefix;if(Pe){var o=Ka,l=Ya;o=(l&~(1<<32-ca(l)-1)).toString(32)+o,a=":"+a+"R"+o,o=Rs++,0<o&&(a+="H"+o.toString(32)),a+=":"}else o=S2++,a=":"+a+"r"+o.toString(32)+":";return t.memoizedState=a},useCacheRefresh:function(){return na().memoizedState=C2.bind(null,Oe)}};Cr.useMemoCache=$u,Cr.useHostTransitionStatus=zu,Cr.useFormState=O0,Cr.useActionState=O0,Cr.useOptimistic=function(t){var a=na();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Cu.bind(null,Oe,!0,o),o.dispatch=a,[t,a]};var kn={readContext:Bt,use:As,useCallback:P0,useContext:Bt,useEffect:Su,useImperativeHandle:q0,useInsertionEffect:V0,useLayoutEffect:H0,useMemo:Z0,useReducer:Ds,useRef:U0,useState:function(){return Ds(Xa)},useDebugValue:wu,useDeferredValue:function(t,a){var o=$t();return G0(o,Ye.memoizedState,t,a)},useTransition:function(){var t=Ds(Xa)[0],a=$t().memoizedState;return[typeof t=="boolean"?t:yo(t),a]},useSyncExternalStore:j0,useId:W0};kn.useCacheRefresh=X0,kn.useMemoCache=$u,kn.useHostTransitionStatus=zu,kn.useFormState=A0,kn.useActionState=A0,kn.useOptimistic=function(t,a){var o=$t();return z0(o,Ye,t,a)};var Er={readContext:Bt,use:As,useCallback:P0,useContext:Bt,useEffect:Su,useImperativeHandle:q0,useInsertionEffect:V0,useLayoutEffect:H0,useMemo:Z0,useReducer:xu,useRef:U0,useState:function(){return xu(Xa)},useDebugValue:wu,useDeferredValue:function(t,a){var o=$t();return Ye===null?ku(o,t,a):G0(o,Ye.memoizedState,t,a)},useTransition:function(){var t=xu(Xa)[0],a=$t().memoizedState;return[typeof t=="boolean"?t:yo(t),a]},useSyncExternalStore:j0,useId:W0};Er.useCacheRefresh=X0,Er.useMemoCache=$u,Er.useHostTransitionStatus=zu,Er.useFormState=I0,Er.useActionState=I0,Er.useOptimistic=function(t,a){var o=$t();return Ye!==null?z0(o,Ye,t,a):(o.baseState=t,[t,o.queue.dispatch])};function Eu(t,a,o,l){a=t.memoizedState,o=o(l,a),o=o==null?a:P({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Tu={isMounted:function(t){return(t=t._reactInternals)?fe(t)===t:!1},enqueueSetState:function(t,a,o){t=t._reactInternals;var l=ga(),f=Cn(l);f.payload=a,o!=null&&(f.callback=o),a=En(t,f,l),a!==null&&(Yt(a,t,l),xo(a,t,l))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var l=ga(),f=Cn(l);f.tag=1,f.payload=a,o!=null&&(f.callback=o),a=En(t,f,l),a!==null&&(Yt(a,t,l),xo(a,t,l))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=ga(),l=Cn(o);l.tag=2,a!=null&&(l.callback=a),a=En(t,l,o),a!==null&&(Yt(a,t,o),xo(a,t,o))}};function tg(t,a,o,l,f,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,S):a.prototype&&a.prototype.isPureReactComponent?!ro(o,l)||!ro(f,m):!0}function ag(t,a,o,l){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,l),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,l),a.state!==t&&Tu.enqueueReplaceState(a,a.state,null)}function Tr(t,a){var o=a;if("ref"in a){o={};for(var l in a)l!=="ref"&&(o[l]=a[l])}if(t=t.defaultProps){o===a&&(o=P({},o));for(var f in t)o[f]===void 0&&(o[f]=t[f])}return o}var Vs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function ng(t){Vs(t)}function rg(t){console.error(t)}function ig(t){Vs(t)}function Hs(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(l){setTimeout(function(){throw l})}}function og(t,a,o){try{var l=t.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Mu(t,a,o){return o=Cn(o),o.tag=3,o.payload={element:null},o.callback=function(){Hs(t,a)},o}function sg(t){return t=Cn(t),t.tag=3,t}function lg(t,a,o,l){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;t.payload=function(){return f(m)},t.callback=function(){og(a,o,l)}}var S=o.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){og(a,o,l),typeof f!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var M=l.stack;this.componentDidCatch(l.value,{componentStack:M!==null?M:""})})}function T2(t,a,o,l,f){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(a=o.alternate,a!==null&&bo(a,o,f,!0),o=_a.current,o!==null){switch(o.tag){case 13:return Ua===null?pd():o.alternate===null&&ct===0&&(ct=3),o.flags&=-257,o.flags|=65536,o.lanes=f,l===lu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([l]):a.add(l),md(t,l,f)),!1;case 22:return o.flags|=65536,l===lu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([l]):o.add(l)),md(t,l,f)),!1}throw Error(s(435,o.tag))}return md(t,l,f),pd(),!1}if(Pe)return a=_a.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,l!==su&&(t=Error(s(422),{cause:l}),lo(ba(t,o)))):(l!==su&&(a=Error(s(423),{cause:l}),lo(ba(a,o))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,l=ba(l,o),f=Mu(t.stateNode,l,f),Fu(t,f),ct!==4&&(ct=2)),!1;var m=Error(s(520),{cause:l});if(m=ba(m,o),Co===null?Co=[m]:Co.push(m),ct!==4&&(ct=2),a===null)return!0;l=ba(l,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=f&-f,o.lanes|=t,t=Mu(o.stateNode,l,t),Fu(o,t),!1;case 1:if(a=o.type,m=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Dn===null||!Dn.has(m))))return o.flags|=65536,f&=-f,o.lanes|=f,f=sg(f),lg(f,t,o,l),Fu(o,f),!1}o=o.return}while(o!==null);return!1}var cg=Error(s(461)),Tt=!1;function Dt(t,a,o,l){a.child=t===null?g0(a,null,o,l):kr(a,t.child,o,l)}function ug(t,a,o,l,f){o=o.render;var m=a.ref;if("ref"in l){var S={};for(var M in l)M!=="ref"&&(S[M]=l[M])}else S=l;return Rr(a),l=mu(t,a,o,S,m,f),M=hu(),t!==null&&!Tt?(yu(t,a,f),Ja(t,a,f)):(Pe&&M&&iu(a),a.flags|=1,Dt(t,a,l,f),a.child)}function dg(t,a,o,l,f){if(t===null){var m=o.type;return typeof m=="function"&&!td(m)&&m.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=m,fg(t,a,m,l,f)):(t=Gs(o.type,null,l,a,a.mode,f),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!Hu(t,f)){var S=m.memoizedProps;if(o=o.compare,o=o!==null?o:ro,o(S,l)&&t.ref===a.ref)return Ja(t,a,f)}return a.flags|=1,t=On(m,l),t.ref=a.ref,t.return=a,a.child=t}function fg(t,a,o,l,f){if(t!==null){var m=t.memoizedProps;if(ro(m,l)&&t.ref===a.ref)if(Tt=!1,a.pendingProps=l=m,Hu(t,f))(t.flags&131072)!==0&&(Tt=!0);else return a.lanes=t.lanes,Ja(t,a,f)}return Ru(t,a,o,l,f)}function pg(t,a,o){var l=a.pendingProps,f=l.children,m=(a.stateNode._pendingVisibility&2)!==0,S=t!==null?t.memoizedState:null;if($o(t,a),l.mode==="hidden"||m){if((a.flags&128)!==0){if(l=S!==null?S.baseLanes|o:o,t!==null){for(f=a.child=t.child,m=0;f!==null;)m=m|f.lanes|f.childLanes,f=f.sibling;a.childLanes=m&~l}else a.childLanes=0,a.child=null;return gg(t,a,l,o)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ts(a,S!==null?S.cachePool:null),S!==null?m0(a,S):cu(),h0(a);else return a.lanes=a.childLanes=536870912,gg(t,a,S!==null?S.baseLanes|o:o,o)}else S!==null?(Ts(a,S.cachePool),m0(a,S),Sn(),a.memoizedState=null):(t!==null&&Ts(a,null),cu(),Sn());return Dt(t,a,f,o),a.child}function gg(t,a,o,l){var f=pu();return f=f===null?null:{parent:kt._currentValue,pool:f},a.memoizedState={baseLanes:o,cachePool:f},t!==null&&Ts(a,null),cu(),h0(a),t!==null&&bo(t,a,l,!0),null}function $o(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=2097664);else{if(typeof o!="function"&&typeof o!="object")throw Error(s(284));(t===null||t.ref!==o)&&(a.flags|=2097664)}}function Ru(t,a,o,l,f){return Rr(a),o=mu(t,a,o,l,void 0,f),l=hu(),t!==null&&!Tt?(yu(t,a,f),Ja(t,a,f)):(Pe&&l&&iu(a),a.flags|=1,Dt(t,a,o,f),a.child)}function mg(t,a,o,l,f,m){return Rr(a),a.updateQueue=null,o=x0(a,l,o,f),b0(t),l=hu(),t!==null&&!Tt?(yu(t,a,m),Ja(t,a,m)):(Pe&&l&&iu(a),a.flags|=1,Dt(t,a,o,m),a.child)}function hg(t,a,o,l,f){if(Rr(a),a.stateNode===null){var m=ii,S=o.contextType;typeof S=="object"&&S!==null&&(m=Bt(S)),m=new o(l,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Tu,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=l,m.state=a.memoizedState,m.refs={},Zu(a),S=o.contextType,m.context=typeof S=="object"&&S!==null?Bt(S):ii,m.state=a.memoizedState,S=o.getDerivedStateFromProps,typeof S=="function"&&(Eu(a,o,S,l),m.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Tu.enqueueReplaceState(m,m.state,null),_o(a,l,m,f),jo(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),l=!0}else if(t===null){m=a.stateNode;var M=a.memoizedProps,L=Tr(o,M);m.props=L;var Z=m.context,ie=o.contextType;S=ii,typeof ie=="object"&&ie!==null&&(S=Bt(ie));var ue=o.getDerivedStateFromProps;ie=typeof ue=="function"||typeof m.getSnapshotBeforeUpdate=="function",M=a.pendingProps!==M,ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(M||Z!==S)&&ag(a,m,l,S),zn=!1;var te=a.memoizedState;m.state=te,_o(a,l,m,f),jo(),Z=a.memoizedState,M||te!==Z||zn?(typeof ue=="function"&&(Eu(a,o,ue,l),Z=a.memoizedState),(L=zn||tg(a,o,L,l,te,Z,S))?(ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=l,a.memoizedState=Z),m.props=l,m.state=Z,m.context=S,l=L):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),l=!1)}else{m=a.stateNode,Gu(t,a),S=a.memoizedProps,ie=Tr(o,S),m.props=ie,ue=a.pendingProps,te=m.context,Z=o.contextType,L=ii,typeof Z=="object"&&Z!==null&&(L=Bt(Z)),M=o.getDerivedStateFromProps,(Z=typeof M=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ue||te!==L)&&ag(a,m,l,L),zn=!1,te=a.memoizedState,m.state=te,_o(a,l,m,f),jo();var ae=a.memoizedState;S!==ue||te!==ae||zn||t!==null&&t.dependencies!==null&&Bs(t.dependencies)?(typeof M=="function"&&(Eu(a,o,M,l),ae=a.memoizedState),(ie=zn||tg(a,o,ie,l,te,ae,L)||t!==null&&t.dependencies!==null&&Bs(t.dependencies))?(Z||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,ae,L),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,ae,L)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(a.flags|=1024),a.memoizedProps=l,a.memoizedState=ae),m.props=l,m.state=ae,m.context=L,l=ie):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(a.flags|=1024),l=!1)}return m=l,$o(t,a),l=(a.flags&128)!==0,m||l?(m=a.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&l?(a.child=kr(a,t.child,null,f),a.child=kr(a,null,o,f)):Dt(t,a,o,f),a.memoizedState=m.state,t=a.child):t=Ja(t,a,f),t}function yg(t,a,o,l){return so(),a.flags|=256,Dt(t,a,o,l),a.child}var Ou={dehydrated:null,treeContext:null,retryLane:0};function Au(t){return{baseLanes:t,cachePool:$0()}}function Du(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=Na),t}function vg(t,a,o){var l=a.pendingProps,f=!1,m=(a.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(wt.current&2)!==0),S&&(f=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,t===null){if(Pe){if(f?_n(a):Sn(),Pe){var M=At,L;if(L=M){e:{for(L=M,M=Ia;L.nodeType!==8;){if(!M){M=null;break e}if(L=Oa(L.nextSibling),L===null){M=null;break e}}M=L}M!==null?(a.memoizedState={dehydrated:M,treeContext:_r!==null?{id:Ya,overflow:Ka}:null,retryLane:536870912},L=ka(18,null,null,0),L.stateNode=M,L.return=a,a.child=L,Ft=a,At=null,L=!0):L=!1}L||wr(a)}if(M=a.memoizedState,M!==null&&(M=M.dehydrated,M!==null))return M.data==="$!"?a.lanes=16:a.lanes=536870912,null;Wa(a)}return M=l.children,l=l.fallback,f?(Sn(),f=a.mode,M=Uu({mode:"hidden",children:M},f),l=Ar(l,f,o,null),M.return=a,l.return=a,M.sibling=l,a.child=M,f=a.child,f.memoizedState=Au(o),f.childLanes=Du(t,S,o),a.memoizedState=Ou,l):(_n(a),Iu(a,M))}if(L=t.memoizedState,L!==null&&(M=L.dehydrated,M!==null)){if(m)a.flags&256?(_n(a),a.flags&=-257,a=Lu(t,a,o)):a.memoizedState!==null?(Sn(),a.child=t.child,a.flags|=128,a=null):(Sn(),f=l.fallback,M=a.mode,l=Uu({mode:"visible",children:l.children},M),f=Ar(f,M,o,null),f.flags|=2,l.return=a,f.return=a,l.sibling=f,a.child=l,kr(a,t.child,null,o),l=a.child,l.memoizedState=Au(o),l.childLanes=Du(t,S,o),a.memoizedState=Ou,a=f);else if(_n(a),M.data==="$!"){if(S=M.nextSibling&&M.nextSibling.dataset,S)var Z=S.dgst;S=Z,l=Error(s(419)),l.stack="",l.digest=S,lo({value:l,source:null,stack:null}),a=Lu(t,a,o)}else if(Tt||bo(t,a,o,!1),S=(o&t.childLanes)!==0,Tt||S){if(S=Qe,S!==null){if(l=o&-o,(l&42)!==0)l=1;else switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;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:l=64;break;case 268435456:l=134217728;break;default:l=0}if(l=(l&(S.suspendedLanes|o))!==0?0:l,l!==0&&l!==L.retryLane)throw L.retryLane=l,jn(t,l),Yt(S,t,l),cg}M.data==="$?"||pd(),a=Lu(t,a,o)}else M.data==="$?"?(a.flags|=128,a.child=t.child,a=G2.bind(null,t),M._reactRetry=a,a=null):(t=L.treeContext,At=Oa(M.nextSibling),Ft=a,Pe=!0,Ma=null,Ia=!1,t!==null&&(xa[ja++]=Ya,xa[ja++]=Ka,xa[ja++]=_r,Ya=t.id,Ka=t.overflow,_r=a),a=Iu(a,l.children),a.flags|=4096);return a}return f?(Sn(),f=l.fallback,M=a.mode,L=t.child,Z=L.sibling,l=On(L,{mode:"hidden",children:l.children}),l.subtreeFlags=L.subtreeFlags&31457280,Z!==null?f=On(Z,f):(f=Ar(f,M,o,null),f.flags|=2),f.return=a,l.return=a,l.sibling=f,a.child=l,l=f,f=a.child,M=t.child.memoizedState,M===null?M=Au(o):(L=M.cachePool,L!==null?(Z=kt._currentValue,L=L.parent!==Z?{parent:Z,pool:Z}:L):L=$0(),M={baseLanes:M.baseLanes|o,cachePool:L}),f.memoizedState=M,f.childLanes=Du(t,S,o),a.memoizedState=Ou,l):(_n(a),o=t.child,t=o.sibling,o=On(o,{mode:"visible",children:l.children}),o.return=a,o.sibling=null,t!==null&&(S=a.deletions,S===null?(a.deletions=[t],a.flags|=16):S.push(t)),a.child=o,a.memoizedState=null,o)}function Iu(t,a){return a=Uu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Uu(t,a){return Pg(t,a,0,null)}function Lu(t,a,o){return kr(a,t.child,null,o),t=Iu(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function $g(t,a,o){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a),qu(t.return,a,o)}function Vu(t,a,o,l,f){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:f}:(m.isBackwards=a,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=f)}function bg(t,a,o){var l=a.pendingProps,f=l.revealOrder,m=l.tail;if(Dt(t,a,l.children,o),l=wt.current,(l&2)!==0)l=l&1|2,a.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&$g(t,o,a);else if(t.tag===19)$g(t,o,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(xe(wt,l),f){case"forwards":for(o=a.child,f=null;o!==null;)t=o.alternate,t!==null&&Es(t)===null&&(f=o),o=o.sibling;o=f,o===null?(f=a.child,a.child=null):(f=o.sibling,o.sibling=null),Vu(a,!1,f,o,m);break;case"backwards":for(o=null,f=a.child,a.child=null;f!==null;){if(t=f.alternate,t!==null&&Es(t)===null){a.child=f;break}t=f.sibling,f.sibling=o,o=f,f=t}Vu(a,!0,o,null,m);break;case"together":Vu(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Ja(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),An|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(bo(t,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(s(153));if(a.child!==null){for(t=a.child,o=On(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=On(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Hu(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Bs(t)))}function M2(t,a,o){switch(a.tag){case 3:be(a,a.stateNode.containerInfo),Nn(a,kt,t.memoizedState.cache),so();break;case 27:case 5:gt(a);break;case 4:be(a,a.stateNode.containerInfo);break;case 10:Nn(a,a.type,a.memoizedProps.value);break;case 13:var l=a.memoizedState;if(l!==null)return l.dehydrated!==null?(_n(a),a.flags|=128,null):(o&a.child.childLanes)!==0?vg(t,a,o):(_n(a),t=Ja(t,a,o),t!==null?t.sibling:null);_n(a);break;case 19:var f=(t.flags&128)!==0;if(l=(o&a.childLanes)!==0,l||(bo(t,a,o,!1),l=(o&a.childLanes)!==0),f){if(l)return bg(t,a,o);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),xe(wt,wt.current),l)break;return null;case 22:case 23:return a.lanes=0,pg(t,a,o);case 24:Nn(a,kt,t.memoizedState.cache)}return Ja(t,a,o)}function xg(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)Tt=!0;else{if(!Hu(t,o)&&(a.flags&128)===0)return Tt=!1,M2(t,a,o);Tt=(t.flags&131072)!==0}else Tt=!1,Pe&&(a.flags&1048576)!==0&&i0(a,ws,a.index);switch(a.lanes=0,a.tag){case 16:e:{t=a.pendingProps;var l=a.elementType,f=l._init;if(l=f(l._payload),a.type=l,typeof l=="function")td(l)?(t=Tr(l,t),a.tag=1,a=hg(null,a,l,t,o)):(a.tag=0,a=Ru(null,a,l,t,o));else{if(l!=null){if(f=l.$$typeof,f===b){a.tag=11,a=ug(null,a,l,t,o);break e}else if(f===N){a.tag=14,a=dg(null,a,l,t,o);break e}}throw a=A(l)||l,Error(s(306,a,""))}}return a;case 0:return Ru(t,a,a.type,a.pendingProps,o);case 1:return l=a.type,f=Tr(l,a.pendingProps),hg(t,a,l,f,o);case 3:e:{if(be(a,a.stateNode.containerInfo),t===null)throw Error(s(387));var m=a.pendingProps;f=a.memoizedState,l=f.element,Gu(t,a),_o(a,m,null,o);var S=a.memoizedState;if(m=S.cache,Nn(a,kt,m),m!==f.cache&&Pu(a,[kt],o,!0),jo(),m=S.element,f.isDehydrated)if(f={element:m,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=f,a.memoizedState=f,a.flags&256){a=yg(t,a,m,o);break e}else if(m!==l){l=ba(Error(s(424)),a),lo(l),a=yg(t,a,m,o);break e}else for(At=Oa(a.stateNode.containerInfo.firstChild),Ft=a,Pe=!0,Ma=null,Ia=!0,o=g0(a,null,m,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(so(),m===l){a=Ja(t,a,o);break e}Dt(t,a,m,o)}a=a.child}return a;case 26:return $o(t,a),t===null?(o=Sm(a.type,null,a.pendingProps,null))?a.memoizedState=o:Pe||(o=a.type,t=a.pendingProps,l=rl(oe.current).createElement(o),l[Ht]=a,l[ta]=t,It(l,o,t),Et(l),a.stateNode=l):a.memoizedState=Sm(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return gt(a),t===null&&Pe&&(l=a.stateNode=xm(a.type,a.pendingProps,oe.current),Ft=a,Ia=!0,At=Oa(l.firstChild)),l=a.pendingProps.children,t!==null||Pe?Dt(t,a,l,o):a.child=kr(a,null,l,o),$o(t,a),a.child;case 5:return t===null&&Pe&&((f=l=At)&&(l=lb(l,a.type,a.pendingProps,Ia),l!==null?(a.stateNode=l,Ft=a,At=Oa(l.firstChild),Ia=!1,f=!0):f=!1),f||wr(a)),gt(a),f=a.type,m=a.pendingProps,S=t!==null?t.memoizedProps:null,l=m.children,Nd(f,m)?l=null:S!==null&&Nd(f,S)&&(a.flags|=32),a.memoizedState!==null&&(f=mu(t,a,w2,null,null,o),Uo._currentValue=f),$o(t,a),Dt(t,a,l,o),a.child;case 6:return t===null&&Pe&&((t=o=At)&&(o=cb(o,a.pendingProps,Ia),o!==null?(a.stateNode=o,Ft=a,At=null,t=!0):t=!1),t||wr(a)),null;case 13:return vg(t,a,o);case 4:return be(a,a.stateNode.containerInfo),l=a.pendingProps,t===null?a.child=kr(a,null,l,o):Dt(t,a,l,o),a.child;case 11:return ug(t,a,a.type,a.pendingProps,o);case 7:return Dt(t,a,a.pendingProps,o),a.child;case 8:return Dt(t,a,a.pendingProps.children,o),a.child;case 12:return Dt(t,a,a.pendingProps.children,o),a.child;case 10:return l=a.pendingProps,Nn(a,a.type,l.value),Dt(t,a,l.children,o),a.child;case 9:return f=a.type._context,l=a.pendingProps.children,Rr(a),f=Bt(f),l=l(f),a.flags|=1,Dt(t,a,l,o),a.child;case 14:return dg(t,a,a.type,a.pendingProps,o);case 15:return fg(t,a,a.type,a.pendingProps,o);case 19:return bg(t,a,o);case 22:return pg(t,a,o);case 24:return Rr(a),l=Bt(kt),t===null?(f=pu(),f===null&&(f=Qe,m=du(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=o),f=m),a.memoizedState={parent:l,cache:f},Zu(a),Nn(a,kt,f)):((t.lanes&o)!==0&&(Gu(t,a),_o(a,null,null,o),jo()),f=t.memoizedState,m=a.memoizedState,f.parent!==l?(f={parent:l,cache:l},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),Nn(a,kt,l)):(l=m.cache,Nn(a,kt,l),l!==f.cache&&Pu(a,[kt],o,!0))),Dt(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}var Bu=pe(null),Mr=null,Qa=null;function Nn(t,a,o){xe(Bu,a._currentValue),a._currentValue=o}function en(t){t._currentValue=Bu.current,we(Bu)}function qu(t,a,o){for(;t!==null;){var l=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,l!==null&&(l.childLanes|=a)):l!==null&&(l.childLanes&a)!==a&&(l.childLanes|=a),t===o)break;t=t.return}}function Pu(t,a,o,l){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var S=f.child;m=m.firstContext;e:for(;m!==null;){var M=m;m=f;for(var L=0;L<a.length;L++)if(M.context===a[L]){m.lanes|=o,M=m.alternate,M!==null&&(M.lanes|=o),qu(m.return,o,t),l||(S=null);break e}m=M.next}}else if(f.tag===18){if(S=f.return,S===null)throw Error(s(341));S.lanes|=o,m=S.alternate,m!==null&&(m.lanes|=o),qu(S,o,t),S=null}else S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===t){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}}function bo(t,a,o,l){t=null;for(var f=a,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var S=f.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var M=f.type;ua(f.pendingProps.value,S.value)||(t!==null?t.push(M):t=[M])}}else if(f===ge.current){if(S=f.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(Uo):t=[Uo])}f=f.return}t!==null&&Pu(a,t,o,l),a.flags|=262144}function Bs(t){for(t=t.firstContext;t!==null;){if(!ua(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Rr(t){Mr=t,Qa=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Bt(t){return jg(Mr,t)}function qs(t,a){return Mr===null&&Rr(t),jg(t,a)}function jg(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Qa===null){if(t===null)throw Error(s(308));Qa=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Qa=Qa.next=a;return o}var zn=!1;function Zu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gu(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Cn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function En(t,a,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ot&2)!==0){var f=l.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),l.pending=a,a=_s(t),n0(t,null,o),a}return js(t,l,a,o),_s(t)}function xo(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194176)!==0)){var l=a.lanes;l&=t.pendingLanes,o|=l,a.lanes=o,dp(t,o)}}function Fu(t,a){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var f=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var S={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};m===null?f=m=S:m=m.next=S,o=o.next}while(o!==null);m===null?f=m=a:m=m.next=a}else f=m=a;o={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var Yu=!1;function jo(){if(Yu){var t=di;if(t!==null)throw t}}function _o(t,a,o,l){Yu=!1;var f=t.updateQueue;zn=!1;var m=f.firstBaseUpdate,S=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var L=M,Z=L.next;L.next=null,S===null?m=Z:S.next=Z,S=L;var ie=t.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==S&&(M===null?ie.firstBaseUpdate=Z:M.next=Z,ie.lastBaseUpdate=L))}if(m!==null){var ue=f.baseState;S=0,ie=Z=L=null,M=m;do{var te=M.lane&-536870913,ae=te!==M.lane;if(ae?(Be&te)===te:(l&te)===te){te!==0&&te===ui&&(Yu=!0),ie!==null&&(ie=ie.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var je=t,Ce=M;te=a;var ut=o;switch(Ce.tag){case 1:if(je=Ce.payload,typeof je=="function"){ue=je.call(ut,ue,te);break e}ue=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ce.payload,te=typeof je=="function"?je.call(ut,ue,te):je,te==null)break e;ue=P({},ue,te);break e;case 2:zn=!0}}te=M.callback,te!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=f.callbacks,ae===null?f.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(Z=ie=ae,L=ue):ie=ie.next=ae,S|=te;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,f.lastBaseUpdate=ae,f.shared.pending=null}}while(!0);ie===null&&(L=ue),f.baseState=L,f.firstBaseUpdate=Z,f.lastBaseUpdate=ie,m===null&&(f.shared.lanes=0),An|=S,t.lanes=S,t.memoizedState=ue}}function _g(t,a){if(typeof t!="function")throw Error(s(191,t));t.call(a)}function Sg(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)_g(o[t],a)}function So(t,a){try{var o=a.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var f=l.next;o=f;do{if((o.tag&t)===t){l=void 0;var m=o.create,S=o.inst;l=m(),S.destroy=l}o=o.next}while(o!==f)}}catch(M){Je(a,a.return,M)}}function Tn(t,a,o){try{var l=a.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&t)===t){var S=l.inst,M=S.destroy;if(M!==void 0){S.destroy=void 0,f=a;var L=o;try{M()}catch(Z){Je(f,L,Z)}}}l=l.next}while(l!==m)}}catch(Z){Je(a,a.return,Z)}}function wg(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{Sg(a,o)}catch(l){Je(t,t.return,l)}}}function kg(t,a,o){o.props=Tr(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(l){Je(t,a,l)}}function Or(t,a){try{var o=t.ref;if(o!==null){var l=t.stateNode;switch(t.tag){case 26:case 27:case 5:var f=l;break;default:f=l}typeof o=="function"?t.refCleanup=o(f):o.current=f}}catch(m){Je(t,a,m)}}function da(t,a){var o=t.ref,l=t.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(f){Je(t,a,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){Je(t,a,f)}else o.current=null}function Ng(t){var a=t.type,o=t.memoizedProps,l=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(f){Je(t,t.return,f)}}function zg(t,a,o){try{var l=t.stateNode;nb(l,t.type,o,a),l[ta]=a}catch(f){Je(t,t.return,f)}}function Cg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27||t.tag===4}function Ku(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Cg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==27&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Wu(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?o.nodeType===8?o.parentNode.insertBefore(t,a):o.insertBefore(t,a):(o.nodeType===8?(a=o.parentNode,a.insertBefore(t,o)):(a=o,a.appendChild(t)),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=nl));else if(l!==4&&l!==27&&(t=t.child,t!==null))for(Wu(t,a,o),t=t.sibling;t!==null;)Wu(t,a,o),t=t.sibling}function Ps(t,a,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(l!==4&&l!==27&&(t=t.child,t!==null))for(Ps(t,a,o),t=t.sibling;t!==null;)Ps(t,a,o),t=t.sibling}var tn=!1,lt=!1,Xu=!1,Eg=typeof WeakSet=="function"?WeakSet:Set,Mt=null,Tg=!1;function R2(t,a){if(t=t.containerInfo,wd=ul,t=Yp(t),Qc(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var f=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var S=0,M=-1,L=-1,Z=0,ie=0,ue=t,te=null;t:for(;;){for(var ae;ue!==o||f!==0&&ue.nodeType!==3||(M=S+f),ue!==m||l!==0&&ue.nodeType!==3||(L=S+l),ue.nodeType===3&&(S+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)te=ue,ue=ae;for(;;){if(ue===t)break t;if(te===o&&++Z===f&&(M=S),te===m&&++ie===l&&(L=S),(ae=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=ae}o=M===-1||L===-1?null:{start:M,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(kd={focusedElem:t,selectionRange:o},ul=!1,Mt=a;Mt!==null;)if(a=Mt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Mt=t;else for(;Mt!==null;){switch(a=Mt,m=a.alternate,t=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,o=a,f=m.memoizedProps,m=m.memoizedState,l=o.stateNode;try{var je=Tr(o.type,f,o.elementType===o.type);t=l.getSnapshotBeforeUpdate(je,m),l.__reactInternalSnapshotBeforeUpdate=t}catch(Ce){Je(o,o.return,Ce)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)Ed(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Ed(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(s(163))}if(t=a.sibling,t!==null){t.return=a.return,Mt=t;break}Mt=a.return}return je=Tg,Tg=!1,je}function Mg(t,a,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:nn(t,o),l&4&&So(5,o);break;case 1:if(nn(t,o),l&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(M){Je(o,o.return,M)}else{var f=Tr(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(M){Je(o,o.return,M)}}l&64&&wg(o),l&512&&Or(o,o.return);break;case 3:if(nn(t,o),l&64&&(l=o.updateQueue,l!==null)){if(t=null,o.child!==null)switch(o.child.tag){case 27:case 5:t=o.child.stateNode;break;case 1:t=o.child.stateNode}try{Sg(l,t)}catch(M){Je(o,o.return,M)}}break;case 26:nn(t,o),l&512&&Or(o,o.return);break;case 27:case 5:nn(t,o),a===null&&l&4&&Ng(o),l&512&&Or(o,o.return);break;case 12:nn(t,o);break;case 13:nn(t,o),l&4&&Ag(t,o);break;case 22:if(f=o.memoizedState!==null||tn,!f){a=a!==null&&a.memoizedState!==null||lt;var m=tn,S=lt;tn=f,(lt=a)&&!S?Mn(t,o,(o.subtreeFlags&8772)!==0):nn(t,o),tn=m,lt=S}l&512&&(o.memoizedProps.mode==="manual"?Or(o,o.return):da(o,o.return));break;default:nn(t,o)}}function Rg(t){var a=t.alternate;a!==null&&(t.alternate=null,Rg(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&Ic(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var bt=null,fa=!1;function an(t,a,o){for(o=o.child;o!==null;)Og(t,a,o),o=o.sibling}function Og(t,a,o){if(la&&typeof la.onCommitFiberUnmount=="function")try{la.onCommitFiberUnmount(Gi,o)}catch{}switch(o.tag){case 26:lt||da(o,a),an(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:lt||da(o,a);var l=bt,f=fa;for(bt=o.stateNode,an(t,a,o),o=o.stateNode,a=o.attributes;a.length;)o.removeAttributeNode(a[0]);Ic(o),bt=l,fa=f;break;case 5:lt||da(o,a);case 6:f=bt;var m=fa;if(bt=null,an(t,a,o),bt=f,fa=m,bt!==null)if(fa)try{t=bt,l=o.stateNode,t.nodeType===8?t.parentNode.removeChild(l):t.removeChild(l)}catch(S){Je(o,a,S)}else try{bt.removeChild(o.stateNode)}catch(S){Je(o,a,S)}break;case 18:bt!==null&&(fa?(a=bt,o=o.stateNode,a.nodeType===8?Cd(a.parentNode,o):a.nodeType===1&&Cd(a,o),Bo(a)):Cd(bt,o.stateNode));break;case 4:l=bt,f=fa,bt=o.stateNode.containerInfo,fa=!0,an(t,a,o),bt=l,fa=f;break;case 0:case 11:case 14:case 15:lt||Tn(2,o,a),lt||Tn(4,o,a),an(t,a,o);break;case 1:lt||(da(o,a),l=o.stateNode,typeof l.componentWillUnmount=="function"&&kg(o,a,l)),an(t,a,o);break;case 21:an(t,a,o);break;case 22:lt||da(o,a),lt=(l=lt)||o.memoizedState!==null,an(t,a,o),lt=l;break;default:an(t,a,o)}}function Ag(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Bo(t)}catch(o){Je(a,a.return,o)}}function O2(t){switch(t.tag){case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Eg),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Eg),a;default:throw Error(s(435,t.tag))}}function Ju(t,a){var o=O2(t);a.forEach(function(l){var f=F2.bind(null,t,l);o.has(l)||(o.add(l),l.then(f,f))})}function Sa(t,a){var o=a.deletions;if(o!==null)for(var l=0;l<o.length;l++){var f=o[l],m=t,S=a,M=S;e:for(;M!==null;){switch(M.tag){case 27:case 5:bt=M.stateNode,fa=!1;break e;case 3:bt=M.stateNode.containerInfo,fa=!0;break e;case 4:bt=M.stateNode.containerInfo,fa=!0;break e}M=M.return}if(bt===null)throw Error(s(160));Og(m,S,f),bt=null,fa=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Dg(a,t),a=a.sibling}var Ra=null;function Dg(t,a){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Sa(a,t),wa(t),l&4&&(Tn(3,t,t.return),So(3,t),Tn(5,t,t.return));break;case 1:Sa(a,t),wa(t),l&512&&(lt||o===null||da(o,o.return)),l&64&&tn&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var f=Ra;if(Sa(a,t),wa(t),l&512&&(lt||o===null||da(o,o.return)),l&4){var m=o!==null?o.memoizedState:null;if(l=t.memoizedState,o===null)if(l===null)if(t.stateNode===null){e:{l=t.type,o=t.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Ki]||m[Ht]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(l),f.head.insertBefore(m,f.querySelector("head > title"))),It(m,l,o),m[Ht]=t,Et(m),l=m;break e;case"link":var S=Nm("link","href",f).get(l+(o.href||""));if(S){for(var M=0;M<S.length;M++)if(m=S[M],m.getAttribute("href")===(o.href==null?null:o.href)&&m.getAttribute("rel")===(o.rel==null?null:o.rel)&&m.getAttribute("title")===(o.title==null?null:o.title)&&m.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){S.splice(M,1);break t}}m=f.createElement(l),It(m,l,o),f.head.appendChild(m);break;case"meta":if(S=Nm("meta","content",f).get(l+(o.content||""))){for(M=0;M<S.length;M++)if(m=S[M],m.getAttribute("content")===(o.content==null?null:""+o.content)&&m.getAttribute("name")===(o.name==null?null:o.name)&&m.getAttribute("property")===(o.property==null?null:o.property)&&m.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&m.getAttribute("charset")===(o.charSet==null?null:o.charSet)){S.splice(M,1);break t}}m=f.createElement(l),It(m,l,o),f.head.appendChild(m);break;default:throw Error(s(468,l))}m[Ht]=t,Et(m),l=m}t.stateNode=l}else zm(f,t.type,t.stateNode);else t.stateNode=km(f,l,t.memoizedProps);else m!==l?(m===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):m.count--,l===null?zm(f,t.type,t.stateNode):km(f,l,t.memoizedProps)):l===null&&t.stateNode!==null&&zg(t,t.memoizedProps,o.memoizedProps)}break;case 27:if(l&4&&t.alternate===null){f=t.stateNode,m=t.memoizedProps;try{for(var L=f.firstChild;L;){var Z=L.nextSibling,ie=L.nodeName;L[Ki]||ie==="HEAD"||ie==="BODY"||ie==="SCRIPT"||ie==="STYLE"||ie==="LINK"&&L.rel.toLowerCase()==="stylesheet"||f.removeChild(L),L=Z}for(var ue=t.type,te=f.attributes;te.length;)f.removeAttributeNode(te[0]);It(f,ue,m),f[Ht]=t,f[ta]=m}catch(je){Je(t,t.return,je)}}case 5:if(Sa(a,t),wa(t),l&512&&(lt||o===null||da(o,o.return)),t.flags&32){f=t.stateNode;try{Jr(f,"")}catch(je){Je(t,t.return,je)}}l&4&&t.stateNode!=null&&(f=t.memoizedProps,zg(t,f,o!==null?o.memoizedProps:f)),l&1024&&(Xu=!0);break;case 6:if(Sa(a,t),wa(t),l&4){if(t.stateNode===null)throw Error(s(162));l=t.memoizedProps,o=t.stateNode;try{o.nodeValue=l}catch(je){Je(t,t.return,je)}}break;case 3:if(sl=null,f=Ra,Ra=il(a.containerInfo),Sa(a,t),Ra=f,wa(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Bo(a.containerInfo)}catch(je){Je(t,t.return,je)}Xu&&(Xu=!1,Ig(t));break;case 4:l=Ra,Ra=il(t.stateNode.containerInfo),Sa(a,t),wa(t),Ra=l;break;case 12:Sa(a,t),wa(t);break;case 13:Sa(a,t),wa(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(sd=ea()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Ju(t,l)));break;case 22:if(l&512&&(lt||o===null||da(o,o.return)),L=t.memoizedState!==null,Z=o!==null&&o.memoizedState!==null,ie=tn,ue=lt,tn=ie||L,lt=ue||Z,Sa(a,t),lt=ue,tn=ie,wa(t),a=t.stateNode,a._current=t,a._visibility&=-3,a._visibility|=a._pendingVisibility&2,l&8192&&(a._visibility=L?a._visibility&-2:a._visibility|1,L&&(a=tn||lt,o===null||Z||a||mi(t)),t.memoizedProps===null||t.memoizedProps.mode!=="manual"))e:for(o=null,a=t;;){if(a.tag===5||a.tag===26||a.tag===27){if(o===null){Z=o=a;try{if(f=Z.stateNode,L)m=f.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{S=Z.stateNode,M=Z.memoizedProps.style;var ae=M!=null&&M.hasOwnProperty("display")?M.display:null;S.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(je){Je(Z,Z.return,je)}}}else if(a.tag===6){if(o===null){Z=a;try{Z.stateNode.nodeValue=L?"":Z.memoizedProps}catch(je){Je(Z,Z.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}l&4&&(l=t.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,Ju(t,o))));break;case 19:Sa(a,t),wa(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Ju(t,l)));break;case 21:break;default:Sa(a,t),wa(t)}}function wa(t){var a=t.flags;if(a&2){try{if(t.tag!==27){e:{for(var o=t.return;o!==null;){if(Cg(o)){var l=o;break e}o=o.return}throw Error(s(160))}switch(l.tag){case 27:var f=l.stateNode,m=Ku(t);Ps(t,m,f);break;case 5:var S=l.stateNode;l.flags&32&&(Jr(S,""),l.flags&=-33);var M=Ku(t);Ps(t,M,S);break;case 3:case 4:var L=l.stateNode.containerInfo,Z=Ku(t);Wu(t,Z,L);break;default:throw Error(s(161))}}}catch(ie){Je(t,t.return,ie)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Ig(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Ig(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function nn(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mg(t,a.alternate,a),a=a.sibling}function mi(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Tn(4,a,a.return),mi(a);break;case 1:da(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&kg(a,a.return,o),mi(a);break;case 26:case 27:case 5:da(a,a.return),mi(a);break;case 22:da(a,a.return),a.memoizedState===null&&mi(a);break;default:mi(a)}t=t.sibling}}function Mn(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var l=a.alternate,f=t,m=a,S=m.flags;switch(m.tag){case 0:case 11:case 15:Mn(f,m,o),So(4,m);break;case 1:if(Mn(f,m,o),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Z){Je(l,l.return,Z)}if(l=m,f=l.updateQueue,f!==null){var M=l.stateNode;try{var L=f.shared.hiddenCallbacks;if(L!==null)for(f.shared.hiddenCallbacks=null,f=0;f<L.length;f++)_g(L[f],M)}catch(Z){Je(l,l.return,Z)}}o&&S&64&&wg(m),Or(m,m.return);break;case 26:case 27:case 5:Mn(f,m,o),o&&l===null&&S&4&&Ng(m),Or(m,m.return);break;case 12:Mn(f,m,o);break;case 13:Mn(f,m,o),o&&S&4&&Ag(f,m);break;case 22:m.memoizedState===null&&Mn(f,m,o),Or(m,m.return);break;default:Mn(f,m,o)}a=a.sibling}}function Qu(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&go(o))}function ed(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&go(t))}function Rn(t,a,o,l){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ug(t,a,o,l),a=a.sibling}function Ug(t,a,o,l){var f=a.flags;switch(a.tag){case 0:case 11:case 15:Rn(t,a,o,l),f&2048&&So(9,a);break;case 3:Rn(t,a,o,l),f&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&go(t)));break;case 12:if(f&2048){Rn(t,a,o,l),t=a.stateNode;try{var m=a.memoizedProps,S=m.id,M=m.onPostCommit;typeof M=="function"&&M(S,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(L){Je(a,a.return,L)}}else Rn(t,a,o,l);break;case 23:break;case 22:m=a.stateNode,a.memoizedState!==null?m._visibility&4?Rn(t,a,o,l):wo(t,a):m._visibility&4?Rn(t,a,o,l):(m._visibility|=4,hi(t,a,o,l,(a.subtreeFlags&10256)!==0)),f&2048&&Qu(a.alternate,a);break;case 24:Rn(t,a,o,l),f&2048&&ed(a.alternate,a);break;default:Rn(t,a,o,l)}}function hi(t,a,o,l,f){for(f=f&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var m=t,S=a,M=o,L=l,Z=S.flags;switch(S.tag){case 0:case 11:case 15:hi(m,S,M,L,f),So(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&4?hi(m,S,M,L,f):wo(m,S):(ie._visibility|=4,hi(m,S,M,L,f)),f&&Z&2048&&Qu(S.alternate,S);break;case 24:hi(m,S,M,L,f),f&&Z&2048&&ed(S.alternate,S);break;default:hi(m,S,M,L,f)}a=a.sibling}}function wo(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,l=a,f=l.flags;switch(l.tag){case 22:wo(o,l),f&2048&&Qu(l.alternate,l);break;case 24:wo(o,l),f&2048&&ed(l.alternate,l);break;default:wo(o,l)}a=a.sibling}}var ko=8192;function yi(t){if(t.subtreeFlags&ko)for(t=t.child;t!==null;)Lg(t),t=t.sibling}function Lg(t){switch(t.tag){case 26:yi(t),t.flags&ko&&t.memoizedState!==null&&jb(Ra,t.memoizedState,t.memoizedProps);break;case 5:yi(t);break;case 3:case 4:var a=Ra;Ra=il(t.stateNode.containerInfo),yi(t),Ra=a;break;case 22:t.memoizedState===null&&(a=t.alternate,a!==null&&a.memoizedState!==null?(a=ko,ko=16777216,yi(t),ko=a):yi(t));break;default:yi(t)}}function Vg(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function No(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Mt=l,Bg(l,t)}Vg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hg(t),t=t.sibling}function Hg(t){switch(t.tag){case 0:case 11:case 15:No(t),t.flags&2048&&Tn(9,t,t.return);break;case 3:No(t);break;case 12:No(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&4&&(t.return===null||t.return.tag!==13)?(a._visibility&=-5,Zs(t)):No(t);break;default:No(t)}}function Zs(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var l=a[o];Mt=l,Bg(l,t)}Vg(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Tn(8,a,a.return),Zs(a);break;case 22:o=a.stateNode,o._visibility&4&&(o._visibility&=-5,Zs(a));break;default:Zs(a)}t=t.sibling}}function Bg(t,a){for(;Mt!==null;){var o=Mt;switch(o.tag){case 0:case 11:case 15:Tn(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:go(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Mt=l;else e:for(o=t;Mt!==null;){l=Mt;var f=l.sibling,m=l.return;if(Rg(l),l===o){Mt=null;break e}if(f!==null){f.return=m,Mt=f;break e}Mt=m}}}function A2(t,a,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ka(t,a,o,l){return new A2(t,a,o,l)}function td(t){return t=t.prototype,!(!t||!t.isReactComponent)}function On(t,a){var o=t.alternate;return o===null?(o=ka(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&31457280,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function qg(t,a){t.flags&=31457282;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function Gs(t,a,o,l,f,m){var S=0;if(l=t,typeof t=="function")td(t)&&(S=1);else if(typeof t=="string")S=bb(t,o,G.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case g:return Ar(o.children,f,m,a);case h:S=8,f|=24;break;case y:return t=ka(12,o,a,f|2),t.elementType=y,t.lanes=m,t;case C:return t=ka(13,o,a,f),t.elementType=C,t.lanes=m,t;case z:return t=ka(19,o,a,f),t.elementType=z,t.lanes=m,t;case w:return Pg(o,f,m,a);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case v:case k:S=10;break e;case j:S=9;break e;case b:S=11;break e;case N:S=14;break e;case $:S=16,l=null;break e}S=29,o=Error(s(130,t===null?"null":typeof t,"")),l=null}return a=ka(S,o,a,f),a.elementType=t,a.type=l,a.lanes=m,a}function Ar(t,a,o,l){return t=ka(7,t,l,a),t.lanes=o,t}function Pg(t,a,o,l){t=ka(22,t,l,a),t.elementType=w,t.lanes=o;var f={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var m=f._current;if(m===null)throw Error(s(456));if((f._pendingVisibility&2)===0){var S=jn(m,2);S!==null&&(f._pendingVisibility|=2,Yt(S,m,2))}},attach:function(){var m=f._current;if(m===null)throw Error(s(456));if((f._pendingVisibility&2)!==0){var S=jn(m,2);S!==null&&(f._pendingVisibility&=-3,Yt(S,m,2))}}};return t.stateNode=f,t}function ad(t,a,o){return t=ka(6,t,null,a),t.lanes=o,t}function nd(t,a,o){return a=ka(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}function rn(t){t.flags|=4}function Zg(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Cm(a)){if(a=_a.current,a!==null&&((Be&4194176)===Be?Ua!==null:(Be&62914560)!==Be&&(Be&536870912)===0||a!==Ua))throw uo=lu,l0;t.flags|=8192}}function Fs(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?cp():536870912,t.lanes|=a,$i|=a)}function zo(t,a){if(!Pe)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function it(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,l=0;if(a)for(var f=t.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags&31457280,l|=f.flags&31457280,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=l,t.childLanes=o,a}function D2(t,a,o){var l=a.pendingProps;switch(ou(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(a),null;case 1:return it(a),null;case 3:return o=a.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),en(kt),ze(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(oo(a)?rn(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ma!==null&&(dd(Ma),Ma=null))),it(a),null;case 26:return o=a.memoizedState,t===null?(rn(a),o!==null?(it(a),Zg(a,o)):(it(a),a.flags&=-16777217)):o?o!==t.memoizedState?(rn(a),it(a),Zg(a,o)):(it(a),a.flags&=-16777217):(t.memoizedProps!==l&&rn(a),it(a),a.flags&=-16777217),null;case 27:Vt(a),o=oe.current;var f=a.type;if(t!==null&&a.stateNode!=null)t.memoizedProps!==l&&rn(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return it(a),null}t=G.current,oo(a)?o0(a):(t=xm(f,l,o),a.stateNode=t,rn(a))}return it(a),null;case 5:if(Vt(a),o=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==l&&rn(a);else{if(!l){if(a.stateNode===null)throw Error(s(166));return it(a),null}if(t=G.current,oo(a))o0(a);else{switch(f=rl(oe.current),t){case 1:t=f.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=f.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=f.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=f.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=f.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?f.createElement(o,{is:l.is}):f.createElement(o)}}t[Ht]=a,t[ta]=l;e:for(f=a.child;f!==null;){if(f.tag===5||f.tag===6)t.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===a)break e;for(;f.sibling===null;){if(f.return===null||f.return===a)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}a.stateNode=t;e:switch(It(t,o,l),o){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&rn(a)}}return it(a),a.flags&=-16777217,null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==l&&rn(a);else{if(typeof l!="string"&&a.stateNode===null)throw Error(s(166));if(t=oe.current,oo(a)){if(t=a.stateNode,o=a.memoizedProps,l=null,f=Ft,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}t[Ht]=a,t=!!(t.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||mm(t.nodeValue,o)),t||wr(a)}else t=rl(t).createTextNode(l),t[Ht]=a,a.stateNode=t}return it(a),null;case 13:if(l=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=oo(a),l!==null&&l.dehydrated!==null){if(t===null){if(!f)throw Error(s(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[Ht]=a}else so(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;it(a),f=!1}else Ma!==null&&(dd(Ma),Ma=null),f=!0;if(!f)return a.flags&256?(Wa(a),a):(Wa(a),null)}if(Wa(a),(a.flags&128)!==0)return a.lanes=o,a;if(o=l!==null,t=t!==null&&t.memoizedState!==null,o){l=a.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool);var m=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)}return o!==t&&o&&(a.child.flags|=8192),Fs(a,a.updateQueue),it(a),null;case 4:return ze(),t===null&&jd(a.stateNode.containerInfo),it(a),null;case 10:return en(a.type),it(a),null;case 19:if(we(wt),f=a.memoizedState,f===null)return it(a),null;if(l=(a.flags&128)!==0,m=f.rendering,m===null)if(l)zo(f,!1);else{if(ct!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=Es(t),m!==null){for(a.flags|=128,zo(f,!1),t=m.updateQueue,a.updateQueue=t,Fs(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)qg(o,t),o=o.sibling;return xe(wt,wt.current&1|2),a.child}t=t.sibling}f.tail!==null&&ea()>Ys&&(a.flags|=128,l=!0,zo(f,!1),a.lanes=4194304)}else{if(!l)if(t=Es(m),t!==null){if(a.flags|=128,l=!0,t=t.updateQueue,a.updateQueue=t,Fs(a,t),zo(f,!0),f.tail===null&&f.tailMode==="hidden"&&!m.alternate&&!Pe)return it(a),null}else 2*ea()-f.renderingStartTime>Ys&&o!==536870912&&(a.flags|=128,l=!0,zo(f,!1),a.lanes=4194304);f.isBackwards?(m.sibling=a.child,a.child=m):(t=f.last,t!==null?t.sibling=m:a.child=m,f.last=m)}return f.tail!==null?(a=f.tail,f.rendering=a,f.tail=a.sibling,f.renderingStartTime=ea(),a.sibling=null,t=wt.current,xe(wt,l?t&1|2:t&1),a):(it(a),null);case 22:case 23:return Wa(a),uu(),l=a.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(a.flags|=8192):l&&(a.flags|=8192),l?(o&536870912)!==0&&(a.flags&128)===0&&(it(a),a.subtreeFlags&6&&(a.flags|=8192)):it(a),o=a.updateQueue,o!==null&&Fs(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==o&&(a.flags|=2048),t!==null&&we(Nr),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),en(kt),it(a),null;case 25:return null}throw Error(s(156,a.tag))}function I2(t,a){switch(ou(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return en(kt),ze(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Vt(a),null;case 13:if(Wa(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(s(340));so()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return we(wt),null;case 4:return ze(),null;case 10:return en(a.type),null;case 22:case 23:return Wa(a),uu(),t!==null&&we(Nr),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return en(kt),null;case 25:return null;default:return null}}function Gg(t,a){switch(ou(a),a.tag){case 3:en(kt),ze();break;case 26:case 27:case 5:Vt(a);break;case 4:ze();break;case 13:Wa(a);break;case 19:we(wt);break;case 10:en(a.type);break;case 22:case 23:Wa(a),uu(),t!==null&&we(Nr);break;case 24:en(kt)}}var U2={getCacheForType:function(t){var a=Bt(kt),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o}},L2=typeof WeakMap=="function"?WeakMap:Map,ot=0,Qe=null,Le=null,Be=0,et=0,pa=null,on=!1,vi=!1,rd=!1,sn=0,ct=0,An=0,Dr=0,id=0,Na=0,$i=0,Co=null,Va=null,od=!1,sd=0,Ys=1/0,Ks=null,Dn=null,Ws=!1,Ir=null,Eo=0,ld=0,cd=null,To=0,ud=null;function ga(){if((ot&2)!==0&&Be!==0)return Be&-Be;if(I.T!==null){var t=ui;return t!==0?t:vd()}return pp()}function Fg(){Na===0&&(Na=(Be&536870912)===0||Pe?lp():536870912);var t=_a.current;return t!==null&&(t.flags|=32),Na}function Yt(t,a,o){(t===Qe&&et===2||t.cancelPendingCommit!==null)&&(bi(t,0),ln(t,Be,Na,!1)),Yi(t,o),((ot&2)===0||t!==Qe)&&(t===Qe&&((ot&2)===0&&(Dr|=o),ct===4&&ln(t,Be,Na,!1)),Ha(t))}function Yg(t,a,o){if((ot&6)!==0)throw Error(s(327));var l=!o&&(a&60)===0&&(a&t.expiredLanes)===0||Fi(t,a),f=l?B2(t,a):gd(t,a,!0),m=l;do{if(f===0){vi&&!l&&ln(t,a,0,!1);break}else if(f===6)ln(t,a,0,!on);else{if(o=t.current.alternate,m&&!V2(o)){f=gd(t,a,!1),m=!1;continue}if(f===2){if(m=a,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var M=t;f=Co;var L=M.current.memoizedState.isDehydrated;if(L&&(bi(M,S).flags|=256),S=gd(M,S,!1),S!==2){if(rd&&!L){M.errorRecoveryDisabledLanes|=m,Dr|=m,f=4;break e}m=Va,Va=f,m!==null&&dd(m)}f=S}if(m=!1,f!==2)continue}}if(f===1){bi(t,0),ln(t,a,0,!0);break}e:{switch(l=t,f){case 0:case 1:throw Error(s(345));case 4:if((a&4194176)===a){ln(l,a,Na,!on);break e}break;case 2:Va=null;break;case 3:case 5:break;default:throw Error(s(329))}if(l.finishedWork=o,l.finishedLanes=a,(a&62914560)===a&&(m=sd+300-ea(),10<m)){if(ln(l,a,Na,!on),cs(l,0)!==0)break e;l.timeoutHandle=vm(Kg.bind(null,l,o,Va,Ks,od,a,Na,Dr,$i,on,2,-0,0),m);break e}Kg(l,o,Va,Ks,od,a,Na,Dr,$i,on,0,-0,0)}}break}while(!0);Ha(t)}function dd(t){Va===null?Va=t:Va.push.apply(Va,t)}function Kg(t,a,o,l,f,m,S,M,L,Z,ie,ue,te){var ae=a.subtreeFlags;if((ae&8192||(ae&16785408)===16785408)&&(Io={stylesheets:null,count:0,unsuspend:xb},Lg(a),a=_b(),a!==null)){t.cancelPendingCommit=a(am.bind(null,t,o,l,f,S,M,L,1,ue,te)),ln(t,m,S,!Z);return}am(t,o,l,f,S,M,L,ie,ue,te)}function V2(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var f=o[l],m=f.getSnapshot;f=f.value;try{if(!ua(m(),f))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ln(t,a,o,l){a&=~id,a&=~Dr,t.suspendedLanes|=a,t.pingedLanes&=~a,l&&(t.warmLanes|=a),l=t.expirationTimes;for(var f=a;0<f;){var m=31-ca(f),S=1<<m;l[m]=-1,f&=~S}o!==0&&up(t,o,a)}function Xs(){return(ot&6)===0?(Mo(0),!1):!0}function fd(){if(Le!==null){if(et===0)var t=Le.return;else t=Le,Qa=Mr=null,vu(t),li=null,fo=0,t=Le;for(;t!==null;)Gg(t.alternate,t),t=t.return;Le=null}}function bi(t,a){t.finishedWork=null,t.finishedLanes=0;var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,ib(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),fd(),Qe=t,Le=o=On(t.current,null),Be=a,et=0,pa=null,on=!1,vi=Fi(t,a),rd=!1,$i=Na=id=Dr=An=ct=0,Va=Co=null,od=!1,(a&8)!==0&&(a|=a&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=a;0<l;){var f=31-ca(l),m=1<<f;a|=t[f],l&=~m}return sn=a,xs(),o}function Wg(t,a){Oe=null,I.H=La,a===co?(a=d0(),et=3):a===l0?(a=d0(),et=4):et=a===cg?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,pa=a,Le===null&&(ct=1,Hs(t,ba(a,t.current)))}function Xg(){var t=I.H;return I.H=La,t===null?La:t}function Jg(){var t=I.A;return I.A=U2,t}function pd(){ct=4,on||(Be&4194176)!==Be&&_a.current!==null||(vi=!0),(An&134217727)===0&&(Dr&134217727)===0||Qe===null||ln(Qe,Be,Na,!1)}function gd(t,a,o){var l=ot;ot|=2;var f=Xg(),m=Jg();(Qe!==t||Be!==a)&&(Ks=null,bi(t,a)),a=!1;var S=ct;e:do try{if(et!==0&&Le!==null){var M=Le,L=pa;switch(et){case 8:fd(),S=6;break e;case 3:case 2:case 6:_a.current===null&&(a=!0);var Z=et;if(et=0,pa=null,xi(t,M,L,Z),o&&vi){S=0;break e}break;default:Z=et,et=0,pa=null,xi(t,M,L,Z)}}H2(),S=ct;break}catch(ie){Wg(t,ie)}while(!0);return a&&t.shellSuspendCounter++,Qa=Mr=null,ot=l,I.H=f,I.A=m,Le===null&&(Qe=null,Be=0,xs()),S}function H2(){for(;Le!==null;)Qg(Le)}function B2(t,a){var o=ot;ot|=2;var l=Xg(),f=Jg();Qe!==t||Be!==a?(Ks=null,Ys=ea()+500,bi(t,a)):vi=Fi(t,a);e:do try{if(et!==0&&Le!==null){a=Le;var m=pa;t:switch(et){case 1:et=0,pa=null,xi(t,a,m,1);break;case 2:if(c0(m)){et=0,pa=null,em(a);break}a=function(){et===2&&Qe===t&&(et=7),Ha(t)},m.then(a,a);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:c0(m)?(et=0,pa=null,em(a)):(et=0,pa=null,xi(t,a,m,7));break;case 5:var S=null;switch(Le.tag){case 26:S=Le.memoizedState;case 5:case 27:var M=Le;if(!S||Cm(S)){et=0,pa=null;var L=M.sibling;if(L!==null)Le=L;else{var Z=M.return;Z!==null?(Le=Z,Js(Z)):Le=null}break t}}et=0,pa=null,xi(t,a,m,5);break;case 6:et=0,pa=null,xi(t,a,m,6);break;case 8:fd(),ct=6;break e;default:throw Error(s(462))}}q2();break}catch(ie){Wg(t,ie)}while(!0);return Qa=Mr=null,I.H=l,I.A=f,ot=o,Le!==null?0:(Qe=null,Be=0,xs(),ct)}function q2(){for(;Le!==null&&!yn();)Qg(Le)}function Qg(t){var a=xg(t.alternate,t,sn);t.memoizedProps=t.pendingProps,a===null?Js(t):Le=a}function em(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=mg(o,a,a.pendingProps,a.type,void 0,Be);break;case 11:a=mg(o,a,a.pendingProps,a.type.render,a.ref,Be);break;case 5:vu(a);default:Gg(o,a),a=Le=qg(a,sn),a=xg(o,a,sn)}t.memoizedProps=t.pendingProps,a===null?Js(t):Le=a}function xi(t,a,o,l){Qa=Mr=null,vu(a),li=null,fo=0;var f=a.return;try{if(T2(t,f,a,o,Be)){ct=1,Hs(t,ba(o,t.current)),Le=null;return}}catch(m){if(f!==null)throw Le=f,m;ct=1,Hs(t,ba(o,t.current)),Le=null;return}a.flags&32768?(Pe||l===1?t=!0:vi||(Be&536870912)!==0?t=!1:(on=t=!0,(l===2||l===3||l===6)&&(l=_a.current,l!==null&&l.tag===13&&(l.flags|=16384))),tm(a,t)):Js(a)}function Js(t){var a=t;do{if((a.flags&32768)!==0){tm(a,on);return}t=a.return;var o=D2(a.alternate,a,sn);if(o!==null){Le=o;return}if(a=a.sibling,a!==null){Le=a;return}Le=a=t}while(a!==null);ct===0&&(ct=5)}function tm(t,a){do{var o=I2(t.alternate,t);if(o!==null){o.flags&=32767,Le=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){Le=t;return}Le=t=o}while(t!==null);ct=6,Le=null}function am(t,a,o,l,f,m,S,M,L,Z){var ie=I.T,ue=E.p;try{E.p=2,I.T=null,P2(t,a,o,l,ue,f,m,S,M,L,Z)}finally{I.T=ie,E.p=ue}}function P2(t,a,o,l,f,m,S,M){do ji();while(Ir!==null);if((ot&6)!==0)throw Error(s(327));var L=t.finishedWork;if(l=t.finishedLanes,L===null)return null;if(t.finishedWork=null,t.finishedLanes=0,L===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0,t.cancelPendingCommit=null;var Z=L.lanes|L.childLanes;if(Z|=nu,j$(t,l,Z,m,S,M),t===Qe&&(Le=Qe=null,Be=0),(L.subtreeFlags&10256)===0&&(L.flags&10256)===0||Ws||(Ws=!0,ld=Z,cd=o,Y2(hr,function(){return ji(),null})),o=(L.flags&15990)!==0,(L.subtreeFlags&15990)!==0||o?(o=I.T,I.T=null,m=E.p,E.p=2,S=ot,ot|=4,R2(t,L),Dg(L,t),g2(kd,t.containerInfo),ul=!!wd,kd=wd=null,t.current=L,Mg(t,L.alternate,L),Qt(),ot=S,E.p=m,I.T=o):t.current=L,Ws?(Ws=!1,Ir=t,Eo=l):nm(t,Z),Z=t.pendingLanes,Z===0&&(Dn=null),y$(L.stateNode),Ha(t),a!==null)for(f=t.onRecoverableError,L=0;L<a.length;L++)Z=a[L],f(Z.value,{componentStack:Z.stack});return(Eo&3)!==0&&ji(),Z=t.pendingLanes,(l&4194218)!==0&&(Z&42)!==0?t===ud?To++:(To=0,ud=t):To=0,Mo(0),null}function nm(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,go(a)))}function ji(){if(Ir!==null){var t=Ir,a=ld;ld=0;var o=fp(Eo),l=I.T,f=E.p;try{if(E.p=32>o?32:o,I.T=null,Ir===null)var m=!1;else{o=cd,cd=null;var S=Ir,M=Eo;if(Ir=null,Eo=0,(ot&6)!==0)throw Error(s(331));var L=ot;if(ot|=4,Hg(S.current),Ug(S,S.current,M,o),ot=L,Mo(0,!1),la&&typeof la.onPostCommitFiberRoot=="function")try{la.onPostCommitFiberRoot(Gi,S)}catch{}m=!0}return m}finally{E.p=f,I.T=l,nm(t,a)}}return!1}function rm(t,a,o){a=ba(o,a),a=Mu(t.stateNode,a,2),t=En(t,a,2),t!==null&&(Yi(t,2),Ha(t))}function Je(t,a,o){if(t.tag===3)rm(t,t,o);else for(;a!==null;){if(a.tag===3){rm(a,t,o);break}else if(a.tag===1){var l=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Dn===null||!Dn.has(l))){t=ba(o,t),o=sg(2),l=En(a,o,2),l!==null&&(lg(o,l,a,t),Yi(l,2),Ha(l));break}}a=a.return}}function md(t,a,o){var l=t.pingCache;if(l===null){l=t.pingCache=new L2;var f=new Set;l.set(a,f)}else f=l.get(a),f===void 0&&(f=new Set,l.set(a,f));f.has(o)||(rd=!0,f.add(o),t=Z2.bind(null,t,a,o),a.then(t,t))}function Z2(t,a,o){var l=t.pingCache;l!==null&&l.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,Qe===t&&(Be&o)===o&&(ct===4||ct===3&&(Be&62914560)===Be&&300>ea()-sd?(ot&2)===0&&bi(t,0):id|=o,$i===Be&&($i=0)),Ha(t)}function im(t,a){a===0&&(a=cp()),t=jn(t,a),t!==null&&(Yi(t,a),Ha(t))}function G2(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),im(t,o)}function F2(t,a){var o=0;switch(t.tag){case 13:var l=t.stateNode,f=t.memoizedState;f!==null&&(o=f.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(a),im(t,o)}function Y2(t,a){return Ct(t,a)}var Qs=null,_i=null,hd=!1,el=!1,yd=!1,Ur=0;function Ha(t){t!==_i&&t.next===null&&(_i===null?Qs=_i=t:_i=_i.next=t),el=!0,hd||(hd=!0,W2(K2))}function Mo(t,a){if(!yd&&el){yd=!0;do for(var o=!1,l=Qs;l!==null;){if(t!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var S=l.suspendedLanes,M=l.pingedLanes;m=(1<<31-ca(42|t)+1)-1,m&=f&~(S&~M),m=m&201326677?m&201326677|1:m?m|2:0}m!==0&&(o=!0,lm(l,m))}else m=Be,m=cs(l,l===Qe?m:0),(m&3)===0||Fi(l,m)||(o=!0,lm(l,m));l=l.next}while(o);yd=!1}}function K2(){el=hd=!1;var t=0;Ur!==0&&(rb()&&(t=Ur),Ur=0);for(var a=ea(),o=null,l=Qs;l!==null;){var f=l.next,m=om(l,a);m===0?(l.next=null,o===null?Qs=f:o.next=f,f===null&&(_i=o)):(o=l,(t!==0||(m&3)!==0)&&(el=!0)),l=f}Mo(t)}function om(t,a){for(var o=t.suspendedLanes,l=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-ca(m),M=1<<S,L=f[S];L===-1?((M&o)===0||(M&l)!==0)&&(f[S]=x$(M,a)):L<=a&&(t.expiredLanes|=M),m&=~M}if(a=Qe,o=Be,o=cs(t,t===a?o:0),l=t.callbackNode,o===0||t===a&&et===2||t.cancelPendingCommit!==null)return l!==null&&l!==null&&mt(l),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||Fi(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(l!==null&&mt(l),fp(o)){case 2:case 8:o=Gr;break;case 32:o=hr;break;case 268435456:o=os;break;default:o=hr}return l=sm.bind(null,t),o=Ct(o,l),t.callbackPriority=a,t.callbackNode=o,a}return l!==null&&l!==null&&mt(l),t.callbackPriority=2,t.callbackNode=null,2}function sm(t,a){var o=t.callbackNode;if(ji()&&t.callbackNode!==o)return null;var l=Be;return l=cs(t,t===Qe?l:0),l===0?null:(Yg(t,l,a),om(t,ea()),t.callbackNode!=null&&t.callbackNode===o?sm.bind(null,t):null)}function lm(t,a){if(ji())return null;Yg(t,a,!0)}function W2(t){ob(function(){(ot&6)!==0?Ct(vn,t):t()})}function vd(){return Ur===0&&(Ur=lp()),Ur}function cm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:gs(""+t)}function um(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function X2(t,a,o,l,f){if(a==="submit"&&o&&o.stateNode===f){var m=cm((f[ta]||null).action),S=l.submitter;S&&(a=(a=S[ta]||null)?cm(a.formAction):S.getAttribute("formAction"),a!==null&&(m=a,S=null));var M=new vs("action","action",null,l,f);t.push({event:M,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ur!==0){var L=S?um(f,S):new FormData(f);Nu(o,{pending:!0,data:L,method:f.method,action:m},null,L)}}else typeof m=="function"&&(M.preventDefault(),L=S?um(f,S):new FormData(f),Nu(o,{pending:!0,data:L,method:f.method,action:m},m,L))},currentTarget:f}]})}}for(var $d=0;$d<a0.length;$d++){var bd=a0[$d],J2=bd.toLowerCase(),Q2=bd[0].toUpperCase()+bd.slice(1);Ta(J2,"on"+Q2)}Ta(Xp,"onAnimationEnd"),Ta(Jp,"onAnimationIteration"),Ta(Qp,"onAnimationStart"),Ta("dblclick","onDoubleClick"),Ta("focusin","onFocus"),Ta("focusout","onBlur"),Ta(h2,"onTransitionRun"),Ta(y2,"onTransitionStart"),Ta(v2,"onTransitionCancel"),Ta(e0,"onTransitionEnd"),Wr("onMouseEnter",["mouseout","mouseover"]),Wr("onMouseLeave",["mouseout","mouseover"]),Wr("onPointerEnter",["pointerout","pointerover"]),Wr("onPointerLeave",["pointerout","pointerover"]),$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$r("onBeforeInput",["compositionend","keypress","textInput","paste"]),$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="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(" "),eb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ro));function dm(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var l=t[o],f=l.event;l=l.listeners;e:{var m=void 0;if(a)for(var S=l.length-1;0<=S;S--){var M=l[S],L=M.instance,Z=M.currentTarget;if(M=M.listener,L!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=Z;try{m(f)}catch(ie){Vs(ie)}f.currentTarget=null,m=L}else for(S=0;S<l.length;S++){if(M=l[S],L=M.instance,Z=M.currentTarget,M=M.listener,L!==m&&f.isPropagationStopped())break e;m=M,f.currentTarget=Z;try{m(f)}catch(ie){Vs(ie)}f.currentTarget=null,m=L}}}}function Ve(t,a){var o=a[Dc];o===void 0&&(o=a[Dc]=new Set);var l=t+"__bubble";o.has(l)||(fm(a,t,2,!1),o.add(l))}function xd(t,a,o){var l=0;a&&(l|=4),fm(o,t,l,a)}var tl="_reactListening"+Math.random().toString(36).slice(2);function jd(t){if(!t[tl]){t[tl]=!0,mp.forEach(function(o){o!=="selectionchange"&&(eb.has(o)||xd(o,!1,t),xd(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[tl]||(a[tl]=!0,xd("selectionchange",!1,a))}}function fm(t,a,o,l){switch(Am(a)){case 2:var f=kb;break;case 8:f=Nb;break;default:f=Ad}o=f.bind(null,a,o,t),f=void 0,!Pc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),l?f!==void 0?t.addEventListener(a,o,{capture:!0,passive:f}):t.addEventListener(a,o,!0):f!==void 0?t.addEventListener(a,o,{passive:f}):t.addEventListener(a,o,!1)}function _d(t,a,o,l,f){var m=l;if((a&1)===0&&(a&2)===0&&l!==null)e:for(;;){if(l===null)return;var S=l.tag;if(S===3||S===4){var M=l.stateNode.containerInfo;if(M===f||M.nodeType===8&&M.parentNode===f)break;if(S===4)for(S=l.return;S!==null;){var L=S.tag;if((L===3||L===4)&&(L=S.stateNode.containerInfo,L===f||L.nodeType===8&&L.parentNode===f))return;S=S.return}for(;M!==null;){if(S=vr(M),S===null)return;if(L=S.tag,L===5||L===6||L===26||L===27){l=m=S;continue e}M=M.parentNode}}l=l.return}Np(function(){var Z=m,ie=Bc(o),ue=[];e:{var te=t0.get(t);if(te!==void 0){var ae=vs,je=t;switch(t){case"keypress":if(hs(o)===0)break e;case"keydown":case"keyup":ae=F$;break;case"focusin":je="focus",ae=Yc;break;case"focusout":je="blur",ae=Yc;break;case"beforeblur":case"afterblur":ae=Yc;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Ep;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=A$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=W$;break;case Xp:case Jp:case Qp:ae=U$;break;case e0:ae=J$;break;case"scroll":case"scrollend":ae=R$;break;case"wheel":ae=e2;break;case"copy":case"cut":case"paste":ae=V$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Mp;break;case"toggle":case"beforetoggle":ae=a2}var Ce=(a&4)!==0,ut=!Ce&&(t==="scroll"||t==="scrollend"),Y=Ce?te!==null?te+"Capture":null:te;Ce=[];for(var q=Z,X;q!==null;){var se=q;if(X=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||X===null||Y===null||(se=Xi(q,Y),se!=null&&Ce.push(Oo(q,se,X))),ut)break;q=q.return}0<Ce.length&&(te=new ae(te,je,null,o,ie),ue.push({event:te,listeners:Ce}))}}if((a&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",te&&o!==Hc&&(je=o.relatedTarget||o.fromElement)&&(vr(je)||je[Fr]))break e;if((ae||te)&&(te=ie.window===ie?ie:(te=ie.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(je=o.relatedTarget||o.toElement,ae=Z,je=je?vr(je):null,je!==null&&(ut=fe(je),Ce=je.tag,je!==ut||Ce!==5&&Ce!==27&&Ce!==6)&&(je=null)):(ae=null,je=Z),ae!==je)){if(Ce=Ep,se="onMouseLeave",Y="onMouseEnter",q="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=Mp,se="onPointerLeave",Y="onPointerEnter",q="pointer"),ut=ae==null?te:Wi(ae),X=je==null?te:Wi(je),te=new Ce(se,q+"leave",ae,o,ie),te.target=ut,te.relatedTarget=X,se=null,vr(ie)===Z&&(Ce=new Ce(Y,q+"enter",je,o,ie),Ce.target=X,Ce.relatedTarget=ut,se=Ce),ut=se,ae&&je)t:{for(Ce=ae,Y=je,q=0,X=Ce;X;X=Si(X))q++;for(X=0,se=Y;se;se=Si(se))X++;for(;0<q-X;)Ce=Si(Ce),q--;for(;0<X-q;)Y=Si(Y),X--;for(;q--;){if(Ce===Y||Y!==null&&Ce===Y.alternate)break t;Ce=Si(Ce),Y=Si(Y)}Ce=null}else Ce=null;ae!==null&&pm(ue,te,ae,Ce,!1),je!==null&&ut!==null&&pm(ue,ut,je,Ce,!0)}}e:{if(te=Z?Wi(Z):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var ve=Vp;else if(Up(te))if(Hp)ve=f2;else{ve=u2;var Ie=c2}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?Z&&Vc(Z.elementType)&&(ve=Vp):ve=d2;if(ve&&(ve=ve(t,Z))){Lp(ue,ve,o,ie);break e}Ie&&Ie(t,te,Z),t==="focusout"&&Z&&te.type==="number"&&Z.memoizedProps.value!=null&&Lc(te,"number",te.value)}switch(Ie=Z?Wi(Z):window,t){case"focusin":(Up(Ie)||Ie.contentEditable==="true")&&(ai=Ie,eu=Z,io=null);break;case"focusout":io=eu=ai=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,Kp(ue,o,ie);break;case"selectionchange":if(m2)break;case"keydown":case"keyup":Kp(ue,o,ie)}var Se;if(Wc)e:{switch(t){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else ti?Dp(t,o)&&(ke="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(ke="onCompositionStart");ke&&(Rp&&o.locale!=="ko"&&(ti||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&ti&&(Se=zp()):(xn=ie,Zc="value"in xn?xn.value:xn.textContent,ti=!0)),Ie=al(Z,ke),0<Ie.length&&(ke=new Tp(ke,t,null,o,ie),ue.push({event:ke,listeners:Ie}),Se?ke.data=Se:(Se=Ip(o),Se!==null&&(ke.data=Se)))),(Se=r2?i2(t,o):o2(t,o))&&(ke=al(Z,"onBeforeInput"),0<ke.length&&(Ie=new Tp("onBeforeInput","beforeinput",null,o,ie),ue.push({event:Ie,listeners:ke}),Ie.data=Se)),X2(ue,t,Z,o,ie)}dm(ue,a)})}function Oo(t,a,o){return{instance:t,listener:a,currentTarget:o}}function al(t,a){for(var o=a+"Capture",l=[];t!==null;){var f=t,m=f.stateNode;f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Xi(t,o),f!=null&&l.unshift(Oo(t,f,m)),f=Xi(t,a),f!=null&&l.push(Oo(t,f,m))),t=t.return}return l}function Si(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function pm(t,a,o,l,f){for(var m=a._reactName,S=[];o!==null&&o!==l;){var M=o,L=M.alternate,Z=M.stateNode;if(M=M.tag,L!==null&&L===l)break;M!==5&&M!==26&&M!==27||Z===null||(L=Z,f?(Z=Xi(o,m),Z!=null&&S.unshift(Oo(o,Z,L))):f||(Z=Xi(o,m),Z!=null&&S.push(Oo(o,Z,L)))),o=o.return}S.length!==0&&t.push({event:a,listeners:S})}var tb=/\r\n?/g,ab=/\u0000|\uFFFD/g;function gm(t){return(typeof t=="string"?t:""+t).replace(tb,`
|
|
49
|
-
`).replace(ab,"")}function mm(t,a){return a=gm(a),gm(t)===a}function nl(){}function Ke(t,a,o,l,f,m){switch(o){case"children":typeof l=="string"?a==="body"||a==="textarea"&&l===""||Jr(t,l):(typeof l=="number"||typeof l=="bigint")&&a!=="body"&&Jr(t,""+l);break;case"className":ds(t,"class",l);break;case"tabIndex":ds(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ds(t,o,l);break;case"style":wp(t,l,m);break;case"data":if(a!=="object"){ds(t,"data",l);break}case"src":case"href":if(l===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=gs(""+l),t.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(o==="formAction"?(a!=="input"&&Ke(t,a,"name",f.name,f,null),Ke(t,a,"formEncType",f.formEncType,f,null),Ke(t,a,"formMethod",f.formMethod,f,null),Ke(t,a,"formTarget",f.formTarget,f,null)):(Ke(t,a,"encType",f.encType,f,null),Ke(t,a,"method",f.method,f,null),Ke(t,a,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(o);break}l=gs(""+l),t.setAttribute(o,l);break;case"onClick":l!=null&&(t.onclick=nl);break;case"onScroll":l!=null&&Ve("scroll",t);break;case"onScrollEnd":l!=null&&Ve("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}o=gs(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""+l):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":l===!0?t.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(o,l):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(o,l):t.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(o):t.setAttribute(o,l);break;case"popover":Ve("beforetoggle",t),Ve("toggle",t),us(t,"popover",l);break;case"xlinkActuate":Fa(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Fa(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Fa(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Fa(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Fa(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Fa(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Fa(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Fa(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Fa(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":us(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=T$.get(o)||o,us(t,o,l))}}function Sd(t,a,o,l,f,m){switch(o){case"style":wp(t,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(s(60));t.innerHTML=o}}break;case"children":typeof l=="string"?Jr(t,l):(typeof l=="number"||typeof l=="bigint")&&Jr(t,""+l);break;case"onScroll":l!=null&&Ve("scroll",t);break;case"onScrollEnd":l!=null&&Ve("scrollend",t);break;case"onClick":l!=null&&(t.onclick=nl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!hp.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),a=o.slice(2,f?o.length-7:void 0),m=t[ta]||null,m=m!=null?m[o]:null,typeof m=="function"&&t.removeEventListener(a,m,f),typeof l=="function")){typeof m!="function"&&m!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,l,f);break e}o in t?t[o]=l:l===!0?t.setAttribute(o,""):us(t,o,l)}}}function It(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",t),Ve("load",t);var l=!1,f=!1,m;for(m in o)if(o.hasOwnProperty(m)){var S=o[m];if(S!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,m,S,o,null)}}f&&Ke(t,a,"srcSet",o.srcSet,o,null),l&&Ke(t,a,"src",o.src,o,null);return;case"input":Ve("invalid",t);var M=m=S=f=null,L=null,Z=null;for(l in o)if(o.hasOwnProperty(l)){var ie=o[l];if(ie!=null)switch(l){case"name":f=ie;break;case"type":S=ie;break;case"checked":L=ie;break;case"defaultChecked":Z=ie;break;case"value":m=ie;break;case"defaultValue":M=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(s(137,a));break;default:Ke(t,a,l,ie,o,null)}}xp(t,m,M,L,Z,S,f,!1),fs(t);return;case"select":Ve("invalid",t),l=S=m=null;for(f in o)if(o.hasOwnProperty(f)&&(M=o[f],M!=null))switch(f){case"value":m=M;break;case"defaultValue":S=M;break;case"multiple":l=M;default:Ke(t,a,f,M,o,null)}a=m,o=S,t.multiple=!!l,a!=null?Xr(t,!!l,a,!1):o!=null&&Xr(t,!!l,o,!0);return;case"textarea":Ve("invalid",t),m=f=l=null;for(S in o)if(o.hasOwnProperty(S)&&(M=o[S],M!=null))switch(S){case"value":l=M;break;case"defaultValue":f=M;break;case"children":m=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(91));break;default:Ke(t,a,S,M,o,null)}_p(t,l,f,m),fs(t);return;case"option":for(L in o)if(o.hasOwnProperty(L)&&(l=o[L],l!=null))switch(L){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(t,a,L,l,o,null)}return;case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":Ve("load",t);break;case"video":case"audio":for(l=0;l<Ro.length;l++)Ve(Ro[l],t);break;case"image":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"embed":case"source":case"link":Ve("error",t),Ve("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in o)if(o.hasOwnProperty(Z)&&(l=o[Z],l!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Ke(t,a,Z,l,o,null)}return;default:if(Vc(a)){for(ie in o)o.hasOwnProperty(ie)&&(l=o[ie],l!==void 0&&Sd(t,a,ie,l,o,void 0));return}}for(M in o)o.hasOwnProperty(M)&&(l=o[M],l!=null&&Ke(t,a,M,l,o,null))}function nb(t,a,o,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,S=null,M=null,L=null,Z=null,ie=null;for(ae in o){var ue=o[ae];if(o.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":L=ue;default:l.hasOwnProperty(ae)||Ke(t,a,ae,null,l,ue)}}for(var te in l){var ae=l[te];if(ue=o[te],l.hasOwnProperty(te)&&(ae!=null||ue!=null))switch(te){case"type":m=ae;break;case"name":f=ae;break;case"checked":Z=ae;break;case"defaultChecked":ie=ae;break;case"value":S=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(s(137,a));break;default:ae!==ue&&Ke(t,a,te,ae,l,ue)}}Uc(t,S,M,L,Z,ie,m,f);return;case"select":ae=S=M=te=null;for(m in o)if(L=o[m],o.hasOwnProperty(m)&&L!=null)switch(m){case"value":break;case"multiple":ae=L;default:l.hasOwnProperty(m)||Ke(t,a,m,null,l,L)}for(f in l)if(m=l[f],L=o[f],l.hasOwnProperty(f)&&(m!=null||L!=null))switch(f){case"value":te=m;break;case"defaultValue":M=m;break;case"multiple":S=m;default:m!==L&&Ke(t,a,f,m,l,L)}a=M,o=S,l=ae,te!=null?Xr(t,!!o,te,!1):!!l!=!!o&&(a!=null?Xr(t,!!o,a,!0):Xr(t,!!o,o?[]:"",!1));return;case"textarea":ae=te=null;for(M in o)if(f=o[M],o.hasOwnProperty(M)&&f!=null&&!l.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Ke(t,a,M,null,l,f)}for(S in l)if(f=l[S],m=o[S],l.hasOwnProperty(S)&&(f!=null||m!=null))switch(S){case"value":te=f;break;case"defaultValue":ae=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==m&&Ke(t,a,S,f,l,m)}jp(t,te,ae);return;case"option":for(var je in o)if(te=o[je],o.hasOwnProperty(je)&&te!=null&&!l.hasOwnProperty(je))switch(je){case"selected":t.selected=!1;break;default:Ke(t,a,je,null,l,te)}for(L in l)if(te=l[L],ae=o[L],l.hasOwnProperty(L)&&te!==ae&&(te!=null||ae!=null))switch(L){case"selected":t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:Ke(t,a,L,te,l,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in o)te=o[Ce],o.hasOwnProperty(Ce)&&te!=null&&!l.hasOwnProperty(Ce)&&Ke(t,a,Ce,null,l,te);for(Z in l)if(te=l[Z],ae=o[Z],l.hasOwnProperty(Z)&&te!==ae&&(te!=null||ae!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(s(137,a));break;default:Ke(t,a,Z,te,l,ae)}return;default:if(Vc(a)){for(var ut in o)te=o[ut],o.hasOwnProperty(ut)&&te!==void 0&&!l.hasOwnProperty(ut)&&Sd(t,a,ut,void 0,l,te);for(ie in l)te=l[ie],ae=o[ie],!l.hasOwnProperty(ie)||te===ae||te===void 0&&ae===void 0||Sd(t,a,ie,te,l,ae);return}}for(var Y in o)te=o[Y],o.hasOwnProperty(Y)&&te!=null&&!l.hasOwnProperty(Y)&&Ke(t,a,Y,null,l,te);for(ue in l)te=l[ue],ae=o[ue],!l.hasOwnProperty(ue)||te===ae||te==null&&ae==null||Ke(t,a,ue,te,l,ae)}var wd=null,kd=null;function rl(t){return t.nodeType===9?t:t.ownerDocument}function hm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ym(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function Nd(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var zd=null;function rb(){var t=window.event;return t&&t.type==="popstate"?t===zd?!1:(zd=t,!0):(zd=null,!1)}var vm=typeof setTimeout=="function"?setTimeout:void 0,ib=typeof clearTimeout=="function"?clearTimeout:void 0,$m=typeof Promise=="function"?Promise:void 0,ob=typeof queueMicrotask=="function"?queueMicrotask:typeof $m<"u"?function(t){return $m.resolve(null).then(t).catch(sb)}:vm;function sb(t){setTimeout(function(){throw t})}function Cd(t,a){var o=a,l=0;do{var f=o.nextSibling;if(t.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"){if(l===0){t.removeChild(f),Bo(a);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=f}while(o);Bo(a)}function Ed(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Ed(o),Ic(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function lb(t,a,o,l){for(;t.nodeType===1;){var f=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Ki])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Oa(t.nextSibling),t===null)break}return null}function cb(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=Oa(t.nextSibling),t===null))return null;return t}function Oa(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return t}function bm(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(a===0)return t;a--}else o==="/$"&&a++}t=t.previousSibling}return null}function xm(t,a,o){switch(a=rl(o),t){case"html":if(t=a.documentElement,!t)throw Error(s(452));return t;case"head":if(t=a.head,!t)throw Error(s(453));return t;case"body":if(t=a.body,!t)throw Error(s(454));return t;default:throw Error(s(451))}}var za=new Map,jm=new Set;function il(t){return typeof t.getRootNode=="function"?t.getRootNode():t.ownerDocument}var cn=E.d;E.d={f:ub,r:db,D:fb,C:pb,L:gb,m:mb,X:yb,S:hb,M:vb};function ub(){var t=cn.f(),a=Xs();return t||a}function db(t){var a=Yr(t);a!==null&&a.tag===5&&a.type==="form"?K0(a):cn.r(t)}var wi=typeof document>"u"?null:document;function _m(t,a,o){var l=wi;if(l&&typeof a=="string"&&a){var f=va(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),jm.has(f)||(jm.add(f),t={rel:t,crossOrigin:o,href:a},l.querySelector(f)===null&&(a=l.createElement("link"),It(a,"link",t),Et(a),l.head.appendChild(a)))}}function fb(t){cn.D(t),_m("dns-prefetch",t,null)}function pb(t,a){cn.C(t,a),_m("preconnect",t,a)}function gb(t,a,o){cn.L(t,a,o);var l=wi;if(l&&t&&a){var f='link[rel="preload"][as="'+va(a)+'"]';a==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+va(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+va(o.imageSizes)+'"]')):f+='[href="'+va(t)+'"]';var m=f;switch(a){case"style":m=ki(t);break;case"script":m=Ni(t)}za.has(m)||(t=P({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),za.set(m,t),l.querySelector(f)!==null||a==="style"&&l.querySelector(Ao(m))||a==="script"&&l.querySelector(Do(m))||(a=l.createElement("link"),It(a,"link",t),Et(a),l.head.appendChild(a)))}}function mb(t,a){cn.m(t,a);var o=wi;if(o&&t){var l=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+va(l)+'"][href="'+va(t)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ni(t)}if(!za.has(m)&&(t=P({rel:"modulepreload",href:t},a),za.set(m,t),o.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Do(m)))return}l=o.createElement("link"),It(l,"link",t),Et(l),o.head.appendChild(l)}}}function hb(t,a,o){cn.S(t,a,o);var l=wi;if(l&&t){var f=Kr(l).hoistableStyles,m=ki(t);a=a||"default";var S=f.get(m);if(!S){var M={loading:0,preload:null};if(S=l.querySelector(Ao(m)))M.loading=5;else{t=P({rel:"stylesheet",href:t,"data-precedence":a},o),(o=za.get(m))&&Td(t,o);var L=S=l.createElement("link");Et(L),It(L,"link",t),L._p=new Promise(function(Z,ie){L.onload=Z,L.onerror=ie}),L.addEventListener("load",function(){M.loading|=1}),L.addEventListener("error",function(){M.loading|=2}),M.loading|=4,ol(S,a,l)}S={type:"stylesheet",instance:S,count:1,state:M},f.set(m,S)}}}function yb(t,a){cn.X(t,a);var o=wi;if(o&&t){var l=Kr(o).hoistableScripts,f=Ni(t),m=l.get(f);m||(m=o.querySelector(Do(f)),m||(t=P({src:t,async:!0},a),(a=za.get(f))&&Md(t,a),m=o.createElement("script"),Et(m),It(m,"link",t),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function vb(t,a){cn.M(t,a);var o=wi;if(o&&t){var l=Kr(o).hoistableScripts,f=Ni(t),m=l.get(f);m||(m=o.querySelector(Do(f)),m||(t=P({src:t,async:!0,type:"module"},a),(a=za.get(f))&&Md(t,a),m=o.createElement("script"),Et(m),It(m,"link",t),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function Sm(t,a,o,l){var f=(f=oe.current)?il(f):null;if(!f)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=ki(o.href),o=Kr(f).hoistableStyles,l=o.get(a),l||(l={type:"style",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=ki(o.href);var m=Kr(f).hoistableStyles,S=m.get(t);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=f.querySelector(Ao(t)))&&!m._p&&(S.instance=m,S.state.loading=5),za.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},za.set(t,o),m||$b(f,t,o,S.state))),a&&l===null)throw Error(s(528,""));return S}if(a&&l!==null)throw Error(s(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ni(o),o=Kr(f).hoistableScripts,l=o.get(a),l||(l={type:"script",instance:null,count:0,state:null},o.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function ki(t){return'href="'+va(t)+'"'}function Ao(t){return'link[rel="stylesheet"]['+t+"]"}function wm(t){return P({},t,{"data-precedence":t.precedence,precedence:null})}function $b(t,a,o,l){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?l.loading=1:(a=t.createElement("link"),l.preload=a,a.addEventListener("load",function(){return l.loading|=1}),a.addEventListener("error",function(){return l.loading|=2}),It(a,"link",o),Et(a),t.head.appendChild(a))}function Ni(t){return'[src="'+va(t)+'"]'}function Do(t){return"script[async]"+t}function km(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var l=t.querySelector('style[data-href~="'+va(o.href)+'"]');if(l)return a.instance=l,Et(l),l;var f=P({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Et(l),It(l,"style",f),ol(l,o.precedence,t),a.instance=l;case"stylesheet":f=ki(o.href);var m=t.querySelector(Ao(f));if(m)return a.state.loading|=4,a.instance=m,Et(m),m;l=wm(o),(f=za.get(f))&&Td(l,f),m=(t.ownerDocument||t).createElement("link"),Et(m);var S=m;return S._p=new Promise(function(M,L){S.onload=M,S.onerror=L}),It(m,"link",l),a.state.loading|=4,ol(m,o.precedence,t),a.instance=m;case"script":return m=Ni(o.src),(f=t.querySelector(Do(m)))?(a.instance=f,Et(f),f):(l=o,(f=za.get(m))&&(l=P({},o),Md(l,f)),t=t.ownerDocument||t,f=t.createElement("script"),Et(f),It(f,"link",l),t.head.appendChild(f),a.instance=f);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(l=a.instance,a.state.loading|=4,ol(l,o.precedence,t));return a.instance}function ol(t,a,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,S=0;S<l.length;S++){var M=l[S];if(M.dataset.precedence===a)m=M;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function Td(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Md(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var sl=null;function Nm(t,a,o){if(sl===null){var l=new Map,f=sl=new Map;f.set(o,l)}else f=sl,l=f.get(o),l||(l=new Map,f.set(o,l));if(l.has(t))return l;for(l.set(t,null),o=o.getElementsByTagName(t),f=0;f<o.length;f++){var m=o[f];if(!(m[Ki]||m[Ht]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(a)||"";S=t+S;var M=l.get(S);M?M.push(m):l.set(S,[m])}}return l}function zm(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function bb(t,a,o){if(o===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return t=a.disabled,typeof a.precedence=="string"&&t==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Cm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Io=null;function xb(){}function jb(t,a,o){if(Io===null)throw Error(s(475));var l=Io;if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=ki(o.href),m=t.querySelector(Ao(f));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=ll.bind(l),t.then(l,l)),a.state.loading|=4,a.instance=m,Et(m);return}m=t.ownerDocument||t,o=wm(o),(f=za.get(f))&&Td(o,f),m=m.createElement("link"),Et(m);var S=m;S._p=new Promise(function(M,L){S.onload=M,S.onerror=L}),It(m,"link",o),a.instance=m}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(l.count++,a=ll.bind(l),t.addEventListener("load",a),t.addEventListener("error",a))}}function _b(){if(Io===null)throw Error(s(475));var t=Io;return t.stylesheets&&t.count===0&&Rd(t,t.stylesheets),0<t.count?function(a){var o=setTimeout(function(){if(t.stylesheets&&Rd(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o)}}:null}function ll(){if(this.count--,this.count===0){if(this.stylesheets)Rd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var cl=null;function Rd(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,cl=new Map,a.forEach(Sb,t),cl=null,ll.call(t))}function Sb(t,a){if(!(a.state.loading&4)){var o=cl.get(t);if(o)var l=o.get(null);else{o=new Map,cl.set(t,o);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var S=f[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(o.set(S.dataset.precedence,S),l=S)}l&&o.set(null,l)}f=a.instance,S=f.getAttribute("data-precedence"),m=o.get(S)||l,m===l&&o.set(null,f),o.set(S,f),this.count++,l=ll.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),a.state.loading|=4}}var Uo={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function wb(t,a,o,l,f,m,S,M){this.tag=1,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ac(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ac(0),this.hiddenUpdates=Ac(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Em(t,a,o,l,f,m,S,M,L,Z,ie,ue){return t=new wb(t,a,o,S,M,L,Z,ue),a=1,m===!0&&(a|=24),m=ka(3,null,null,a),t.current=m,m.stateNode=t,a=du(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:l,isDehydrated:o,cache:a},Zu(m),t}function Tm(t){return t?(t=ii,t):ii}function Mm(t,a,o,l,f,m){f=Tm(f),l.context===null?l.context=f:l.pendingContext=f,l=Cn(a),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=En(t,l,a),o!==null&&(Yt(o,t,a),xo(o,t,a))}function Rm(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function Od(t,a){Rm(t,a),(t=t.alternate)&&Rm(t,a)}function Om(t){if(t.tag===13){var a=jn(t,67108864);a!==null&&Yt(a,t,67108864),Od(t,67108864)}}var ul=!0;function kb(t,a,o,l){var f=I.T;I.T=null;var m=E.p;try{E.p=2,Ad(t,a,o,l)}finally{E.p=m,I.T=f}}function Nb(t,a,o,l){var f=I.T;I.T=null;var m=E.p;try{E.p=8,Ad(t,a,o,l)}finally{E.p=m,I.T=f}}function Ad(t,a,o,l){if(ul){var f=Dd(l);if(f===null)_d(t,a,l,dl,o),Dm(t,l);else if(Cb(f,t,a,o,l))l.stopPropagation();else if(Dm(t,l),a&4&&-1<zb.indexOf(t)){for(;f!==null;){var m=Yr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=yr(m.pendingLanes);if(S!==0){var M=m;for(M.pendingLanes|=2,M.entangledLanes|=2;S;){var L=1<<31-ca(S);M.entanglements[1]|=L,S&=~L}Ha(m),(ot&6)===0&&(Ys=ea()+500,Mo(0))}}break;case 13:M=jn(m,2),M!==null&&Yt(M,m,2),Xs(),Od(m,2)}if(m=Dd(l),m===null&&_d(t,a,l,dl,o),m===f)break;f=m}f!==null&&l.stopPropagation()}else _d(t,a,l,null,o)}}function Dd(t){return t=Bc(t),Id(t)}var dl=null;function Id(t){if(dl=null,t=vr(t),t!==null){var a=fe(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=Ee(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return dl=t,null}function Am(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Zi()){case vn:return 2;case Gr:return 8;case hr:case is:return 32;case os:return 268435456;default:return 32}default:return 32}}var Ud=!1,In=null,Un=null,Ln=null,Lo=new Map,Vo=new Map,Vn=[],zb="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".split(" ");function Dm(t,a){switch(t){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":Lo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vo.delete(a.pointerId)}}function Ho(t,a,o,l,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:o,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},a!==null&&(a=Yr(a),a!==null&&Om(a)),t):(t.eventSystemFlags|=l,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t)}function Cb(t,a,o,l,f){switch(a){case"focusin":return In=Ho(In,t,a,o,l,f),!0;case"dragenter":return Un=Ho(Un,t,a,o,l,f),!0;case"mouseover":return Ln=Ho(Ln,t,a,o,l,f),!0;case"pointerover":var m=f.pointerId;return Lo.set(m,Ho(Lo.get(m)||null,t,a,o,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Vo.set(m,Ho(Vo.get(m)||null,t,a,o,l,f)),!0}return!1}function Im(t){var a=vr(t.target);if(a!==null){var o=fe(a);if(o!==null){if(a=o.tag,a===13){if(a=Ee(o),a!==null){t.blockedOn=a,_$(t.priority,function(){if(o.tag===13){var l=ga(),f=jn(o,l);f!==null&&Yt(f,o,l),Od(o,l)}});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fl(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=Dd(t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);Hc=l,o.target.dispatchEvent(l),Hc=null}else return a=Yr(o),a!==null&&Om(a),t.blockedOn=o,!1;a.shift()}return!0}function Um(t,a,o){fl(t)&&o.delete(a)}function Eb(){Ud=!1,In!==null&&fl(In)&&(In=null),Un!==null&&fl(Un)&&(Un=null),Ln!==null&&fl(Ln)&&(Ln=null),Lo.forEach(Um),Vo.forEach(Um)}function pl(t,a){t.blockedOn===a&&(t.blockedOn=null,Ud||(Ud=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Eb)))}var gl=null;function Lm(t){gl!==t&&(gl=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){gl===t&&(gl=null);for(var a=0;a<t.length;a+=3){var o=t[a],l=t[a+1],f=t[a+2];if(typeof l!="function"){if(Id(l||o)===null)continue;break}var m=Yr(o);m!==null&&(t.splice(a,3),a-=3,Nu(m,{pending:!0,data:f,method:o.method,action:l},l,f))}}))}function Bo(t){function a(L){return pl(L,t)}In!==null&&pl(In,t),Un!==null&&pl(Un,t),Ln!==null&&pl(Ln,t),Lo.forEach(a),Vo.forEach(a);for(var o=0;o<Vn.length;o++){var l=Vn[o];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Vn.length&&(o=Vn[0],o.blockedOn===null);)Im(o),o.blockedOn===null&&Vn.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var f=o[l],m=o[l+1],S=f[ta]||null;if(typeof m=="function")S||Lm(o);else if(S){var M=null;if(m&&m.hasAttribute("formAction")){if(f=m,S=m[ta]||null)M=S.formAction;else if(Id(f)!==null)continue}else M=S.action;typeof M=="function"?o[l+1]=M:(o.splice(l,3),l-=3),Lm(o)}}}function Ld(t){this._internalRoot=t}ml.prototype.render=Ld.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(s(409));var o=a.current,l=ga();Mm(o,l,t,a,null,null)},ml.prototype.unmount=Ld.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;t.tag===0&&ji(),Mm(t.current,2,null,t,null,null),Xs(),a[Fr]=null}};function ml(t){this._internalRoot=t}ml.prototype.unstable_scheduleHydration=function(t){if(t){var a=pp();t={blockedOn:null,target:t,priority:a};for(var o=0;o<Vn.length&&a!==0&&a<Vn[o].priority;o++);Vn.splice(o,0,t),o===0&&Im(t)}};var Vm=n.version;if(Vm!=="19.0.0")throw Error(s(527,Vm,"19.0.0"));E.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=U(a),t=t!==null?ee(t):null,t=t===null?null:t.stateNode,t};var Tb={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:I,findFiberByHostInstance:vr,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hl.isDisabled&&hl.supportsFiber)try{Gi=hl.inject(Tb),la=hl}catch{}}return Po.createRoot=function(t,a){if(!c(t))throw Error(s(299));var o=!1,l="",f=ng,m=rg,S=ig,M=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(M=a.unstable_transitionCallbacks)),a=Em(t,1,!1,null,null,o,l,f,m,S,M,null),t[Fr]=a.current,jd(t.nodeType===8?t.parentNode:t),new Ld(a)},Po.hydrateRoot=function(t,a,o){if(!c(t))throw Error(s(299));var l=!1,f="",m=ng,S=rg,M=ig,L=null,Z=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(m=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(L=o.unstable_transitionCallbacks),o.formState!==void 0&&(Z=o.formState)),a=Em(t,1,!0,a,o??null,l,f,m,S,M,L,Z),a.context=Tm(null),o=a.current,l=ga(),f=Cn(l),f.callback=null,En(o,f,l),a.current.lanes=l,Yi(a,l),Ha(a),t[Fr]=a.current,jd(t),new ml(a)},Po.version="19.0.0",Po}var Wm;function qb(){if(Wm)return Bd.exports;Wm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Bd.exports=Bb(),Bd.exports}var Pb=qb();function tt({num:e,title:n,mute:i,intro:s}){return r.jsxs("header",{className:"ggui-section__head",children:[r.jsx("div",{className:"ggui-section__num",children:e}),r.jsxs("div",{children:[r.jsxs("h2",{className:"ggui-section__title",children:[n,i?r.jsxs("span",{className:"ggui-mute",children:[" ",i]}):null]}),s?r.jsx("p",{className:"ggui-section__intro",children:s}):null]})]})}const bf="ggui-eui:navigate";function Zb(e){if(e==="/"||e==="")return{kind:"admin-index"};const n=/^\/s\/([^/]+)\/?$/.exec(e);if(n){const u=n[1];return u?{kind:"viewer",shortCode:decodeURIComponent(u)}:{kind:"not-found",pathname:e}}const i=/^\/preview\/([^/]+)\/?$/.exec(e);if(i){const u=i[1];return u?{kind:"blueprint",blueprintId:decodeURIComponent(u)}:{kind:"not-found",pathname:e}}if(e==="/admin"||e==="/admin/")return{kind:"admin-index"};if(e==="/admin/status"||e==="/admin/status/")return{kind:"admin-status"};if(e==="/admin/sessions"||e==="/admin/sessions/")return{kind:"admin-sessions"};if(e==="/admin/blueprints"||e==="/admin/blueprints/")return{kind:"admin-blueprints"};const s=/^\/admin\/variants\/([^/]+)\/generate\/?$/.exec(e);if(s){const u=s[1];return u?{kind:"admin-variant-generate",contractHash:decodeURIComponent(u)}:{kind:"not-found",pathname:e}}const c=/^\/admin\/variants\/([^/]+)\/?$/.exec(e);if(c){const u=c[1];return u?{kind:"admin-variant-detail",contractHash:decodeURIComponent(u)}:{kind:"not-found",pathname:e}}return e==="/admin/variants"||e==="/admin/variants/"?{kind:"admin-variants"}:e==="/admin/config"||e==="/admin/config/"?{kind:"admin-config"}:e==="/admin/tools"||e==="/admin/tools/"?{kind:"admin-tools"}:e==="/admin/llm-keys"||e==="/admin/llm-keys/"?{kind:"admin-llm-keys"}:e==="/admin/connector-keys"||e==="/admin/connector-keys/"?{kind:"admin-connector-keys"}:e==="/admin/oauth-providers"||e==="/admin/oauth-providers/"?{kind:"admin-oauth-providers"}:e==="/admin/clients"||e==="/admin/clients/"?{kind:"admin-clients"}:e==="/admin/theme"||e==="/admin/theme/"?{kind:"admin-theme"}:e==="/admin-login"||e==="/admin-login/"?{kind:"admin-login"}:e==="/devtools"||e==="/devtools/"?{kind:"devtools-index"}:e==="/devtools/llm-trace"||e==="/devtools/llm-trace/"?{kind:"devtools-llm-trace"}:e==="/devtools/validator"||e==="/devtools/validator/"?{kind:"devtools-validator"}:e==="/devtools/cache"||e==="/devtools/cache/"?{kind:"devtools-cache"}:e==="/devtools/timeline"||e==="/devtools/timeline/"?{kind:"devtools-timeline"}:e==="/devtools/payloads"||e==="/devtools/payloads/"?{kind:"devtools-payloads"}:e==="/devtools/benchmarks"||e==="/devtools/benchmarks/"?{kind:"devtools-benchmarks"}:{kind:"not-found",pathname:e}}let Xm=null,Gd=null;function Gb(e){return(e!==Xm||Gd===null)&&(Xm=e,Gd=Zb(e)),Gd}function Me(e){typeof window>"u"||(window.history.pushState(null,"",e),window.dispatchEvent(new Event(bf)))}function Fb(e){return typeof window>"u"?()=>{}:(window.addEventListener("popstate",e),window.addEventListener(bf,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(bf,e)})}function wv(e){return e.kind==="admin-index"||e.kind==="admin-status"||e.kind==="admin-sessions"||e.kind==="admin-blueprints"||e.kind==="admin-variants"||e.kind==="admin-variant-detail"||e.kind==="admin-variant-generate"||e.kind==="admin-config"||e.kind==="admin-tools"||e.kind==="admin-llm-keys"||e.kind==="admin-connector-keys"||e.kind==="admin-oauth-providers"||e.kind==="admin-clients"||e.kind==="admin-theme"}function kv(e){return e.kind==="devtools-index"||e.kind==="devtools-llm-trace"||e.kind==="devtools-validator"||e.kind==="devtools-cache"||e.kind==="devtools-timeline"||e.kind==="devtools-payloads"||e.kind==="devtools-benchmarks"}const Yb=[{label:"server",items:[{label:"status",path:"/admin/status",match:"admin-status"},{label:"sessions",path:"/admin/sessions",match:"admin-sessions"},{label:"blueprints",path:"/admin/blueprints",match:"admin-blueprints"},{label:"variants",path:"/admin/variants",match:"admin-variants"},{label:"config",path:"/admin/config",match:"admin-config"},{label:"tools",path:"/admin/tools",match:"admin-tools"}]},{label:"auth",items:[{label:"LLM keys",path:"/admin/llm-keys",match:"admin-llm-keys"},{label:"connector keys",path:"/admin/connector-keys",match:"admin-connector-keys"},{label:"OAuth providers",path:"/admin/oauth-providers",match:"admin-oauth-providers"},{label:"clients",path:"/admin/clients",match:"admin-clients"}]},{label:"appearance",items:[{label:"theme",path:"/admin/theme",match:"admin-theme"}]}];function Kb({route:e,children:n}){return r.jsxs("div",{className:"ggui-config-grid","data-ggui-admin-shell":!0,children:[r.jsx(Wb,{route:e}),r.jsx("div",{className:"ggui-admin-pane",children:n})]})}function Wb({route:e}){return r.jsx("nav",{className:"ggui-config-rail","aria-label":"admin sections","data-ggui-admin-rail":!0,children:Yb.map(n=>r.jsxs("div",{"data-ggui-admin-group":n.label,children:[r.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:r.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(i=>{const s=e.kind===i.match;return r.jsx("li",{"data-ggui-admin-item":i.match,children:r.jsx("button",{type:"button",onClick:()=>Me(i.path),"aria-current":s?"page":void 0,className:`ggui-config-rail__btn${s?" is-active":""}`,children:i.label})},i.path)})})]},n.label))})}const Xb=[{label:"inspect",items:[{label:"LLM trace",path:"/devtools/llm-trace",match:"devtools-llm-trace"},{label:"validator",path:"/devtools/validator",match:"devtools-validator"},{label:"cache",path:"/devtools/cache",match:"devtools-cache"}]},{label:"replay",items:[{label:"timeline",path:"/devtools/timeline",match:"devtools-timeline"},{label:"payloads",path:"/devtools/payloads",match:"devtools-payloads"}]},{label:"performance",items:[{label:"benchmarks",path:"/devtools/benchmarks",match:"devtools-benchmarks"}]}];function Jb({route:e,children:n}){return r.jsxs("div",{className:"ggui-config-grid","data-ggui-devtools-shell":!0,children:[r.jsx(Qb,{route:e}),r.jsx("div",{className:"ggui-admin-pane",children:n})]})}function Qb({route:e}){return r.jsx("nav",{className:"ggui-config-rail","aria-label":"devtools sections","data-ggui-devtools-rail":!0,children:Xb.map(n=>r.jsxs("div",{"data-ggui-devtools-group":n.label,children:[r.jsx("div",{className:"ggui-stack__head",style:{padding:"10px 14px 6px",borderBottom:0},children:r.jsx("span",{className:"ggui-stack__label",style:{fontSize:11},children:n.label})}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:n.items.map(i=>{const s=e.kind===i.match;return r.jsx("li",{"data-ggui-devtools-item":i.match,children:r.jsx("button",{type:"button",onClick:()=>Me(i.path),"aria-current":s?"page":void 0,className:`ggui-config-rail__btn${s?" is-active":""}`,children:i.label})},i.path)})})]},n.label))})}const un="#292929",zi="#d9d9d9",Fd="#f4f3ed",ex={mirror:{g1Outer:zi,g1Inner:un,g2Outer:un,g2Inner:zi,u:un,i:zi},"mono-ink":{g1Outer:un,g1Inner:un,g2Outer:un,g2Inner:un,u:un,i:un},reverse:{g1Outer:zi,g1Inner:Fd,g2Outer:Fd,g2Inner:zi,u:Fd,i:zi}};function Nv({width:e,variant:n="mirror"}){const i=Math.round(e*50/224),s=ex[n];return r.jsxs("svg",{viewBox:"0 0 224 50",width:e,height:i,"aria-label":"ggui",children:[r.jsx("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:s.g1Outer}),r.jsx("rect",{x:"33",y:"33",width:"17",height:"17",fill:s.g1Inner}),r.jsx("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:s.g2Outer}),r.jsx("rect",{x:"91",y:"33",width:"17",height:"17",fill:s.g2Inner}),r.jsx("path",{d:"M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z",fill:s.u}),r.jsx("rect",{x:"174",y:"0",width:"50",height:"50",fill:s.i})]})}function tx(){return r.jsx("footer",{className:"ggui-footer",children:r.jsxs("div",{className:"ggui-footer__inner",children:[r.jsxs("div",{className:"ggui-footer__meta",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"ggui"})," — generative graphical user interface"]}),r.jsx("div",{children:"@ggui-ai/console"}),r.jsx("div",{children:"served by your local ggui serve — same origin only"})]}),r.jsx("div",{className:"ggui-footer__mark",children:r.jsx(Nv,{width:160})})]})})}const ax=1e4;function nx({route:e}){const[n,i]=O.useState({kind:"idle"}),s=e.kind==="viewer"||!wv(e);if(O.useEffect(()=>{if(s)return;let u=!1,d=null;const p=async()=>{const g=new AbortController;try{const h=await fetch("/ggui/console/sessions?limit=3",{signal:g.signal,headers:{accept:"application/json"}});if(!h.ok)u||i({kind:"idle"});else{const y=await h.json();if(u)return;const v=y.sessions.find(j=>typeof j.shortCode=="string");!v||!v.shortCode?i({kind:"idle"}):i({kind:"active",total:y.sessions.length,shortCode:v.shortCode})}}catch{u||i({kind:"idle"})}finally{u||(d=setTimeout(()=>{p()},ax))}};return p(),()=>{u=!0,d!==null&&clearTimeout(d)}},[s]),s||n.kind==="idle")return null;const c=n.total===1?"live · 1":`live · ${n.total}`;return r.jsxs("button",{type:"button",className:"ggui-nav__pill","data-ggui-nav-live-pill":!0,"data-ggui-nav-live-shortcode":n.shortCode,onClick:()=>Me(`/s/${encodeURIComponent(n.shortCode)}`),"aria-label":`open latest live session ${n.shortCode}`,children:[r.jsx("span",{className:"ggui-nav__pill-dot","aria-hidden":!0}),r.jsx("span",{children:c}),r.jsx("span",{className:"ggui-nav__pill-arrow","aria-hidden":!0,children:"↗"})]})}const rx="ggui-mode";let yl=null;function ix(){if(yl!==null)return yl;if(typeof document>"u")return"prod";const e=document.querySelector(`meta[name="${rx}"]`);return yl=(e==null?void 0:e.getAttribute("content"))==="dev"?"dev":"prod",yl}function ox({route:e,rightSlot:n}){const i=sx(e),s=wv(e),c=kv(e),u=ix()==="dev"&&!c;return r.jsx("nav",{className:"ggui-nav","aria-label":"console navigation",children:r.jsxs("div",{className:"ggui-nav__inner",children:[r.jsxs("div",{className:"ggui-nav__left",children:[r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Me("/admin/status"),"aria-label":"go to admin",style:{display:"flex",alignItems:"center"},children:r.jsx(Nv,{width:84})}),r.jsx("span",{className:"ggui-nav__brand","aria-label":"ggui console",children:"console"}),r.jsx("span",{className:"ggui-nav__version",children:"v1"}),r.jsx("span",{className:"ggui-nav__version","aria-label":"community edition",children:"community"}),c?r.jsx("span",{className:"ggui-nav__version","data-ggui-dev-mode-pill":!0,style:{background:"var(--ggui-accent)",color:"white"},"aria-label":"dev mode",children:"DEV MODE"}):null,i?r.jsx("span",{className:"ggui-nav__crumb",children:i}):null]}),r.jsxs("ul",{className:"ggui-nav__links",children:[u?r.jsx("li",{children:r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Me("/devtools"),"data-ggui-nav-devtools":!0,children:"devtools →"})}):null,s?null:r.jsx("li",{children:r.jsx("button",{type:"button",className:"ggui-nav__link",onClick:()=>Me("/admin/status"),children:"admin →"})}),n?r.jsx("li",{children:n}):null]})]})})}function sx(e){switch(e.kind){case"viewer":return`/ s / ${e.shortCode}`;case"blueprint":return`/ preview / ${e.blueprintId}`;case"admin-index":case"admin-status":return"/ admin / status";case"admin-sessions":return"/ admin / sessions";case"admin-blueprints":return"/ admin / blueprints";case"admin-config":return"/ admin / config";case"admin-tools":return"/ admin / tools";case"admin-llm-keys":return"/ admin / llm-keys";case"admin-connector-keys":return"/ admin / connector-keys";case"admin-oauth-providers":return"/ admin / oauth-providers";case"admin-clients":return"/ admin / clients";case"admin-theme":return"/ admin / theme";case"admin-login":return"/ admin-login";case"devtools-index":return"/ devtools";case"devtools-llm-trace":return"/ devtools / llm-trace";case"devtools-validator":return"/ devtools / validator";case"devtools-cache":return"/ devtools / cache";case"devtools-timeline":return"/ devtools / timeline";case"devtools-payloads":return"/ devtools / payloads";case"devtools-benchmarks":return"/ devtools / benchmarks";case"not-found":return e.pathname;default:return null}}function Ot({route:e,children:n,variant:i="wide",showFooter:s=!0,navRightSlot:c}){const u=i==="narrow"?"ggui-shell__main ggui-shell__main--narrow":"ggui-shell__main",d=r.jsxs(r.Fragment,{children:[r.jsx(nx,{route:e}),c]});let p=n;return i==="admin"?p=r.jsx(Kb,{route:e,children:n}):i==="devtools"&&(p=r.jsx(Jb,{route:e,children:n})),r.jsxs("div",{className:"ggui-shell",children:[r.jsx(ox,{route:e,rightSlot:d}),r.jsx("main",{className:u,children:p}),s?r.jsx(tx,{}):null]})}function lx(){const[e,n]=O.useState(""),[i,s]=O.useState(!1),[c,u]=O.useState(null),d=(()=>{if(typeof window>"u")return"/admin";const g=new URLSearchParams(window.location.search).get("next");return g===null||g===""||!g.startsWith("/")||g.startsWith("//")?"/admin":g})(),p=async g=>{g.preventDefault(),u(null);const h=e.trim();if(h.length===0){u("Paste an admin token.");return}s(!0);try{const y=await fetch("/ggui/console/admin-login",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({token:h})});if(y.status===204){Me(d);return}if(y.status===401){u("Invalid token. Re-check the value printed on your `ggui serve` boot banner.");return}u(`Login failed — server returned ${y.status}`)}catch(y){u(`Login failed — ${String(y)}`)}finally{s(!1)}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / admin",title:"Sign in to the admin zone.",mute:"Admin token gates /admin and /devtools.",intro:r.jsxs(r.Fragment,{children:["Paste the admin token printed on your"," ",r.jsx("code",{className:"ggui-code",children:"ggui serve"})," boot banner. On success we set a same-origin"," ",r.jsx("code",{className:"ggui-code",children:"ggui_console_admin"})," ","HttpOnly cookie and bounce you to"," ",r.jsx("code",{className:"ggui-code",children:d}),"."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"admin token"}),r.jsx("span",{className:"ggui-card__num",children:"ADM / IN"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("form",{className:"ggui-form",onSubmit:p,"data-ggui-admin-login-form":!0,children:r.jsxs("div",{className:"ggui-form__row",children:[r.jsx("label",{className:"ggui-field","aria-label":"admin token",children:r.jsx("input",{type:"password",placeholder:"ggui_admin_...",value:e,onChange:g=>n(g.target.value),disabled:i,autoComplete:"off",spellCheck:!1,autoFocus:!0})}),r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-admin-login-submit":!0,disabled:i||e.trim().length===0,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),i?"signing in…":"sign in"]})]})}),c?r.jsx("p",{className:"ggui-muted",style:{marginTop:12},"data-ggui-admin-login-error":!0,children:c}):null]})]})]})}const cx={anthropic:{label:"Anthropic",help:"Used by Claude models.",apiKeyUrl:"https://console.anthropic.com/settings/keys"},openai:{label:"OpenAI",help:"Used by GPT models.",apiKeyUrl:"https://platform.openai.com/api-keys"},google:{label:"Google",help:"Used by Gemini models.",apiKeyUrl:"https://aistudio.google.com/app/apikey"},openrouter:{label:"OpenRouter",help:"Routes to any provider via one key.",apiKeyUrl:"https://openrouter.ai/keys"}};function Yd(){if(typeof window>"u")return;const e=window.location.pathname+window.location.search;Me(`/admin-login?next=${encodeURIComponent(e)}`)}function ux(e){return e.replace(/\[[\d;]*[a-zA-Z]/g,"").replace(/\s+/g,"")}function dx(){const[e,n]=O.useState({kind:"loading"}),i=async()=>{n(u=>u.kind==="ready"?u:{kind:"loading"});try{const u=await fetch("/ggui/console/llm-keys",{credentials:"include",headers:{accept:"application/json"}});if(u.status===401){Yd();return}if(!u.ok){n({kind:"error",message:u.status===404?"BYOK store not enabled — `ggui serve` should wire one by default.":`server returned ${u.status}`});return}const d=await u.json();n({kind:"ready",data:d})}catch(u){n({kind:"error",message:String(u)})}};O.useEffect(()=>{i()},[]);const s=async(u,d)=>{const p=await fetch("/ggui/console/llm-keys",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({provider:u,key:d})});if(p.status===401){Yd();return}if(!p.ok)throw new Error(`server returned ${p.status}`);await i()},c=async u=>{const d=await fetch(`/ggui/console/llm-keys/${encodeURIComponent(u)}`,{method:"DELETE",credentials:"include"});if(d.status===401){Yd();return}if(d.status!==204)throw new Error(`server returned ${d.status}`);await i()};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / admin / llm-keys",title:"Operator-side LLM keys.",mute:"Server-default keys for unpaired and operator generation.",intro:r.jsxs(r.Fragment,{children:["Each provider is checked against env vars first, then"," ",r.jsx("code",{className:"ggui-code",children:"~/.ggui/credentials.json"})," — env wins on collision. These are the keys"," ",r.jsx("code",{className:"ggui-code",children:"ggui serve"})," uses for any generation that doesn't carry a paired-user scope. The same plane is exposed to paired users at"," ",r.jsx("code",{className:"ggui-code",children:"/settings"}),"; the difference is which scope the writes land in."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-admin-llm-error":!0,children:["Couldn't load providers — ",e.message]}):r.jsx(fx,{rows:e.data.providers,scope:e.data.scope,onSet:s,onClear:c})]})}function fx({rows:e,scope:n,onSet:i,onClear:s}){return r.jsxs("div",{"data-ggui-admin-llm-list":!0,children:[r.jsxs("p",{className:"ggui-muted",style:{marginTop:0,marginBottom:16,fontSize:12},children:["scope: ",r.jsx("code",{className:"ggui-code",children:n})]}),r.jsx("div",{style:{display:"grid",gap:14},children:e.map(c=>r.jsx(px,{row:c,onSet:i,onClear:s},c.name))})]})}function px({row:e,onSet:n,onClear:i}){const s=cx[e.name],[c,u]=O.useState(""),[d,p]=O.useState(!1),[g,h]=O.useState(null),y=async j=>{j.preventDefault();const k=ux(c);if(k){p(!0),h(null);try{await n(e.name,k),u("")}catch(b){h(String(b))}finally{p(!1)}}},v=async()=>{p(!0),h(null);try{await i(e.name)}catch(j){h(String(j))}finally{p(!1)}};return r.jsxs("div",{className:"ggui-card","data-ggui-admin-llm-row":e.name,children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:s.label}),r.jsx("span",{className:"ggui-card__num",children:e.configured?e.source??"—":"not set"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:13},children:[s.help,e.envNames.length>0?r.jsxs(r.Fragment,{children:[" ","Env:"," ",e.envNames.map((j,k)=>r.jsxs("span",{children:[r.jsx("code",{className:"ggui-code",children:j}),k<e.envNames.length-1?", ":""]},j)),"."]}):null]}),e.configured&&e.keyPreview?r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 10px",fontSize:12},children:["current: ",r.jsxs("code",{className:"ggui-code",children:[e.keyPreview,"…"]}),e.source==="env"&&e.envName?r.jsxs(r.Fragment,{children:[" (from ",r.jsx("code",{className:"ggui-code",children:e.envName}),")"]}):null]}):null,r.jsxs("form",{onSubmit:y,style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[r.jsx("input",{type:"password",placeholder:`Paste ${s.label} key`,value:c,onChange:j=>u(j.target.value),disabled:d,autoComplete:"off",spellCheck:!1,style:{flex:1,minWidth:240,padding:"8px 10px",fontFamily:"var(--ggui-mono)",fontSize:12,border:"1px solid var(--ggui-line-2)",background:"var(--ggui-paper)",color:"var(--ggui-ink)",borderRadius:2}}),r.jsx("button",{type:"submit","data-ggui-admin-llm-set":!0,className:"ggui-btn",disabled:d||!c.trim(),children:d?"saving…":"save"}),e.inFile?r.jsx("button",{type:"button","data-ggui-admin-llm-clear":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>void v(),disabled:d,children:"clear"}):null,r.jsx("a",{href:s.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"ggui-muted",style:{fontSize:12},children:"issue a key →"})]}),e.source==="env"&&e.inFile?r.jsxs("p",{className:"ggui-muted",style:{marginTop:8,marginBottom:0,fontSize:12},children:["File value present but env var"," ",r.jsx("code",{className:"ggui-code",children:e.envName})," overrides."]}):null,g?r.jsx("p",{className:"ggui-muted",style:{marginTop:8,marginBottom:0,fontSize:12,color:"var(--ggui-color-error, #c5374b)"},children:g}):null]})]})}const gx=[{id:"google",label:"Google"},{id:"github",label:"GitHub"}],Kd="<redacted>";async function Jm(e,n,i,s){const c=new Headers(n.headers??{});i!==null&&c.set("X-Ggui-CSRF",i);const u=await fetch(e,{...n,headers:c,credentials:"include"});if(u.status!==403)return u;const d=await s();if(d===null)return u;const p=new Headers(n.headers??{});return p.set("X-Ggui-CSRF",d),fetch(e,{...n,headers:p,credentials:"include"})}function mx(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState(null),c=async()=>{try{const g=await fetch("/ggui/csrf-token",{headers:{accept:"application/json"},credentials:"include"});if(!g.ok)return null;const h=await g.json();return s(h.token),h.token}catch{return null}},u=async()=>{n(g=>g.kind==="ready"?g:{kind:"loading"});try{const g=await fetch("/ggui/admin/oauth-providers",{headers:{accept:"application/json"},credentials:"include"});if(g.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!g.ok){n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};O.useEffect(()=>{c(),u()},[]);const d=async(g,h)=>{const y=await Jm(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(h)},i,c);if(y.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(!y.ok)throw new Error(`server returned ${y.status}`);await u()},p=async g=>{const h=await Jm(`/ggui/admin/oauth-providers/${encodeURIComponent(g)}`,{method:"DELETE"},i,c);if(h.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/oauth-providers")}`);return}if(h.status!==204)throw new Error(`server returned ${h.status}`);await u()};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / oauth",title:"OAuth login providers.",mute:"Operator-only — end-user sign-in identity.",intro:r.jsxs(r.Fragment,{children:["Configure OAuth login providers so end-users can sign in with their existing identity. Operator-only — these credentials are stored at"," ",r.jsx("code",{className:"ggui-code",children:"~/.ggui/oauth-providers.json"})," ","(mode 0600). Set the"," ",r.jsx("code",{className:"ggui-code",children:"GGUI_OAUTH_<PROVIDERID>_CLIENT_ID"})," ","/"," ",r.jsx("code",{className:"ggui-code",children:"_CLIENT_SECRET"})," env vars to override per-deployment."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading providers…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-oauth-providers-error":!0,children:["Couldn't load providers — ",e.message]}):r.jsx("div",{"data-ggui-oauth-providers-list":!0,className:"ggui-stack","aria-label":"oauth providers",children:gx.map(g=>{const h=e.data.providers.find(y=>y.providerId===g.id);return r.jsx(hx,{providerId:g.id,label:g.label,row:h,onSave:d,onDelete:p},g.id)})})]})}function hx({providerId:e,label:n,row:i,onSave:s,onDelete:c}){const u=(i==null?void 0:i.source)==="env",d=(i==null?void 0:i.source)==="file",p=(i==null?void 0:i.clientId)??"",g=(i==null?void 0:i.enabled)??!0,[h,y]=O.useState(p),[v,j]=O.useState(""),[k,b]=O.useState(g),[C,z]=O.useState(!1),[N,$]=O.useState(null);O.useEffect(()=>{y((i==null?void 0:i.clientId)??""),j(""),b((i==null?void 0:i.enabled)??!0)},[i==null?void 0:i.clientId,i==null?void 0:i.enabled,i==null?void 0:i.source]);const w=h!==p||v.trim().length>0||k!==g,R=async _=>{if(_.preventDefault(),$(null),h.trim().length===0){$("Client ID is required.");return}if(!d&&v.trim().length===0){$("Client Secret is required.");return}z(!0);try{await s(e,{clientId:h.trim(),clientSecret:v.trim(),enabled:k})}catch(T){$(`save failed — ${String(T)}`)}finally{z(!1)}},x=async()=>{if(window.confirm(`Delete ${n} OAuth config? End-users will no longer be able to sign in with ${n}.`)){$(null),z(!0);try{await c(e)}catch(_){$(`delete failed — ${String(_)}`)}finally{z(!1)}}};return r.jsxs("article",{"data-ggui-oauth-provider-card":e,className:"ggui-card",style:{opacity:C?.6:1},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:n}),r.jsx("span",{style:{marginLeft:"auto"},children:r.jsx(yx,{row:i})})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("form",{className:"ggui-form",onSubmit:_=>{R(_)},children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[r.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client ID`,children:[r.jsx("span",{className:"ggui-muted",children:"Client ID"}),r.jsx("span",{className:"ggui-field",children:r.jsx("input",{type:"text",placeholder:i===void 0?`paste ${n} OAuth client ID`:"",value:h,onChange:_=>y(_.target.value),readOnly:u,disabled:C,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-id":!0})})]}),r.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:4},"aria-label":`${n} client secret`,children:[r.jsx("span",{className:"ggui-muted",children:"Client Secret"}),r.jsx("span",{className:"ggui-field",children:r.jsx("input",{type:"password",placeholder:u?Kd:d?`${Kd} — leave blank to keep`:`paste ${n} OAuth client secret`,value:u?Kd:v,onChange:_=>j(_.target.value),readOnly:u,disabled:C,autoComplete:"off",spellCheck:!1,"data-ggui-oauth-provider-client-secret":!0})})]}),r.jsxs("label",{style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:8},"aria-label":`${n} enabled`,children:[r.jsx("input",{type:"checkbox",checked:k,onChange:_=>b(_.target.checked),disabled:u||C,style:{flex:"none",width:"auto"},"data-ggui-oauth-provider-enabled":!0}),r.jsx("span",{children:"Enabled"}),u?r.jsx("span",{className:"ggui-muted",style:{marginLeft:8},children:"env-overrides are always-on"}):null]})]}),r.jsxs("div",{className:"ggui-form__row",style:{marginTop:12,gap:8},children:[r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-oauth-provider-save":!0,disabled:u||C||!w,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),C?"saving…":"save"]}),d?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-oauth-provider-delete":!0,disabled:C,onClick:()=>{x()},style:{color:"crimson",borderColor:"crimson"},children:"delete"}):null]})]}),N?r.jsx("p",{className:"ggui-muted",style:{marginTop:8},"data-ggui-oauth-provider-error":!0,children:N}):null]})]})}function yx({row:e}){return e===void 0?r.jsx("span",{className:"ggui-tag",style:{opacity:.5},children:"not configured"}):e.source==="env"?r.jsx("span",{className:"ggui-tag",title:"set via GGUI_OAUTH_*_CLIENT_ID/_SECRET env vars",children:"configured (env)"}):r.jsx("span",{className:"ggui-tag",title:"set via this UI; persisted to ~/.ggui/oauth-providers.json",children:"configured (file)"})}const vx="modulepreload",$x=function(e){return"/"+e},Qm={},bx=function(n,i,s){let c=Promise.resolve();if(i&&i.length>0){let d=function(h){return Promise.all(h.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),g=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));c=d(i.map(h=>{if(h=$x(h),h in Qm)return;Qm[h]=!0;const y=h.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${v}`))return;const j=document.createElement("link");if(j.rel=y?"stylesheet":vx,y||(j.as="script"),j.crossOrigin="",j.href=h,g&&j.setAttribute("nonce",g),document.head.appendChild(j),y)return new Promise((k,b)=>{j.addEventListener("load",k),j.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(d){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=d,window.dispatchEvent(p),!p.defaultPrevented)throw d}return c.then(d=>{for(const p of d||[])p.status==="rejected"&&u(p.reason);return n().catch(u)})},xx="draft-2026-05-24",jx=xx;function ne(e,n,i){function s(p,g){if(p._zod||Object.defineProperty(p,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),p._zod.traits.has(e))return;p._zod.traits.add(e),n(p,g);const h=d.prototype,y=Object.keys(h);for(let v=0;v<y.length;v++){const j=y[v];j in p||(p[j]=h[j].bind(p))}}const c=(i==null?void 0:i.Parent)??Object;class u extends c{}Object.defineProperty(u,"name",{value:e});function d(p){var g;const h=i!=null&&i.Parent?new u:this;s(h,p),(g=h._zod).deferred??(g.deferred=[]);for(const y of h._zod.deferred)y();return h}return Object.defineProperty(d,"init",{value:s}),Object.defineProperty(d,Symbol.hasInstance,{value:p=>{var g,h;return i!=null&&i.Parent&&p instanceof i.Parent?!0:(h=(g=p==null?void 0:p._zod)==null?void 0:g.traits)==null?void 0:h.has(e)}}),Object.defineProperty(d,"name",{value:e}),d}class Ri extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class zv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Cv={};function dr(e){return Cv}function Ev(e){const n=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,c])=>n.indexOf(+s)===-1).map(([s,c])=>c)}function xf(e,n){return typeof n=="bigint"?n.toString():n}function $c(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Af(e){return e==null}function Df(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function _x(e,n){const i=(e.toString().split(".")[1]||"").length,s=n.toString();let c=(s.split(".")[1]||"").length;if(c===0&&/\d?e-\d?/.test(s)){const g=s.match(/\d?e-(\d?)/);g!=null&&g[1]&&(c=Number.parseInt(g[1]))}const u=i>c?i:c,d=Number.parseInt(e.toFixed(u).replace(".","")),p=Number.parseInt(n.toFixed(u).replace(".",""));return d%p/10**u}const eh=Symbol("evaluating");function He(e,n,i){let s;Object.defineProperty(e,n,{get(){if(s!==eh)return s===void 0&&(s=eh,s=i()),s},set(c){Object.defineProperty(e,n,{value:c})},configurable:!0})}function Pr(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function pr(...e){const n={};for(const i of e){const s=Object.getOwnPropertyDescriptors(i);Object.assign(n,s)}return Object.defineProperties({},n)}function th(e){return JSON.stringify(e)}function Sx(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Tv="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const wx=$c(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function Di(e){if(Xo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(Xo(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Mv(e){return Di(e)?{...e}:Array.isArray(e)?[...e]:e}const kx=new Set(["string","number","symbol"]);function Ii(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gr(e,n,i){const s=new e._zod.constr(n??e._zod.def);return(!n||i!=null&&i.parent)&&(s._zod.parent=e),s}function _e(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Nx(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const zx={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Cx(e,n){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=pr(e._zod.def,{get shape(){const d={};for(const p in n){if(!(p in i.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(d[p]=i.shape[p])}return Pr(this,"shape",d),d},checks:[]});return gr(e,u)}function Ex(e,n){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=pr(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const p in n){if(!(p in i.shape))throw new Error(`Unrecognized key: "${p}"`);n[p]&&delete d[p]}return Pr(this,"shape",d),d},checks:[]});return gr(e,u)}function Tx(e,n){if(!Di(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const c=pr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Pr(this,"shape",u),u}});return gr(e,c)}function Mx(e,n){if(!Di(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=pr(e._zod.def,{get shape(){const s={...e._zod.def.shape,...n};return Pr(this,"shape",s),s}});return gr(e,i)}function Rx(e,n){const i=pr(e._zod.def,{get shape(){const s={...e._zod.def.shape,...n._zod.def.shape};return Pr(this,"shape",s),s},get catchall(){return n._zod.def.catchall},checks:[]});return gr(e,i)}function Ox(e,n,i){const c=n._zod.def.checks;if(c&&c.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=pr(n._zod.def,{get shape(){const p=n._zod.def.shape,g={...p};if(i)for(const h in i){if(!(h in p))throw new Error(`Unrecognized key: "${h}"`);i[h]&&(g[h]=e?new e({type:"optional",innerType:p[h]}):p[h])}else for(const h in p)g[h]=e?new e({type:"optional",innerType:p[h]}):p[h];return Pr(this,"shape",g),g},checks:[]});return gr(n,d)}function Ax(e,n,i){const s=pr(n._zod.def,{get shape(){const c=n._zod.def.shape,u={...c};if(i)for(const d in i){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(u[d]=new e({type:"nonoptional",innerType:c[d]}))}else for(const d in c)u[d]=new e({type:"nonoptional",innerType:c[d]});return Pr(this,"shape",u),u}});return gr(n,s)}function Ti(e,n=0){var i;if(e.aborted===!0)return!0;for(let s=n;s<e.issues.length;s++)if(((i=e.issues[s])==null?void 0:i.continue)!==!0)return!0;return!1}function Mi(e,n){return n.map(i=>{var s;return(s=i).path??(s.path=[]),i.path.unshift(e),i})}function vl(e){return typeof e=="string"?e:e==null?void 0:e.message}function fr(e,n,i){var c,u,d,p,g,h;const s={...e,path:e.path??[]};if(!e.message){const y=vl((d=(u=(c=e.inst)==null?void 0:c._zod.def)==null?void 0:u.error)==null?void 0:d.call(u,e))??vl((p=n==null?void 0:n.error)==null?void 0:p.call(n,e))??vl((g=i.customError)==null?void 0:g.call(i,e))??vl((h=i.localeError)==null?void 0:h.call(i,e))??"Invalid input";s.message=y}return delete s.inst,delete s.continue,n!=null&&n.reportInput||delete s.input,s}function If(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Jo(...e){const[n,i,s]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:s}:{...n}}const Rv=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,xf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ov=ne("$ZodError",Rv),Av=ne("$ZodError",Rv,{Parent:Error});function Dx(e,n=i=>i.message){const i={},s=[];for(const c of e.issues)c.path.length>0?(i[c.path[0]]=i[c.path[0]]||[],i[c.path[0]].push(n(c))):s.push(n(c));return{formErrors:s,fieldErrors:i}}function Ix(e,n=i=>i.message){const i={_errors:[]},s=c=>{for(const u of c.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>s({issues:d}));else if(u.code==="invalid_key")s({issues:u.issues});else if(u.code==="invalid_element")s({issues:u.issues});else if(u.path.length===0)i._errors.push(n(u));else{let d=i,p=0;for(;p<u.path.length;){const g=u.path[p];p===u.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(u))):d[g]=d[g]||{_errors:[]},d=d[g],p++}}};return s(e),i}const Uf=e=>(n,i,s,c)=>{const u=s?Object.assign(s,{async:!1}):{async:!1},d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise)throw new Ri;if(d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>fr(g,u,dr())));throw Tv(p,c==null?void 0:c.callee),p}return d.value},Lf=e=>async(n,i,s,c)=>{const u=s?Object.assign(s,{async:!0}):{async:!0};let d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const p=new((c==null?void 0:c.Err)??e)(d.issues.map(g=>fr(g,u,dr())));throw Tv(p,c==null?void 0:c.callee),p}return d.value},bc=e=>(n,i,s)=>{const c=s?{...s,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},c);if(u instanceof Promise)throw new Ri;return u.issues.length?{success:!1,error:new(e??Ov)(u.issues.map(d=>fr(d,c,dr())))}:{success:!0,data:u.value}},Ux=bc(Av),xc=e=>async(n,i,s)=>{const c=s?Object.assign(s,{async:!0}):{async:!0};let u=n._zod.run({value:i,issues:[]},c);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(d=>fr(d,c,dr())))}:{success:!0,data:u.value}},Lx=xc(Av),Vx=e=>(n,i,s)=>{const c=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Uf(e)(n,i,c)},Hx=e=>(n,i,s)=>Uf(e)(n,i,s),Bx=e=>async(n,i,s)=>{const c=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Lf(e)(n,i,c)},qx=e=>async(n,i,s)=>Lf(e)(n,i,s),Px=e=>(n,i,s)=>{const c=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return bc(e)(n,i,c)},Zx=e=>(n,i,s)=>bc(e)(n,i,s),Gx=e=>async(n,i,s)=>{const c=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return xc(e)(n,i,c)},Fx=e=>async(n,i,s)=>xc(e)(n,i,s),Yx=/^[cC][^\s-]{8,}$/,Kx=/^[0-9a-z]+$/,Wx=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Xx=/^[0-9a-vA-V]{20}$/,Jx=/^[A-Za-z0-9]{27}$/,Qx=/^[a-zA-Z0-9_-]{21}$/,e5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ah=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,a5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,n5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function r5(){return new RegExp(n5,"u")}const i5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,o5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,s5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,l5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,c5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dv=/^[A-Za-z0-9_-]*$/,u5=/^\+[1-9]\d{6,14}$/,Iv="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",d5=new RegExp(`^${Iv}$`);function Uv(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function f5(e){return new RegExp(`^${Uv(e)}$`)}function p5(e){const n=Uv({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${n}(?:${i.join("|")})`;return new RegExp(`^${Iv}T(?:${s})$`)}const g5=e=>{const n=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},m5=/^-?\d+$/,Lv=/^-?\d+(?:\.\d+)?$/,h5=/^(?:true|false)$/i,y5=/^null$/i,v5=/^[^A-Z]*$/,$5=/^[^a-z]*$/,ia=ne("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Vv={number:"number",bigint:"bigint",object:"date"},Hv=ne("$ZodCheckLessThan",(e,n)=>{ia.init(e,n);const i=Vv[typeof n.value];e._zod.onattach.push(s=>{const c=s._zod.bag,u=(n.inclusive?c.maximum:c.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?c.maximum=n.value:c.exclusiveMaximum=n.value)}),e._zod.check=s=>{(n.inclusive?s.value<=n.value:s.value<n.value)||s.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:s.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Bv=ne("$ZodCheckGreaterThan",(e,n)=>{ia.init(e,n);const i=Vv[typeof n.value];e._zod.onattach.push(s=>{const c=s._zod.bag,u=(n.inclusive?c.minimum:c.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?c.minimum=n.value:c.exclusiveMinimum=n.value)}),e._zod.check=s=>{(n.inclusive?s.value>=n.value:s.value>n.value)||s.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:s.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),b5=ne("$ZodCheckMultipleOf",(e,n)=>{ia.init(e,n),e._zod.onattach.push(i=>{var s;(s=i._zod.bag).multipleOf??(s.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):_x(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),x5=ne("$ZodCheckNumberFormat",(e,n)=>{var d;ia.init(e,n),n.format=n.format||"float64";const i=(d=n.format)==null?void 0:d.includes("int"),s=i?"int":"number",[c,u]=zx[n.format];e._zod.onattach.push(p=>{const g=p._zod.bag;g.format=n.format,g.minimum=c,g.maximum=u,i&&(g.pattern=m5)}),e._zod.check=p=>{const g=p.value;if(i){if(!Number.isInteger(g)){p.issues.push({expected:s,format:n.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?p.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!n.abort}):p.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!n.abort});return}}g<c&&p.issues.push({origin:"number",input:g,code:"too_small",minimum:c,inclusive:!0,inst:e,continue:!n.abort}),g>u&&p.issues.push({origin:"number",input:g,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),j5=ne("$ZodCheckMaxLength",(e,n)=>{var i;ia.init(e,n),(i=e._zod.def).when??(i.when=s=>{const c=s.value;return!Af(c)&&c.length!==void 0}),e._zod.onattach.push(s=>{const c=s._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<c&&(s._zod.bag.maximum=n.maximum)}),e._zod.check=s=>{const c=s.value;if(c.length<=n.maximum)return;const d=If(c);s.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),_5=ne("$ZodCheckMinLength",(e,n)=>{var i;ia.init(e,n),(i=e._zod.def).when??(i.when=s=>{const c=s.value;return!Af(c)&&c.length!==void 0}),e._zod.onattach.push(s=>{const c=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>c&&(s._zod.bag.minimum=n.minimum)}),e._zod.check=s=>{const c=s.value;if(c.length>=n.minimum)return;const d=If(c);s.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:c,inst:e,continue:!n.abort})}}),S5=ne("$ZodCheckLengthEquals",(e,n)=>{var i;ia.init(e,n),(i=e._zod.def).when??(i.when=s=>{const c=s.value;return!Af(c)&&c.length!==void 0}),e._zod.onattach.push(s=>{const c=s._zod.bag;c.minimum=n.length,c.maximum=n.length,c.length=n.length}),e._zod.check=s=>{const c=s.value,u=c.length;if(u===n.length)return;const d=If(c),p=u>n.length;s.issues.push({origin:d,...p?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!n.abort})}}),jc=ne("$ZodCheckStringFormat",(e,n)=>{var i,s;ia.init(e,n),e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=c=>{n.pattern.lastIndex=0,!n.pattern.test(c.value)&&c.issues.push({origin:"string",code:"invalid_format",format:n.format,input:c.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(s=e._zod).check??(s.check=()=>{})}),w5=ne("$ZodCheckRegex",(e,n)=>{jc.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),k5=ne("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=v5),jc.init(e,n)}),N5=ne("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=$5),jc.init(e,n)}),z5=ne("$ZodCheckIncludes",(e,n)=>{ia.init(e,n);const i=Ii(n.includes),s=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=s,e._zod.onattach.push(c=>{const u=c._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(s)}),e._zod.check=c=>{c.value.includes(n.includes,n.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:c.value,inst:e,continue:!n.abort})}}),C5=ne("$ZodCheckStartsWith",(e,n)=>{ia.init(e,n);const i=new RegExp(`^${Ii(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(s=>{const c=s._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(i)}),e._zod.check=s=>{s.value.startsWith(n.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:s.value,inst:e,continue:!n.abort})}}),E5=ne("$ZodCheckEndsWith",(e,n)=>{ia.init(e,n);const i=new RegExp(`.*${Ii(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(s=>{const c=s._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(i)}),e._zod.check=s=>{s.value.endsWith(n.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:s.value,inst:e,continue:!n.abort})}}),T5=ne("$ZodCheckOverwrite",(e,n)=>{ia.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class M5{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const s=n.split(`
|
|
50
|
-
`).filter(d=>d),c=Math.min(...s.map(d=>d.length-d.trimStart().length)),u=s.map(d=>d.slice(c)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,i=this==null?void 0:this.args,c=[...((this==null?void 0:this.content)??[""]).map(u=>` ${u}`)];return new n(...i,c.join(`
|
|
51
|
-
`))}}const R5={major:4,minor:3,patch:6},at=ne("$ZodType",(e,n)=>{var c;var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=R5;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const u of s)for(const d of u._zod.onattach)d(e);if(s.length===0)(i=e._zod).deferred??(i.deferred=[]),(c=e._zod.deferred)==null||c.push(()=>{e._zod.run=e._zod.parse});else{const u=(p,g,h)=>{let y=Ti(p),v;for(const j of g){if(j._zod.def.when){if(!j._zod.def.when(p))continue}else if(y)continue;const k=p.issues.length,b=j._zod.check(p);if(b instanceof Promise&&(h==null?void 0:h.async)===!1)throw new Ri;if(v||b instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await b,p.issues.length!==k&&(y||(y=Ti(p,k)))});else{if(p.issues.length===k)continue;y||(y=Ti(p,k))}}return v?v.then(()=>p):p},d=(p,g,h)=>{if(Ti(p))return p.aborted=!0,p;const y=u(g,s,h);if(y instanceof Promise){if(h.async===!1)throw new Ri;return y.then(v=>e._zod.parse(v,h))}return e._zod.parse(y,h)};e._zod.run=(p,g)=>{if(g.skipChecks)return e._zod.parse(p,g);if(g.direction==="backward"){const y=e._zod.parse({value:p.value,issues:[]},{...g,skipChecks:!0});return y instanceof Promise?y.then(v=>d(v,p,g)):d(y,p,g)}const h=e._zod.parse(p,g);if(h instanceof Promise){if(g.async===!1)throw new Ri;return h.then(y=>u(y,s,g))}return u(h,s,g)}}He(e,"~standard",()=>({validate:u=>{var d;try{const p=Ux(e,u);return p.success?{value:p.data}:{issues:(d=p.error)==null?void 0:d.issues}}catch{return Lx(e,u).then(g=>{var h;return g.success?{value:g.data}:{issues:(h=g.error)==null?void 0:h.issues}})}},vendor:"zod",version:1}))}),Vf=ne("$ZodString",(e,n)=>{var i;at.init(e,n),e._zod.pattern=[...((i=e==null?void 0:e._zod.bag)==null?void 0:i.patterns)??[]].pop()??g5(e._zod.bag),e._zod.parse=(s,c)=>{if(n.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),rt=ne("$ZodStringFormat",(e,n)=>{jc.init(e,n),Vf.init(e,n)}),O5=ne("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=t5),rt.init(e,n)}),A5=ne("$ZodUUID",(e,n)=>{if(n.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(s===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=ah(s))}else n.pattern??(n.pattern=ah());rt.init(e,n)}),D5=ne("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=a5),rt.init(e,n)}),I5=ne("$ZodURL",(e,n)=>{rt.init(e,n),e._zod.check=i=>{try{const s=i.value.trim(),c=new URL(s);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(c.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(c.protocol.endsWith(":")?c.protocol.slice(0,-1):c.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=c.href:i.value=s;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),U5=ne("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=r5()),rt.init(e,n)}),L5=ne("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=Qx),rt.init(e,n)}),V5=ne("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=Yx),rt.init(e,n)}),H5=ne("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Kx),rt.init(e,n)}),B5=ne("$ZodULID",(e,n)=>{n.pattern??(n.pattern=Wx),rt.init(e,n)}),q5=ne("$ZodXID",(e,n)=>{n.pattern??(n.pattern=Xx),rt.init(e,n)}),P5=ne("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=Jx),rt.init(e,n)}),Z5=ne("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=p5(n)),rt.init(e,n)}),G5=ne("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=d5),rt.init(e,n)}),F5=ne("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=f5(n)),rt.init(e,n)}),Y5=ne("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=e5),rt.init(e,n)}),K5=ne("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=i5),rt.init(e,n),e._zod.bag.format="ipv4"}),W5=ne("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=o5),rt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),X5=ne("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=s5),rt.init(e,n)}),J5=ne("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=l5),rt.init(e,n),e._zod.check=i=>{const s=i.value.split("/");try{if(s.length!==2)throw new Error;const[c,u]=s;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${c}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function qv(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Q5=ne("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=c5),rt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{qv(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function e4(e){if(!Dv.test(e))return!1;const n=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return qv(i)}const t4=ne("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Dv),rt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{e4(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),a4=ne("$ZodE164",(e,n)=>{n.pattern??(n.pattern=u5),rt.init(e,n)});function n4(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[s]=i;if(!s)return!1;const c=JSON.parse(atob(s));return!("typ"in c&&(c==null?void 0:c.typ)!=="JWT"||!c.alg||n&&(!("alg"in c)||c.alg!==n))}catch{return!1}}const r4=ne("$ZodJWT",(e,n)=>{rt.init(e,n),e._zod.check=i=>{n4(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Pv=ne("$ZodNumber",(e,n)=>{at.init(e,n),e._zod.pattern=e._zod.bag.pattern??Lv,e._zod.parse=(i,s)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const c=i.value;if(typeof c=="number"&&!Number.isNaN(c)&&Number.isFinite(c))return i;const u=typeof c=="number"?Number.isNaN(c)?"NaN":Number.isFinite(c)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:c,inst:e,...u?{received:u}:{}}),i}}),i4=ne("$ZodNumberFormat",(e,n)=>{x5.init(e,n),Pv.init(e,n)}),o4=ne("$ZodBoolean",(e,n)=>{at.init(e,n),e._zod.pattern=h5,e._zod.parse=(i,s)=>{if(n.coerce)try{i.value=!!i.value}catch{}const c=i.value;return typeof c=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:c,inst:e}),i}}),s4=ne("$ZodNull",(e,n)=>{at.init(e,n),e._zod.pattern=y5,e._zod.values=new Set([null]),e._zod.parse=(i,s)=>{const c=i.value;return c===null||i.issues.push({expected:"null",code:"invalid_type",input:c,inst:e}),i}}),l4=ne("$ZodUnknown",(e,n)=>{at.init(e,n),e._zod.parse=i=>i}),c4=ne("$ZodNever",(e,n)=>{at.init(e,n),e._zod.parse=(i,s)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function nh(e,n,i){e.issues.length&&n.issues.push(...Mi(i,e.issues)),n.value[i]=e.value}const u4=ne("$ZodArray",(e,n)=>{at.init(e,n),e._zod.parse=(i,s)=>{const c=i.value;if(!Array.isArray(c))return i.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),i;i.value=Array(c.length);const u=[];for(let d=0;d<c.length;d++){const p=c[d],g=n.element._zod.run({value:p,issues:[]},s);g instanceof Promise?u.push(g.then(h=>nh(h,i,d))):nh(g,i,d)}return u.length?Promise.all(u).then(()=>i):i}});function dc(e,n,i,s,c){if(e.issues.length){if(c&&!(i in s))return;n.issues.push(...Mi(i,e.issues))}e.value===void 0?i in s&&(n.value[i]=void 0):n.value[i]=e.value}function Zv(e){var s,c,u,d;const n=Object.keys(e.shape);for(const p of n)if(!((d=(u=(c=(s=e.shape)==null?void 0:s[p])==null?void 0:c._zod)==null?void 0:u.traits)!=null&&d.has("$ZodType")))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);const i=Nx(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function Gv(e,n,i,s,c,u){const d=[],p=c.keySet,g=c.catchall._zod,h=g.def.type,y=g.optout==="optional";for(const v in n){if(p.has(v))continue;if(h==="never"){d.push(v);continue}const j=g.run({value:n[v],issues:[]},s);j instanceof Promise?e.push(j.then(k=>dc(k,i,v,n,y))):dc(j,i,v,n,y)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),e.length?Promise.all(e).then(()=>i):i}const d4=ne("$ZodObject",(e,n)=>{at.init(e,n);const i=Object.getOwnPropertyDescriptor(n,"shape");if(!(i!=null&&i.get)){const p=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...p};return Object.defineProperty(n,"shape",{value:g}),g}})}const s=$c(()=>Zv(n));He(e._zod,"propValues",()=>{const p=n.shape,g={};for(const h in p){const y=p[h]._zod;if(y.values){g[h]??(g[h]=new Set);for(const v of y.values)g[h].add(v)}}return g});const c=Xo,u=n.catchall;let d;e._zod.parse=(p,g)=>{d??(d=s.value);const h=p.value;if(!c(h))return p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p;p.value={};const y=[],v=d.shape;for(const j of d.keys){const k=v[j],b=k._zod.optout==="optional",C=k._zod.run({value:h[j],issues:[]},g);C instanceof Promise?y.push(C.then(z=>dc(z,p,j,h,b))):dc(C,p,j,h,b)}return u?Gv(y,h,p,g,s.value,e):y.length?Promise.all(y).then(()=>p):p}}),f4=ne("$ZodObjectJIT",(e,n)=>{d4.init(e,n);const i=e._zod.parse,s=$c(()=>Zv(n)),c=j=>{var w;const k=new M5(["shape","payload","ctx"]),b=s.value,C=R=>{const x=th(R);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};k.write("const input = payload.value;");const z=Object.create(null);let N=0;for(const R of b.keys)z[R]=`key_${N++}`;k.write("const newResult = {};");for(const R of b.keys){const x=z[R],_=th(R),T=j[R],A=((w=T==null?void 0:T._zod)==null?void 0:w.optout)==="optional";k.write(`const ${x} = ${C(R)};`),A?k.write(`
|
|
52
|
-
if (${x}.issues.length) {
|
|
53
|
-
if (${_} in input) {
|
|
54
|
-
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
55
|
-
...iss,
|
|
56
|
-
path: iss.path ? [${_}, ...iss.path] : [${_}]
|
|
57
|
-
})));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (${x}.value === undefined) {
|
|
62
|
-
if (${_} in input) {
|
|
63
|
-
newResult[${_}] = undefined;
|
|
64
|
-
}
|
|
65
|
-
} else {
|
|
66
|
-
newResult[${_}] = ${x}.value;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
`):k.write(`
|
|
70
|
-
if (${x}.issues.length) {
|
|
71
|
-
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
72
|
-
...iss,
|
|
73
|
-
path: iss.path ? [${_}, ...iss.path] : [${_}]
|
|
74
|
-
})));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (${x}.value === undefined) {
|
|
78
|
-
if (${_} in input) {
|
|
79
|
-
newResult[${_}] = undefined;
|
|
80
|
-
}
|
|
81
|
-
} else {
|
|
82
|
-
newResult[${_}] = ${x}.value;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
`)}k.write("payload.value = newResult;"),k.write("return payload;");const $=k.compile();return(R,x)=>$(j,R,x)};let u;const d=Xo,p=!Cv.jitless,h=p&&wx.value,y=n.catchall;let v;e._zod.parse=(j,k)=>{v??(v=s.value);const b=j.value;return d(b)?p&&h&&(k==null?void 0:k.async)===!1&&k.jitless!==!0?(u||(u=c(n.shape)),j=u(j,k),y?Gv([],b,j,k,v,e):j):i(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),j)}});function rh(e,n,i,s){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const c=e.filter(u=>!Ti(u));return c.length===1?(n.value=c[0].value,c[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(u=>u.issues.map(d=>fr(d,s,dr())))}),n)}const Fv=ne("$ZodUnion",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.options.some(c=>c._zod.optin==="optional")?"optional":void 0),He(e._zod,"optout",()=>n.options.some(c=>c._zod.optout==="optional")?"optional":void 0),He(e._zod,"values",()=>{if(n.options.every(c=>c._zod.values))return new Set(n.options.flatMap(c=>Array.from(c._zod.values)))}),He(e._zod,"pattern",()=>{if(n.options.every(c=>c._zod.pattern)){const c=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${c.map(u=>Df(u.source)).join("|")})$`)}});const i=n.options.length===1,s=n.options[0]._zod.run;e._zod.parse=(c,u)=>{if(i)return s(c,u);let d=!1;const p=[];for(const g of n.options){const h=g._zod.run({value:c.value,issues:[]},u);if(h instanceof Promise)p.push(h),d=!0;else{if(h.issues.length===0)return h;p.push(h)}}return d?Promise.all(p).then(g=>rh(g,c,e,u)):rh(p,c,e,u)}}),p4=ne("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Fv.init(e,n);const i=e._zod.parse;He(e._zod,"propValues",()=>{const c={};for(const u of n.options){const d=u._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(u)}"`);for(const[p,g]of Object.entries(d)){c[p]||(c[p]=new Set);for(const h of g)c[p].add(h)}}return c});const s=$c(()=>{var d;const c=n.options,u=new Map;for(const p of c){const g=(d=p._zod.propValues)==null?void 0:d[n.discriminator];if(!g||g.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(p)}"`);for(const h of g){if(u.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);u.set(h,p)}}return u});e._zod.parse=(c,u)=>{const d=c.value;if(!Xo(d))return c.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),c;const p=s.value.get(d==null?void 0:d[n.discriminator]);return p?p._zod.run(c,u):n.unionFallback?i(c,u):(c.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:d,path:[n.discriminator],inst:e}),c)}}),g4=ne("$ZodIntersection",(e,n)=>{at.init(e,n),e._zod.parse=(i,s)=>{const c=i.value,u=n.left._zod.run({value:c,issues:[]},s),d=n.right._zod.run({value:c,issues:[]},s);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([g,h])=>ih(i,g,h)):ih(i,u,d)}});function jf(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Di(e)&&Di(n)){const i=Object.keys(n),s=Object.keys(e).filter(u=>i.indexOf(u)!==-1),c={...e,...n};for(const u of s){const d=jf(e[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};c[u]=d.data}return{valid:!0,data:c}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let s=0;s<e.length;s++){const c=e[s],u=n[s],d=jf(c,u);if(!d.valid)return{valid:!1,mergeErrorPath:[s,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function ih(e,n,i){const s=new Map;let c;for(const p of n.issues)if(p.code==="unrecognized_keys"){c??(c=p);for(const g of p.keys)s.has(g)||s.set(g,{}),s.get(g).l=!0}else e.issues.push(p);for(const p of i.issues)if(p.code==="unrecognized_keys")for(const g of p.keys)s.has(g)||s.set(g,{}),s.get(g).r=!0;else e.issues.push(p);const u=[...s].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(u.length&&c&&e.issues.push({...c,keys:u}),Ti(e))return e;const d=jf(n.value,i.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const m4=ne("$ZodRecord",(e,n)=>{at.init(e,n),e._zod.parse=(i,s)=>{const c=i.value;if(!Di(c))return i.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),i;const u=[],d=n.keyType._zod.values;if(d){i.value={};const p=new Set;for(const h of d)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){p.add(typeof h=="number"?h.toString():h);const y=n.valueType._zod.run({value:c[h],issues:[]},s);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&i.issues.push(...Mi(h,v.issues)),i.value[h]=v.value})):(y.issues.length&&i.issues.push(...Mi(h,y.issues)),i.value[h]=y.value)}let g;for(const h in c)p.has(h)||(g=g??[],g.push(h));g&&g.length>0&&i.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:g})}else{i.value={};for(const p of Reflect.ownKeys(c)){if(p==="__proto__")continue;let g=n.keyType._zod.run({value:p,issues:[]},s);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&Lv.test(p)&&g.issues.length){const v=n.keyType._zod.run({value:Number(p),issues:[]},s);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?i.value[p]=c[p]:i.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>fr(v,s,dr())),input:p,path:[p],inst:e});continue}const y=n.valueType._zod.run({value:c[p],issues:[]},s);y instanceof Promise?u.push(y.then(v=>{v.issues.length&&i.issues.push(...Mi(p,v.issues)),i.value[g.value]=v.value})):(y.issues.length&&i.issues.push(...Mi(p,y.issues)),i.value[g.value]=y.value)}}return u.length?Promise.all(u).then(()=>i):i}}),h4=ne("$ZodEnum",(e,n)=>{at.init(e,n);const i=Ev(n.entries),s=new Set(i);e._zod.values=s,e._zod.pattern=new RegExp(`^(${i.filter(c=>kx.has(typeof c)).map(c=>typeof c=="string"?Ii(c):c.toString()).join("|")})$`),e._zod.parse=(c,u)=>{const d=c.value;return s.has(d)||c.issues.push({code:"invalid_value",values:i,input:d,inst:e}),c}}),y4=ne("$ZodLiteral",(e,n)=>{if(at.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(s=>typeof s=="string"?Ii(s):s?Ii(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,c)=>{const u=s.value;return i.has(u)||s.issues.push({code:"invalid_value",values:n.values,input:u,inst:e}),s}}),v4=ne("$ZodTransform",(e,n)=>{at.init(e,n),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new zv(e.constructor.name);const c=n.transform(i.value,i);if(s.async)return(c instanceof Promise?c:Promise.resolve(c)).then(d=>(i.value=d,i));if(c instanceof Promise)throw new Ri;return i.value=c,i}});function oh(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Yv=ne("$ZodOptional",(e,n)=>{at.init(e,n),e._zod.optin="optional",e._zod.optout="optional",He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Df(i.source)})?$`):void 0}),e._zod.parse=(i,s)=>{if(n.innerType._zod.optin==="optional"){const c=n.innerType._zod.run(i,s);return c instanceof Promise?c.then(u=>oh(u,i.value)):oh(c,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,s)}}),$4=ne("$ZodExactOptional",(e,n)=>{Yv.init(e,n),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,s)=>n.innerType._zod.run(i,s)}),b4=ne("$ZodNullable",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Df(i.source)}|null)$`):void 0}),He(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,s)=>i.value===null?i:n.innerType._zod.run(i,s)}),x4=ne("$ZodDefault",(e,n)=>{at.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return n.innerType._zod.run(i,s);if(i.value===void 0)return i.value=n.defaultValue,i;const c=n.innerType._zod.run(i,s);return c instanceof Promise?c.then(u=>sh(u,n)):sh(c,n)}});function sh(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const j4=ne("$ZodPrefault",(e,n)=>{at.init(e,n),e._zod.optin="optional",He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,s)=>(s.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,s))}),_4=ne("$ZodNonOptional",(e,n)=>{at.init(e,n),He(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(s=>s!==void 0)):void 0}),e._zod.parse=(i,s)=>{const c=n.innerType._zod.run(i,s);return c instanceof Promise?c.then(u=>lh(u,e)):lh(c,e)}});function lh(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const S4=ne("$ZodCatch",(e,n)=>{at.init(e,n),He(e._zod,"optin",()=>n.innerType._zod.optin),He(e._zod,"optout",()=>n.innerType._zod.optout),He(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return n.innerType._zod.run(i,s);const c=n.innerType._zod.run(i,s);return c instanceof Promise?c.then(u=>(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(d=>fr(d,s,dr()))},input:i.value}),i.issues=[]),i)):(i.value=c.value,c.issues.length&&(i.value=n.catchValue({...i,error:{issues:c.issues.map(u=>fr(u,s,dr()))},input:i.value}),i.issues=[]),i)}}),w4=ne("$ZodPipe",(e,n)=>{at.init(e,n),He(e._zod,"values",()=>n.in._zod.values),He(e._zod,"optin",()=>n.in._zod.optin),He(e._zod,"optout",()=>n.out._zod.optout),He(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,s)=>{if(s.direction==="backward"){const u=n.out._zod.run(i,s);return u instanceof Promise?u.then(d=>$l(d,n.in,s)):$l(u,n.in,s)}const c=n.in._zod.run(i,s);return c instanceof Promise?c.then(u=>$l(u,n.out,s)):$l(c,n.out,s)}});function $l(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const k4=ne("$ZodReadonly",(e,n)=>{at.init(e,n),He(e._zod,"propValues",()=>n.innerType._zod.propValues),He(e._zod,"values",()=>n.innerType._zod.values),He(e._zod,"optin",()=>{var i,s;return(s=(i=n.innerType)==null?void 0:i._zod)==null?void 0:s.optin}),He(e._zod,"optout",()=>{var i,s;return(s=(i=n.innerType)==null?void 0:i._zod)==null?void 0:s.optout}),e._zod.parse=(i,s)=>{if(s.direction==="backward")return n.innerType._zod.run(i,s);const c=n.innerType._zod.run(i,s);return c instanceof Promise?c.then(ch):ch(c)}});function ch(e){return e.value=Object.freeze(e.value),e}const N4=ne("$ZodLazy",(e,n)=>{at.init(e,n),He(e._zod,"innerType",()=>n.getter()),He(e._zod,"pattern",()=>{var i,s;return(s=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:s.pattern}),He(e._zod,"propValues",()=>{var i,s;return(s=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:s.propValues}),He(e._zod,"optin",()=>{var i,s;return((s=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:s.optin)??void 0}),He(e._zod,"optout",()=>{var i,s;return((s=(i=e._zod.innerType)==null?void 0:i._zod)==null?void 0:s.optout)??void 0}),e._zod.parse=(i,s)=>e._zod.innerType._zod.run(i,s)}),z4=ne("$ZodCustom",(e,n)=>{ia.init(e,n),at.init(e,n),e._zod.parse=(i,s)=>i,e._zod.check=i=>{const s=i.value,c=n.fn(s);if(c instanceof Promise)return c.then(u=>uh(u,i,s,e));uh(c,i,s,e)}});function uh(e,n,i,s){if(!e){const c={code:"custom",input:i,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(c.params=s._zod.def.params),n.issues.push(Jo(c))}}var dh;class C4{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const s=i[0];return this._map.set(n,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const s={...this.get(i)??{}};delete s.id;const c={...s,...this._map.get(n)};return Object.keys(c).length?c:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function E4(){return new C4}(dh=globalThis).__zod_globalRegistry??(dh.__zod_globalRegistry=E4());const Wo=globalThis.__zod_globalRegistry;function T4(e,n){return new e({type:"string",..._e(n)})}function M4(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._e(n)})}function fh(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._e(n)})}function R4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(n)})}function O4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(n)})}function A4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(n)})}function D4(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(n)})}function Kv(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._e(n)})}function I4(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(n)})}function U4(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(n)})}function L4(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(n)})}function V4(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(n)})}function H4(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(n)})}function B4(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._e(n)})}function q4(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(n)})}function P4(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(n)})}function Z4(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(n)})}function G4(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(n)})}function F4(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(n)})}function Y4(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._e(n)})}function K4(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(n)})}function W4(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._e(n)})}function X4(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(n)})}function J4(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(n)})}function Q4(e,n){return new e({type:"string",format:"date",check:"string_format",..._e(n)})}function ej(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,..._e(n)})}function tj(e,n){return new e({type:"string",format:"duration",check:"string_format",..._e(n)})}function aj(e,n){return new e({type:"number",checks:[],..._e(n)})}function nj(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(n)})}function rj(e,n){return new e({type:"boolean",..._e(n)})}function ij(e,n){return new e({type:"null",..._e(n)})}function oj(e){return new e({type:"unknown"})}function sj(e,n){return new e({type:"never",..._e(n)})}function ph(e,n){return new Hv({check:"less_than",..._e(n),value:e,inclusive:!1})}function Wd(e,n){return new Hv({check:"less_than",..._e(n),value:e,inclusive:!0})}function gh(e,n){return new Bv({check:"greater_than",..._e(n),value:e,inclusive:!1})}function Xd(e,n){return new Bv({check:"greater_than",..._e(n),value:e,inclusive:!0})}function mh(e,n){return new b5({check:"multiple_of",..._e(n),value:e})}function Wv(e,n){return new j5({check:"max_length",..._e(n),maximum:e})}function fc(e,n){return new _5({check:"min_length",..._e(n),minimum:e})}function Xv(e,n){return new S5({check:"length_equals",..._e(n),length:e})}function lj(e,n){return new w5({check:"string_format",format:"regex",..._e(n),pattern:e})}function cj(e){return new k5({check:"string_format",format:"lowercase",..._e(e)})}function uj(e){return new N5({check:"string_format",format:"uppercase",..._e(e)})}function dj(e,n){return new z5({check:"string_format",format:"includes",..._e(n),includes:e})}function fj(e,n){return new C5({check:"string_format",format:"starts_with",..._e(n),prefix:e})}function pj(e,n){return new E5({check:"string_format",format:"ends_with",..._e(n),suffix:e})}function Hi(e){return new T5({check:"overwrite",tx:e})}function gj(e){return Hi(n=>n.normalize(e))}function mj(){return Hi(e=>e.trim())}function hj(){return Hi(e=>e.toLowerCase())}function yj(){return Hi(e=>e.toUpperCase())}function vj(){return Hi(e=>Sx(e))}function $j(e,n,i){return new e({type:"array",element:n,..._e(i)})}function bj(e,n,i){return new e({type:"custom",check:"custom",fn:n,..._e(i)})}function xj(e){const n=jj(i=>(i.addIssue=s=>{if(typeof s=="string")i.issues.push(Jo(s,i.value,n._zod.def));else{const c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=i.value),c.inst??(c.inst=n),c.continue??(c.continue=!n._zod.def.abort),i.issues.push(Jo(c))}},e(i.value,i)));return n}function jj(e,n){const i=new ia({check:"custom",..._e(n)});return i._zod.check=e,i}function Jv(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Wo,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function yt(e,n,i={path:[],schemaPath:[]}){var y,v;var s;const c=e._zod.def,u=n.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,d);const p=(v=(y=e._zod).toJSONSchema)==null?void 0:v.call(y);if(p)d.schema=p;else{const j={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,j);else{const b=d.schema,C=n.processors[c.type];if(!C)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${c.type}`);C(e,n,b,j)}const k=e._zod.parent;k&&(d.ref||(d.ref=k),yt(k,n,j),n.seen.get(k).isParent=!0)}const g=n.metadataRegistry.get(e);return g&&Object.assign(d.schema,g),n.io==="input"&&Wt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((s=d.schema).default??(s.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function Qv(e,n){var d,p,g,h;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const y of e.seen.entries()){const v=(d=e.metadataRegistry.get(y[0]))==null?void 0:d.id;if(v){const j=s.get(v);if(j&&j!==y[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(v,y[0])}}const c=y=>{var C;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const z=(C=e.external.registry.get(y[0]))==null?void 0:C.id,N=e.external.uri??(w=>w);if(z)return{ref:N(z)};const $=y[1].defId??y[1].schema.id??`schema${e.counter++}`;return y[1].defId=$,{defId:$,ref:`${N("__shared")}#/${v}/${$}`}}if(y[1]===i)return{ref:"#"};const k=`#/${v}/`,b=y[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:k+b}},u=y=>{if(y[1].schema.$ref)return;const v=y[1],{ref:j,defId:k}=c(y);v.def={...v.schema},k&&(v.defId=k);const b=v.schema;for(const C in b)delete b[C];b.$ref=j};if(e.cycles==="throw")for(const y of e.seen.entries()){const v=y[1];if(v.cycle)throw new Error(`Cycle detected: #/${(p=v.cycle)==null?void 0:p.join("/")}/<root>
|
|
86
|
-
|
|
87
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const y of e.seen.entries()){const v=y[1];if(n===y[0]){u(y);continue}if(e.external){const k=(g=e.external.registry.get(y[0]))==null?void 0:g.id;if(n!==y[0]&&k){u(y);continue}}if((h=e.metadataRegistry.get(y[0]))==null?void 0:h.id){u(y);continue}if(v.cycle){u(y);continue}if(v.count>1&&e.reused==="ref"){u(y);continue}}}function e1(e,n){var d,p,g;const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=h=>{const y=e.seen.get(h);if(y.ref===null)return;const v=y.def??y.schema,j={...v},k=y.ref;if(y.ref=null,k){s(k);const C=e.seen.get(k),z=C.schema;if(z.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(z)):Object.assign(v,z),Object.assign(v,j),h._zod.parent===k)for(const $ in v)$==="$ref"||$==="allOf"||$ in j||delete v[$];if(z.$ref&&C.def)for(const $ in v)$==="$ref"||$==="allOf"||$ in C.def&&JSON.stringify(v[$])===JSON.stringify(C.def[$])&&delete v[$]}const b=h._zod.parent;if(b&&b!==k){s(b);const C=e.seen.get(b);if(C!=null&&C.schema.$ref&&(v.$ref=C.schema.$ref,C.def))for(const z in v)z==="$ref"||z==="allOf"||z in C.def&&JSON.stringify(v[z])===JSON.stringify(C.def[z])&&delete v[z]}e.override({zodSchema:h,jsonSchema:v,path:y.path??[]})};for(const h of[...e.seen.entries()].reverse())s(h[0]);const c={};if(e.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?c.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?c.$schema="http://json-schema.org/draft-04/schema#":e.target,(d=e.external)!=null&&d.uri){const h=(p=e.external.registry.get(n))==null?void 0:p.id;if(!h)throw new Error("Schema is missing an `id` property");c.$id=e.external.uri(h)}Object.assign(c,i.def??i.schema);const u=((g=e.external)==null?void 0:g.defs)??{};for(const h of e.seen.entries()){const y=h[1];y.def&&y.defId&&(u[y.defId]=y.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{const h=JSON.parse(JSON.stringify(c));return Object.defineProperty(h,"~standard",{value:{...n["~standard"],jsonSchema:{input:pc(n,"input",e.processors),output:pc(n,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function Wt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return Wt(s.element,i);if(s.type==="set")return Wt(s.valueType,i);if(s.type==="lazy")return Wt(s.getter(),i);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return Wt(s.innerType,i);if(s.type==="intersection")return Wt(s.left,i)||Wt(s.right,i);if(s.type==="record"||s.type==="map")return Wt(s.keyType,i)||Wt(s.valueType,i);if(s.type==="pipe")return Wt(s.in,i)||Wt(s.out,i);if(s.type==="object"){for(const c in s.shape)if(Wt(s.shape[c],i))return!0;return!1}if(s.type==="union"){for(const c of s.options)if(Wt(c,i))return!0;return!1}if(s.type==="tuple"){for(const c of s.items)if(Wt(c,i))return!0;return!!(s.rest&&Wt(s.rest,i))}return!1}const _j=(e,n={})=>i=>{const s=Jv({...i,processors:n});return yt(e,s),Qv(s,e),e1(s,e)},pc=(e,n,i={})=>s=>{const{libraryOptions:c,target:u}=s??{},d=Jv({...c??{},target:u,io:n,processors:i});return yt(e,d),Qv(d,e),e1(d,e)},Sj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wj=(e,n,i,s)=>{const c=i;c.type="string";const{minimum:u,maximum:d,format:p,patterns:g,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(c.minLength=u),typeof d=="number"&&(c.maxLength=d),p&&(c.format=Sj[p]??p,c.format===""&&delete c.format,p==="time"&&delete c.format),h&&(c.contentEncoding=h),g&&g.size>0){const y=[...g];y.length===1?c.pattern=y[0].source:y.length>1&&(c.allOf=[...y.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},kj=(e,n,i,s)=>{const c=i,{minimum:u,maximum:d,format:p,multipleOf:g,exclusiveMaximum:h,exclusiveMinimum:y}=e._zod.bag;typeof p=="string"&&p.includes("int")?c.type="integer":c.type="number",typeof y=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(c.minimum=y,c.exclusiveMinimum=!0):c.exclusiveMinimum=y),typeof u=="number"&&(c.minimum=u,typeof y=="number"&&n.target!=="draft-04"&&(y>=u?delete c.minimum:delete c.exclusiveMinimum)),typeof h=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(c.maximum=h,c.exclusiveMaximum=!0):c.exclusiveMaximum=h),typeof d=="number"&&(c.maximum=d,typeof h=="number"&&n.target!=="draft-04"&&(h<=d?delete c.maximum:delete c.exclusiveMaximum)),typeof g=="number"&&(c.multipleOf=g)},Nj=(e,n,i,s)=>{i.type="boolean"},zj=(e,n,i,s)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},Cj=(e,n,i,s)=>{i.not={}},Ej=(e,n,i,s)=>{},Tj=(e,n,i,s)=>{const c=e._zod.def,u=Ev(c.entries);u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),i.enum=u},Mj=(e,n,i,s)=>{const c=e._zod.def,u=[];for(const d of c.values)if(d===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof d=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(d))}else u.push(d);if(u.length!==0)if(u.length===1){const d=u[0];i.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[d]:i.const=d}else u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),u.every(d=>typeof d=="boolean")&&(i.type="boolean"),u.every(d=>d===null)&&(i.type="null"),i.enum=u},Rj=(e,n,i,s)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Oj=(e,n,i,s)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Aj=(e,n,i,s)=>{const c=i,u=e._zod.def,{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(c.minItems=d),typeof p=="number"&&(c.maxItems=p),c.type="array",c.items=yt(u.element,n,{...s,path:[...s.path,"items"]})},Dj=(e,n,i,s)=>{var h;const c=i,u=e._zod.def;c.type="object",c.properties={};const d=u.shape;for(const y in d)c.properties[y]=yt(d[y],n,{...s,path:[...s.path,"properties",y]});const p=new Set(Object.keys(d)),g=new Set([...p].filter(y=>{const v=u.shape[y]._zod;return n.io==="input"?v.optin===void 0:v.optout===void 0}));g.size>0&&(c.required=Array.from(g)),((h=u.catchall)==null?void 0:h._zod.def.type)==="never"?c.additionalProperties=!1:u.catchall?u.catchall&&(c.additionalProperties=yt(u.catchall,n,{...s,path:[...s.path,"additionalProperties"]})):n.io==="output"&&(c.additionalProperties=!1)},Ij=(e,n,i,s)=>{const c=e._zod.def,u=c.inclusive===!1,d=c.options.map((p,g)=>yt(p,n,{...s,path:[...s.path,u?"oneOf":"anyOf",g]}));u?i.oneOf=d:i.anyOf=d},Uj=(e,n,i,s)=>{const c=e._zod.def,u=yt(c.left,n,{...s,path:[...s.path,"allOf",0]}),d=yt(c.right,n,{...s,path:[...s.path,"allOf",1]}),p=h=>"allOf"in h&&Object.keys(h).length===1,g=[...p(u)?u.allOf:[u],...p(d)?d.allOf:[d]];i.allOf=g},Lj=(e,n,i,s)=>{const c=i,u=e._zod.def;c.type="object";const d=u.keyType,p=d._zod.bag,g=p==null?void 0:p.patterns;if(u.mode==="loose"&&g&&g.size>0){const y=yt(u.valueType,n,{...s,path:[...s.path,"patternProperties","*"]});c.patternProperties={};for(const v of g)c.patternProperties[v.source]=y}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(c.propertyNames=yt(u.keyType,n,{...s,path:[...s.path,"propertyNames"]})),c.additionalProperties=yt(u.valueType,n,{...s,path:[...s.path,"additionalProperties"]});const h=d._zod.values;if(h){const y=[...h].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(c.required=y)}},Vj=(e,n,i,s)=>{const c=e._zod.def,u=yt(c.innerType,n,s),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=c.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},Hj=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType},Bj=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType,i.default=JSON.parse(JSON.stringify(c.defaultValue))},qj=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(c.defaultValue)))},Pj=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType;let d;try{d=c.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=d},Zj=(e,n,i,s)=>{const c=e._zod.def,u=n.io==="input"?c.in._zod.def.type==="transform"?c.out:c.in:c.out;yt(u,n,s);const d=n.seen.get(e);d.ref=u},Gj=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType,i.readOnly=!0},t1=(e,n,i,s)=>{const c=e._zod.def;yt(c.innerType,n,s);const u=n.seen.get(e);u.ref=c.innerType},Fj=(e,n,i,s)=>{const c=e._zod.innerType;yt(c,n,s);const u=n.seen.get(e);u.ref=c},Yj=ne("ZodISODateTime",(e,n)=>{Z5.init(e,n),st.init(e,n)});function Kj(e){return J4(Yj,e)}const Wj=ne("ZodISODate",(e,n)=>{G5.init(e,n),st.init(e,n)});function Xj(e){return Q4(Wj,e)}const Jj=ne("ZodISOTime",(e,n)=>{F5.init(e,n),st.init(e,n)});function Qj(e){return ej(Jj,e)}const e_=ne("ZodISODuration",(e,n)=>{Y5.init(e,n),st.init(e,n)});function t_(e){return tj(e_,e)}const a_=(e,n)=>{Ov.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Ix(e,i)},flatten:{value:i=>Dx(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,xf,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,xf,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ca=ne("ZodError",a_,{Parent:Error}),n_=Uf(Ca),r_=Lf(Ca),i_=bc(Ca),o_=xc(Ca),s_=Vx(Ca),l_=Hx(Ca),c_=Bx(Ca),u_=qx(Ca),d_=Px(Ca),f_=Zx(Ca),p_=Gx(Ca),g_=Fx(Ca),nt=ne("ZodType",(e,n)=>(at.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:pc(e,"input"),output:pc(e,"output")}}),e.toJSONSchema=_j(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(pr(n,{checks:[...n.checks??[],...i.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),e.with=e.check,e.clone=(i,s)=>gr(e,i,s),e.brand=()=>e,e.register=((i,s)=>(i.add(e,s),e)),e.parse=(i,s)=>n_(e,i,s,{callee:e.parse}),e.safeParse=(i,s)=>i_(e,i,s),e.parseAsync=async(i,s)=>r_(e,i,s,{callee:e.parseAsync}),e.safeParseAsync=async(i,s)=>o_(e,i,s),e.spa=e.safeParseAsync,e.encode=(i,s)=>s_(e,i,s),e.decode=(i,s)=>l_(e,i,s),e.encodeAsync=async(i,s)=>c_(e,i,s),e.decodeAsync=async(i,s)=>u_(e,i,s),e.safeEncode=(i,s)=>d_(e,i,s),e.safeDecode=(i,s)=>f_(e,i,s),e.safeEncodeAsync=async(i,s)=>p_(e,i,s),e.safeDecodeAsync=async(i,s)=>g_(e,i,s),e.refine=(i,s)=>e.check(cS(i,s)),e.superRefine=i=>e.check(uS(i)),e.overwrite=i=>e.check(Hi(i)),e.optional=()=>vh(e),e.exactOptional=()=>K_(e),e.nullable=()=>$h(e),e.nullish=()=>vh($h(e)),e.nonoptional=i=>tS(e,i),e.array=()=>pt(e),e.or=i=>hn([e,i]),e.and=i=>q_(e,i),e.transform=i=>bh(e,F_(i)),e.default=i=>J_(e,i),e.prefault=i=>eS(e,i),e.catch=i=>nS(e,i),e.pipe=i=>bh(e,i),e.readonly=()=>oS(e),e.describe=i=>{const s=e.clone();return Wo.add(s,{description:i}),s},Object.defineProperty(e,"description",{get(){var i;return(i=Wo.get(e))==null?void 0:i.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Wo.get(e);const s=e.clone();return Wo.add(s,i[0]),s},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),a1=ne("_ZodString",(e,n)=>{Vf.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(s,c,u)=>wj(e,s,c);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...s)=>e.check(lj(...s)),e.includes=(...s)=>e.check(dj(...s)),e.startsWith=(...s)=>e.check(fj(...s)),e.endsWith=(...s)=>e.check(pj(...s)),e.min=(...s)=>e.check(fc(...s)),e.max=(...s)=>e.check(Wv(...s)),e.length=(...s)=>e.check(Xv(...s)),e.nonempty=(...s)=>e.check(fc(1,...s)),e.lowercase=s=>e.check(cj(s)),e.uppercase=s=>e.check(uj(s)),e.trim=()=>e.check(mj()),e.normalize=(...s)=>e.check(gj(...s)),e.toLowerCase=()=>e.check(hj()),e.toUpperCase=()=>e.check(yj()),e.slugify=()=>e.check(vj())}),m_=ne("ZodString",(e,n)=>{Vf.init(e,n),a1.init(e,n),e.email=i=>e.check(M4(h_,i)),e.url=i=>e.check(Kv(n1,i)),e.jwt=i=>e.check(X4(T_,i)),e.emoji=i=>e.check(I4(y_,i)),e.guid=i=>e.check(fh(hh,i)),e.uuid=i=>e.check(R4(bl,i)),e.uuidv4=i=>e.check(O4(bl,i)),e.uuidv6=i=>e.check(A4(bl,i)),e.uuidv7=i=>e.check(D4(bl,i)),e.nanoid=i=>e.check(U4(v_,i)),e.guid=i=>e.check(fh(hh,i)),e.cuid=i=>e.check(L4($_,i)),e.cuid2=i=>e.check(V4(b_,i)),e.ulid=i=>e.check(H4(x_,i)),e.base64=i=>e.check(Y4(z_,i)),e.base64url=i=>e.check(K4(C_,i)),e.xid=i=>e.check(B4(j_,i)),e.ksuid=i=>e.check(q4(__,i)),e.ipv4=i=>e.check(P4(S_,i)),e.ipv6=i=>e.check(Z4(w_,i)),e.cidrv4=i=>e.check(G4(k_,i)),e.cidrv6=i=>e.check(F4(N_,i)),e.e164=i=>e.check(W4(E_,i)),e.datetime=i=>e.check(Kj(i)),e.date=i=>e.check(Xj(i)),e.time=i=>e.check(Qj(i)),e.duration=i=>e.check(t_(i))});function F(e){return T4(m_,e)}const st=ne("ZodStringFormat",(e,n)=>{rt.init(e,n),a1.init(e,n)}),h_=ne("ZodEmail",(e,n)=>{D5.init(e,n),st.init(e,n)}),hh=ne("ZodGUID",(e,n)=>{O5.init(e,n),st.init(e,n)}),bl=ne("ZodUUID",(e,n)=>{A5.init(e,n),st.init(e,n)}),n1=ne("ZodURL",(e,n)=>{I5.init(e,n),st.init(e,n)});function xl(e){return Kv(n1,e)}const y_=ne("ZodEmoji",(e,n)=>{U5.init(e,n),st.init(e,n)}),v_=ne("ZodNanoID",(e,n)=>{L5.init(e,n),st.init(e,n)}),$_=ne("ZodCUID",(e,n)=>{V5.init(e,n),st.init(e,n)}),b_=ne("ZodCUID2",(e,n)=>{H5.init(e,n),st.init(e,n)}),x_=ne("ZodULID",(e,n)=>{B5.init(e,n),st.init(e,n)}),j_=ne("ZodXID",(e,n)=>{q5.init(e,n),st.init(e,n)}),__=ne("ZodKSUID",(e,n)=>{P5.init(e,n),st.init(e,n)}),S_=ne("ZodIPv4",(e,n)=>{K5.init(e,n),st.init(e,n)}),w_=ne("ZodIPv6",(e,n)=>{W5.init(e,n),st.init(e,n)}),k_=ne("ZodCIDRv4",(e,n)=>{X5.init(e,n),st.init(e,n)}),N_=ne("ZodCIDRv6",(e,n)=>{J5.init(e,n),st.init(e,n)}),z_=ne("ZodBase64",(e,n)=>{Q5.init(e,n),st.init(e,n)}),C_=ne("ZodBase64URL",(e,n)=>{t4.init(e,n),st.init(e,n)}),E_=ne("ZodE164",(e,n)=>{a4.init(e,n),st.init(e,n)}),T_=ne("ZodJWT",(e,n)=>{r4.init(e,n),st.init(e,n)}),r1=ne("ZodNumber",(e,n)=>{Pv.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(s,c,u)=>kj(e,s,c),e.gt=(s,c)=>e.check(gh(s,c)),e.gte=(s,c)=>e.check(Xd(s,c)),e.min=(s,c)=>e.check(Xd(s,c)),e.lt=(s,c)=>e.check(ph(s,c)),e.lte=(s,c)=>e.check(Wd(s,c)),e.max=(s,c)=>e.check(Wd(s,c)),e.int=s=>e.check(yh(s)),e.safe=s=>e.check(yh(s)),e.positive=s=>e.check(gh(0,s)),e.nonnegative=s=>e.check(Xd(0,s)),e.negative=s=>e.check(ph(0,s)),e.nonpositive=s=>e.check(Wd(0,s)),e.multipleOf=(s,c)=>e.check(mh(s,c)),e.step=(s,c)=>e.check(mh(s,c)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function Fe(e){return aj(r1,e)}const M_=ne("ZodNumberFormat",(e,n)=>{i4.init(e,n),r1.init(e,n)});function yh(e){return nj(M_,e)}const R_=ne("ZodBoolean",(e,n)=>{o4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Nj(e,i,s)});function Gt(e){return rj(R_,e)}const O_=ne("ZodNull",(e,n)=>{s4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>zj(e,i,s)});function A_(e){return ij(O_,e)}const D_=ne("ZodUnknown",(e,n)=>{l4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Ej()});function Pa(){return oj(D_)}const I_=ne("ZodNever",(e,n)=>{c4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Cj(e,i,s)});function U_(e){return sj(I_,e)}const L_=ne("ZodArray",(e,n)=>{u4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Aj(e,i,s,c),e.element=n.element,e.min=(i,s)=>e.check(fc(i,s)),e.nonempty=i=>e.check(fc(1,i)),e.max=(i,s)=>e.check(Wv(i,s)),e.length=(i,s)=>e.check(Xv(i,s)),e.unwrap=()=>e.element});function pt(e,n){return $j(L_,e,n)}const V_=ne("ZodObject",(e,n)=>{f4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Dj(e,i,s,c),He(e,"shape",()=>n.shape),e.keyof=()=>dt(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pa()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pa()}),e.strict=()=>e.clone({...e._zod.def,catchall:U_()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>Tx(e,i),e.safeExtend=i=>Mx(e,i),e.merge=i=>Rx(e,i),e.pick=i=>Cx(e,i),e.omit=i=>Ex(e,i),e.partial=(...i)=>Ox(o1,e,i[0]),e.required=(...i)=>Ax(s1,e,i[0])});function de(e,n){const i={type:"object",shape:e??{},..._e(n)};return new V_(i)}const i1=ne("ZodUnion",(e,n)=>{Fv.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Ij(e,i,s,c),e.options=n.options});function hn(e,n){return new i1({type:"union",options:e,..._e(n)})}const H_=ne("ZodDiscriminatedUnion",(e,n)=>{i1.init(e,n),p4.init(e,n)});function ns(e,n,i){return new H_({type:"union",options:n,discriminator:e,..._e(i)})}const B_=ne("ZodIntersection",(e,n)=>{g4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Uj(e,i,s,c)});function q_(e,n){return new B_({type:"intersection",left:e,right:n})}const P_=ne("ZodRecord",(e,n)=>{m4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Lj(e,i,s,c),e.keyType=n.keyType,e.valueType=n.valueType});function St(e,n,i){return new P_({type:"record",keyType:e,valueType:n,..._e(i)})}const _f=ne("ZodEnum",(e,n)=>{h4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(s,c,u)=>Tj(e,s,c),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(s,c)=>{const u={};for(const d of s)if(i.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new _f({...n,checks:[],..._e(c),entries:u})},e.exclude=(s,c)=>{const u={...n.entries};for(const d of s)if(i.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new _f({...n,checks:[],..._e(c),entries:u})}});function dt(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new _f({type:"enum",entries:i,..._e(n)})}const Z_=ne("ZodLiteral",(e,n)=>{y4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Mj(e,i,s),e.values=new Set(n.values),Object.defineProperty(e,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Re(e,n){return new Z_({type:"literal",values:Array.isArray(e)?e:[e],..._e(n)})}const G_=ne("ZodTransform",(e,n)=>{v4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Oj(e,i),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new zv(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(Jo(u,i.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=i.value),d.inst??(d.inst=e),i.issues.push(Jo(d))}};const c=n.transform(i.value,i);return c instanceof Promise?c.then(u=>(i.value=u,i)):(i.value=c,i)}});function F_(e){return new G_({type:"transform",transform:e})}const o1=ne("ZodOptional",(e,n)=>{Yv.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>t1(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function vh(e){return new o1({type:"optional",innerType:e})}const Y_=ne("ZodExactOptional",(e,n)=>{$4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>t1(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function K_(e){return new Y_({type:"optional",innerType:e})}const W_=ne("ZodNullable",(e,n)=>{b4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Vj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function $h(e){return new W_({type:"nullable",innerType:e})}const X_=ne("ZodDefault",(e,n)=>{x4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Bj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function J_(e,n){return new X_({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Mv(n)}})}const Q_=ne("ZodPrefault",(e,n)=>{j4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>qj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function eS(e,n){return new Q_({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Mv(n)}})}const s1=ne("ZodNonOptional",(e,n)=>{_4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Hj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function tS(e,n){return new s1({type:"nonoptional",innerType:e,..._e(n)})}const aS=ne("ZodCatch",(e,n)=>{S4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Pj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nS(e,n){return new aS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const rS=ne("ZodPipe",(e,n)=>{w4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Zj(e,i,s,c),e.in=n.in,e.out=n.out});function bh(e,n){return new rS({type:"pipe",in:e,out:n})}const iS=ne("ZodReadonly",(e,n)=>{k4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Gj(e,i,s,c),e.unwrap=()=>e._zod.def.innerType});function oS(e){return new iS({type:"readonly",innerType:e})}const sS=ne("ZodLazy",(e,n)=>{N4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Fj(e,i,s,c),e.unwrap=()=>e._zod.def.getter()});function l1(e){return new sS({type:"lazy",getter:e})}const lS=ne("ZodCustom",(e,n)=>{z4.init(e,n),nt.init(e,n),e._zod.processJSONSchema=(i,s,c)=>Rj(e,i)});function cS(e,n={}){return bj(lS,e,n)}function uS(e){return xj(e)}const c1="@ggui-ai/gadgets",dS="0.1.0-rc.3",fS=[{package:c1,version:dS,exports:[{hook:"useCamera",permission:"camera",description:"Capture stills or live video from the device camera.",usage:"Mount when the intent names photo capture, QR / barcode scanning, video recording, or anything that requires a camera feed. The hook returns a stream once `start()` resolves; thread the resulting blob or stream URL into a contextSpec slot or an actionSpec payload to surface it to the agent.",example:{call:"const cam = useCamera();",returns:{status:"ready",value:{stream:"<MediaStream>",kind:"video"}}}},{hook:"useClipboardPaste",permission:"clipboard-read",description:"Read the system clipboard contents on user gesture.",usage:"Mount when the intent involves importing copied content (paste-into-form, paste-image-to-upload, paste-link). The Permissions API requires a user gesture; gate `start()` behind a button click. Returned value lands in a contextSpec slot or an actionSpec payload.",example:{call:"const paste = useClipboardPaste();",returns:{status:"ready",value:"pasted clipboard text"}}},{hook:"useClipboardWrite",permission:"clipboard-write",description:"Write to the system clipboard on user gesture.",usage:"Mount when the intent includes copying generated text, share links, codes, or transcripts to the system clipboard. Fire an actionSpec event so the agent observes the act (it does not see the written value — that stays component-local).",example:{call:"const write = useClipboardWrite(); write.write('hello');",returns:{status:"ready"}}},{hook:"useFilePicker",description:"Open the native file picker and read selected files.",usage:"Mount when the intent names file upload, attachment selection, or document import. No permission required. The hook returns the picked files plus metadata; thread file refs / data URLs into a contextSpec slot or actionSpec payload.",example:{call:'const picker = useFilePicker({ accept: "image/*" });',returns:{status:"ready",value:[{name:"photo.png",type:"image/png",size:12345}]}}},{hook:"useGeolocation",permission:"geolocation",description:"Resolve the device's current geolocation.",usage:'Mount when the intent names "current location", maps, nearby search, location-aware UI. Browser prompts the user on `start()`; the hook returns coordinates once granted. Thread the resolved coords into a contextSpec slot so the agent observes the latest fix.',example:{call:"const geo = useGeolocation();",returns:{status:"ready",value:{latitude:37.7749,longitude:-122.4194,accuracy:20}}}},{hook:"useMicrophone",permission:"microphone",description:"Capture audio from the device microphone.",usage:"Mount when the intent names voice memos, audio messages, dictation, voice-driven UI. Returns an audio stream / blob; thread it into an actionSpec payload at recording-stop, or into a contextSpec slot for live transcription pipelines.",example:{call:"const mic = useMicrophone();",returns:{status:"ready",value:{stream:"<MediaStream>",kind:"audio"}}}},{hook:"useNotifications",permission:"notifications",description:"Show system / browser notifications to the user.",usage:"Mount when the intent involves alerting the user about something (reminders, completion of long tasks, incoming messages) and the UI may be in the background. Permission is prompted on first `start()`; the agent does NOT see notification dismissal directly — surface it via an actionSpec if needed.",example:{call:"const notify = useNotifications(); notify.show({ title: 'Done' });",returns:{status:"ready",value:{granted:!0}}}}]}];Object.freeze(new Set(fS.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)));const Hf=/^use[A-Z][A-Za-z0-9]*$/,Bf=/^[A-Z][A-Za-z0-9]*$/,qf=["geolocation","notifications","microphone","camera","persistent-storage","midi","clipboard-read","clipboard-write","speaker-selection","storage-access","background-sync","accelerometer","gyroscope","magnetometer","ambient-light-sensor","screen-wake-lock"];new Set(qf);const ft=l1(()=>hn([F(),Fe(),Gt(),A_(),pt(ft),St(F(),ft)])),mn=l1(()=>de({type:dt(["string","number","integer","boolean","array","object","null"]).optional(),description:F().optional(),enum:pt(ft).optional(),default:ft.optional(),example:ft.optional(),items:mn.optional(),properties:St(F(),mn).optional(),required:pt(F()).optional(),additionalProperties:hn([mn,Gt()]).optional(),format:F().optional()}).passthrough()),pS=de({description:F().optional(),schema:mn,required:Gt().optional(),default:ft.optional(),example:ft.optional(),sourceTool:F().optional()}).strict(),gS=de({description:F().optional(),properties:St(F(),pS)}).strict(),mS=de({description:F().optional(),label:F(),schema:mn.optional(),example:ft.optional(),icon:F().optional(),confirm:Gt().optional(),nextStep:F().min(1).optional()}).strict(),hS=St(F(),mS),yS=de({description:F().optional(),schema:mn,example:ft.optional(),mode:dt(["append","replace"]).optional(),replay:dt(["latest","all","none"]).optional(),complete:Gt().optional(),tool:F().optional(),source:de({tool:F(),args:St(F(),ft).optional()}).strict().optional()}).strict(),vS=St(F(),yS),$S=de({description:F().optional(),schema:mn,default:ft.optional(),debounceMs:Fe().int().nonnegative().optional(),example:ft.optional()}).strict(),bS=St(F(),$S),xS=de({description:F().optional(),usage:F().optional(),inputSchema:mn.optional(),outputSchema:mn.optional(),required:Gt().optional(),example:de({input:ft,output:ft}).strict().optional()}).strict(),jS=de({tools:St(F(),xS)}).passthrough(),u1=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,_S=pt(F().regex(u1)).readonly(),xh=/^sha384-[A-Za-z0-9+/]+=*$/,d1=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,SS=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,wS=/^[a-z0-9.-]+(:\d+)?$/,f1={gotchas:F().optional(),required:Gt().optional()},jh={...f1,description:F().optional(),usage:F().optional(),example:ft.optional(),permission:F().optional()},_h={...f1,description:F().min(1),usage:F().min(1),example:ft,permission:dt(qf).optional()},p1={version:F().regex(SS),package:F().regex(d1),bundleUrl:xl().optional(),bundleHost:F().regex(wS).optional(),bundleSri:F().regex(xh).optional(),styleUrl:xl().optional(),connect:pt(xl()).readonly().optional(),requires:_S.optional(),typesUrl:xl().optional(),typesSri:F().regex(xh).optional()},kS=hn([de({hook:F().regex(Hf),...jh}).strict(),de({component:F().regex(Bf),...jh}).strict()]),NS=hn([de({hook:F().regex(Hf),..._h}).strict(),de({component:F().regex(Bf),..._h}).strict()]);de({...p1,exports:pt(kS).min(1)}).strict();const zS=de({...p1,exports:pt(NS).min(1)}).strict();zS.refine(e=>e.package===c1||typeof e.typesUrl=="string",{message:"registered GadgetDescriptor MUST declare a `typesUrl` (HTTPS URL to the package's .d.ts) — the code-gen sandbox loads it to typecheck generated component code against the export signatures. Run `tsup --dts` (or `tsc --declaration`) in the wrapper build and publish the emitted .d.ts. Only the first-party `@ggui-ai/gadgets` stdlib is exempt.",path:["typesUrl"]});const CS=de({description:F().optional(),usage:F().optional()}).strict(),ES=St(F().refine(e=>Hf.test(e)||Bf.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),CS).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),TS=de({gadgets:St(F().regex(d1),ES)}).strict();St(F().regex(u1),F()).readonly();const _c=de({propsSpec:gS.optional(),actionSpec:hS.optional(),streamSpec:vS.optional(),contextSpec:bS.optional(),agentCapabilities:jS.optional(),clientCapabilities:TS.optional()}).passthrough(),Pf=de({persona:F().optional(),aesthetic:F().optional(),context:St(F(),ft).optional(),seedPrompt:F().optional()}).strict(),MS=de({blueprintId:F().min(1),contractHash:F().min(1),appId:F().min(1),codeS3Url:F().optional(),codeHash:F().optional(),generator:F().min(1),validatorScore:Fe().min(0).max(1).optional(),variance:Pf,isOperatorDefault:Re(!0).optional(),createdAt:F().min(1),createdBy:dt(["agent","operator"]),contract:_c,contractEmbedding:pt(Fe()).optional()}).strict();de({hash:Fe().min(0),embed:Fe().min(0),struct:Fe().min(0),variance:Fe().min(0),intent:Fe().min(0)}).strict();const RS=de({hash:Fe().min(0).optional(),embed:Fe().min(0).optional(),struct:Fe().min(0).optional(),variance:Fe().min(0).optional(),intent:Fe().min(0).optional()}).strict();de({weights:RS.optional(),threshold:Fe().min(0).max(1).optional(),topK:Fe().int().min(1).optional()}).strict();const OS=dt(["cache","agent","synth"]),AS=hn([de({op:Re("add"),path:F(),value:ft}).strict(),de({op:Re("remove"),path:F()}).strict(),de({op:Re("replace"),path:F(),value:ft}).strict()]),DS=pt(AS),IS=de({contract:_c,variance:de({persona:F().optional(),aesthetic:F().optional(),context:St(F(),ft).optional(),seedPrompt:F().optional()}).strict().optional(),generator:F().optional()}).strict(),g1=IS,US=de({blueprintId:F().min(1),contractHash:F().min(1),codeHash:F().optional(),generator:F().min(1),variance:Pf,selectedReason:F().optional()}).strict(),LS=de({code:F().min(1),severity:dt(["error","warn"]),path:F(),message:F()}).strict(),VS=de({contractDiff:DS,reasoning:F()}).strict(),HS=de({origin:OS,rationale:F(),blueprintMeta:US,amendments:VS.optional(),validationFindings:pt(LS).optional()}).strict(),BS=hn([de({kind:Re("accept")}).strict(),de({kind:Re("override"),blueprintDraft:g1}).strict()]),qS=de({width:Fe(),height:Fe()}),PS=de({viewport:qS,platform:dt(["web","mobile","desktop"]),deviceType:dt(["phone","tablet","desktop"]),orientation:dt(["portrait","landscape"]),devicePixelRatio:Fe().optional(),touchPrimary:Gt().optional(),shellType:dt(["chat","fullscreen","spatial"]).optional(),colorScheme:dt(["light","dark"]).optional(),reducedMotion:Gt().optional()}).passthrough();de({sessionId:F().describe("Session opaque id from ggui_new_session.")}).strict();de({stackItemId:F().describe("Stack item opaque id (UUID) — returned by ggui_push."),timeout:Fe().min(0).max(25).optional().describe("Long-poll timeout in seconds (default short; max 25).")}).strict();de({sessionId:F().describe("Session opaque id from ggui_new_session."),channel:F().describe("Channel name declared on the active stack item streamSpec."),payload:Pa().describe("Payload — must match streamSpec[channel].schema."),complete:Gt().optional().describe("True marks the stream complete; subsequent emits on this channel reject."),stackItemId:F().optional().describe("Stack item to scope this emit to; defaults to session top.")}).strict();de({sessionId:F().describe("Session opaque id from ggui_new_session.")}).strict();de({sessionId:F().describe("Session opaque id from ggui_new_session.")}).strict();de({sessionId:F().describe("Session opaque id from ggui_new_session.")}).strict();de({level:dt(["primitive","component","composite","template"]).optional(),category:F().optional(),tags:pt(F()).optional(),limit:Fe().optional()}).strict();de({query:F(),limit:Fe().optional()}).strict();de({blueprintId:F(),props:St(F(),Pa()).optional()}).strict();de({}).strict();de({serviceId:F().describe('OAuth service ID (e.g., "bashdoor", "ubot")'),reason:F().optional().describe("Why the agent needs this credential (shown to user)"),sessionId:F().optional().describe("Existing session ID to push consent UI into")}).strict();de({}).strict();de({sessionId:F().describe("Thread this through every subsequent ggui_handshake / ggui_update call in this chat."),appId:F(),createdAt:F().describe("ISO 8601 — creation timestamp of the freshly-minted session."),nextStep:de({tool:Re("ggui_handshake"),description:F(),example:F()}).describe("Wire-shape recovery hint — a worked literal example of the next call.")});de({sessionId:F().min(1).describe("Session handle minted by ggui_new_session. Required — call ggui_new_session({seed?}) first to obtain one. Reuse the same sessionId across multiple handshake/push pairs in the same chat to grow the session stack."),intent:F().min(1).describe('Concise purpose — same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:g1.describe("Agent's draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth)."),forceCreate:Gt().optional()}).strict();de({handshakeId:F().describe("Stable id — pass to ggui_push / ggui_update"),action:dt(["create","reuse","update","replace","compose","declined"]),suggestion:HS.describe("Server's suggestion — origin-routed (cache | agent | synth). Always carries a provisional `blueprintMeta` the agent reuses by sending `decision: 'accept'` on push."),reason:F().max(280).optional().describe("Short rationale (≤280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:de({tool:Re("ggui_push"),description:F(),example:F()}).optional().describe("Wire-shape recovery hint. A worked literal example of the next ggui_push call the agent should emit — the example string can be copied verbatim and tweaked (e.g. fill in `props` placeholders). Top-level field so a skimming agent finds it immediately.")});de({handshakeId:F({message:"ggui_push: handshakeId is REQUIRED. Call ggui_handshake({sessionId, intent, blueprintDraft}) first to negotiate — handshake returns a handshakeId + suggestion. Then push with {handshakeId, decision: {kind: 'accept'}} (accept the suggestion) or {handshakeId, decision: {kind: 'override', blueprintDraft: {...}}} (override with a fresh draft). Direct-push without a handshakeId is not supported."}).min(1,"ggui_push: handshakeId must be a non-empty string from a prior ggui_handshake call."),props:St(F(),Pa()).optional(),decision:BS.describe("Accept the handshake suggestion (use provisional blueprintId verbatim) or override with a fresh draft (mint new blueprintId).")}).strict();de({stackItemId:F(),url:F().url(),action:dt(["create","reuse","update","replace","compose","declined"]),nextStep:de({tool:Re("ggui_consume"),description:F(),example:F(),args:de({stackItemId:F()})}).optional().describe("Recovery hint — when the pushed contract has actions, points the agent at ggui_consume({stackItemId}) for the inbound action loop. Absent for pure-display pushes.")});ns("kind",[de({stackItemId:F().describe("Stack item opaque id (UUID) — returned by ggui_push."),kind:Re("replace"),props:St(F(),Pa()).describe("Full replacement props map. New map IS the new state.")}).strict(),de({stackItemId:F().describe("Stack item opaque id (UUID) — returned by ggui_push."),kind:Re("merge"),patch:St(F(),Pa()).describe("RFC 7396 JSON Merge Patch — null deletes a key; arrays fully replace.")}).strict()]);de({stackItemId:F(),updated:Gt()});const ZS=de({type:Re("text"),text:F()}),GS=de({type:Re("tool_use"),id:F(),name:F(),input:St(F(),Pa())}),FS=de({type:Re("tool_result"),tool_use_id:F(),content:Pa(),is_error:Gt().optional()}),m1=ns("type",[ZS,GS,FS]),YS=de({type:Re("text_delta"),text:F()}),KS=de({type:Re("input_json_delta"),partial_json:F()}),WS=ns("type",[YS,KS]),XS=de({type:Re("message_start"),message:de({id:F(),role:Re("assistant"),model:F().optional()})}),JS=de({type:Re("content_block_start"),index:Fe().int().nonnegative(),content_block:m1}),QS=de({type:Re("content_block_delta"),index:Fe().int().nonnegative(),delta:WS}),e3=de({type:Re("content_block_stop"),index:Fe().int().nonnegative()}),t3=de({type:Re("message_delta"),delta:de({stop_reason:dt(["end_turn","max_tokens","tool_use","error"]),stop_sequence:F().nullable().optional()}),usage:de({input_tokens:Fe().int().nonnegative(),output_tokens:Fe().int().nonnegative()})}),a3=de({type:Re("message_stop")}),n3=de({type:Re("ping")}),r3=dt(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),i3=de({type:Re("error"),error:de({code:r3,message:F(),retryAfterMs:Fe().int().nonnegative().optional()})});ns("type",[XS,JS,QS,e3,t3,a3,n3,i3]);const o3=de({role:dt(["user","assistant"]),content:hn([F(),pt(m1)])});de({message:F(),history:pt(o3).optional(),interfaceContext:PS.optional(),requestId:F().optional()});de({contract:_c,generator:F().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:F().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:F().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona — persona names the user mental model; aesthetic names the visual treatment."),context:St(F(),ft).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:F().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:Gt().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict();de({blueprintId:F().min(1),codeHash:F().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped — the failure mode is surfaced through generator-level error reporting elsewhere."),validatorScore:Fe().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),generator:F().min(1).describe("Slug of the generator the dispatch resolved to.")}).strict();de({contract:_c,componentCode:F().min(1).describe("Verbatim component-code body to persist. Stored as-is — no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),generator:F().min(1).optional().describe("Optional generator slug to stamp on the persisted Blueprint.generator field — purely an audit/provenance hint for downstream `*_list_blueprints` consumers. Defaults to the registry default slug."),persona:F().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:F().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:St(F(),ft).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:F().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:Gt().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict();de({blueprintId:F().min(1),codeHash:F().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),generator:F().min(1).describe("Resolved generator slug stamped on the Blueprint.generator field — either the supplied input or the registry default.")}).strict();de({contractHash:F().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:F().min(1).optional().describe("Filter to blueprints produced by a specific generator slug."),persona:F().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:pt(F().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict();de({blueprints:pt(MS)}).strict();de({blueprintId:F().min(1),isOperatorDefault:Re(!0).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` — to unpin, set another blueprint in the same group as default, or delete this one."),variance:Pf.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')}).strict();de({blueprintId:F().min(1),updatedAt:F().min(1)}).strict();de({blueprintId:F().min(1)}).strict();de({deleted:Re(!0)}).strict();const Sh={AGENT_DATA:"ggui:agent-data"};function s3(e){return"schemaVersion"in e?e.schemaVersion:jx}function l3(e){const n={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(n.payload=e.payload),e.stackIndex!==void 0&&(n.stackIndex=e.stackIndex),e.stackItemId!==void 0&&(n.stackItemId=e.stackItemId),e.clientSeq!==void 0&&(n.clientSeq=e.clientSeq);const i=s3(e);return i!==void 0&&(n.schemaVersion=i),n}var jl={exports:{}},Jd={},dn={},Lr={},Qd={},ef={},tf={},wh;function gc(){return wh||(wh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends n{constructor($){if(super(),!e.IDENTIFIER.test($))throw new Error("CodeGen: name must be a valid identifier");this.str=$}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=i;class s extends n{constructor($){super(),this._items=typeof $=="string"?[$]:$}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const $=this._items[0];return $===""||$==='""'}get str(){var $;return($=this._str)!==null&&$!==void 0?$:this._str=this._items.reduce((w,R)=>`${w}${R}`,"")}get names(){var $;return($=this._names)!==null&&$!==void 0?$:this._names=this._items.reduce((w,R)=>(R instanceof i&&(w[R.str]=(w[R.str]||0)+1),w),{})}}e._Code=s,e.nil=new s("");function c(N,...$){const w=[N[0]];let R=0;for(;R<$.length;)p(w,$[R]),w.push(N[++R]);return new s(w)}e._=c;const u=new s("+");function d(N,...$){const w=[k(N[0])];let R=0;for(;R<$.length;)w.push(u),p(w,$[R]),w.push(u,k(N[++R]));return g(w),new s(w)}e.str=d;function p(N,$){$ instanceof s?N.push(...$._items):$ instanceof i?N.push($):N.push(v($))}e.addCodeArg=p;function g(N){let $=1;for(;$<N.length-1;){if(N[$]===u){const w=h(N[$-1],N[$+1]);if(w!==void 0){N.splice($-1,3,w);continue}N[$++]="+"}$++}}function h(N,$){if($==='""')return N;if(N==='""')return $;if(typeof N=="string")return $ instanceof i||N[N.length-1]!=='"'?void 0:typeof $!="string"?`${N.slice(0,-1)}${$}"`:$[0]==='"'?N.slice(0,-1)+$.slice(1):void 0;if(typeof $=="string"&&$[0]==='"'&&!(N instanceof i))return`"${N}${$.slice(1)}`}function y(N,$){return $.emptyStr()?N:N.emptyStr()?$:d`${N}${$}`}e.strConcat=y;function v(N){return typeof N=="number"||typeof N=="boolean"||N===null?N:k(Array.isArray(N)?N.join(","):N)}function j(N){return new s(k(N))}e.stringify=j;function k(N){return JSON.stringify(N).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=k;function b(N){return typeof N=="string"&&e.IDENTIFIER.test(N)?new s(`.${N}`):c`[${N}]`}e.getProperty=b;function C(N){if(typeof N=="string"&&e.IDENTIFIER.test(N))return new s(`${N}`);throw new Error(`CodeGen: invalid export name: ${N}, use explicit $id name mapping`)}e.getEsmExportName=C;function z(N){return new s(N.toString())}e.regexpCode=z})(tf)),tf}var af={},kh;function Nh(){return kh||(kh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const n=gc();class i extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var s;(function(g){g[g.Started=0]="Started",g[g.Completed=1]="Completed"})(s||(e.UsedValueState=s={})),e.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class c{constructor({prefixes:h,parent:y}={}){this._names={},this._prefixes=h,this._parent=y}toName(h){return h instanceof n.Name?h:this.name(h)}name(h){return new n.Name(this._newName(h))}_newName(h){const y=this._names[h]||this._nameGroup(h);return`${h}${y.index++}`}_nameGroup(h){var y,v;if(!((v=(y=this._parent)===null||y===void 0?void 0:y._prefixes)===null||v===void 0)&&v.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=c;class u extends n.Name{constructor(h,y){super(y),this.prefix=h}setValue(h,{property:y,itemIndex:v}){this.value=h,this.scopePath=(0,n._)`.${new n.Name(y)}[${v}]`}}e.ValueScopeName=u;const d=(0,n._)`\n`;class p extends c{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?d:n.nil}}get(){return this._scope}name(h){return new u(h,this._newName(h))}value(h,y){var v;if(y.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const j=this.toName(h),{prefix:k}=j,b=(v=y.key)!==null&&v!==void 0?v:y.ref;let C=this._values[k];if(C){const $=C.get(b);if($)return $}else C=this._values[k]=new Map;C.set(b,j);const z=this._scope[k]||(this._scope[k]=[]),N=z.length;return z[N]=y.ref,j.setValue(y,{property:k,itemIndex:N}),j}getValue(h,y){const v=this._values[h];if(v)return v.get(y)}scopeRefs(h,y=this._values){return this._reduceValues(y,v=>{if(v.scopePath===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return(0,n._)`${h}${v.scopePath}`})}scopeCode(h=this._values,y,v){return this._reduceValues(h,j=>{if(j.value===void 0)throw new Error(`CodeGen: name "${j}" has no value`);return j.value.code},y,v)}_reduceValues(h,y,v={},j){let k=n.nil;for(const b in h){const C=h[b];if(!C)continue;const z=v[b]=v[b]||new Map;C.forEach(N=>{if(z.has(N))return;z.set(N,s.Started);let $=y(N);if($){const w=this.opts.es5?e.varKinds.var:e.varKinds.const;k=(0,n._)`${k}${w} ${N} = ${$};${this.opts._n}`}else if($=j==null?void 0:j(N))k=(0,n._)`${k}${$}${this.opts._n}`;else throw new i(N);z.set(N,s.Completed)})}return k}}e.ValueScope=p})(af)),af}var zh;function De(){return zh||(zh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const n=gc(),i=Nh();var s=gc();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return s.Name}});var c=Nh();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return c.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return c.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return c.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return c.varKinds}}),e.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class u{optimizeNodes(){return this}optimizeNames(E,V){return this}}class d extends u{constructor(E,V,W){super(),this.varKind=E,this.name=V,this.rhs=W}render({es5:E,_n:V}){const W=E?i.varKinds.var:this.varKind,he=this.rhs===void 0?"":` = ${this.rhs}`;return`${W} ${this.name}${he};`+V}optimizeNames(E,V){if(E[this.name.str])return this.rhs&&(this.rhs=le(this.rhs,E,V)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class p extends u{constructor(E,V,W){super(),this.lhs=E,this.rhs=V,this.sideEffects=W}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,V){if(!(this.lhs instanceof n.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=le(this.rhs,E,V),this}get names(){const E=this.lhs instanceof n.Name?{}:{...this.lhs.names};return re(E,this.rhs)}}class g extends p{constructor(E,V,W,he){super(E,W,he),this.op=V}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}class h extends u{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class y extends u{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class v extends u{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class j extends u{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code};`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,V){return this.code=le(this.code,E,V),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class k extends u{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((V,W)=>V+W.render(E),"")}optimizeNodes(){const{nodes:E}=this;let V=E.length;for(;V--;){const W=E[V].optimizeNodes();Array.isArray(W)?E.splice(V,1,...W):W?E[V]=W:E.splice(V,1)}return E.length>0?this:void 0}optimizeNames(E,V){const{nodes:W}=this;let he=W.length;for(;he--;){const pe=W[he];pe.optimizeNames(E,V)||($e(E,pe.names),W.splice(he,1))}return W.length>0?this:void 0}get names(){return this.nodes.reduce((E,V)=>J(E,V.names),{})}}class b extends k{render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class C extends k{}class z extends b{}z.kind="else";class N extends b{constructor(E,V){super(V),this.condition=E}render(E){let V=`if(${this.condition})`+super.render(E);return this.else&&(V+="else "+this.else.render(E)),V}optimizeNodes(){super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let V=this.else;if(V){const W=V.optimizeNodes();V=this.else=Array.isArray(W)?new z(W):W}if(V)return E===!1?V instanceof N?V:V.nodes:this.nodes.length?this:new N(ce(E),V instanceof N?[V]:V.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,V){var W;if(this.else=(W=this.else)===null||W===void 0?void 0:W.optimizeNames(E,V),!!(super.optimizeNames(E,V)||this.else))return this.condition=le(this.condition,E,V),this}get names(){const E=super.names;return re(E,this.condition),this.else&&J(E,this.else.names),E}}N.kind="if";class $ extends b{}$.kind="for";class w extends ${constructor(E){super(),this.iteration=E}render(E){return`for(${this.iteration})`+super.render(E)}optimizeNames(E,V){if(super.optimizeNames(E,V))return this.iteration=le(this.iteration,E,V),this}get names(){return J(super.names,this.iteration.names)}}class R extends ${constructor(E,V,W,he){super(),this.varKind=E,this.name=V,this.from=W,this.to=he}render(E){const V=E.es5?i.varKinds.var:this.varKind,{name:W,from:he,to:pe}=this;return`for(${V} ${W}=${he}; ${W}<${pe}; ${W}++)`+super.render(E)}get names(){const E=re(super.names,this.from);return re(E,this.to)}}class x extends ${constructor(E,V,W,he){super(),this.loop=E,this.varKind=V,this.name=W,this.iterable=he}render(E){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(E)}optimizeNames(E,V){if(super.optimizeNames(E,V))return this.iterable=le(this.iterable,E,V),this}get names(){return J(super.names,this.iterable.names)}}class _ extends b{constructor(E,V,W){super(),this.name=E,this.args=V,this.async=W}render(E){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(E)}}_.kind="func";class T extends k{render(E){return"return "+super.render(E)}}T.kind="return";class A extends b{render(E){let V="try"+super.render(E);return this.catch&&(V+=this.catch.render(E)),this.finally&&(V+=this.finally.render(E)),V}optimizeNodes(){var E,V;return super.optimizeNodes(),(E=this.catch)===null||E===void 0||E.optimizeNodes(),(V=this.finally)===null||V===void 0||V.optimizeNodes(),this}optimizeNames(E,V){var W,he;return super.optimizeNames(E,V),(W=this.catch)===null||W===void 0||W.optimizeNames(E,V),(he=this.finally)===null||he===void 0||he.optimizeNames(E,V),this}get names(){const E=super.names;return this.catch&&J(E,this.catch.names),this.finally&&J(E,this.finally.names),E}}class I extends b{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.render(E)}}I.kind="catch";class P extends b{render(E){return"finally"+super.render(E)}}P.kind="finally";class H{constructor(E,V={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...V,_n:V.lines?`
|
|
88
|
-
`:""},this._extScope=E,this._scope=new i.Scope({parent:E}),this._nodes=[new C]}toString(){return this._root.render(this.opts)}name(E){return this._scope.name(E)}scopeName(E){return this._extScope.name(E)}scopeValue(E,V){const W=this._extScope.value(E,V);return(this._values[W.prefix]||(this._values[W.prefix]=new Set)).add(W),W}getScopeValue(E,V){return this._extScope.getValue(E,V)}scopeRefs(E){return this._extScope.scopeRefs(E,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(E,V,W,he){const pe=this._scope.toName(V);return W!==void 0&&he&&(this._constants[pe.str]=W),this._leafNode(new d(E,pe,W)),pe}const(E,V,W){return this._def(i.varKinds.const,E,V,W)}let(E,V,W){return this._def(i.varKinds.let,E,V,W)}var(E,V,W){return this._def(i.varKinds.var,E,V,W)}assign(E,V,W){return this._leafNode(new p(E,V,W))}add(E,V){return this._leafNode(new g(E,e.operators.ADD,V))}code(E){return typeof E=="function"?E():E!==n.nil&&this._leafNode(new j(E)),this}object(...E){const V=["{"];for(const[W,he]of E)V.length>1&&V.push(","),V.push(W),(W!==he||this.opts.es5)&&(V.push(":"),(0,n.addCodeArg)(V,he));return V.push("}"),new n._Code(V)}if(E,V,W){if(this._blockNode(new N(E)),V&&W)this.code(V).else().code(W).endIf();else if(V)this.code(V).endIf();else if(W)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(E){return this._elseNode(new N(E))}else(){return this._elseNode(new z)}endIf(){return this._endBlockNode(N,z)}_for(E,V){return this._blockNode(E),V&&this.code(V).endFor(),this}for(E,V){return this._for(new w(E),V)}forRange(E,V,W,he,pe=this.opts.es5?i.varKinds.var:i.varKinds.let){const we=this._scope.toName(E);return this._for(new R(pe,we,V,W),()=>he(we))}forOf(E,V,W,he=i.varKinds.const){const pe=this._scope.toName(E);if(this.opts.es5){const we=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)`${we}.length`,xe=>{this.var(pe,(0,n._)`${we}[${xe}]`),W(pe)})}return this._for(new x("of",he,pe,V),()=>W(pe))}forIn(E,V,W,he=this.opts.es5?i.varKinds.var:i.varKinds.const){if(this.opts.ownProperties)return this.forOf(E,(0,n._)`Object.keys(${V})`,W);const pe=this._scope.toName(E);return this._for(new x("in",he,pe,V),()=>W(pe))}endFor(){return this._endBlockNode($)}label(E){return this._leafNode(new h(E))}break(E){return this._leafNode(new y(E))}return(E){const V=new T;if(this._blockNode(V),this.code(E),V.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(E,V,W){if(!V&&!W)throw new Error('CodeGen: "try" without "catch" and "finally"');const he=new A;if(this._blockNode(he),this.code(E),V){const pe=this.name("e");this._currNode=he.catch=new I(pe),V(pe)}return W&&(this._currNode=he.finally=new P,this.code(W)),this._endBlockNode(I,P)}throw(E){return this._leafNode(new v(E))}block(E,V){return this._blockStarts.push(this._nodes.length),E&&this.code(E).endBlock(V),this}endBlock(E){const V=this._blockStarts.pop();if(V===void 0)throw new Error("CodeGen: not in self-balancing block");const W=this._nodes.length-V;if(W<0||E!==void 0&&W!==E)throw new Error(`CodeGen: wrong number of nodes: ${W} vs ${E} expected`);return this._nodes.length=V,this}func(E,V=n.nil,W,he){return this._blockNode(new _(E,V,W)),he&&this.code(he).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(E=1){for(;E-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(E){return this._currNode.nodes.push(E),this}_blockNode(E){this._currNode.nodes.push(E),this._nodes.push(E)}_endBlockNode(E,V){const W=this._currNode;if(W instanceof E||V&&W instanceof V)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${V?`${E.kind}/${V.kind}`:E.kind}"`)}_elseNode(E){const V=this._currNode;if(!(V instanceof N))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=E,this}get _root(){return this._nodes[0]}get _currNode(){const E=this._nodes;return E[E.length-1]}set _currNode(E){const V=this._nodes;V[V.length-1]=E}}e.CodeGen=H;function J(B,E){for(const V in E)B[V]=(B[V]||0)+(E[V]||0);return B}function re(B,E){return E instanceof n._CodeOrName?J(B,E.names):B}function le(B,E,V){if(B instanceof n.Name)return W(B);if(!he(B))return B;return new n._Code(B._items.reduce((pe,we)=>(we instanceof n.Name&&(we=W(we)),we instanceof n._Code?pe.push(...we._items):pe.push(we),pe),[]));function W(pe){const we=V[pe.str];return we===void 0||E[pe.str]!==1?pe:(delete E[pe.str],we)}function he(pe){return pe instanceof n._Code&&pe._items.some(we=>we instanceof n.Name&&E[we.str]===1&&V[we.str]!==void 0)}}function $e(B,E){for(const V in E)B[V]=(B[V]||0)-(E[V]||0)}function ce(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,n._)`!${ee(B)}`}e.not=ce;const me=U(e.operators.AND);function fe(...B){return B.reduce(me)}e.and=fe;const Ee=U(e.operators.OR);function D(...B){return B.reduce(Ee)}e.or=D;function U(B){return(E,V)=>E===n.nil?V:V===n.nil?E:(0,n._)`${ee(E)} ${B} ${ee(V)}`}function ee(B){return B instanceof n.Name?B:(0,n._)`(${B})`}})(ef)),ef}var Ae={},Ch;function qe(){if(Ch)return Ae;Ch=1,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.checkStrictMode=Ae.getErrorPath=Ae.Type=Ae.useFunc=Ae.setEvaluated=Ae.evaluatedPropsToName=Ae.mergeEvaluated=Ae.eachItem=Ae.unescapeJsonPointer=Ae.escapeJsonPointer=Ae.escapeFragment=Ae.unescapeFragment=Ae.schemaRefOrVal=Ae.schemaHasRulesButRef=Ae.schemaHasRules=Ae.checkUnknownRules=Ae.alwaysValidSchema=Ae.toHash=void 0;const e=De(),n=gc();function i(x){const _={};for(const T of x)_[T]=!0;return _}Ae.toHash=i;function s(x,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(c(x,_),!u(_,x.self.RULES.all))}Ae.alwaysValidSchema=s;function c(x,_=x.schema){const{opts:T,self:A}=x;if(!T.strictSchema||typeof _=="boolean")return;const I=A.RULES.keywords;for(const P in _)I[P]||R(x,`unknown keyword: "${P}"`)}Ae.checkUnknownRules=c;function u(x,_){if(typeof x=="boolean")return!x;for(const T in x)if(_[T])return!0;return!1}Ae.schemaHasRules=u;function d(x,_){if(typeof x=="boolean")return!x;for(const T in x)if(T!=="$ref"&&_.all[T])return!0;return!1}Ae.schemaHasRulesButRef=d;function p({topSchemaRef:x,schemaPath:_},T,A,I){if(!I){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,e._)`${T}`}return(0,e._)`${x}${_}${(0,e.getProperty)(A)}`}Ae.schemaRefOrVal=p;function g(x){return v(decodeURIComponent(x))}Ae.unescapeFragment=g;function h(x){return encodeURIComponent(y(x))}Ae.escapeFragment=h;function y(x){return typeof x=="number"?`${x}`:x.replace(/~/g,"~0").replace(/\//g,"~1")}Ae.escapeJsonPointer=y;function v(x){return x.replace(/~1/g,"/").replace(/~0/g,"~")}Ae.unescapeJsonPointer=v;function j(x,_){if(Array.isArray(x))for(const T of x)_(T);else _(x)}Ae.eachItem=j;function k({mergeNames:x,mergeToName:_,mergeValues:T,resultToName:A}){return(I,P,H,J)=>{const re=H===void 0?P:H instanceof e.Name?(P instanceof e.Name?x(I,P,H):_(I,P,H),H):P instanceof e.Name?(_(I,H,P),P):T(P,H);return J===e.Name&&!(re instanceof e.Name)?A(I,re):re}}Ae.mergeEvaluated={props:k({mergeNames:(x,_,T)=>x.if((0,e._)`${T} !== true && ${_} !== undefined`,()=>{x.if((0,e._)`${_} === true`,()=>x.assign(T,!0),()=>x.assign(T,(0,e._)`${T} || {}`).code((0,e._)`Object.assign(${T}, ${_})`))}),mergeToName:(x,_,T)=>x.if((0,e._)`${T} !== true`,()=>{_===!0?x.assign(T,!0):(x.assign(T,(0,e._)`${T} || {}`),C(x,T,_))}),mergeValues:(x,_)=>x===!0?!0:{...x,..._},resultToName:b}),items:k({mergeNames:(x,_,T)=>x.if((0,e._)`${T} !== true && ${_} !== undefined`,()=>x.assign(T,(0,e._)`${_} === true ? true : ${T} > ${_} ? ${T} : ${_}`)),mergeToName:(x,_,T)=>x.if((0,e._)`${T} !== true`,()=>x.assign(T,_===!0?!0:(0,e._)`${T} > ${_} ? ${T} : ${_}`)),mergeValues:(x,_)=>x===!0?!0:Math.max(x,_),resultToName:(x,_)=>x.var("items",_)})};function b(x,_){if(_===!0)return x.var("props",!0);const T=x.var("props",(0,e._)`{}`);return _!==void 0&&C(x,T,_),T}Ae.evaluatedPropsToName=b;function C(x,_,T){Object.keys(T).forEach(A=>x.assign((0,e._)`${_}${(0,e.getProperty)(A)}`,!0))}Ae.setEvaluated=C;const z={};function N(x,_){return x.scopeValue("func",{ref:_,code:z[_.code]||(z[_.code]=new n._Code(_.code))})}Ae.useFunc=N;var $;(function(x){x[x.Num=0]="Num",x[x.Str=1]="Str"})($||(Ae.Type=$={}));function w(x,_,T){if(x instanceof e.Name){const A=_===$.Num;return T?A?(0,e._)`"[" + ${x} + "]"`:(0,e._)`"['" + ${x} + "']"`:A?(0,e._)`"/" + ${x}`:(0,e._)`"/" + ${x}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,e.getProperty)(x).toString():"/"+y(x)}Ae.getErrorPath=w;function R(x,_,T=x.opts.strictSchema){if(T){if(_=`strict mode: ${_}`,T===!0)throw new Error(_);x.self.logger.warn(_)}}return Ae.checkStrictMode=R,Ae}var _l={},Eh;function mr(){if(Eh)return _l;Eh=1,Object.defineProperty(_l,"__esModule",{value:!0});const e=De(),n={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return _l.default=n,_l}var Th;function Sc(){return Th||(Th=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const n=De(),i=qe(),s=mr();e.keywordError={message:({keyword:z})=>(0,n.str)`must pass "${z}" keyword validation`},e.keyword$DataError={message:({keyword:z,schemaType:N})=>N?(0,n.str)`"${z}" keyword must be ${N} ($data)`:(0,n.str)`"${z}" keyword is invalid ($data)`};function c(z,N=e.keywordError,$,w){const{it:R}=z,{gen:x,compositeRule:_,allErrors:T}=R,A=v(z,N,$);w??(_||T)?g(x,A):h(R,(0,n._)`[${A}]`)}e.reportError=c;function u(z,N=e.keywordError,$){const{it:w}=z,{gen:R,compositeRule:x,allErrors:_}=w,T=v(z,N,$);g(R,T),x||_||h(w,s.default.vErrors)}e.reportExtraError=u;function d(z,N){z.assign(s.default.errors,N),z.if((0,n._)`${s.default.vErrors} !== null`,()=>z.if(N,()=>z.assign((0,n._)`${s.default.vErrors}.length`,N),()=>z.assign(s.default.vErrors,null)))}e.resetErrorsCount=d;function p({gen:z,keyword:N,schemaValue:$,data:w,errsCount:R,it:x}){if(R===void 0)throw new Error("ajv implementation error");const _=z.name("err");z.forRange("i",R,s.default.errors,T=>{z.const(_,(0,n._)`${s.default.vErrors}[${T}]`),z.if((0,n._)`${_}.instancePath === undefined`,()=>z.assign((0,n._)`${_}.instancePath`,(0,n.strConcat)(s.default.instancePath,x.errorPath))),z.assign((0,n._)`${_}.schemaPath`,(0,n.str)`${x.errSchemaPath}/${N}`),x.opts.verbose&&(z.assign((0,n._)`${_}.schema`,$),z.assign((0,n._)`${_}.data`,w))})}e.extendErrors=p;function g(z,N){const $=z.const("err",N);z.if((0,n._)`${s.default.vErrors} === null`,()=>z.assign(s.default.vErrors,(0,n._)`[${$}]`),(0,n._)`${s.default.vErrors}.push(${$})`),z.code((0,n._)`${s.default.errors}++`)}function h(z,N){const{gen:$,validateName:w,schemaEnv:R}=z;R.$async?$.throw((0,n._)`new ${z.ValidationError}(${N})`):($.assign((0,n._)`${w}.errors`,N),$.return(!1))}const y={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function v(z,N,$){const{createErrors:w}=z.it;return w===!1?(0,n._)`{}`:j(z,N,$)}function j(z,N,$={}){const{gen:w,it:R}=z,x=[k(R,$),b(z,$)];return C(z,N,x),w.object(...x)}function k({errorPath:z},{instancePath:N}){const $=N?(0,n.str)`${z}${(0,i.getErrorPath)(N,i.Type.Str)}`:z;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,$)]}function b({keyword:z,it:{errSchemaPath:N}},{schemaPath:$,parentSchema:w}){let R=w?N:(0,n.str)`${N}/${z}`;return $&&(R=(0,n.str)`${R}${(0,i.getErrorPath)($,i.Type.Str)}`),[y.schemaPath,R]}function C(z,{params:N,message:$},w){const{keyword:R,data:x,schemaValue:_,it:T}=z,{opts:A,propertyName:I,topSchemaRef:P,schemaPath:H}=T;w.push([y.keyword,R],[y.params,typeof N=="function"?N(z):N||(0,n._)`{}`]),A.messages&&w.push([y.message,typeof $=="function"?$(z):$]),A.verbose&&w.push([y.schema,_],[y.parentSchema,(0,n._)`${P}${H}`],[s.default.data,x]),I&&w.push([y.propertyName,I])}})(Qd)),Qd}var Mh;function c3(){if(Mh)return Lr;Mh=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.boolOrEmptySchema=Lr.topBoolOrEmptySchema=void 0;const e=Sc(),n=De(),i=mr(),s={message:"boolean schema is false"};function c(p){const{gen:g,schema:h,validateName:y}=p;h===!1?d(p,!1):typeof h=="object"&&h.$async===!0?g.return(i.default.data):(g.assign((0,n._)`${y}.errors`,null),g.return(!0))}Lr.topBoolOrEmptySchema=c;function u(p,g){const{gen:h,schema:y}=p;y===!1?(h.var(g,!1),d(p)):h.var(g,!0)}Lr.boolOrEmptySchema=u;function d(p,g){const{gen:h,data:y}=p,v={gen:h,keyword:"false schema",data:y,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:p};(0,e.reportError)(v,s,void 0,g)}return Lr}var Ut={},Vr={},Rh;function h1(){if(Rh)return Vr;Rh=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.getRules=Vr.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],n=new Set(e);function i(c){return typeof c=="string"&&n.has(c)}Vr.isJSONType=i;function s(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}return Vr.getRules=s,Vr}var fn={},Oh;function y1(){if(Oh)return fn;Oh=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.shouldUseRule=fn.shouldUseGroup=fn.schemaHasRulesForType=void 0;function e({schema:s,self:c},u){const d=c.RULES.types[u];return d&&d!==!0&&n(s,d)}fn.schemaHasRulesForType=e;function n(s,c){return c.rules.some(u=>i(s,u))}fn.shouldUseGroup=n;function i(s,c){var u;return s[c.keyword]!==void 0||((u=c.definition.implements)===null||u===void 0?void 0:u.some(d=>s[d]!==void 0))}return fn.shouldUseRule=i,fn}var Ah;function mc(){if(Ah)return Ut;Ah=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.reportTypeError=Ut.checkDataTypes=Ut.checkDataType=Ut.coerceAndCheckDataType=Ut.getJSONTypes=Ut.getSchemaTypes=Ut.DataType=void 0;const e=h1(),n=y1(),i=Sc(),s=De(),c=qe();var u;(function($){$[$.Correct=0]="Correct",$[$.Wrong=1]="Wrong"})(u||(Ut.DataType=u={}));function d($){const w=p($.type);if(w.includes("null")){if($.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!w.length&&$.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');$.nullable===!0&&w.push("null")}return w}Ut.getSchemaTypes=d;function p($){const w=Array.isArray($)?$:$?[$]:[];if(w.every(e.isJSONType))return w;throw new Error("type must be JSONType or JSONType[]: "+w.join(","))}Ut.getJSONTypes=p;function g($,w){const{gen:R,data:x,opts:_}=$,T=y(w,_.coerceTypes),A=w.length>0&&!(T.length===0&&w.length===1&&(0,n.schemaHasRulesForType)($,w[0]));if(A){const I=b(w,x,_.strictNumbers,u.Wrong);R.if(I,()=>{T.length?v($,w,T):z($)})}return A}Ut.coerceAndCheckDataType=g;const h=new Set(["string","number","integer","boolean","null"]);function y($,w){return w?$.filter(R=>h.has(R)||w==="array"&&R==="array"):[]}function v($,w,R){const{gen:x,data:_,opts:T}=$,A=x.let("dataType",(0,s._)`typeof ${_}`),I=x.let("coerced",(0,s._)`undefined`);T.coerceTypes==="array"&&x.if((0,s._)`${A} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>x.assign(_,(0,s._)`${_}[0]`).assign(A,(0,s._)`typeof ${_}`).if(b(w,_,T.strictNumbers),()=>x.assign(I,_))),x.if((0,s._)`${I} !== undefined`);for(const H of R)(h.has(H)||H==="array"&&T.coerceTypes==="array")&&P(H);x.else(),z($),x.endIf(),x.if((0,s._)`${I} !== undefined`,()=>{x.assign(_,I),j($,I)});function P(H){switch(H){case"string":x.elseIf((0,s._)`${A} == "number" || ${A} == "boolean"`).assign(I,(0,s._)`"" + ${_}`).elseIf((0,s._)`${_} === null`).assign(I,(0,s._)`""`);return;case"number":x.elseIf((0,s._)`${A} == "boolean" || ${_} === null
|
|
89
|
-
|| (${A} == "string" && ${_} && ${_} == +${_})`).assign(I,(0,s._)`+${_}`);return;case"integer":x.elseIf((0,s._)`${A} === "boolean" || ${_} === null
|
|
90
|
-
|| (${A} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(I,(0,s._)`+${_}`);return;case"boolean":x.elseIf((0,s._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(I,!1).elseIf((0,s._)`${_} === "true" || ${_} === 1`).assign(I,!0);return;case"null":x.elseIf((0,s._)`${_} === "" || ${_} === 0 || ${_} === false`),x.assign(I,null);return;case"array":x.elseIf((0,s._)`${A} === "string" || ${A} === "number"
|
|
91
|
-
|| ${A} === "boolean" || ${_} === null`).assign(I,(0,s._)`[${_}]`)}}}function j({gen:$,parentData:w,parentDataProperty:R},x){$.if((0,s._)`${w} !== undefined`,()=>$.assign((0,s._)`${w}[${R}]`,x))}function k($,w,R,x=u.Correct){const _=x===u.Correct?s.operators.EQ:s.operators.NEQ;let T;switch($){case"null":return(0,s._)`${w} ${_} null`;case"array":T=(0,s._)`Array.isArray(${w})`;break;case"object":T=(0,s._)`${w} && typeof ${w} == "object" && !Array.isArray(${w})`;break;case"integer":T=A((0,s._)`!(${w} % 1) && !isNaN(${w})`);break;case"number":T=A();break;default:return(0,s._)`typeof ${w} ${_} ${$}`}return x===u.Correct?T:(0,s.not)(T);function A(I=s.nil){return(0,s.and)((0,s._)`typeof ${w} == "number"`,I,R?(0,s._)`isFinite(${w})`:s.nil)}}Ut.checkDataType=k;function b($,w,R,x){if($.length===1)return k($[0],w,R,x);let _;const T=(0,c.toHash)($);if(T.array&&T.object){const A=(0,s._)`typeof ${w} != "object"`;_=T.null?A:(0,s._)`!${w} || ${A}`,delete T.null,delete T.array,delete T.object}else _=s.nil;T.number&&delete T.integer;for(const A in T)_=(0,s.and)(_,k(A,w,R,x));return _}Ut.checkDataTypes=b;const C={message:({schema:$})=>`must be ${$}`,params:({schema:$,schemaValue:w})=>typeof $=="string"?(0,s._)`{type: ${$}}`:(0,s._)`{type: ${w}}`};function z($){const w=N($);(0,i.reportError)(w,C)}Ut.reportTypeError=z;function N($){const{gen:w,data:R,schema:x}=$,_=(0,c.schemaRefOrVal)($,x,"type");return{gen:w,keyword:"type",data:R,schema:x.type,schemaCode:_,schemaValue:_,parentSchema:x,params:{},it:$}}return Ut}var Zo={},Dh;function u3(){if(Dh)return Zo;Dh=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.assignDefaults=void 0;const e=De(),n=qe();function i(c,u){const{properties:d,items:p}=c.schema;if(u==="object"&&d)for(const g in d)s(c,g,d[g].default);else u==="array"&&Array.isArray(p)&&p.forEach((g,h)=>s(c,h,g.default))}Zo.assignDefaults=i;function s(c,u,d){const{gen:p,compositeRule:g,data:h,opts:y}=c;if(d===void 0)return;const v=(0,e._)`${h}${(0,e.getProperty)(u)}`;if(g){(0,n.checkStrictMode)(c,`default is ignored for: ${v}`);return}let j=(0,e._)`${v} === undefined`;y.useDefaults==="empty"&&(j=(0,e._)`${j} || ${v} === null || ${v} === ""`),p.if(j,(0,e._)`${v} = ${(0,e.stringify)(d)}`)}return Zo}var Aa={},Ge={},Ih;function Da(){if(Ih)return Ge;Ih=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.validateUnion=Ge.validateArray=Ge.usePattern=Ge.callValidateCode=Ge.schemaProperties=Ge.allSchemaProperties=Ge.noPropertyInData=Ge.propertyInData=Ge.isOwnProperty=Ge.hasPropFunc=Ge.reportMissingProp=Ge.checkMissingProp=Ge.checkReportMissingProp=void 0;const e=De(),n=qe(),i=mr(),s=qe();function c($,w){const{gen:R,data:x,it:_}=$;R.if(y(R,x,w,_.opts.ownProperties),()=>{$.setParams({missingProperty:(0,e._)`${w}`},!0),$.error()})}Ge.checkReportMissingProp=c;function u({gen:$,data:w,it:{opts:R}},x,_){return(0,e.or)(...x.map(T=>(0,e.and)(y($,w,T,R.ownProperties),(0,e._)`${_} = ${T}`)))}Ge.checkMissingProp=u;function d($,w){$.setParams({missingProperty:w},!0),$.error()}Ge.reportMissingProp=d;function p($){return $.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ge.hasPropFunc=p;function g($,w,R){return(0,e._)`${p($)}.call(${w}, ${R})`}Ge.isOwnProperty=g;function h($,w,R,x){const _=(0,e._)`${w}${(0,e.getProperty)(R)} !== undefined`;return x?(0,e._)`${_} && ${g($,w,R)}`:_}Ge.propertyInData=h;function y($,w,R,x){const _=(0,e._)`${w}${(0,e.getProperty)(R)} === undefined`;return x?(0,e.or)(_,(0,e.not)(g($,w,R))):_}Ge.noPropertyInData=y;function v($){return $?Object.keys($).filter(w=>w!=="__proto__"):[]}Ge.allSchemaProperties=v;function j($,w){return v(w).filter(R=>!(0,n.alwaysValidSchema)($,w[R]))}Ge.schemaProperties=j;function k({schemaCode:$,data:w,it:{gen:R,topSchemaRef:x,schemaPath:_,errorPath:T},it:A},I,P,H){const J=H?(0,e._)`${$}, ${w}, ${x}${_}`:w,re=[[i.default.instancePath,(0,e.strConcat)(i.default.instancePath,T)],[i.default.parentData,A.parentData],[i.default.parentDataProperty,A.parentDataProperty],[i.default.rootData,i.default.rootData]];A.opts.dynamicRef&&re.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const le=(0,e._)`${J}, ${R.object(...re)}`;return P!==e.nil?(0,e._)`${I}.call(${P}, ${le})`:(0,e._)`${I}(${le})`}Ge.callValidateCode=k;const b=(0,e._)`new RegExp`;function C({gen:$,it:{opts:w}},R){const x=w.unicodeRegExp?"u":"",{regExp:_}=w.code,T=_(R,x);return $.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${_.code==="new RegExp"?b:(0,s.useFunc)($,_)}(${R}, ${x})`})}Ge.usePattern=C;function z($){const{gen:w,data:R,keyword:x,it:_}=$,T=w.name("valid");if(_.allErrors){const I=w.let("valid",!0);return A(()=>w.assign(I,!1)),I}return w.var(T,!0),A(()=>w.break()),T;function A(I){const P=w.const("len",(0,e._)`${R}.length`);w.forRange("i",0,P,H=>{$.subschema({keyword:x,dataProp:H,dataPropType:n.Type.Num},T),w.if((0,e.not)(T),I)})}}Ge.validateArray=z;function N($){const{gen:w,schema:R,keyword:x,it:_}=$;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(P=>(0,n.alwaysValidSchema)(_,P))&&!_.opts.unevaluated)return;const A=w.let("valid",!1),I=w.name("_valid");w.block(()=>R.forEach((P,H)=>{const J=$.subschema({keyword:x,schemaProp:H,compositeRule:!0},I);w.assign(A,(0,e._)`${A} || ${I}`),$.mergeValidEvaluated(J,I)||w.if((0,e.not)(A))})),$.result(A,()=>$.reset(),()=>$.error(!0))}return Ge.validateUnion=N,Ge}var Uh;function d3(){if(Uh)return Aa;Uh=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.validateKeywordUsage=Aa.validSchemaType=Aa.funcKeywordCode=Aa.macroKeywordCode=void 0;const e=De(),n=mr(),i=Da(),s=Sc();function c(j,k){const{gen:b,keyword:C,schema:z,parentSchema:N,it:$}=j,w=k.macro.call($.self,z,N,$),R=h(b,C,w);$.opts.validateSchema!==!1&&$.self.validateSchema(w,!0);const x=b.name("valid");j.subschema({schema:w,schemaPath:e.nil,errSchemaPath:`${$.errSchemaPath}/${C}`,topSchemaRef:R,compositeRule:!0},x),j.pass(x,()=>j.error(!0))}Aa.macroKeywordCode=c;function u(j,k){var b;const{gen:C,keyword:z,schema:N,parentSchema:$,$data:w,it:R}=j;g(R,k);const x=!w&&k.compile?k.compile.call(R.self,N,$,R):k.validate,_=h(C,z,x),T=C.let("valid");j.block$data(T,A),j.ok((b=k.valid)!==null&&b!==void 0?b:T);function A(){if(k.errors===!1)H(),k.modifying&&d(j),J(()=>j.error());else{const re=k.async?I():P();k.modifying&&d(j),J(()=>p(j,re))}}function I(){const re=C.let("ruleErrs",null);return C.try(()=>H((0,e._)`await `),le=>C.assign(T,!1).if((0,e._)`${le} instanceof ${R.ValidationError}`,()=>C.assign(re,(0,e._)`${le}.errors`),()=>C.throw(le))),re}function P(){const re=(0,e._)`${_}.errors`;return C.assign(re,null),H(e.nil),re}function H(re=k.async?(0,e._)`await `:e.nil){const le=R.opts.passContext?n.default.this:n.default.self,$e=!("compile"in k&&!w||k.schema===!1);C.assign(T,(0,e._)`${re}${(0,i.callValidateCode)(j,_,le,$e)}`,k.modifying)}function J(re){var le;C.if((0,e.not)((le=k.valid)!==null&&le!==void 0?le:T),re)}}Aa.funcKeywordCode=u;function d(j){const{gen:k,data:b,it:C}=j;k.if(C.parentData,()=>k.assign(b,(0,e._)`${C.parentData}[${C.parentDataProperty}]`))}function p(j,k){const{gen:b}=j;b.if((0,e._)`Array.isArray(${k})`,()=>{b.assign(n.default.vErrors,(0,e._)`${n.default.vErrors} === null ? ${k} : ${n.default.vErrors}.concat(${k})`).assign(n.default.errors,(0,e._)`${n.default.vErrors}.length`),(0,s.extendErrors)(j)},()=>j.error())}function g({schemaEnv:j},k){if(k.async&&!j.$async)throw new Error("async keyword in sync schema")}function h(j,k,b){if(b===void 0)throw new Error(`keyword "${k}" failed to compile`);return j.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function y(j,k,b=!1){return!k.length||k.some(C=>C==="array"?Array.isArray(j):C==="object"?j&&typeof j=="object"&&!Array.isArray(j):typeof j==C||b&&typeof j>"u")}Aa.validSchemaType=y;function v({schema:j,opts:k,self:b,errSchemaPath:C},z,N){if(Array.isArray(z.keyword)?!z.keyword.includes(N):z.keyword!==N)throw new Error("ajv implementation error");const $=z.dependencies;if($!=null&&$.some(w=>!Object.prototype.hasOwnProperty.call(j,w)))throw new Error(`parent schema must have dependencies of ${N}: ${$.join(",")}`);if(z.validateSchema&&!z.validateSchema(j[N])){const R=`keyword "${N}" value is invalid at path "${C}": `+b.errorsText(z.validateSchema.errors);if(k.validateSchema==="log")b.logger.error(R);else throw new Error(R)}}return Aa.validateKeywordUsage=v,Aa}var pn={},Lh;function f3(){if(Lh)return pn;Lh=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.extendSubschemaMode=pn.extendSubschemaData=pn.getSubschema=void 0;const e=De(),n=qe();function i(u,{keyword:d,schemaProp:p,schema:g,schemaPath:h,errSchemaPath:y,topSchemaRef:v}){if(d!==void 0&&g!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const j=u.schema[d];return p===void 0?{schema:j,schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}`,errSchemaPath:`${u.errSchemaPath}/${d}`}:{schema:j[p],schemaPath:(0,e._)`${u.schemaPath}${(0,e.getProperty)(d)}${(0,e.getProperty)(p)}`,errSchemaPath:`${u.errSchemaPath}/${d}/${(0,n.escapeFragment)(p)}`}}if(g!==void 0){if(h===void 0||y===void 0||v===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:g,schemaPath:h,topSchemaRef:v,errSchemaPath:y}}throw new Error('either "keyword" or "schema" must be passed')}pn.getSubschema=i;function s(u,d,{dataProp:p,dataPropType:g,data:h,dataTypes:y,propertyName:v}){if(h!==void 0&&p!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:j}=d;if(p!==void 0){const{errorPath:b,dataPathArr:C,opts:z}=d,N=j.let("data",(0,e._)`${d.data}${(0,e.getProperty)(p)}`,!0);k(N),u.errorPath=(0,e.str)`${b}${(0,n.getErrorPath)(p,g,z.jsPropertySyntax)}`,u.parentDataProperty=(0,e._)`${p}`,u.dataPathArr=[...C,u.parentDataProperty]}if(h!==void 0){const b=h instanceof e.Name?h:j.let("data",h,!0);k(b),v!==void 0&&(u.propertyName=v)}y&&(u.dataTypes=y);function k(b){u.data=b,u.dataLevel=d.dataLevel+1,u.dataTypes=[],d.definedProperties=new Set,u.parentData=d.data,u.dataNames=[...d.dataNames,b]}}pn.extendSubschemaData=s;function c(u,{jtdDiscriminator:d,jtdMetadata:p,compositeRule:g,createErrors:h,allErrors:y}){g!==void 0&&(u.compositeRule=g),h!==void 0&&(u.createErrors=h),y!==void 0&&(u.allErrors=y),u.jtdDiscriminator=d,u.jtdMetadata=p}return pn.extendSubschemaMode=c,pn}var Kt={},nf,Vh;function v1(){return Vh||(Vh=1,nf=function e(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,c,u;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(c=s;c--!==0;)if(!e(n[c],i[c]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(u=Object.keys(n),s=u.length,s!==Object.keys(i).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(i,u[c]))return!1;for(c=s;c--!==0;){var d=u[c];if(!e(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}),nf}var rf={exports:{}},Hh;function p3(){if(Hh)return rf.exports;Hh=1;var e=rf.exports=function(s,c,u){typeof c=="function"&&(u=c,c={}),u=c.cb||u;var d=typeof u=="function"?u:u.pre||function(){},p=u.post||function(){};n(c,d,p,s,"",s)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(s,c,u,d,p,g,h,y,v,j){if(d&&typeof d=="object"&&!Array.isArray(d)){c(d,p,g,h,y,v,j);for(var k in d){var b=d[k];if(Array.isArray(b)){if(k in e.arrayKeywords)for(var C=0;C<b.length;C++)n(s,c,u,b[C],p+"/"+k+"/"+C,g,p,k,d,C)}else if(k in e.propsKeywords){if(b&&typeof b=="object")for(var z in b)n(s,c,u,b[z],p+"/"+k+"/"+i(z),g,p,k,d,z)}else(k in e.keywords||s.allKeys&&!(k in e.skipKeywords))&&n(s,c,u,b,p+"/"+k,g,p,k,d)}u(d,p,g,h,y,v,j)}}function i(s){return s.replace(/~/g,"~0").replace(/\//g,"~1")}return rf.exports}var Bh;function wc(){if(Bh)return Kt;Bh=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.getSchemaRefs=Kt.resolveUrl=Kt.normalizeId=Kt._getFullPath=Kt.getFullPath=Kt.inlineRef=void 0;const e=qe(),n=v1(),i=p3(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(C,z=!0){return typeof C=="boolean"?!0:z===!0?!d(C):z?p(C)<=z:!1}Kt.inlineRef=c;const u=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(C){for(const z in C){if(u.has(z))return!0;const N=C[z];if(Array.isArray(N)&&N.some(d)||typeof N=="object"&&d(N))return!0}return!1}function p(C){let z=0;for(const N in C){if(N==="$ref")return 1/0;if(z++,!s.has(N)&&(typeof C[N]=="object"&&(0,e.eachItem)(C[N],$=>z+=p($)),z===1/0))return 1/0}return z}function g(C,z="",N){N!==!1&&(z=v(z));const $=C.parse(z);return h(C,$)}Kt.getFullPath=g;function h(C,z){return C.serialize(z).split("#")[0]+"#"}Kt._getFullPath=h;const y=/#\/?$/;function v(C){return C?C.replace(y,""):""}Kt.normalizeId=v;function j(C,z,N){return N=v(N),C.resolve(z,N)}Kt.resolveUrl=j;const k=/^[a-z_][-a-z0-9._]*$/i;function b(C,z){if(typeof C=="boolean")return{};const{schemaId:N,uriResolver:$}=this.opts,w=v(C[N]||z),R={"":w},x=g($,w,!1),_={},T=new Set;return i(C,{allKeys:!0},(P,H,J,re)=>{if(re===void 0)return;const le=x+H;let $e=R[re];typeof P[N]=="string"&&($e=ce.call(this,P[N])),me.call(this,P.$anchor),me.call(this,P.$dynamicAnchor),R[H]=$e;function ce(fe){const Ee=this.opts.uriResolver.resolve;if(fe=v($e?Ee($e,fe):fe),T.has(fe))throw I(fe);T.add(fe);let D=this.refs[fe];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?A(P,D.schema,fe):fe!==v(le)&&(fe[0]==="#"?(A(P,_[fe],fe),_[fe]=P):this.refs[fe]=le),fe}function me(fe){if(typeof fe=="string"){if(!k.test(fe))throw new Error(`invalid anchor "${fe}"`);ce.call(this,`#${fe}`)}}}),_;function A(P,H,J){if(H!==void 0&&!n(P,H))throw I(J)}function I(P){return new Error(`reference "${P}" resolves to more than one schema`)}}return Kt.getSchemaRefs=b,Kt}var qh;function kc(){if(qh)return dn;qh=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.getData=dn.KeywordCxt=dn.validateFunctionCode=void 0;const e=c3(),n=mc(),i=y1(),s=mc(),c=u3(),u=d3(),d=f3(),p=De(),g=mr(),h=wc(),y=qe(),v=Sc();function j(G){if(x(G)&&(T(G),R(G))){z(G);return}k(G,()=>(0,e.topBoolOrEmptySchema)(G))}dn.validateFunctionCode=j;function k({gen:G,validateName:Q,schema:oe,schemaEnv:ge,opts:be},ze){be.code.es5?G.func(Q,(0,p._)`${g.default.data}, ${g.default.valCxt}`,ge.$async,()=>{G.code((0,p._)`"use strict"; ${$(oe,be)}`),C(G,be),G.code(ze)}):G.func(Q,(0,p._)`${g.default.data}, ${b(be)}`,ge.$async,()=>G.code($(oe,be)).code(ze))}function b(G){return(0,p._)`{${g.default.instancePath}="", ${g.default.parentData}, ${g.default.parentDataProperty}, ${g.default.rootData}=${g.default.data}${G.dynamicRef?(0,p._)`, ${g.default.dynamicAnchors}={}`:p.nil}}={}`}function C(G,Q){G.if(g.default.valCxt,()=>{G.var(g.default.instancePath,(0,p._)`${g.default.valCxt}.${g.default.instancePath}`),G.var(g.default.parentData,(0,p._)`${g.default.valCxt}.${g.default.parentData}`),G.var(g.default.parentDataProperty,(0,p._)`${g.default.valCxt}.${g.default.parentDataProperty}`),G.var(g.default.rootData,(0,p._)`${g.default.valCxt}.${g.default.rootData}`),Q.dynamicRef&&G.var(g.default.dynamicAnchors,(0,p._)`${g.default.valCxt}.${g.default.dynamicAnchors}`)},()=>{G.var(g.default.instancePath,(0,p._)`""`),G.var(g.default.parentData,(0,p._)`undefined`),G.var(g.default.parentDataProperty,(0,p._)`undefined`),G.var(g.default.rootData,g.default.data),Q.dynamicRef&&G.var(g.default.dynamicAnchors,(0,p._)`{}`)})}function z(G){const{schema:Q,opts:oe,gen:ge}=G;k(G,()=>{oe.$comment&&Q.$comment&&re(G),P(G),ge.let(g.default.vErrors,null),ge.let(g.default.errors,0),oe.unevaluated&&N(G),A(G),le(G)})}function N(G){const{gen:Q,validateName:oe}=G;G.evaluated=Q.const("evaluated",(0,p._)`${oe}.evaluated`),Q.if((0,p._)`${G.evaluated}.dynamicProps`,()=>Q.assign((0,p._)`${G.evaluated}.props`,(0,p._)`undefined`)),Q.if((0,p._)`${G.evaluated}.dynamicItems`,()=>Q.assign((0,p._)`${G.evaluated}.items`,(0,p._)`undefined`))}function $(G,Q){const oe=typeof G=="object"&&G[Q.schemaId];return oe&&(Q.code.source||Q.code.process)?(0,p._)`/*# sourceURL=${oe} */`:p.nil}function w(G,Q){if(x(G)&&(T(G),R(G))){_(G,Q);return}(0,e.boolOrEmptySchema)(G,Q)}function R({schema:G,self:Q}){if(typeof G=="boolean")return!G;for(const oe in G)if(Q.RULES.all[oe])return!0;return!1}function x(G){return typeof G.schema!="boolean"}function _(G,Q){const{schema:oe,gen:ge,opts:be}=G;be.$comment&&oe.$comment&&re(G),H(G),J(G);const ze=ge.const("_errs",g.default.errors);A(G,ze),ge.var(Q,(0,p._)`${ze} === ${g.default.errors}`)}function T(G){(0,y.checkUnknownRules)(G),I(G)}function A(G,Q){if(G.opts.jtd)return ce(G,[],!1,Q);const oe=(0,n.getSchemaTypes)(G.schema),ge=(0,n.coerceAndCheckDataType)(G,oe);ce(G,oe,!ge,Q)}function I(G){const{schema:Q,errSchemaPath:oe,opts:ge,self:be}=G;Q.$ref&&ge.ignoreKeywordsWithRef&&(0,y.schemaHasRulesButRef)(Q,be.RULES)&&be.logger.warn(`$ref: keywords ignored in schema at path "${oe}"`)}function P(G){const{schema:Q,opts:oe}=G;Q.default!==void 0&&oe.useDefaults&&oe.strictSchema&&(0,y.checkStrictMode)(G,"default is ignored in the schema root")}function H(G){const Q=G.schema[G.opts.schemaId];Q&&(G.baseId=(0,h.resolveUrl)(G.opts.uriResolver,G.baseId,Q))}function J(G){if(G.schema.$async&&!G.schemaEnv.$async)throw new Error("async schema in sync schema")}function re({gen:G,schemaEnv:Q,schema:oe,errSchemaPath:ge,opts:be}){const ze=oe.$comment;if(be.$comment===!0)G.code((0,p._)`${g.default.self}.logger.log(${ze})`);else if(typeof be.$comment=="function"){const gt=(0,p.str)`${ge}/$comment`,Vt=G.scopeValue("root",{ref:Q.root});G.code((0,p._)`${g.default.self}.opts.$comment(${ze}, ${gt}, ${Vt}.schema)`)}}function le(G){const{gen:Q,schemaEnv:oe,validateName:ge,ValidationError:be,opts:ze}=G;oe.$async?Q.if((0,p._)`${g.default.errors} === 0`,()=>Q.return(g.default.data),()=>Q.throw((0,p._)`new ${be}(${g.default.vErrors})`)):(Q.assign((0,p._)`${ge}.errors`,g.default.vErrors),ze.unevaluated&&$e(G),Q.return((0,p._)`${g.default.errors} === 0`))}function $e({gen:G,evaluated:Q,props:oe,items:ge}){oe instanceof p.Name&&G.assign((0,p._)`${Q}.props`,oe),ge instanceof p.Name&&G.assign((0,p._)`${Q}.items`,ge)}function ce(G,Q,oe,ge){const{gen:be,schema:ze,data:gt,allErrors:Vt,opts:zt,self:Ct}=G,{RULES:mt}=Ct;if(ze.$ref&&(zt.ignoreKeywordsWithRef||!(0,y.schemaHasRulesButRef)(ze,mt))){be.block(()=>he(G,"$ref",mt.all.$ref.definition));return}zt.jtd||fe(G,Q),be.block(()=>{for(const Qt of mt.rules)yn(Qt);yn(mt.post)});function yn(Qt){(0,i.shouldUseGroup)(ze,Qt)&&(Qt.type?(be.if((0,s.checkDataType)(Qt.type,gt,zt.strictNumbers)),me(G,Qt),Q.length===1&&Q[0]===Qt.type&&oe&&(be.else(),(0,s.reportTypeError)(G)),be.endIf()):me(G,Qt),Vt||be.if((0,p._)`${g.default.errors} === ${ge||0}`))}}function me(G,Q){const{gen:oe,schema:ge,opts:{useDefaults:be}}=G;be&&(0,c.assignDefaults)(G,Q.type),oe.block(()=>{for(const ze of Q.rules)(0,i.shouldUseRule)(ge,ze)&&he(G,ze.keyword,ze.definition,Q.type)})}function fe(G,Q){G.schemaEnv.meta||!G.opts.strictTypes||(Ee(G,Q),G.opts.allowUnionTypes||D(G,Q),U(G,G.dataTypes))}function Ee(G,Q){if(Q.length){if(!G.dataTypes.length){G.dataTypes=Q;return}Q.forEach(oe=>{B(G.dataTypes,oe)||V(G,`type "${oe}" not allowed by context "${G.dataTypes.join(",")}"`)}),E(G,Q)}}function D(G,Q){Q.length>1&&!(Q.length===2&&Q.includes("null"))&&V(G,"use allowUnionTypes to allow union type keyword")}function U(G,Q){const oe=G.self.RULES.all;for(const ge in oe){const be=oe[ge];if(typeof be=="object"&&(0,i.shouldUseRule)(G.schema,be)){const{type:ze}=be.definition;ze.length&&!ze.some(gt=>ee(Q,gt))&&V(G,`missing type "${ze.join(",")}" for keyword "${ge}"`)}}}function ee(G,Q){return G.includes(Q)||Q==="number"&&G.includes("integer")}function B(G,Q){return G.includes(Q)||Q==="integer"&&G.includes("number")}function E(G,Q){const oe=[];for(const ge of G.dataTypes)B(Q,ge)?oe.push(ge):Q.includes("integer")&&ge==="number"&&oe.push("integer");G.dataTypes=oe}function V(G,Q){const oe=G.schemaEnv.baseId+G.errSchemaPath;Q+=` at "${oe}" (strictTypes)`,(0,y.checkStrictMode)(G,Q,G.opts.strictTypes)}class W{constructor(Q,oe,ge){if((0,u.validateKeywordUsage)(Q,oe,ge),this.gen=Q.gen,this.allErrors=Q.allErrors,this.keyword=ge,this.data=Q.data,this.schema=Q.schema[ge],this.$data=oe.$data&&Q.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,y.schemaRefOrVal)(Q,this.schema,ge,this.$data),this.schemaType=oe.schemaType,this.parentSchema=Q.schema,this.params={},this.it=Q,this.def=oe,this.$data)this.schemaCode=Q.gen.const("vSchema",xe(this.$data,Q));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,oe.schemaType,oe.allowUndefined))throw new Error(`${ge} value must be ${JSON.stringify(oe.schemaType)}`);("code"in oe?oe.trackErrors:oe.errors!==!1)&&(this.errsCount=Q.gen.const("_errs",g.default.errors))}result(Q,oe,ge){this.failResult((0,p.not)(Q),oe,ge)}failResult(Q,oe,ge){this.gen.if(Q),ge?ge():this.error(),oe?(this.gen.else(),oe(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Q,oe){this.failResult((0,p.not)(Q),void 0,oe)}fail(Q){if(Q===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Q),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Q){if(!this.$data)return this.fail(Q);const{schemaCode:oe}=this;this.fail((0,p._)`${oe} !== undefined && (${(0,p.or)(this.invalid$data(),Q)})`)}error(Q,oe,ge){if(oe){this.setParams(oe),this._error(Q,ge),this.setParams({});return}this._error(Q,ge)}_error(Q,oe){(Q?v.reportExtraError:v.reportError)(this,this.def.error,oe)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(Q){this.allErrors||this.gen.if(Q)}setParams(Q,oe){oe?Object.assign(this.params,Q):this.params=Q}block$data(Q,oe,ge=p.nil){this.gen.block(()=>{this.check$data(Q,ge),oe()})}check$data(Q=p.nil,oe=p.nil){if(!this.$data)return;const{gen:ge,schemaCode:be,schemaType:ze,def:gt}=this;ge.if((0,p.or)((0,p._)`${be} === undefined`,oe)),Q!==p.nil&&ge.assign(Q,!0),(ze.length||gt.validateSchema)&&(ge.elseIf(this.invalid$data()),this.$dataError(),Q!==p.nil&&ge.assign(Q,!1)),ge.else()}invalid$data(){const{gen:Q,schemaCode:oe,schemaType:ge,def:be,it:ze}=this;return(0,p.or)(gt(),Vt());function gt(){if(ge.length){if(!(oe instanceof p.Name))throw new Error("ajv implementation error");const zt=Array.isArray(ge)?ge:[ge];return(0,p._)`${(0,s.checkDataTypes)(zt,oe,ze.opts.strictNumbers,s.DataType.Wrong)}`}return p.nil}function Vt(){if(be.validateSchema){const zt=Q.scopeValue("validate$data",{ref:be.validateSchema});return(0,p._)`!${zt}(${oe})`}return p.nil}}subschema(Q,oe){const ge=(0,d.getSubschema)(this.it,Q);(0,d.extendSubschemaData)(ge,this.it,Q),(0,d.extendSubschemaMode)(ge,Q);const be={...this.it,...ge,items:void 0,props:void 0};return w(be,oe),be}mergeEvaluated(Q,oe){const{it:ge,gen:be}=this;ge.opts.unevaluated&&(ge.props!==!0&&Q.props!==void 0&&(ge.props=y.mergeEvaluated.props(be,Q.props,ge.props,oe)),ge.items!==!0&&Q.items!==void 0&&(ge.items=y.mergeEvaluated.items(be,Q.items,ge.items,oe)))}mergeValidEvaluated(Q,oe){const{it:ge,gen:be}=this;if(ge.opts.unevaluated&&(ge.props!==!0||ge.items!==!0))return be.if(oe,()=>this.mergeEvaluated(Q,p.Name)),!0}}dn.KeywordCxt=W;function he(G,Q,oe,ge){const be=new W(G,oe,Q);"code"in oe?oe.code(be,ge):be.$data&&oe.validate?(0,u.funcKeywordCode)(be,oe):"macro"in oe?(0,u.macroKeywordCode)(be,oe):(oe.compile||oe.validate)&&(0,u.funcKeywordCode)(be,oe)}const pe=/^\/(?:[^~]|~0|~1)*$/,we=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function xe(G,{dataLevel:Q,dataNames:oe,dataPathArr:ge}){let be,ze;if(G==="")return g.default.rootData;if(G[0]==="/"){if(!pe.test(G))throw new Error(`Invalid JSON-pointer: ${G}`);be=G,ze=g.default.rootData}else{const Ct=we.exec(G);if(!Ct)throw new Error(`Invalid JSON-pointer: ${G}`);const mt=+Ct[1];if(be=Ct[2],be==="#"){if(mt>=Q)throw new Error(zt("property/index",mt));return ge[Q-mt]}if(mt>Q)throw new Error(zt("data",mt));if(ze=oe[Q-mt],!be)return ze}let gt=ze;const Vt=be.split("/");for(const Ct of Vt)Ct&&(ze=(0,p._)`${ze}${(0,p.getProperty)((0,y.unescapeJsonPointer)(Ct))}`,gt=(0,p._)`${gt} && ${ze}`);return gt;function zt(Ct,mt){return`Cannot access ${Ct} ${mt} levels up, current level is ${Q}`}}return dn.getData=xe,dn}var Sl={},Ph;function Zf(){if(Ph)return Sl;Ph=1,Object.defineProperty(Sl,"__esModule",{value:!0});class e extends Error{constructor(i){super("validation failed"),this.errors=i,this.ajv=this.validation=!0}}return Sl.default=e,Sl}var wl={},Zh;function Nc(){if(Zh)return wl;Zh=1,Object.defineProperty(wl,"__esModule",{value:!0});const e=wc();class n extends Error{constructor(s,c,u,d){super(d||`can't resolve reference ${u} from id ${c}`),this.missingRef=(0,e.resolveUrl)(s,c,u),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}return wl.default=n,wl}var ma={},Gh;function Gf(){if(Gh)return ma;Gh=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.resolveSchema=ma.getCompilingSchema=ma.resolveRef=ma.compileSchema=ma.SchemaEnv=void 0;const e=De(),n=Zf(),i=mr(),s=wc(),c=qe(),u=kc();class d{constructor(N){var $;this.refs={},this.dynamicAnchors={};let w;typeof N.schema=="object"&&(w=N.schema),this.schema=N.schema,this.schemaId=N.schemaId,this.root=N.root||this,this.baseId=($=N.baseId)!==null&&$!==void 0?$:(0,s.normalizeId)(w==null?void 0:w[N.schemaId||"$id"]),this.schemaPath=N.schemaPath,this.localRefs=N.localRefs,this.meta=N.meta,this.$async=w==null?void 0:w.$async,this.refs={}}}ma.SchemaEnv=d;function p(z){const N=y.call(this,z);if(N)return N;const $=(0,s.getFullPath)(this.opts.uriResolver,z.root.baseId),{es5:w,lines:R}=this.opts.code,{ownProperties:x}=this.opts,_=new e.CodeGen(this.scope,{es5:w,lines:R,ownProperties:x});let T;z.$async&&(T=_.scopeValue("Error",{ref:n.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const A=_.scopeName("validate");z.validateName=A;const I={gen:_,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:z.schema,code:(0,e.stringify)(z.schema)}:{ref:z.schema}),validateName:A,ValidationError:T,schema:z.schema,schemaEnv:z,rootId:$,baseId:z.baseId||$,schemaPath:e.nil,errSchemaPath:z.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let P;try{this._compilations.add(z),(0,u.validateFunctionCode)(I),_.optimize(this.opts.code.optimize);const H=_.toString();P=`${_.scopeRefs(i.default.scope)}return ${H}`,this.opts.code.process&&(P=this.opts.code.process(P,z));const re=new Function(`${i.default.self}`,`${i.default.scope}`,P)(this,this.scope.get());if(this.scope.value(A,{ref:re}),re.errors=null,re.schema=z.schema,re.schemaEnv=z,z.$async&&(re.$async=!0),this.opts.code.source===!0&&(re.source={validateName:A,validateCode:H,scopeValues:_._values}),this.opts.unevaluated){const{props:le,items:$e}=I;re.evaluated={props:le instanceof e.Name?void 0:le,items:$e instanceof e.Name?void 0:$e,dynamicProps:le instanceof e.Name,dynamicItems:$e instanceof e.Name},re.source&&(re.source.evaluated=(0,e.stringify)(re.evaluated))}return z.validate=re,z}catch(H){throw delete z.validate,delete z.validateName,P&&this.logger.error("Error compiling schema, function code:",P),H}finally{this._compilations.delete(z)}}ma.compileSchema=p;function g(z,N,$){var w;$=(0,s.resolveUrl)(this.opts.uriResolver,N,$);const R=z.refs[$];if(R)return R;let x=j.call(this,z,$);if(x===void 0){const _=(w=z.localRefs)===null||w===void 0?void 0:w[$],{schemaId:T}=this.opts;_&&(x=new d({schema:_,schemaId:T,root:z,baseId:N}))}if(x!==void 0)return z.refs[$]=h.call(this,x)}ma.resolveRef=g;function h(z){return(0,s.inlineRef)(z.schema,this.opts.inlineRefs)?z.schema:z.validate?z:p.call(this,z)}function y(z){for(const N of this._compilations)if(v(N,z))return N}ma.getCompilingSchema=y;function v(z,N){return z.schema===N.schema&&z.root===N.root&&z.baseId===N.baseId}function j(z,N){let $;for(;typeof($=this.refs[N])=="string";)N=$;return $||this.schemas[N]||k.call(this,z,N)}function k(z,N){const $=this.opts.uriResolver.parse(N),w=(0,s._getFullPath)(this.opts.uriResolver,$);let R=(0,s.getFullPath)(this.opts.uriResolver,z.baseId,void 0);if(Object.keys(z.schema).length>0&&w===R)return C.call(this,$,z);const x=(0,s.normalizeId)(w),_=this.refs[x]||this.schemas[x];if(typeof _=="string"){const T=k.call(this,z,_);return typeof(T==null?void 0:T.schema)!="object"?void 0:C.call(this,$,T)}if(typeof(_==null?void 0:_.schema)=="object"){if(_.validate||p.call(this,_),x===(0,s.normalizeId)(N)){const{schema:T}=_,{schemaId:A}=this.opts,I=T[A];return I&&(R=(0,s.resolveUrl)(this.opts.uriResolver,R,I)),new d({schema:T,schemaId:A,root:z,baseId:R})}return C.call(this,$,_)}}ma.resolveSchema=k;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function C(z,{baseId:N,schema:$,root:w}){var R;if(((R=z.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const T of z.fragment.slice(1).split("/")){if(typeof $=="boolean")return;const A=$[(0,c.unescapeFragment)(T)];if(A===void 0)return;$=A;const I=typeof $=="object"&&$[this.opts.schemaId];!b.has(T)&&I&&(N=(0,s.resolveUrl)(this.opts.uriResolver,N,I))}let x;if(typeof $!="boolean"&&$.$ref&&!(0,c.schemaHasRulesButRef)($,this.RULES)){const T=(0,s.resolveUrl)(this.opts.uriResolver,N,$.$ref);x=k.call(this,w,T)}const{schemaId:_}=this.opts;if(x=x||new d({schema:$,schemaId:_,root:w,baseId:N}),x.schema!==x.root.schema)return x}return ma}const g3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",m3="Meta-schema for $data reference (JSON AnySchema extension proposal)",h3="object",y3=["$data"],v3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},$3=!1,b3={$id:g3,description:m3,type:h3,required:y3,properties:v3,additionalProperties:$3};var kl={},Go={exports:{}},of,Fh;function $1(){if(Fh)return of;Fh=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),c=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function u(x){let _="",T=0,A=0;for(A=0;A<x.length;A++)if(T=x[A].charCodeAt(0),T!==48){if(!(T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102))return"";_+=x[A];break}for(A+=1;A<x.length;A++){if(T=x[A].charCodeAt(0),!(T>=48&&T<=57||T>=65&&T<=70||T>=97&&T<=102))return"";_+=x[A]}return _}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function p(x){return x.length=0,!0}function g(x,_,T){if(x.length){const A=u(x);if(A!=="")_.push(A);else return T.error=!0,!1;x.length=0}return!0}function h(x){let _=0;const T={error:!1,address:"",zone:""},A=[],I=[];let P=!1,H=!1,J=g;for(let re=0;re<x.length;re++){const le=x[re];if(!(le==="["||le==="]"))if(le===":"){if(P===!0&&(H=!0),!J(I,A,T))break;if(++_>7){T.error=!0;break}re>0&&x[re-1]===":"&&(P=!0),A.push(":");continue}else if(le==="%"){if(!J(I,A,T))break;J=p}else{I.push(le);continue}}return I.length&&(J===p?T.zone=I.join(""):H?A.push(I.join("")):A.push(u(I))),T.address=A.join(""),T}function y(x){if(v(x,":")<2)return{host:x,isIPV6:!1};const _=h(x);if(_.error)return{host:x,isIPV6:!1};{let T=_.address,A=_.address;return _.zone&&(T+="%"+_.zone,A+="%25"+_.zone),{host:T,isIPV6:!0,escapedHost:A}}}function v(x,_){let T=0;for(let A=0;A<x.length;A++)x[A]===_&&T++;return T}function j(x){let _=x;const T=[];let A=-1,I=0;for(;I=_.length;){if(I===1){if(_===".")break;if(_==="/"){T.push("/");break}else{T.push(_);break}}else if(I===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){T.push("/");break}}else if(I===3&&_==="/.."){T.length!==0&&T.pop(),T.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),T.length!==0&&T.pop();continue}}if((A=_.indexOf("/",1))===-1){T.push(_);break}else T.push(_.slice(0,A)),_=_.slice(A)}return T.join("")}const k={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},b=/[@/?#:]/g,C=/[@/?#]/g;function z(x,_){const T=_?C:b;return T.lastIndex=0,x.replace(T,A=>k[A])}function N(x,_=!1){if(x.indexOf("%")===-1)return x;let T="";for(let A=0;A<x.length;A++){if(x[A]==="%"&&A+2<x.length){const I=x.slice(A+1,A+3);if(i(I)){const P=I.toUpperCase(),H=String.fromCharCode(parseInt(P,16));_&&s(H)?T+=H:T+="%"+P,A+=2;continue}}T+=x[A]}return T}function $(x){let _="";for(let T=0;T<x.length;T++){if(x[T]==="%"&&T+2<x.length){const A=x.slice(T+1,T+3);if(i(A)){const I=A.toUpperCase(),P=String.fromCharCode(parseInt(I,16));P!=="."&&s(P)?_+=P:_+="%"+I,T+=2;continue}}c(x[T])?_+=x[T]:_+=escape(x[T])}return _}function w(x){let _="";for(let T=0;T<x.length;T++){if(x[T]==="%"&&T+2<x.length){const A=x.slice(T+1,T+3);if(i(A)){_+="%"+A.toUpperCase(),T+=2;continue}}_+=escape(x[T])}return _}function R(x){const _=[];if(x.userinfo!==void 0&&(_.push(x.userinfo),_.push("@")),x.host!==void 0){let T=unescape(x.host);if(!n(T)){const A=y(T);A.isIPV6===!0?T=`[${A.escapedHost}]`:T=z(T,!1)}_.push(T)}return(typeof x.port=="number"||typeof x.port=="string")&&(_.push(":"),_.push(String(x.port))),_.length?_.join(""):void 0}return of={nonSimpleDomain:d,recomposeAuthority:R,reescapeHostDelimiters:z,normalizePercentEncoding:N,normalizePathEncoding:$,escapePreservingEscapes:w,removeDotSegments:j,isIPv4:n,isUUID:e,normalizeIPv6:y,stringArrayToHexStripped:u},of}var sf,Yh;function x3(){if(Yh)return sf;Yh=1;const{isUUID:e}=$1(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=["http","https","ws","wss","urn","urn:uuid"];function s(x){return i.indexOf(x)!==-1}function c(x){return x.secure===!0?!0:x.secure===!1?!1:x.scheme?x.scheme.length===3&&(x.scheme[0]==="w"||x.scheme[0]==="W")&&(x.scheme[1]==="s"||x.scheme[1]==="S")&&(x.scheme[2]==="s"||x.scheme[2]==="S"):!1}function u(x){return x.host||(x.error=x.error||"HTTP URIs must have a host."),x}function d(x){const _=String(x.scheme).toLowerCase()==="https";return(x.port===(_?443:80)||x.port==="")&&(x.port=void 0),x.path||(x.path="/"),x}function p(x){return x.secure=c(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x}function g(x){if((x.port===(c(x)?443:80)||x.port==="")&&(x.port=void 0),typeof x.secure=="boolean"&&(x.scheme=x.secure?"wss":"ws",x.secure=void 0),x.resourceName){const[_,T]=x.resourceName.split("?");x.path=_&&_!=="/"?_:void 0,x.query=T,x.resourceName=void 0}return x.fragment=void 0,x}function h(x,_){if(!x.path)return x.error="URN can not be parsed",x;const T=x.path.match(n);if(T){const A=_.scheme||x.scheme||"urn";x.nid=T[1].toLowerCase(),x.nss=T[2];const I=`${A}:${_.nid||x.nid}`,P=R(I);x.path=void 0,P&&(x=P.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x}function y(x,_){if(x.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=_.scheme||x.scheme||"urn",A=x.nid.toLowerCase(),I=`${T}:${_.nid||A}`,P=R(I);P&&(x=P.serialize(x,_));const H=x,J=x.nss;return H.path=`${A||_.nid}:${J}`,_.skipEscape=!0,H}function v(x,_){const T=x;return T.uuid=T.nss,T.nss=void 0,!_.tolerant&&(!T.uuid||!e(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function j(x){const _=x;return _.nss=(x.uuid||"").toLowerCase(),_}const k={scheme:"http",domainHost:!0,parse:u,serialize:d},b={scheme:"https",domainHost:k.domainHost,parse:u,serialize:d},C={scheme:"ws",domainHost:!0,parse:p,serialize:g},z={scheme:"wss",domainHost:C.domainHost,parse:C.parse,serialize:C.serialize},w={http:k,https:b,ws:C,wss:z,urn:{scheme:"urn",parse:h,serialize:y,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:v,serialize:j,skipNormalize:!0}};Object.setPrototypeOf(w,null);function R(x){return x&&(w[x]||w[x.toLowerCase()])||void 0}return sf={wsIsSecure:c,SCHEMES:w,isValidSchemeName:s,getSchemeHandler:R},sf}var Kh;function j3(){if(Kh)return Go.exports;Kh=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:i,normalizePercentEncoding:s,normalizePathEncoding:c,escapePreservingEscapes:u,reescapeHostDelimiters:d,isIPv4:p,nonSimpleDomain:g}=$1(),{SCHEMES:h,getSchemeHandler:y}=x3();function v(A,I){return typeof A=="string"?A=R(A,I):typeof A=="object"&&(A=w(C(A,I),I)),A}function j(A,I,P){const H=P?Object.assign({scheme:"null"},P):{scheme:"null"},J=k(w(A,H),w(I,H),H,!0);return H.skipEscape=!0,C(J,H)}function k(A,I,P,H){const J={};return H||(A=w(C(A,P),P),I=w(C(I,P),P)),P=P||{},!P.tolerant&&I.scheme?(J.scheme=I.scheme,J.userinfo=I.userinfo,J.host=I.host,J.port=I.port,J.path=n(I.path||""),J.query=I.query):(I.userinfo!==void 0||I.host!==void 0||I.port!==void 0?(J.userinfo=I.userinfo,J.host=I.host,J.port=I.port,J.path=n(I.path||""),J.query=I.query):(I.path?(I.path[0]==="/"?J.path=n(I.path):((A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)&&!A.path?J.path="/"+I.path:A.path?J.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+I.path:J.path=I.path,J.path=n(J.path)),J.query=I.query):(J.path=A.path,I.query!==void 0?J.query=I.query:J.query=A.query),J.userinfo=A.userinfo,J.host=A.host,J.port=A.port),J.scheme=A.scheme),J.fragment=I.fragment,J}function b(A,I,P){const H=_(A,P),J=_(I,P);return H!==void 0&&J!==void 0&&H.toLowerCase()===J.toLowerCase()}function C(A,I){const P={host:A.host,scheme:A.scheme,userinfo:A.userinfo,port:A.port,path:A.path,query:A.query,nid:A.nid,nss:A.nss,uuid:A.uuid,fragment:A.fragment,reference:A.reference,resourceName:A.resourceName,secure:A.secure,error:""},H=Object.assign({},I),J=[],re=y(H.scheme||P.scheme);re&&re.serialize&&re.serialize(P,H),P.path!==void 0&&(H.skipEscape?P.path=s(P.path):(P.path=u(P.path),P.scheme!==void 0&&(P.path=P.path.split("%3A").join(":")))),H.reference!=="suffix"&&P.scheme&&J.push(P.scheme,":");const le=i(P);if(le!==void 0&&(H.reference!=="suffix"&&J.push("//"),J.push(le),P.path&&P.path[0]!=="/"&&J.push("/")),P.path!==void 0){let $e=P.path;!H.absolutePath&&(!re||!re.absolutePath)&&($e=n($e)),le===void 0&&$e[0]==="/"&&$e[1]==="/"&&($e="/%2F"+$e.slice(2)),J.push($e)}return P.query!==void 0&&J.push("?",P.query),P.fragment!==void 0&&J.push("#",P.fragment),J.join("")}const z=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function N(A,I){if(I[2]!==void 0&&A.path&&A.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof A.port=="number"&&(A.port<0||A.port>65535))return"URI port is malformed."}function $(A,I){const P=Object.assign({},I),H={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let J=!1,re=!1;P.reference==="suffix"&&(P.scheme?A=P.scheme+":"+A:A="//"+A);const le=A.match(z);if(le){H.scheme=le[1],H.userinfo=le[3],H.host=le[4],H.port=parseInt(le[5],10),H.path=le[6]||"",H.query=le[7],H.fragment=le[8],isNaN(H.port)&&(H.port=le[5]);const $e=N(H,le);if($e!==void 0&&(H.error=H.error||$e,J=!0),H.host)if(p(H.host)===!1){const fe=e(H.host);H.host=fe.host.toLowerCase(),re=fe.isIPV6}else re=!0;H.scheme===void 0&&H.userinfo===void 0&&H.host===void 0&&H.port===void 0&&H.query===void 0&&!H.path?H.reference="same-document":H.scheme===void 0?H.reference="relative":H.fragment===void 0?H.reference="absolute":H.reference="uri",P.reference&&P.reference!=="suffix"&&P.reference!==H.reference&&(H.error=H.error||"URI is not a "+P.reference+" reference.");const ce=y(P.scheme||H.scheme);if(!P.unicodeSupport&&(!ce||!ce.unicodeSupport)&&H.host&&(P.domainHost||ce&&ce.domainHost)&&re===!1&&g(H.host))try{H.host=URL.domainToASCII(H.host.toLowerCase())}catch(me){H.error=H.error||"Host's domain name can not be converted to ASCII: "+me}if((!ce||ce&&!ce.skipNormalize)&&(A.indexOf("%")!==-1&&(H.scheme!==void 0&&(H.scheme=unescape(H.scheme)),H.host!==void 0&&(H.host=d(unescape(H.host),re))),H.path&&(H.path=c(H.path)),H.fragment))try{H.fragment=encodeURI(decodeURIComponent(H.fragment))}catch{H.error=H.error||"URI malformed"}ce&&ce.parse&&ce.parse(H,P)}else H.error=H.error||"URI can not be parsed.";return{parsed:H,malformedAuthorityOrPort:J}}function w(A,I){return $(A,I).parsed}function R(A,I){return x(A,I).normalized}function x(A,I){const{parsed:P,malformedAuthorityOrPort:H}=$(A,I);return{normalized:H?A:C(P,I),malformedAuthorityOrPort:H}}function _(A,I){if(typeof A=="string"){const{normalized:P,malformedAuthorityOrPort:H}=x(A,I);return H?void 0:P}if(typeof A=="object")return C(A,I)}const T={SCHEMES:h,normalize:v,resolve:j,resolveComponent:k,equal:b,serialize:C,parse:w};return Go.exports=T,Go.exports.default=T,Go.exports.fastUri=T,Go.exports}var Wh;function _3(){if(Wh)return kl;Wh=1,Object.defineProperty(kl,"__esModule",{value:!0});const e=j3();return e.code='require("ajv/dist/runtime/uri").default',kl.default=e,kl}var Xh;function S3(){return Xh||(Xh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var n=kc();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=De();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const s=Zf(),c=Nc(),u=h1(),d=Gf(),p=De(),g=wc(),h=mc(),y=qe(),v=b3,j=_3(),k=(D,U)=>new RegExp(D,U);k.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],C=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),z={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},N={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},$=200;function w(D){var U,ee,B,E,V,W,he,pe,we,xe,G,Q,oe,ge,be,ze,gt,Vt,zt,Ct,mt,yn,Qt,ea,Zi;const vn=D.strict,Gr=(U=D.code)===null||U===void 0?void 0:U.optimize,hr=Gr===!0||Gr===void 0?1:Gr||0,is=(B=(ee=D.code)===null||ee===void 0?void 0:ee.regExp)!==null&&B!==void 0?B:k,os=(E=D.uriResolver)!==null&&E!==void 0?E:j.default;return{strictSchema:(W=(V=D.strictSchema)!==null&&V!==void 0?V:vn)!==null&&W!==void 0?W:!0,strictNumbers:(pe=(he=D.strictNumbers)!==null&&he!==void 0?he:vn)!==null&&pe!==void 0?pe:!0,strictTypes:(xe=(we=D.strictTypes)!==null&&we!==void 0?we:vn)!==null&&xe!==void 0?xe:"log",strictTuples:(Q=(G=D.strictTuples)!==null&&G!==void 0?G:vn)!==null&&Q!==void 0?Q:"log",strictRequired:(ge=(oe=D.strictRequired)!==null&&oe!==void 0?oe:vn)!==null&&ge!==void 0?ge:!1,code:D.code?{...D.code,optimize:hr,regExp:is}:{optimize:hr,regExp:is},loopRequired:(be=D.loopRequired)!==null&&be!==void 0?be:$,loopEnum:(ze=D.loopEnum)!==null&&ze!==void 0?ze:$,meta:(gt=D.meta)!==null&>!==void 0?gt:!0,messages:(Vt=D.messages)!==null&&Vt!==void 0?Vt:!0,inlineRefs:(zt=D.inlineRefs)!==null&&zt!==void 0?zt:!0,schemaId:(Ct=D.schemaId)!==null&&Ct!==void 0?Ct:"$id",addUsedSchema:(mt=D.addUsedSchema)!==null&&mt!==void 0?mt:!0,validateSchema:(yn=D.validateSchema)!==null&&yn!==void 0?yn:!0,validateFormats:(Qt=D.validateFormats)!==null&&Qt!==void 0?Qt:!0,unicodeRegExp:(ea=D.unicodeRegExp)!==null&&ea!==void 0?ea:!0,int32range:(Zi=D.int32range)!==null&&Zi!==void 0?Zi:!0,uriResolver:os}}class R{constructor(U={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,U=this.opts={...U,...w(U)};const{es5:ee,lines:B}=this.opts.code;this.scope=new p.ValueScope({scope:{},prefixes:C,es5:ee,lines:B}),this.logger=J(U.logger);const E=U.validateFormats;U.validateFormats=!1,this.RULES=(0,u.getRules)(),x.call(this,z,U,"NOT SUPPORTED"),x.call(this,N,U,"DEPRECATED","warn"),this._metaOpts=P.call(this),U.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),U.keywords&&I.call(this,U.keywords),typeof U.meta=="object"&&this.addMetaSchema(U.meta),T.call(this),U.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:U,meta:ee,schemaId:B}=this.opts;let E=v;B==="id"&&(E={...v},E.id=E.$id,delete E.$id),ee&&U&&this.addMetaSchema(E,E[B],!1)}defaultMeta(){const{meta:U,schemaId:ee}=this.opts;return this.opts.defaultMeta=typeof U=="object"?U[ee]||U:void 0}validate(U,ee){let B;if(typeof U=="string"){if(B=this.getSchema(U),!B)throw new Error(`no schema with key or ref "${U}"`)}else B=this.compile(U);const E=B(ee);return"$async"in B||(this.errors=B.errors),E}compile(U,ee){const B=this._addSchema(U,ee);return B.validate||this._compileSchemaEnv(B)}compileAsync(U,ee){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return E.call(this,U,ee);async function E(xe,G){await V.call(this,xe.$schema);const Q=this._addSchema(xe,G);return Q.validate||W.call(this,Q)}async function V(xe){xe&&!this.getSchema(xe)&&await E.call(this,{$ref:xe},!0)}async function W(xe){try{return this._compileSchemaEnv(xe)}catch(G){if(!(G instanceof c.default))throw G;return he.call(this,G),await pe.call(this,G.missingSchema),W.call(this,xe)}}function he({missingSchema:xe,missingRef:G}){if(this.refs[xe])throw new Error(`AnySchema ${xe} is loaded but ${G} cannot be resolved`)}async function pe(xe){const G=await we.call(this,xe);this.refs[xe]||await V.call(this,G.$schema),this.refs[xe]||this.addSchema(G,xe,ee)}async function we(xe){const G=this._loading[xe];if(G)return G;try{return await(this._loading[xe]=B(xe))}finally{delete this._loading[xe]}}}addSchema(U,ee,B,E=this.opts.validateSchema){if(Array.isArray(U)){for(const W of U)this.addSchema(W,void 0,B,E);return this}let V;if(typeof U=="object"){const{schemaId:W}=this.opts;if(V=U[W],V!==void 0&&typeof V!="string")throw new Error(`schema ${W} must be string`)}return ee=(0,g.normalizeId)(ee||V),this._checkUnique(ee),this.schemas[ee]=this._addSchema(U,B,ee,E,!0),this}addMetaSchema(U,ee,B=this.opts.validateSchema){return this.addSchema(U,ee,!0,B),this}validateSchema(U,ee){if(typeof U=="boolean")return!0;let B;if(B=U.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(B,U);if(!E&&ee){const V="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(V);else throw new Error(V)}return E}getSchema(U){let ee;for(;typeof(ee=_.call(this,U))=="string";)U=ee;if(ee===void 0){const{schemaId:B}=this.opts,E=new d.SchemaEnv({schema:{},schemaId:B});if(ee=d.resolveSchema.call(this,E,U),!ee)return;this.refs[U]=ee}return ee.validate||this._compileSchemaEnv(ee)}removeSchema(U){if(U instanceof RegExp)return this._removeAllSchemas(this.schemas,U),this._removeAllSchemas(this.refs,U),this;switch(typeof U){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ee=_.call(this,U);return typeof ee=="object"&&this._cache.delete(ee.schema),delete this.schemas[U],delete this.refs[U],this}case"object":{const ee=U;this._cache.delete(ee);let B=U[this.opts.schemaId];return B&&(B=(0,g.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(U){for(const ee of U)this.addKeyword(ee);return this}addKeyword(U,ee){let B;if(typeof U=="string")B=U,typeof ee=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ee.keyword=B);else if(typeof U=="object"&&ee===void 0){if(ee=U,B=ee.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(le.call(this,B,ee),!ee)return(0,y.eachItem)(B,V=>$e.call(this,V)),this;me.call(this,ee);const E={...ee,type:(0,h.getJSONTypes)(ee.type),schemaType:(0,h.getJSONTypes)(ee.schemaType)};return(0,y.eachItem)(B,E.type.length===0?V=>$e.call(this,V,E):V=>E.type.forEach(W=>$e.call(this,V,E,W))),this}getKeyword(U){const ee=this.RULES.all[U];return typeof ee=="object"?ee.definition:!!ee}removeKeyword(U){const{RULES:ee}=this;delete ee.keywords[U],delete ee.all[U];for(const B of ee.rules){const E=B.rules.findIndex(V=>V.keyword===U);E>=0&&B.rules.splice(E,1)}return this}addFormat(U,ee){return typeof ee=="string"&&(ee=new RegExp(ee)),this.formats[U]=ee,this}errorsText(U=this.errors,{separator:ee=", ",dataVar:B="data"}={}){return!U||U.length===0?"No errors":U.map(E=>`${B}${E.instancePath} ${E.message}`).reduce((E,V)=>E+ee+V)}$dataMetaSchema(U,ee){const B=this.RULES.all;U=JSON.parse(JSON.stringify(U));for(const E of ee){const V=E.split("/").slice(1);let W=U;for(const he of V)W=W[he];for(const he in B){const pe=B[he];if(typeof pe!="object")continue;const{$data:we}=pe.definition,xe=W[he];we&&xe&&(W[he]=Ee(xe))}}return U}_removeAllSchemas(U,ee){for(const B in U){const E=U[B];(!ee||ee.test(B))&&(typeof E=="string"?delete U[B]:E&&!E.meta&&(this._cache.delete(E.schema),delete U[B]))}}_addSchema(U,ee,B,E=this.opts.validateSchema,V=this.opts.addUsedSchema){let W;const{schemaId:he}=this.opts;if(typeof U=="object")W=U[he];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof U!="boolean")throw new Error("schema must be object or boolean")}let pe=this._cache.get(U);if(pe!==void 0)return pe;B=(0,g.normalizeId)(W||B);const we=g.getSchemaRefs.call(this,U,B);return pe=new d.SchemaEnv({schema:U,schemaId:he,meta:ee,baseId:B,localRefs:we}),this._cache.set(pe.schema,pe),V&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=pe),E&&this.validateSchema(U,!0),pe}_checkUnique(U){if(this.schemas[U]||this.refs[U])throw new Error(`schema with key or id "${U}" already exists`)}_compileSchemaEnv(U){if(U.meta?this._compileMetaSchema(U):d.compileSchema.call(this,U),!U.validate)throw new Error("ajv implementation error");return U.validate}_compileMetaSchema(U){const ee=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,U)}finally{this.opts=ee}}}R.ValidationError=s.default,R.MissingRefError=c.default,e.default=R;function x(D,U,ee,B="error"){for(const E in D){const V=E;V in U&&this.logger[B](`${ee}: option ${E}. ${D[V]}`)}}function _(D){return D=(0,g.normalizeId)(D),this.schemas[D]||this.refs[D]}function T(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const U in D)this.addSchema(D[U],U)}function A(){for(const D in this.opts.formats){const U=this.opts.formats[D];U&&this.addFormat(D,U)}}function I(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const U in D){const ee=D[U];ee.keyword||(ee.keyword=U),this.addKeyword(ee)}}function P(){const D={...this.opts};for(const U of b)delete D[U];return D}const H={log(){},warn(){},error(){}};function J(D){if(D===!1)return H;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const re=/^[a-z_$][a-z0-9_$:-]*$/i;function le(D,U){const{RULES:ee}=this;if((0,y.eachItem)(D,B=>{if(ee.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!re.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!U&&U.$data&&!("code"in U||"validate"in U))throw new Error('$data keyword must have "code" or "validate" function')}function $e(D,U,ee){var B;const E=U==null?void 0:U.post;if(ee&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:V}=this;let W=E?V.post:V.rules.find(({type:pe})=>pe===ee);if(W||(W={type:ee,rules:[]},V.rules.push(W)),V.keywords[D]=!0,!U)return;const he={keyword:D,definition:{...U,type:(0,h.getJSONTypes)(U.type),schemaType:(0,h.getJSONTypes)(U.schemaType)}};U.before?ce.call(this,W,he,U.before):W.rules.push(he),V.all[D]=he,(B=U.implements)===null||B===void 0||B.forEach(pe=>this.addKeyword(pe))}function ce(D,U,ee){const B=D.rules.findIndex(E=>E.keyword===ee);B>=0?D.rules.splice(B,0,U):(D.rules.push(U),this.logger.warn(`rule ${ee} is not defined`))}function me(D){let{metaSchema:U}=D;U!==void 0&&(D.$data&&this.opts.$data&&(U=Ee(U)),D.validateSchema=this.compile(U,!0))}const fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ee(D){return{anyOf:[D,fe]}}})(Jd)),Jd}var Nl={},zl={},Cl={},Jh;function w3(){if(Jh)return Cl;Jh=1,Object.defineProperty(Cl,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cl.default=e,Cl}var qn={},Qh;function k3(){if(Qh)return qn;Qh=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.callRef=qn.getValidate=void 0;const e=Nc(),n=Da(),i=De(),s=mr(),c=Gf(),u=qe(),d={keyword:"$ref",schemaType:"string",code(h){const{gen:y,schema:v,it:j}=h,{baseId:k,schemaEnv:b,validateName:C,opts:z,self:N}=j,{root:$}=b;if((v==="#"||v==="#/")&&k===$.baseId)return R();const w=c.resolveRef.call(N,$,k,v);if(w===void 0)throw new e.default(j.opts.uriResolver,k,v);if(w instanceof c.SchemaEnv)return x(w);return _(w);function R(){if(b===$)return g(h,C,b,b.$async);const T=y.scopeValue("root",{ref:$});return g(h,(0,i._)`${T}.validate`,$,$.$async)}function x(T){const A=p(h,T);g(h,A,T,T.$async)}function _(T){const A=y.scopeValue("schema",z.code.source===!0?{ref:T,code:(0,i.stringify)(T)}:{ref:T}),I=y.name("valid"),P=h.subschema({schema:T,dataTypes:[],schemaPath:i.nil,topSchemaRef:A,errSchemaPath:v},I);h.mergeEvaluated(P),h.ok(I)}}};function p(h,y){const{gen:v}=h;return y.validate?v.scopeValue("validate",{ref:y.validate}):(0,i._)`${v.scopeValue("wrapper",{ref:y})}.validate`}qn.getValidate=p;function g(h,y,v,j){const{gen:k,it:b}=h,{allErrors:C,schemaEnv:z,opts:N}=b,$=N.passContext?s.default.this:i.nil;j?w():R();function w(){if(!z.$async)throw new Error("async schema referenced by sync schema");const T=k.let("valid");k.try(()=>{k.code((0,i._)`await ${(0,n.callValidateCode)(h,y,$)}`),_(y),C||k.assign(T,!0)},A=>{k.if((0,i._)`!(${A} instanceof ${b.ValidationError})`,()=>k.throw(A)),x(A),C||k.assign(T,!1)}),h.ok(T)}function R(){h.result((0,n.callValidateCode)(h,y,$),()=>_(y),()=>x(y))}function x(T){const A=(0,i._)`${T}.errors`;k.assign(s.default.vErrors,(0,i._)`${s.default.vErrors} === null ? ${A} : ${s.default.vErrors}.concat(${A})`),k.assign(s.default.errors,(0,i._)`${s.default.vErrors}.length`)}function _(T){var A;if(!b.opts.unevaluated)return;const I=(A=v==null?void 0:v.validate)===null||A===void 0?void 0:A.evaluated;if(b.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(b.props=u.mergeEvaluated.props(k,I.props,b.props));else{const P=k.var("props",(0,i._)`${T}.evaluated.props`);b.props=u.mergeEvaluated.props(k,P,b.props,i.Name)}if(b.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(b.items=u.mergeEvaluated.items(k,I.items,b.items));else{const P=k.var("items",(0,i._)`${T}.evaluated.items`);b.items=u.mergeEvaluated.items(k,P,b.items,i.Name)}}}return qn.callRef=g,qn.default=d,qn}var ey;function N3(){if(ey)return zl;ey=1,Object.defineProperty(zl,"__esModule",{value:!0});const e=w3(),n=k3(),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return zl.default=i,zl}var El={},Tl={},ty;function z3(){if(ty)return Tl;ty=1,Object.defineProperty(Tl,"__esModule",{value:!0});const e=De(),n=e.operators,i={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:u,schemaCode:d})=>(0,e.str)`must be ${i[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,e._)`{comparison: ${i[u].okStr}, limit: ${d}}`},c={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:s,code(u){const{keyword:d,data:p,schemaCode:g}=u;u.fail$data((0,e._)`${p} ${i[d].fail} ${g} || isNaN(${p})`)}};return Tl.default=c,Tl}var Ml={},ay;function C3(){if(ay)return Ml;ay=1,Object.defineProperty(Ml,"__esModule",{value:!0});const e=De(),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},code(s){const{gen:c,data:u,schemaCode:d,it:p}=s,g=p.opts.multipleOfPrecision,h=c.let("res"),y=g?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${g}`:(0,e._)`${h} !== parseInt(${h})`;s.fail$data((0,e._)`(${d} === 0 || (${h} = ${u}/${d}, ${y}))`)}};return Ml.default=i,Ml}var Rl={},Ol={},ny;function b1(){if(ny)return Ol;ny=1,Object.defineProperty(Ol,"__esModule",{value:!0});function e(n){const i=n.length;let s=0,c=0,u;for(;c<i;)s++,u=n.charCodeAt(c++),u>=55296&&u<=56319&&c<i&&(u=n.charCodeAt(c),(u&64512)===56320&&c++);return s}return Ol.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ol}var ry;function E3(){if(ry)return Rl;ry=1,Object.defineProperty(Rl,"__esModule",{value:!0});const e=De(),n=qe(),i=b1(),c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:u,schemaCode:d}){const p=u==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${p} than ${d} characters`},params:({schemaCode:u})=>(0,e._)`{limit: ${u}}`},code(u){const{keyword:d,data:p,schemaCode:g,it:h}=u,y=d==="maxLength"?e.operators.GT:e.operators.LT,v=h.opts.unicode===!1?(0,e._)`${p}.length`:(0,e._)`${(0,n.useFunc)(u.gen,i.default)}(${p})`;u.fail$data((0,e._)`${v} ${y} ${g}`)}};return Rl.default=c,Rl}var Al={},iy;function T3(){if(iy)return Al;iy=1,Object.defineProperty(Al,"__esModule",{value:!0});const e=Da(),n=qe(),i=De(),c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:u})=>(0,i.str)`must match pattern "${u}"`,params:({schemaCode:u})=>(0,i._)`{pattern: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u,j=v.opts.unicodeRegExp?"u":"";if(g){const{regExp:k}=v.opts.code,b=k.code==="new RegExp"?(0,i._)`new RegExp`:(0,n.useFunc)(d,k),C=d.let("valid");d.try(()=>d.assign(C,(0,i._)`${b}(${y}, ${j}).test(${p})`),()=>d.assign(C,!1)),u.fail$data((0,i._)`!${C}`)}else{const k=(0,e.usePattern)(u,h);u.fail$data((0,i._)`!${k}.test(${p})`)}}};return Al.default=c,Al}var Dl={},oy;function M3(){if(oy)return Dl;oy=1,Object.defineProperty(Dl,"__esModule",{value:!0});const e=De(),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:c}){const u=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:c,data:u,schemaCode:d}=s,p=c==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${u}).length ${p} ${d}`)}};return Dl.default=i,Dl}var Il={},sy;function R3(){if(sy)return Il;sy=1,Object.defineProperty(Il,"__esModule",{value:!0});const e=Da(),n=De(),i=qe(),c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:u}})=>(0,n.str)`must have required property '${u}'`,params:({params:{missingProperty:u}})=>(0,n._)`{missingProperty: ${u}}`},code(u){const{gen:d,schema:p,schemaCode:g,data:h,$data:y,it:v}=u,{opts:j}=v;if(!y&&p.length===0)return;const k=p.length>=j.loopRequired;if(v.allErrors?b():C(),j.strictRequired){const $=u.parentSchema.properties,{definedProperties:w}=u.it;for(const R of p)if(($==null?void 0:$[R])===void 0&&!w.has(R)){const x=v.schemaEnv.baseId+v.errSchemaPath,_=`required property "${R}" is not defined at "${x}" (strictRequired)`;(0,i.checkStrictMode)(v,_,v.opts.strictRequired)}}function b(){if(k||y)u.block$data(n.nil,z);else for(const $ of p)(0,e.checkReportMissingProp)(u,$)}function C(){const $=d.let("missing");if(k||y){const w=d.let("valid",!0);u.block$data(w,()=>N($,w)),u.ok(w)}else d.if((0,e.checkMissingProp)(u,p,$)),(0,e.reportMissingProp)(u,$),d.else()}function z(){d.forOf("prop",g,$=>{u.setParams({missingProperty:$}),d.if((0,e.noPropertyInData)(d,h,$,j.ownProperties),()=>u.error())})}function N($,w){u.setParams({missingProperty:$}),d.forOf($,g,()=>{d.assign(w,(0,e.propertyInData)(d,h,$,j.ownProperties)),d.if((0,n.not)(w),()=>{u.error(),d.break()})},n.nil)}}};return Il.default=c,Il}var Ul={},ly;function O3(){if(ly)return Ul;ly=1,Object.defineProperty(Ul,"__esModule",{value:!0});const e=De(),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:c}){const u=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:c,data:u,schemaCode:d}=s,p=c==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${u}.length ${p} ${d}`)}};return Ul.default=i,Ul}var Ll={},Vl={},cy;function zc(){if(cy)return Vl;cy=1,Object.defineProperty(Vl,"__esModule",{value:!0});const e=v1();return e.code='require("ajv/dist/runtime/equal").default',Vl.default=e,Vl}var uy;function A3(){if(uy)return Ll;uy=1,Object.defineProperty(Ll,"__esModule",{value:!0});const e=mc(),n=De(),i=qe(),s=zc(),u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:p}})=>(0,n.str)`must NOT have duplicate items (items ## ${p} and ${d} are identical)`,params:({params:{i:d,j:p}})=>(0,n._)`{i: ${d}, j: ${p}}`},code(d){const{gen:p,data:g,$data:h,schema:y,parentSchema:v,schemaCode:j,it:k}=d;if(!h&&!y)return;const b=p.let("valid"),C=v.items?(0,e.getSchemaTypes)(v.items):[];d.block$data(b,z,(0,n._)`${j} === false`),d.ok(b);function z(){const R=p.let("i",(0,n._)`${g}.length`),x=p.let("j");d.setParams({i:R,j:x}),p.assign(b,!0),p.if((0,n._)`${R} > 1`,()=>(N()?$:w)(R,x))}function N(){return C.length>0&&!C.some(R=>R==="object"||R==="array")}function $(R,x){const _=p.name("item"),T=(0,e.checkDataTypes)(C,_,k.opts.strictNumbers,e.DataType.Wrong),A=p.const("indices",(0,n._)`{}`);p.for((0,n._)`;${R}--;`,()=>{p.let(_,(0,n._)`${g}[${R}]`),p.if(T,(0,n._)`continue`),C.length>1&&p.if((0,n._)`typeof ${_} == "string"`,(0,n._)`${_} += "_"`),p.if((0,n._)`typeof ${A}[${_}] == "number"`,()=>{p.assign(x,(0,n._)`${A}[${_}]`),d.error(),p.assign(b,!1).break()}).code((0,n._)`${A}[${_}] = ${R}`)})}function w(R,x){const _=(0,i.useFunc)(p,s.default),T=p.name("outer");p.label(T).for((0,n._)`;${R}--;`,()=>p.for((0,n._)`${x} = ${R}; ${x}--;`,()=>p.if((0,n._)`${_}(${g}[${R}], ${g}[${x}])`,()=>{d.error(),p.assign(b,!1).break(T)})))}}};return Ll.default=u,Ll}var Hl={},dy;function D3(){if(dy)return Hl;dy=1,Object.defineProperty(Hl,"__esModule",{value:!0});const e=De(),n=qe(),i=zc(),c={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:u})=>(0,e._)`{allowedValue: ${u}}`},code(u){const{gen:d,data:p,$data:g,schemaCode:h,schema:y}=u;g||y&&typeof y=="object"?u.fail$data((0,e._)`!${(0,n.useFunc)(d,i.default)}(${p}, ${h})`):u.fail((0,e._)`${y} !== ${p}`)}};return Hl.default=c,Hl}var Bl={},fy;function I3(){if(fy)return Bl;fy=1,Object.defineProperty(Bl,"__esModule",{value:!0});const e=De(),n=qe(),i=zc(),c={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:u})=>(0,e._)`{allowedValues: ${u}}`},code(u){const{gen:d,data:p,$data:g,schema:h,schemaCode:y,it:v}=u;if(!g&&h.length===0)throw new Error("enum must have non-empty array");const j=h.length>=v.opts.loopEnum;let k;const b=()=>k??(k=(0,n.useFunc)(d,i.default));let C;if(j||g)C=d.let("valid"),u.block$data(C,z);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const $=d.const("vSchema",y);C=(0,e.or)(...h.map((w,R)=>N($,R)))}u.pass(C);function z(){d.assign(C,!1),d.forOf("v",y,$=>d.if((0,e._)`${b()}(${p}, ${$})`,()=>d.assign(C,!0).break()))}function N($,w){const R=h[w];return typeof R=="object"&&R!==null?(0,e._)`${b()}(${p}, ${$}[${w}])`:(0,e._)`${p} === ${R}`}}};return Bl.default=c,Bl}var py;function U3(){if(py)return El;py=1,Object.defineProperty(El,"__esModule",{value:!0});const e=z3(),n=C3(),i=E3(),s=T3(),c=M3(),u=R3(),d=O3(),p=A3(),g=D3(),h=I3(),y=[e.default,n.default,i.default,s.default,c.default,u.default,d.default,p.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},g.default,h.default];return El.default=y,El}var ql={},Ci={},gy;function x1(){if(gy)return Ci;gy=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.validateAdditionalItems=void 0;const e=De(),n=qe(),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},code(u){const{parentSchema:d,it:p}=u,{items:g}=d;if(!Array.isArray(g)){(0,n.checkStrictMode)(p,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(u,g)}};function c(u,d){const{gen:p,schema:g,data:h,keyword:y,it:v}=u;v.items=!0;const j=p.const("len",(0,e._)`${h}.length`);if(g===!1)u.setParams({len:d.length}),u.pass((0,e._)`${j} <= ${d.length}`);else if(typeof g=="object"&&!(0,n.alwaysValidSchema)(v,g)){const b=p.var("valid",(0,e._)`${j} <= ${d.length}`);p.if((0,e.not)(b),()=>k(b)),u.ok(b)}function k(b){p.forRange("i",d.length,j,C=>{u.subschema({keyword:y,dataProp:C,dataPropType:n.Type.Num},b),v.allErrors||p.if((0,e.not)(b),()=>p.break())})}}return Ci.validateAdditionalItems=c,Ci.default=s,Ci}var Pl={},Ei={},my;function j1(){if(my)return Ei;my=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.validateTuple=void 0;const e=De(),n=qe(),i=Da(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(u){const{schema:d,it:p}=u;if(Array.isArray(d))return c(u,"additionalItems",d);p.items=!0,!(0,n.alwaysValidSchema)(p,d)&&u.ok((0,i.validateArray)(u))}};function c(u,d,p=u.schema){const{gen:g,parentSchema:h,data:y,keyword:v,it:j}=u;C(h),j.opts.unevaluated&&p.length&&j.items!==!0&&(j.items=n.mergeEvaluated.items(g,p.length,j.items));const k=g.name("valid"),b=g.const("len",(0,e._)`${y}.length`);p.forEach((z,N)=>{(0,n.alwaysValidSchema)(j,z)||(g.if((0,e._)`${b} > ${N}`,()=>u.subschema({keyword:v,schemaProp:N,dataProp:N},k)),u.ok(k))});function C(z){const{opts:N,errSchemaPath:$}=j,w=p.length,R=w===z.minItems&&(w===z.maxItems||z[d]===!1);if(N.strictTuples&&!R){const x=`"${v}" is ${w}-tuple, but minItems or maxItems/${d} are not specified or different at path "${$}"`;(0,n.checkStrictMode)(j,x,N.strictTuples)}}}return Ei.validateTuple=c,Ei.default=s,Ei}var hy;function L3(){if(hy)return Pl;hy=1,Object.defineProperty(Pl,"__esModule",{value:!0});const e=j1(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,e.validateTuple)(i,"items")};return Pl.default=n,Pl}var Zl={},yy;function V3(){if(yy)return Zl;yy=1,Object.defineProperty(Zl,"__esModule",{value:!0});const e=De(),n=qe(),i=Da(),s=x1(),u={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,e.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,e._)`{limit: ${d}}`},code(d){const{schema:p,parentSchema:g,it:h}=d,{prefixItems:y}=g;h.items=!0,!(0,n.alwaysValidSchema)(h,p)&&(y?(0,s.validateAdditionalItems)(d,y):d.ok((0,i.validateArray)(d)))}};return Zl.default=u,Zl}var Gl={},vy;function H3(){if(vy)return Gl;vy=1,Object.defineProperty(Gl,"__esModule",{value:!0});const e=De(),n=qe(),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:c,max:u}})=>u===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${u} valid item(s)`,params:({params:{min:c,max:u}})=>u===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${u}}`},code(c){const{gen:u,schema:d,parentSchema:p,data:g,it:h}=c;let y,v;const{minContains:j,maxContains:k}=p;h.opts.next?(y=j===void 0?1:j,v=k):y=1;const b=u.const("len",(0,e._)`${g}.length`);if(c.setParams({min:y,max:v}),v===void 0&&y===0){(0,n.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(v!==void 0&&y>v){(0,n.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,n.alwaysValidSchema)(h,d)){let w=(0,e._)`${b} >= ${y}`;v!==void 0&&(w=(0,e._)`${w} && ${b} <= ${v}`),c.pass(w);return}h.items=!0;const C=u.name("valid");v===void 0&&y===1?N(C,()=>u.if(C,()=>u.break())):y===0?(u.let(C,!0),v!==void 0&&u.if((0,e._)`${g}.length > 0`,z)):(u.let(C,!1),z()),c.result(C,()=>c.reset());function z(){const w=u.name("_valid"),R=u.let("count",0);N(w,()=>u.if(w,()=>$(R)))}function N(w,R){u.forRange("i",0,b,x=>{c.subschema({keyword:"contains",dataProp:x,dataPropType:n.Type.Num,compositeRule:!0},w),R()})}function $(w){u.code((0,e._)`${w}++`),v===void 0?u.if((0,e._)`${w} >= ${y}`,()=>u.assign(C,!0).break()):(u.if((0,e._)`${w} > ${v}`,()=>u.assign(C,!1).break()),y===1?u.assign(C,!0):u.if((0,e._)`${w} >= ${y}`,()=>u.assign(C,!0)))}}};return Gl.default=s,Gl}var lf={},$y;function B3(){return $y||($y=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=De(),i=qe(),s=Da();e.error={message:({params:{property:g,depsCount:h,deps:y}})=>{const v=h===1?"property":"properties";return(0,n.str)`must have ${v} ${y} when property ${g} is present`},params:({params:{property:g,depsCount:h,deps:y,missingProperty:v}})=>(0,n._)`{property: ${g},
|
|
92
|
-
missingProperty: ${v},
|
|
93
|
-
depsCount: ${h},
|
|
94
|
-
deps: ${y}}`};const c={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(g){const[h,y]=u(g);d(g,h),p(g,y)}};function u({schema:g}){const h={},y={};for(const v in g){if(v==="__proto__")continue;const j=Array.isArray(g[v])?h:y;j[v]=g[v]}return[h,y]}function d(g,h=g.schema){const{gen:y,data:v,it:j}=g;if(Object.keys(h).length===0)return;const k=y.let("missing");for(const b in h){const C=h[b];if(C.length===0)continue;const z=(0,s.propertyInData)(y,v,b,j.opts.ownProperties);g.setParams({property:b,depsCount:C.length,deps:C.join(", ")}),j.allErrors?y.if(z,()=>{for(const N of C)(0,s.checkReportMissingProp)(g,N)}):(y.if((0,n._)`${z} && (${(0,s.checkMissingProp)(g,C,k)})`),(0,s.reportMissingProp)(g,k),y.else())}}e.validatePropertyDeps=d;function p(g,h=g.schema){const{gen:y,data:v,keyword:j,it:k}=g,b=y.name("valid");for(const C in h)(0,i.alwaysValidSchema)(k,h[C])||(y.if((0,s.propertyInData)(y,v,C,k.opts.ownProperties),()=>{const z=g.subschema({keyword:j,schemaProp:C},b);g.mergeValidEvaluated(z,b)},()=>y.var(b,!0)),g.ok(b))}e.validateSchemaDeps=p,e.default=c})(lf)),lf}var Fl={},by;function q3(){if(by)return Fl;by=1,Object.defineProperty(Fl,"__esModule",{value:!0});const e=De(),n=qe(),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},code(c){const{gen:u,schema:d,data:p,it:g}=c;if((0,n.alwaysValidSchema)(g,d))return;const h=u.name("valid");u.forIn("key",p,y=>{c.setParams({propertyName:y}),c.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},h),u.if((0,e.not)(h),()=>{c.error(!0),g.allErrors||u.break()})}),c.ok(h)}};return Fl.default=s,Fl}var Yl={},xy;function _1(){if(xy)return Yl;xy=1,Object.defineProperty(Yl,"__esModule",{value:!0});const e=Da(),n=De(),i=mr(),s=qe(),u={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,n._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:p,schema:g,parentSchema:h,data:y,errsCount:v,it:j}=d;if(!v)throw new Error("ajv implementation error");const{allErrors:k,opts:b}=j;if(j.props=!0,b.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(j,g))return;const C=(0,e.allSchemaProperties)(h.properties),z=(0,e.allSchemaProperties)(h.patternProperties);N(),d.ok((0,n._)`${v} === ${i.default.errors}`);function N(){p.forIn("key",y,_=>{!C.length&&!z.length?R(_):p.if($(_),()=>R(_))})}function $(_){let T;if(C.length>8){const A=(0,s.schemaRefOrVal)(j,h.properties,"properties");T=(0,e.isOwnProperty)(p,A,_)}else C.length?T=(0,n.or)(...C.map(A=>(0,n._)`${_} === ${A}`)):T=n.nil;return z.length&&(T=(0,n.or)(T,...z.map(A=>(0,n._)`${(0,e.usePattern)(d,A)}.test(${_})`))),(0,n.not)(T)}function w(_){p.code((0,n._)`delete ${y}[${_}]`)}function R(_){if(b.removeAdditional==="all"||b.removeAdditional&&g===!1){w(_);return}if(g===!1){d.setParams({additionalProperty:_}),d.error(),k||p.break();return}if(typeof g=="object"&&!(0,s.alwaysValidSchema)(j,g)){const T=p.name("valid");b.removeAdditional==="failing"?(x(_,T,!1),p.if((0,n.not)(T),()=>{d.reset(),w(_)})):(x(_,T),k||p.if((0,n.not)(T),()=>p.break()))}}function x(_,T,A){const I={keyword:"additionalProperties",dataProp:_,dataPropType:s.Type.Str};A===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(I,T)}}};return Yl.default=u,Yl}var Kl={},jy;function P3(){if(jy)return Kl;jy=1,Object.defineProperty(Kl,"__esModule",{value:!0});const e=kc(),n=Da(),i=qe(),s=_1(),c={keyword:"properties",type:"object",schemaType:"object",code(u){const{gen:d,schema:p,parentSchema:g,data:h,it:y}=u;y.opts.removeAdditional==="all"&&g.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(y,s.default,"additionalProperties"));const v=(0,n.allSchemaProperties)(p);for(const z of v)y.definedProperties.add(z);y.opts.unevaluated&&v.length&&y.props!==!0&&(y.props=i.mergeEvaluated.props(d,(0,i.toHash)(v),y.props));const j=v.filter(z=>!(0,i.alwaysValidSchema)(y,p[z]));if(j.length===0)return;const k=d.name("valid");for(const z of j)b(z)?C(z):(d.if((0,n.propertyInData)(d,h,z,y.opts.ownProperties)),C(z),y.allErrors||d.else().var(k,!0),d.endIf()),u.it.definedProperties.add(z),u.ok(k);function b(z){return y.opts.useDefaults&&!y.compositeRule&&p[z].default!==void 0}function C(z){u.subschema({keyword:"properties",schemaProp:z,dataProp:z},k)}}};return Kl.default=c,Kl}var Wl={},_y;function Z3(){if(_y)return Wl;_y=1,Object.defineProperty(Wl,"__esModule",{value:!0});const e=Da(),n=De(),i=qe(),s=qe(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(u){const{gen:d,schema:p,data:g,parentSchema:h,it:y}=u,{opts:v}=y,j=(0,e.allSchemaProperties)(p),k=j.filter(R=>(0,i.alwaysValidSchema)(y,p[R]));if(j.length===0||k.length===j.length&&(!y.opts.unevaluated||y.props===!0))return;const b=v.strictSchema&&!v.allowMatchingProperties&&h.properties,C=d.name("valid");y.props!==!0&&!(y.props instanceof n.Name)&&(y.props=(0,s.evaluatedPropsToName)(d,y.props));const{props:z}=y;N();function N(){for(const R of j)b&&$(R),y.allErrors?w(R):(d.var(C,!0),w(R),d.if(C))}function $(R){for(const x in b)new RegExp(R).test(x)&&(0,i.checkStrictMode)(y,`property ${x} matches pattern ${R} (use allowMatchingProperties)`)}function w(R){d.forIn("key",g,x=>{d.if((0,n._)`${(0,e.usePattern)(u,R)}.test(${x})`,()=>{const _=k.includes(R);_||u.subschema({keyword:"patternProperties",schemaProp:R,dataProp:x,dataPropType:s.Type.Str},C),y.opts.unevaluated&&z!==!0?d.assign((0,n._)`${z}[${x}]`,!0):!_&&!y.allErrors&&d.if((0,n.not)(C),()=>d.break())})})}}};return Wl.default=c,Wl}var Xl={},Sy;function G3(){if(Sy)return Xl;Sy=1,Object.defineProperty(Xl,"__esModule",{value:!0});const e=qe(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){const{gen:s,schema:c,it:u}=i;if((0,e.alwaysValidSchema)(u,c)){i.fail();return}const d=s.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),i.failResult(d,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};return Xl.default=n,Xl}var Jl={},wy;function F3(){if(wy)return Jl;wy=1,Object.defineProperty(Jl,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Da().validateUnion,error:{message:"must match a schema in anyOf"}};return Jl.default=n,Jl}var Ql={},ky;function Y3(){if(ky)return Ql;ky=1,Object.defineProperty(Ql,"__esModule",{value:!0});const e=De(),n=qe(),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},code(c){const{gen:u,schema:d,parentSchema:p,it:g}=c;if(!Array.isArray(d))throw new Error("ajv implementation error");if(g.opts.discriminator&&p.discriminator)return;const h=d,y=u.let("valid",!1),v=u.let("passing",null),j=u.name("_valid");c.setParams({passing:v}),u.block(k),c.result(y,()=>c.reset(),()=>c.error(!0));function k(){h.forEach((b,C)=>{let z;(0,n.alwaysValidSchema)(g,b)?u.var(j,!0):z=c.subschema({keyword:"oneOf",schemaProp:C,compositeRule:!0},j),C>0&&u.if((0,e._)`${j} && ${y}`).assign(y,!1).assign(v,(0,e._)`[${v}, ${C}]`).else(),u.if(j,()=>{u.assign(y,!0),u.assign(v,C),z&&c.mergeEvaluated(z,e.Name)})})}}};return Ql.default=s,Ql}var ec={},Ny;function K3(){if(Ny)return ec;Ny=1,Object.defineProperty(ec,"__esModule",{value:!0});const e=qe(),n={keyword:"allOf",schemaType:"array",code(i){const{gen:s,schema:c,it:u}=i;if(!Array.isArray(c))throw new Error("ajv implementation error");const d=s.name("valid");c.forEach((p,g)=>{if((0,e.alwaysValidSchema)(u,p))return;const h=i.subschema({keyword:"allOf",schemaProp:g},d);i.ok(d),i.mergeEvaluated(h)})}};return ec.default=n,ec}var tc={},zy;function W3(){if(zy)return tc;zy=1,Object.defineProperty(tc,"__esModule",{value:!0});const e=De(),n=qe(),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:u})=>(0,e.str)`must match "${u.ifClause}" schema`,params:({params:u})=>(0,e._)`{failingKeyword: ${u.ifClause}}`},code(u){const{gen:d,parentSchema:p,it:g}=u;p.then===void 0&&p.else===void 0&&(0,n.checkStrictMode)(g,'"if" without "then" and "else" is ignored');const h=c(g,"then"),y=c(g,"else");if(!h&&!y)return;const v=d.let("valid",!0),j=d.name("_valid");if(k(),u.reset(),h&&y){const C=d.let("ifClause");u.setParams({ifClause:C}),d.if(j,b("then",C),b("else",C))}else h?d.if(j,b("then")):d.if((0,e.not)(j),b("else"));u.pass(v,()=>u.error(!0));function k(){const C=u.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},j);u.mergeEvaluated(C)}function b(C,z){return()=>{const N=u.subschema({keyword:C},j);d.assign(v,j),u.mergeValidEvaluated(N,v),z?d.assign(z,(0,e._)`${C}`):u.setParams({ifClause:C})}}}};function c(u,d){const p=u.schema[d];return p!==void 0&&!(0,n.alwaysValidSchema)(u,p)}return tc.default=s,tc}var ac={},Cy;function X3(){if(Cy)return ac;Cy=1,Object.defineProperty(ac,"__esModule",{value:!0});const e=qe(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:s,it:c}){s.if===void 0&&(0,e.checkStrictMode)(c,`"${i}" without "if" is ignored`)}};return ac.default=n,ac}var Ey;function J3(){if(Ey)return ql;Ey=1,Object.defineProperty(ql,"__esModule",{value:!0});const e=x1(),n=L3(),i=j1(),s=V3(),c=H3(),u=B3(),d=q3(),p=_1(),g=P3(),h=Z3(),y=G3(),v=F3(),j=Y3(),k=K3(),b=W3(),C=X3();function z(N=!1){const $=[y.default,v.default,j.default,k.default,b.default,C.default,d.default,p.default,u.default,g.default,h.default];return N?$.push(n.default,s.default):$.push(e.default,i.default),$.push(c.default),$}return ql.default=z,ql}var nc={},rc={},Ty;function Q3(){if(Ty)return rc;Ty=1,Object.defineProperty(rc,"__esModule",{value:!0});const e=De(),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},code(s,c){const{gen:u,data:d,$data:p,schema:g,schemaCode:h,it:y}=s,{opts:v,errSchemaPath:j,schemaEnv:k,self:b}=y;if(!v.validateFormats)return;p?C():z();function C(){const N=u.scopeValue("formats",{ref:b.formats,code:v.code.formats}),$=u.const("fDef",(0,e._)`${N}[${h}]`),w=u.let("fType"),R=u.let("format");u.if((0,e._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>u.assign(w,(0,e._)`${$}.type || "string"`).assign(R,(0,e._)`${$}.validate`),()=>u.assign(w,(0,e._)`"string"`).assign(R,$)),s.fail$data((0,e.or)(x(),_()));function x(){return v.strictSchema===!1?e.nil:(0,e._)`${h} && !${R}`}function _(){const T=k.$async?(0,e._)`(${$}.async ? await ${R}(${d}) : ${R}(${d}))`:(0,e._)`${R}(${d})`,A=(0,e._)`(typeof ${R} == "function" ? ${T} : ${R}.test(${d}))`;return(0,e._)`${R} && ${R} !== true && ${w} === ${c} && !${A}`}}function z(){const N=b.formats[g];if(!N){x();return}if(N===!0)return;const[$,w,R]=_(N);$===c&&s.pass(T());function x(){if(v.strictSchema===!1){b.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${g}" ignored in schema at path "${j}"`}}function _(A){const I=A instanceof RegExp?(0,e.regexpCode)(A):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(g)}`:void 0,P=u.scopeValue("formats",{key:g,ref:A,code:I});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,e._)`${P}.validate`]:["string",A,P]}function T(){if(typeof N=="object"&&!(N instanceof RegExp)&&N.async){if(!k.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${d})`}return typeof w=="function"?(0,e._)`${R}(${d})`:(0,e._)`${R}.test(${d})`}}}};return rc.default=i,rc}var My;function ew(){if(My)return nc;My=1,Object.defineProperty(nc,"__esModule",{value:!0});const n=[Q3().default];return nc.default=n,nc}var Hr={},Ry;function tw(){return Ry||(Ry=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.contentVocabulary=Hr.metadataVocabulary=void 0,Hr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Hr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Hr}var Oy;function aw(){if(Oy)return Nl;Oy=1,Object.defineProperty(Nl,"__esModule",{value:!0});const e=N3(),n=U3(),i=J3(),s=ew(),c=tw(),u=[e.default,n.default,(0,i.default)(),s.default,c.metadataVocabulary,c.contentVocabulary];return Nl.default=u,Nl}var ic={},Fo={},Ay;function nw(){if(Ay)return Fo;Ay=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Fo.DiscrError=e={})),Fo}var Dy;function rw(){if(Dy)return ic;Dy=1,Object.defineProperty(ic,"__esModule",{value:!0});const e=De(),n=nw(),i=Gf(),s=Nc(),c=qe(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:p,tagName:g}})=>p===n.DiscrError.Tag?`tag "${g}" must be string`:`value of tag "${g}" must be in oneOf`,params:({params:{discrError:p,tag:g,tagName:h}})=>(0,e._)`{error: ${p}, tag: ${h}, tagValue: ${g}}`},code(p){const{gen:g,data:h,schema:y,parentSchema:v,it:j}=p,{oneOf:k}=v;if(!j.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=y.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!k)throw new Error("discriminator: requires oneOf keyword");const C=g.let("valid",!1),z=g.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);g.if((0,e._)`typeof ${z} == "string"`,()=>N(),()=>p.error(!1,{discrError:n.DiscrError.Tag,tag:z,tagName:b})),p.ok(C);function N(){const R=w();g.if(!1);for(const x in R)g.elseIf((0,e._)`${z} === ${x}`),g.assign(C,$(R[x]));g.else(),p.error(!1,{discrError:n.DiscrError.Mapping,tag:z,tagName:b}),g.endIf()}function $(R){const x=g.name("valid"),_=p.subschema({keyword:"oneOf",schemaProp:R},x);return p.mergeEvaluated(_,e.Name),x}function w(){var R;const x={},_=A(v);let T=!0;for(let H=0;H<k.length;H++){let J=k[H];if(J!=null&&J.$ref&&!(0,c.schemaHasRulesButRef)(J,j.self.RULES)){const le=J.$ref;if(J=i.resolveRef.call(j.self,j.schemaEnv.root,j.baseId,le),J instanceof i.SchemaEnv&&(J=J.schema),J===void 0)throw new s.default(j.opts.uriResolver,j.baseId,le)}const re=(R=J==null?void 0:J.properties)===null||R===void 0?void 0:R[b];if(typeof re!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);T=T&&(_||A(J)),I(re,H)}if(!T)throw new Error(`discriminator: "${b}" must be required`);return x;function A({required:H}){return Array.isArray(H)&&H.includes(b)}function I(H,J){if(H.const)P(H.const,J);else if(H.enum)for(const re of H.enum)P(re,J);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function P(H,J){if(typeof H!="string"||H in x)throw new Error(`discriminator: "${b}" values must be unique strings`);x[H]=J}}}};return ic.default=d,ic}const iw="http://json-schema.org/draft-07/schema#",ow="http://json-schema.org/draft-07/schema#",sw="Core schema meta-schema",lw={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},cw=["object","boolean"],uw={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dw={$schema:iw,$id:ow,title:sw,definitions:lw,type:cw,properties:uw,default:!0};var Iy;function S1(){return Iy||(Iy=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;const i=S3(),s=aw(),c=rw(),u=dw,d=["/properties"],p="http://json-schema.org/draft-07/schema";class g extends i.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(c.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(u,d):u;this.addMetaSchema(b,p,!1),this.refs["http://json-schema.org/schema"]=p}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(p)?p:void 0)}}n.Ajv=g,e.exports=n=g,e.exports.Ajv=g,Object.defineProperty(n,"__esModule",{value:!0}),n.default=g;var h=kc();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var y=De();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var v=Zf();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return v.default}});var j=Nc();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return j.default}})})(jl,jl.exports)),jl.exports}var fw=S1();const w1=as(fw);var oc={exports:{}},cf={},Uy;function pw(){return Uy||(Uy=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function n(H,J){return{validate:H,compare:J}}e.fullFormats={date:n(u,d),time:n(g(!0),h),"date-time":n(j(!0),k),"iso-time":n(g(),y),"iso-date-time":n(j(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:N,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:P,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:w,int32:{type:"number",validate:_},int64:{type:"number",validate:T},float:{type:"number",validate:A},double:{type:"number",validate:A},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:n(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,d),time:n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,k),"iso-time":n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"iso-date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function i(H){return H%4===0&&(H%100!==0||H%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,c=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u(H){const J=s.exec(H);if(!J)return!1;const re=+J[1],le=+J[2],$e=+J[3];return le>=1&&le<=12&&$e>=1&&$e<=(le===2&&i(re)?29:c[le])}function d(H,J){if(H&&J)return H>J?1:H<J?-1:0}const p=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function g(H){return function(re){const le=p.exec(re);if(!le)return!1;const $e=+le[1],ce=+le[2],me=+le[3],fe=le[4],Ee=le[5]==="-"?-1:1,D=+(le[6]||0),U=+(le[7]||0);if(D>23||U>59||H&&!fe)return!1;if($e<=23&&ce<=59&&me<60)return!0;const ee=ce-U*Ee,B=$e-D*Ee-(ee<0?1:0);return(B===23||B===-1)&&(ee===59||ee===-1)&&me<61}}function h(H,J){if(!(H&&J))return;const re=new Date("2020-01-01T"+H).valueOf(),le=new Date("2020-01-01T"+J).valueOf();if(re&&le)return re-le}function y(H,J){if(!(H&&J))return;const re=p.exec(H),le=p.exec(J);if(re&&le)return H=re[1]+re[2]+re[3],J=le[1]+le[2]+le[3],H>J?1:H<J?-1:0}const v=/t|\s/i;function j(H){const J=g(H);return function(le){const $e=le.split(v);return $e.length===2&&u($e[0])&&J($e[1])}}function k(H,J){if(!(H&&J))return;const re=new Date(H).valueOf(),le=new Date(J).valueOf();if(re&&le)return re-le}function b(H,J){if(!(H&&J))return;const[re,le]=H.split(v),[$e,ce]=J.split(v),me=d(re,$e);if(me!==void 0)return me||h(le,ce)}const C=/\/|:/,z=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function N(H){return C.test(H)&&z.test(H)}const $=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function w(H){return $.lastIndex=0,$.test(H)}const R=-2147483648,x=2**31-1;function _(H){return Number.isInteger(H)&&H<=x&&H>=R}function T(H){return Number.isInteger(H)}function A(){return!0}const I=/[^\\]\\Z/;function P(H){if(I.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(cf)),cf}var uf={},Ly;function gw(){return Ly||(Ly=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const n=S1(),i=De(),s=i.operators,c={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},u={message:({keyword:p,schemaCode:g})=>(0,i.str)`should be ${c[p].okStr} ${g}`,params:({keyword:p,schemaCode:g})=>(0,i._)`{comparison: ${c[p].okStr}, limit: ${g}}`};e.formatLimitDefinition={keyword:Object.keys(c),type:"string",schemaType:"string",$data:!0,error:u,code(p){const{gen:g,data:h,schemaCode:y,keyword:v,it:j}=p,{opts:k,self:b}=j;if(!k.validateFormats)return;const C=new n.KeywordCxt(j,b.RULES.all.format.definition,"format");C.$data?z():N();function z(){const w=g.scopeValue("formats",{ref:b.formats,code:k.code.formats}),R=g.const("fmt",(0,i._)`${w}[${C.schemaCode}]`);p.fail$data((0,i.or)((0,i._)`typeof ${R} != "object"`,(0,i._)`${R} instanceof RegExp`,(0,i._)`typeof ${R}.compare != "function"`,$(R)))}function N(){const w=C.schema,R=b.formats[w];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${v}": format "${w}" does not define "compare" function`);const x=g.scopeValue("formats",{key:w,ref:R,code:k.code.formats?(0,i._)`${k.code.formats}${(0,i.getProperty)(w)}`:void 0});p.fail$data($(x))}function $(w){return(0,i._)`${w}.compare(${h}, ${y}) ${c[v].fail} 0`}},dependencies:["format"]};const d=p=>(p.addKeyword(e.formatLimitDefinition),p);e.default=d})(uf)),uf}var Vy;function mw(){return Vy||(Vy=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=pw(),s=gw(),c=De(),u=new c.Name("fullFormats"),d=new c.Name("fastFormats"),p=(h,y={keywords:!0})=>{if(Array.isArray(y))return g(h,y,i.fullFormats,u),h;const[v,j]=y.mode==="fast"?[i.fastFormats,d]:[i.fullFormats,u],k=y.formats||i.formatNames;return g(h,k,v,j),y.keywords&&(0,s.default)(h),h};p.get=(h,y="full")=>{const j=(y==="fast"?i.fastFormats:i.fullFormats)[h];if(!j)throw new Error(`Unknown format "${h}"`);return j};function g(h,y,v,j){var k,b;(k=(b=h.opts.code).formats)!==null&&k!==void 0||(b.formats=(0,c._)`require("ajv-formats/dist/formats").${j}`);for(const C of y)h.addFormat(C,v[C])}e.exports=n=p,Object.defineProperty(n,"__esModule",{value:!0}),n.default=p})(oc,oc.exports)),oc.exports}var hw=mw();const k1=as(hw);var yw=zc();const vw=as(yw);var $w=b1();const bw=as($w);function N1(e){if(typeof e=="function")return e;const n=e==null?void 0:e.default;if(typeof n=="function")return n;throw new Error("ajv-runtime: could not resolve a runtime-helper function")}N1(vw).toString();N1(bw).toString();const z1={strict:!0,allErrors:!0,useDefaults:!1,coerceTypes:!1,removeAdditional:!1,verbose:!0},Ui=new w1({...z1});k1(Ui);Ui.getKeyword("example")||Ui.addKeyword({keyword:"example"});Ui.getKeyword("nullable")||Ui.addKeyword({keyword:"nullable"});const Qo=new w1({...z1,code:{source:!0,esm:!0}});k1(Qo);Qo.getKeyword("example")||Qo.addKeyword({keyword:"example"});Qo.getKeyword("nullable")||Qo.addKeyword({keyword:"nullable"});function Fn(e){if(e.type==="object"||e.properties!==void 0){const i={...e};if(i.properties){const s={};for(const[c,u]of Object.entries(i.properties))s[c]=Fn(u);i.properties=s}return i.additionalProperties===void 0?i.additionalProperties=!1:typeof i.additionalProperties!="boolean"&&(i.additionalProperties=Fn(i.additionalProperties)),i.oneOf&&(i.oneOf=i.oneOf.map(Fn)),i.anyOf&&(i.anyOf=i.anyOf.map(Fn)),i}if(e.type==="array"&&e.items)return{...e,items:Fn(e.items)};if(e.oneOf||e.anyOf){const i={...e};return i.oneOf&&(i.oneOf=i.oneOf.map(Fn)),i.anyOf&&(i.anyOf=i.anyOf.map(Fn)),i}return e}function Ff(e){const n=Fn(e);return Ui.compile(n)}function Yf(e,n){return e?e.map(i=>xw(i,n)):[]}function C1(e,n){return n?e.map(i=>({...i,field:i.field?`${n}.${i.field}`:n})):e}function xw(e,n){const i=jw(e.instancePath);switch(e.keyword){case"additionalProperties":{const c=e.params.additionalProperty??"<unknown>",u=i?`${i}.${c}`:c,d=e.parentSchema,p=d!=null&&d.properties?Object.keys(d.properties):[],g=Yo(n,`${e.instancePath}/${c}`),h=p.length>0?` Declared keys: [${p.join(", ")}].`:" Declared keys: [(none)].";return{field:u,message:`Undeclared field '${c}'${i?` at '${i}'`:""}.${h}`,expected:"<declared key>",received:Hy(g)}}case"required":{const c=e.params.missingProperty??"<unknown>";return{field:i?`${i}.${c}`:c,message:`Required field '${c}' missing${i?` at '${i}'`:""}`,expected:"present",received:"undefined"}}case"type":{const s=e.params,c=Array.isArray(s.type)?s.type.join("|"):s.type??"unknown",u=Hy(Yo(n,e.instancePath));return{field:i,message:e.message??`Type mismatch at '${i||"<root>"}'`,expected:c,received:u}}case"enum":{const c=e.params.allowedValues??[],u=Yo(n,e.instancePath);return{field:i,message:e.message??`Enum mismatch at '${i||"<root>"}'`,expected:c.map(d=>JSON.stringify(d)).join("|"),received:JSON.stringify(u)}}case"const":{const s=e.params,c=Yo(n,e.instancePath);return{field:i,message:e.message??`Const mismatch at '${i||"<root>"}'`,expected:JSON.stringify(s.allowedValue),received:JSON.stringify(c)}}case"pattern":{const s=e.params,c=Yo(n,e.instancePath);return{field:i,message:e.message??`Pattern mismatch at '${i||"<root>"}'`,expected:s.pattern??"<pattern>",received:typeof c=="string"?c:JSON.stringify(c)}}default:return{field:i,message:e.message??`Validation failed${i?` at '${i}'`:""} (${e.keyword})`}}}function jw(e){if(!e)return"";const n=e.slice(1).split("/");let i="";for(const s of n)/^\d+$/.test(s)?i+=`[${s}]`:i===""?i=s:i+=`.${s}`;return i}function Yo(e,n){if(!n)return e;const i=n.slice(1).split("/");let s=e;for(const c of i){if(s==null)return;if(Array.isArray(s)){const u=Number(c);if(!Number.isInteger(u))return;s=s[u]}else if(typeof s=="object")s=s[c];else return}return s}function Hy(e){return e===null?"null":Array.isArray(e)?"array":typeof e}const E1="_ggui:preview",Kf="_ggui:contract-error",Wf="_ggui:lifecycle",_w=new Set([E1,Kf,Wf]);function T1(e){return _w.has(e)}function Sw(e){const n=[];if(typeof e!="object"||e===null||Array.isArray(e))return{valid:!1,violations:[{field:"payload",message:`${Kf} payload must be a non-null object`,expected:"object",received:e===null?"null":Array.isArray(e)?"array":typeof e}]};const i=e;if(typeof i.toolName!="string"&&n.push({field:"toolName",message:"Required field 'toolName' must be a string",expected:"string",received:i.toolName===void 0?"undefined":typeof i.toolName}),i.actionName!==void 0&&typeof i.actionName!="string"&&n.push({field:"actionName",message:"Optional field 'actionName' must be a string when present",expected:"string",received:typeof i.actionName}),i.sourceAction!==void 0)if(typeof i.sourceAction!="object"||i.sourceAction===null||Array.isArray(i.sourceAction))n.push({field:"sourceAction",message:"Optional field 'sourceAction' must be an object when present",expected:"object",received:i.sourceAction===null?"null":Array.isArray(i.sourceAction)?"array":typeof i.sourceAction});else{const s=i.sourceAction;typeof s.type!="string"&&n.push({field:"sourceAction.type",message:"Field 'sourceAction.type' must be a string",expected:"string",received:s.type===void 0?"undefined":typeof s.type}),typeof s.dispatchedAt!="string"&&n.push({field:"sourceAction.dispatchedAt",message:"Field 'sourceAction.dispatchedAt' must be a string (ISO 8601)",expected:"string",received:s.dispatchedAt===void 0?"undefined":typeof s.dispatchedAt})}if(typeof i.error!="object"||i.error===null||Array.isArray(i.error))n.push({field:"error",message:"Required field 'error' must be a non-null object",expected:"object",received:i.error===void 0?"undefined":i.error===null?"null":Array.isArray(i.error)?"array":typeof i.error});else{const s=i.error;typeof s.code!="string"&&n.push({field:"error.code",message:"Required field 'error.code' must be a string",expected:"string",received:s.code===void 0?"undefined":typeof s.code}),typeof s.message!="string"&&n.push({field:"error.message",message:"Required field 'error.message' must be a string",expected:"string",received:s.message===void 0?"undefined":typeof s.message}),s.causedBy!==void 0&&typeof s.causedBy!="string"&&n.push({field:"error.causedBy",message:"Optional field 'error.causedBy' must be a string when present",expected:"string",received:typeof s.causedBy})}return typeof i.timestamp!="string"&&n.push({field:"timestamp",message:"Required field 'timestamp' must be a string (ISO 8601)",expected:"string",received:i.timestamp===void 0?"undefined":typeof i.timestamp}),i.schemaVersion!==void 0&&typeof i.schemaVersion!="string"&&n.push({field:"schemaVersion",message:"Optional field 'schemaVersion' must be a string when present",expected:"string",received:typeof i.schemaVersion}),{valid:n.length===0,violations:n}}const ww=new Map([[Kf,Sw],[Wf,kw]]);function kw(e){const n=[];if(typeof e!="object"||e===null||Array.isArray(e))return{valid:!1,violations:[{field:"payload",message:`${Wf} payload must be a non-null object`,expected:"object",received:e===null?"null":Array.isArray(e)?"array":typeof e}]};const i=e;if(typeof i.kind!="string")return{valid:!1,violations:[{field:"kind",message:"Required field 'kind' must be a string",expected:"string",received:i.kind===void 0?"undefined":typeof i.kind}]};const s=c=>{typeof i[c]!="string"&&n.push({field:c,message:`Required field '${c}' must be a string`,expected:"string",received:i[c]===void 0?"undefined":typeof i[c]})};switch(i.kind){case"handshake_started":s("handshakeId"),s("intent");break;case"handshake_completed":s("handshakeId"),i.outcome!=="accepted"&&i.outcome!=="amended"&&i.outcome!=="declined"&&i.outcome!=="cached"&&n.push({field:"outcome",message:"Required field 'outcome' must be 'accepted' | 'amended' | 'declined' | 'cached'",expected:"'accepted' | 'amended' | 'declined' | 'cached'",received:i.outcome===void 0?"undefined":String(i.outcome)}),typeof i.genExpected!="boolean"&&n.push({field:"genExpected",message:"Required field 'genExpected' must be a boolean",expected:"boolean",received:i.genExpected===void 0?"undefined":typeof i.genExpected});break;case"push_started":s("stackItemId"),s("intent");break;case"consume_polling":s("stackItemId"),i.state!=="open"&&n.push({field:"state",message:"Required field 'state' must be 'open'",expected:"'open'",received:i.state===void 0?"undefined":String(i.state)});break;default:n.push({field:"kind",message:`Unknown lifecycle kind '${i.kind}'. Closed union; new kinds bump protocol version.`,expected:"'handshake_started' | 'handshake_completed' | 'push_started' | 'consume_polling'",received:i.kind})}return{valid:n.length===0,violations:n}}function Nw(e){const n=e.properties??{};return{type:"object",properties:Object.fromEntries(Object.entries(n).map(([i,s])=>[i,s.schema])),required:Object.entries(n).filter(([,i])=>i.required===!0).map(([i])=>i)}}function zw(e,n,i){const s=Ff(Nw(n));return s(e)?{valid:!0,violations:[]}:{valid:!1,violations:Yf(s.errors,e)}}function By(e,n,i,s,c){if(T1(e)){const p=s==null?void 0:s.get(e);if(p)return p(n);const g=ww.get(e);return g?g(n):{valid:!0,violations:[]}}const u=[],d=i[e];if(!d)return u.push({field:"channel",message:`Unknown stream channel '${e}'. Declared channels: ${Object.keys(i).join(", ")}`,expected:Object.keys(i).join(" | "),received:e}),{valid:!1,violations:u};if(d.schema&&n!==void 0){const p=Ff(d.schema);if(!p(n))for(const h of C1(Yf(p.errors,n),`${e}.payload`))u.push(h)}return{valid:u.length===0,violations:u}}function M1(e,n,i){const s=[];if(typeof e!="object"||e===null||Array.isArray(e))return s.push({field:"value",message:"Action payload must be an object with an `action` field",expected:"object",received:qy(e)}),{valid:!1,violations:s};const c=e,u=c.action;if(typeof u!="string"||u.length===0)return s.push({field:"action",message:"Missing or empty `action` identifier",expected:"string",received:qy(u)}),{valid:!1,violations:s};const d=n[u];if(!d)return s.push({field:"action",message:`Unknown action '${u}'. Declared actions: ${Object.keys(n).join(", ")||"(none)"}`,expected:Object.keys(n).join(" | ")||"(none)",received:u}),{valid:!1,violations:s};if(d.schema){const p=Ff(d.schema);if(!p(c.data))for(const h of C1(Yf(p.errors,c.data),`${u}.data`))s.push(h)}return{valid:s.length===0,violations:s}}function qy(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Cw(e,n,i){return e.type!=="data:submit"?{valid:!0,violations:[]}:n?M1(e.payload,n):{valid:!0,violations:[]}}de({sessionId:F().optional(),text:F().optional(),events:pt(de({type:F(),payload:Pa()}).passthrough()).optional()}).passthrough();O.createContext(null);new Set(qf);new TextDecoder;const Ew=["mounting","code-ready","error","disconnected"];function Tw(e){if(e===null||typeof e!="object")return!1;const n=e;if(n.type!=="ggui:lifecycle"||n.event===null||typeof n.event!="object")return!1;const i=n.event;if(typeof i.state!="string"||!Ew.includes(i.state)||i.stackItemId!==void 0&&(typeof i.stackItemId!="string"||i.stackItemId.length===0))return!1;if(i.error!==void 0){if(i.error===null||typeof i.error!="object")return!1;const s=i.error;if(typeof s.code!="string"||typeof s.message!="string")return!1}return!0}function Mw(e){if(e===null||typeof e!="object")return!1;const n=e;if(typeof n.description!="string"||n.description.length===0||typeof n.stackItemId!="string"||n.stackItemId.length===0||typeof n.actionId!="string"||n.actionId.length===0||typeof n.submittedAt!="string"||n.submittedAt.length===0||typeof n.intent!="string"||n.intent.length===0)return!1;if(n.kind==="queued"){if(n.nextStep===null||typeof n.nextStep!="object")return!1;const i=n.nextStep;if(i.tool!=="ggui_consume"||i.args===null||typeof i.args!="object")return!1;const s=i.args;return!(typeof s.stackItemId!="string"||s.stackItemId.length===0)}if(n.kind==="inline"){if(n.payload===null||typeof n.payload!="object")return!1;const i=n.payload;return!(i.actionData===void 0||i.uiContext===null||typeof i.uiContext!="object"||Array.isArray(i.uiContext)||n.nextStep!==void 0&&(typeof n.nextStep!="string"||n.nextStep.length===0))}return!1}function Rw(e){const n=e.observedVersion===void 0?void 0:typeof e.observedVersion=="string"?e.observedVersion:e.observedVersion.join(", ");return{kind:"version",...n!==void 0?{serverVersion:n}:{},clientSupports:e.acceptedVersions,message:e.message}}function Py(e,n){return{kind:"bootstrap",reason:e,message:n}}var Ow={"--color-primary":"#0284c7","--color-surface":"#ffffff","--color-text":"#111111","--font-family":"system-ui, -apple-system, sans-serif","--border-radius-md":"8px"};function Aw(e){if(e===null||typeof e!="object")return!1;const n=e;return n.jsonrpc==="2.0"&&typeof n.method=="string"}function Zy(e,n){if(!e)return"";const i=e[n];return typeof i=="string"?i:""}function Dw(e,n){if(!e)return{};const i=e[n];return i===null||typeof i!="object"||Array.isArray(i)?{}:i}async function Iw(e,n){if(!Aw(e)||e.id===void 0)return null;const i=e.id;switch(e.method){case"ping":return{jsonrpc:"2.0",id:i,result:{ok:!0,pong:!0}};case"ui/initialize":{const s={theme:n.theme,containerDimensions:n.containerDimensions,locale:n.locale};return n.bootstrap!==void 0&&(s.toolOutput={_meta:{ggui:{bootstrap:n.bootstrap}}}),{jsonrpc:"2.0",id:i,result:s}}case"ui/open-link":{const s=Zy(e.params,"url");if(!/^https?:\/\//i.test(s))return{jsonrpc:"2.0",id:i,error:{code:-32602,message:"unsupported-scheme"}};try{return await n.openLink(s),{jsonrpc:"2.0",id:i,result:{opened:!0}}}catch(c){return{jsonrpc:"2.0",id:i,error:{code:-32e3,message:`open_link_failed: ${String(c)}`}}}}case"tools/call":{if(n.onToolCall===void 0)return{jsonrpc:"2.0",id:i,error:{code:-32e3,message:"no-tool-handler"}};const s=Zy(e.params,"name");if(s.length===0)return{jsonrpc:"2.0",id:i,error:{code:-32602,message:"tools/call requires params.name"}};const c=Dw(e.params,"arguments");try{const u=await n.onToolCall(s,c),d=u!==null&&typeof u=="object"&&!Array.isArray(u)?u:{value:u};return{jsonrpc:"2.0",id:i,result:d}}catch(u){return{jsonrpc:"2.0",id:i,error:{code:-32e3,message:`tool_call_failed: ${String(u)}`}}}}default:return{jsonrpc:"2.0",id:i,error:{code:-32601,message:"method_not_supported"}}}}function Uw(e){if(e===null||typeof e!="object")return"unknown";const n=e;if(typeof n.type=="string")switch(n.type){case"ggui:bootstrap-failed":return"bootstrap-failed";case"ggui:protocol-error":return"protocol-error";case"ggui:observe":return"observability";case"ggui:lifecycle":return"lifecycle";case"ggui:upgrade-required":return"upgrade-required"}return n.jsonrpc==="2.0"&&typeof n.method=="string"?n.method==="ui/message"?"ui-message":"jsonrpc":"unknown"}function Lw(e){if(e===null||typeof e!="object")return null;const n=e;if(n.method!=="ui/message"||n.params===null||typeof n.params!="object")return null;const i=n.params,s=i.role==="user"||i.role==="assistant"||i.role==="system"?i.role:"user";if(!Array.isArray(i.content))return null;const c=[];for(const d of i.content){if(d===null||typeof d!="object")continue;const p=d;p.type==="text"&&typeof p.text=="string"&&c.push(p.text)}if(c.length===0)return null;let u;if(i._meta!==null&&typeof i._meta=="object"){const d=i._meta;if(d.ggui!==null&&typeof d.ggui=="object"){const p=d.ggui;Mw(p.userAction)&&(u=p.userAction)}}return{role:s,text:c.join(`
|
|
95
|
-
`),...u!==void 0?{userAction:u}:{}}}function Vw(e,n){return{jsonrpc:"2.0",method:e,params:{data:n}}}function Hw(){return{jsonrpc:"2.0",method:"ui/resource-teardown",params:{reason:"host_unmount"}}}function Bw(e){return typeof e.text=="string"&&e.text.length>0?{kind:"srcdoc",value:e.text}:typeof e.blob=="string"&&e.blob.length>0?{kind:"data-url",value:`data:${typeof e.mimeType=="string"&&e.mimeType.length>0?e.mimeType:"text/html"};base64,${e.blob}`}:typeof e.uri=="string"&&/^https?:\/\//i.test(e.uri)?{kind:"src",value:e.uri}:null}function qw(e){const n=["allow-scripts","allow-forms"];return e&&n.push("allow-same-origin"),n.join(" ")}function Pw(e){if(!e)return;const n=[];return e.camera&&n.push("camera 'self'"),e.microphone&&n.push("microphone 'self'"),e.geolocation&&n.push("geolocation 'self'"),e.clipboardWrite&&n.push("clipboard-write 'self'"),n.length>0?n.join("; "):void 0}function Gy(e){return e??{}}function Fy(e){return typeof e=="string"&&e.length>0?e:typeof navigator<"u"&&typeof navigator.language=="string"?navigator.language:"en-US"}function Yy(e){return e??Ow}function Ky(e){typeof window>"u"||window.open(e,"_blank","noopener,noreferrer")}var Zw=O.forwardRef(function({resource:n,theme:i,locale:s,containerDimensions:c,permissions:u,bootstrap:d,allowSameOrigin:p=!1,onToolCall:g,onError:h,onUpgradeRequired:y,onObserve:v,onLifecycle:j,onUiMessage:k},b){const C=O.useRef(null),[z,N]=O.useState(null),$=O.useRef(null),w=O.useMemo(()=>Bw(n),[n]),R=O.useRef({theme:Yy(i),locale:Fy(s),containerDimensions:Gy(c),openLink:Ky,onToolCall:g,...d!==void 0?{bootstrap:d}:{}});O.useEffect(()=>{R.current={theme:Yy(i),locale:Fy(s),containerDimensions:Gy(c),openLink:Ky,onToolCall:g,...d!==void 0?{bootstrap:d}:{}}},[i,s,c,g,d]);const x=O.useRef(void 0);O.useEffect(()=>{var $e;const re=x.current;if(x.current=d,re!==void 0||d===void 0)return;const le=(($e=C.current)==null?void 0:$e.contentWindow)??$.current;if(le)try{le.postMessage({jsonrpc:"2.0",method:"ui/notifications/tool-result",params:{toolOutput:{_meta:{ggui:{bootstrap:d}}}}},"*")}catch{}},[d]),O.useImperativeHandle(b,()=>({dispatchAction(re,le){var ce;const $e=((ce=C.current)==null?void 0:ce.contentWindow)??$.current;$e&&$e.postMessage(Vw(re,le),"*")}}),[]);const _=O.useCallback(async re=>{var ce;const le=C.current;if(!le||re.source!==le.contentWindow)return;switch(Uw(re.data)){case"bootstrap-failed":{const me=re.data;h==null||h(Py(me.reason,me.message));return}case"protocol-error":{const me=re.data;h==null||h(me.error);return}case"observability":{const me=re.data;v==null||v(me.event);return}case"lifecycle":{if(!Tw(re.data))return;const me=re.data;N(me.event.state),j==null||j(me.event);return}case"upgrade-required":{const me=re.data,fe=typeof me.server=="string"?me.server:"",Ee=Array.isArray(me.client)?me.client:[];y==null||y(fe,Ee),h==null||h(Rw({observedVersion:fe.length>0?fe:void 0,acceptedVersions:Ee,message:"upgrade-required"}));return}case"ui-message":{const me=Lw(re.data);me!==null&&(k==null||k(me));return}case"jsonrpc":{const me=re.data,fe=await Iw(me,R.current);fe&&((ce=le.contentWindow)==null||ce.postMessage(fe,"*"));return}case"unknown":default:return}},[h,v,y,j,k]);O.useEffect(()=>{if(typeof window>"u")return;const re=le=>{_(le)};return window.addEventListener("message",re),()=>{window.removeEventListener("message",re)}},[_]);const T=O.useMemo(()=>qw(p),[p]),A=O.useMemo(()=>Pw(u),[u]),I=c,P=O.useRef(h),H=O.useRef(n.uri);O.useEffect(()=>{P.current=h},[h]),O.useEffect(()=>{H.current=n.uri},[n.uri]),O.useEffect(()=>{var re;w===null&&((re=P.current)==null||re.call(P,Py("MALFORMED_BOOTSTRAP",`McpAppIframe: resource uri '${H.current}' is not http(s) and has no inline text/blob content`)))},[w]);const J=O.useMemo(()=>({width:(I==null?void 0:I.width)??"100%",height:(I==null?void 0:I.height)??480,maxWidth:(I==null?void 0:I.maxWidth)??"100%",maxHeight:(I==null?void 0:I.maxHeight)??void 0,border:"1px solid #e5e5e5",borderRadius:8,display:"block"}),[I==null?void 0:I.width,I==null?void 0:I.height,I==null?void 0:I.maxWidth,I==null?void 0:I.maxHeight]);return r.jsx("iframe",{ref:re=>{if(re)C.current=re,$.current=re.contentWindow;else{const le=$.current;try{le==null||le.postMessage(Hw(),"*")}catch{}C.current=null,$.current=null}},"data-ggui-mcp-app-iframe":"","data-ggui-resource-uri":n.uri,...z!==null?{"data-ggui-mcp-app-iframe-lifecycle":z}:{},title:"MCP App",sandbox:T,...A!==void 0?{allow:A}:{},...(w==null?void 0:w.kind)==="srcdoc"?{srcDoc:w.value}:{},...(w==null?void 0:w.kind)==="src"||(w==null?void 0:w.kind)==="data-url"?{src:w.value}:{},style:J})});function Gw(e){return e.replace(/__GGUI_META__[\s\S]*?__GGUI_META_END__/g,"").replace(/__GGUI_STREAM_SPEC__[\s\S]*?__GGUI_STREAM_SPEC_END__/g,"")}function Fw(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const i=n;if(e.$type==="shadow"&&"offsetX"in i)return`${i.offsetX} ${i.offsetY} ${i.blur} ${i.spread} ${i.color}`;if(e.$type==="transition"&&"duration"in i&&"timingFunction"in i)return`${typeof i.property=="string"&&i.property?`${i.property} `:""}${i.duration} ${i.timingFunction}`}return String(n)}function Yn(e,n,i){for(const[s,c]of Object.entries(e))s.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?i.push(` --ggui-${n}-${s}: ${Fw(c)};`):c!==null&&typeof c=="object"&&Yn(c,`${n}-${s}`,i))}function Yw(e){const n=[];return Yn(e.color,"color",n),Yn(e.font,"font",n),Yn(e.spacing,"spacing",n),Yn(e.shape,"shape",n),Yn({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),Yn(e.accessibility,"accessibility",n),Yn(e.zIndex,"zIndex",n),n.push(` --ggui-canvas-mode: ${e.canvas.mode.$value};`),n.push(` --ggui-canvas-speed: ${e.canvas.speed.$value};`),n.push(` --ggui-canvas-background: ${e.canvas.background.$value};`),n.join(`
|
|
96
|
-
`)}function Kw(e,n){const i=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,s=[];let c;for(;(c=i.exec(n))!==null;){const u=c[1],p=c[2].trim().split(";").map(g=>g.trim()).filter(Boolean).map(g=>g.endsWith(";")?g:`${g};`).join(" ");s.push(` ${u} { ${p} }`)}return`@keyframes ggui-${e} {
|
|
97
|
-
${s.join(`
|
|
98
|
-
`)}
|
|
99
|
-
}`}function Ww(e){const n=[];for(const[i,s]of Object.entries(e.motion.keyframes))i.startsWith("$")||n.push(Kw(i,String(s.$value)));return n.join(`
|
|
100
|
-
|
|
101
|
-
`)}function Xw(e,n){const s=`:root {
|
|
102
|
-
${Yw(n)}
|
|
103
|
-
}`,c=Ww(n),u=c?`${s}
|
|
104
|
-
|
|
105
|
-
${c}`:s;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:s,cssKeyframes:c,css:u,canvasConfig:{mode:n.canvas.mode.$value,speed:n.canvas.speed.$value,colors:n.canvas.colors.$value,background:String(n.canvas.background.$value)}}}var Pt={light:{success:{50:{$type:"color",$value:"#f0fdf4"},100:{$type:"color",$value:"#dcfce7"},200:{$type:"color",$value:"#bbf7d0"},500:{$type:"color",$value:"#22c55e"},600:{$type:"color",$value:"#16a34a"},700:{$type:"color",$value:"#15803d"},800:{$type:"color",$value:"#166534"}},warning:{50:{$type:"color",$value:"#fffbeb"},100:{$type:"color",$value:"#fef3c7"},200:{$type:"color",$value:"#fde68a"},500:{$type:"color",$value:"#f59e0b"},600:{$type:"color",$value:"#d97706"},700:{$type:"color",$value:"#b45309"},800:{$type:"color",$value:"#92400e"}},error:{50:{$type:"color",$value:"#fef2f2"},100:{$type:"color",$value:"#fee2e2"},200:{$type:"color",$value:"#fecaca"},500:{$type:"color",$value:"#ef4444"},600:{$type:"color",$value:"#dc2626"},700:{$type:"color",$value:"#b91c1c"},800:{$type:"color",$value:"#991b1b"}},info:{50:{$type:"color",$value:"#ecfeff"},100:{$type:"color",$value:"#cffafe"},200:{$type:"color",$value:"#a5f3fc"},500:{$type:"color",$value:"#06b6d4"},600:{$type:"color",$value:"#0891b2"},700:{$type:"color",$value:"#0e7490"},800:{$type:"color",$value:"#155e75"}}},dark:{success:{50:{$type:"color",$value:"#052e16"},100:{$type:"color",$value:"#14532d"},200:{$type:"color",$value:"#166534"},500:{$type:"color",$value:"#22c55e"},600:{$type:"color",$value:"#4ade80"},700:{$type:"color",$value:"#86efac"},800:{$type:"color",$value:"#bbf7d0"}},warning:{50:{$type:"color",$value:"#451a03"},100:{$type:"color",$value:"#78350f"},200:{$type:"color",$value:"#92400e"},500:{$type:"color",$value:"#f59e0b"},600:{$type:"color",$value:"#fbbf24"},700:{$type:"color",$value:"#fcd34d"},800:{$type:"color",$value:"#fde68a"}},error:{50:{$type:"color",$value:"#450a0a"},100:{$type:"color",$value:"#7f1d1d"},200:{$type:"color",$value:"#991b1b"},500:{$type:"color",$value:"#ef4444"},600:{$type:"color",$value:"#f87171"},700:{$type:"color",$value:"#fca5a5"},800:{$type:"color",$value:"#fecaca"}},info:{50:{$type:"color",$value:"#083344"},100:{$type:"color",$value:"#164e63"},200:{$type:"color",$value:"#155e75"},500:{$type:"color",$value:"#06b6d4"},600:{$type:"color",$value:"#22d3ee"},700:{$type:"color",$value:"#67e8f9"},800:{$type:"color",$value:"#a5f3fc"}}}},We={light:{focusRing:{color:{$type:"color",$value:"#0284c7"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#000000"},backgroundColor:{$type:"color",$value:"#ffffff"},linkColor:{$type:"color",$value:"#0369a1"}}},dark:{focusRing:{color:{$type:"color",$value:"#38bdf8"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#f1f5f9"},backgroundColor:{$type:"color",$value:"#0f172a"},linkColor:{$type:"color",$value:"#7dd3fc"}}}},oa={hide:{$type:"number",$value:-1},base:{$type:"number",$value:0},docked:{$type:"number",$value:10},dropdown:{$type:"number",$value:1e3},sticky:{$type:"number",$value:1100},banner:{$type:"number",$value:1200},overlay:{$type:"number",$value:1300},modal:{$type:"number",$value:1400},popover:{$type:"number",$value:1500},skipLink:{$type:"number",$value:1600},toast:{$type:"number",$value:1700},tooltip:{$type:"number",$value:1800}},Cc={fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"300ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}},Xn={font:{family:{sans:{$value:'"Inter", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.125rem",$type:"dimension"},"2xl":{$value:"1.375rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.6",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"2px",$type:"dimension"},lg:{$value:"4px",$type:"dimension"},xl:{$value:"6px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"none",$type:"shadow"},md:{$value:"0 1px 2px rgba(41, 41, 41, 0.06)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(41, 41, 41, 0.08)",$type:"shadow"},xl:{$value:"0 4px 12px rgba(41, 41, 41, 0.10)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.56, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:Cc,keyframes:{"accent-pulse":{$value:"0%{opacity:1}50%{opacity:0.7}100%{opacity:1}",$type:"keyframes"},entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"},shimmer:{$value:"0%{background-position:-200% 0}100%{background-position:200% 0}",$type:"keyframes"}}}},Jw={$name:"GGUI",$description:"The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#292929",$type:"color"},600:{$value:"#1f1f1f",$type:"color"},700:{$value:"#171717",$type:"color"},800:{$value:"#0e0e0e",$type:"color"},900:{$value:"#000000",$type:"color"}},neutral:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#5a5a5a",$type:"color"},600:{$value:"#3d3d3d",$type:"color"},700:{$value:"#292929",$type:"color"},800:{$value:"#24242c",$type:"color"},900:{$value:"#0e0e0e",$type:"color"}},success:{50:{$value:"#e8f5ec",$type:"color"},100:{$value:"#c5e6cd",$type:"color"},200:{$value:"#8fcca0",$type:"color"},500:{$value:"#1b7a37",$type:"color"},600:{$value:"#15622c",$type:"color"},700:{$value:"#0f4a21",$type:"color"},800:{$value:"#093116",$type:"color"}},warning:{50:{$value:"#fbf3e0",$type:"color"},100:{$value:"#f3e1b0",$type:"color"},200:{$value:"#e6c46e",$type:"color"},500:{$value:"#a87b0e",$type:"color"},600:{$value:"#86620b",$type:"color"},700:{$value:"#654a08",$type:"color"},800:{$value:"#433105",$type:"color"}},error:{50:{$value:"#fbe7e3",$type:"color"},100:{$value:"#f4bbb1",$type:"color"},200:{$value:"#ea8a7a",$type:"color"},500:{$value:"#d93822",$type:"color"},600:{$value:"#ae2d1b",$type:"color"},700:{$value:"#822214",$type:"color"},800:{$value:"#57160d",$type:"color"}},info:{50:{$value:"#e1e1e1",$type:"color"},100:{$value:"#bababa",$type:"color"},200:{$value:"#8e8e8e",$type:"color"},500:{$value:"#3d3d3d",$type:"color"},600:{$value:"#313131",$type:"color"},700:{$value:"#252525",$type:"color"},800:{$value:"#181818",$type:"color"}},surface:{$value:"#f4f3ed",$type:"color"},onSurface:{$value:"#292929",$type:"color"},surfaceVariant:{$value:"#ebe9e1",$type:"color"},onSurfaceVariant:{$value:"#5a5a5a",$type:"color"},container:{$value:"#ebe9e1",$type:"color"},onContainer:{$value:"#292929",$type:"color"},outline:{$value:"#d6d4cb",$type:"color"},outlineVariant:{$value:"#e4e4e2",$type:"color"},onPrimary:{$value:"#f4f3ed",$type:"color"},primaryContainer:{$value:"#ebe9e1",$type:"color"},onPrimaryContainer:{$value:"#292929",$type:"color"},onError:{$value:"#f4f3ed",$type:"color"},errorContainer:{$value:"#fbe7e3",$type:"color"},onErrorContainer:{$value:"#57160d",$type:"color"},tertiary:{$value:"#1b7a37",$type:"color"},onTertiary:{$value:"#f4f3ed",$type:"color"},tertiaryContainer:{$value:"#e8f5ec",$type:"color"},onTertiaryContainer:{$value:"#093116",$type:"color"}},font:Xn.font,spacing:Xn.spacing,shape:Xn.shape,motion:Xn.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:1,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#f4f3ed",$type:"color"}},accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:oa},Qw={$name:"GGUI",$description:"The default ggui theme (dark) — ink canvas, paper text, architectural and flat.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#f4f3ed",$type:"color"},600:{$value:"#ebe9e1",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#d9d9d9",$type:"color"},900:{$value:"#ffffff",$type:"color"}},neutral:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#8c8c93",$type:"color"},600:{$value:"#d9d9d9",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#ebe9e1",$type:"color"},900:{$value:"#f4f3ed",$type:"color"}},success:{50:{$value:"#0d2918",$type:"color"},100:{$value:"#174f2a",$type:"color"},200:{$value:"#286b3d",$type:"color"},500:{$value:"#3da85b",$type:"color"},600:{$value:"#6dbf83",$type:"color"},700:{$value:"#9dd5ab",$type:"color"},800:{$value:"#cdead3",$type:"color"}},warning:{50:{$value:"#332608",$type:"color"},100:{$value:"#5e4612",$type:"color"},200:{$value:"#896720",$type:"color"},500:{$value:"#d4a02e",$type:"color"},600:{$value:"#dfb55c",$type:"color"},700:{$value:"#eaca8a",$type:"color"},800:{$value:"#f5deb8",$type:"color"}},error:{50:{$value:"#3d130d",$type:"color"},100:{$value:"#702419",$type:"color"},200:{$value:"#a33828",$type:"color"},500:{$value:"#ff5b46",$type:"color"},600:{$value:"#ff7d6c",$type:"color"},700:{$value:"#ff9f93",$type:"color"},800:{$value:"#ffc2ba",$type:"color"}},info:{50:{$value:"#363636",$type:"color"},100:{$value:"#5a5a5a",$type:"color"},200:{$value:"#8c8c8c",$type:"color"},500:{$value:"#d9d9d9",$type:"color"},600:{$value:"#e0e0e0",$type:"color"},700:{$value:"#e8e8e8",$type:"color"},800:{$value:"#f0f0f0",$type:"color"}},surface:{$value:"#1f1f1f",$type:"color"},onSurface:{$value:"#f4f3ed",$type:"color"},surfaceVariant:{$value:"#292929",$type:"color"},onSurfaceVariant:{$value:"#d9d9d9",$type:"color"},container:{$value:"#292929",$type:"color"},onContainer:{$value:"#f4f3ed",$type:"color"},outline:{$value:"#3d3d3d",$type:"color"},outlineVariant:{$value:"#292929",$type:"color"},onPrimary:{$value:"#292929",$type:"color"},primaryContainer:{$value:"#3d3d3d",$type:"color"},onPrimaryContainer:{$value:"#f4f3ed",$type:"color"},onError:{$value:"#3d130d",$type:"color"},errorContainer:{$value:"#702419",$type:"color"},onErrorContainer:{$value:"#ffc2ba",$type:"color"},tertiary:{$value:"#3da85b",$type:"color"},onTertiary:{$value:"#0d2918",$type:"color"},tertiaryContainer:{$value:"#174f2a",$type:"color"},onTertiaryContainer:{$value:"#cdead3",$type:"color"}},font:Xn.font,spacing:Xn.spacing,shape:Xn.shape,motion:Xn.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:1,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#1a1a1a",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:oa},e6={light:Jw,dark:Qw},Jn={font:{family:{sans:{$value:'"Orbitron", "Rajdhani", system-ui, sans-serif',$type:"fontFamily"},mono:{$value:'"Share Tech Mono", "Fira Code", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8rem",$type:"dimension"},base:{$value:"0.95rem",$type:"dimension"},lg:{$value:"1.1rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"4px",$type:"dimension"},lg:{$value:"6px",$type:"dimension"},xl:{$value:"8px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 4px rgba(6, 182, 212, 0.3)",$type:"shadow"},md:{$value:"0 0 8px rgba(6, 182, 212, 0.4)",$type:"shadow"},lg:{$value:"0 0 16px rgba(6, 182, 212, 0.5)",$type:"shadow"},xl:{$value:"0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"100ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"600ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"glitch-flicker":{$value:"0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}",$type:"keyframes"},"scan-line":{$value:"0%{transform:translateY(-100%)}100%{transform:translateY(100%)}",$type:"keyframes"},"neon-pulse":{$value:"0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"600ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}}}},t6={$name:"Cyberpunk",$description:"Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations and constellation canvas.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},300:{$value:"#67e8f9",$type:"color"},400:{$value:"#22d3ee",$type:"color"},500:{$value:"#06b6d4",$type:"color"},600:{$value:"#0891b2",$type:"color"},700:{$value:"#0e7490",$type:"color"},800:{$value:"#155e75",$type:"color"},900:{$value:"#164e63",$type:"color"}},neutral:{50:{$value:"#0a0a0f",$type:"color"},100:{$value:"#111118",$type:"color"},200:{$value:"#1a1a24",$type:"color"},300:{$value:"#25252f",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#e0fff1",$type:"color"},100:{$value:"#b3ffd9",$type:"color"},200:{$value:"#66ffb3",$type:"color"},500:{$value:"#00ff88",$type:"color"},600:{$value:"#00cc6e",$type:"color"},700:{$value:"#009955",$type:"color"},800:{$value:"#006638",$type:"color"}},warning:{50:{$value:"#fff5e0",$type:"color"},100:{$value:"#ffe5b3",$type:"color"},200:{$value:"#ffcc66",$type:"color"},500:{$value:"#ffaa00",$type:"color"},600:{$value:"#cc8800",$type:"color"},700:{$value:"#996600",$type:"color"},800:{$value:"#664400",$type:"color"}},error:{50:{$value:"#ffe0e8",$type:"color"},100:{$value:"#ffb3c4",$type:"color"},200:{$value:"#ff6688",$type:"color"},500:{$value:"#ff2255",$type:"color"},600:{$value:"#cc1a44",$type:"color"},700:{$value:"#991333",$type:"color"},800:{$value:"#660d22",$type:"color"}},info:{50:{$value:"#e0f9ff",$type:"color"},100:{$value:"#b3edff",$type:"color"},200:{$value:"#66dbff",$type:"color"},500:{$value:"#00ccff",$type:"color"},600:{$value:"#00a3cc",$type:"color"},700:{$value:"#007a99",$type:"color"},800:{$value:"#005266",$type:"color"}},surface:{$value:"#0a0a0f",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#111118",$type:"color"},onSurfaceVariant:{$value:"#8888a0",$type:"color"},container:{$value:"#155e75",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#3a3a48",$type:"color"},outlineVariant:{$value:"#25252f",$type:"color"},onPrimary:{$value:"#0a0a0f",$type:"color"},primaryContainer:{$value:"#155e75",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#0a0a0f",$type:"color"},errorContainer:{$value:"#660d22",$type:"color"},onErrorContainer:{$value:"#ffe0e8",$type:"color"},tertiary:{$value:"#00ff88",$type:"color"},onTertiary:{$value:"#0a0a0f",$type:"color"},tertiaryContainer:{$value:"#006638",$type:"color"},onTertiaryContainer:{$value:"#e0fff1",$type:"color"}},font:Jn.font,spacing:Jn.spacing,shape:Jn.shape,motion:Jn.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:oa,canvas:{mode:{$value:"constellation",$type:"string"},speed:{$value:1.2,$type:"number"},colors:{$value:["rgba(6, 182, 212, 0.25)","rgba(0, 255, 136, 0.12)","rgba(255, 34, 85, 0.08)"],$type:"array"},background:{$value:"#05050a",$type:"color"}}},a6={$name:"Cyberpunk",$description:"Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#164e63",$type:"color"},100:{$value:"#155e75",$type:"color"},200:{$value:"#0e7490",$type:"color"},300:{$value:"#0891b2",$type:"color"},400:{$value:"#06b6d4",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"},900:{$value:"#ecfeff",$type:"color"}},neutral:{50:{$value:"#000005",$type:"color"},100:{$value:"#0a0a0f",$type:"color"},200:{$value:"#111118",$type:"color"},300:{$value:"#1a1a24",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#003319",$type:"color"},100:{$value:"#006633",$type:"color"},200:{$value:"#00994d",$type:"color"},500:{$value:"#33ffaa",$type:"color"},600:{$value:"#66ffbf",$type:"color"},700:{$value:"#99ffd4",$type:"color"},800:{$value:"#ccffea",$type:"color"}},warning:{50:{$value:"#332200",$type:"color"},100:{$value:"#664400",$type:"color"},200:{$value:"#996600",$type:"color"},500:{$value:"#ffbe33",$type:"color"},600:{$value:"#ffcb5c",$type:"color"},700:{$value:"#ffd985",$type:"color"},800:{$value:"#ffe7ad",$type:"color"}},error:{50:{$value:"#330a17",$type:"color"},100:{$value:"#66142e",$type:"color"},200:{$value:"#991e45",$type:"color"},500:{$value:"#ff4477",$type:"color"},600:{$value:"#ff6e94",$type:"color"},700:{$value:"#ff97b1",$type:"color"},800:{$value:"#ffc1cf",$type:"color"}},info:{50:{$value:"#002b33",$type:"color"},100:{$value:"#005566",$type:"color"},200:{$value:"#008099",$type:"color"},500:{$value:"#33d6ff",$type:"color"},600:{$value:"#5cdeff",$type:"color"},700:{$value:"#85e6ff",$type:"color"},800:{$value:"#adeeff",$type:"color"}},surface:{$value:"#000005",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#0a0a0f",$type:"color"},onSurfaceVariant:{$value:"#aaaabe",$type:"color"},container:{$value:"#0e7490",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#1a1a24",$type:"color"},outlineVariant:{$value:"#111118",$type:"color"},onPrimary:{$value:"#000005",$type:"color"},primaryContainer:{$value:"#0e7490",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#000005",$type:"color"},errorContainer:{$value:"#991e45",$type:"color"},onErrorContainer:{$value:"#ffc1cf",$type:"color"},tertiary:{$value:"#33ffaa",$type:"color"},onTertiary:{$value:"#000005",$type:"color"},tertiaryContainer:{$value:"#006633",$type:"color"},onTertiaryContainer:{$value:"#ccffea",$type:"color"}},font:Jn.font,spacing:Jn.spacing,shape:Jn.shape,motion:Jn.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:oa,canvas:{mode:{$value:"constellation",$type:"string"},speed:{$value:1.2,$type:"number"},colors:{$value:["rgba(34, 211, 238, 0.32)","rgba(0, 255, 136, 0.16)","rgba(255, 34, 85, 0.10)"],$type:"array"},background:{$value:"#000005",$type:"color"}}},n6={light:t6,dark:a6},Qn={font:{family:{sans:{$value:'"Noto Serif JP", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"Noto Sans Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.9",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.125rem",$type:"dimension"},md:{$value:"0.25rem",$type:"dimension"},lg:{$value:"0.5rem",$type:"dimension"},xl:{$value:"0.75rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(42, 39, 36, 0.06)",$type:"shadow"},md:{$value:"0 3px 8px rgba(42, 39, 36, 0.08)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(42, 39, 36, 0.10)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(42, 39, 36, 0.12)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"500ms",$type:"duration"},slow:{$value:"1500ms",$type:"duration"},ambient:{$value:"6000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.33, 0, 0.67, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.2, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"slow-breathe":{$value:"0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}",$type:"keyframes"},"gentle-fade":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"ink-ripple":{$value:"0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"200ms cubic-bezier(0.33, 0, 0.67, 1)"},normal:{$type:"transition",$value:"500ms cubic-bezier(0.33, 0, 0.67, 1)"},slow:{$type:"transition",$value:"1500ms cubic-bezier(0.33, 0, 0.67, 1)"},colors:{$type:"transition",$value:"color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)"},opacity:{$type:"transition",$value:"opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)"},transform:{$type:"transition",$value:"transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"}}}},r6={$name:"Zen",$description:"Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#f6f7f4",$type:"color"},100:{$value:"#e8ebe2",$type:"color"},200:{$value:"#d1d7c5",$type:"color"},300:{$value:"#b3bda1",$type:"color"},400:{$value:"#93a17c",$type:"color"},500:{$value:"#748660",$type:"color"},600:{$value:"#5c6b4c",$type:"color"},700:{$value:"#48543d",$type:"color"},800:{$value:"#3b4434",$type:"color"},900:{$value:"#33392e",$type:"color"}},neutral:{50:{$value:"#faf9f7",$type:"color"},100:{$value:"#f3f1ed",$type:"color"},200:{$value:"#e7e4de",$type:"color"},300:{$value:"#d5d0c8",$type:"color"},400:{$value:"#b8b0a4",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#7a7068",$type:"color"},700:{$value:"#5e5650",$type:"color"},800:{$value:"#3e3a36",$type:"color"},900:{$value:"#2a2724",$type:"color"}},success:{50:{$type:"color",$value:"#f0f4ee"},100:{$type:"color",$value:"#dde6d8"},200:{$type:"color",$value:"#c6d4be"},500:{$type:"color",$value:"#6b8f5e"},600:{$type:"color",$value:"#58754d"},700:{$type:"color",$value:"#43583a"},800:{$type:"color",$value:"#2f3e29"}},warning:{50:{$type:"color",$value:"#faf6ea"},100:{$type:"color",$value:"#f4ebcb"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#c9a84c"},600:{$type:"color",$value:"#a88a3a"},700:{$type:"color",$value:"#7e672c"},800:{$type:"color",$value:"#59481f"}},error:{50:{$type:"color",$value:"#f8edec"},100:{$type:"color",$value:"#efd0ce"},200:{$type:"color",$value:"#e3aba8"},500:{$type:"color",$value:"#b85450"},600:{$type:"color",$value:"#9a4340"},700:{$type:"color",$value:"#743330"},800:{$type:"color",$value:"#522423"}},info:{50:{$type:"color",$value:"#eef3f5"},100:{$type:"color",$value:"#d7e2e7"},200:{$type:"color",$value:"#b9cdd5"},500:{$type:"color",$value:"#6a8fa0"},600:{$type:"color",$value:"#557585"},700:{$type:"color",$value:"#405864"},800:{$type:"color",$value:"#2c3d46"}},surface:{$value:"#faf9f7",$type:"color"},onSurface:{$value:"#2a2724",$type:"color"},surfaceVariant:{$value:"#f3f1ed",$type:"color"},onSurfaceVariant:{$value:"#6b635b",$type:"color"},container:{$value:"#e8ebe2",$type:"color"},onContainer:{$value:"#33392e",$type:"color"},outline:{$value:"#d5d0c8",$type:"color"},outlineVariant:{$value:"#e7e4de",$type:"color"},onPrimary:{$value:"#faf9f7",$type:"color"},primaryContainer:{$value:"#e8ebe2",$type:"color"},onPrimaryContainer:{$value:"#33392e",$type:"color"},onError:{$value:"#faf9f7",$type:"color"},errorContainer:{$value:"#f8edec",$type:"color"},onErrorContainer:{$value:"#522423",$type:"color"},tertiary:{$value:"#7d5e6e",$type:"color"},onTertiary:{$value:"#faf9f7",$type:"color"},tertiaryContainer:{$value:"#ebe2e6",$type:"color"},onTertiaryContainer:{$value:"#3a2a32",$type:"color"}},font:Qn.font,spacing:Qn.spacing,shape:Qn.shape,motion:Qn.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.3,$type:"number"},colors:{$value:["rgba(92, 107, 76, 0.08)","rgba(185, 176, 164, 0.06)","rgba(213, 208, 200, 0.05)"],$type:"array"},background:{$value:"#1a1816",$type:"color"}},accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:oa},i6={$name:"Zen",$description:"Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#33392e",$type:"color"},100:{$value:"#3b4434",$type:"color"},200:{$value:"#48543d",$type:"color"},300:{$value:"#5c6b4c",$type:"color"},400:{$value:"#748660",$type:"color"},500:{$value:"#93a17c",$type:"color"},600:{$value:"#b3bda1",$type:"color"},700:{$value:"#d1d7c5",$type:"color"},800:{$value:"#e8ebe2",$type:"color"},900:{$value:"#f6f7f4",$type:"color"}},neutral:{50:{$value:"#1a1816",$type:"color"},100:{$value:"#2a2724",$type:"color"},200:{$value:"#3e3a36",$type:"color"},300:{$value:"#5e5650",$type:"color"},400:{$value:"#7a7068",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#b8b0a4",$type:"color"},700:{$value:"#d5d0c8",$type:"color"},800:{$value:"#e7e4de",$type:"color"},900:{$value:"#faf9f7",$type:"color"}},success:{50:{$type:"color",$value:"#f1f6ee"},100:{$type:"color",$value:"#dceacc"},200:{$type:"color",$value:"#c4dab1"},500:{$type:"color",$value:"#8aab7a"},600:{$type:"color",$value:"#6f8d62"},700:{$type:"color",$value:"#546b4a"},800:{$type:"color",$value:"#3a4b34"}},warning:{50:{$type:"color",$value:"#fbf6e9"},100:{$type:"color",$value:"#f4e9c1"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#d8b96a"},600:{$type:"color",$value:"#b09553"},700:{$type:"color",$value:"#84703d"},800:{$type:"color",$value:"#5a4c2a"}},error:{50:{$type:"color",$value:"#faeae9"},100:{$type:"color",$value:"#f1cac8"},200:{$type:"color",$value:"#e4a5a1"},500:{$type:"color",$value:"#cf6f6a"},600:{$type:"color",$value:"#a85753"},700:{$type:"color",$value:"#7d403c"},800:{$type:"color",$value:"#552a27"}},info:{50:{$type:"color",$value:"#f0f4f6"},100:{$type:"color",$value:"#d7e0e5"},200:{$type:"color",$value:"#bccbd2"},500:{$type:"color",$value:"#8eaab8"},600:{$type:"color",$value:"#708995"},700:{$type:"color",$value:"#546771"},800:{$type:"color",$value:"#38454d"}},surface:{$value:"#2a2724",$type:"color"},onSurface:{$value:"#f3f1ed",$type:"color"},surfaceVariant:{$value:"#3e3a36",$type:"color"},onSurfaceVariant:{$value:"#b8b0a4",$type:"color"},container:{$value:"#48543d",$type:"color"},onContainer:{$value:"#e8ebe2",$type:"color"},outline:{$value:"#5e5650",$type:"color"},outlineVariant:{$value:"#3e3a36",$type:"color"},onPrimary:{$value:"#1a1816",$type:"color"},primaryContainer:{$value:"#3b4434",$type:"color"},onPrimaryContainer:{$value:"#e8ebe2",$type:"color"},onError:{$value:"#1a1816",$type:"color"},errorContainer:{$value:"#552a27",$type:"color"},onErrorContainer:{$value:"#f1cac8",$type:"color"},tertiary:{$value:"#a98899",$type:"color"},onTertiary:{$value:"#1a1816",$type:"color"},tertiaryContainer:{$value:"#4e3a44",$type:"color"},onTertiaryContainer:{$value:"#ebe2e6",$type:"color"}},font:Qn.font,spacing:Qn.spacing,shape:Qn.shape,motion:Qn.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.3,$type:"number"},colors:{$value:["rgba(147, 161, 124, 0.10)","rgba(185, 176, 164, 0.07)","rgba(213, 208, 200, 0.05)"],$type:"array"},background:{$value:"#1a1816",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:oa},o6={light:r6,dark:i6},er={font:{family:{sans:{$value:'"Outfit", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Fira Code", "JetBrains Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.25rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 6px rgba(236, 72, 153, 0.25)",$type:"shadow"},md:{$value:"0 0 12px rgba(236, 72, 153, 0.35)",$type:"shadow"},lg:{$value:"0 0 20px rgba(236, 72, 153, 0.45)",$type:"shadow"},xl:{$value:"0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"800ms",$type:"duration"},ambient:{$value:"2500ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"800ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 250ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"neon-flicker":{$value:"0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}",$type:"keyframes"},"glow-pulse":{$value:"0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}",$type:"keyframes"},"electric-arc":{$value:"0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}",$type:"keyframes"}}}},s6={$name:"Neon Noir",$description:"Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.",$metadata:{font:"Outfit",fontUrl:"https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",philosophy:"Midnight electricity. The city never sleeps."},color:{primary:{50:{$value:"#fdf2f8",$type:"color"},100:{$value:"#fce7f3",$type:"color"},200:{$value:"#fbcfe8",$type:"color"},300:{$value:"#f9a8d4",$type:"color"},400:{$value:"#f472b6",$type:"color"},500:{$value:"#ec4899",$type:"color"},600:{$value:"#db2777",$type:"color"},700:{$value:"#be185d",$type:"color"},800:{$value:"#9d174d",$type:"color"},900:{$value:"#831843",$type:"color"}},neutral:{50:{$value:"#09090b",$type:"color"},100:{$value:"#111114",$type:"color"},200:{$value:"#19191e",$type:"color"},300:{$value:"#232329",$type:"color"},400:{$value:"#3b3b44",$type:"color"},500:{$value:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Pt.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Pt.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Pt.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Pt.dark.info,500:{$value:"#38bdf8",$type:"color"}},surface:{$value:"#09090b",$type:"color"},onSurface:{$value:"#ececf0",$type:"color"},surfaceVariant:{$value:"#111114",$type:"color"},onSurfaceVariant:{$value:"#8a8a9a",$type:"color"},container:{$value:"#9d174d",$type:"color"},onContainer:{$value:"#fce7f3",$type:"color"},outline:{$value:"#3b3b44",$type:"color"},outlineVariant:{$value:"#232329",$type:"color"},onPrimary:{$value:"#09090b",$type:"color"},primaryContainer:{$value:"#9d174d",$type:"color"},onPrimaryContainer:{$value:"#fce7f3",$type:"color"},onError:{$value:"#09090b",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecaca",$type:"color"},tertiary:{$value:"#a855f7",$type:"color"},onTertiary:{$value:"#09090b",$type:"color"},tertiaryContainer:{$value:"#6b21a8",$type:"color"},onTertiaryContainer:{$value:"#f3e8ff",$type:"color"}},font:er.font,spacing:er.spacing,shape:er.shape,motion:er.motion,canvas:{mode:{$value:"flow",$type:"string"},speed:{$value:.8,$type:"number"},colors:{$value:["rgba(236, 72, 153, 0.18)","rgba(219, 39, 119, 0.12)","rgba(190, 24, 93, 0.08)"],$type:"array"},background:{$value:"#06060a",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:oa},l6={$name:"Neon Noir",$description:"Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.",$metadata:{font:"Outfit",fontUrl:"https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",philosophy:"Midnight electricity. The city never sleeps."},color:{primary:{50:{$value:"#831843",$type:"color"},100:{$value:"#9d174d",$type:"color"},200:{$value:"#be185d",$type:"color"},300:{$value:"#db2777",$type:"color"},400:{$value:"#ec4899",$type:"color"},500:{$value:"#f472b6",$type:"color"},600:{$value:"#f9a8d4",$type:"color"},700:{$value:"#fbcfe8",$type:"color"},800:{$value:"#fce7f3",$type:"color"},900:{$value:"#fdf2f8",$type:"color"}},neutral:{50:{$value:"#000000",$type:"color"},100:{$value:"#09090b",$type:"color"},200:{$value:"#111114",$type:"color"},300:{$value:"#19191e",$type:"color"},400:{$value:"#3b3b44",$type:"color"},500:{$value:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Pt.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Pt.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Pt.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Pt.dark.info,500:{$value:"#5acdff",$type:"color"}},surface:{$value:"#000000",$type:"color"},onSurface:{$value:"#ececf0",$type:"color"},surfaceVariant:{$value:"#09090b",$type:"color"},onSurfaceVariant:{$value:"#b0b0be",$type:"color"},container:{$value:"#be185d",$type:"color"},onContainer:{$value:"#fce7f3",$type:"color"},outline:{$value:"#19191e",$type:"color"},outlineVariant:{$value:"#111114",$type:"color"},onPrimary:{$value:"#000000",$type:"color"},primaryContainer:{$value:"#be185d",$type:"color"},onPrimaryContainer:{$value:"#fce7f3",$type:"color"},onError:{$value:"#000000",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#c084fc",$type:"color"},onTertiary:{$value:"#000000",$type:"color"},tertiaryContainer:{$value:"#581c87",$type:"color"},onTertiaryContainer:{$value:"#f3e8ff",$type:"color"}},font:er.font,spacing:er.spacing,shape:er.shape,motion:er.motion,canvas:{mode:{$value:"flow",$type:"string"},speed:{$value:.8,$type:"number"},colors:{$value:["rgba(244, 114, 182, 0.24)","rgba(236, 72, 153, 0.16)","rgba(190, 24, 93, 0.10)"],$type:"array"},background:{$value:"#000000",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:oa},c6={light:s6,dark:l6},tr={font:{family:{sans:{$value:'"Lora", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"IBM Plex Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.15rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.625rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.85",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.625rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(53, 46, 32, 0.08)",$type:"shadow"},md:{$value:"0 4px 8px rgba(53, 46, 32, 0.10)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(53, 46, 32, 0.12)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(53, 46, 32, 0.14)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"400ms",$type:"duration"},slow:{$value:"1200ms",$type:"duration"},ambient:{$value:"5000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.3, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"leaf-float":{$value:"0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}",$type:"keyframes"},"vine-grow":{$value:"0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}",$type:"keyframes"},"gentle-sway":{$value:"0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}",$type:"keyframes"}},transition:Cc}},u6={$name:"Botanical",$description:"Organic greens on warm cream — leaf-float animations, vine-grow motion, and a gentle mesh canvas.",$metadata:{font:"Lora",fontUrl:"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",philosophy:"Rooted in nature. Growing with intention."},color:{primary:{50:{$value:"#f0fdf4",$type:"color"},100:{$value:"#dcfce7",$type:"color"},200:{$value:"#bbf7d0",$type:"color"},300:{$value:"#86efac",$type:"color"},400:{$value:"#4ade80",$type:"color"},500:{$value:"#22c55e",$type:"color"},600:{$value:"#16a34a",$type:"color"},700:{$value:"#15803d",$type:"color"},800:{$value:"#166534",$type:"color"},900:{$value:"#14532d",$type:"color"}},neutral:{50:{$value:"#fefcf8",$type:"color"},100:{$value:"#fdf8ef",$type:"color"},200:{$value:"#f8f0df",$type:"color"},300:{$value:"#f0e4c9",$type:"color"},400:{$value:"#dccba5",$type:"color"},500:{$value:"#bfaa80",$type:"color"},600:{$value:"#9a8660",$type:"color"},700:{$value:"#746448",$type:"color"},800:{$value:"#504530",$type:"color"},900:{$value:"#352e20",$type:"color"}},success:Pt.light.success,warning:Pt.light.warning,error:Pt.light.error,info:Pt.light.info,surface:{$value:"#fefcf8",$type:"color"},onSurface:{$value:"#352e20",$type:"color"},surfaceVariant:{$value:"#fdf8ef",$type:"color"},onSurfaceVariant:{$value:"#746448",$type:"color"},container:{$value:"#dcfce7",$type:"color"},onContainer:{$value:"#14532d",$type:"color"},outline:{$value:"#f0e4c9",$type:"color"},outlineVariant:{$value:"#f8f0df",$type:"color"},onPrimary:{$value:"#fefcf8",$type:"color"},primaryContainer:{$value:"#dcfce7",$type:"color"},onPrimaryContainer:{$value:"#14532d",$type:"color"},onError:{$value:"#fefcf8",$type:"color"},errorContainer:{$value:"#fee2e2",$type:"color"},onErrorContainer:{$value:"#7f1d1d",$type:"color"},tertiary:{$value:"#b45309",$type:"color"},onTertiary:{$value:"#fefcf8",$type:"color"},tertiaryContainer:{$value:"#fef3c7",$type:"color"},onTertiaryContainer:{$value:"#451a03",$type:"color"}},font:tr.font,spacing:tr.spacing,shape:tr.shape,motion:tr.motion,accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:oa,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.4,$type:"number"},colors:{$value:["rgba(22, 163, 74, 0.10)","rgba(191, 170, 128, 0.08)","rgba(240, 228, 201, 0.06)"],$type:"array"},background:{$value:"#141210",$type:"color"}}},d6={$name:"Botanical",$description:"Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.",$metadata:{font:"Lora",fontUrl:"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",philosophy:"Rooted in nature. Growing with intention."},color:{primary:{50:{$value:"#14532d",$type:"color"},100:{$value:"#166534",$type:"color"},200:{$value:"#15803d",$type:"color"},300:{$value:"#16a34a",$type:"color"},400:{$value:"#22c55e",$type:"color"},500:{$value:"#4ade80",$type:"color"},600:{$value:"#86efac",$type:"color"},700:{$value:"#bbf7d0",$type:"color"},800:{$value:"#dcfce7",$type:"color"},900:{$value:"#f0fdf4",$type:"color"}},neutral:{50:{$value:"#141210",$type:"color"},100:{$value:"#1f1c18",$type:"color"},200:{$value:"#352e20",$type:"color"},300:{$value:"#504530",$type:"color"},400:{$value:"#746448",$type:"color"},500:{$value:"#9a8660",$type:"color"},600:{$value:"#bfaa80",$type:"color"},700:{$value:"#dccba5",$type:"color"},800:{$value:"#f0e4c9",$type:"color"},900:{$value:"#fefcf8",$type:"color"}},success:Pt.dark.success,warning:Pt.dark.warning,error:Pt.dark.error,info:Pt.dark.info,surface:{$value:"#1f1c18",$type:"color"},onSurface:{$value:"#fefcf8",$type:"color"},surfaceVariant:{$value:"#352e20",$type:"color"},onSurfaceVariant:{$value:"#dccba5",$type:"color"},container:{$value:"#166534",$type:"color"},onContainer:{$value:"#dcfce7",$type:"color"},outline:{$value:"#504530",$type:"color"},outlineVariant:{$value:"#352e20",$type:"color"},onPrimary:{$value:"#141210",$type:"color"},primaryContainer:{$value:"#166534",$type:"color"},onPrimaryContainer:{$value:"#dcfce7",$type:"color"},onError:{$value:"#450a0a",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecaca",$type:"color"},tertiary:{$value:"#fbbf24",$type:"color"},onTertiary:{$value:"#451a03",$type:"color"},tertiaryContainer:{$value:"#78350f",$type:"color"},onTertiaryContainer:{$value:"#fef3c7",$type:"color"}},font:tr.font,spacing:tr.spacing,shape:tr.shape,motion:tr.motion,accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:oa,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.4,$type:"number"},colors:{$value:["rgba(74, 222, 128, 0.12)","rgba(191, 170, 128, 0.09)","rgba(53, 46, 32, 0.06)"],$type:"array"},background:{$value:"#0a0907",$type:"color"}}},f6={light:u6,dark:d6},p6={...Cc,fast:{$type:"transition",$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"240ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"480ms cubic-bezier(0.4, 0, 0.2, 1)"}},ar={font:{family:{sans:{$value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.75rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)",$type:"shadow"},md:{$value:"0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)",$type:"shadow"},lg:{$value:"0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)",$type:"shadow"},xl:{$value:"0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"240ms",$type:"duration"},slow:{$value:"480ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:p6}},g6={50:{$value:"#fbf2ee",$type:"color"},100:{$value:"#f5dfd4",$type:"color"},200:{$value:"#ecbfa9",$type:"color"},300:{$value:"#df9d80",$type:"color"},400:{$value:"#d6896c",$type:"color"},500:{$value:"#cc785c",$type:"color"},600:{$value:"#b8694f",$type:"color"},700:{$value:"#965240",$type:"color"},800:{$value:"#723e30",$type:"color"},900:{$value:"#4d2920",$type:"color"}},m6={$name:"Claudic",$description:"Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{...g6},neutral:{50:{$value:"#faf9f5",$type:"color"},100:{$value:"#f5f4ee",$type:"color"},200:{$value:"#ebe9df",$type:"color"},300:{$value:"#dad8cc",$type:"color"},400:{$value:"#a8a59f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#56544f",$type:"color"},700:{$value:"#3d3b39",$type:"color"},800:{$value:"#262624",$type:"color"},900:{$value:"#141413",$type:"color"}},success:{50:{$value:"#f4f7ec",$type:"color"},100:{$value:"#e3ecd0",$type:"color"},200:{$value:"#c8d8a5",$type:"color"},500:{$value:"#6b8e3d",$type:"color"},600:{$value:"#587634",$type:"color"},700:{$value:"#465c29",$type:"color"},800:{$value:"#33431e",$type:"color"}},warning:{50:{$value:"#fbf3e3",$type:"color"},100:{$value:"#f6e2bb",$type:"color"},200:{$value:"#eac786",$type:"color"},500:{$value:"#c98e2e",$type:"color"},600:{$value:"#a87725",$type:"color"},700:{$value:"#825c1d",$type:"color"},800:{$value:"#5d4214",$type:"color"}},error:{50:{$value:"#f9ebe7",$type:"color"},100:{$value:"#f1cec5",$type:"color"},200:{$value:"#e3a294",$type:"color"},500:{$value:"#bc4a3a",$type:"color"},600:{$value:"#9d3d30",$type:"color"},700:{$value:"#7a2f25",$type:"color"},800:{$value:"#57211a",$type:"color"}},info:{50:{$value:"#f1f0ee",$type:"color"},100:{$value:"#dedcd8",$type:"color"},200:{$value:"#bdbab4",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#65635f",$type:"color"},700:{$value:"#4d4b48",$type:"color"},800:{$value:"#363432",$type:"color"}},surface:{$value:"#faf9f5",$type:"color"},onSurface:{$value:"#141413",$type:"color"},surfaceVariant:{$value:"#f5f4ee",$type:"color"},onSurfaceVariant:{$value:"#56544f",$type:"color"},container:{$value:"#fbf2ee",$type:"color"},onContainer:{$value:"#4d2920",$type:"color"},outline:{$value:"#dad8cc",$type:"color"},outlineVariant:{$value:"#ebe9df",$type:"color"},onPrimary:{$value:"#faf9f5",$type:"color"},primaryContainer:{$value:"#fbf2ee",$type:"color"},onPrimaryContainer:{$value:"#4d2920",$type:"color"},onError:{$value:"#faf9f5",$type:"color"},errorContainer:{$value:"#f9ebe7",$type:"color"},onErrorContainer:{$value:"#57211a",$type:"color"},tertiary:{$value:"#6b8e3d",$type:"color"},onTertiary:{$value:"#faf9f5",$type:"color"},tertiaryContainer:{$value:"#f4f7ec",$type:"color"},onTertiaryContainer:{$value:"#33431e",$type:"color"}},font:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:0,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#faf9f5",$type:"color"}},accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:oa},h6={$name:"Claudic",$description:"Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{50:{$value:"#4d2920",$type:"color"},100:{$value:"#723e30",$type:"color"},200:{$value:"#965240",$type:"color"},300:{$value:"#b8694f",$type:"color"},400:{$value:"#cc785c",$type:"color"},500:{$value:"#d6896c",$type:"color"},600:{$value:"#df9d80",$type:"color"},700:{$value:"#ecbfa9",$type:"color"},800:{$value:"#f5dfd4",$type:"color"},900:{$value:"#fbf2ee",$type:"color"}},neutral:{50:{$value:"#1a1917",$type:"color"},100:{$value:"#262624",$type:"color"},200:{$value:"#2d2c2a",$type:"color"},300:{$value:"#3d3b39",$type:"color"},400:{$value:"#56544f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#a8a59f",$type:"color"},700:{$value:"#dad8cc",$type:"color"},800:{$value:"#ebe9df",$type:"color"},900:{$value:"#faf9f5",$type:"color"}},success:{50:{$value:"#1c2412",$type:"color"},100:{$value:"#34461e",$type:"color"},200:{$value:"#4a6029",$type:"color"},500:{$value:"#9bb56b",$type:"color"},600:{$value:"#b1c688",$type:"color"},700:{$value:"#c8d8a5",$type:"color"},800:{$value:"#e3ecd0",$type:"color"}},warning:{50:{$value:"#2a1e0c",$type:"color"},100:{$value:"#523915",$type:"color"},200:{$value:"#7a541f",$type:"color"},500:{$value:"#dba14a",$type:"color"},600:{$value:"#e4b46e",$type:"color"},700:{$value:"#eac786",$type:"color"},800:{$value:"#f6e2bb",$type:"color"}},error:{50:{$value:"#2a1410",$type:"color"},100:{$value:"#52271f",$type:"color"},200:{$value:"#7a3a2e",$type:"color"},500:{$value:"#d56b59",$type:"color"},600:{$value:"#df8576",$type:"color"},700:{$value:"#e3a294",$type:"color"},800:{$value:"#f1cec5",$type:"color"}},info:{50:{$value:"#222220",$type:"color"},100:{$value:"#3a3936",$type:"color"},200:{$value:"#56544f",$type:"color"},500:{$value:"#a8a59f",$type:"color"},600:{$value:"#bcbab5",$type:"color"},700:{$value:"#d1cfca",$type:"color"},800:{$value:"#e6e4e0",$type:"color"}},surface:{$value:"#262624",$type:"color"},onSurface:{$value:"#faf9f5",$type:"color"},surfaceVariant:{$value:"#2d2c2a",$type:"color"},onSurfaceVariant:{$value:"#a8a59f",$type:"color"},container:{$value:"#3d3b39",$type:"color"},onContainer:{$value:"#fbf2ee",$type:"color"},outline:{$value:"#3d3b39",$type:"color"},outlineVariant:{$value:"#2d2c2a",$type:"color"},onPrimary:{$value:"#262624",$type:"color"},primaryContainer:{$value:"#723e30",$type:"color"},onPrimaryContainer:{$value:"#f5dfd4",$type:"color"},onError:{$value:"#2a1410",$type:"color"},errorContainer:{$value:"#52271f",$type:"color"},onErrorContainer:{$value:"#f1cec5",$type:"color"},tertiary:{$value:"#9bb56b",$type:"color"},onTertiary:{$value:"#1c2412",$type:"color"},tertiaryContainer:{$value:"#34461e",$type:"color"},onTertiaryContainer:{$value:"#e3ecd0",$type:"color"}},font:ar.font,spacing:ar.spacing,shape:ar.shape,motion:ar.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:0,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#1a1917",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:oa},y6={light:m6,dark:h6},nr={font:{family:{sans:{$value:'"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.9375rem",$type:"dimension"},lg:{$value:"1.0625rem",$type:"dimension"},xl:{$value:"1.3125rem",$type:"dimension"},"2xl":{$value:"1.75rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"680",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.1",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)",$type:"shadow"},md:{$value:"0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)",$type:"shadow"},xl:{$value:"0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"150ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"420ms",$type:"duration"},ambient:{$value:"8000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.32, 0.72, 0, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.16, 1, 0.3, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:Cc}},v6={50:{$value:"#eef2ff",$type:"color"},100:{$value:"#e0e7ff",$type:"color"},200:{$value:"#c7d2fe",$type:"color"},300:{$value:"#a5b4fc",$type:"color"},400:{$value:"#818cf8",$type:"color"},500:{$value:"#4f46e5",$type:"color"},600:{$value:"#4338ca",$type:"color"},700:{$value:"#3730a3",$type:"color"},800:{$value:"#312e81",$type:"color"},900:{$value:"#1e1b4b",$type:"color"}},$6={$name:"Indigo",$description:"Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{...v6},neutral:{50:{$value:"#fafaf7",$type:"color"},100:{$value:"#f4f4f0",$type:"color"},200:{$value:"#e8e7e3",$type:"color"},300:{$value:"#d4d3cf",$type:"color"},400:{$value:"#9c9ba0",$type:"color"},500:{$value:"#6e6d74",$type:"color"},600:{$value:"#4a4954",$type:"color"},700:{$value:"#322f3e",$type:"color"},800:{$value:"#211f2c",$type:"color"},900:{$value:"#15131f",$type:"color"}},success:{50:{$value:"#ecfdf5",$type:"color"},100:{$value:"#d1fae5",$type:"color"},200:{$value:"#a7f3d0",$type:"color"},500:{$value:"#0e9d6e",$type:"color"},600:{$value:"#0b8259",$type:"color"},700:{$value:"#086847",$type:"color"},800:{$value:"#064e36",$type:"color"}},warning:{50:{$value:"#fff8eb",$type:"color"},100:{$value:"#fdecc8",$type:"color"},200:{$value:"#fbd897",$type:"color"},500:{$value:"#e08515",$type:"color"},600:{$value:"#b86b0e",$type:"color"},700:{$value:"#90530a",$type:"color"},800:{$value:"#6b3d07",$type:"color"}},error:{50:{$value:"#fef2f4",$type:"color"},100:{$value:"#fde2e7",$type:"color"},200:{$value:"#fbc5cf",$type:"color"},500:{$value:"#dc2845",$type:"color"},600:{$value:"#b81f38",$type:"color"},700:{$value:"#94182d",$type:"color"},800:{$value:"#701222",$type:"color"}},info:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},500:{$value:"#0891b2",$type:"color"},600:{$value:"#0e7490",$type:"color"},700:{$value:"#155e75",$type:"color"},800:{$value:"#164e63",$type:"color"}},surface:{$value:"#fafaf7",$type:"color"},onSurface:{$value:"#15131f",$type:"color"},surfaceVariant:{$value:"#f4f4f0",$type:"color"},onSurfaceVariant:{$value:"#4a4954",$type:"color"},container:{$value:"#eef2ff",$type:"color"},onContainer:{$value:"#1e1b4b",$type:"color"},outline:{$value:"#d4d3cf",$type:"color"},outlineVariant:{$value:"#e8e7e3",$type:"color"},onPrimary:{$value:"#fafaf7",$type:"color"},primaryContainer:{$value:"#eef2ff",$type:"color"},onPrimaryContainer:{$value:"#1e1b4b",$type:"color"},onError:{$value:"#fafaf7",$type:"color"},errorContainer:{$value:"#fde2e7",$type:"color"},onErrorContainer:{$value:"#701222",$type:"color"},tertiary:{$value:"#7c3aed",$type:"color"},onTertiary:{$value:"#fafaf7",$type:"color"},tertiaryContainer:{$value:"#ede9fe",$type:"color"},onTertiaryContainer:{$value:"#4c1d95",$type:"color"}},font:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.5,$type:"number"},colors:{$value:["#eef2ff","#fafaf7","#e0e7ff"],$type:"array"},background:{$value:"#fafaf7",$type:"color"}},accessibility:{...We.light,focusRing:{...We.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:oa},b6={$name:"Indigo",$description:"Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{50:{$value:"#1e1b4b",$type:"color"},100:{$value:"#312e81",$type:"color"},200:{$value:"#3730a3",$type:"color"},300:{$value:"#4338ca",$type:"color"},400:{$value:"#4f46e5",$type:"color"},500:{$value:"#818cf8",$type:"color"},600:{$value:"#a5b4fc",$type:"color"},700:{$value:"#c7d2fe",$type:"color"},800:{$value:"#e0e7ff",$type:"color"},900:{$value:"#eef2ff",$type:"color"}},neutral:{50:{$value:"#0c0b14",$type:"color"},100:{$value:"#15131f",$type:"color"},200:{$value:"#1d1b29",$type:"color"},300:{$value:"#2a2839",$type:"color"},400:{$value:"#3e3c50",$type:"color"},500:{$value:"#5e5c70",$type:"color"},600:{$value:"#8b8898",$type:"color"},700:{$value:"#b8b6c2",$type:"color"},800:{$value:"#dcdbe2",$type:"color"},900:{$value:"#f5f4f9",$type:"color"}},success:{50:{$value:"#022c1d",$type:"color"},100:{$value:"#064e36",$type:"color"},200:{$value:"#086847",$type:"color"},500:{$value:"#34d399",$type:"color"},600:{$value:"#6ee7b7",$type:"color"},700:{$value:"#a7f3d0",$type:"color"},800:{$value:"#d1fae5",$type:"color"}},warning:{50:{$value:"#3a2104",$type:"color"},100:{$value:"#6b3d07",$type:"color"},200:{$value:"#90530a",$type:"color"},500:{$value:"#f59e0b",$type:"color"},600:{$value:"#fbbf24",$type:"color"},700:{$value:"#fcd34d",$type:"color"},800:{$value:"#fde68a",$type:"color"}},error:{50:{$value:"#3b0a14",$type:"color"},100:{$value:"#701222",$type:"color"},200:{$value:"#94182d",$type:"color"},500:{$value:"#fb7185",$type:"color"},600:{$value:"#fda4af",$type:"color"},700:{$value:"#fecdd3",$type:"color"},800:{$value:"#ffe4e6",$type:"color"}},info:{50:{$value:"#083344",$type:"color"},100:{$value:"#164e63",$type:"color"},200:{$value:"#155e75",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"}},surface:{$value:"#15131f",$type:"color"},onSurface:{$value:"#f5f4f9",$type:"color"},surfaceVariant:{$value:"#221e35",$type:"color"},onSurfaceVariant:{$value:"#c8c6d2",$type:"color"},container:{$value:"#312e81",$type:"color"},onContainer:{$value:"#eef2ff",$type:"color"},outline:{$value:"#3e3c50",$type:"color"},outlineVariant:{$value:"#2a2839",$type:"color"},onPrimary:{$value:"#0c0b14",$type:"color"},primaryContainer:{$value:"#312e81",$type:"color"},onPrimaryContainer:{$value:"#e0e7ff",$type:"color"},onError:{$value:"#3b0a14",$type:"color"},errorContainer:{$value:"#701222",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#a78bfa",$type:"color"},onTertiary:{$value:"#2e1065",$type:"color"},tertiaryContainer:{$value:"#4c1d95",$type:"color"},onTertiaryContainer:{$value:"#ede9fe",$type:"color"}},font:nr.font,spacing:nr.spacing,shape:nr.shape,motion:nr.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.5,$type:"number"},colors:{$value:["#1e1b4b","#0c0b14","#312e81"],$type:"array"},background:{$value:"#0c0b14",$type:"color"}},accessibility:{...We.dark,focusRing:{...We.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:oa},x6={light:$6,dark:b6},j6=new Map([["ggui",e6],["indigo",x6],["claudic",y6],["premium-cyberpunk",n6],["premium-zen",o6],["premium-neon-noir",c6],["premium-botanical",f6]]),Wy=new Map;function _6(e,n){return n==="dark"&&e.dark?"dark":"light"}function S6(e,n="light"){const i=j6.get(e);if(!i)return;const s=_6(i,n),c=`${e}:${s}`,u=Wy.get(c);if(u)return u;const d=s==="dark"?i.dark:i.light,p=Xw(e,d);return Wy.set(c,p),p}function R1(){return"ggui"}O.createContext(null);function w6(e,n="light"){return Xf(R1(),e,n)}function Xf(e,n,i="light"){const s=S6(e,i);if(!s){const p=R1();return e===p?"":Xf(p,n,i)}const c=s.cssVariables.replace(/^:root\s*\{/,`.${n} {`),u=`.${n} {
|
|
106
|
-
font-family: var(--ggui-font-family-sans);
|
|
107
|
-
color: var(--ggui-color-onSurface);
|
|
108
|
-
background-color: transparent;
|
|
109
|
-
}`,d=`.${n} {
|
|
110
|
-
--ggui-color-primary-gradient: linear-gradient(135deg, var(--ggui-color-primary-500) 0%, var(--ggui-color-primary-600) 100%);
|
|
111
|
-
--ggui-color-surface-gradient: linear-gradient(180deg, var(--ggui-color-surface) 0%, color-mix(in srgb, var(--ggui-color-primary-500) 4%, var(--ggui-color-surface)) 100%);
|
|
112
|
-
--ggui-effect-glow-primary: 0 0 0 4px color-mix(in srgb, var(--ggui-color-primary-500) 18%, transparent);
|
|
113
|
-
--ggui-effect-glow-primary-strong: 0 8px 24px -4px color-mix(in srgb, var(--ggui-color-primary-500) 40%, transparent), 0 0 0 1px color-mix(in srgb, var(--ggui-color-primary-500) 30%, transparent) inset;
|
|
114
|
-
}`;return`${c}
|
|
115
|
-
${u}
|
|
116
|
-
${d}
|
|
117
|
-
${s.cssKeyframes}
|
|
118
|
-
.${n} *, .${n} *::before, .${n} *::after { box-sizing: border-box; }
|
|
119
|
-
.${n} h1, .${n} h2, .${n} h3, .${n} h4, .${n} h5, .${n} h6, .${n} button, .${n} input, .${n} textarea, .${n} select { font-family: inherit; }`}var k6=["useAction","useStream","useAuth","useApp","useSession","useGguiContext","useContract","useWireContext","GguiWireProvider"],N6=["Container","Card","Stack","Row","Grid","Box","Divider","Spacer","Text","Heading","Button","Input","TextArea","Select","Checkbox","Toggle","RadioGroup","Slider","Badge","Spinner","Skeleton","Avatar","Alert","Progress","Image","Icon","Link","Tooltip","Table","Tabs","Toast","Accordion","MotionKeyframes","useMotion","useAnimationKey"],z6=["SearchField","FormField","MenuItem","Tag","Dropdown","Autocomplete","Breadcrumb","Pagination","EmptyState","Stat"],C6=["Header","Sidebar","CardGrid","CommentThread","DataTable","ChatWindow","NavigationBar","FileUploader","UserProfileCard","NotificationCenter","Modal","CommandPalette","Footer","Hero","IncidentTimeline","MakeTabLayout","MarketingHero","MarketingCTA","MarketingFeatures"],Xy=["Clickable","Hoverable","Pressable"],E6=["useState","useEffect","useRef","useCallback","useMemo","useContext","useReducer","useId","use","useActionState","useOptimistic","useTransition","startTransition","useDeferredValue","useSyncExternalStore","useInsertionEffect","useLayoutEffect","useImperativeHandle","useDebugValue","createElement","Fragment","Children","cloneElement","createContext","forwardRef","memo","lazy","Suspense","Component","PureComponent","isValidElement","createRef"],T6=["animation","duration","easing","transition","keyframes","thinkingAnimation","thinkingKeyframes","thinkingPresets","THINKING_DEFAULT_STYLE","motionSafe","reducedMotion","reducedMotionCSS","colors","gray","primary","semantic","chartColors","success","warning","error","info","highContrast","typography","fontFamily","fontSize","fontSizeValues","fontWeight","lineHeight","letterSpacing","headingStyles","textStyles","spacing","spacingValues","radius","shadow","elevation","maxWidth","zIndex","accessibility","focusRing","nativeTokens","tokens"];function Lt(e,n,i){return e=e.split(`from"${n}"`).join(`from"${i}"`),e=e.split(`from "${n}"`).join(`from "${i}"`),e=e.split(`from'${n}'`).join(`from'${i}'`),e=e.split(`from '${n}'`).join(`from '${i}'`),e=e.split(`import"${n}"`).join(`import"${i}"`),e=e.split(`import "${n}"`).join(`import "${i}"`),e=e.split(`import'${n}'`).join(`import'${i}'`),e=e.split(`import '${n}'`).join(`import '${i}'`),e}function Jf(e,n){return`(globalThis.__ggui__&&globalThis.__ggui__["${e}"]||window["${n}"])`}function M6(e){const n=E6.map(c=>`export const ${c} = R.${c};`).join(" "),s=`const R = ${Jf("react",e)}; export default R; ${n}`;return`data:text/javascript,${encodeURIComponent(s)}`}function R6(){const i=`const D = globalThis.__ggui__["reactDom"]; export default D; ${["createPortal","flushSync","unstable_batchedUpdates"].map(s=>`export const ${s} = D.${s};`).join(" ")}`;return`data:text/javascript,${encodeURIComponent(i)}`}function O6(e){const i=[`const R = ${Jf("react",e)};`,"function jsx(t,p,k){","if(k!==undefined){p={...p,key:k}}","const c=p.children;","delete p.children;","return Array.isArray(c)?R.createElement(t,p,...c):c!==undefined?R.createElement(t,p,c):R.createElement(t,p)","}","export{jsx,jsx as jsxs,jsx as jsxDEV};","export const Fragment=R.Fragment;"].join("");return`data:text/javascript,${encodeURIComponent(i)}`}function Pn(e,n,i,s,c){if(i&&i.length>0){const p=[e,...s||[]],g=[n,...c||[]],h=p.map((k,b)=>`(globalThis.__ggui__&&globalThis.__ggui__["${g[b]}"]||window["${k}"]||{})`),y=h.join(","),v=i.map(k=>`export const ${k} = M["${k}"];`).join(" "),j=h.length>1?`const M = Object.assign({}, ${y}); ${v} export default M;`:`const M = ${h[0]}; ${v} export default M;`;return`data:text/javascript,${encodeURIComponent(j)}`}const d=`const M = ${Jf(n,e)} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`;return`data:text/javascript,${encodeURIComponent(d)}`}function A6(){const n=`const w = globalThis.__ggui__.wire; ${k6.map(i=>`export const ${i} = w.${i};`).join(" ")} export default w;`;return`data:text/javascript,${encodeURIComponent(n)}`}function D6(e,n){var d;const i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`import\\s*(?:[A-Za-z_$][\\w$]*\\s*,\\s*)?\\{([^}]*)\\}\\s*from\\s*['"]${i}['"]`,"g"),c=new Set;let u;for(;(u=s.exec(e))!==null;)for(const p of u[1].split(",")){const g=(d=p.trim().split(/\s+as\s+/)[0])==null?void 0:d.trim();g!==void 0&&/^[A-Za-z_$][\w$]*$/.test(g)&&c.add(g)}return[...c]}function I6(e,n){const i=JSON.stringify(e),s=n.some(u=>/^[A-Z]/.test(u)),c=[];c.push(`var P=${i};`),c.push("function NS(){return(globalThis.__ggui__&&globalThis.__ggui__.gadgets&&globalThis.__ggui__.gadgets[P])||{};}"),c.push('function H(n){return function(){var f=NS()[n];if(typeof f!=="function")throw new Error("[gadget] export "+n+" from package "+P+" is not loaded — the package failed to load at iframe boot or is not registered on App.gadgets.");return f.apply(this,arguments);};}'),s&&(c.push("var R=globalThis.__ggui__&&globalThis.__ggui__.react;"),c.push('class GEB extends R.Component{constructor(p){super(p);this.state={e:null};}static getDerivedStateFromError(e){return{e:e};}render(){if(this.state.e)return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] "+this.props.g+" failed to render");return this.props.children;}}'),c.push('function C(n){return function(props){var Cmp=NS()[n];if(typeof Cmp!=="function")return R.createElement("div",{style:{padding:"8px",border:"1px solid #e0a0c0",borderRadius:"6px",color:"#a03070",font:"13px system-ui"}},"[gadget] component "+n+" from package "+P+" is not loaded");return R.createElement(GEB,{g:n},R.createElement(Cmp,props));};}'));for(const u of n){const d=/^[A-Z]/.test(u)?"C":"H";c.push(`export const ${u}=${d}(${JSON.stringify(u)});`)}return c.push("export default new Proxy({},{get:function(_,k){return NS()[k];}});"),`data:text/javascript,${encodeURIComponent(c.join(""))}`}function U6(e,n){const i=n.reactGlobal??"__REACT",s=n.primitivesGlobal??"__GGUI_PRIMITIVES",c=n.componentsGlobal??"__GGUI_COMPONENTS",u=n.compositionsGlobal??"__GGUI_COMPOSITIONS",d=n.interactGlobal??"__GGUI_INTERACT",p=n.appComponentsGlobal??"__GGUI_APP_COMPONENTS",g=M6(i),h=O6(i);e=Lt(e,"react/jsx-runtime",h),e=Lt(e,"react/jsx-dev-runtime",h);const y=R6();e=Lt(e,"react-dom",y),e=Lt(e,"react",g);const v=[...N6,...z6,...C6,...Xy];e=Lt(e,"@ggui-ai/design/primitives",Pn(s,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Lt(e,"@ggui-ai/design/components",Pn(c,"components",v,[s,u,d],["primitives","compositions","interact"])),e=Lt(e,"@ggui-ai/design/compositions",Pn(u,"compositions",v,[s,c,d],["primitives","components","interact"])),e=Lt(e,"@ggui-ai/design/interact",Pn(d,"interact",[...Xy])),e=Lt(e,"@ggui-ai/design/templates",Pn(u,"compositions",v,[s,c],["primitives","components"])),e=Lt(e,"@ggui-ai/design/app-components",Pn(p,"appComponents")),e=Lt(e,"@ggui-ai/design/tokens",Pn("__GGUI_TOKENS","tokens",[...T6])),e=Lt(e,"@ggui-ai/design",Pn(s,"primitives",v,[c,u,d],["components","compositions","interact"])),e=Lt(e,"@ggui-ai/wire",A6());const j=[...new Set(["@ggui-ai/gadgets",...n.gadgetPackages??[]])];for(const k of j){const b=D6(e,k);e=Lt(e,k,I6(k,b))}return e}function L6(e,n){const i=n.reactBaseUrl??"https://esm.sh/react@18.2.0";return e=Lt(e,"react/jsx-runtime",`${i}/jsx-runtime`),e=Lt(e,"react/jsx-dev-runtime",`${i}/jsx-runtime`),e=Lt(e,"react",i),e}function V6(e,n){switch(n.mode){case"data-url":return U6(e,n);case"importmap":return L6(e,n)}}var H6=class{constructor(){Bn(this,"tools",new Map)}register(e){this.tools.set(e.name,e)}get(e){return this.tools.get(e)}getExecutor(e){const n=this.tools.get(e);if(!n)throw new Error(`Tool "${e}" not registered. Available tools: ${this.getRegisteredNames().join(", ")}`);return n.execute}has(e){return this.tools.has(e)}getRegisteredNames(){return Array.from(this.tools.keys())}clear(){this.tools.clear()}},O1=new H6;function Bi(e){return O1.register(e),e}function B6(e,n){return e.replace(/\{([^}]+)\}/g,(i,s)=>{const c=Qf(n,s);return c==null?i:String(c)})}function Qf(e,n){const i=n.split(".");let s=e;for(const c of i){if(s==null||typeof s!="object")return;s=s[c]}return s}function Sf(e,n){if(typeof e=="string")return B6(e,n);if(Array.isArray(e))return e.map(i=>Sf(i,n));if(e!==null&&typeof e=="object"){const i={};for(const[s,c]of Object.entries(e))i[s]=Sf(c,n);return i}return e}var q6=Object.defineProperty,Ec=(e,n)=>{for(var i in n)q6(e,i,{get:n[i],enumerable:!0})};const A1=O.createContext(null);function Zr(){const e=O.useContext(A1);if(!e)throw new Error("useWireContext must be used within a WireProvider. Ensure the component is rendered inside a GguiSession.");return e}function wf({config:e,children:n}){return r.jsx(A1.Provider,{value:e,children:n})}const df=new Set;let ff=!1;function P6(e,n){try{return`${e}::${JSON.stringify(n??null)}`}catch{return null}}function Z6(e,n){const i=P6(e,n);return i===null?{suppressed:!1,signature:i}:df.has(i)?{suppressed:!0,signature:i}:(df.add(i),ff||(ff=!0,queueMicrotask(()=>{df.clear(),ff=!1})),{suppressed:!1,signature:i})}function D1(e){const{dispatch:n,onDispatchSuppressed:i}=Zr();return O.useCallback(s=>{const c=Z6(e,s);if(c.suppressed){if(console.warn(`[ggui] useAction('${e}') suppressed a duplicate dispatch (same name + payload, same event-loop task). This usually means two interactive elements nest and both wire to the same action (e.g. a Checkbox onChange inside a Card as={Clickable} onClick); the inner gesture bubbles to the outer handler so one user click would fire the action twice. Wire each useAction callback to exactly ONE interactive surface. Tier-0 'double-wired-action' warns on this at gen time; this runtime defense ensures the user-visible behavior stays correct regardless of code shape.`),i)try{i({actionName:e,payloadSignature:c.signature,payload:s,suppressedAt:Date.now()})}catch(u){console.warn("[ggui] onDispatchSuppressed observer threw — ignoring:",u)}return}n(e,s)},[e,n,i])}function G6(e){var c;const n=e.length===0?"Context":e.charAt(0).toUpperCase()+e.slice(1)+"Context",i=(c=globalThis.__ggui__)==null?void 0:c.contexts,s=i==null?void 0:i[n];if(!s)throw new Error(`[ggui] useGguiContext('${e}'): no Context registered. The contract must declare 'contextSpec.${e}' AND the runtime must have synthesized the per-slot React Context at boot. If you see this in production code generated by the LLM, the boilerplate's destructure line drifted from the contract.`);return O.useContext(s)}function I1(e){const{subscribe:n}=Zr(),[i,s]=O.useState(null),[c,u]=O.useState([]),[d,p]=O.useState(!1),g=O.useRef(c);return g.current=c,O.useEffect(()=>n(e,h=>{const y=h.payload;s(y),h.mode==="replace"?u([y]):u([...g.current,y]),h.complete&&p(!0)}),[e,n]),{latest:i,all:c,isComplete:d}}function F6(e){return{useAction:n=>D1(n),useStream:n=>I1(n)}}function Y6(){const{auth:e}=Zr();return e}function K6(){const{app:e}=Zr();return e}function W6(){const{session:e}=Zr();return e}class X6 extends Error{constructor(i,s,c){super(c?`Client contract violation (${i}): ${c}`:`Client contract violation (${i})`);Bn(this,"direction");Bn(this,"violations");this.name="ClientContractViolationError",this.direction=i,this.violations=s}}function J6(e,n,i){return e?M1({action:n,data:i},e):{valid:!0,violations:[]}}function Q6(e,n,i,s){return T1(n)?By(n,i,e??{},s):e?By(n,i,e,s):{valid:!0,violations:[]}}function ek(e){return l3(e)}function tk(e,n){return Cw(n,e)}function ak(e,n){return e?zw(n,e):{valid:!0,violations:[]}}const nk=Object.freeze(Object.defineProperty({__proto__:null,ClientContractViolationError:X6,GguiWireProvider:wf,buildActionEnvelope:ek,useAction:D1,useApp:K6,useAuth:Y6,useContract:F6,useGguiContext:G6,useSession:W6,useStream:I1,useWireContext:Zr,validateInboundPropsPayload:ak,validateInboundStreamPayload:Q6,validateOutboundActionEnvelope:tk,validateOutboundActionPayload:J6},Symbol.toStringTag,{value:"Module"})),Ea=de({id:F().min(1)}),Tc=F().min(1),U1=dt(["start","center","end","stretch"]),L1=dt(["start","center","end","between","around","evenly"]),rk=Ea.extend({component:Re("Row"),children:pt(Tc).optional(),gap:F().optional(),align:U1.optional(),justify:L1.optional()}),ik=Ea.extend({component:Re("Column"),children:pt(Tc).optional(),gap:F().optional(),align:U1.optional(),justify:L1.optional()}),ok=Ea.extend({component:Re("Card"),child:Tc.optional()}),sk=Ea.extend({component:Re("List"),children:pt(Tc).optional()}),lk=Ea.extend({component:Re("Divider"),orientation:dt(["horizontal","vertical"]).optional()}),ck=Ea.extend({component:Re("Text"),text:F(),variant:F().optional()}),uk=Ea.extend({component:Re("Image"),src:F().min(1),alt:F().optional()}),dk=Ea.extend({component:Re("Icon"),name:F().min(1)}),fk=Ea.extend({component:Re("Button"),label:F()}),pk=Ea.extend({component:Re("TextField"),label:F().optional(),placeholder:F().optional(),value:F().optional()}),gk=Ea.extend({component:Re("CheckBox"),label:F().optional(),checked:Gt().optional()}),mk=de({label:F(),value:F()}),hk=Ea.extend({component:Re("ChoicePicker"),label:F().optional(),options:pt(mk).optional(),value:F().optional()}),yk=ns("component",[rk,ik,ok,sk,lk,ck,uk,dk,fk,pk,gk,hk]),vk="v0.9",ep=Re(vk),tp=F().min(1),$k=de({version:ep,createSurface:de({surfaceId:tp,catalogId:F().min(1)})}),bk=de({version:ep,updateComponents:de({surfaceId:tp,components:pt(yk)})}),xk=de({version:ep,deleteSurface:de({surfaceId:tp})}),jk=hn([$k,bk,xk]);function _k(e){const n=jk.safeParse(e);return n.success?{ok:!0,value:n.data}:{ok:!1,issues:n.error.issues.map(i=>({path:i.path,message:i.message}))}}var kf={};Ec(kf,{Accordion:()=>h8,Alert:()=>e8,Avatar:()=>Vi,Badge:()=>Kk,Box:()=>Ak,Button:()=>Xt,Card:()=>ts,Checkbox:()=>yc,Container:()=>kk,Divider:()=>q1,Grid:()=>Ok,Heading:()=>Mc,Icon:()=>xt,Image:()=>G1,Input:()=>ap,Link:()=>Y1,MotionKeyframes:()=>y8,Progress:()=>Z1,RadioGroup:()=>Zk,Row:()=>hc,Select:()=>P1,Skeleton:()=>Wk,Slider:()=>Gk,Spacer:()=>Dk,Spinner:()=>Za,Stack:()=>Li,Table:()=>s8,Tabs:()=>c8,Text:()=>qr,TextArea:()=>np,Toast:()=>g8,Toggle:()=>Pk,Tooltip:()=>i8,useAnimationKey:()=>$8,useMotion:()=>v8});var Zn={xs:"320px",sm:"480px",md:"640px",lg:"768px",xl:"1024px","2xl":"1280px","3xl":"1536px",full:"100%"},Jt={sm:"4px",md:"6px",lg:"8px",xl:"12px",full:"9999px"},rs={sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},qi={dropdown:1e3,sticky:1100,modal:1400,tooltip:1800},V1={none:"0",xs:"var(--ggui-spacing-xs, 4px)",sm:"var(--ggui-spacing-sm, 8px)",md:"var(--ggui-spacing-md, 16px)",lg:"var(--ggui-spacing-lg, 24px)",xl:"var(--ggui-spacing-xl, 32px)","2xl":"var(--ggui-spacing-2xl, 48px)"},Sk=new Set(Object.keys(V1));function qa(e){if(e!==void 0)return typeof e=="number"?`${e}px`:Sk.has(e)?V1[e]:e}var wk={xs:Zn.xs,sm:Zn.sm,md:Zn.md,lg:Zn.lg,xl:Zn.xl,"2xl":Zn["2xl"],"3xl":Zn["3xl"],full:Zn.full};function kk({children:e,maxWidth:n="lg",center:i=!0,padding:s,style:c,className:u}){const d=wk[n]||n,p=qa(s);return r.jsx("div",{className:u,style:{maxWidth:d,margin:i?"0 auto":void 0,padding:p,width:"100%",...c},children:e})}function Oi(e,n,i,s){return e===void 0?O.createElement("div",{className:i.className,style:i.style},s):O.createElement(e,{...n,className:i.className,style:i.style},s)}function Pi(e){switch(e){case"default":return"var(--ggui-color-onSurface, #18181b)";case"muted":return"var(--ggui-color-onSurfaceVariant, #52525b)";case"subtle":return"var(--ggui-color-neutral-500, #71717a)";case"emphasized":return"var(--ggui-color-primary-700, #0369a1)";case"loud":return"var(--ggui-color-primary-500, #0ea5e9)";case"success":case"warning":case"error":case"info":return`var(--ggui-color-${e}, ${Nk[e]})`;case"inverse":return"var(--ggui-color-surface, #ffffff)";case"inherit":return"inherit"}}var Nk={success:"#15803d",warning:"#b45309",error:"#b91c1c",info:"#0e7490"};function H1(e){switch(e){case"default":case"elevated":return"var(--ggui-color-surface, #ffffff)";case"sunken":return"var(--ggui-color-surfaceVariant, #f4f4f5)";case"accent":return"var(--ggui-color-primary-50, #f0f9ff)";case"inverted":return"var(--ggui-color-onSurface, #18181b)";case"transparent":return"transparent"}}var B1={none:"0",sm:"var(--ggui-shape-radius-sm, 4px)",md:"var(--ggui-shape-radius-md, 8px)",lg:"var(--ggui-shape-radius-lg, 12px)",xl:"var(--ggui-shape-radius-xl, 16px)"},zk=new Set(Object.keys(B1));function es(e){if(e!==void 0)return typeof e=="number"?`${e}px`:zk.has(e)?B1[e]:e}var Ck={none:"none",sm:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.04))",md:"var(--ggui-shape-shadow-md, 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 8px -2px rgba(15, 23, 42, 0.08))",lg:"var(--ggui-shape-shadow-lg, 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 24px -6px rgba(15, 23, 42, 0.10))",xl:"var(--ggui-shape-shadow-xl, 0 4px 8px rgba(15, 23, 42, 0.04), 0 20px 40px -8px rgba(15, 23, 42, 0.14))"};function ts(e){const{children:n,padding:i="lg",shadow:s="sm",border:c=!0,radius:u="lg",surface:d,style:p,className:g,as:h,...y}=e,v=qa(i),k={backgroundColor:H1(d??"default"),borderRadius:es(u),padding:v,boxShadow:Ck[s]||s,border:c?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...p};return Oi(h,y,{className:g,style:k},n)}var Ek={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Tk={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Li(e){const{children:n,direction:i="vertical",gap:s="sm",align:c="stretch",justify:u="start",wrap:d=!1,style:p,className:g,as:h,...y}=e,v=qa(s),j={display:"flex",flexDirection:i==="vertical"?"column":"row",gap:v,alignItems:Tk[c]||c,justifyContent:Ek[u]||u,flexWrap:d?"wrap":"nowrap",...p};return Oi(h,y,{className:g,style:j},n)}function hc(e){return O.createElement(Li,{...e,direction:"horizontal"})}var Mk=[["sm",640],["md",768],["lg",1024],["xl",1280]],pf=e=>`repeat(${e}, minmax(0, 1fr))`;function Rk(e){const n=JSON.stringify(e);let i=0;for(let s=0;s<n.length;s++)i=Math.imul(31,i)+n.charCodeAt(s)|0;return(i>>>0).toString(36)}function Ok(e){const{children:n,columns:i=2,gap:s="md",minColumnWidth:c,style:u,className:d,as:p,...g}=e,h=typeof c=="number"?`${c}px`:c;if(h!==void 0){const v={display:"grid",gridTemplateColumns:`repeat(auto-fill, minmax(${h}, 1fr))`,gap:qa(s),...u};return Oi(p,g,{className:d,style:v},n)}if(typeof i=="object"){const v=`ggui-grid-${Rk(i)}`,j=[`.${v}{grid-template-columns:${pf(i.base??1)}}`];for(const[b,C]of Mk){const z=i[b];typeof z=="number"&&j.push(`@media (min-width:${C}px){.${v}{grid-template-columns:${pf(z)}}}`)}const k={display:"grid",gap:qa(s),...u};return Oi(p,g,{className:d?`${d} ${v}`:v,style:k},r.jsxs(r.Fragment,{children:[r.jsx("style",{children:j.join("")}),n]}))}const y={display:"grid",gridTemplateColumns:pf(i),gap:qa(s),...u};return Oi(p,g,{className:d,style:y},n)}function Ak(e){const{children:n,padding:i,paddingX:s,paddingY:c,margin:u,surface:d,assetColor:p,assetSemantic:g,radius:h,style:y,className:v,as:j,...k}=e;let b;if(s!==void 0||c!==void 0){const $=qa(s)||"0";b=`${qa(c)||"0"} ${$}`}else b=qa(i);const C=p!==void 0&&typeof g=="string"&&g.length>0?p:void 0,z=C||(d?H1(d):void 0),N={padding:b,margin:qa(u),background:z,borderRadius:es(h),...y};return Oi(j,k,{className:v,style:N},n)}function q1({orientation:e="horizontal",margin:n="var(--ggui-spacing-md, 16px)",tone:i,style:s,className:c}){const u=typeof n=="number"?`${n}px`:n,d=i?Pi(i):"var(--ggui-color-outlineVariant, #e4e4e7)";return e==="vertical"?r.jsx("div",{role:"separator","aria-orientation":"vertical",className:c,style:{width:"1px",backgroundColor:d,margin:`0 ${u}`,alignSelf:"stretch",...s}}):r.jsx("hr",{role:"separator","aria-orientation":"horizontal",className:c,style:{border:"none",height:"1px",backgroundColor:d,margin:`${u} 0`,...s}})}function Dk({size:e=16,style:n,className:i}){return e==="flex"?r.jsx("div",{className:i,style:{flex:1,...n}}):r.jsx("div",{className:i,style:{width:`${e}px`,height:`${e}px`,flexShrink:0,...n}})}var ye={xs:"12px",sm:"14px",base:"16px",lg:"18px",xl:"20px","2xl":"24px","3xl":"30px","4xl":"36px","5xl":"48px"},Ue={normal:400,medium:500,semibold:600,bold:700},Nt={tight:1.25,snug:1.375,normal:1.5,relaxed:1.625},Wn={tight:"-0.025em",normal:"0em",wider:"0.05em"},Jy={h1:{fontSize:ye["4xl"],fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Wn.tight},h2:{fontSize:ye["3xl"],fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Wn.tight},h3:{fontSize:ye["2xl"],fontWeight:Ue.semibold,lineHeight:Nt.snug,letterSpacing:Wn.normal},h4:{fontSize:ye.xl,fontWeight:Ue.semibold,lineHeight:Nt.snug,letterSpacing:Wn.normal},h5:{fontSize:ye.lg,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Wn.normal},h6:{fontSize:ye.base,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Wn.normal}},Qy={body:{fontSize:ye.base,fontWeight:Ue.normal,lineHeight:Nt.normal},bodySmall:{fontSize:ye.sm,fontWeight:Ue.normal,lineHeight:Nt.normal},bodyLarge:{fontSize:ye.lg,fontWeight:Ue.normal,lineHeight:Nt.relaxed},caption:{fontSize:ye.xs,fontWeight:Ue.normal,lineHeight:Nt.normal},label:{fontSize:ye.sm,fontWeight:Ue.medium,lineHeight:Nt.normal},overline:{fontSize:ye.xs,fontWeight:Ue.semibold,lineHeight:Nt.normal,letterSpacing:Wn.wider,textTransform:"uppercase"}},Ik={xs:"var(--ggui-font-size-xs, 12px)",sm:"var(--ggui-font-size-sm, 14px)",base:"var(--ggui-font-size-base, 16px)",lg:"var(--ggui-font-size-lg, 18px)",xl:"var(--ggui-font-size-xl, 20px)","2xl":"var(--ggui-font-size-2xl, 24px)","3xl":"var(--ggui-font-size-3xl, 30px)","4xl":"var(--ggui-font-size-4xl, 36px)"},Uk={normal:"var(--ggui-font-weight-normal, 400)",medium:"var(--ggui-font-weight-medium, 500)",semibold:"var(--ggui-font-weight-semibold, 600)",bold:"var(--ggui-font-weight-bold, 700)"};function qr({children:e,variant:n="body",size:i,weight:s,tone:c,align:u,truncate:d,is:p="p",id:g,htmlFor:h,style:y,className:v}){const j=Qy[n]||Qy.body,k=c?Pi(c):"var(--ggui-color-onSurface, #18181b)",b={...j,fontSize:i?Ik[i]||i:void 0,fontWeight:s?Uk[s]:void 0,color:k,textAlign:u,margin:0,...d&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},...y},C={id:g,htmlFor:h,className:v,style:b};return O.createElement(p,C,e)}function Mc({children:e,level:n=2,tone:i,align:s,style:c,className:u}){const d=`h${n}`,p=Jy[d]||Jy.h2,g=i?Pi(i):"var(--ggui-color-onSurface, #18181b)";return O.createElement(d,{className:u,style:{...p,color:g,textAlign:s,margin:0,...c}},e)}function Za({size:e=24,tone:n,style:i,className:s}){const c=n==="inherit"?"currentColor":n?Pi(n):"var(--ggui-color-primary-600, #0284c7)";return r.jsxs("svg",{className:s,width:e,height:e,viewBox:"0 0 24 24",fill:"none",role:"status","aria-label":"Loading",style:{animation:"ggui-spin 1s linear infinite",...i},children:[r.jsx("style",{children:"@keyframes ggui-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"}),r.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"var(--ggui-color-outlineVariant, #e4e4e7)",strokeWidth:"3",fill:"none"}),r.jsx("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:c,strokeWidth:"3",strokeLinecap:"round",fill:"none"})]})}var jt={fast:"100ms",normal:"200ms"},_t={easeOut:"cubic-bezier(0, 0, 0.2, 1)",easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)"},Lk={xs:{padding:"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)",fontSize:"var(--ggui-font-size-xs, 12px)",minHeight:"24px"},sm:{padding:"6px var(--ggui-spacing-4, 12px)",fontSize:"var(--ggui-font-size-sm, 14px)",minHeight:"32px"},md:{padding:"10px var(--ggui-spacing-4, 16px)",fontSize:"var(--ggui-font-size-sm, 14px)",minHeight:"40px"},lg:{padding:"12px var(--ggui-spacing-6, 24px)",fontSize:"var(--ggui-font-size-base, 16px)",minHeight:"48px"}},Vk={primary:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff",border:"none"},secondary:{backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",border:"none"},outline:{backgroundColor:"transparent",color:"var(--ggui-color-primary-600, #0284c7)",border:"1px solid var(--ggui-color-primary-600, #0284c7)"},ghost:{backgroundColor:"transparent",color:"var(--ggui-color-onSurfaceVariant, #52525b)",border:"none"},danger:{backgroundColor:"var(--ggui-color-error-600, #dc2626)",color:"#ffffff",border:"none"}};function Xt({children:e,variant:n="primary",size:i="md",fullWidth:s,loading:c,disabled:u,leftIcon:d,rightIcon:p,type:g="button",onClick:h,onPress:y,style:v,className:j,...k}){const b=u||c,C=h??y;return r.jsx("button",{type:g,onClick:b?void 0:C,disabled:b,className:j,style:{...Lk[i],...Vk[n],display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--ggui-spacing-2, 8px)",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontWeight:"var(--ggui-font-weight-medium, 500)",cursor:b?"not-allowed":"pointer",opacity:b?.5:1,width:s?"100%":void 0,transition:`background-color ${jt.normal} ${_t.easeInOut}, box-shadow ${jt.normal} ${_t.easeInOut}, opacity ${jt.normal} ${_t.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",...v},...k,children:c?r.jsx(Za,{size:16,tone:"inherit"}):r.jsxs(r.Fragment,{children:[d,e,p]})})}var Hk={sm:{padding:"6px 10px",fontSize:"var(--ggui-font-size-sm, 14px)"},md:{padding:"10px 12px",fontSize:"var(--ggui-font-size-sm, 14px)"},lg:{padding:"12px 14px",fontSize:"var(--ggui-font-size-base, 16px)"}};function ap({label:e,placeholder:n,value:i,onChange:s,type:c="text",error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=O.useId(),b=`${k}-input`,C=`${k}-message`,z=!!u,N=!!(u||d);return r.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&r.jsxs("label",{htmlFor:b,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsx("input",{id:b,type:c,placeholder:n,value:i,onChange:$=>s==null?void 0:s($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":N?C:void 0,style:{...Hk[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:"var(--ggui-color-onSurface, #18181b)",transition:`border-color ${jt.normal} ${_t.easeInOut}, box-shadow ${jt.normal} ${_t.easeInOut}`,boxSizing:"border-box"},...j}),N&&r.jsx("span",{id:C,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function np({label:e,placeholder:n,value:i,onChange:s,rows:c=4,error:u,helperText:d,required:p,disabled:g,maxLength:h,showCount:y,autoResize:v,style:j,className:k,...b}){const C=O.useId(),z=`${C}-textarea`,N=`${C}-message`,$=!!u,w=!!(u||d),R=(i==null?void 0:i.length)||0;return r.jsxs("div",{className:k,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...j},children:[e&&r.jsxs("label",{htmlFor:z,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsx("textarea",{id:z,placeholder:n,value:i,onChange:x=>s==null?void 0:s(x.target.value),rows:c,disabled:g,required:p,maxLength:h,"aria-invalid":$||void 0,"aria-describedby":w?N:void 0,style:{padding:"10px 12px",width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${$?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:"var(--ggui-color-onSurface, #18181b)",fontSize:"var(--ggui-font-size-sm, 14px)",fontFamily:"inherit",transition:`border-color ${jt.normal} ${_t.easeInOut}, box-shadow ${jt.normal} ${_t.easeInOut}`,boxSizing:"border-box",resize:v?"none":"vertical"},...b}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[w&&r.jsx("span",{id:N,role:$?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:$?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d}),y&&h&&r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginLeft:"auto"},children:[R,"/",h]})]})]})}var Bk={sm:{padding:"6px 10px",fontSize:"var(--ggui-font-size-sm, 14px)"},md:{padding:"10px 12px",fontSize:"var(--ggui-font-size-sm, 14px)"},lg:{padding:"12px 14px",fontSize:"var(--ggui-font-size-base, 16px)"}};function P1({label:e,value:n,onChange:i,options:s,placeholder:c,error:u,helperText:d,required:p,disabled:g,size:h="md",style:y,className:v,...j}){const k=O.useId(),b=`${k}-select`,C=`${k}-message`,z=!!u,N=!!(u||d);return r.jsxs("div",{className:v,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...y},children:[e&&r.jsxs("label",{htmlFor:b,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[e,p&&r.jsx("span",{"aria-hidden":"true",style:{color:"var(--ggui-color-error-500, #ef4444)",marginLeft:"2px"},children:"*"})]}),r.jsxs("select",{id:b,value:n,onChange:$=>i==null?void 0:i($.target.value),disabled:g,required:p,"aria-invalid":z||void 0,"aria-describedby":N?C:void 0,style:{...Bk[h],width:"100%",borderRadius:"var(--ggui-shape-radius-md, 8px)",border:`1px solid ${z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:g?"var(--ggui-color-surface, #fafafa)":"var(--ggui-color-surface, #ffffff)",color:n?"var(--ggui-color-onSurface, #18181b)":"var(--ggui-color-onSurfaceVariant, #52525b)",cursor:g?"not-allowed":"pointer",appearance:"none",backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",paddingRight:"36px",boxSizing:"border-box",transition:`border-color ${jt.normal} ${_t.easeInOut}, box-shadow ${jt.normal} ${_t.easeInOut}`},...j,children:[c&&r.jsx("option",{value:"",disabled:!0,children:c}),s.map($=>r.jsx("option",{value:$.value,disabled:$.disabled,children:$.label},$.value))]}),N&&r.jsx("span",{id:C,role:z?"alert":void 0,style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:z?"var(--ggui-color-error-500, #ef4444)":"var(--ggui-color-onSurfaceVariant, #52525b)"},children:u||d})]})}function yc({label:e,checked:n,onChange:i,disabled:s,description:c,indeterminate:u,style:d,className:p}){return r.jsxs("label",{className:p,style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:s?"not-allowed":"pointer",opacity:s?.5:1,...d},children:[r.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[r.jsx("input",{type:"checkbox",checked:n,onChange:g=>i==null?void 0:i(g.target.checked),disabled:s,ref:g=>{g&&(g.indeterminate=u||!1)},style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:s?"not-allowed":"pointer"}}),r.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",border:`2px solid ${n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:n||u?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-surface, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},children:(n||u)&&r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{color:"#ffffff"},children:u?r.jsx("path",{d:"M2.5 6H9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}):r.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(e||c)&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[e&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),c&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:c})]})]})}var qk={sm:{width:36,height:20,knob:16},md:{width:44,height:24,knob:20},lg:{width:52,height:28,knob:24}};function Pk({label:e,checked:n,onChange:i,disabled:s,size:c="md",style:u,className:d}){const p=qk[c],[g,h]=O.useState(!1);return r.jsxs("label",{className:d,style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)",cursor:s?"not-allowed":"pointer",opacity:s?.5:1,...u},children:[r.jsx("div",{role:"switch","aria-checked":n,"aria-label":e,tabIndex:s?-1:0,onClick:()=>!s&&(i==null?void 0:i(!n)),onKeyDown:y=>{s||(y.key===" "||y.key==="Enter")&&(y.preventDefault(),i==null||i(!n))},onFocus:()=>h(!0),onBlur:()=>h(!1),style:{width:p.width,height:p.height,borderRadius:"9999px",backgroundColor:n?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)",position:"relative",transition:`background-color ${jt.normal} ${_t.easeInOut}, box-shadow ${jt.normal} ${_t.easeInOut}`,flexShrink:0,outline:"none",boxShadow:g?"0 0 0 3px var(--ggui-color-primary-200, #bae6fd)":void 0},children:r.jsx("div",{style:{width:p.knob,height:p.knob,borderRadius:"50%",backgroundColor:"#ffffff",position:"absolute",top:(p.height-p.knob)/2,left:n?p.width-p.knob-(p.height-p.knob)/2:(p.height-p.knob)/2,transition:`left ${jt.normal} ${_t.easeInOut}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))"}})}),e&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e})]})}function Zk({label:e,value:n,onChange:i,options:s,direction:c="vertical",disabled:u,error:d,style:p,className:g}){const h=O.useId(),y=`${h}-label`,v=`${h}-error`,j=`${h}-radio`,k=!!d;return r.jsxs("div",{role:"radiogroup","aria-labelledby":e?y:void 0,"aria-describedby":k?v:void 0,className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...p},children:[e&&r.jsx("span",{id:y,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),r.jsx("div",{style:{display:"flex",flexDirection:c==="vertical"?"column":"row",gap:c==="vertical"?"var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-4, 16px)",flexWrap:"wrap"},children:s.map(b=>{const C=n===b.value,z=u||b.disabled;return r.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",cursor:z?"not-allowed":"pointer",opacity:z?.5:1},children:[r.jsxs("div",{style:{position:"relative",width:"18px",height:"18px",flexShrink:0,marginTop:"2px"},children:[r.jsx("input",{type:"radio",name:j,value:b.value,checked:C,onChange:()=>i==null?void 0:i(b.value),disabled:z,style:{position:"absolute",width:"18px",height:"18px",margin:0,opacity:0,cursor:z?"not-allowed":"pointer"}}),r.jsx("div",{style:{width:"18px",height:"18px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",border:`2px solid ${C?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-outline, #d4d4d8)"}`,backgroundColor:"var(--ggui-color-surface, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},children:C&&r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:"var(--ggui-color-primary-600, #0284c7)"}})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:b.label}),b.description&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:b.description})]})]},b.value)})}),d&&r.jsx("span",{id:v,role:"alert",style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-error-500, #ef4444)"},children:d})]})}function Gk({label:e,value:n=0,onChange:i,min:s=0,max:c=100,step:u=1,disabled:d,showValue:p,style:g,className:h}){const y=O.useId(),v=`${y}-slider`,j=`${y}-label`,k=(n-s)/(c-s)*100;return r.jsxs("div",{className:h,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",...g},children:[(e||p)&&r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e&&r.jsx("span",{id:j,style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:e}),p&&r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-primary-600, #0284c7)"},children:n})]}),r.jsxs("div",{style:{position:"relative",height:"20px",display:"flex",alignItems:"center"},children:[r.jsx("div",{style:{position:"absolute",width:"100%",height:"6px",borderRadius:"3px",backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)"}}),r.jsx("div",{style:{position:"absolute",width:`${k}%`,height:"6px",borderRadius:"3px",backgroundColor:d?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)",transition:"width 0.1s"}}),r.jsx("input",{id:v,type:"range",min:s,max:c,step:u,value:n,onChange:b=>i==null?void 0:i(Number(b.target.value)),disabled:d,"aria-labelledby":e?j:void 0,"aria-label":e?void 0:"Slider","aria-valuenow":n,"aria-valuemin":s,"aria-valuemax":c,style:{position:"absolute",width:"100%",height:"20px",margin:0,opacity:0,cursor:d?"not-allowed":"pointer",zIndex:1}}),r.jsx("div",{style:{position:"absolute",left:`calc(${k}% - 10px)`,width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"#ffffff",border:`2px solid ${d?"var(--ggui-color-outline, #d4d4d8)":"var(--ggui-color-primary-600, #0284c7)"}`,boxShadow:"var(--ggui-shape-shadow-sm, 0 1px 2px rgba(0,0,0,0.05))",transition:"left 0.1s",pointerEvents:"none"}})]})]})}var Fk={default:{backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},primary:{backgroundColor:"var(--ggui-color-primary-100, #e0f2fe)",color:"var(--ggui-color-primary-700, #0369a1)"},secondary:{backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",color:"var(--ggui-color-onSurface, #18181b)"},success:{backgroundColor:"var(--ggui-color-success-100, #dcfce7)",color:"var(--ggui-color-success-700, #15803d)"},warning:{backgroundColor:"var(--ggui-color-warning-100, #fef3c7)",color:"var(--ggui-color-warning-700, #b45309)"},error:{backgroundColor:"var(--ggui-color-error-100, #fee2e2)",color:"var(--ggui-color-error-700, #b91c1c)"},info:{backgroundColor:"var(--ggui-color-info-100, #cffafe)",color:"var(--ggui-color-info-700, #0e7490)"}},Yk={sm:{padding:"2px 6px",fontSize:"var(--ggui-font-size-xs, 12px)"},md:{padding:"2px 8px",fontSize:"var(--ggui-font-size-xs, 12px)"},lg:{padding:"4px 10px",fontSize:"var(--ggui-font-size-sm, 14px)"}};function Kk({children:e,variant:n="default",size:i="md",pill:s=!0,style:c,className:u}){return r.jsx("span",{className:u,style:{...Fk[n],...Yk[i],display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:"var(--ggui-font-weight-medium, 500)",borderRadius:s?"9999px":"var(--ggui-shape-radius-sm, 4px)",whiteSpace:"nowrap",...c},children:e})}var ev=e=>e===void 0?void 0:typeof e=="number"?`${e}px`:e;function Wk({variant:e="rect",width:n,height:i,radius:s="sm",style:c,className:u}){const d=e==="circle",p=e==="text",g=ev(n)??(d?"2.5rem":"100%"),h=ev(i)??(p?"1em":d?g:"1.25rem"),y={display:"block",width:g,height:h,borderRadius:d?"9999px":es(s),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",animation:"ggui-skeleton-pulse 1.5s ease-in-out infinite",...c};return r.jsx("div",{className:u,style:y,"aria-hidden":"true",children:r.jsx("style",{children:"@keyframes ggui-skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }"})})}var Xk={xs:24,sm:32,md:40,lg:48,xl:64},tv=["var(--ggui-color-primary-500, #0ea5e9)","var(--ggui-color-success-500, #22c55e)","var(--ggui-color-warning-500, #f59e0b)","var(--ggui-color-error-500, #ef4444)","var(--ggui-color-info-500, #06b6d4)"];function Vi({src:e,name:n,size:i="md",shape:s="circle",style:c,className:u}){const[d,p]=O.useState(!1),g=typeof i=="number"?i:Xk[i]||40,h=n?n.split(" ").map(j=>j[0]).join("").toUpperCase().slice(0,2):"?",y=j=>{if(!j)return"var(--ggui-color-outline, #d4d4d8)";const k=j.split("").reduce((b,C)=>b+C.charCodeAt(0),0);return tv[k%tv.length]},v=!e||d;return r.jsx("div",{role:"img","aria-label":n||"Avatar",className:u,style:{width:g,height:g,borderRadius:s==="circle"?"50%":"var(--ggui-shape-radius-md, 8px)",backgroundColor:v?y(n):"transparent",color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:g*.4,fontWeight:"var(--ggui-font-weight-semibold, 600)",overflow:"hidden",flexShrink:0,...c},children:v?h:r.jsx("img",{src:e,alt:n||"Avatar",onError:()=>p(!0),style:{width:"100%",height:"100%",objectFit:"cover"}})})}var Jk={info:{bg:"var(--ggui-color-info-50, #ecfeff)",border:"var(--ggui-color-info-200, #a5f3fc)",text:"var(--ggui-color-info-800, #155e75)",icon:"var(--ggui-color-info-500, #06b6d4)"},success:{bg:"var(--ggui-color-success-50, #f0fdf4)",border:"var(--ggui-color-success-200, #bbf7d0)",text:"var(--ggui-color-success-800, #166534)",icon:"var(--ggui-color-success-500, #22c55e)"},warning:{bg:"var(--ggui-color-warning-50, #fffbeb)",border:"var(--ggui-color-warning-200, #fde68a)",text:"var(--ggui-color-warning-800, #92400e)",icon:"var(--ggui-color-warning-500, #f59e0b)"},error:{bg:"var(--ggui-color-error-50, #fef2f2)",border:"var(--ggui-color-error-200, #fecaca)",text:"var(--ggui-color-error-800, #991b1b)",icon:"var(--ggui-color-error-500, #ef4444)"}},Qk={info:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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"})}),warning:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),error:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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"})})};function e8({children:e,variant:n="info",title:i,closable:s,onClose:c,icon:u,style:d,className:p}){const g=Jk[n];return r.jsxs("div",{role:"alert",className:p,style:{display:"flex",gap:"12px",padding:"12px 16px",borderRadius:"var(--ggui-shape-radius-lg, 12px)",backgroundColor:g.bg,border:`1px solid ${g.border}`,color:g.text,...d},children:[r.jsx("div",{style:{color:g.icon,flexShrink:0},children:u||Qk[n]}),r.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)"},children:[i&&r.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:i}),r.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),s&&r.jsx("button",{onClick:c,"aria-label":"Close",style:{background:"none",border:"none",padding:"4px",cursor:"pointer",color:g.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:"28px",minHeight:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--ggui-shape-radius-sm, 4px)"},children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})}var t8={default:"var(--ggui-color-primary-600, #0284c7)",success:"var(--ggui-color-success-500, #22c55e)",warning:"var(--ggui-color-warning-500, #f59e0b)",error:"var(--ggui-color-error-500, #ef4444)"},a8={sm:4,md:8,lg:12};function Z1({value:e,max:n=100,variant:i="default",size:s="md",label:c,showLabel:u,indeterminate:d,style:p,className:g}){const h=Math.min(100,Math.max(0,e/n*100)),y=a8[s],v=t8[i],j=c??"Progress";return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",...p},children:[u&&r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:j}),r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurface, #18181b)"},children:[Math.round(h),"%"]})]}),r.jsxs("div",{role:"progressbar","aria-valuenow":d?void 0:e,"aria-valuemin":0,"aria-valuemax":n,"aria-label":j,style:{width:"100%",height:y,borderRadius:y/2,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",overflow:"hidden"},children:[r.jsx("div",{style:{height:"100%",borderRadius:y/2,backgroundColor:v,transition:d?"none":"width 0.3s ease",...d?{width:"30%",animation:"ggui-progress-indeterminate 1.5s ease-in-out infinite"}:{width:`${h}%`}}}),d&&r.jsx("style",{children:`@keyframes ggui-progress-indeterminate {
|
|
120
|
-
0% { transform: translateX(-100%); }
|
|
121
|
-
100% { transform: translateX(400%); }
|
|
122
|
-
}`})]})]})}function G1({src:e,alt:n,width:i,height:s,objectFit:c="cover",radius:u,fallback:d,style:p,className:g}){const[h,y]=O.useState(!1),v=j=>{if(j!==void 0)return typeof j=="number"?`${j}px`:j};return h&&d?r.jsx(r.Fragment,{children:d}):h?r.jsx("div",{role:"img","aria-label":`${n} (failed to load)`,className:g,style:{width:v(i)||"100%",height:v(s)||"auto",borderRadius:es(u),backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--ggui-color-outline, #d4d4d8)",...p},children:r.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})})}):r.jsx("img",{src:e,alt:n,onError:()=>y(!0),className:g,style:{width:v(i)||"100%",height:v(s)||"auto",objectFit:c,borderRadius:es(u),display:"block",...p}})}var rp={Sun:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]],Moon:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"}]],Cloud:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"}]],CloudRain:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M16 14v6"}],["path",{d:"M8 14v6"}],["path",{d:"M12 16v6"}]],CloudSnow:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M8 15h.01"}],["path",{d:"M8 19h.01"}],["path",{d:"M12 17h.01"}],["path",{d:"M12 21h.01"}],["path",{d:"M16 15h.01"}],["path",{d:"M16 19h.01"}]],CloudLightning:[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973"}],["path",{d:"m13 12-3 5h4l-3 5"}]],CloudDrizzle:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M8 19v1"}],["path",{d:"M8 14v1"}],["path",{d:"M16 19v1"}],["path",{d:"M16 14v1"}],["path",{d:"M12 21v1"}],["path",{d:"M12 16v1"}]],CloudSun:[["path",{d:"M12 2v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"M20 12h2"}],["path",{d:"m19.07 4.93-1.41 1.41"}],["path",{d:"M15.947 12.65a4 4 0 0 0-5.925-4.128"}],["path",{d:"M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z"}]],CloudMoon:[["path",{d:"M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z"}],["path",{d:"M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36"}]],CloudFog:[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242"}],["path",{d:"M16 17H7"}],["path",{d:"M17 21H9"}]],Wind:[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2"}]],Thermometer:[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z"}]],Droplets:[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97"}]],Umbrella:[["path",{d:"M12 13v7a2 2 0 0 0 4 0"}],["path",{d:"M12 2v2"}],["path",{d:"M20.992 13a1 1 0 0 0 .97-1.274 10.284 10.284 0 0 0-19.923 0A1 1 0 0 0 3 13z"}]],Snowflake:[["path",{d:"m10 20-1.25-2.5L6 18"}],["path",{d:"M10 4 8.75 6.5 6 6"}],["path",{d:"m14 20 1.25-2.5L18 18"}],["path",{d:"m14 4 1.25 2.5L18 6"}],["path",{d:"m17 21-3-6h-4"}],["path",{d:"m17 3-3 6 1.5 3"}],["path",{d:"M2 12h6.5L10 9"}],["path",{d:"m20 10-1.5 2 1.5 2"}],["path",{d:"M22 12h-6.5L14 15"}],["path",{d:"m4 10 1.5 2L4 14"}],["path",{d:"m7 21 3-6-1.5-3"}],["path",{d:"m7 3 3 6h4"}]],Rainbow:[["path",{d:"M22 17a10 10 0 0 0-20 0"}],["path",{d:"M6 17a6 6 0 0 1 12 0"}],["path",{d:"M10 17a2 2 0 0 1 4 0"}]],Home:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]],ArrowLeft:[["path",{d:"m12 19-7-7 7-7"}],["path",{d:"M19 12H5"}]],ArrowRight:[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]],ArrowUp:[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]],ArrowDown:[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]],ChevronLeft:[["path",{d:"m15 18-6-6 6-6"}]],ChevronRight:[["path",{d:"m9 18 6-6-6-6"}]],ChevronUp:[["path",{d:"m18 15-6-6-6 6"}]],ChevronDown:[["path",{d:"m6 9 6 6 6-6"}]],ChevronsLeft:[["path",{d:"m11 17-5-5 5-5"}],["path",{d:"m18 17-5-5 5-5"}]],ChevronsRight:[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]],ChevronsUp:[["path",{d:"m17 11-5-5-5 5"}],["path",{d:"m17 18-5-5-5 5"}]],ChevronsDown:[["path",{d:"m7 6 5 5 5-5"}],["path",{d:"m7 13 5 5 5-5"}]],ExternalLink:[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]],CornerDownLeft:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4"}],["path",{d:"m9 10-5 5 5 5"}]],CornerDownRight:[["path",{d:"m15 10 5 5-5 5"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12"}]],MoveHorizontal:[["path",{d:"m18 8 4 4-4 4"}],["path",{d:"M2 12h20"}],["path",{d:"m6 8-4 4 4 4"}]],MoveVertical:[["path",{d:"M12 2v20"}],["path",{d:"m8 18 4 4 4-4"}],["path",{d:"m8 6 4-4 4 4"}]],Plus:[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]],Minus:[["path",{d:"M5 12h14"}]],X:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],Check:[["path",{d:"M20 6 9 17l-5-5"}]],Search:[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]],Edit:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]],Trash2:[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]],Save:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]],Download:[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]],Upload:[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]],Share2:[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]],Copy:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]],Clipboard:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}]],RotateCcw:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]],RotateCw:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]],RefreshCw:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]],Undo2:[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]],Redo2:[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]],Maximize2:[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]],Minimize2:[["path",{d:"m14 10 7-7"}],["path",{d:"M20 10h-6V4"}],["path",{d:"m3 21 7-7"}],["path",{d:"M4 14h6v6"}]],ZoomIn:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]],ZoomOut:[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]],Send:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]],LogIn:[["path",{d:"m10 17 5-5-5-5"}],["path",{d:"M15 12H3"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}]],LogOut:[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]],Heart:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"}]],Star:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]],ThumbsUp:[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}],["path",{d:"M7 10v12"}]],ThumbsDown:[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z"}],["path",{d:"M17 14V2"}]],MessageCircle:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]],MessageSquare:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]],Bell:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"}]],BellOff:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742"}],["path",{d:"m2 2 20 20"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05"}]],Mail:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}]],Phone:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"}]],PhoneCall:[["path",{d:"M13 2a9 9 0 0 1 9 9"}],["path",{d:"M13 6a5 5 0 0 1 5 5"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"}]],Video:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]],AtSign:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8"}]],Users:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]],UserPlus:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["circle",{cx:"9",cy:"7",r:"4"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11"}]],ShoppingCart:[["circle",{cx:"8",cy:"21",r:"1"}],["circle",{cx:"19",cy:"21",r:"1"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"}]],ShoppingBag:[["path",{d:"M16 10a4 4 0 0 1-8 0"}],["path",{d:"M3.103 6.034h17.794"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z"}]],CreditCard:[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10"}]],DollarSign:[["line",{x1:"12",x2:"12",y1:"2",y2:"22"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"}]],Package:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]],Tag:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]],Receipt:[["path",{d:"M12 17V7"}],["path",{d:"M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z"}]],Wallet:[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"}]],Banknote:[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M6 12h.01M18 12h.01"}]],Percent:[["line",{x1:"19",x2:"5",y1:"5",y2:"19"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5"}]],Gift:[["path",{d:"M12 7v14"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1"}]],Store:[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"}]],Truck:[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"}],["path",{d:"M15 18H9"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"}],["circle",{cx:"17",cy:"18",r:"2"}],["circle",{cx:"7",cy:"18",r:"2"}]],AlertCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]],AlertTriangle:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]],Info:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]],HelpCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]],CheckCircle:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]],XCircle:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Loader:[["path",{d:"M12 2v4"}],["path",{d:"m16.2 7.8 2.9-2.9"}],["path",{d:"M18 12h4"}],["path",{d:"m16.2 16.2 2.9 2.9"}],["path",{d:"M12 18v4"}],["path",{d:"m4.9 19.1 2.9-2.9"}],["path",{d:"M2 12h4"}],["path",{d:"m4.9 4.9 2.9 2.9"}]],Loader2:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],CircleDot:[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"1"}]],ShieldCheck:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]],ShieldAlert:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]],Ban:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M4.929 4.929 19.07 19.071"}]],Play:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]],Pause:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]],Square:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]],SkipBack:[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z"}],["path",{d:"M3 20V4"}]],SkipForward:[["path",{d:"M21 4v16"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z"}]],Volume2:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["path",{d:"M16 9a5 5 0 0 1 0 6"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728"}]],VolumeX:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15"}]],Camera:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z"}],["circle",{cx:"12",cy:"13",r:"3"}]],Image:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]],Film:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M7 3v18"}],["path",{d:"M3 7.5h4"}],["path",{d:"M3 12h18"}],["path",{d:"M3 16.5h4"}],["path",{d:"M17 3v18"}],["path",{d:"M17 7.5h4"}],["path",{d:"M17 16.5h4"}]],Music:[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]],Mic:[["path",{d:"M12 19v3"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3"}]],MicOff:[["path",{d:"M12 19v3"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}]],Headphones:[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3"}]],File:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]],FileText:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]],Folder:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}]],FolderOpen:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]],Database:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]],HardDrive:[["path",{d:"M10 16h.01"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}],["path",{d:"M21.946 12.013H2.054"}],["path",{d:"M6 16h.01"}]],Server:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]],PieChart:[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83"}]],BarChart3:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16"}],["path",{d:"M18 17V9"}],["path",{d:"M13 17V5"}],["path",{d:"M8 17v-3"}]],LineChart:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16"}],["path",{d:"m19 9-5 5-4-4-3 3"}]],TrendingUp:[["path",{d:"M16 7h6v6"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17"}]],TrendingDown:[["path",{d:"M16 17h6v-6"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7"}]],Activity:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]],Menu:[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]],MoreHorizontal:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],MoreVertical:[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"12",cy:"5",r:"1"}],["circle",{cx:"12",cy:"19",r:"1"}]],Grid:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]],List:[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]],Columns:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M12 3v18"}]],Layout:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M9 21V9"}]],Sidebar:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],PanelLeft:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]],PanelRight:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M15 3v18"}]],SlidersHorizontal:[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]],Filter:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]],SortAsc:[["path",{d:"m3 8 4-4 4 4"}],["path",{d:"M7 4v16"}],["path",{d:"M11 12h4"}],["path",{d:"M11 16h7"}],["path",{d:"M11 20h10"}]],SortDesc:[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"M11 4h10"}],["path",{d:"M11 8h7"}],["path",{d:"M11 12h4"}]],Table:[["path",{d:"M12 3v18"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}]],Calendar:[["path",{d:"M8 2v4"}],["path",{d:"M16 2v4"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}],["path",{d:"M3 10h18"}]],Clock:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Timer:[["line",{x1:"10",x2:"14",y1:"2",y2:"2"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11"}],["circle",{cx:"12",cy:"14",r:"8"}]],Hourglass:[["path",{d:"M5 22h14"}],["path",{d:"M5 2h14"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2"}]],User:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]],UserCheck:[["path",{d:"m16 11 2 2 4-4"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["circle",{cx:"9",cy:"7",r:"4"}]],Settings:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]],Sliders:[["path",{d:"M10 8h4"}],["path",{d:"M12 21v-9"}],["path",{d:"M12 8V3"}],["path",{d:"M17 16h4"}],["path",{d:"M19 12V3"}],["path",{d:"M19 21v-5"}],["path",{d:"M3 14h4"}],["path",{d:"M5 10V3"}],["path",{d:"M5 21v-7"}]],Cog:[["path",{d:"M11 10.27 7 3.34"}],["path",{d:"m11 13.73-4 6.93"}],["path",{d:"M12 22v-2"}],["path",{d:"M12 2v2"}],["path",{d:"M14 12h8"}],["path",{d:"m17 20.66-1-1.73"}],["path",{d:"m17 3.34-1 1.73"}],["path",{d:"M2 12h2"}],["path",{d:"m20.66 17-1.73-1"}],["path",{d:"m20.66 7-1.73 1"}],["path",{d:"m3.34 17 1.73-1"}],["path",{d:"m3.34 7 1.73 1"}],["circle",{cx:"12",cy:"12",r:"2"}],["circle",{cx:"12",cy:"12",r:"8"}]],MapPin:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}],["circle",{cx:"12",cy:"10",r:"3"}]],Map:[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}],["path",{d:"M15 5.764v15"}],["path",{d:"M9 3.236v15"}]],Globe:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]],Compass:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"}]],Link:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]],Lock:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}]],Unlock:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1"}]],Key:[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]],Shield:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]],Eye:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],EyeOff:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]],Bookmark:[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z"}]],Flag:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]],Award:[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526"}],["circle",{cx:"12",cy:"8",r:"6"}]],Target:[["circle",{cx:"12",cy:"12",r:"10"}],["circle",{cx:"12",cy:"12",r:"6"}],["circle",{cx:"12",cy:"12",r:"2"}]],Zap:[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]],Flame:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4"}]],Coffee:[["path",{d:"M10 2v2"}],["path",{d:"M14 2v2"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"}],["path",{d:"M6 2v2"}]],Lightbulb:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}],["path",{d:"M9 18h6"}],["path",{d:"M10 22h4"}]],Puzzle:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"}]],Rocket:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05"}]],Code:[["path",{d:"m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]],Terminal:[["path",{d:"M12 19h8"}],["path",{d:"m4 17 6-6-6-6"}]],Braces:[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]],Hash:[["line",{x1:"4",x2:"20",y1:"9",y2:"9"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21"}]],Wifi:[["path",{d:"M12 20h.01"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}]],WifiOff:[["path",{d:"M12 20h.01"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764"}],["path",{d:"m2 2 20 20"}]],Bluetooth:[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17"}]],Battery:[["path",{d:"M 22 14 L 22 10"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2"}]],BatteryCharging:[["path",{d:"m11 7-3 5h4l-3 5"}],["path",{d:"M14.856 6H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935"}],["path",{d:"M22 14v-4"}],["path",{d:"M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936"}]],Power:[["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]],Printer:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1"}]],QrCode:[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3"}],["path",{d:"M21 21v.01"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7"}],["path",{d:"M3 12h.01"}],["path",{d:"M12 3h.01"}],["path",{d:"M12 16v.01"}],["path",{d:"M16 12h1"}],["path",{d:"M21 12v.01"}],["path",{d:"M12 21v-1"}]],Fingerprint:[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02"}],["path",{d:"M2 12a10 10 0 0 1 18-6"}],["path",{d:"M2 16h.01"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2"}]],Gauge:[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]]},F1=new Map;for(const e of Object.keys(rp))F1.set(e.toLowerCase(),e);function n8(e){if(rp[e])return e;const n=e.replace(/[-_]/g,"").toLowerCase();return F1.get(n)}function r8(e,n,i){return r.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.map(([s,c],u)=>Ai.createElement(s,{key:u,...c}))})}function xt({name:e,size:n=24,tone:i,children:s,style:c,className:u,"aria-label":d}){const p=i?Pi(i):"currentColor",g=d?{role:"img","aria-label":d}:{"aria-hidden":!0},h={display:"inline-flex",alignItems:"center",justifyContent:"center",width:n,height:n,color:p,...c};if(s)return r.jsx("span",{className:u,style:h,...g,children:s});if(e){const y=n8(e);if(y)return r.jsx("span",{className:u,style:h,...g,children:r8(rp[y],n,p)})}return e&&/[^\x00-\x7F]/.test(e)?r.jsx("span",{className:u,...g,style:{...h,fontSize:n*.75,lineHeight:1},children:e}):r.jsx("span",{className:u,...g,style:{...h,backgroundColor:"var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",color:"var(--ggui-color-outline, #d4d4d8)",fontSize:n*.5},children:"?"})}function Y1({children:e,href:n,external:i,tone:s,underline:c="hover",style:u,className:d,...p}){const g=s?Pi(s):"var(--ggui-color-primary-600, #0284c7)",h={always:"underline",hover:"none",none:"none"}[c];return r.jsxs("a",{href:n,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,className:d,style:{color:g,textDecoration:h,cursor:"pointer",transition:"color 0.2s",...u},onMouseEnter:y=>{c==="hover"&&(y.target.style.textDecoration="underline")},onMouseLeave:y=>{c==="hover"&&(y.target.style.textDecoration="none")},...p,children:[e,i&&r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",style:{marginLeft:"4px",verticalAlign:"middle"},children:[r.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r.jsx("polyline",{points:"15 3 21 3 21 9"}),r.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]})}function i8({children:e,content:n,position:i="top",delay:s=200,style:c,className:u}){const[d,p]=O.useState(!1),[g,h]=O.useState({top:0,left:0}),y=O.useRef(null),v=O.useRef(null),j=()=>{v.current=setTimeout(()=>{p(!0)},s)},k=()=>{v.current&&clearTimeout(v.current),p(!1)};O.useEffect(()=>{if(d&&y.current){const C=y.current.getBoundingClientRect(),z=8;let N=0,$=0;switch(i){case"top":N=C.top-z,$=C.left+C.width/2;break;case"bottom":N=C.bottom+z,$=C.left+C.width/2;break;case"left":N=C.top+C.height/2,$=C.left-z;break;case"right":N=C.top+C.height/2,$=C.right+z;break}h({top:N,left:$})}},[d,i]),O.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const b=()=>{switch(i){case"top":return"translateX(-50%) translateY(-100%)";case"bottom":return"translateX(-50%)";case"left":return"translateX(-100%) translateY(-50%)";case"right":return"translateY(-50%)"}};return r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,onMouseEnter:j,onMouseLeave:k,onFocus:j,onBlur:k,className:u,style:{display:"inline-block",...c},children:e}),d&&r.jsx("div",{role:"tooltip",style:{position:"fixed",top:g.top,left:g.left,transform:b(),backgroundColor:"var(--ggui-color-onSurface, #18181b)",color:"#ffffff",padding:"6px 10px",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontSize:"var(--ggui-font-size-xs, 12px)",zIndex:qi.tooltip,maxWidth:"200px",pointerEvents:"none",whiteSpace:"nowrap"},children:n})]})}var o8=(e,n)=>r.jsxs("span",{"aria-hidden":"true",style:{display:"inline-flex",flexDirection:"column",marginLeft:"4px",fontSize:"10px",lineHeight:1,opacity:e?1:.3},children:[r.jsx("span",{style:{opacity:e&&n==="asc"?1:.4},children:"▲"}),r.jsx("span",{style:{opacity:e&&n==="desc"?1:.4},children:"▼"})]});function s8({columns:e,data:n,sortKey:i,sortDirection:s="asc",onSort:c,striped:u=!1,hoverable:d=!0,compact:p=!1,bordered:g=!1,caption:h,style:y,className:v}){const[j,k]=O.useState(null),b=p?"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)":"var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)",C=N=>{if(!c)return;c(N,i===N&&s==="asc"?"desc":"asc")},z={padding:b,textAlign:"left",fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",textTransform:"uppercase",letterSpacing:"0.05em",borderBottom:"2px solid var(--ggui-color-outlineVariant, #e4e4e7)",whiteSpace:"nowrap",userSelect:"none"};return r.jsx("div",{className:v,style:{overflowX:"auto",borderRadius:"var(--ggui-shape-radius-lg, 8px)",border:g?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,...y},children:r.jsxs("table",{role:"table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:[h&&r.jsx("caption",{style:{padding:b,fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",textAlign:"left",captionSide:"top"},children:h}),r.jsx("thead",{children:r.jsx("tr",{children:e.map(N=>r.jsx("th",{scope:"col","aria-sort":i===N.key?s==="asc"?"ascending":"descending":void 0,onClick:N.sortable?()=>C(N.key):void 0,onKeyDown:N.sortable?$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),C(N.key))}:void 0,tabIndex:N.sortable?0:void 0,style:{...z,textAlign:N.align||"left",width:N.width,cursor:N.sortable?"pointer":"default"},children:r.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[N.header,N.sortable&&o8(i===N.key,s)]})},N.key))})}),r.jsx("tbody",{children:n.map((N,$)=>r.jsx("tr",{onMouseEnter:d?()=>k($):void 0,onMouseLeave:d?()=>k(null):void 0,style:{backgroundColor:d&&j===$||u&&$%2===1?"var(--ggui-color-surface, #fafafa)":"transparent",transition:"background-color 0.15s ease"},children:e.map(w=>r.jsx("td",{style:{padding:b,textAlign:w.align||"left",borderBottom:"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)",borderRight:g?"1px solid var(--ggui-color-surfaceVariant, #f4f4f5)":void 0},children:w.render?w.render(N[w.key],N,$):N[w.key]},w.key))},$))})]})})}var l8={sm:{padding:"var(--ggui-spacing-1, 4px) var(--ggui-spacing-2, 8px)",fontSize:"var(--ggui-font-size-xs, 12px)"},md:{padding:"var(--ggui-spacing-2, 8px) var(--ggui-spacing-4, 16px)",fontSize:"var(--ggui-font-size-sm, 14px)"},lg:{padding:"var(--ggui-spacing-4, 12px) var(--ggui-spacing-6, 24px)",fontSize:"var(--ggui-font-size-base, 16px)"}};function c8({items:e,activeKey:n,onChange:i,variant:s="line",size:c="md",fullWidth:u=!1,style:d,className:p}){var $;const g=O.useId(),[h,y]=O.useState(($=e[0])==null?void 0:$.key),v=n??h,j=O.useCallback(w=>{i?i(w):y(w)},[i]),k=e.find(w=>w.key===v),b=O.useRef(null),C=O.useCallback(w=>{var T;const R=e.filter(A=>!A.disabled),x=R.findIndex(A=>A.key===v);let _;if(w.key==="ArrowRight"||w.key==="ArrowDown"?(w.preventDefault(),_=(x+1)%R.length):w.key==="ArrowLeft"||w.key==="ArrowUp"?(w.preventDefault(),_=(x-1+R.length)%R.length):w.key==="Home"?(w.preventDefault(),_=0):w.key==="End"&&(w.preventDefault(),_=R.length-1),_!==void 0){const A=R[_];j(A.key);const I=(T=b.current)==null?void 0:T.querySelector(`#${CSS.escape(`${g}-tab-${A.key}`)}`);I==null||I.focus()}},[e,v,g,j]),z=(w,R)=>{const x={...l8[c],display:"inline-flex",alignItems:"center",gap:"var(--ggui-spacing-1, 4px)",cursor:R?"not-allowed":"pointer",opacity:R?.5:1,background:"none",border:"none",fontWeight:w?"var(--ggui-font-weight-semibold, 600)":"var(--ggui-font-weight-medium, 500)",transition:`color ${jt.normal} ${_t.easeInOut}, background-color ${jt.normal} ${_t.easeInOut}, border-color ${jt.normal} ${_t.easeInOut}`,whiteSpace:"nowrap",flex:u?1:void 0,justifyContent:u?"center":void 0};return s==="line"?{...x,color:w?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",borderBottom:w?"2px solid var(--ggui-color-primary-600, #0284c7)":"2px solid transparent",marginBottom:"-1px"}:s==="pills"?{...x,color:w?"#ffffff":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:w?"var(--ggui-color-primary-600, #0284c7)":"transparent",borderRadius:"var(--ggui-shape-radius-md, 6px)"}:{...x,color:w?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-onSurfaceVariant, #52525b)",backgroundColor:w?"var(--ggui-color-surface, #ffffff)":"transparent",border:w?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":"1px solid transparent",borderBottom:w?"1px solid var(--ggui-color-surface, #ffffff)":"1px solid transparent",borderRadius:"var(--ggui-shape-radius-md, 6px) var(--ggui-shape-radius-md, 6px) 0 0",marginBottom:"-1px"}},N={display:"flex",gap:s==="pills"?"var(--ggui-spacing-1, 4px)":"0",borderBottom:s==="line"||s==="enclosed"?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,backgroundColor:s==="pills"?"var(--ggui-color-surfaceVariant, #f4f4f5)":void 0,borderRadius:s==="pills"?"var(--ggui-shape-radius-lg, 8px)":void 0,padding:s==="pills"?"var(--ggui-spacing-1, 4px)":void 0};return r.jsxs("div",{className:p,style:d,children:[r.jsx("div",{ref:b,role:"tablist","aria-orientation":"horizontal",style:N,children:e.map(w=>{const R=w.key===v,x=!!w.disabled;return r.jsxs("button",{role:"tab",id:`${g}-tab-${w.key}`,"aria-selected":R,"aria-controls":`${g}-panel-${w.key}`,"aria-disabled":x,tabIndex:R?0:-1,onClick:x?void 0:()=>j(w.key),onKeyDown:x?void 0:C,style:z(R,x),children:[w.icon,w.label]},w.key)})}),k&&r.jsx("div",{role:"tabpanel",id:`${g}-panel-${k.key}`,"aria-labelledby":`${g}-tab-${k.key}`,tabIndex:0,style:{padding:"var(--ggui-spacing-4, 16px) 0"},children:k.content})]})}var u8={fadeIn:`@keyframes ggui-fadeIn {
|
|
123
|
-
from { opacity: 0; }
|
|
124
|
-
to { opacity: 1; }
|
|
125
|
-
}`,fadeOut:`@keyframes ggui-fadeOut {
|
|
126
|
-
from { opacity: 1; }
|
|
127
|
-
to { opacity: 0; }
|
|
128
|
-
}`,slideInUp:`@keyframes ggui-slideInUp {
|
|
129
|
-
from { opacity: 0; transform: translateY(8px); }
|
|
130
|
-
to { opacity: 1; transform: translateY(0); }
|
|
131
|
-
}`,slideInDown:`@keyframes ggui-slideInDown {
|
|
132
|
-
from { opacity: 0; transform: translateY(-8px); }
|
|
133
|
-
to { opacity: 1; transform: translateY(0); }
|
|
134
|
-
}`,scaleIn:`@keyframes ggui-scaleIn {
|
|
135
|
-
from { opacity: 0; transform: scale(0.95); }
|
|
136
|
-
to { opacity: 1; transform: scale(1); }
|
|
137
|
-
}`,scaleOut:`@keyframes ggui-scaleOut {
|
|
138
|
-
from { opacity: 1; transform: scale(1); }
|
|
139
|
-
to { opacity: 0; transform: scale(0.95); }
|
|
140
|
-
}`,flash:`@keyframes ggui-flash {
|
|
141
|
-
0%, 15% { background-color: var(--ggui-flash-color, var(--ggui-color-primary-100)); }
|
|
142
|
-
100% { background-color: transparent; }
|
|
143
|
-
}`,pulse:`@keyframes ggui-pulse {
|
|
144
|
-
0%, 100% { opacity: 1; }
|
|
145
|
-
50% { opacity: 0.6; }
|
|
146
|
-
}`,bounce:`@keyframes ggui-bounce {
|
|
147
|
-
0% { transform: scale(1); }
|
|
148
|
-
40% { transform: scale(1.06); }
|
|
149
|
-
70% { transform: scale(0.98); }
|
|
150
|
-
100% { transform: scale(1); }
|
|
151
|
-
}`},Nf={fadeIn:`ggui-fadeIn ${jt.normal} ${_t.easeOut} both`,slideInUp:`ggui-slideInUp ${jt.normal} ${_t.easeOut} both`,scaleIn:`ggui-scaleIn ${jt.normal} ${_t.easeOut} both`},d8=`@media (prefers-reduced-motion: reduce) {
|
|
152
|
-
*, *::before, *::after {
|
|
153
|
-
animation-duration: 0.01ms !important;
|
|
154
|
-
animation-iteration-count: 1 !important;
|
|
155
|
-
transition-duration: 0.01ms !important;
|
|
156
|
-
}
|
|
157
|
-
}`,f8={info:{bg:"var(--ggui-color-info-50, #ecfeff)",border:"var(--ggui-color-info-200, #a5f3fc)",text:"var(--ggui-color-info-800, #155e75)",icon:"var(--ggui-color-info-500, #06b6d4)"},success:{bg:"var(--ggui-color-success-50, #f0fdf4)",border:"var(--ggui-color-success-200, #bbf7d0)",text:"var(--ggui-color-success-800, #166534)",icon:"var(--ggui-color-success-500, #22c55e)"},warning:{bg:"var(--ggui-color-warning-50, #fffbeb)",border:"var(--ggui-color-warning-200, #fde68a)",text:"var(--ggui-color-warning-800, #92400e)",icon:"var(--ggui-color-warning-500, #f59e0b)"},error:{bg:"var(--ggui-color-error-50, #fef2f2)",border:"var(--ggui-color-error-200, #fecaca)",text:"var(--ggui-color-error-800, #991b1b)",icon:"var(--ggui-color-error-500, #ef4444)"}},p8={info:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),success:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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"})}),warning:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),error:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",children:r.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"})})};function g8({message:e,variant:n="info",title:i,duration:s=5e3,onClose:c,visible:u=!0,style:d,className:p}){if(O.useEffect(()=>{if(!u||s===0||!c)return;const y=setTimeout(c,s);return()=>clearTimeout(y)},[u,s,c]),!u)return null;const g=f8[n],h={display:"flex",alignItems:"flex-start",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)",borderRadius:"var(--ggui-shape-radius-lg, 8px)",backgroundColor:g.bg,border:`1px solid ${g.border}`,color:g.text,boxShadow:"var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1))",minWidth:"280px",maxWidth:"420px",animation:Nf.slideInUp,...d};return r.jsxs("div",{role:"alert","aria-live":"assertive",className:p,style:h,children:[r.jsx("div",{style:{color:g.icon,flexShrink:0,marginTop:"2px"},children:p8[n]}),r.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"2px"},children:[i&&r.jsx("div",{style:{fontWeight:"var(--ggui-font-weight-semibold, 600)",fontSize:"var(--ggui-font-size-sm, 14px)"},children:i}),r.jsx("div",{style:{fontSize:"var(--ggui-font-size-sm, 14px)"},children:e})]}),c&&r.jsx("button",{onClick:c,"aria-label":"Dismiss notification",style:{background:"none",border:"none",padding:"4px",cursor:"pointer",color:g.text,opacity:.7,flexShrink:0,lineHeight:0,minWidth:"28px",minHeight:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--ggui-shape-radius-sm, 4px)"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor",children:r.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})}var m8=e=>r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",style:{transition:`transform ${jt.normal} ${_t.easeInOut}`,transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:r.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})});function h8({items:e,expandedKeys:n,onChange:i,multiple:s=!1,variant:c="default",style:u,className:d}){const p=O.useId(),[g,h]=O.useState([]),y=n??g,v=b=>{let C;y.includes(b)?C=y.filter(z=>z!==b):s?C=[...y,b]:C=[b],i?i(C):h(C)},j={display:"flex",flexDirection:"column",gap:c==="separated"?"var(--ggui-spacing-2, 8px)":"0",...u},k=(b,C)=>c==="separated"?{border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-lg, 8px)",overflow:"hidden"}:c==="bordered"?{borderLeft:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:b?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0,borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTopLeftRadius:b?"var(--ggui-shape-radius-lg, 8px)":void 0,borderTopRightRadius:b?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomLeftRadius:C?"var(--ggui-shape-radius-lg, 8px)":void 0,borderBottomRightRadius:C?"var(--ggui-shape-radius-lg, 8px)":void 0}:{borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderTop:b?"1px solid var(--ggui-color-outlineVariant, #e4e4e7)":void 0};return r.jsx("div",{className:d,style:j,children:e.map((b,C)=>{const z=y.includes(b.key),N=!!b.disabled,$=C===0,w=C===e.length-1;return r.jsxs("div",{style:k($,w),children:[r.jsx("h3",{style:{margin:0},children:r.jsxs("button",{id:`${p}-header-${b.key}`,"aria-expanded":z,"aria-controls":`${p}-panel-${b.key}`,"aria-disabled":N,onClick:N?void 0:()=>v(b.key),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"var(--ggui-spacing-2, 12px) var(--ggui-spacing-4, 16px)",background:"none",border:"none",cursor:N?"not-allowed":"pointer",opacity:N?.5:1,fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:"var(--ggui-font-weight-medium, 500)",color:"var(--ggui-color-onSurface, #18181b)",textAlign:"left",transition:`background-color ${jt.fast} ${_t.easeInOut}`},children:[r.jsx("span",{children:b.title}),m8(z)]})}),r.jsx("div",{id:`${p}-panel-${b.key}`,role:"region","aria-labelledby":`${p}-header-${b.key}`,hidden:!z,style:{overflow:"hidden"},children:z&&r.jsx("div",{style:{padding:"0 var(--ggui-spacing-4, 16px) var(--ggui-spacing-4, 16px)",fontSize:"var(--ggui-font-size-sm, 14px)",color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"var(--ggui-font-lineHeight-normal, 1.5)"},children:b.content})})]},b.key)})})}var av="ggui-motion-keyframes";function y8(){return O.useEffect(()=>{if(document.getElementById(av))return;const e=document.createElement("style");return e.id=av,e.textContent=[...Object.values(u8),d8].join(`
|
|
158
|
-
|
|
159
|
-
`),document.head.appendChild(e),()=>{e.remove()}},[]),null}function v8(){const[e,n]=O.useState(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return O.useEffect(()=>{const i=window.matchMedia("(prefers-reduced-motion: reduce)"),s=c=>n(!c.matches);return i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),{motionEnabled:e}}function $8(e){const[n,i]=O.useState(0),s=O.useRef(!0);return O.useEffect(()=>{if(s.current){s.current=!1;return}i(c=>c+1)},[e]),n}var zf={};Ec(zf,{Autocomplete:()=>M8,Breadcrumb:()=>R8,Dropdown:()=>T8,EmptyState:()=>A8,FormField:()=>N8,MenuItem:()=>K1,Pagination:()=>O8,SearchField:()=>k8,Stat:()=>D8,Tag:()=>E8});var b8={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",400:"#38bdf8",600:"#0284c7",700:"#0369a1"},x8={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",900:"#111827"},j8={50:"#f0fdf4",200:"#bbf7d0",500:"#22c55e",700:"#15803d"},_8={50:"#fffbeb",200:"#fde68a",500:"#f59e0b",700:"#b45309"},S8={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",500:"#ef4444",600:"#dc2626",700:"#b91c1c"},w8={50:"#ecfeff",200:"#a5f3fc",500:"#06b6d4",700:"#0e7490"},K={primary:b8,gray:x8,success:j8,warning:_8,error:S8,info:w8,white:"#ffffff"};function k8({value:e,onChange:n,onSearch:i,placeholder:s="Search...",showButton:c=!1,buttonText:u="Search",loading:d,disabled:p,size:g="md",style:h,className:y}){const[v,j]=O.useState(""),k=e!==void 0?e:v,b=$=>{e===void 0&&j($),n==null||n($)},C=()=>{i==null||i(k)},z=$=>{$.key==="Enter"&&!p&&C()},N={sm:"sm",md:"md",lg:"md"};return r.jsxs("div",{className:y,style:{display:"flex",gap:"8px",alignItems:"flex-end",...h},children:[r.jsxs("div",{style:{position:"relative",flex:1},children:[r.jsx("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:K.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:d?r.jsx(Za,{size:16}):r.jsx(xt,{name:"search",size:16})}),r.jsx("input",{type:"search",value:k,onChange:$=>b($.target.value),onKeyDown:z,placeholder:s,disabled:p||d,style:{width:"100%",padding:g==="sm"?"6px 10px 6px 36px":g==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:g==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${K.gray[300]}`,backgroundColor:p?K.gray[50]:K.white,color:K.gray[900],outline:"none",boxSizing:"border-box"}})]}),c&&r.jsx(Xt,{onClick:C,disabled:p||d,size:N[g],loading:d,children:u})]})}function N8({label:e,children:n,error:i,helperText:s,required:c,description:u,style:d,className:p}){const g=!!i;return r.jsxs("div",{className:p,style:{display:"flex",flexDirection:"column",gap:"4px",...d},children:[r.jsxs("label",{style:{fontSize:ye.sm,fontWeight:Ue.medium,color:K.gray[700]},children:[e,c&&r.jsx("span",{style:{color:K.error[500],marginLeft:"2px"},children:"*"})]}),u&&r.jsx("span",{style:{fontSize:ye.xs,color:K.gray[500],marginBottom:"4px"},children:u}),n,(i||s)&&r.jsx("span",{style:{fontSize:ye.xs,color:g?K.error[500]:K.gray[500]},children:i||s})]})}function K1({label:e,icon:n,rightElement:i,onClick:s,disabled:c,active:u,danger:d,style:p,className:g}){const h=d?K.error[600]:K.gray[700],y=d?K.error[50]:K.gray[100],v=d?K.error[100]:K.primary[50];return r.jsxs("button",{onClick:c?void 0:s,disabled:c,className:g,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:Jt.md,backgroundColor:u?v:"transparent",color:c?K.gray[400]:h,fontSize:ye.sm,fontWeight:u?Ue.medium:Ue.normal,textAlign:"left",cursor:c?"not-allowed":"pointer",transition:"background-color 0.15s",...p},onMouseEnter:j=>{!c&&!u&&(j.target.style.backgroundColor=y)},onMouseLeave:j=>{!c&&!u&&(j.target.style.backgroundColor="transparent")},children:[n&&r.jsx("span",{style:{display:"flex",flexShrink:0},children:n}),r.jsx("span",{style:{flex:1},children:e}),i&&r.jsx("span",{style:{display:"flex",flexShrink:0,color:K.gray[400]},children:i})]})}var z8={default:{backgroundColor:K.gray[100],color:K.gray[700],border:`1px solid ${K.gray[200]}`},primary:{backgroundColor:K.primary[50],color:K.primary[700],border:`1px solid ${K.primary[200]}`},success:{backgroundColor:K.success[50],color:K.success[700],border:`1px solid ${K.success[200]}`},warning:{backgroundColor:K.warning[50],color:K.warning[700],border:`1px solid ${K.warning[200]}`},error:{backgroundColor:K.error[50],color:K.error[700],border:`1px solid ${K.error[200]}`},info:{backgroundColor:K.info[50],color:K.info[700],border:`1px solid ${K.info[200]}`}},C8={sm:{padding:"2px 6px",fontSize:ye.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:ye.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:ye.sm,gap:"6px"}};function E8({children:e,variant:n="default",size:i="md",closable:s,onClose:c,icon:u,style:d,className:p}){const g=C8[i];return r.jsxs("span",{className:p,style:{display:"inline-flex",alignItems:"center",gap:g.gap,padding:g.padding,fontSize:g.fontSize,fontWeight:Ue.medium,borderRadius:"6px",...z8[n],...d},children:[u&&r.jsx("span",{style:{display:"flex"},children:u}),e,s&&r.jsx("button",{onClick:c,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",color:"inherit",cursor:"pointer",opacity:.7,marginLeft:"2px"},"aria-label":"Remove",children:r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z"})})})]})}function T8({trigger:e,options:n,value:i,onChange:s,placement:c="bottom-start",disabled:u,style:d,className:p}){const[g,h]=O.useState(!1),y=O.useRef(null);O.useEffect(()=>{const k=b=>{y.current&&!y.current.contains(b.target)&&h(!1)};if(g)return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[g]),O.useEffect(()=>{const k=b=>{b.key==="Escape"&&h(!1)};if(g)return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[g]);const v=k=>{s==null||s(k),h(!1)},j=()=>{switch(c){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return r.jsxs("div",{ref:y,className:p,style:{position:"relative",display:"inline-block",...d},children:[r.jsx("div",{onClick:()=>!u&&h(!g),style:{cursor:u?"not-allowed":"pointer"},children:e}),g&&r.jsx("div",{style:{position:"absolute",...j(),minWidth:"160px",backgroundColor:K.white,border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,boxShadow:rs.lg,zIndex:qi.dropdown,padding:"4px"},children:n.map(k=>r.jsx(K1,{label:k.label,icon:k.icon,onClick:()=>v(k.value),disabled:k.disabled,active:i===k.value,danger:k.danger},k.value))})]})}function M8({value:e="",onChange:n,onSelect:i,options:s,placeholder:c,label:u,loading:d,disabled:p,error:g,noResultsText:h="No results found",style:y,className:v}){const[j,k]=O.useState(!1),[b,C]=O.useState(-1),z=O.useRef(null),N=O.useMemo(()=>{if(!e)return s;const x=e.toLowerCase();return s.filter(_=>_.label.toLowerCase().includes(x)||_.value.toLowerCase().includes(x))},[s,e]);O.useEffect(()=>{const x=_=>{z.current&&!z.current.contains(_.target)&&k(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const $=x=>{n==null||n(x),k(!0),C(-1)},w=x=>{n==null||n(x.label),i==null||i(x),k(!1),C(-1)},R=x=>{if(!j){(x.key==="ArrowDown"||x.key==="ArrowUp")&&k(!0);return}switch(x.key){case"ArrowDown":x.preventDefault(),C(_=>_<N.length-1?_+1:_);break;case"ArrowUp":x.preventDefault(),C(_=>_>0?_-1:_);break;case"Enter":x.preventDefault(),b>=0&&N[b]&&w(N[b]);break;case"Escape":k(!1),C(-1);break}};return r.jsxs("div",{ref:z,className:v,style:{position:"relative",...y},children:[r.jsx("div",{onKeyDown:R,children:r.jsx(ap,{label:u,value:e,onChange:$,onFocus:()=>k(!0),placeholder:c,disabled:p,error:g})}),j&&r.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:K.white,border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,boxShadow:rs.lg,zIndex:qi.dropdown,maxHeight:"240px",overflow:"auto"},children:d?r.jsx("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:r.jsx(Za,{size:20})}):N.length===0?r.jsx("div",{style:{padding:"12px",textAlign:"center",color:K.gray[500],fontSize:ye.sm},children:h}):N.map((x,_)=>r.jsxs("div",{onClick:()=>!x.disabled&&w(x),style:{padding:"8px 12px",cursor:x.disabled?"not-allowed":"pointer",backgroundColor:b===_?K.gray[100]:"transparent",color:x.disabled?K.gray[400]:K.gray[900],fontSize:ye.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>C(_),children:[x.icon&&r.jsx("span",{style:{flexShrink:0},children:x.icon}),r.jsxs("div",{style:{flex:1},children:[r.jsx("div",{children:x.label}),x.description&&r.jsx("div",{style:{fontSize:ye.xs,color:K.gray[500]},children:x.description})]})]},x.value))})]})}function R8({items:e,separator:n="/",onItemClick:i,style:s,className:c}){return r.jsx("nav",{"aria-label":"Breadcrumb",className:c,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:ye.sm,...s},children:e.map((u,d)=>{const p=d===e.length-1;return r.jsxs(O.Fragment,{children:[d>0&&r.jsx("span",{style:{color:K.gray[400]},children:n}),u.icon&&r.jsx("span",{style:{display:"flex",alignItems:"center",color:p?K.gray[900]:K.gray[500]},children:u.icon}),p?r.jsx("span",{style:{color:K.gray[900],fontWeight:500},"aria-current":"page",children:u.label}):u.href?r.jsx(Y1,{href:u.href,tone:"muted",underline:"hover",onClick:g=>{i&&(g.preventDefault(),i(u,d))},children:u.label}):r.jsx("button",{onClick:()=>i==null?void 0:i(u,d),style:{background:"none",border:"none",padding:0,color:K.gray[500],cursor:"pointer",fontSize:"inherit"},children:u.label})]},d)})})}function O8({currentPage:e,totalPages:n,onPageChange:i,showFirstLast:s=!0,maxVisible:c=5,size:u="md",disabled:d,style:p,className:g}){const h=()=>{const k=[];if(n<=c)for(let b=1;b<=n;b++)k.push(b);else{k.push(1);const b=Math.floor((c-3)/2);let C=Math.max(2,e-b),z=Math.min(n-1,e+b);e<=b+2&&(z=Math.min(n-1,c-2)),e>=n-b-1&&(C=Math.max(2,n-c+3)),C>2&&k.push("ellipsis");for(let N=C;N<=z;N++)k.push(N);z<n-1&&k.push("ellipsis"),k.push(n)}return k},y=u==="sm"?"xs":u==="lg"?"md":"sm",v=u==="sm"?14:u==="lg"?20:16,j=({page:k,active:b})=>r.jsx("button",{onClick:()=>!d&&(i==null?void 0:i(k)),disabled:d,style:{minWidth:u==="sm"?"28px":u==="lg"?"40px":"32px",height:u==="sm"?"28px":u==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:b?K.primary[600]:"transparent",color:b?K.white:K.gray[700],fontSize:u==="sm"?ye.xs:ye.sm,fontWeight:b?Ue.medium:Ue.normal,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,transition:"all 0.15s"},children:k});return r.jsxs("nav",{"aria-label":"Pagination",className:g,style:{display:"flex",alignItems:"center",gap:"4px",...p},children:[s&&r.jsxs(Xt,{variant:"ghost",size:y,onClick:()=>i==null?void 0:i(1),disabled:d||e===1,"aria-label":"First page",children:[r.jsx(xt,{name:"chevron-left",size:v}),r.jsx(xt,{name:"chevron-left",size:v,style:{marginLeft:"-8px"}})]}),r.jsx(Xt,{variant:"ghost",size:y,onClick:()=>i==null?void 0:i(e-1),disabled:d||e===1,"aria-label":"Previous page",children:r.jsx(xt,{name:"chevron-left",size:v})}),h().map((k,b)=>k==="ellipsis"?r.jsx("span",{style:{padding:"0 4px",color:K.gray[400]},children:"..."},`ellipsis-${b}`):r.jsx(j,{page:k,active:k===e},k)),r.jsx(Xt,{variant:"ghost",size:y,onClick:()=>i==null?void 0:i(e+1),disabled:d||e===n,"aria-label":"Next page",children:r.jsx(xt,{name:"chevron-right",size:v})}),s&&r.jsxs(Xt,{variant:"ghost",size:y,onClick:()=>i==null?void 0:i(n),disabled:d||e===n,"aria-label":"Last page",children:[r.jsx(xt,{name:"chevron-right",size:v}),r.jsx(xt,{name:"chevron-right",size:v,style:{marginLeft:"-8px"}})]})]})}function A8({icon:e,title:n,description:i,action:s,style:c,className:u}){const d={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...c};return r.jsxs(Li,{align:"center",gap:"sm",className:u,style:d,children:[e!==void 0&&(typeof e=="string"?r.jsx(xt,{name:e,size:40,tone:"subtle"}):e),r.jsx(Mc,{level:3,children:n}),i!==void 0&&r.jsx(qr,{tone:"muted",children:i}),s!==void 0&&r.jsx("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:s})]})}function D8({label:e,value:n,delta:i,trend:s="neutral",icon:c,style:u,className:d}){const p=s==="up"?"success":s==="down"?"error":"muted";return r.jsxs(Li,{gap:"xs",className:d,style:u,children:[r.jsxs(hc,{gap:"xs",align:"center",children:[c!==void 0&&(typeof c=="string"?r.jsx(xt,{name:c,size:16,tone:"muted"}):c),r.jsx(qr,{variant:"overline",tone:"muted",children:e})]}),r.jsxs(hc,{gap:"sm",align:"end",children:[r.jsx(qr,{size:"3xl",weight:"bold",children:n}),i!==void 0&&r.jsx(qr,{size:"sm",weight:"semibold",tone:p,children:i})]})]})}var Cf={};Ec(Cf,{CardGrid:()=>L8,ChatWindow:()=>B8,CommandPalette:()=>X8,CommentThread:()=>V8,DataTable:()=>H8,FileUploader:()=>P8,Footer:()=>J8,Header:()=>I8,Hero:()=>Q8,IncidentTimeline:()=>i9,MakeTabLayout:()=>o9,MarketingCTA:()=>u9,MarketingFeatures:()=>l9,MarketingHero:()=>s9,Modal:()=>W8,NavigationBar:()=>q8,NotificationCenter:()=>Y8,Sidebar:()=>U8,UserProfileCard:()=>Z8});function I8({logo:e,navigation:n,actions:i,sticky:s=!1,background:c,bordered:u=!0,style:d,className:p}){return r.jsxs("header",{className:p,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:c||K.white,borderBottom:u?`1px solid ${K.gray[200]}`:void 0,...s&&{position:"sticky",top:0,zIndex:qi.sticky,boxShadow:rs.sm},...d},children:[e&&r.jsx("div",{style:{flexShrink:0},children:e}),n&&r.jsx("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:n}),i&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:i})]})}function W1({item:e,activeId:n,onItemClick:i,collapsed:s,depth:c=0}){const[u,d]=O.useState(!1),p=e.children&&e.children.length>0,g=n===e.id,h=()=>{p&&!s&&d(!u),i==null||i(e)};return r.jsxs("div",{children:[r.jsxs("button",{onClick:h,disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:s?"10px":"10px 12px",paddingLeft:s?"10px":`${12+c*16}px`,border:"none",borderRadius:Jt.md,backgroundColor:g?K.primary[50]:"transparent",color:e.disabled?K.gray[400]:g?K.primary[700]:K.gray[700],fontSize:ye.sm,fontWeight:g?Ue.medium:Ue.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:s?"center":"flex-start"},children:[e.icon&&r.jsx("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!s&&r.jsxs(r.Fragment,{children:[r.jsx("span",{style:{flex:1},children:e.label}),e.badge&&r.jsx("span",{children:e.badge}),p&&r.jsx(xt,{name:u?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),p&&u&&!s&&r.jsx("div",{style:{marginTop:"4px"},children:e.children.map(y=>r.jsx(W1,{item:y,activeId:n,onItemClick:i,collapsed:s,depth:c+1},y.id))})]})}function U8({items:e,activeId:n,onItemClick:i,collapsed:s=!1,header:c,footer:u,width:d=256,collapsedWidth:p=64,style:g,className:h}){const y=s?p:d;return r.jsxs("aside",{className:h,style:{width:y,minWidth:y,height:"100%",display:"flex",flexDirection:"column",backgroundColor:K.white,borderRight:`1px solid ${K.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...g},children:[c&&r.jsx("div",{style:{padding:s?"16px 8px":"16px",borderBottom:`1px solid ${K.gray[200]}`},children:c}),r.jsx("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(v=>r.jsx(W1,{item:v,activeId:n,onItemClick:i,collapsed:s},v.id))})}),u&&r.jsx("div",{style:{padding:s?"16px 8px":"16px",borderTop:`1px solid ${K.gray[200]}`},children:u})]})}function L8({children:e,columns:n=3,gap:i=16,style:s,className:c}){const u=()=>typeof n=="number"?`repeat(${n}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))";return r.jsx("div",{className:c,style:{display:"grid",gridTemplateColumns:u(),gap:`${i}px`,...s},children:e})}function X1({comment:e,onReply:n,onReaction:i,depth:s=0}){var y,v;const[c,u]=O.useState(!1),[d,p]=O.useState(""),g=()=>{d.trim()&&(n==null||n(e.id,d),p(""),u(!1))},h=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return r.jsxs("div",{style:{marginLeft:s>0?"40px":0},children:[r.jsxs("div",{style:{display:"flex",gap:"12px"},children:[r.jsx(Vi,{name:e.author.name,src:e.author.avatar,size:"sm"}),r.jsxs("div",{style:{flex:1},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.jsx("span",{style:{fontWeight:500,fontSize:ye.sm},children:e.author.name}),r.jsx("span",{style:{color:K.gray[500],fontSize:ye.xs},children:h})]}),r.jsx("p",{style:{margin:"4px 0 8px",fontSize:ye.sm,color:K.gray[700]},children:e.content}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(y=e.reactions)==null?void 0:y.map(j=>r.jsxs("button",{onClick:()=>i==null?void 0:i(e.id,j.emoji),style:{padding:"2px 8px",border:`1px solid ${K.gray[200]}`,borderRadius:"12px",backgroundColor:K.gray[50],fontSize:ye.xs,cursor:"pointer"},children:[j.emoji," ",j.count]},j.emoji)),r.jsx("button",{onClick:()=>u(!c),style:{background:"none",border:"none",color:K.gray[500],fontSize:ye.xs,cursor:"pointer"},children:"Reply"})]}),c&&r.jsxs("div",{style:{marginTop:"12px"},children:[r.jsx(np,{value:d,onChange:p,placeholder:"Write a reply...",rows:2}),r.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[r.jsx(Xt,{size:"sm",onClick:g,children:"Reply"}),r.jsx(Xt,{size:"sm",variant:"ghost",onClick:()=>u(!1),children:"Cancel"})]})]})]})]}),(v=e.replies)==null?void 0:v.map(j=>r.jsx("div",{style:{marginTop:"16px"},children:r.jsx(X1,{comment:j,onReply:n,onReaction:i,depth:s+1})},j.id))]})}function V8({comments:e,currentUser:n,onAddComment:i,onReply:s,onReaction:c,loading:u,style:d,className:p}){const[g,h]=O.useState(""),y=()=>{g.trim()&&(i==null||i(g),h(""))};return r.jsxs("div",{className:p,style:{...d},children:[n&&r.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[r.jsx(Vi,{name:n.name,src:n.avatar,size:"sm"}),r.jsxs("div",{style:{flex:1},children:[r.jsx(np,{value:g,onChange:h,placeholder:"Write a comment...",rows:3}),r.jsx("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:r.jsx(Xt,{onClick:y,disabled:!g.trim(),children:"Comment"})})]})]}),u?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:r.jsx(Za,{size:24})}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(v=>r.jsx(X1,{comment:v,onReply:s,onReaction:c},v.id))})]})}function H8({columns:e,data:n,rowKey:i="id",loading:s,emptyText:c="No data",onSort:u,sortKey:d,sortDirection:p,onRowClick:g,selectable:h,selectedKeys:y=[],onSelectionChange:v,style:j,className:k}){const b=(w,R)=>typeof i=="function"?i(w):String(w[i]??R),C=w=>{w?v==null||v(n.map((R,x)=>b(R,x))):v==null||v([])},z=(w,R)=>{R?v==null||v([...y,w]):v==null||v(y.filter(x=>x!==w))},N=n.length>0&&y.length===n.length,$=y.length>0&&y.length<n.length;return r.jsx("div",{className:k,style:{border:`1px solid ${K.gray[200]}`,borderRadius:"8px",overflow:"hidden",...j},children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:ye.sm},children:[r.jsx("thead",{children:r.jsxs("tr",{style:{backgroundColor:K.gray[50]},children:[h&&r.jsx("th",{style:{width:"40px",padding:"12px"},children:r.jsx(yc,{checked:N,indeterminate:$,onChange:C})}),e.map(w=>r.jsx("th",{style:{padding:"12px 16px",textAlign:w.align||"left",fontWeight:Ue.semibold,color:K.gray[700],borderBottom:`1px solid ${K.gray[200]}`,cursor:w.sortable?"pointer":void 0,width:w.width},onClick:()=>w.sortable&&(u==null?void 0:u(w.key,d===w.key&&p==="asc"?"desc":"asc")),children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[w.header,w.sortable&&d===w.key&&r.jsx(xt,{name:p==="asc"?"chevron-up":"chevron-down",size:14})]})},w.key))]})}),r.jsx("tbody",{children:s?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center"},children:r.jsx(Za,{size:24})})}):n.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length+(h?1:0),style:{padding:"48px",textAlign:"center",color:K.gray[500]},children:c})}):n.map((w,R)=>{const x=b(w,R),_=y.includes(x);return r.jsxs("tr",{onClick:()=>g==null?void 0:g(w,R),style:{backgroundColor:_?K.primary[50]:void 0,cursor:g?"pointer":void 0,transition:"background-color 0.15s"},children:[h&&r.jsx("td",{style:{padding:"12px"},children:r.jsx(yc,{checked:_,onChange:T=>z(x,T)})}),e.map(T=>r.jsx("td",{style:{padding:"12px 16px",textAlign:T.align||"left",color:K.gray[900],borderBottom:`1px solid ${K.gray[100]}`},children:T.render?T.render(w[T.key],w,R):String(w[T.key]??"")},T.key))]},x)})})]})})}function B8({messages:e,currentUserId:n,onSendMessage:i,loading:s,typing:c,placeholder:u="Type a message...",header:d,style:p,className:g}){const[h,y]=O.useState(""),v=O.useRef(null);O.useEffect(()=>{var b;(b=v.current)==null||b.scrollIntoView({behavior:"smooth"})},[e]);const j=()=>{h.trim()&&(i==null||i(h),y(""))},k=b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),j())};return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${K.gray[200]}`,borderRadius:Jt.lg,backgroundColor:K.white,overflow:"hidden",...p},children:[d&&r.jsx("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${K.gray[200]}`},children:d}),r.jsxs("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[s?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:r.jsx(Za,{size:24})}):e.map(b=>{const C=b.sender.id===n,z=b.timestamp instanceof Date?b.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):b.timestamp;return r.jsxs("div",{style:{display:"flex",flexDirection:C?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!C&&r.jsx(Vi,{name:b.sender.name,src:b.sender.avatar,size:"xs"}),r.jsxs("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Jt.lg,backgroundColor:C?K.primary[600]:K.gray[100],color:C?K.white:K.gray[900]},children:[r.jsx("p",{style:{margin:0,fontSize:ye.sm},children:b.content}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:ye.xs,opacity:.7},children:[r.jsx("span",{children:z}),C&&b.status&&r.jsxs("span",{children:[b.status==="sending"&&"•",b.status==="sent"&&"✓",b.status==="delivered"&&"✓✓",b.status==="read"&&"✓✓",b.status==="error"&&"!"]})]})]})]},b.id)}),c&&r.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:r.jsxs("span",{style:{fontSize:ye.xs,color:K.gray[500]},children:[c.name," is typing..."]})}),r.jsx("div",{ref:v})]}),r.jsxs("div",{style:{padding:"12px 16px",borderTop:`1px solid ${K.gray[200]}`,display:"flex",gap:"8px"},children:[r.jsx("input",{type:"text",value:h,onChange:b=>y(b.target.value),onKeyDown:k,placeholder:u,style:{flex:1,padding:"10px 14px",border:`1px solid ${K.gray[300]}`,borderRadius:Jt.full,fontSize:ye.sm,outline:"none"}}),r.jsx(Xt,{onClick:j,disabled:!h.trim(),children:r.jsx(xt,{name:"chevron-right",size:18})})]})]})}function q8({items:e,activeId:n,onItemClick:i,orientation:s="horizontal",variant:c="default",style:u,className:d}){const p=g=>{const h=n===g.id,y={display:"flex",alignItems:"center",gap:"8px",padding:s==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:ye.sm,cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},v={default:{fontWeight:h?Ue.medium:Ue.normal,color:h?K.primary[600]:K.gray[600]},pills:{borderRadius:Jt.full,backgroundColor:h?K.primary[100]:"transparent",color:h?K.primary[700]:K.gray[600],fontWeight:h?Ue.medium:Ue.normal},underline:{borderBottom:h?`2px solid ${K.primary[600]}`:"2px solid transparent",color:h?K.primary[600]:K.gray[600],fontWeight:h?Ue.medium:Ue.normal,borderRadius:0}},j=()=>{g.disabled||i==null||i(g)},k=r.jsxs(r.Fragment,{children:[g.icon&&r.jsx("span",{style:{display:"flex"},children:g.icon}),r.jsx("span",{children:g.label})]});return g.href?r.jsx("a",{href:g.href,onClick:b=>{b.preventDefault(),j()},style:{...y,...v[c]},children:k},g.id):r.jsx("button",{onClick:j,disabled:g.disabled,style:{...y,...v[c]},children:k},g.id)};return r.jsx("nav",{className:d,style:{display:"flex",flexDirection:s==="horizontal"?"row":"column",gap:s==="horizontal"?"4px":"2px",...c==="underline"&&s==="horizontal"&&{borderBottom:`1px solid ${K.gray[200]}`},...u},children:e.map(p)})}function nv(e){if(e===0)return"0 B";const n=1024,i=["B","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/Math.pow(n,s)).toFixed(1))} ${i[s]}`}function P8({files:e=[],onFilesSelected:n,onFileRemove:i,accept:s,multiple:c=!0,maxSize:u,maxFiles:d,disabled:p,dragDrop:g=!0,style:h,className:y}){const[v,j]=O.useState(!1),k=O.useRef(null),b=$=>{if(!$)return;let w=Array.from($);d&&(w=w.slice(0,d-e.length)),u&&(w=w.filter(R=>R.size<=u)),n==null||n(w)},C=$=>{$.preventDefault(),j(!1),!p&&g&&b($.dataTransfer.files)},z=$=>{$.preventDefault(),!p&&g&&j(!0)},N=()=>{j(!1)};return r.jsxs("div",{className:y,style:{...h},children:[r.jsxs("div",{onClick:()=>{var $;return!p&&(($=k.current)==null?void 0:$.click())},onDrop:C,onDragOver:z,onDragLeave:N,style:{border:`2px dashed ${v?K.primary[400]:K.gray[300]}`,borderRadius:Jt.lg,padding:"32px",textAlign:"center",backgroundColor:v?K.primary[50]:K.gray[50],cursor:p?"not-allowed":"pointer",transition:"all 0.2s",opacity:p?.5:1},children:[r.jsx("input",{ref:k,type:"file",accept:s,multiple:c,onChange:$=>b($.target.files),disabled:p,style:{display:"none"}}),r.jsx(xt,{name:"plus",size:32,tone:"subtle"}),r.jsx("p",{style:{margin:"12px 0 4px",color:K.gray[700],fontSize:ye.sm},children:g?"Drag and drop files here, or click to browse":"Click to browse files"}),r.jsxs("p",{style:{margin:0,color:K.gray[500],fontSize:ye.xs},children:[s&&`Accepted: ${s}`,u&&` • Max size: ${nv(u)}`,d&&` • Max files: ${d}`]})]}),e.length>0&&r.jsx("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map($=>r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${K.gray[200]}`,borderRadius:Jt.md,backgroundColor:K.white},children:[r.jsx(xt,{name:"menu",size:20,tone:"subtle"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{margin:0,fontSize:ye.sm,color:K.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:$.name}),r.jsxs("p",{style:{margin:"2px 0 0",fontSize:ye.xs,color:K.gray[500]},children:[nv($.size),$.error&&r.jsx("span",{style:{color:K.error[500],marginLeft:"8px"},children:$.error})]}),$.status==="uploading"&&$.progress!==void 0&&r.jsx(Z1,{value:$.progress,size:"sm",style:{marginTop:"8px"}})]}),r.jsx(Xt,{variant:"ghost",size:"sm",onClick:()=>i==null?void 0:i($.id),children:r.jsx(xt,{name:"x",size:16})})]},$.id))})]})}function Z8({name:e,subtitle:n,avatar:i,coverImage:s,bio:c,stats:u,actions:d,compact:p,style:g,className:h}){return p?r.jsx(ts,{className:h,style:{padding:"16px",...g},children:r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[r.jsx(Vi,{name:e,src:i,size:"md"}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:ye.sm},children:e}),n&&r.jsx("p",{style:{margin:"2px 0 0",color:K.gray[500],fontSize:ye.xs},children:n})]}),d]})}):r.jsxs(ts,{className:h,style:{padding:0,overflow:"hidden",...g},children:[s&&r.jsx("div",{style:{height:"120px",backgroundImage:`url(${s})`,backgroundSize:"cover",backgroundPosition:"center"}}),r.jsxs("div",{style:{padding:"16px",paddingTop:s?"0":"16px",textAlign:"center"},children:[r.jsx("div",{style:{marginTop:s?"-40px":"0",marginBottom:"12px"},children:r.jsx(Vi,{name:e,src:i,size:"xl",style:{border:`4px solid ${K.white}`,margin:"0 auto"}})}),r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:ye.lg},children:e}),n&&r.jsx("p",{style:{margin:"4px 0 0",color:K.gray[500],fontSize:ye.sm},children:n}),c&&r.jsx("p",{style:{margin:"12px 0 0",color:K.gray[600],fontSize:ye.sm,lineHeight:1.5},children:c}),u&&u.length>0&&r.jsx("div",{style:{display:"flex",justifyContent:"center",gap:"24px",marginTop:"16px",paddingTop:"16px",borderTop:`1px solid ${K.gray[200]}`},children:u.map((y,v)=>r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.semibold,color:K.gray[900],fontSize:ye.lg},children:y.value}),r.jsx("p",{style:{margin:"2px 0 0",color:K.gray[500],fontSize:ye.xs},children:y.label})]},v))}),d&&r.jsx("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"8px"},children:d})]})]})}var G8={info:K.info[500],success:K.success[500],warning:K.warning[500],error:K.error[500]};function F8({notification:e,onMarkAsRead:n,onDismiss:i}){const s=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,c=G8[e.type||"info"];return r.jsxs("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":K.primary[50],borderRadius:Jt.md,transition:"background-color 0.15s"},children:[r.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":c,flexShrink:0,marginTop:"6px"}}),r.jsxs("div",{style:{flex:1,minWidth:0},children:[r.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[r.jsx("p",{style:{margin:0,fontWeight:Ue.medium,color:K.gray[900],fontSize:ye.sm},children:e.title}),r.jsx("button",{onClick:()=>i==null?void 0:i(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:K.gray[400],flexShrink:0},children:r.jsx(xt,{name:"x",size:14})})]}),e.message&&r.jsx("p",{style:{margin:"4px 0 0",color:K.gray[600],fontSize:ye.xs},children:e.message}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[r.jsx("span",{style:{color:K.gray[400],fontSize:ye.xs},children:s}),!e.read&&r.jsx("button",{onClick:()=>n==null?void 0:n(e.id),style:{background:"none",border:"none",padding:0,color:K.primary[600],fontSize:ye.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&r.jsx("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:K.primary[600],fontSize:ye.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function Y8({notifications:e,onMarkAsRead:n,onMarkAllAsRead:i,onDismiss:s,onClearAll:c,emptyText:u="No notifications",loading:d,style:p,className:g}){const h=e.filter(y=>!y.read).length;return r.jsxs("div",{className:g,style:{display:"flex",flexDirection:"column",...p},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${K.gray[200]}`},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[r.jsx("span",{style:{fontWeight:Ue.semibold,color:K.gray[900]},children:"Notifications"}),h>0&&r.jsx("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:K.primary[100],color:K.primary[700],fontSize:ye.xs,fontWeight:Ue.medium},children:h})]}),r.jsxs("div",{style:{display:"flex",gap:"8px"},children:[h>0&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:i,children:"Mark all read"}),e.length>0&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:c,children:"Clear all"})]})]}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:d?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:r.jsx(Za,{size:24})}):e.length===0?r.jsx("div",{style:{textAlign:"center",padding:"32px",color:K.gray[500]},children:u}):r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(y=>r.jsx(F8,{notification:y,onMarkAsRead:n,onDismiss:s},y.id))})})]})}var K8={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"};function W8({open:e,onClose:n,title:i,children:s,footer:c,size:u="md",closeOnOverlayClick:d=!0,closeOnEscape:p=!0,showCloseButton:g=!0,style:h,className:y}){const v=O.useCallback(b=>{b.key==="Escape"&&p&&n()},[p,n]);if(O.useEffect(()=>{if(e)return document.addEventListener("keydown",v),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",v),document.body.style.overflow=""}},[e,v]),!e)return null;const j=b=>{b.target===b.currentTarget&&d&&n()},k=u==="full";return r.jsxs("div",{style:{position:"fixed",inset:0,zIndex:qi.modal,display:"flex",alignItems:k?"stretch":"center",justifyContent:"center",padding:k?0:"24px"},children:[r.jsx("div",{onClick:j,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:Nf.fadeIn}}),r.jsxs("div",{role:"dialog","aria-modal":"true",className:y,style:{position:"relative",width:K8[u],maxWidth:k?"100%":"calc(100vw - 48px)",maxHeight:k?"100%":"calc(100vh - 48px)",backgroundColor:K.white,borderRadius:k?0:Jt.xl,boxShadow:rs["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:Nf.scaleIn,...h},children:[(i||g)&&r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${K.gray[200]}`},children:[i&&r.jsx(Mc,{level:4,children:i}),g&&r.jsx(Xt,{variant:"ghost",size:"sm",onClick:n,"aria-label":"Close modal",style:{marginLeft:"auto"},children:r.jsx(xt,{name:"x",size:20})})]}),r.jsx("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:s}),c&&r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${K.gray[200]}`},children:c})]})]})}function X8({open:e,onClose:n,commands:i,onSelect:s,placeholder:c="Search commands...",recentIds:u=[],loading:d,style:p,className:g}){const[h,y]=O.useState(""),[v,j]=O.useState(0),k=O.useMemo(()=>{const N=h?i.filter(w=>{var R;return w.label.toLowerCase().includes(h.toLowerCase())||((R=w.description)==null?void 0:R.toLowerCase().includes(h.toLowerCase()))}):i,$=new Map;if(!h&&u.length>0){const w=u.map(R=>i.find(x=>x.id===R)).filter(Boolean);w.length>0&&$.set("Recent",w)}return N.forEach(w=>{const R=w.group||"Commands";$.has(R)||$.set(R,[]),!(!h&&u.includes(w.id)&&$.has("Recent"))&&$.get(R).push(w)}),$},[i,h,u]),b=O.useMemo(()=>{const N=[];return k.forEach($=>N.push(...$)),N},[k]);O.useEffect(()=>{j(0)},[h]),O.useEffect(()=>{e&&(y(""),j(0))},[e]);const C=O.useCallback(N=>{if(N.key==="Escape"){n();return}if(N.key==="ArrowDown")N.preventDefault(),j($=>Math.min($+1,b.length-1));else if(N.key==="ArrowUp")N.preventDefault(),j($=>Math.max($-1,0));else if(N.key==="Enter"){N.preventDefault();const $=b[v];$&&!$.disabled&&(s($),n())}},[b,v,s,n]);if(O.useEffect(()=>{if(e)return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[e,C]),!e)return null;let z=0;return r.jsxs("div",{style:{position:"fixed",inset:0,zIndex:qi.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[r.jsx("div",{onClick:n,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),r.jsxs("div",{role:"dialog",className:g,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:K.white,borderRadius:Jt.xl,boxShadow:rs["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...p},children:[r.jsx("div",{style:{padding:"12px",borderBottom:`1px solid ${K.gray[200]}`},children:r.jsxs("div",{style:{position:"relative"},children:[r.jsx(xt,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),r.jsx("input",{type:"text",value:h,onChange:N=>y(N.target.value),placeholder:c,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:ye.base,outline:"none",backgroundColor:"transparent"}})]})}),r.jsx("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:d?r.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:r.jsx(Za,{size:24})}):b.length===0?r.jsx("div",{style:{textAlign:"center",padding:"32px",color:K.gray[500]},children:"No commands found"}):Array.from(k.entries()).map(([N,$])=>r.jsxs("div",{style:{marginBottom:"8px"},children:[r.jsx("div",{style:{padding:"8px 12px",fontSize:ye.xs,fontWeight:Ue.semibold,color:K.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:N}),$.map(w=>{const x=z++===v;return r.jsxs("button",{onClick:()=>{w.disabled||(s(w),n())},disabled:w.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Jt.md,backgroundColor:x?K.gray[100]:"transparent",color:w.disabled?K.gray[400]:K.gray[900],textAlign:"left",cursor:w.disabled?"not-allowed":"pointer"},children:[w.icon&&r.jsx("span",{style:{display:"flex",color:K.gray[500]},children:w.icon}),r.jsxs("div",{style:{flex:1},children:[r.jsx("div",{style:{fontSize:ye.sm},children:w.label}),w.description&&r.jsx("div",{style:{fontSize:ye.xs,color:K.gray[500]},children:w.description})]}),w.shortcut&&r.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:K.gray[100],borderRadius:Jt.sm,fontSize:ye.xs,color:K.gray[500],fontFamily:"inherit"},children:w.shortcut})]},w.id)})]},N))}),r.jsxs("div",{style:{padding:"8px 12px",borderTop:`1px solid ${K.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:ye.xs,color:K.gray[500]},children:[r.jsx("span",{children:"↑↓ Navigate"}),r.jsx("span",{children:"↵ Select"}),r.jsx("span",{children:"Esc Close"})]})]})]})}function J8({brand:e,columns:n,socialLinks:i,bottomText:s,bottomLinks:c,background:u,bordered:d=!0,style:p,className:g}){return r.jsxs("footer",{className:g,role:"contentinfo",style:{backgroundColor:u||K.gray[50],borderTop:d?`1px solid ${K.gray[200]}`:void 0,...p},children:[r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&r.jsx("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),n==null?void 0:n.map((h,y)=>r.jsxs("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[h.title&&r.jsx("h4",{style:{fontSize:ye.sm,fontWeight:Ue.semibold,color:K.gray[900],lineHeight:Nt.normal,margin:"0 0 16px 0",padding:0},children:h.title}),r.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:h.links.map((v,j)=>r.jsx("li",{children:r.jsx("a",{href:v.href,onClick:v.onClick?k=>{var b;k.preventDefault(),(b=v.onClick)==null||b.call(v)}:void 0,style:{fontSize:ye.sm,color:K.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:Nt.normal},"aria-label":v.label,children:v.label})},j))})]},y))]}),(s||c||i)&&r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${K.gray[200]}`},children:[s&&r.jsx("span",{style:{fontSize:ye.sm,color:K.gray[500],lineHeight:Nt.normal},children:s}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[i==null?void 0:i.map((h,y)=>r.jsx("a",{href:h.href,"aria-label":h.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:K.gray[500],transition:"color 0.15s"},children:h.icon},y)),c==null?void 0:c.map((h,y)=>r.jsx("a",{href:h.href,onClick:h.onClick?v=>{var j;v.preventDefault(),(j=h.onClick)==null||j.call(h)}:void 0,style:{fontSize:ye.sm,color:K.gray[500],textDecoration:"none",transition:"color 0.15s"},children:h.label},y))]})]})]})}function Q8({heading:e,description:n,primaryAction:i,secondaryAction:s,media:c,align:u="center",size:d="md",background:p,backgroundImage:g,overlay:h=!1,style:y,className:v}){const j={sm:{padding:"48px 24px",headingSize:ye["3xl"],descSize:ye.lg},md:{padding:"80px 24px",headingSize:ye["4xl"],descSize:ye.xl},lg:{padding:"120px 24px",headingSize:ye["5xl"],descSize:ye.xl}},k=j[d]||j.md,b=!!g,C=b&&h;return r.jsxs("section",{className:v,style:{position:"relative",backgroundColor:p||(b?void 0:K.white),...b&&{backgroundImage:`url(${g})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...y},children:[C&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),r.jsxs("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:k.padding,display:"flex",flexDirection:u==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:u==="center"?"center":"left"},children:[r.jsxs("div",{style:{flex:u==="left"&&c?"1 1 50%":void 0,maxWidth:u==="center"?"800px":void 0},children:[e&&r.jsx("h1",{style:{fontSize:k.headingSize,fontWeight:Ue.bold,lineHeight:Nt.tight,letterSpacing:Wn.tight,color:C?K.white:K.gray[900],margin:"0 0 16px 0",padding:0},children:e}),n&&r.jsx("p",{style:{fontSize:k.descSize,lineHeight:Nt.relaxed,color:C?"rgba(255,255,255,0.9)":K.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:u==="center"?"640px":void 0,...u==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:n}),(i||s)&&r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:u==="center"?"center":"flex-start"},children:[i&&r.jsx("button",{onClick:i.onClick,style:{padding:"12px 28px",fontSize:ye.base,fontWeight:Ue.semibold,color:K.white,backgroundColor:K.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:Nt.normal},children:i.label}),s&&r.jsx("button",{onClick:s.onClick,style:{padding:"12px 28px",fontSize:ye.base,fontWeight:Ue.semibold,color:C?K.white:K.gray[700],backgroundColor:"transparent",border:`1px solid ${C?"rgba(255,255,255,0.3)":K.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:Nt.normal},children:s.label})]})]}),c&&r.jsx("div",{style:{flex:u==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...u==="center"&&{marginTop:"16px"}},children:c})]})]})}var J1={minor:{bg:"var(--ggui-color-warning-50, #fffbeb)",text:"var(--ggui-color-warning-700, #b45309)",dot:"var(--ggui-color-warning-500, #f59e0b)"},major:{bg:"var(--ggui-color-error-50, #fef2f2)",text:"var(--ggui-color-error-700, #b91c1c)",dot:"var(--ggui-color-error-500, #ef4444)"},critical:{bg:"var(--ggui-color-error-100, #fee2e2)",text:"var(--ggui-color-error-800, #991b1b)",dot:"var(--ggui-color-error-700, #b91c1c)"}},Q1={investigating:"Investigating",identified:"Identified",monitoring:"Monitoring",resolved:"Resolved"};function rv(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function gf(e){return e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function e9(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function t9(e){return e.some(n=>n.severity==="critical")?"critical":e.some(n=>n.severity==="major")?"major":e.some(n=>n.severity==="minor")?"minor":null}function iv({severity:e}){const i={width:"12px",height:"12px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:e?J1[e].dot:"var(--ggui-color-success-500, #22c55e)",flexShrink:0};return r.jsx("div",{style:i})}function a9({severity:e}){const n=J1[e],i={display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,padding:"2px 8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:n.bg,color:n.text,textTransform:"capitalize"};return r.jsx("span",{style:i,children:e})}function n9({status:e}){const n=e==="resolved",i={fontSize:"var(--ggui-font-size-xs, 12px)",color:n?"var(--ggui-color-success-600, #16a34a)":"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:n?500:400};return r.jsx("span",{style:i,children:Q1[e]})}function r9({incident:e,compact:n}){const[i,s]=O.useState(!1),c={border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",backgroundColor:"var(--ggui-color-surface, #ffffff)"},u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:n?"default":"pointer",gap:"8px"},d={fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)",margin:0,flex:1,minWidth:0};return r.jsxs("div",{style:c,children:[r.jsxs("div",{style:u,onClick:n?void 0:()=>s(!i),role:n?void 0:"button",tabIndex:n?void 0:0,onKeyDown:n?void 0:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),s(!i))},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:[r.jsx(a9,{severity:e.severity}),r.jsx("p",{style:d,children:e.title})]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[r.jsx(n9,{status:e.status}),!n&&r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ggui-color-outline, #d4d4d8)",strokeWidth:"2",style:{transform:i?"rotate(180deg)":"none",transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"},children:r.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),e.affectedServices&&e.affectedServices.length>0&&r.jsx("div",{style:{padding:"0 16px 8px",display:"flex",gap:"4px",flexWrap:"wrap"},children:e.affectedServices.map(p=>r.jsx("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:p},p))}),!n&&i&&e.updates.length>0&&r.jsx("div",{style:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",padding:"12px 16px"},children:r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.updates.map(p=>r.jsxs("div",{style:{display:"flex",gap:"8px",fontSize:"12px"},children:[r.jsx("span",{style:{color:"var(--ggui-color-outline, #d4d4d8)",flexShrink:0,fontVariantNumeric:"tabular-nums"},children:e9(p.timestamp)}),r.jsx("span",{style:{fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",flexShrink:0,textTransform:"capitalize"},children:Q1[p.status]}),r.jsx("span",{style:{color:"var(--ggui-color-onSurface, #18181b)"},children:p.message})]},p.id))})})]})}function i9({incidents:e,days:n=14,emptyText:i="All systems operational",compact:s=!1,style:c,className:u}){var y;const d=new Date,p=[];for(let v=0;v<n;v++){const j=new Date(d);j.setDate(j.getDate()-v);const k=rv(j),b=e.filter(C=>{const z=new Date(C.createdAt);return rv(z)===k});p.push({date:j,key:k,incidents:b})}const g=e.length>0,h={fontFamily:"var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",...c};return r.jsxs("div",{style:h,className:u,children:[r.jsxs("div",{style:{marginBottom:"24px"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)"},children:[n,"-Day History"]}),!g&&r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-success-600, #16a34a)",display:"flex",alignItems:"center",gap:"4px"},children:[r.jsx(iv,{severity:null}),i]})]}),r.jsx("div",{style:{display:"flex",gap:"3px",flexDirection:"row-reverse",justifyContent:"flex-end"},children:p.map(v=>{const j=t9(v.incidents);return r.jsx("div",{title:`${gf(v.date)}: ${v.incidents.length===0?"No incidents":`${v.incidents.length} incident(s)`}`,children:r.jsx(iv,{severity:j})},v.key)})}),r.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"4px",fontSize:"10px",color:"var(--ggui-color-outline, #d4d4d8)"},children:[r.jsx("span",{children:gf(((y=p[p.length-1])==null?void 0:y.date)??d)}),r.jsx("span",{children:"Today"})]})]}),g&&r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:p.filter(v=>v.incidents.length>0).map(v=>r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},children:gf(v.date)}),r.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:v.incidents.map(j=>r.jsx(r9,{incident:j,compact:s},j.id))})]},v.key))})]})}function o9({chat:e,canvas:n,chatWidth:i="400px",style:s,className:c}){return r.jsxs("div",{className:c,style:{display:"flex",height:"100%",minHeight:0,...s},children:[r.jsx("div",{style:{width:i,minWidth:"320px",maxWidth:"50%",flexShrink:0,borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",display:"flex",flexDirection:"column",overflow:"hidden"},children:e}),r.jsx("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:n})]})}function s9({headline:e,subheadline:n,primaryAction:i,secondaryAction:s,variant:c="default",media:u,style:d,className:p}){const g={default:{backgroundColor:"var(--ggui-color-surface, #ffffff)"},gradient:{background:"linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"},pattern:{backgroundColor:"var(--ggui-color-primary-900, #0c4a6e)",backgroundImage:"radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%)"}},h=c==="pattern";return r.jsx("section",{className:p,style:{position:"relative",overflow:"hidden",...g[c],...d},children:r.jsxs("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"96px 24px",display:"flex",alignItems:"center",gap:"64px",flexWrap:"wrap"},children:[r.jsxs("div",{style:{flex:"1 1 480px",minWidth:0},children:[r.jsx("h1",{style:{fontSize:"var(--ggui-font-size-5xl, 48px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.1,letterSpacing:"-0.025em",color:h?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 24px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",lineHeight:1.6,color:h?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 40px 0",maxWidth:"560px"},children:n}),(i||s)&&r.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px"},children:[i&&r.jsx(ov,{action:i,variant:"primary",dark:h}),s&&r.jsx(ov,{action:s,variant:"secondary",dark:h})]})]}),u&&r.jsx("div",{style:{flex:"1 1 400px",display:"flex",justifyContent:"center",alignItems:"center",minWidth:0},children:u})]})})}function ov({action:e,variant:n,dark:i}){const p={...{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 32px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5"},...n==="primary"?i?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-900, #0c4a6e)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}:i?{backgroundColor:"transparent",color:"#ffffff",border:"2px solid rgba(255, 255, 255, 0.3)"}:{backgroundColor:"transparent",color:"var(--ggui-color-onSurface, #18181b)",border:"2px solid var(--ggui-color-outline, #d4d4d8)"}};return e.href?r.jsx("a",{href:e.href,onClick:e.onClick,style:p,role:"button",children:e.label}):r.jsx("button",{type:"button",onClick:e.onClick,style:p,children:e.label})}function l9({heading:e,subheading:n,features:i,columns:s=3,style:c,className:u}){return r.jsxs("section",{className:u,style:{backgroundColor:"var(--ggui-color-surface, #ffffff)",...c},children:[r.jsxs("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"80px 24px"},children:[(e||n)&&r.jsxs("div",{style:{textAlign:"center",marginBottom:"64px"},children:[e&&r.jsx("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0,maxWidth:"640px",marginLeft:"auto",marginRight:"auto"},children:n})]}),r.jsx("div",{className:"ggui-features-grid",style:{display:"grid",gridTemplateColumns:`repeat(${s}, 1fr)`,gap:"32px"},children:i.map((d,p)=>r.jsx(c9,{feature:d},p))})]}),r.jsx("style",{children:`
|
|
160
|
-
@media (max-width: 768px) {
|
|
161
|
-
.ggui-features-grid {
|
|
162
|
-
grid-template-columns: 1fr !important;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
`})]})}function c9({feature:e}){return r.jsxs("div",{style:{padding:"var(--ggui-spacing-6, 24px)",borderRadius:"var(--ggui-shape-radius-xl, 16px)",backgroundColor:"var(--ggui-color-surface, #ffffff)",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",transition:"box-shadow 0.2s ease, transform 0.2s ease",cursor:"default"},onMouseEnter:n=>{n.currentTarget.style.boxShadow="var(--ggui-shape-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))",n.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:n=>{n.currentTarget.style.boxShadow="none",n.currentTarget.style.transform="translateY(0)"},children:[e.icon&&r.jsx("div",{style:{fontSize:"32px",marginBottom:"var(--ggui-spacing-4, 16px)",lineHeight:1},children:e.icon}),r.jsx("h3",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",fontWeight:"var(--ggui-font-weight-semibold, 600)",lineHeight:1.3,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 8px 0"},children:e.title}),r.jsx("p",{style:{fontSize:"var(--ggui-font-size-base, 16px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0},children:e.description})]})}function u9({headline:e,description:n,action:i,variant:s="filled",style:c,className:u}){const d=s==="filled";return r.jsx("section",{className:u,style:{backgroundColor:d?"var(--ggui-color-primary-600, #0284c7)":"var(--ggui-color-surface, #ffffff)",...d?{}:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderBottom:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)"},...c},children:r.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"80px 24px",textAlign:"center"},children:[r.jsx("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:d?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),n&&r.jsx("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:d?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 32px 0",maxWidth:"560px",marginLeft:"auto",marginRight:"auto"},children:n}),r.jsx(d9,{action:i,filled:d})]})})}function d9({action:e,filled:n}){const i={display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 36px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5",...n?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-700, #0369a1)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}};return e.href?r.jsx("a",{href:e.href,onClick:e.onClick,style:i,role:"button",children:e.label}):r.jsx("button",{type:"button",onClick:e.onClick,style:i,children:e.label})}var Ef={};Ec(Ef,{Clickable:()=>f9,Hoverable:()=>p9,Pressable:()=>g9});var f9=O.forwardRef(function({children:n,onClick:i,onDoubleClick:s,hoverStyle:c,activeStyle:u,cursor:d,transition:p="all 200ms ease",disabled:g=!1,role:h,"aria-label":y,tabIndex:v,style:j,className:k,...b},C){const[z,N]=O.useState(!1),[$,w]=O.useState(!1),R=!!i,x=g?"not-allowed":d??(R?"pointer":void 0),_=h??(R?"button":void 0),T=v??(R?0:void 0),A=P=>{g||!i||(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),i(P))},I={...j,cursor:x,transition:p,opacity:g?.5:void 0,...z&&!g?c:{},...$&&!g?u:{}};return r.jsx("div",{ref:C,className:k,style:I,onClick:g?void 0:i,onDoubleClick:g?void 0:s,onMouseEnter:()=>N(!0),onMouseLeave:()=>{N(!1),w(!1)},onMouseDown:()=>w(!0),onMouseUp:()=>w(!1),onKeyDown:A,role:_,"aria-label":y,"aria-disabled":g||void 0,tabIndex:T,...b,children:n})}),p9=O.forwardRef(function({children:n,hoverStyle:i,onHoverChange:s,transition:c="all 200ms ease",style:u,className:d,...p},g){const[h,y]=O.useState(!1),v={...u,transition:c,...h?i:{}};return r.jsx("div",{ref:g,className:d,style:v,onMouseEnter:()=>{y(!0),s==null||s(!0)},onMouseLeave:()=>{y(!1),s==null||s(!1)},...p,children:n})}),g9=O.forwardRef(function({children:n,onPress:i,onLongPress:s,longPressDelay:c=500,hoverStyle:u,pressStyle:d,disabled:p=!1,transition:g="all 150ms ease",role:h,"aria-label":y,tabIndex:v,style:j,className:k,...b},C){const[z,N]=O.useState(!1),[$,w]=O.useState(!1),[R,x]=O.useState(null),_=!!i||!!s,T=J=>{if(!p&&(w(!0),s)){const re=setTimeout(()=>{s(J)},c);x(re)}},A=J=>{p||(w(!1),R?(clearTimeout(R),x(null),i==null||i(J)):s||i==null||i(J))},I=J=>{p||!i||(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),i(J))},P={...j,cursor:p?"not-allowed":_?"pointer":void 0,transition:g,opacity:p?.5:void 0,userSelect:_?"none":void 0,...z&&!p?u:{},...$&&!p?d:{}},H=typeof n=="function"?n({pressed:$,hovered:z}):n;return r.jsx("div",{ref:C,className:k,style:P,onMouseDown:T,onMouseUp:A,onMouseEnter:()=>N(!0),onMouseLeave:()=>{N(!1),w(!1),R&&clearTimeout(R)},onKeyDown:I,role:h??(_?"button":void 0),"aria-label":y,"aria-disabled":p||void 0,tabIndex:v??(_?0:void 0),...b,children:H})});function m9(e){const n=e.split(";"),i=[],s=[];for(const c of n)c.trimStart().startsWith("import")?i.push(c):s.push(c);return i.length===0?e:i.join(";")+";"+s.join(";")}async function h9(e){const n=new Blob([e],{type:"application/javascript"}),i=URL.createObjectURL(n);try{return await import(i)}finally{URL.revokeObjectURL(i)}}var y9=0;function v9(e){return`ggui-rcr-${e.replace(/[^a-z0-9]/gi,"")}`}var $9=1,b9=500,x9=class extends Ai.Component{constructor(){super(...arguments);Bn(this,"state",{error:null,catchCount:0,autoRetrying:!1,repairRequested:!1});Bn(this,"retryTimer",null)}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n){var s,c;const i=this.state.catchCount+1;this.setState({catchCount:i}),i<=$9?(this.setState({autoRetrying:!0}),this.retryTimer=setTimeout(()=>{this.setState({error:null,autoRetrying:!1})},b9)):((c=(s=this.props).onError)==null||c.call(s,n),this.props.onRequestRepair&&!this.state.repairRequested&&(this.setState({repairRequested:!0}),this.props.onRequestRepair(n)))}componentWillUnmount(){this.retryTimer&&clearTimeout(this.retryTimer)}render(){const{error:n,autoRetrying:i,repairRequested:s,catchCount:c}=this.state;return n?i?r.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:24,minHeight:80,gap:8,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:13,color:"rgba(255,255,255,0.4)"},children:[r.jsx("div",{style:{width:16,height:16,border:"2px solid rgba(255,255,255,0.15)",borderTopColor:"rgba(255,255,255,0.5)",borderRadius:"50%",animation:"ggui-err-spin 0.6s linear infinite"}}),"Retrying...",r.jsx("style",{children:"@keyframes ggui-err-spin { to { transform: rotate(360deg); } }"})]}):s?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 24px",minHeight:120,gap:10,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[r.jsx("div",{style:{width:16,height:16,border:"2px solid rgba(139,92,246,0.2)",borderTopColor:"rgba(139,92,246,0.7)",borderRadius:"50%",animation:"ggui-err-spin 0.8s linear infinite"}}),r.jsx("div",{style:{fontSize:13,color:"rgba(255,255,255,0.5)"},children:"Repairing component..."}),r.jsx("style",{children:"@keyframes ggui-err-spin { to { transform: rotate(360deg); } }"})]}):r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 24px",minHeight:120,gap:12,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[r.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"rgba(239, 68, 68, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22},children:"!"}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,0.8)"},children:"Something went wrong"}),r.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",maxWidth:280,lineHeight:1.4},children:"This component encountered an error. Try asking for a different view."}),r.jsx("button",{onClick:()=>this.setState({error:null,catchCount:0,repairRequested:!1}),style:{marginTop:4,padding:"8px 20px",borderRadius:8,border:"1px solid rgba(255,255,255,0.15)",background:"rgba(255,255,255,0.08)",color:"rgba(255,255,255,0.7)",fontSize:13,fontWeight:500,cursor:"pointer"},children:"Retry"}),c>1&&r.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.2)"},children:n.message})]}):this.props.children}};function j9({code:e,props:n={},themeId:i,cssOverrides:s,fallback:c=r.jsx("div",{children:"Loading component..."}),onError:u,onRequestRepair:d}){const p=O.useId(),[g]=O.useState(()=>v9(p)||`ggui-rcr-${++y9}`),[h,y]=O.useState(null),[v,j]=O.useState(null),[k,b]=O.useState(!0);O.useEffect(()=>{if(!e||e.trim().length===0){y(null),b(!1);return}let z=!1;b(!0),j(null),y(null);async function N(){try{let $=e;if(e.startsWith("https://")){const P=await fetch(e);if(!P.ok)throw new Error(`Failed to fetch component code: ${P.status}`);$=await P.text()}const w=Gw($),R=globalThis;let x={};try{x=await bx(()=>import("./index-D12OtMXA.js").then(P=>P.i),[])}catch{}R.__ggui__={react:Ai,reactDom:x,primitives:kf,components:zf,compositions:Cf,interact:Ef,wire:nk},R.__REACT=Ai,R.__GGUI_PRIMITIVES=kf,R.__GGUI_COMPONENTS=zf,R.__GGUI_COMPOSITIONS=Cf,R.__GGUI_INTERACT=Ef;const _=m9(w),T=V6(_,{mode:"data-url"}),A=await h9(T);if(z)return;const I=A.default??Object.values(A).find(P=>typeof P=="function");if(!I)throw new Error("Module does not export a default component");y(()=>I),j(null)}catch($){if(z)return;const w=$ instanceof Error?$:new Error(String($));j(w),y(null),u==null||u(w)}finally{z||b(!1)}}return N(),()=>{z=!0}},[e]);const C=i?Xf(i,g):w6(g);return!e||e.trim().length===0?r.jsx("div",{children:c}):k?r.jsx("div",{children:c}):v?r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"32px 24px",minHeight:120,gap:12,textAlign:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[r.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"rgba(239, 68, 68, 0.1)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22},children:"!"}),r.jsx("div",{style:{fontSize:14,fontWeight:600,color:"rgba(255,255,255,0.8)"},children:"Failed to load component"}),r.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.4)",maxWidth:280,lineHeight:1.4},children:v.message})]}):h?r.jsxs("div",{className:g,children:[r.jsxs("style",{children:[C,s??""]}),r.jsx(x9,{onError:u,onRequestRepair:d,children:r.jsx(h,{...n})},e.length)]}):r.jsx("div",{children:c})}var sv="ggui-preview-keyframes",_9=`@keyframes ggui-preview-shimmer {
|
|
166
|
-
0% { transform: translateX(-100%); }
|
|
167
|
-
100% { transform: translateX(100%); }
|
|
168
|
-
}`,S9=`@keyframes ggui-preview-caret {
|
|
169
|
-
0%, 45% { opacity: 1; }
|
|
170
|
-
55%, 100% { opacity: 0; }
|
|
171
|
-
}`,w9=`@keyframes ggui-preview-fragment-enter {
|
|
172
|
-
from { opacity: 0; transform: scale(0.97); }
|
|
173
|
-
to { opacity: 1; transform: scale(1); }
|
|
174
|
-
}`,k9=`@media (prefers-reduced-motion: reduce) {
|
|
175
|
-
[data-ggui-preview] *,
|
|
176
|
-
[data-ggui-preview]::before,
|
|
177
|
-
[data-ggui-preview]::after {
|
|
178
|
-
animation-duration: 0.01ms !important;
|
|
179
|
-
animation-iteration-count: 1 !important;
|
|
180
|
-
transition-duration: 0.01ms !important;
|
|
181
|
-
}
|
|
182
|
-
}`,N9=[_9,S9,w9,k9].join(`
|
|
183
|
-
|
|
184
|
-
`);function z9(){if(typeof document>"u"||document.getElementById(sv))return;const e=document.createElement("style");e.id=sv,e.textContent=N9,document.head.appendChild(e)}function C9({children:e,frozen:n=!1,className:i,style:s}){O.useEffect(()=>{z9()},[]);const c={position:"relative",cursor:"progress",backgroundColor:"var(--ggui-color-surface-subtle, rgba(148, 163, 184, 0.08))",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",...s},u={position:"absolute",inset:0,backgroundImage:"linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%, transparent 100%)",backgroundSize:"200% 100%",animation:n?"none":"ggui-preview-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite",pointerEvents:"none",mixBlendMode:"overlay"},d={position:"relative",pointerEvents:"none"};return r.jsxs("div",{"data-ggui-preview":"","data-ggui-preview-frozen":n?"":void 0,className:i,style:c,"aria-busy":"true",children:[r.jsx("div",{style:d,children:e}),r.jsx("div",{"aria-hidden":"true",style:u})]})}function ra({children:e,delayMs:n=0,className:i,style:s}){const c={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,n)}ms`,...s};return r.jsx("div",{className:i,style:c,children:e})}function lv({children:e,streaming:n=!1,className:i,style:s}){const c={display:"inline",...s},u={display:"inline-block",width:"0.5ch",height:"1em",marginLeft:"0.1em",verticalAlign:"text-bottom",borderRight:"0.08em solid currentColor",animation:"ggui-preview-caret 900ms steps(1, end) infinite"};return r.jsxs("span",{className:i,"data-ggui-preview-streaming":n?"":void 0,style:c,children:[e,n?r.jsx("span",{"aria-hidden":"true",style:u}):null]})}var cv={envelopes:[],complete:!1};function E9(e){const[n,i]=O.useState(cv);return O.useEffect(()=>{if(i(cv),typeof window>"u")return;const s=c=>{const u=c.detail;!u||u.channel!==e||i(d=>({envelopes:[...d.envelopes,u],complete:d.complete||u.complete===!0}))};return window.addEventListener(Sh.AGENT_DATA,s),()=>window.removeEventListener(Sh.AGENT_DATA,s)},[e]),n}var T9="root",e$={surfaceId:null,fragments:new Map};function M9(e,n){if("createSurface"in n)return{surfaceId:n.createSurface.surfaceId,fragments:new Map};if("updateComponents"in n){if(e.surfaceId!==n.updateComponents.surfaceId)return e;const i=new Map(e.fragments);for(const s of n.updateComponents.components)i.set(s.id,s);return{...e,fragments:i}}return"deleteSurface"in n?e.surfaceId!==n.deleteSurface.surfaceId?e:e$:e}function R9(e){let n=e$;for(const i of e){const s=_k(i.payload);s.ok&&(n=M9(n,s.value))}return n}function uv(){return r.jsx("div",{style:{minHeight:24,minWidth:32,borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-outlineVariant, rgba(148, 163, 184, 0.18))"},"aria-hidden":"true"})}function O9({name:e}){return r.jsx(ts,{padding:12,shadow:"none",border:!0,children:r.jsx(qr,{variant:"caption",children:`[${e}]`})})}function Tf(e,n){const i=c=>c?c.map(u=>{const d=n.get(u);return d?Tf(d,n):r.jsx(uv,{},u)}):[],{id:s}=e;switch(e.component){case"Row":return r.jsx(ra,{children:r.jsx(hc,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:i(e.children)})},s);case"Column":return r.jsx(ra,{children:r.jsx(Li,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start",children:i(e.children)})},s);case"List":return r.jsx(ra,{children:r.jsx(Li,{direction:"vertical",gap:8,children:i(e.children)})},s);case"Card":{const c=e.child?n.get(e.child):void 0;return r.jsx(ra,{children:r.jsx(ts,{padding:16,shadow:"sm",children:e.child&&!c?r.jsx(uv,{}):c?Tf(c,n):null})},s)}case"Divider":return r.jsx(ra,{children:r.jsx(q1,{orientation:e.orientation??"horizontal"})},s);case"Text":{const c=e.variant??"body",u=/^h([1-6])$/.exec(c);if(u){const p=Number(u[1]);return r.jsx(ra,{children:r.jsx(Mc,{level:p,children:r.jsx(lv,{children:e.text})})},s)}const d=c==="label"||c==="caption"?c:"body";return r.jsx(ra,{children:r.jsx(qr,{variant:d,children:r.jsx(lv,{children:e.text})})},s)}case"Image":return r.jsx(ra,{children:r.jsx(G1,{src:e.src,alt:e.alt??""})},s);case"Icon":return r.jsx(ra,{children:r.jsx(xt,{name:e.name})},s);case"Button":return r.jsx(ra,{children:r.jsx(Xt,{disabled:!0,children:e.label})},s);case"TextField":return r.jsx(ra,{children:r.jsx(ap,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:mf})},s);case"CheckBox":return r.jsx(ra,{children:r.jsx(yc,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:mf})},s);case"ChoicePicker":{const c=e.options??[];return r.jsx(ra,{children:r.jsx(P1,{disabled:!0,label:e.label,value:e.value??"",options:c,onChange:mf})},s)}default:{const c=e;return r.jsx(ra,{children:r.jsx(O9,{name:c.component})},s)}}}function mf(){}function A9(){return r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80},children:r.jsx(Za,{})})}function D9({suspended:e=!1,fallback:n}={}){const{envelopes:i}=E9(E1),s=O.useMemo(()=>R9(i),[i]);if(e)return null;const c=s.fragments.get(T9);return c?r.jsx(C9,{children:Tf(c,s.fragments)}):r.jsx(r.Fragment,{children:n??r.jsx(A9,{})})}function I9({stackItem:e,fallback:n,onError:i,cssOverrides:s,themeId:c}){const u=Ai.useCallback(d=>{typeof window<"u"&&e.id&&window.dispatchEvent(new CustomEvent("ggui:request-repair",{detail:{stackItemId:e.id,prompt:e.prompt,error:d.message,componentCode:e.componentCode}}))},[e.id,e.prompt,e.componentCode]);return!e.componentCode||e.componentCode.length===0?r.jsx(dv,{stackItem:e,children:r.jsx(D9,{fallback:n})}):r.jsx(dv,{stackItem:e,children:r.jsx(j9,{code:e.componentCode,props:e.props,cssOverrides:s,themeId:c,onError:i,onRequestRepair:u,fallback:n})})}function dv({stackItem:e,children:n}){const i=L9(),s=Ai.useMemo(()=>{const c=i;return!c||typeof c.scope!="function"?null:c.scope({stackItemId:e.id,contractHash:e.contractHash,actionSpec:e.actionSpec})},[i,e.id,e.contractHash,e.actionSpec]);return s?r.jsx(wf,{config:s,children:n}):r.jsx(wf,{config:U9,children:n})}var U9={app:{appId:"preview",appName:"preview"},session:{sessionId:"preview",isConnected:!1},auth:{isAuthenticated:!1},dispatch:()=>{},subscribe:()=>()=>{}};function L9(){try{return Zr()}catch{return null}}var Mf=new Map;function V9(e){const n=Mf.get(e);if(n){if(Date.now()>n.expiresAt){Mf.delete(e);return}return n.data}}function H9(e,n,i){Mf.set(e,{data:n,expiresAt:Date.now()+i})}Bi({name:"fetch",execute:async(e,n)=>{const{endpoint:i,method:s="GET",headers:c={},body:u,cache:d,extract:p}=e,g=n.apiBaseUrl||"",h=i.startsWith("http")?i:`${g}${i}`,y=(d==null?void 0:d.key)||h,v=n.sessionId?`${n.sessionId}:${y}`:y;if(s==="GET"&&(d!=null&&d.ttl)){const z=V9(v);if(z!==void 0)return z}const j={method:s,headers:{"Content-Type":"application/json",...c},signal:n.signal};u&&s!=="GET"&&(j.body=JSON.stringify(u));const k=await fetch(h,j);if(!k.ok)throw new Error(`HTTP ${k.status}: ${k.statusText}`);let b;const C=k.headers.get("content-type");return C!=null&&C.includes("application/json")?b=await k.json():b=await k.text(),p&&typeof b=="object"&&b!==null&&(b=Qf(b,p)),s==="GET"&&(d!=null&&d.ttl)&&H9(v,b,d.ttl),b}});Bi({name:"auth",execute:async(e,n)=>{const{field:i}=e;if(!n.auth)throw new Error("Auth context not available. Ensure GguiProvider is configured with authentication.");switch(i){case"currentUser":return n.auth.currentUser??null;case"userId":return n.auth.userId??null;case"token":return n.auth.token??null;case"isAuthenticated":return n.auth.isAuthenticated;default:if(typeof n.auth=="object"&&n.auth!==null)return n.auth[i]??null;throw new Error(`Unknown auth field: ${i}`)}}});Bi({name:"storage",execute:async(e,n)=>{const{key:i,storage:s="local",defaultValue:c=null,parse:u=!0}=e,d=s==="session"?sessionStorage:localStorage;if(typeof window>"u"||!d)return console.warn(`Storage tool: ${s}Storage not available`),c;try{const p=d.getItem(i);if(p===null)return c;if(u)try{return JSON.parse(p)}catch{return p}return p}catch(p){return console.warn(`Storage tool: Failed to access ${s}Storage`,p),c}}});Bi({name:"chain",execute:async(e,n)=>{var c;const{steps:i}=e;if(!i||i.length===0)throw new Error("Chain tool requires at least one step");let s=null;for(let u=0;u<i.length;u++){if((c=n.signal)!=null&&c.aborted)throw new Error("Chain execution aborted");const d=i[u],p=Sf(d.config,{...n.resolved,prev:s});s=await O1.getExecutor(d.tool)(p,{...n,resolved:{...n.resolved,prev:s}})}return s}});Bi({name:"transform",execute:async(e,n)=>{const i=n.resolved.prev??{};if(typeof i!="object"||i===null)return i;let s=Array.isArray(i)?Object.fromEntries(i.map((c,u)=>[String(u),c])):{...i};if(e.flatten){const c=Qf(s,e.flatten);if(typeof c=="object"&&c!==null){const u=e.flatten.split(".");let d=s;for(let p=0;p<u.length-1;p++)d=d[u[p]];delete d[u[u.length-1]],s={...s,...c}}}if(e.pick&&e.pick.length>0){const c={};for(const u of e.pick)u in s&&(c[u]=s[u]);s=c}if(e.omit&&e.omit.length>0)for(const c of e.omit)delete s[c];if(e.rename)for(const[c,u]of Object.entries(e.rename))c in s&&(s[u]=s[c],delete s[c]);if(e.mapArray){const{field:c,pick:u,rename:d}=e.mapArray,p=c||null,g=p?s[p]:s;if(Array.isArray(g)){const h=g.map(y=>{if(typeof y!="object"||y===null)return y;let v={...y};if(u&&u.length>0){const j={};for(const k of u)k in v&&(j[k]=v[k]);v=j}if(d)for(const[j,k]of Object.entries(d))j in v&&(v[k]=v[j],delete v[j]);return v});if(p)s[p]=h;else return h}}if(e.defaults)for(const[c,u]of Object.entries(e.defaults))(!(c in s)||s[c]===void 0||s[c]===null)&&(s[c]=u);return s}});function Rf(e,n){const i={...e};for(const[s,c]of Object.entries(n))c!==null&&typeof c=="object"&&!Array.isArray(c)&&s in i&&i[s]!==null&&typeof i[s]=="object"&&!Array.isArray(i[s])?i[s]=Rf(i[s],c):i[s]=c;return i}Bi({name:"merge",execute:async(e,n)=>{const{sources:i,strategy:s="last",rename:c}=e;if(!i||i.length===0)throw new Error("Merge tool requires at least one source");if(c&&Object.keys(c).length>0){const d={};for(const p of i){const g=n.resolved[p],h=c[p]||p;if(!(s==="first"&&h in d)){if(s==="deep"&&h in d){const y=d[h];if(typeof y=="object"&&y!==null&&typeof g=="object"&&g!==null&&!Array.isArray(y)&&!Array.isArray(g)){d[h]=Rf(y,g);continue}}d[h]=g}}return d}let u={};for(const d of i){const p=n.resolved[d];if(p==null)continue;if(typeof p!="object"||Array.isArray(p)){u[d]=p;continue}const g=p;switch(s){case"first":for(const[h,y]of Object.entries(g))h in u||(u[h]=y);break;case"deep":u=Rf(u,g);break;case"last":default:u={...u,...g};break}}return u}});function Ne({tone:e,children:n,dot:i=!0}){return r.jsxs("span",{className:`ggui-status ggui-status--${e}`,children:[i?r.jsx("span",{className:"ggui-status__dot","aria-hidden":!0}):null,n]})}function B9({blueprintId:e}){const[n,i]=O.useState({kind:"loading"});return O.useEffect(()=>{const s=new AbortController;return(async()=>{try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}`,{signal:s.signal,headers:{accept:"application/json"}});if(c.status===404){i({kind:"not-found"});return}if(!c.ok){i({kind:"error",message:`server returned ${c.status}`});return}const u=await c.json();i({kind:"ready",blueprint:u})}catch(c){if(s.signal.aborted)return;i({kind:"error",message:String(c)})}})(),()=>s.abort()},[e]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / blueprint",title:"Manifest-registered surface.",mute:r.jsx(r.Fragment,{children:r.jsxs("code",{className:"ggui-code",children:["/preview/",e]})}),intro:r.jsxs(r.Fragment,{children:["Reads the bundle via"," ",r.jsx("code",{className:"ggui-code",children:"LocalUiRegistry"}),". Same bytes an agent would get from"," ",r.jsx("code",{className:"ggui-code",children:"ggui_render_blueprint"}),"."]})}),n.kind==="loading"?r.jsx(fv,{title:"loading",num:"BPR / 01",tone:"draft",children:"Loading blueprint…"}):n.kind==="not-found"?r.jsx(Z9,{blueprintId:e}):n.kind==="error"?r.jsxs(fv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load blueprint — ",n.message,"."]}):r.jsx(q9,{blueprint:n.blueprint})]})}function q9({blueprint:e}){return r.jsxs("section",{"data-ggui-stack-entry":"component","data-ggui-code-ready":"true","data-ggui-blueprint-id":e.blueprintId,className:"ggui-pane",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"ggui-pane__title",children:e.blueprintName}),r.jsx("span",{className:"ggui-pane__meta",children:e.contentType}),r.jsx(P9,{blueprintId:e.blueprintId})]}),r.jsx("div",{className:"ggui-pane__body",children:r.jsx(I9,{stackItem:{id:e.blueprintId,componentCode:e.code},fallback:r.jsx("div",{"data-ggui-preview-state":"waiting",className:"ggui-muted",style:{padding:"16px 0"},children:"Loading component…"})})})]})}function P9({blueprintId:e}){const[n,i]=O.useState({kind:"idle"}),s=async()=>{i({kind:"pending"});try{const c=await fetch(`/ggui/console/blueprint/${encodeURIComponent(e)}/try`,{method:"POST",headers:{accept:"application/json"}});if(!c.ok){const d=await c.json().catch(()=>({}));i({kind:"error",message:d.message??`server returned ${c.status}`});return}const u=await c.json();if(!u.url){i({kind:"error",message:u.warning??"try-live returned no viewer URL"});return}Me(u.url)}catch(c){i({kind:"error",message:String(c)})}};return r.jsxs("span",{className:"ggui-pane__actions",style:{marginLeft:"auto"},children:[n.kind==="error"?r.jsx("span",{className:"ggui-muted","data-ggui-try-live":"error",title:n.message,style:{marginRight:"8px",fontSize:"0.75rem"},children:"try-live failed"}):null,r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-try-live":n.kind==="pending"?"pending":"idle","data-ggui-blueprint-id":e,disabled:n.kind==="pending",onClick:()=>{s()},children:n.kind==="pending"?"opening…":"Try live →"})]})}function Z9({blueprintId:e}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"not found"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("h2",{className:"ggui-h2",children:"Blueprint not found"}),r.jsxs("p",{className:"ggui-body",children:["No blueprint registered with id"," ",r.jsx("code",{className:"ggui-code",children:e}),". Check"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," ","and the blueprint's"," ",r.jsx("code",{className:"ggui-code",children:"ggui.ui.json#id"}),"."]}),r.jsx("div",{children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/"),children:"back to landing"})})]})]})}function fv({title:e,num:n,tone:i,children:s}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:i,children:e})}),r.jsx("p",{className:"ggui-muted",children:s})]})]})}function G9(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState({kind:"loading"}),[c,u]=O.useState(""),[d,p]=O.useState(!1);O.useEffect(()=>{const b=new AbortController;return(async()=>{try{const C=await fetch("/ggui/console/registry",{signal:b.signal,headers:{accept:"application/json"}});if(!C.ok){n({kind:"error",message:`server returned ${C.status}`});return}const z=await C.json();n({kind:"ready",data:z})}catch(C){if(b.signal.aborted)return;n({kind:"error",message:String(C)})}})(),()=>b.abort()},[]);const g=O.useCallback(async b=>{s({kind:"loading"});try{const C=await fetch("/ggui/console/blueprints/cached",{signal:b,headers:{accept:"application/json"}});if(C.status===501){const N=await C.json().catch(()=>({}));s({kind:"unsupported",message:N.message??"The configured vector store does not support enumeration."});return}if(!C.ok){s({kind:"error",message:`server returned ${C.status}`});return}const z=await C.json();s({kind:"ready",data:z})}catch(C){if(b!=null&&b.aborted)return;s({kind:"error",message:String(C)})}},[]);O.useEffect(()=>{const b=new AbortController;return g(b.signal),()=>b.abort()},[g]);const h=O.useCallback(async b=>{try{await fetch(`/ggui/console/blueprints/cached/${encodeURIComponent(b)}`,{method:"DELETE"})}catch(C){s({kind:"error",message:String(C)});return}await g()},[g]),y=O.useCallback(async()=>{try{await fetch("/ggui/console/blueprints/cached/clear",{method:"POST"})}catch(b){s({kind:"error",message:String(b)});return}await g()},[g]),v=c.trim().toLowerCase(),j=O.useMemo(()=>e.kind!=="ready"?null:v.length===0?e.data:{blueprints:e.data.blueprints.filter(b=>[b.id,b.name,b.description??"",b.category??""].join(" ").toLowerCase().includes(v)),primitives:e.data.primitives.filter(b=>[b.name,b.catalog,b.source].join(" ").toLowerCase().includes(v))},[e,v]),k=O.useMemo(()=>i.kind!=="ready"?null:v.length===0?i.data.entries:i.data.entries.filter(b=>[b.id,b.cachedIntent].join(" ").toLowerCase().includes(v)),[i,v]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / blueprints",title:"What can this server produce without generating?",mute:"Declared and cached.",intro:r.jsxs(r.Fragment,{children:["Two answers on one screen. ",r.jsx("strong",{children:"Declared"})," blueprints from ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"}),";"," ",r.jsx("strong",{children:"cached"})," generations the push path has stored (contract-keyed, written by the blueprint registry on every successful cold-gen)."]})}),e.kind==="loading"||i.kind==="loading"?r.jsx(gv,{title:"loading",num:"REG / 01",tone:"draft",children:"Loading…"}):e.kind==="error"?r.jsxs(gv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load registry — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-registry-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-registry-filter",name:"filter","aria-label":"filter registry entries",placeholder:"substring match over id, name, description, intent…",value:c,onChange:b=>u(b.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),r.jsxs("div",{className:"ggui-registry-grid",children:[r.jsx(F9,{all:e.data.blueprints,shown:(j==null?void 0:j.blueprints)??e.data.blueprints,filterActive:v.length>0}),r.jsx(Y9,{state:i,shown:k,filterActive:v.length>0,onInvalidate:h,onClearAll:y})]}),r.jsx(K9,{all:e.data.primitives,shown:(j==null?void 0:j.primitives)??e.data.primitives,filterActive:v.length>0,expanded:d,onToggle:()=>p(b=>!b)})]})]})}function F9({all:e,shown:n,filterActive:i}){return r.jsxs("div",{"data-ggui-registry-list":"blueprints",className:"ggui-stack","aria-label":"declared blueprints",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"BPR"}),r.jsx("span",{className:"ggui-stack__label",children:"declared"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,i&&n.length!==e.length?` / ${e.length}`:""]})]}),e.length===0?r.jsx(W9,{}):n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No declared blueprints match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((s,c)=>r.jsxs("li",{"data-ggui-registry-item":"blueprint","data-ggui-registry-id":s.id,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`BPR / ${String(c+1).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:s.name}),s.category?r.jsx(Ne,{tone:"ink",children:s.category}):null]}),r.jsx("div",{className:"ggui-stack__entry-meta",children:r.jsx("code",{className:"ggui-code",children:s.id})}),s.description?r.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:s.description}):null,r.jsx("div",{style:{marginTop:12},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me(`/preview/${encodeURIComponent(s.id)}`),children:"preview →"})})]},s.id))})]})}function Y9({state:e,shown:n,filterActive:i,onInvalidate:s,onClearAll:c}){const u=e.kind==="ready"?e.data.entries:[],d=n??u;return r.jsxs("div",{"data-ggui-cached-list":!0,className:"ggui-stack","aria-label":"cached blueprints",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CCH"}),r.jsx("span",{className:"ggui-stack__label",children:"cached"}),r.jsx("span",{className:"ggui-stack__count",children:e.kind==="ready"?`${d.length}${i&&d.length!==u.length?` / ${u.length}`:""}`:"—"}),e.kind==="ready"&&u.length>0?r.jsx("button",{type:"button","data-ggui-cached-clear-all":!0,className:"ggui-btn ggui-btn--ghost",style:{marginLeft:"auto"},onClick:()=>{c()},children:"clear all"}):null]}),e.kind==="unsupported"?r.jsx(J9,{message:e.message}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["Couldn't load cache — ",e.message,"."]}):u.length===0?r.jsx(X9,{}):d.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No cached entries match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:d.map((p,g)=>r.jsxs("li",{"data-ggui-cached-item":!0,"data-ggui-cached-id":p.id,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`CCH / ${String(g+1).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:p.cachedIntent}),typeof p.hitCount=="number"?r.jsxs(Ne,{tone:"ink",children:["hits ",p.hitCount]}):null]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsx("code",{className:"ggui-code",children:p.id}),r.jsxs("span",{style:{marginLeft:12},children:["cached ",pv(p.cachedAt)]}),p.lastHitAt?r.jsxs("span",{style:{marginLeft:12},children:["last hit ",pv(p.lastHitAt)]}):null]}),r.jsx("div",{style:{marginTop:12},children:r.jsx("button",{type:"button","data-ggui-cached-invalidate":!0,className:"ggui-btn ggui-btn--ghost",onClick:()=>{s(p.id)},children:"invalidate ✕"})})]},p.id))})]})}function pv(e){if(!e)return"—";try{const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().replace("T"," ").replace(/\.\d+Z$/,"Z")}catch{return e}}function K9({all:e,shown:n,filterActive:i,expanded:s,onToggle:c}){return r.jsxs("div",{"data-ggui-registry-list":"primitives",className:"ggui-card","aria-label":"primitives",style:{marginTop:24},children:[r.jsxs("button",{type:"button","data-ggui-primitives-toggle":!0,onClick:c,className:"ggui-card__head",style:{width:"100%",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit"},"aria-expanded":s,children:[r.jsxs("span",{className:"ggui-card__title",children:[s?"▾":"▸"," primitives"]}),r.jsxs("span",{className:"ggui-card__num",children:[n.length,i&&n.length!==e.length?` / ${e.length}`:""," available — fyi"]})]}),s?e.length===0?r.jsx(Q9,{}):n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No primitives match the filter."}):r.jsx("ul",{className:"ggui-card__body",style:{listStyle:"none",margin:0,padding:"12px 16px",display:"flex",flexWrap:"wrap",gap:"6px 12px"},children:n.map(u=>r.jsxs("li",{"data-ggui-registry-item":"primitive","data-ggui-registry-name":u.name,style:{display:"inline-flex",alignItems:"center",gap:6},children:[r.jsx("code",{className:"ggui-code",children:u.name}),r.jsx(Ne,{tone:u.source==="package"?"ink":"draft",children:u.source})]},`${u.catalog}::${u.name}`))}):null]})}function W9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No declared blueprints."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Add include globs to"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#blueprints.include"})," and colocate each UI with a"," ",r.jsx("code",{className:"ggui-code",children:"ggui.ui.json"}),"."]})]})}function X9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No cached generations yet."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Generate a UI from ",r.jsx("code",{className:"ggui-code",children:"/"})," (the playground) and the result will land here for future cache hits."]})]})}function J9({message:e}){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsxs("p",{className:"ggui-body",style:{margin:0},children:[r.jsx(Ne,{tone:"signal",children:"unsupported"})," Vector store doesn't support enumeration."]}),r.jsx("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:e})]})}function Q9(){return r.jsxs("div",{className:"ggui-card__body",style:{padding:"16px 12px"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No primitives declared."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Declare packages or local catalogs in"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json#primitives"}),"."]})]})}function gv({title:e,num:n,tone:i,children:s}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:i,children:e})}),r.jsx("p",{className:"ggui-muted",children:s})]})]})}function t$({blueprint:e,height:n,title:i}){var d;const s=typeof e.codeHash=="string",c=i??e.variance.persona??`variant ${e.blueprintId.slice(0,8)}`;if(!s)return r.jsx("div",{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":"pending",className:"ggui-card",style:{height:n??320,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsxs("div",{style:{textAlign:"center"},children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:r.jsx(Ne,{tone:"draft",children:"pending"})}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["This variant has no code yet — the next push against the same contract will gen against"," ",r.jsx("code",{className:"ggui-code",children:e.blueprintId}),"."]})]})});const u=`/preview/${encodeURIComponent(e.blueprintId)}`;return r.jsxs("div",{"data-ggui-variant-preview":!0,"data-ggui-variant-preview-id":e.blueprintId,"data-ggui-variant-preview-state":"ready",className:"ggui-pane",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsx("span",{className:"ggui-pane__title",children:c}),r.jsx("span",{className:"ggui-pane__meta",children:r.jsxs("code",{className:"ggui-code",children:[(d=e.codeHash)==null?void 0:d.slice(0,12),"…"]})})]}),r.jsx("div",{className:"ggui-pane__body",style:{padding:0},children:r.jsx("iframe",{src:u,title:`Preview of ${c}`,sandbox:"allow-scripts allow-same-origin",style:{width:"100%",height:n??320,border:"none",display:"block"}})})]})}function eN({blueprints:e,height:n}){return r.jsx("div",{"data-ggui-variant-comparison":!0,"data-ggui-variant-comparison-count":e.length,style:{display:"grid",gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`,gap:16},children:e.map(i=>r.jsx(t$,{blueprint:i,height:n,title:i.variance.persona??i.blueprintId.slice(0,12)},i.blueprintId))})}const a$=["ui-gen-default-haiku-4-5","ui-gen-advanced-opus-4-7"],ip=.8,tN={persona:"",generator:"",draftsOnly:!1};function aN({filters:e,onChange:n,generatorSlugs:i}){const s=i??a$,c=p=>{n({...e,persona:p.target.value})},u=p=>{n({...e,generator:p.target.value})},d=p=>{n({...e,draftsOnly:p.target.checked})};return r.jsxs("form",{"data-ggui-variants-filter-bar":!0,className:"ggui-form",onSubmit:p=>p.preventDefault(),style:{display:"flex",flexWrap:"wrap",gap:16,alignItems:"flex-end",marginBottom:20},children:[r.jsxs("div",{className:"ggui-field",style:{flex:1,minWidth:200},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-persona",children:"persona"}),r.jsx("input",{id:"ggui-variants-filter-persona","data-ggui-variants-filter-persona":!0,"aria-label":"filter by persona",placeholder:"e.g. minimalist, data-dense",value:e.persona,onChange:c,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),r.jsxs("div",{className:"ggui-field",style:{minWidth:220},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-variants-filter-generator",children:"generator"}),r.jsxs("select",{id:"ggui-variants-filter-generator","data-ggui-variants-filter-generator":!0,"aria-label":"filter by generator",value:e.generator,onChange:u,children:[r.jsx("option",{value:"",children:"any"}),s.map(p=>r.jsx("option",{value:p,children:p},p))]})]}),r.jsxs("label",{className:"ggui-field",htmlFor:"ggui-variants-filter-drafts-only",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[r.jsx("input",{id:"ggui-variants-filter-drafts-only","data-ggui-variants-filter-drafts-only":!0,type:"checkbox","aria-label":"show drafts only",checked:e.draftsOnly,onChange:d}),r.jsxs("span",{className:"ggui-label",style:{margin:0},children:["drafts only (score < ",ip.toFixed(2),")"]})]})]})}function nN(e,n){var s;const i=n.persona.trim().toLowerCase();return!(i.length>0&&!(((s=e.variance.persona)==null?void 0:s.toLowerCase())??"").includes(i)||n.generator.length>0&&e.generator!==n.generator||n.draftsOnly&&(e.validatorScore===void 0||e.validatorScore>=ip))}function rN(e){return e>=ip?"live":e>=.5?"draft":"signal"}function n$({blueprint:e,index:n,onPreview:i,onSetDefault:s,onDelete:c,compareSelected:u,onCompareToggle:d}){const p=e.isOperatorDefault===!0,g=e.variance.persona,h=e.validatorScore;return r.jsxs("li",{"data-ggui-variant-card":!0,"data-ggui-variant-id":e.blueprintId,"data-ggui-variant-default":p?"true":"false","data-ggui-variant-compare-selected":u?"true":"false",className:"ggui-stack__entry",style:u?{outline:"2px solid var(--ggui-ink, #292929)"}:void 0,children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`VAR / ${String(n+1).padStart(2,"0")}`}),r.jsxs("span",{className:"ggui-stack__entry-title",children:[p?r.jsx("span",{"aria-label":"operator default",children:"★ "}):null,g&&g.length>0?g:"(no persona)"]}),g?r.jsxs(Ne,{tone:"ink",children:["persona: ",g]}):null,r.jsx(Ne,{tone:"ink",children:e.generator}),typeof h=="number"?r.jsxs(Ne,{tone:rN(h),children:["score ",h.toFixed(2)]}):null,r.jsxs(Ne,{tone:e.createdBy==="operator"?"live":"draft",children:["by ",e.createdBy]})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsx("code",{className:"ggui-code",children:e.blueprintId}),r.jsxs("span",{style:{marginLeft:12},children:["created ",iN(e.createdAt)]}),e.codeHash?r.jsxs("span",{style:{marginLeft:12},children:["hash ",r.jsx("code",{className:"ggui-code",children:oN(e.codeHash)})]}):r.jsx("span",{style:{marginLeft:12},children:r.jsx(Ne,{tone:"signal",children:"no code"})})]}),e.variance.seedPrompt?r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0",fontStyle:"italic"},children:["“",e.variance.seedPrompt,"”"]}):null,r.jsxs("div",{style:{display:"flex",gap:8,marginTop:12,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"preview",onClick:()=>i(e.blueprintId),children:"preview →"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"set-default",disabled:p,onClick:()=>s(e.blueprintId),title:p?"Already the operator default for this contract":"Pin as the operator default for this contract",children:p?"★ default":"set as default"}),d?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"compare-toggle",onClick:()=>d(e.blueprintId),children:u?"✓ in compare":"add to compare"}):null,r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-action":"delete",onClick:()=>c(e.blueprintId),children:"delete ✕"})]})]})}function iN(e){if(!e)return"—";try{const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toISOString().replace("T"," ").replace(/\.\d+Z$/,"Z")}catch{return e}}function oN(e){return e.length<=12?e:`${e.slice(0,8)}…${e.slice(-4)}`}class ha extends Error{constructor(i,s,c){super(i);Bn(this,"code");Bn(this,"status");this.name="OpsCallError",this.code=s,c!==void 0&&(this.status=c)}}let sN=1;async function lN(e){if((e.headers.get("content-type")??"").includes("text/event-stream")){const i=await e.text(),s=/^data:\s*(.+)$/m.exec(i);if(!s||!s[1])throw new ha("Malformed SSE response from /ops — no data line",-32700,e.status);return JSON.parse(s[1])}return await e.json()}async function Rc(e,n,i){var y,v,j,k;const s=sN++,c=JSON.stringify({jsonrpc:"2.0",id:s,method:"tools/call",params:{name:e,arguments:n}}),u={method:"POST",headers:{"content-type":"application/json",accept:"application/json, text/event-stream"},body:c};i!==void 0&&(u.signal=i);const d=await fetch("/ops",u);if(!d.ok&&d.status!==200){const b=await d.text().catch(()=>"");throw new ha(`/ops returned HTTP ${d.status}${b?` — ${b}`:""}`,-32e3,d.status)}const p=await lN(d);if("error"in p)throw new ha(p.error.message,p.error.code);const g=p.result;if(g.isError){const b=((v=(y=g.content)==null?void 0:y[0])==null?void 0:v.text)??"tool reported error";throw new ha(b,-32e3)}if(g.structuredContent!==void 0)return g.structuredContent;const h=(k=(j=g.content)==null?void 0:j[0])==null?void 0:k.text;if(typeof h=="string"&&h.length>0)return JSON.parse(h);throw new ha(`tool ${e} returned empty result`,-32e3)}function cN(e,n){return Rc("ggui_ops_generate_blueprint",e,n)}function op(e,n){return Rc("ggui_ops_list_blueprints",e,n)}function r$(e,n){return Rc("ggui_ops_update_blueprint",e,n)}function i$(e,n){return Rc("ggui_ops_delete_blueprint",e,n)}function uN({contractHash:e}){var C;const[n,i]=O.useState({kind:"loading"}),[s,c]=O.useState([]),[u,d]=O.useState(!1),p=O.useCallback(async z=>{i({kind:"loading"});try{const N=await op({contractHash:e},z);i({kind:"ready",blueprints:N.blueprints})}catch(N){if(z!=null&&z.aborted)return;const $=N instanceof ha||N instanceof Error?N.message:String(N);i({kind:"error",message:$})}},[e]);O.useEffect(()=>{const z=new AbortController;return p(z.signal),()=>z.abort()},[p]);const g=O.useMemo(()=>n.kind!=="ready"?[]:[...n.blueprints].sort((z,N)=>{const $=z.isOperatorDefault===!0?1:0,w=N.isOperatorDefault===!0?1:0;if($!==w)return w-$;const R=z.validatorScore??-1,x=N.validatorScore??-1;return R!==x?x-R:N.createdAt.localeCompare(z.createdAt)}),[n]),h=(C=g[0])==null?void 0:C.contract,y=O.useMemo(()=>u?g.filter(z=>s.includes(z.blueprintId)):[],[g,s,u]),v=O.useCallback(z=>{Me(`/preview/${encodeURIComponent(z)}`)},[]),j=O.useCallback(async z=>{try{await r$({blueprintId:z,isOperatorDefault:!0}),await p()}catch(N){const $=N instanceof ha||N instanceof Error?N.message:String(N);i({kind:"error",message:$})}},[p]),k=O.useCallback(async z=>{try{await i$({blueprintId:z}),c(N=>N.filter($=>$!==z)),await p()}catch(N){const $=N instanceof ha||N instanceof Error?N.message:String(N);i({kind:"error",message:$})}},[p]),b=O.useCallback(z=>{c(N=>N.includes(z)?N.filter($=>$!==z):[...N,z])},[]);return r.jsxs("section",{className:"ggui-section","data-ggui-variant-detail":!0,"data-ggui-variant-detail-hash":e,children:[r.jsx(tt,{num:"01 / contract",title:"One contract — many variants.",mute:`hash ${e.slice(0,16)}…`,intro:r.jsxs(r.Fragment,{children:["Every variant the server has for this contract, grouped under the canonical"," ",r.jsx("code",{className:"ggui-code",children:"contractHash"}),'. Pick two with the "add to compare" toggle, hit Compare selected, and read aesthetics side-by-side.']})}),r.jsxs("div",{style:{marginBottom:16},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/admin/variants"),children:"← all variants"})," ",r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-detail-generate":!0,onClick:()=>Me(`/admin/variants/${encodeURIComponent(e)}/generate`),children:"generate new variant +"})]}),n.kind==="error"?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ne,{tone:"signal",children:"error"})," Couldn't load variants — ",n.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{p()},children:"retry →"})]})]}):null,h?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"contract"}),r.jsx("span",{className:"ggui-card__num",children:"CTR / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("pre",{"data-ggui-variant-detail-contract":!0,className:"ggui-code",style:{whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:280,overflow:"auto",padding:12,background:"var(--ggui-paper2, #ebe9e1)",borderRadius:4,margin:0,fontSize:"0.75rem"},children:JSON.stringify(h,null,2)})})]}):null,n.kind==="loading"?r.jsx("p",{className:"ggui-body",children:"Loading variants…"}):g.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No variants registered for this contract."}),r.jsx("p",{className:"ggui-muted",children:'Click "generate new variant" above to author the first one.'})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{"data-ggui-variant-compare-controls":!0,style:{display:"flex",gap:12,alignItems:"center",marginBottom:16},children:[r.jsxs(Ne,{tone:"ink",children:[s.length," selected"]}),r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-variant-compare-run":!0,disabled:s.length<2,onClick:()=>d(!0),children:"compare selected →"}),u?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variant-compare-clear":!0,onClick:()=>{d(!1),c([])},children:"exit compare"}):null]}),u&&y.length>=2?r.jsx("div",{"data-ggui-variant-compare-set":y.length,style:{marginBottom:24},children:r.jsx(eN,{blueprints:y,height:420})}):r.jsx("div",{className:"ggui-stack",style:{marginBottom:24},"aria-label":"variants and preview",children:g.map((z,N)=>r.jsxs("article",{"data-ggui-variant-detail-row":!0,"data-ggui-variant-detail-row-id":z.blueprintId,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) minmax(0, 1fr)",gap:16,padding:12,borderBottom:"1px solid var(--ggui-line2, #d6d4cb)"},children:[r.jsx("ul",{className:"ggui-stack__list",style:{listStyle:"none",margin:0,padding:0},children:r.jsx(n$,{blueprint:z,index:N,onPreview:v,onSetDefault:$=>{j($)},onDelete:$=>{k($)},compareSelected:s.includes(z.blueprintId),onCompareToggle:b})}),r.jsx(t$,{blueprint:z,height:240})]},z.blueprintId))})]})]})}function dN({contract:e,contractHash:n,onSubmit:i,onCancel:s,generatorSlugs:c}){const[u,d]=O.useState(""),[p,g]=O.useState(""),[h,y]=O.useState(""),[v,j]=O.useState(""),[k,b]=O.useState(!1),[C,z]=O.useState({kind:"idle"}),N=async w=>{w.preventDefault();let R;if(v.trim().length>0)try{const _=JSON.parse(v);if(typeof _!="object"||_===null||Array.isArray(_)){z({kind:"error",message:'context must be a JSON object (e.g. {"foo": "bar"})'});return}R=_}catch(_){z({kind:"error",message:`context JSON parse failed — ${_ instanceof Error?_.message:String(_)}`});return}z({kind:"pending"});const x={contract:e,...h.length>0?{generator:h}:{},...u.trim().length>0?{persona:u.trim()}:{},...R!==void 0?{context:R}:{},...p.trim().length>0?{seedPrompt:p.trim()}:{},...k?{setAsOperatorDefault:!0}:{}};try{const _=await i(x);"error"in _&&z({kind:"error",message:_.error})}catch(_){z({kind:"error",message:_ instanceof Error?_.message:String(_)})}},$=c??a$;return r.jsxs("form",{"data-ggui-variant-generate-form":!0,"data-ggui-variant-generate-state":C.kind,className:"ggui-form",onSubmit:N,children:[r.jsxs(hf,{title:"contract",num:"GEN / 01",children:[r.jsxs("p",{className:"ggui-muted",style:{margin:"0 0 8px"},children:["Contract hash"," ",r.jsxs("code",{className:"ggui-code",children:[n.slice(0,16),"…"]})," ","— read-only; create variants for the same contract here."]}),r.jsx("pre",{className:"ggui-code",style:{whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:200,overflow:"auto",padding:12,background:"var(--ggui-paper2, #ebe9e1)",borderRadius:4,margin:0,fontSize:"0.75rem"},children:JSON.stringify(e,null,2)})]}),r.jsxs(hf,{title:"variance",num:"GEN / 02",children:[r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-persona",children:"persona"}),r.jsx("input",{id:"ggui-gen-persona",name:"persona","data-ggui-variant-generate-persona":!0,placeholder:"e.g. minimalist, data-dense, mobile-first",value:u,onChange:w=>d(w.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]}),r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-seed",children:"seed prompt"}),r.jsx("textarea",{id:"ggui-gen-seed",name:"seedPrompt","data-ggui-variant-generate-seed":!0,placeholder:"e.g. use a glassy card with rounded corners…",value:p,onChange:w=>g(w.target.value),rows:3})]}),r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-context",children:"context (JSON object, optional)"}),r.jsx("textarea",{id:"ggui-gen-context",name:"context","data-ggui-variant-generate-context":!0,placeholder:'{"locale": "en", "density": "compact"}',value:v,onChange:w=>j(w.target.value),rows:3,spellCheck:!1,style:{fontFamily:"var(--ggui-font-mono, monospace)"}})]})]}),r.jsxs(hf,{title:"dispatch",num:"GEN / 03",children:[r.jsxs("div",{className:"ggui-field",children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-gen-generator",children:"generator"}),r.jsxs("select",{id:"ggui-gen-generator",name:"generator","data-ggui-variant-generate-generator":!0,value:h,onChange:w=>y(w.target.value),children:[r.jsx("option",{value:"",children:"(registry default)"}),$.map(w=>r.jsx("option",{value:w,children:w},w))]})]}),r.jsxs("label",{className:"ggui-field",htmlFor:"ggui-gen-set-default",style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[r.jsx("input",{id:"ggui-gen-set-default","data-ggui-variant-generate-set-default":!0,type:"checkbox",checked:k,onChange:w=>b(w.target.checked)}),r.jsx("span",{className:"ggui-label",style:{margin:0},children:"pin as operator default for this contract"})]})]}),C.kind==="error"?r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ne,{tone:"signal",children:"error"})," ",C.message]}):null,r.jsxs("div",{style:{display:"flex",gap:12,marginTop:16},children:[r.jsx("button",{type:"submit",className:"ggui-btn","data-ggui-variant-generate-submit":!0,disabled:C.kind==="pending",children:C.kind==="pending"?"generating…":"generate →"}),s?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:s,disabled:C.kind==="pending",children:"cancel"}):null]})]})}function hf({title:e,num:n,children:i}){return r.jsxs("div",{className:"ggui-card",style:{marginBottom:16},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsx("div",{className:"ggui-card__body",children:i})]})}function fN({contractHash:e}){const[n,i]=O.useState({kind:"loading"});return O.useEffect(()=>{const s=new AbortController;return(async()=>{try{const c=await op({contractHash:e},s.signal);if(s.signal.aborted)return;if(c.blueprints.length===0){i({kind:"empty"});return}const u=c.blueprints[0];i({kind:"ready",contract:u.contract,variantCount:c.blueprints.length})}catch(c){if(s.signal.aborted)return;const u=c instanceof ha||c instanceof Error?c.message:String(c);i({kind:"error",message:u})}})(),()=>s.abort()},[e]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / generate",title:"Author a new variant.",mute:`hash ${e.slice(0,16)}…`,intro:r.jsxs(r.Fragment,{children:["Forks the contract from an existing variant in this group and dispatches it through"," ",r.jsx("code",{className:"ggui-code",children:"ggui_ops_generate_blueprint"})," ","with your persona + context + seed prompt. The new blueprint persists under the same"," ",r.jsx("code",{className:"ggui-code",children:"contractHash"}),"."]})}),r.jsx("div",{style:{marginBottom:16},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me(`/admin/variants/${encodeURIComponent(e)}`),children:"← contract detail"})}),n.kind==="loading"?r.jsx("p",{className:"ggui-body",children:"Loading contract…"}):n.kind==="error"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ne,{tone:"signal",children:"error"})," ","Couldn't load contract — ",n.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/admin/variants"),children:"← all variants"})]})]}):n.kind==="empty"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:["No variant exists for hash"," ",r.jsx("code",{className:"ggui-code",children:e})," yet."]}),r.jsx("p",{className:"ggui-muted",children:"The generate form needs an existing variant to fork the contract from. Either trigger a push from an agent first (which will mint the initial variant), or navigate back and pick a contract with at least one variant."}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/admin/variants"),children:"← all variants"})]})]}):r.jsx(dN,{contract:n.contract,contractHash:e,onSubmit:async s=>{try{const c=await cN(s);return Me(`/preview/${encodeURIComponent(c.blueprintId)}`),{blueprintId:c.blueprintId}}catch(c){return{error:c instanceof ha||c instanceof Error?c.message:String(c)}}},onCancel:()=>Me(`/admin/variants/${encodeURIComponent(e)}`)})]})}function pN(e){const n=new Map;for(const i of e){const s=n.get(i.contractHash);s?s.push(i):n.set(i.contractHash,[i])}return Array.from(n.entries()).map(([i,s])=>{const c=[...s].sort((p,g)=>{const h=p.isOperatorDefault===!0?1:0,y=g.isOperatorDefault===!0?1:0;if(h!==y)return y-h;const v=p.validatorScore??-1,j=g.validatorScore??-1;return v!==j?j-v:g.createdAt.localeCompare(p.createdAt)}),u=c[0],d=u!==void 0&&typeof u.contract=="object"&&u.contract!==null&&"intent"in u.contract&&typeof u.contract.intent=="string"?u.contract.intent:`(contract ${i.slice(0,10)}…)`;return{contractHash:i,intent:d,blueprints:c}}).sort((i,s)=>{var d,p;const c=((d=i.blueprints[0])==null?void 0:d.createdAt)??"";return(((p=s.blueprints[0])==null?void 0:p.createdAt)??"").localeCompare(c)})}function gN({blueprints:e,filters:n,onPreview:i,onSetDefault:s,onDelete:c,onOpenContract:u,onGenerate:d}){const p=O.useMemo(()=>pN(e),[e]);return e.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",style:{margin:0},children:"No blueprints for this app yet."}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0 0"},children:["Generate one via the per-contract page, or wait for an agent to push a contract through"," ",r.jsx("code",{className:"ggui-code",children:"ggui_handshake"}),"."]})]})]}):r.jsx("div",{"data-ggui-variants-list":!0,"aria-label":"blueprint variants",children:p.map(g=>r.jsx(mN,{group:g,filters:n,onPreview:i,onSetDefault:s,onDelete:c,onOpenContract:u,onGenerate:d},g.contractHash))})}function mN({group:e,filters:n,onPreview:i,onSetDefault:s,onDelete:c,onOpenContract:u,onGenerate:d}){const[p,g]=O.useState(!0),h=e.blueprints.filter(y=>nN(y,n));return r.jsxs("section",{"data-ggui-variants-group":!0,"data-ggui-variants-group-hash":e.contractHash,"data-ggui-variants-group-count":h.length,className:"ggui-stack",style:{marginBottom:24},children:[r.jsxs("header",{className:"ggui-stack__head",style:{alignItems:"center",gap:12},children:[r.jsxs("button",{type:"button","aria-expanded":p,"data-ggui-variants-group-toggle":!0,onClick:()=>g(y=>!y),className:"ggui-stack__num",style:{background:"transparent",border:"none",font:"inherit",cursor:"pointer",color:"inherit",padding:0},children:[p?"▾":"▸"," VAR"]}),r.jsx("span",{className:"ggui-stack__label",children:e.intent}),r.jsxs(Ne,{tone:"ink",children:[h.length,h.length!==e.blueprints.length?` / ${e.blueprints.length}`:""," ","variant",h.length===1?"":"s"]}),r.jsxs("code",{className:"ggui-code",style:{marginLeft:"auto",fontSize:"0.75rem"},children:[e.contractHash.slice(0,16),"…"]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-open":!0,onClick:()=>u(e.contractHash),children:"open →"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-variants-group-generate":!0,onClick:()=>d(e.contractHash),children:"generate variant +"})]}),p?h.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No variants in this group match the active filters."}):r.jsx("ul",{className:"ggui-stack__list",children:h.map((y,v)=>r.jsx(n$,{blueprint:y,index:v,onPreview:i,onSetDefault:s,onDelete:c},y.blueprintId))}):null]})}function hN(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState(tN),c=O.useCallback(async y=>{n({kind:"loading"});try{const v=await op({},y);n({kind:"ready",blueprints:v.blueprints})}catch(v){if(y!=null&&y.aborted)return;const j=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[]);O.useEffect(()=>{const y=new AbortController;return c(y.signal),()=>y.abort()},[c]);const u=O.useCallback(y=>{Me(`/preview/${encodeURIComponent(y)}`)},[]),d=O.useCallback(async y=>{try{await r$({blueprintId:y,isOperatorDefault:!0}),await c()}catch(v){const j=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),p=O.useCallback(async y=>{try{await i$({blueprintId:y}),await c()}catch(v){const j=v instanceof ha||v instanceof Error?v.message:String(v);n({kind:"error",message:j})}},[c]),g=O.useCallback(y=>{Me(`/admin/variants/${encodeURIComponent(y)}`)},[]),h=O.useCallback(y=>{Me(`/admin/variants/${encodeURIComponent(y)}/generate`)},[]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / variants",title:"Blueprint variants — N codes per contract.",mute:"Operator-pinned defaults · validatorScore · personas.",intro:r.jsx(r.Fragment,{children:"Every blueprint variant the server has for the current app, grouped by the contract they implement. The matcher picks among siblings in a group at handshake time — pin one as the operator default to fix the floor, or seed personas for the LLM selector (MVB-6) to choose from."})}),e.kind==="error"?r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ne,{tone:"signal",children:"error"})," Couldn't load variants — ",e.message,"."]}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:"retry →"})]})]}):null,r.jsx(aN,{filters:i,onChange:s}),e.kind==="loading"?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"loading"}),r.jsx("span",{className:"ggui-card__num",children:"VAR / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("p",{className:"ggui-body",children:"Loading variants…"})})]}):e.kind==="ready"?r.jsx(gN,{blueprints:e.blueprints,filters:i,onPreview:u,onSetDefault:y=>{d(y)},onDelete:y=>{p(y)},onOpenContract:g,onGenerate:h}):null]})}function yN(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState(null),[c,u]=O.useState(null),d=async()=>{n({kind:"loading"});try{const g=await fetch("/ggui/console/oauth-clients",{headers:{accept:"application/json"}});if(!g.ok){if(g.status===404){n({kind:"error",message:"OAuth not enabled on this server — re-run `ggui serve --oauth` to mount the management routes."});return}n({kind:"error",message:`server returned ${g.status}`});return}const h=await g.json();n({kind:"ready",data:h})}catch(g){n({kind:"error",message:String(g)})}};O.useEffect(()=>{d()},[]);const p=async g=>{s(g);try{const h=await fetch(`/ggui/console/oauth-clients/${encodeURIComponent(g)}`,{method:"DELETE"});if(h.status!==204){n({kind:"error",message:`revoke failed — server returned ${h.status}`});return}u(null),await d()}catch(h){n({kind:"error",message:`revoke failed — ${String(h)}`})}finally{s(null)}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / clients",title:"Connected apps.",mute:"OAuth clients that have registered against this server.",intro:r.jsxs(r.Fragment,{children:["Each row is an OAuth client (typically an MCP custom-connector host like claude.ai) that completed"," ",r.jsx("code",{className:"ggui-code",children:"/oauth/register"})," against this server. Revoke removes the registration so future re-discovery fails — Phase 1 caveat:"," ",r.jsx("strong",{children:"existing bearers keep working"})," until they expire or you re-pair."]})}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading clients…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-clients-error":!0,children:["Couldn't load clients — ",e.message]}):r.jsx(vN,{clients:e.data.clients,revokingId:i,pendingConfirm:c,onRevokeRequest:g=>u(g),onRevokeCancel:()=>u(null),onRevokeConfirm:g=>{p(g)},onRefresh:()=>{d()}})]})}function vN({clients:e,revokingId:n,pendingConfirm:i,onRevokeRequest:s,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:d}){return e.length===0?r.jsxs("div",{className:"ggui-stack","data-ggui-clients-list":!0,"aria-label":"connected apps (empty)",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CON"}),r.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),r.jsx("span",{className:"ggui-stack__count",children:"0"})]}),r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No clients have registered yet. Add this server as a custom connector in claude.ai (or another MCP host) — its OAuth flow will register a client here."})]}):r.jsxs("div",{"data-ggui-clients-list":!0,className:"ggui-stack","aria-label":"connected apps",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"CON"}),r.jsx("span",{className:"ggui-stack__label",children:"connected apps"}),r.jsx("span",{className:"ggui-stack__count",children:e.length}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:d,style:{marginLeft:"auto"},children:"refresh"})]}),r.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>r.jsx($N,{client:p,index:g+1,isRevoking:n===p.clientId,isPendingConfirm:i===p.clientId,onRevokeRequest:s,onRevokeCancel:c,onRevokeConfirm:u},p.clientId))})]})}function $N({client:e,index:n,isRevoking:i,isPendingConfirm:s,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:d}){const p=e.clientId.slice(0,12),g=e.clientName??p;return r.jsxs("li",{"data-ggui-client-id":e.clientId,className:"ggui-stack__entry",style:{opacity:i?.5:1},children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`CON / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:g})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["id ",r.jsxs("code",{className:"ggui-code",children:[p,"…"]})]}),r.jsxs("span",{style:{marginLeft:12},children:["registered"," ",r.jsx("code",{className:"ggui-code",children:bN(e.createdAt)})]})]}),e.redirectUris.length>0?r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:4},children:r.jsxs("span",{children:["redirect"," ",r.jsx("code",{className:"ggui-code",children:e.redirectUris[0]}),e.redirectUris.length>1?` (+${e.redirectUris.length-1} more)`:""]})}):null,r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:s?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-client-revoke":!0,disabled:i,onClick:()=>d(e.clientId),children:i?"revoking…":"confirm revoke"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:i,onClick:u,children:"cancel"})]}):r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-client-revoke":!0,disabled:i,onClick:()=>c(e.clientId),children:"revoke"})})]})}function bN(e){const n=Date.now()-e;if(n<0)return"just now";const i=Math.floor(n/1e3);if(i<60)return`${i}s ago`;const s=Math.floor(i/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}const xN=new Set(["theme"]),jN={blueprints:{path:"/admin/blueprints",label:"browse blueprints →",mute:"The Blueprints page renders every entry with its primitives + props."},primitives:{path:"/admin/blueprints",label:"browse primitives →",mute:"Primitives surface alongside blueprints on the Blueprints page."},mcpMounts:{path:"/admin/tools",label:"open Tools →",mute:"The Tools page lists every mounted MCP tool with its handler + schema."},storage:{path:"/admin/status",label:"open Status →",mute:"The Status dashboard shows session + vector-store backends as live wiring."},agent:{path:"/admin/status",label:"open Status →",mute:"The Status dashboard shows agent + generation wiring."}};function _N(){const[e,n]=O.useState({kind:"loading"});return O.useEffect(()=>{const i=new AbortController;return(async()=>{try{const s=await fetch("/ggui/console/config",{signal:i.signal,headers:{accept:"application/json"}});if(!s.ok){n({kind:"error",message:`server returned ${s.status}`});return}const c=await s.json();n({kind:"ready",data:c})}catch(s){if(i.signal.aborted)return;n({kind:"error",message:String(s)})}})(),()=>i.abort()},[]),e.kind==="loading"?r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / config",title:"ggui.json viewer.",mute:"Probing project root."}),r.jsx(mv,{title:"loading",num:"CFG / 01",tone:"draft",children:"Loading config…"})]}):e.kind==="error"?r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / config",title:"ggui.json viewer.",mute:"Endpoint unreachable."}),r.jsxs(mv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load config — ",e.message,"."]})]}):r.jsx(SN,{data:e.data})}function SN({data:e}){const n=O.useMemo(()=>Object.keys(e.schema.properties??{}).filter(u=>!xN.has(u)),[e.schema]),[i,s]=O.useState(n[0]??""),c=e.source.found?e.source.error?"found-invalid":"found-valid":"missing";return r.jsxs("section",{className:"ggui-section","data-ggui-config-source":c,children:[r.jsx(tt,{num:"01 / admin / config",title:"ggui.json — read-only manifest view.",mute:wN(e),intro:r.jsxs(r.Fragment,{children:["Debug view of every top-level field your"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," can carry. Descriptions come from the Zod schema; the value column shows what your manifest currently sets (or the schema default when omitted). To ",r.jsx("strong",{children:"author"})," theme, paired keys, OAuth providers, etc., use the dedicated pages in the admin sub-nav — this page is just for inspection."]})}),r.jsx(kN,{data:e}),c==="found-invalid"?null:r.jsxs("div",{className:"ggui-config-stack",children:[r.jsx(NN,{sections:n,active:i,onSelect:s}),r.jsx(zN,{data:e,active:i})]}),e.source.found&&"raw"in e&&e.raw?r.jsx(TN,{raw:e.raw}):null]})}function wN(e){return e.source.found?e.source.error?"Validation failed.":"Loaded from disk.":"No ggui.json reachable."}function kN({data:e}){return e.source.found?e.source.error?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"validation failed"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"signal",children:"invalid"})}),r.jsx("p",{className:"ggui-muted",children:r.jsx("code",{className:"ggui-code",children:e.source.path})}),r.jsx("pre",{className:"ggui-config-error",children:e.source.error.message})]})]}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"source"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"live",children:"loaded"})}),r.jsx("p",{className:"ggui-muted",children:r.jsx("code",{className:"ggui-code",children:e.source.path})})]})]}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"no manifest"}),r.jsx("span",{className:"ggui-card__num",children:"SRC / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"ink",children:"missing"})}),r.jsxs("p",{className:"ggui-muted",children:["No ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," walked up from"," ",r.jsx("code",{className:"ggui-code",children:e.source.searchedFrom}),". The schema below shows what would be configurable; create a"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," at the project root and reload."]})]})]})}function NN({sections:e,active:n,onSelect:i}){return r.jsx("nav",{"aria-label":"config sections","data-ggui-config-active-section":n,children:r.jsx("ul",{className:"ggui-config-tabs",role:"tablist",children:e.map(s=>r.jsx("li",{"data-ggui-config-section":s,role:"presentation",children:r.jsx("button",{type:"button",role:"tab",onClick:()=>i(s),"aria-selected":s===n?"true":"false","aria-current":s===n?"true":void 0,className:`ggui-config-tabs__btn${s===n?" is-active":""}`,children:s})},s))})})}function zN({data:e,active:n}){var d,p;const i=(d=e.schema.properties)==null?void 0:d[n],s=e.source.found&&"manifest"in e&&e.manifest?e.manifest[n]:void 0,c=((p=e.schema.required)==null?void 0:p.includes(n))??!1;if(!i)return r.jsx("div",{className:"ggui-config-panel",children:r.jsxs("p",{className:"ggui-muted",children:['No schema for "',n,'".']})});const u=jN[n];return r.jsxs("div",{className:"ggui-config-panel","data-ggui-config-section":n,children:[r.jsxs("div",{className:"ggui-config-panel__head",children:[r.jsx("span",{className:"ggui-config-panel__name",children:r.jsx("code",{className:"ggui-code",children:n})}),c?r.jsx(Ne,{tone:"signal",children:"required"}):r.jsx(Ne,{tone:"ink",children:"optional"}),r.jsx("span",{className:"ggui-config-panel__type",children:CN(i)})]}),u?r.jsx(EN,{link:u}):null,i.description?r.jsx("p",{className:"ggui-body",style:{margin:"12px 0"},children:i.description}):r.jsx("p",{className:"ggui-muted",children:"No description on the schema — file a bug if this is a known field."}),r.jsx(sc,{label:"current",value:s,absentNote:"not set in your manifest — schema default applies"}),i.default!==void 0?r.jsx(sc,{label:"default",value:i.default}):r.jsx(sc,{label:"default",value:void 0,absentNote:"no default — must be set explicitly when used"}),i.enum?r.jsx(sc,{label:"allowed",value:i.enum}):null,r.jsxs("div",{style:{marginTop:16},children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:"schema"}),r.jsx("pre",{className:"ggui-config-schema",children:JSON.stringify(i,null,2)})]})]})}function CN(e){return e.const!==void 0?`literal "${String(e.const)}"`:e.enum?`enum (${e.enum.length})`:e.type==="array"?"array":e.type==="object"?"object":typeof e.type=="string"?e.type:"unknown"}function EN({link:e}){return r.jsxs("div",{"data-ggui-config-cross-link":e.path,style:{marginTop:8,padding:"10px 12px",background:"var(--ggui-paper-2)",border:"1px solid var(--ggui-line-1)",borderRadius:2,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me(e.path),style:{fontSize:12},children:e.label}),r.jsx("span",{className:"ggui-muted",style:{fontSize:12,flex:1},children:e.mute})]})}function sc({label:e,value:n,absentNote:i}){return r.jsxs("div",{className:"ggui-config-value-row",children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:4,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),n===void 0?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:i??"—"}):r.jsx("pre",{className:"ggui-config-value",children:JSON.stringify(n,null,2)})]})}function TN({raw:e}){const[n,i]=O.useState(!1);return r.jsxs("div",{className:"ggui-card",style:{marginTop:24},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"raw ggui.json"}),r.jsx("span",{className:"ggui-card__num",children:"RAW / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>i(s=>!s),"aria-expanded":n,children:[n?"hide":"show"," raw bytes"]}),n?r.jsx("pre",{className:"ggui-config-raw","data-ggui-config-raw":!0,children:e}):null]})]})}function mv({title:e,num:n,tone:i,children:s}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:i,children:e})}),r.jsx("p",{className:"ggui-muted",children:s})]})]})}function MN(){const[e,n]=O.useState([]),[i,s]=O.useState("loading"),[c,u]=O.useState(null),[d,p]=O.useState(new Set),g=O.useRef(new Set);O.useEffect(()=>{let y=!1,v=null;const j=b=>{g.current.has(b.id)||(g.current.add(b.id),n(C=>[b,...C].slice(0,500)))};return(async()=>{try{const b=await fetch("/ggui/console/llm-trace/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!b.ok)throw new Error(`recent fetch returned ${b.status}`);const C=await b.json();if(y)return;const z=[...C.events].reverse();for(const N of z)g.current.add(N.id);n(z),s("live")}catch(b){if(y)return;s("error"),u(b instanceof Error?b.message:"Could not load recent LLM trace.");return}v=new EventSource("/ggui/console/llm-trace/stream",{withCredentials:!0}),v.onmessage=b=>{try{const C=JSON.parse(b.data);j(C)}catch{}},v.onerror=()=>{s("reconnecting")},v.onopen=()=>{s("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7A",title:"LLM trace.",mute:"Live.",intro:r.jsx(r.Fragment,{children:"Every LLM call the harness makes during generation — system prompt, user prompt, tool defs, completion, token counts. Anthropic only for now; OpenAI / Google / OpenRouter slot in later. Bounded ring buffer — most recent 200 events stay in memory."})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:i==="loading"?"connecting…":i==="live"?`live · ${e.length}`:i==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-llm-trace-error":!0,children:c}):null,e.length===0&&i!=="error"?r.jsx("p",{className:"ggui-muted",children:"No LLM calls yet. Trigger a generation (push a prompt through your MCP client) and they'll appear here as they fire."}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-llm-trace-list":!0,children:e.map(y=>r.jsx(RN,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function RN({event:e,expanded:n,onToggle:i}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.result?`${e.result.inputTokens} in · ${e.result.outputTokens} out`+(e.result.cacheRead?` · ${e.result.cacheRead} cache hit`:"")+(e.result.cacheCreated?` · ${e.result.cacheCreated} cache write`:""):"—",d=e.error?"error":"ok";return r.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"10px 12px",background:"var(--ggui-paper)"},"data-ggui-llm-trace-event":e.id,"data-ggui-llm-trace-status":d,children:[r.jsxs("button",{type:"button",onClick:i,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsxs("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.provider,"/",e.model]}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.kind}),r.jsx("span",{style:{flex:1}}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:u}),e.error?r.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:"error"}):null]}),n?r.jsx(ON,{event:e}):null]})}function ON({event:e}){var n,i,s;return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?r.jsx(Br,{label:"error",children:r.jsx("pre",{style:Ko,children:e.error.message})}):null,e.systemPrompt?r.jsx(Br,{label:"system prompt",children:r.jsx("pre",{style:Ko,children:e.systemPrompt})}):null,e.userPrompt?r.jsx(Br,{label:"user prompt",children:r.jsx("pre",{style:Ko,children:e.userPrompt})}):null,e.tools&&e.tools.length>0?r.jsx(Br,{label:`tools (${e.tools.length})`,children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.tools.map(c=>r.jsxs("li",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,padding:"2px 0"},children:[r.jsx("strong",{children:c.name}),r.jsxs("span",{className:"ggui-muted",children:[" — ",c.description]})]},c.name))})}):null,(n=e.result)!=null&&n.text?r.jsx(Br,{label:"completion text",children:r.jsx("pre",{style:Ko,children:e.result.text})}):null,(i=e.result)!=null&&i.toolCalls&&e.result.toolCalls.length>0?r.jsx(Br,{label:`tool calls (${e.result.toolCalls.length})`,children:r.jsx("pre",{style:Ko,children:JSON.stringify(e.result.toolCalls,null,2)})}):null,(s=e.result)!=null&&s.turnsUsed?r.jsx(Br,{label:"agentic turns",children:r.jsx("span",{className:"ggui-muted",children:e.result.turnsUsed})}):null]})}function Br({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const Ko={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:360,overflow:"auto"};function AN(){const[e,n]=O.useState([]),[i,s]=O.useState("loading"),[c,u]=O.useState(null),[d,p]=O.useState(new Set),g=O.useRef(new Set);O.useEffect(()=>{let y=!1,v=null;const j=b=>{g.current.has(b.id)||(g.current.add(b.id),n(C=>[b,...C].slice(0,500)))};return(async()=>{try{const b=await fetch("/ggui/console/validator/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!b.ok)throw new Error(`recent fetch returned ${b.status}`);const C=await b.json();if(y)return;const z=[...C.events].reverse();for(const N of z)g.current.add(N.id);n(z),s("live")}catch(b){if(y)return;s("error"),u(b instanceof Error?b.message:"Could not load recent validator trace.");return}v=new EventSource("/ggui/console/validator/stream",{withCredentials:!0}),v.onmessage=b=>{try{const C=JSON.parse(b.data);j(C)}catch{}},v.onerror=()=>{s("reconnecting")},v.onopen=()=>{s("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7B",title:"Validator tier results.",mute:"Live.",intro:r.jsxs(r.Fragment,{children:["Every ",r.jsx("code",{className:"ggui-code",children:"runCheck()"})," the harness performs during generation — which axis-checks fired, which tier-0 deterministic checks failed, what the runtime- render probe surfaced, what the LLM evaluator flagged. Bounded ring buffer — most recent 200 events stay in memory."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:i==="loading"?"connecting…":i==="live"?`live · ${e.length}`:i==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-validator-error":!0,children:c}):null,e.length===0&&i!=="error"?r.jsx("p",{className:"ggui-muted",children:"No validator runs yet. Trigger a generation (push a prompt through your MCP client) and tier results will appear here as they fire."}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-validator-list":!0,children:e.map(y=>r.jsx(DN,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function DN({event:e,expanded:n,onToggle:i}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.issues.filter(h=>h.result==="fail").length,d=e.issues.filter(h=>h.result==="warn").length,p=u>0?"fail":d>0?"warn":"pass",g=e.harnessId.length>12?e.harnessId.slice(0,12)+"…":e.harnessId;return r.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"10px 12px",background:"var(--ggui-paper)"},"data-ggui-validator-event":e.id,"data-ggui-validator-outcome":p,children:[r.jsxs("button",{type:"button",onClick:i,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%",flexWrap:"wrap"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},title:e.harnessId,children:g}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:e.workflowId}),r.jsx(lc,{label:"axis",count:e.summary.axisIssues}),r.jsx(lc,{label:"tier-0",count:e.summary.tierIssues}),r.jsx(lc,{label:"probe",count:e.summary.runtimeRenderIssues,dimmed:e.skippedRuntimeRender}),r.jsx(lc,{label:"llm",count:e.summary.llmIssues}),r.jsx("span",{style:{flex:1}}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),r.jsx(IN,{outcome:p,fails:u,warns:d})]}),n?r.jsx(UN,{event:e}):null]})}function lc({label:e,count:n,dimmed:i}){const s=n>0;return r.jsxs("span",{style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",padding:"0 6px",border:"1px solid var(--ggui-rule)",opacity:i?.4:s?1:.7},children:[e," ",n]})}function IN({outcome:e,fails:n,warns:i}){const s=e==="pass"?"pass":e==="warn"?`${i} warn`:`${n} fail`;return r.jsx("span",{style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",padding:"0 6px",border:"1px solid var(--ggui-rule)"},"data-ggui-validator-pill":e,children:s})}function UN({event:e}){const n=LN(e.issues);return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[e.error?r.jsx(Ba,{label:"error",children:r.jsx("pre",{style:uc,children:e.error.message})}):null,r.jsx(Ba,{label:"harness",children:r.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsxs("div",{children:["id: ",e.harnessId]}),r.jsxs("div",{children:["workflow: ",e.workflowId]}),r.jsxs("div",{children:["compiled: ",e.hadCompiledCode?"yes":"no — checks skipped"]}),r.jsxs("div",{children:["runtime-render: ",e.skippedRuntimeRender?"skipped":"ran"]})]})}),r.jsx(Ba,{label:"classification",children:r.jsx("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:Object.entries(e.classification).map(([i,s])=>r.jsxs("div",{children:[i,": ",String(s)]},i))})}),e.summary.firedCheckIds.length>0?r.jsx(Ba,{label:`fired check ids (${e.summary.firedCheckIds.length})`,children:r.jsx("pre",{style:uc,children:e.summary.firedCheckIds.join(`
|
|
185
|
-
`)})}):null,n.axis.length>0?r.jsx(Ba,{label:`axis issues (${n.axis.length})`,children:r.jsx(cc,{issues:n.axis})}):null,n.tier0.length>0?r.jsx(Ba,{label:`tier-0 issues (${n.tier0.length})`,children:r.jsx(cc,{issues:n.tier0})}):null,n.tier1.length>0?r.jsx(Ba,{label:`tier-1 issues (${n.tier1.length})`,children:r.jsx(cc,{issues:n.tier1})}):null,n.tier2.length>0?r.jsx(Ba,{label:`tier-2 issues (${n.tier2.length})`,children:r.jsx(cc,{issues:n.tier2})}):null,e.prompt?r.jsx(Ba,{label:"prompt",children:r.jsx("pre",{style:uc,children:e.prompt})}):null,e.sourceCode?r.jsx(Ba,{label:"source under check",children:r.jsx("pre",{style:uc,children:e.sourceCode})}):null]})}function LN(e){const n=[],i=[],s=[],c=[];for(const u of e){if(typeof u.subcategory=="string"&&u.subcategory.startsWith("axis.")){n.push(u);continue}u.tier===0?i.push(u):u.tier===1?s.push(u):c.push(u)}return{axis:n,tier0:i,tier1:s,tier2:c}}function cc({issues:e}){return r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:8},children:e.map((n,i)=>r.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"6px 8px",background:"var(--ggui-paper-2, #efeee8)"},"data-ggui-validator-issue":n.category,"data-ggui-validator-issue-result":n.result,children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",flexWrap:"wrap",fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:[r.jsx("span",{style:{padding:"0 4px",border:"1px solid var(--ggui-rule)"},children:n.result}),r.jsx("span",{style:{fontWeight:500},children:n.category}),n.subcategory?r.jsx("span",{className:"ggui-muted",children:n.subcategory}):null,n.priority?r.jsx("span",{className:"ggui-muted",children:n.priority}):null,n.severity?r.jsx("span",{className:"ggui-muted",children:n.severity}):null,typeof n.line=="number"?r.jsxs("span",{className:"ggui-muted",children:["line ",n.line]}):null]}),r.jsx("div",{style:{fontSize:12,marginTop:4},children:n.description}),n.fix?r.jsxs("div",{className:"ggui-muted",style:{fontSize:12,marginTop:2},children:["fix: ",n.fix]}):null]},i))})}function Ba({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const uc={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:360,overflow:"auto"};function VN(e){return e==="synth-ok"?"synth-ok":e==="synth-fail"?"synth-fail":e==="push-classify"?"classify":e==="match-exact"||e==="match-semantic"||e==="hit"?"match":"miss"}function HN(){const[e,n]=O.useState([]),[i,s]=O.useState("loading"),[c,u]=O.useState(null),[d,p]=O.useState(new Set),[g,h]=O.useState("all"),[y,v]=O.useState("all"),j=O.useRef(new Set);O.useEffect(()=>{let $=!1,w=null;const R=_=>{j.current.has(_.id)||(j.current.add(_.id),n(T=>[_,...T].slice(0,500)))};return(async()=>{try{const _=await fetch("/ggui/console/cache/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!_.ok)throw new Error(`recent fetch returned ${_.status}`);const T=await _.json();if($)return;const A=[...T.events].reverse();for(const I of A)j.current.add(I.id);n(A),s("live")}catch(_){if($)return;s("error"),u(_ instanceof Error?_.message:"Could not load recent cache trace.");return}w=new EventSource("/ggui/console/cache/stream",{withCredentials:!0}),w.onmessage=_=>{try{const T=JSON.parse(_.data);R(T)}catch{}},w.onerror=()=>{s("reconnecting")},w.onopen=()=>{s("live")}})(),()=>{$=!0,w&&w.close()}},[]);const k=$=>{p(w=>{const R=new Set(w);return R.has($)?R.delete($):R.add($),R})},b=BN(e),C=qN(e),z=g==="all"?e:g==="no-strategy"?e.filter($=>$.strategy===void 0):e.filter($=>$.strategy===g),N=y==="all"?z:z.filter($=>$.agentClassification===y);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7C",title:"Cache decisions.",mute:"Live.",intro:r.jsx(r.Fragment,{children:"Every blueprint-cache lookup the matcher runs — query intent, threshold, top-k candidate similarity scores, and the outcome (MATCH on canonical-key equality or judge accept; MISS on no-match buckets; SYNTH for cold-path contract synthesis; PUSH for paired-push confirm-vs-override classification). Quality-overlay chips surface validator findings on synth output, cosine novelty distance from the registry, and the agent's confirm-vs-override rate against the handshake's provisional. Filter by strategy or agent disposition to slice the stream. Bounded ring buffer — most recent 200 events stay in memory."})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:i==="loading"?"connecting…":i==="live"?`live · ${e.length}`:i==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-cache-trace-error":!0,children:c}):null,r.jsx(PN,{filter:g,onFilter:h,counts:b}),r.jsx(ZN,{filter:y,onFilter:v,counts:C}),e.length===0&&i!=="error"?r.jsx("p",{className:"ggui-muted",children:"No cache lookups yet. Trigger a generation (push a prompt through your MCP client) and decisions will appear here as they fire."}):null,e.length>0&&N.length===0?r.jsx("p",{className:"ggui-muted",children:"No events for this strategy. Try a different filter."}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-cache-trace-list":!0,children:N.map($=>r.jsx(GN,{event:$,expanded:d.has($.id),onToggle:()=>k($.id)},$.id))})]})]})]})}function BN(e){let n=0,i=0,s=0;for(const c of e)c.strategy==="exact-key"?n+=1:c.strategy==="semantic"?i+=1:s+=1;return{all:e.length,"exact-key":n,semantic:i,"no-strategy":s}}function qN(e){let n=0,i=0;for(const s of e)s.agentClassification==="confirm"?n+=1:s.agentClassification==="override"&&(i+=1);return{all:e.length,confirm:n,override:i}}function PN({filter:e,onFilter:n,counts:i}){const s=[{key:"all",label:"all"},{key:"exact-key",label:"exact-key"},{key:"semantic",label:"semantic"},{key:"no-strategy",label:"no-strategy"}];return r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-filter":!0,children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginRight:4},children:"strategy"}),s.map(c=>{const u=e===c.key,d=i[c.key];return r.jsxs("button",{type:"button",onClick:()=>n(c.key),style:{all:"unset",cursor:"pointer",fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"2px 8px",border:"1px solid var(--ggui-rule)",background:u?"var(--ggui-ink)":"transparent",color:u?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-filter-key":c.key,"data-ggui-cache-trace-filter-active":u?"true":"false",children:[c.label," · ",d]},c.key)})]})}function ZN({filter:e,onFilter:n,counts:i}){const s=[{key:"all",label:"all"},{key:"confirm",label:"confirm"},{key:"override",label:"override"}];return r.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},"data-ggui-cache-trace-classification-filter":!0,children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginRight:4},children:"agent"}),s.map(c=>{const u=e===c.key,d=i[c.key];return r.jsxs("button",{type:"button",onClick:()=>n(c.key),style:{all:"unset",cursor:"pointer",fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"2px 8px",border:"1px solid var(--ggui-rule)",background:u?"var(--ggui-ink)":"transparent",color:u?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-classification-key":c.key,"data-ggui-cache-trace-classification-active":u?"true":"false",children:[c.label," · ",d]},c.key)})]})}function GN({event:e,expanded:n,onToggle:i}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=VN(e.decision),d=u==="match"&&e.winningBlueprintId,p=e.candidates[0],g=p?p.score.toFixed(3):"—",h=e.intent.length>80?`${e.intent.slice(0,80)}…`:e.intent;return r.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"10px 12px",background:"var(--ggui-paper)"},"data-ggui-cache-trace-event":e.id,"data-ggui-cache-trace-decision":e.decision,...e.strategy?{"data-ggui-cache-trace-strategy":e.strategy}:{},...e.agentClassification?{"data-ggui-cache-trace-classification":e.agentClassification}:{},children:[r.jsxs("button",{type:"button",onClick:i,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx(FN,{outcome:u}),e.strategy?r.jsx(YN,{strategy:e.strategy}):null,e.agentClassification?r.jsx(o$,{classification:e.agentClassification}):null,e.validatorFindings&&e.validatorFindings.length>0?r.jsx(s$,{count:e.validatorFindings.length,severity:e.validatorFindings.some(y=>y.severity==="error")?"error":"warn"}):null,r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h||r.jsx("span",{className:"ggui-muted",children:"(empty intent)"})}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["top ",g]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:[e.durationMs,"ms"]}),d?r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)"},children:e.winningBlueprintId}):null]}),n?r.jsx(KN,{event:e}):null]})}function FN({outcome:e}){const n=e==="match"||e==="synth-ok",i=e==="match"?"MATCH":e==="synth-ok"||e==="synth-fail"?"SYNTH":e==="classify"?"PUSH":"MISS";return r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:11,padding:"0 8px",border:"1px solid var(--ggui-rule)",background:n?"var(--ggui-ink)":"transparent",color:n?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-outcome":e,children:i})}function YN({strategy:e}){return r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:10,padding:"0 6px",border:"1px dashed var(--ggui-rule)",background:"transparent",color:"var(--ggui-ink)",letterSpacing:"0.05em",textTransform:"lowercase"},children:e})}function o$({classification:e}){const n=e==="confirm";return r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:10,padding:"0 6px",border:"1px solid var(--ggui-rule)",background:n?"var(--ggui-ink)":"transparent",color:n?"var(--ggui-paper)":"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-classification-chip":e,children:e})}function s$({count:e,severity:n}){return r.jsxs("span",{title:n==="error"?"Validator emitted at least one error finding — synth dropped the contract.":"Validator emitted warning findings — contract was returned but flagged.",style:{fontFamily:"var(--ggui-font-mono)",fontSize:10,padding:"0 6px",border:n==="error"?"1px solid var(--ggui-ink)":"1px dashed var(--ggui-rule)",background:"transparent",color:"var(--ggui-ink)",letterSpacing:"0.05em"},"data-ggui-cache-trace-validator-severity":n,children:[n==="error"?"err":"warn"," · ",e]})}function KN({event:e}){return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[r.jsx(Gn,{label:"reason",children:r.jsx("p",{style:{margin:0,fontSize:13},children:e.reason})}),r.jsx(Gn,{label:"decision class",children:r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsx("span",{children:e.decision}),e.strategy?r.jsxs("span",{className:"ggui-muted",children:["· strategy = ",e.strategy]}):null,e.agentClassification?r.jsxs("span",{className:"ggui-muted",children:["· classification = ",e.agentClassification]}):null]})}),e.agentClassification?r.jsx(Gn,{label:"agent classification",children:r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsx(o$,{classification:e.agentClassification}),r.jsx("span",{className:"ggui-muted",children:e.agentClassification==="confirm"?"agent push contract canonicalizes to the handshake plan key":"agent push contract diverges from the handshake plan key"})]})}):null,e.cosineNoveltyDistance!==void 0?r.jsx(Gn,{label:"cosine novelty distance",children:r.jsx("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},title:"1 - top.cosine. Higher = farther from any registered blueprint. Track over time to spot synth fragmentation.",children:e.cosineNoveltyDistance.toFixed(3)})}):null,e.validatorFindings&&e.validatorFindings.length>0?r.jsx(Gn,{label:`validator findings (${e.validatorFindings.length})`,children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.validatorFindings.map((n,i)=>{var s;return r.jsxs("li",{style:{padding:"4px 0",borderBottom:i<(((s=e.validatorFindings)==null?void 0:s.length)??0)-1?"1px solid var(--ggui-rule)":"none",display:"grid",gap:2},children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[r.jsx(s$,{count:1,severity:n.severity}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.kind})]}),r.jsx("div",{style:{fontSize:12},children:n.hint})]},`${n.kind}-${i}`)})})}):null,r.jsx(Gn,{label:"intent",children:r.jsx("pre",{style:WN,children:e.intent||"(empty)"})}),r.jsx(Gn,{label:"scope / threshold",children:r.jsxs("div",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[r.jsxs("div",{children:["scope = ",r.jsx("strong",{children:e.scope})]}),r.jsxs("div",{children:["threshold = ",r.jsx("strong",{children:e.threshold})]}),r.jsxs("div",{children:["expectedKey ="," ",r.jsx("strong",{children:e.expectedKey||"(none)"})]}),e.winningBlueprintId?r.jsxs("div",{children:["winningBlueprintId ="," ",r.jsx("strong",{children:e.winningBlueprintId})]}):null]})}),r.jsx(Gn,{label:`candidates (${e.candidates.length})`,children:e.candidates.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:"No candidates returned by the vector store."}):r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:e.candidates.map((n,i)=>{const s=e.winningBlueprintId!==void 0&&n.key===e.winningBlueprintId;return r.jsxs("li",{style:{padding:"4px 0",borderBottom:i<e.candidates.length-1?"1px solid var(--ggui-rule)":"none",display:"grid",gap:4},children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline"},children:[r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12,fontWeight:s?600:400},children:n.key}),s?r.jsx("span",{className:"ggui-muted",style:{fontSize:10},children:"(winner)"}):null,r.jsx("span",{style:{flex:1}}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:n.score.toFixed(3)})]}),n.cachedIntent?r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n.cachedIntent}):null]},`${n.key}-${i}`)})})})]})}function Gn({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}const WN={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:360,overflow:"auto"};function XN(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState({kind:"idle"}),[c,u]=O.useState(null),[d,p]=O.useState(0);O.useEffect(()=>{const h=new AbortController;return(async()=>{try{const y=await fetch("/ggui/console/timeline/sessions",{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"});if(!y.ok){n({kind:"error",message:`server returned ${y.status}`});return}const v=await y.json();n({kind:"ready",data:v})}catch(y){if(h.signal.aborted)return;n({kind:"error",message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[]);const g=O.useCallback(h=>{u(h),p(0),s({kind:"loading",sessionId:h})},[]);return O.useEffect(()=>{if(!c)return;const h=new AbortController;return(async()=>{try{const y=await fetch(`/ggui/console/timeline/${encodeURIComponent(c)}/events`,{signal:h.signal,headers:{accept:"application/json"},credentials:"same-origin"}),v=await y.json();if(!y.ok&&y.status!==404){s({kind:"error",sessionId:c,message:`server returned ${y.status}`});return}s({kind:"ready",sessionId:c,data:v}),p(Math.max(0,v.events.length-1))}catch(y){if(h.signal.aborted)return;s({kind:"error",sessionId:c,message:y instanceof Error?y.message:String(y)})}})(),()=>h.abort()},[c]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7D",title:"Session timeline.",mute:"Snapshot.",intro:r.jsxs(r.Fragment,{children:["Pick a session, then step through its event log chronologically. Each event carries the full",r.jsx("code",{className:"ggui-code",children:" SessionEvent.data "}),"payload — useful for answering “what was the UI state at event N?” without a live tail."]})}),r.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 320px) 1fr",gap:16,alignItems:"start"},children:[r.jsx(JN,{state:e,pickedSessionId:c,onPick:g}),r.jsx(e7,{state:i,scrubIndex:d,onScrub:p})]})]})}function JN({state:e,pickedSessionId:n,onPick:i}){return r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"sessions",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"sessions"}),r.jsx("span",{className:"ggui-card__num",children:e.kind==="loading"?"loading…":e.kind==="error"?"error":`${e.data.sessions.length} / ${e.data.total}`})]}),r.jsx("div",{className:"ggui-card__body",style:{padding:0},children:e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading sessions…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-timeline-sessions-error":!0,children:["Couldn't load sessions — ",e.message,"."]}):e.data.sessions.length===0?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["No sessions yet. Push from an agent (",r.jsx("code",{className:"ggui-code",children:"ggui_push"}),") to create one."]}):r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,maxHeight:520,overflowY:"auto"},children:e.data.sessions.map(s=>r.jsx(QN,{session:s,selected:s.sessionId===n,onClick:()=>i(s.sessionId)},s.sessionId))})})]})}function QN({session:e,selected:n,onClick:i}){const s=e.sessionId.slice(0,12),c=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return r.jsx("li",{"data-ggui-timeline-session-id":e.sessionId,"data-ggui-timeline-session-selected":n?"true":"false",style:{borderBottom:"1px solid var(--ggui-rule)"},children:r.jsxs("button",{type:"button",onClick:i,style:{all:"unset",cursor:"pointer",width:"100%",padding:"10px 12px",display:"block",background:n?"var(--ggui-paper-2, #efeee8)":"transparent"},children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"baseline",marginBottom:4},children:[r.jsxs("code",{className:"ggui-code",style:{fontSize:12,fontFamily:"var(--ggui-font-mono)"},children:[s,"…"]}),r.jsx(Ne,{tone:c,children:e.status})]}),r.jsxs("div",{className:"ggui-muted",style:{fontSize:11},children:["app ",r.jsx("code",{className:"ggui-code",children:e.appId})," · stack"," ",e.stackSize," · stream ",e.streamSeq]}),r.jsxs("div",{className:"ggui-muted",style:{fontSize:11,marginTop:2},children:["last ",i7(e.lastActivityAt)]})]})})}function e7({state:e,scrubIndex:n,onScrub:i}){return e.kind==="idle"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 7D"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("p",{className:"ggui-muted",children:"Pick a session on the left to load its event log."})})]}):e.kind==="loading"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"loading…"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted",children:["Loading events for"," ",r.jsx("code",{className:"ggui-code",children:l$(e.sessionId)}),"…"]})})]}):e.kind==="error"?r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"timeline"}),r.jsx("span",{className:"ggui-card__num",children:"error"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted","data-ggui-timeline-events-error":!0,children:["Couldn't load events — ",e.message,"."]})})]}):r.jsx(t7,{state:e,scrubIndex:n,onScrub:i})}function t7({state:e,scrubIndex:n,onScrub:i}){const{events:s,status:c,streamSeq:u}=e.data,d=s.length,p=O.useMemo(()=>d===0?0:Math.max(0,Math.min(n,d-1)),[n,d]),g=d>0?s[p]:null,h=O.useCallback(()=>{d!==0&&i(Math.max(0,p-1))},[i,p,d]),y=O.useCallback(()=>{d!==0&&i(Math.min(d-1,p+1))},[i,p,d]),v=O.useCallback(()=>i(0),[i]),j=O.useCallback(()=>{d!==0&&i(d-1)},[i,d]);return r.jsxs("div",{className:"ggui-card","data-ggui-timeline-pane":"events",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:r.jsx("code",{className:"ggui-code",children:l$(e.sessionId)})}),r.jsx("span",{className:"ggui-card__num",children:d===0?"no events":`${p+1} / ${d}`})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["status"," ",r.jsx("code",{className:"ggui-code",children:c})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["stream cursor"," ",r.jsx("code",{className:"ggui-code",children:u})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12},children:["inbound events"," ",r.jsx("code",{className:"ggui-code",children:d})]})]}),d===0?r.jsx("p",{className:"ggui-muted",children:"No events recorded for this session yet. Inbound user actions, tool calls, and UI mutations land here as the agent runs — open the iframe and interact to populate."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",onClick:v,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"start",children:"⟪ start"}),r.jsx("button",{type:"button",onClick:h,disabled:p===0,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"prev",children:"‹ prev"}),r.jsx("input",{type:"range",min:0,max:d-1,value:p,onChange:k=>i(Number(k.target.value)),"aria-label":"event scrubber","data-ggui-timeline-scrubber":!0,style:{flex:1,minWidth:160}}),r.jsx("button",{type:"button",onClick:y,disabled:p>=d-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"next",children:"next ›"}),r.jsx("button",{type:"button",onClick:j,disabled:p>=d-1,className:"ggui-btn ggui-btn--ghost","data-ggui-timeline-jump":"end",children:"end ⟫"})]}),g?r.jsx(a7,{event:g}):null]})]})]})}function a7({event:e}){return r.jsxs("div",{"data-ggui-timeline-event-seq":e.seq,"data-ggui-timeline-event-type":e.type,style:{border:"1px solid var(--ggui-rule)",padding:"10px 12px",background:"var(--ggui-paper)"},children:[r.jsxs("div",{style:{display:"flex",gap:12,alignItems:"baseline",marginBottom:8},children:[r.jsxs("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:["seq ",e.seq]}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.type}),r.jsx("span",{style:{flex:1}}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:r7(e.timestamp)})]}),r.jsx("pre",{style:n7,children:o7(e.data)})]})}const n7={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:420,overflow:"auto"};function l$(e){return e.length>16?`${e.slice(0,16)}…`:e}function r7(e){try{return new Date(e).toISOString().slice(11,23)}catch{return String(e)}}function i7(e){const n=Date.now()-e;if(n<0)return"just now";const i=Math.floor(n/1e3);if(i<5)return"just now";if(i<60)return`${i}s ago`;const s=Math.floor(i/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function o7(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function s7(){const[e,n]=O.useState([]),[i,s]=O.useState("loading"),[c,u]=O.useState(null),[d,p]=O.useState(new Set),g=O.useRef(new Set);O.useEffect(()=>{let y=!1,v=null;const j=b=>{g.current.has(b.id)||(g.current.add(b.id),n(C=>[b,...C].slice(0,500)))};return(async()=>{try{const b=await fetch("/ggui/console/payloads/recent?limit=100",{credentials:"same-origin",headers:{accept:"application/json"}});if(!b.ok)throw new Error(`recent fetch returned ${b.status}`);const C=await b.json();if(y)return;const z=[...C.events].reverse();for(const N of z)g.current.add(N.id);n(z),s("live")}catch(b){if(y)return;s("error"),u(b instanceof Error?b.message:"Could not load recent payloads.");return}v=new EventSource("/ggui/console/payloads/stream",{withCredentials:!0}),v.onmessage=b=>{try{const C=JSON.parse(b.data);j(C)}catch{}},v.onerror=()=>{s("reconnecting")},v.onopen=()=>{s("live")}})(),()=>{y=!0,v&&v.close()}},[]);const h=y=>{p(v=>{const j=new Set(v);return j.has(y)?j.delete(y):j.add(y),j})};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 7E",title:"Payloads.",mute:"Live.",intro:r.jsxs(r.Fragment,{children:["Every ",r.jsx("code",{className:"ggui-code",children:"ggui_push"})," and"," ",r.jsx("code",{className:"ggui-code",children:"ggui_update"})," tool call as it lands on the handler — exactly the JSON the agent sent. Useful when contract drift or the agent paraphrases an intent. Bounded ring buffer — most recent 100 payloads stay in memory."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"events"}),r.jsx("span",{className:"ggui-card__num",children:i==="loading"?"connecting…":i==="live"?`live · ${e.length}`:i==="reconnecting"?"reconnecting…":"error"})]}),r.jsxs("div",{className:"ggui-card__body",children:[c?r.jsx("p",{className:"ggui-muted","data-ggui-payloads-error":!0,children:c}):null,e.length===0&&i!=="error"?r.jsxs("p",{className:"ggui-muted",children:["No payloads yet. Trigger a"," ",r.jsx("code",{className:"ggui-code",children:"ggui_push"})," from your MCP client and it'll appear here as it lands."]}):null,r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},"data-ggui-payloads-list":!0,children:e.map(y=>r.jsx(l7,{event:y,expanded:d.has(y.id),onToggle:()=>h(y.id)},y.id))})]})]})]})}function l7({event:e,expanded:n,onToggle:i}){const c=new Date(e.at).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),u=e.sessionId.length>8?`${e.sessionId.slice(0,8)}…`:e.sessionId,d=e.direction==="inbound-push"?"inbound":"outbound";return r.jsxs("li",{style:{border:"1px solid var(--ggui-rule)",padding:"10px 12px",background:"var(--ggui-paper)"},"data-ggui-payloads-event":e.id,"data-ggui-payloads-direction":e.direction,children:[r.jsxs("button",{type:"button",onClick:i,style:{all:"unset",cursor:"pointer",display:"flex",gap:12,alignItems:"baseline",width:"100%"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:c}),r.jsx("span",{style:{fontSize:11,padding:"0 6px",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)"},children:d}),r.jsx("span",{style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:e.tool}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)"},children:u}),r.jsx("span",{style:{flex:1}}),r.jsx("span",{className:"ggui-muted",style:{fontSize:11},children:d7(e.byteSize)})]}),n?r.jsx(c7,{event:e}):null]})}function c7({event:e}){const n=u7(e.payload);return r.jsxs("div",{style:{marginTop:10,paddingTop:10,borderTop:"1px solid var(--ggui-rule)",display:"grid",gap:12},children:[r.jsx(hv,{label:"session",children:r.jsxs("span",{className:"ggui-muted",style:{fontFamily:"var(--ggui-font-mono)",fontSize:12},children:[e.sessionId," · app ",e.appId]})}),r.jsx(hv,{label:"payload",children:r.jsx("pre",{style:f7,children:n})})]})}function hv({label:e,children:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-muted",style:{fontSize:11,fontFamily:"var(--ggui-font-mono)",textTransform:"uppercase",marginBottom:4},children:e}),n]})}function u7(e){try{return JSON.stringify(e,null,2)??"undefined"}catch{return"[unstringifiable]"}}function d7(e){return!Number.isFinite(e)||e<0?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const f7={margin:0,padding:8,background:"var(--ggui-paper-2, #efeee8)",border:"1px solid var(--ggui-rule)",fontFamily:"var(--ggui-font-mono)",fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:400,overflow:"auto"},yf="ggui-console:benchmark-dashboard-url",p7="https://benchmarks.ggui.ai";function g7(){const[e,n]=O.useState(""),[i,s]=O.useState("");O.useEffect(()=>{const u=localStorage.getItem(yf);u&&(n(u),s(u))},[]);const c=u=>{const d=u.trim();n(d),d?localStorage.setItem(yf,d):localStorage.removeItem(yf)};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 06",title:"Benchmarks dashboard.",mute:"GGUI_MODE=dev",intro:r.jsxs(r.Fragment,{children:["Embed a ",r.jsx("code",{className:"ggui-code",children:"@ggui-ai/benchmark"})," ","dashboard. Default points at"," ",r.jsx("code",{className:"ggui-code",children:"benchmarks.ggui.ai"})," (the public ggui-protocol leaderboard); paste any URL serving the same shape to view your own runs."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"dashboard URL"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 06"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("form",{onSubmit:u=>{u.preventDefault(),c(i)},style:{display:"flex",gap:8},children:[r.jsx("input",{type:"url",value:i,onChange:u=>s(u.target.value),placeholder:p7,spellCheck:!1,autoComplete:"off",style:{flex:1,padding:"8px 10px",fontFamily:"var(--ggui-font-mono, ui-monospace, monospace)",fontSize:13,border:"1px solid var(--ggui-rule)",background:"var(--ggui-paper)",color:"var(--ggui-ink)"}}),r.jsx("button",{type:"submit",className:"ggui-btn",disabled:i.trim()===e.trim(),children:"load"}),e&&r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--muted",onClick:()=>{s(""),c("")},children:"clear"})]}),r.jsxs("p",{className:"ggui-muted",style:{marginTop:12,fontSize:13,lineHeight:1.5},children:["URL persists across reloads. Local dev:"," ",r.jsx("code",{className:"ggui-code",children:"npx serve ./bench-results"})," then paste ",r.jsx("code",{className:"ggui-code",children:"http://localhost:3000"}),"."]})]})]}),e&&r.jsxs("div",{className:"ggui-card",style:{marginTop:16},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 06.1"})]}),r.jsx("div",{className:"ggui-card__body",style:{padding:0},children:r.jsx("iframe",{src:e,title:"Benchmarks dashboard",style:{width:"100%",height:"78vh",border:"none",background:"var(--ggui-paper)"}})})]})]})}const m7={"devtools-llm-trace":{title:"LLM trace",slice:"7a",answers:"Why is my generation slow / wrong?"},"devtools-validator":{title:"Validator tier results",slice:"7b",answers:"Which check failed, and what did the LLM emit?"},"devtools-cache":{title:"Cache hit/miss + feature vectors",slice:"7c",answers:"Why didn't this match my saved blueprint?"},"devtools-timeline":{title:"Session event timeline",slice:"7d",answers:"What was the UI state at each event?"},"devtools-payloads":{title:"Raw push/update payloads",slice:"7e",answers:"What did the agent actually send me?"},"devtools-benchmarks":{title:"Benchmarks dashboard",slice:"7f",answers:"How do providers/models score on the public corpus?"}};function h7({route:e}){return e.kind==="devtools-index"?r.jsx(yv,{}):e.kind==="devtools-llm-trace"?r.jsx(MN,{}):e.kind==="devtools-validator"?r.jsx(AN,{}):e.kind==="devtools-cache"?r.jsx(HN,{}):e.kind==="devtools-timeline"?r.jsx(XN,{}):e.kind==="devtools-payloads"?r.jsx(s7,{}):e.kind==="devtools-benchmarks"?r.jsx(g7,{}):r.jsx(yv,{})}function yv(){return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"DEVTOOLS / 00",title:"Dev-mode debug surfaces.",mute:"GGUI_MODE=dev",intro:r.jsxs(r.Fragment,{children:["Default for ",r.jsx("code",{className:"ggui-code",children:"ggui dev"}),". Each surface answers a different question about the last generation; sub-slices ship one at a time."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"surfaces"}),r.jsx("span",{className:"ggui-card__num",children:"DEV / 01"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:12},children:Object.entries(m7).map(([e,n])=>r.jsxs("li",{"data-ggui-devtools-surface":e,style:{display:"flex",justifyContent:"space-between",gap:16,padding:"10px 0",borderBottom:"1px solid var(--ggui-rule)"},children:[r.jsxs("div",{style:{minWidth:0},children:[r.jsx("div",{style:{fontWeight:500},children:n.title}),r.jsx("div",{className:"ggui-muted",style:{fontSize:13},children:n.answers})]}),r.jsxs("span",{className:"ggui-muted",style:{fontSize:12,whiteSpace:"nowrap"},children:["Slice ",n.slice]})]},e))})})]})]})}function y7(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState(null),[c,u]=O.useState(null),[d,p]=O.useState(""),[g,h]=O.useState(!1),[y,v]=O.useState(null),[j,k]=O.useState(null),b=async()=>{n({kind:"loading"});try{const N=await fetch("/ggui/console/keys",{headers:{accept:"application/json"}});if(N.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!N.ok){if(N.status===404){n({kind:"error",message:"Pairing not enabled on this server — re-run `ggui serve` (pairing is on by default for the OSS bundle)."});return}n({kind:"error",message:`server returned ${N.status}`});return}const $=await N.json();n({kind:"ready",data:$})}catch(N){n({kind:"error",message:String(N)})}};O.useEffect(()=>{b()},[]);const C=async N=>{s(N);try{const $=await fetch(`/ggui/console/keys/${encodeURIComponent(N)}`,{method:"DELETE"});if($.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if($.status!==204){n({kind:"error",message:`revoke failed — server returned ${$.status}`});return}u(null),await b()}catch($){n({kind:"error",message:`revoke failed — ${String($)}`})}finally{s(null)}},z=async N=>{N.preventDefault(),v(null);const $=d.trim();if($.length===0){v("Device name is required.");return}h(!0);try{const w=await fetch("/ggui/console/keys",{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({deviceName:$})});if(w.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/connector-keys")}`);return}if(!w.ok){v(`mint failed — server returned ${w.status}`);return}const R=await w.json();k(R),p(""),await b()}catch(w){v(`mint failed — ${String(w)}`)}finally{h(!1)}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / keys",title:"Paired bearer tokens.",mute:"Personal-mode bearers minted by /pair.",intro:r.jsxs(r.Fragment,{children:["Each row is a paired bearer minted by the pairing service — paste these into MCP clients (Claude Desktop, claude.ai) as the ",r.jsx("code",{className:"ggui-code",children:"Authorization: Bearer"})," ","header. Tokens are stored in plaintext on disk (",r.jsx("code",{className:"ggui-code",children:"~/.ggui/keys.json"})," by default); treat this page like"," ",r.jsx("code",{className:"ggui-code",children:"~/.ssh/"})," — anyone with view access can copy a bearer."]})}),r.jsx(v7,{deviceName:d,onDeviceName:p,minting:g,error:y,result:j,onSubmit:N=>{z(N)},onDismissResult:()=>k(null)}),e.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading keys…"}):e.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-keys-error":!0,children:["Couldn't load keys — ",e.message]}):r.jsx(b7,{keys:e.data.keys,revokingId:i,pendingConfirm:c,onRevokeRequest:N=>u(N),onRevokeCancel:()=>u(null),onRevokeConfirm:N=>{C(N)},onRefresh:()=>{b()}})]})}function v7({deviceName:e,onDeviceName:n,minting:i,error:s,result:c,onSubmit:u,onDismissResult:d}){return r.jsxs("div",{className:"ggui-card",style:{marginBottom:20},children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"mint a new key"}),r.jsx("span",{className:"ggui-card__num",children:"KEY / NEW"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("form",{className:"ggui-form",onSubmit:u,children:r.jsxs("div",{className:"ggui-form__row",children:[r.jsx("label",{className:"ggui-field","aria-label":"device name for the new key",children:r.jsx("input",{type:"text",placeholder:"device name (e.g. Claude Desktop, iPhone)",value:e,onChange:p=>n(p.target.value),disabled:i,maxLength:256})}),r.jsxs("button",{type:"submit",className:"ggui-btn","data-ggui-key-mint":!0,disabled:i||e.trim().length===0,children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),i?"minting…":"mint"]})]})}),s?r.jsx("p",{className:"ggui-muted",style:{marginTop:10},children:s}):null,c?r.jsx($7,{result:c,onDismiss:d}):null]})]})}function $7({result:e,onDismiss:n}){const[i,s]=O.useState(!1),c=async()=>{try{await navigator.clipboard.writeText(e.token),s(!0),window.setTimeout(()=>s(!1),2e3)}catch{}};return r.jsxs("div",{className:"ggui-card",style:{marginTop:16},"data-ggui-key-mint-result":!0,children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"new bearer minted — copy it now"}),r.jsx("span",{className:"ggui-card__num",children:"KEY / FRESH"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("p",{className:"ggui-muted",style:{marginTop:0},children:["Paste this into your MCP client's"," ",r.jsx("code",{className:"ggui-code",children:"Authorization: Bearer"})," ","header. The plaintext stays visible until you dismiss this card — there's no second-fetch path; close the page and you'll need to copy it from the table below or mint a fresh one."]}),r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[r.jsx("code",{className:"ggui-code",style:{flex:1,padding:10,wordBreak:"break-all",userSelect:"all"},children:e.token}),r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>{c()},children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),i?"copied":"copy"]})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",style:{marginTop:12},children:[r.jsxs("span",{children:["device ",r.jsx("code",{className:"ggui-code",children:e.deviceName})]}),r.jsxs("span",{style:{marginLeft:12},children:["id ",r.jsx("code",{className:"ggui-code",children:e.pairingId})]})]}),r.jsx("div",{style:{marginTop:14},children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:n,children:"dismiss"})})]})]})}function b7({keys:e,revokingId:n,pendingConfirm:i,onRevokeRequest:s,onRevokeCancel:c,onRevokeConfirm:u,onRefresh:d}){return e.length===0?r.jsxs("div",{className:"ggui-stack","data-ggui-keys-list":!0,"aria-label":"paired keys (empty)",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"KEY"}),r.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),r.jsx("span",{className:"ggui-stack__count",children:"0"})]}),r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},children:["No keys minted yet. Use the form above to mint one, or complete a ",r.jsx("code",{className:"ggui-code",children:"POST /pair"})," from a viewer client to land a row here."]})]}):r.jsxs("div",{"data-ggui-keys-list":!0,className:"ggui-stack","aria-label":"paired keys",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"KEY"}),r.jsx("span",{className:"ggui-stack__label",children:"paired keys"}),r.jsx("span",{className:"ggui-stack__count",children:e.length}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:d,style:{marginLeft:"auto"},children:"refresh"})]}),r.jsx("ul",{className:"ggui-stack__list",children:e.map((p,g)=>r.jsx(x7,{entry:p,index:g+1,isRevoking:n===p.pairingId,isPendingConfirm:i===p.pairingId,onRevokeRequest:s,onRevokeCancel:c,onRevokeConfirm:u},p.pairingId))})]})}function x7({entry:e,index:n,isRevoking:i,isPendingConfirm:s,onRevokeRequest:c,onRevokeCancel:u,onRevokeConfirm:d}){return r.jsxs("li",{"data-ggui-key-id":e.pairingId,className:"ggui-stack__entry",style:{opacity:i?.5:1},children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`KEY / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:e.deviceName})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["id ",r.jsx("code",{className:"ggui-code",children:e.pairingId})]}),r.jsxs("span",{style:{marginLeft:12},children:["minted"," ",r.jsx("code",{className:"ggui-code",children:vv(e.createdAt)})]}),e.lastUsedAt!==void 0?r.jsxs("span",{style:{marginLeft:12},children:["used"," ",r.jsx("code",{className:"ggui-code",children:vv(e.lastUsedAt)})]}):null]}),r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginTop:6},children:r.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:["token"," ",e.token===null?r.jsx("code",{className:"ggui-code",children:"— rotated, re-pair to recover"}):r.jsx("code",{className:"ggui-code",style:{wordBreak:"break-all",userSelect:"all"},children:e.token})]})}),r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:s?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"ggui-btn","data-ggui-key-revoke":!0,disabled:i,onClick:()=>d(e.pairingId),children:i?"revoking…":"confirm revoke"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",disabled:i,onClick:u,children:"cancel"})]}):r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-key-revoke":!0,disabled:i,onClick:()=>c(e.pairingId),children:"revoke"})})]})}function vv(e){const n=Date.now()-e;if(n<0)return"just now";const i=Math.floor(n/1e3);if(i<60)return`${i}s ago`;const s=Math.floor(i/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function j7(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState("");O.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/mcp/tools",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=i.trim().toLowerCase(),u=O.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.tools:e.data.tools.filter(d=>[d.name,d.title??"",d.description].join(" ").toLowerCase().includes(c)),[e,c]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / mcp",title:"Registered MCP tools.",mute:"Read-only inventory.",intro:r.jsxs(r.Fragment,{children:["Every tool this server registered with the MCP runtime — same set ",r.jsx("code",{className:"ggui-code",children:"tools/list"})," ","returns over JSON-RPC, rendered as expandable cards. Click a row to see its input + output JSON Schema."," ",r.jsx("span",{className:"ggui-muted",children:"Test-invoke from the browser is deferred — for now, exercise tools via your paired MCP client."})]})}),e.kind==="loading"?r.jsx(bv,{title:"loading",num:"MCP / 01",tone:"draft",children:"Loading tool inventory…"}):e.kind==="error"?r.jsxs(bv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load tools — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-mcp-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-mcp-filter",name:"filter","aria-label":"filter tools",placeholder:"substring match over name, title, description…",value:i,onChange:d=>s(d.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),r.jsx(_7,{all:e.data.tools,shown:u??e.data.tools,filterActive:c.length>0})]})]})}function _7({all:e,shown:n,filterActive:i}){return e.length===0?r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"MCP / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No tools registered."}),r.jsxs("p",{className:"ggui-muted",children:["This server booted without any handlers — unusual for a full ",r.jsx("code",{className:"ggui-code",children:"ggui serve"}),". Check the boot config."]})]})]}):r.jsxs("div",{"data-ggui-mcp-list":!0,className:"ggui-stack","aria-label":"mcp tools",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"MCP"}),r.jsx("span",{className:"ggui-stack__label",children:"registered tools"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,i&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No tools match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((s,c)=>r.jsx(S7,{tool:s,index:c+1},s.name))})]})}function S7({tool:e,index:n}){const[i,s]=O.useState(!1);return r.jsxs("li",{"data-ggui-mcp-tool-name":e.name,"data-ggui-mcp-tool-expanded":i?"true":"false",className:"ggui-stack__entry",children:[r.jsxs("button",{type:"button",onClick:()=>s(c=>!c),"aria-expanded":i,style:{background:"transparent",border:0,padding:0,width:"100%",textAlign:"left",cursor:"pointer",color:"inherit",font:"inherit"},children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`MCP / ${String(n).padStart(2,"0")}`}),r.jsx("span",{className:"ggui-stack__entry-title",children:r.jsx("code",{className:"ggui-code",children:e.name})}),e.title?r.jsx(Ne,{tone:"ink",children:e.title}):null,r.jsx("span",{className:"ggui-muted",style:{marginLeft:"auto",fontFamily:"var(--ggui-mono)",fontSize:11},children:i?"−":"+"})]}),e.description?r.jsx("p",{className:"ggui-body",style:{margin:"8px 0 0"},children:e.description}):null]}),i?r.jsxs("div",{style:{marginTop:12,display:"grid",gap:12},children:[r.jsx($v,{label:"input",schema:e.inputSchema}),r.jsx($v,{label:"output",schema:e.outputSchema})]}):null]})}function $v({label:e,schema:n}){return r.jsxs("div",{children:[r.jsx("div",{className:"ggui-stack__entry-meta",style:{marginBottom:6,textTransform:"uppercase",letterSpacing:"0.12em"},children:e}),r.jsx("pre",{"data-ggui-mcp-schema":e,style:{margin:0,padding:12,background:"var(--ggui-paper-2)",border:"1px solid var(--ggui-line-2)",borderRadius:2,fontFamily:"var(--ggui-mono)",fontSize:11,lineHeight:1.5,overflow:"auto",maxHeight:320,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(n,null,2)})]})}function bv({title:e,num:n,tone:i,children:s}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:i,children:e})}),r.jsx("p",{className:"ggui-muted",children:s})]})]})}const vc=200;function w7(e){return{...Object.fromEntries(Object.entries(e)),kind:e.kind}}const xv=["All","Actions","Errors","Version","Subscribe"];function k7(e){if(e==="wired-tool-invoked")return"Actions";if(e==="contract-error-emitted")return"Errors";if(e==="schema-version-mismatch")return"Version";if(e==="subscribe-failed")return"Subscribe"}function jv(e,n){return n==="All"?!0:e.kind==="observe"?k7(e.event.kind)===n:n==="Actions"?e.kind==="dispatch"||e.kind==="response":n==="Subscribe"?e.kind==="stream":!1}function N7({entry:e,entryIndex:n,activity:i,onFireAction:s}){return r.jsxs("div",{"data-ggui-inspect":!0,"data-ggui-inspect-entry-index":n,style:{marginTop:16,borderTop:"1px solid var(--ggui-border, #e5e5e5)",paddingTop:16,display:"flex",flexDirection:"column",gap:12},children:[r.jsx(z7,{entry:e}),r.jsx(E7,{activity:i}),r.jsx(I7,{entry:e,entryIndex:n,onFireAction:s})]})}function z7({entry:e}){const[n,i]=O.useState(!1),s=C7(e);return r.jsx(sp,{label:"contract",tag:"CTR",sub:s.sub,expanded:n,onToggle:()=>i(c=>!c),"data-ggui-inspect-contract":!0,children:s.empty?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:"No contract declared on this stack entry. The generated UI fires no actions and consumes no streams. (If this looks wrong, the generation may have skipped the contract block.)"}):r.jsxs("div",{style:{display:"grid",gap:12},children:[e.actionSpec?r.jsx(vf,{num:"ACT",label:"actionSpec",kind:"actions",entries:Object.entries(e.actionSpec).map(([c,u])=>{const d=u.nextStep?`→ agent: ${u.nextStep}`:"→ agent";return{name:c,detail:u.description??u.label??d}})}):null,e.streamSpec?r.jsx(vf,{num:"STR",label:"streamSpec",kind:"channels",entries:Object.entries(e.streamSpec).map(([c,u])=>({name:c,detail:`${u.mode??"append"}${u.replay?` · replay ${u.replay}`:""}`}))}):null,e.propsSpec?r.jsx(vf,{num:"PRP",label:"propsSpec",kind:"props",entries:Object.entries(e.propsSpec.properties??{}).map(([c,u])=>({name:c,detail:u.description??"—"}))}):null]})})}function vf({num:e,label:n,kind:i,entries:s}){return r.jsxs("div",{"data-ggui-inspect-contract-section":n,className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:n}),r.jsxs("span",{className:"ggui-card__num",children:[e," · ",s.length," ",i]})]}),r.jsx("div",{className:"ggui-card__body",style:{padding:"8px 12px"},children:s.length===0?r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:["No ",i," declared."]}):r.jsx("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:6},children:s.map(c=>r.jsxs("li",{style:{display:"flex",gap:12,alignItems:"baseline"},children:[r.jsx("code",{className:"ggui-code",children:c.name}),r.jsx("span",{className:"ggui-muted",style:{fontSize:"0.85em"},children:c.detail})]},c.name))})})]})}function C7(e){var u;const n=[],i=Object.keys(e.actionSpec??{}).length,s=Object.keys(e.streamSpec??{}).length,c=Object.keys(((u=e.propsSpec)==null?void 0:u.properties)??{}).length;return i>0&&n.push(`${i} action${i===1?"":"s"}`),s>0&&n.push(`${s} channel${s===1?"":"s"}`),c>0&&n.push(`${c} prop${c===1?"":"s"}`),n.length===0?{empty:!0,sub:"no contract"}:{empty:!1,sub:n.join(" · ")}}function E7({activity:e}){const[n,i]=O.useState(!1),[s,c]=O.useState("All"),u=O.useMemo(()=>{let y=0,v=0,j=0,k=0;for(const b of e)b.kind==="dispatch"?y++:b.kind==="response"?v++:b.kind==="stream"?j++:k++;return{dispatch:y,response:v,stream:j,observe:k}},[e]),d=O.useMemo(()=>{const y={All:e.length,Actions:0,Errors:0,Version:0,Subscribe:0};for(const v of e)for(const j of xv)j!=="All"&&jv(v,j)&&(y[j]+=1);return y},[e]),p=O.useMemo(()=>s==="All"?e:e.filter(y=>jv(y,s)),[e,s]),g=u.observe>0?` ${u.observe}⟵obs`:"",h=`${e.length}/${vc} · ${u.dispatch}⟶ ${u.response}⟵ack ${u.stream}⟵str${g}`;return r.jsxs(sp,{label:"activity",tag:"ACT",sub:h,expanded:n,onToggle:()=>i(y=>!y),"data-ggui-inspect-activity":!0,children:[r.jsx("div",{role:"tablist","aria-label":"activity filters","data-ggui-inspect-activity-tabs":!0,style:{display:"flex",gap:4,marginBottom:8,flexWrap:"wrap"},children:xv.map(y=>{const v=s===y,j=d[y];return r.jsxs("button",{type:"button",role:"tab","aria-selected":v,"data-ggui-inspect-activity-tab":y,"data-ggui-inspect-activity-tab-selected":v?"true":"false",onClick:()=>c(y),style:{padding:"4px 10px",borderRadius:3,border:"1px solid var(--ggui-border, #e5e5e5)",background:v?"var(--ggui-surface-ink, #111)":"var(--ggui-surface-mute, #fff)",color:v?"var(--ggui-surface-mute, #fff)":"inherit",cursor:"pointer",font:"inherit",fontSize:"0.85em"},children:[y,r.jsx("span",{className:"ggui-muted",style:{marginLeft:6,fontSize:"0.85em",color:v?"var(--ggui-surface-mute, #ddd)":void 0},children:j})]},y)})}),p.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:s==="All"?"No activity yet. Dispatches from the rendered UI and stream chunks from the server will appear here in arrival order.":`No ${s.toLowerCase()} activity yet.`}):r.jsx("ul",{"data-ggui-inspect-activity-list":!0,style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:4,maxHeight:280,overflowY:"auto"},children:[...p].reverse().map(y=>r.jsx(O7,{event:y},y.id))})]})}function T7(e){return e.kind==="dispatch"?"⟶":e.kind==="response"?"⟵ack":e.kind==="stream"?"⟵str":"⟵obs"}function M7(e){return e.kind==="stream"?"draft":e.kind==="observe"?e.event.kind==="contract-error-emitted"||e.event.kind==="schema-version-mismatch"?"signal":"draft":"ink"}function R7(e){return e.kind==="response"?e.response:e.kind==="dispatch"?e.data:e.kind==="stream"?e.payload:e.event}function O7({event:e}){const[n,i]=O.useState(!1),s=T7(e),c=M7(e),u=R7(e);return r.jsxs("li",{"data-ggui-inspect-event":!0,"data-ggui-inspect-event-direction":e.kind,style:{padding:"4px 8px",borderRadius:3,background:"var(--ggui-surface-subtle, #f8f8f8)"},children:[r.jsxs("button",{type:"button",onClick:()=>i(d=>!d),style:{display:"flex",gap:12,alignItems:"baseline",background:"transparent",border:"none",font:"inherit",color:"inherit",cursor:"pointer",padding:0,width:"100%",textAlign:"left"},"aria-expanded":n,children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:"0.8em",minWidth:80},children:A7(e.at)}),r.jsx(Ne,{tone:c,children:s}),r.jsx("code",{className:"ggui-code",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D7(u)})]}),n?r.jsx("pre",{style:{margin:"6px 0 0",padding:8,background:"var(--ggui-surface-mute, #fff)",borderRadius:3,overflow:"auto",maxHeight:160,fontSize:"0.8em"},children:c$(u)}):null]})}function A7(e){try{return new Date(e).toISOString().slice(11,23)}catch{return String(e)}}function D7(e){const n=c$(e);return n.length>80?n.slice(0,77)+"…":n}function c$(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function I7({entry:e,entryIndex:n,onFireAction:i}){const[s,c]=O.useState(!1),u=Object.keys(e.actionSpec??{}),[d,p]=O.useState(u[0]??""),[g,h]=O.useState("{}"),[y,v]=O.useState(null),[j,k]=O.useState(null),b=O.useCallback(z=>{z.preventDefault();let N;try{N=JSON.parse(g)}catch($){v($ instanceof Error?$.message:String($));return}v(null),i(N),k(d||"(unnamed)")},[g,i,d]),C=u.length===0?"no actions to fire":`${u.length} action${u.length===1?"":"s"}`;return r.jsx(sp,{label:"test action",tag:"TST",sub:C,expanded:s,onToggle:()=>c(z=>!z),"data-ggui-inspect-test":!0,children:u.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:"The generated UI declared no actions. Test-fire is disabled for this entry."}):r.jsxs("form",{"data-ggui-inspect-test-form":!0,onSubmit:b,className:"ggui-form",style:{display:"grid",gap:8},children:[r.jsx("label",{className:"ggui-label",htmlFor:`ggui-inspect-action-${n}`,children:"action"}),r.jsx("div",{className:"ggui-field",children:r.jsx("select",{id:`ggui-inspect-action-${n}`,"data-ggui-inspect-test-action-select":!0,value:d,onChange:z=>p(z.target.value),children:u.map(z=>r.jsx("option",{value:z,children:z},z))})}),r.jsx("label",{className:"ggui-label",htmlFor:`ggui-inspect-payload-${n}`,children:"payload (JSON)"}),r.jsx("div",{className:"ggui-field",children:r.jsx("textarea",{id:`ggui-inspect-payload-${n}`,"data-ggui-inspect-test-payload":!0,value:g,onChange:z=>h(z.target.value),rows:4,spellCheck:!1,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.85em",width:"100%"}})}),y?r.jsxs("p",{className:"ggui-body",style:{margin:0},"data-ggui-inspect-test-parse-error":!0,children:[r.jsx(Ne,{tone:"signal",children:"parse error"})," ",y]}):null,j&&!y?r.jsxs("p",{className:"ggui-muted",style:{margin:0},"data-ggui-inspect-test-last-fired":j,children:["fired ",r.jsx("code",{className:"ggui-code",children:j})," · response will appear in the activity panel."]}):null,r.jsx("div",{children:r.jsx("button",{type:"submit","data-ggui-inspect-test-submit":!0,className:"ggui-btn",children:"fire →"})})]})})}function sp({label:e,tag:n,sub:i,expanded:s,onToggle:c,children:u,...d}){return r.jsxs("div",{className:"ggui-card",...d,children:[r.jsxs("button",{type:"button",onClick:c,className:"ggui-card__head","aria-expanded":s,style:{width:"100%",background:"transparent",border:"none",textAlign:"left",cursor:"pointer",font:"inherit",color:"inherit"},children:[r.jsxs("span",{className:"ggui-card__title",children:[s?"▾":"▸"," ",e]}),r.jsxs("span",{className:"ggui-card__num",children:[n," · ",i]})]}),s?r.jsx("div",{className:"ggui-card__body",style:{padding:"12px 16px"},children:u}):null]})}function U7({shortCode:e}){const[n,i]=O.useState({kind:"minting"});O.useEffect(()=>{const c=new AbortController;return(async()=>{try{const u=await fetch("/ggui/console/session-cookie",{method:"POST",signal:c.signal,headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({shortCode:e}),credentials:"same-origin"});if(u.status===404){i({kind:"not-found"});return}if(!u.ok){i({kind:"error",message:`server returned ${u.status}`});return}const d=await u.json();i({kind:"loading-resource",session:d})}catch(u){if(c.signal.aborted)return;i({kind:"error",message:String(u)})}})(),()=>c.abort()},[e]);const s=n.kind==="loading-resource"?n.session:null;return O.useEffect(()=>{if(!s)return;const c=new AbortController;return(async()=>{try{const u=encodeURIComponent(s.sessionId),[d,p,g]=await Promise.all([fetch(`/ggui/console/session-resource?session=${u}`,{method:"GET",signal:c.signal,headers:{accept:"application/json"},credentials:"same-origin"}),fetch(`/ggui/console/session-bootstrap?session=${u}`,{method:"GET",signal:c.signal,headers:{accept:"application/json"},credentials:"same-origin"}),fetch(`/ggui/console/session-stack?session=${u}`,{method:"GET",signal:c.signal,headers:{accept:"application/json"},credentials:"same-origin"})]);if(!d.ok){i({kind:"resource-failed",message:`session-resource fetch returned ${d.status}`});return}if(!p.ok){i({kind:"resource-failed",message:`session-bootstrap fetch returned ${p.status}`});return}const y=(await d.json()).contents[0];if(!y){i({kind:"resource-failed",message:"session-resource response had empty contents array"});return}const v=await p.json();if(!v.bootstrap){i({kind:"resource-failed",message:"session-bootstrap response missing `bootstrap` field"});return}let j=[];if(g.ok)try{j=(await g.json()).stack}catch{j=[]}i({kind:"ready",session:s,resource:y,bootstrap:v.bootstrap,stack:j})}catch(u){if(c.signal.aborted)return;i({kind:"resource-failed",message:String(u)})}})(),()=>c.abort()},[s]),r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / session",title:"Live session.",mute:r.jsx(r.Fragment,{children:r.jsxs("code",{className:"ggui-code",children:["/s/",e]})}),intro:"The short-code above resolved against this server's index. The viewer holds a same-origin cookie on /ws and mirrors every stack mutation the agent emits."}),n.kind==="minting"?r.jsxs(_v,{title:"resolving",tone:"draft",children:["Resolving short-code against"," ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/session-cookie"}),"…"]}):n.kind==="loading-resource"?r.jsxs(_v,{title:"loading",tone:"draft",children:["Fetching session resource from"," ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/session-resource"}),"…"]}):n.kind==="not-found"?r.jsx($f,{title:"Short-code not found",body:r.jsxs("p",{className:"ggui-body",children:[r.jsx("code",{className:"ggui-code",children:e})," didn't resolve to a session on this server. The code may have expired, been on a different server, or never existed."]})}):n.kind==="error"?r.jsx($f,{title:"Couldn't open session",body:r.jsx("p",{className:"ggui-muted",children:n.message})}):n.kind==="resource-failed"?r.jsx($f,{title:"Session resource unavailable",body:r.jsx("p",{className:"ggui-muted",children:n.message})}):r.jsx(L7,{session:n.session,resource:n.resource,bootstrap:n.bootstrap,stack:n.stack,shortCode:e})]})}function L7({session:e,resource:n,bootstrap:i,stack:s,shortCode:c}){const[u,d]=O.useState([]),p=O.useRef(0),g=O.useCallback(C=>{d(z=>{const N=[...z,C];return N.length>vc?N.slice(N.length-vc):N})},[]),h=O.useCallback(()=>(p.current+=1,`evt-${p.current}`),[]),y=O.useCallback(C=>{g({kind:"observe",id:h(),at:Date.now(),event:w7(C)})},[g,h]),[v,j]=O.useState(null),k=O.useCallback(C=>{j(C)},[]),b=O.useRef(null);return r.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[r.jsxs("section",{className:"ggui-pane","aria-label":"live session header",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsxs("div",{className:"ggui-pane__traffic","aria-hidden":!0,children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsxs("span",{className:"ggui-pane__title",children:["session · ",c]}),r.jsxs("span",{className:"ggui-pane__meta",children:[u.length," ",u.length===1?"event":"events"]})]}),r.jsxs("div",{className:"ggui-pane__body",children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[r.jsx(Ne,{tone:v?"signal":"ink",children:v?"iframe error":"mounted"}),r.jsxs("span",{className:"ggui-muted",children:["session ",r.jsx("code",{className:"ggui-code",children:e.sessionId})]})]}),r.jsxs("p",{className:"ggui-muted",children:["app ",r.jsx("code",{className:"ggui-code",children:e.appId})," · short-code"," ",r.jsx("code",{className:"ggui-code",children:c})]})]})]}),v?r.jsx(H7,{err:v}):null,r.jsxs("section",{className:"ggui-pane","aria-label":"rendered session",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsx("span",{className:"ggui-pane__title",children:"rendered session"}),r.jsx("span",{className:"ggui-pane__meta",children:r.jsx("code",{className:"ggui-code",children:n.uri})})]}),r.jsx("div",{className:"ggui-pane__body",style:{padding:0,minHeight:420},"data-ggui-console-iframe-host":!0,children:r.jsx(Zw,{ref:b,resource:n,bootstrap:i,onObserve:y,onError:k})})]}),r.jsx(V7,{stack:s,activity:u,onFireAction:(C,z)=>{var N;(N=b.current)==null||N.dispatchAction(C,z)}}),r.jsx(q7,{onDispatch:(C,z)=>{var N;(N=b.current)==null||N.dispatchAction(C,z)}}),r.jsx(P7,{activity:u})]})}function V7({stack:e,activity:n,onFireAction:i}){const s=e.filter(c=>c.type!=="mcpApps");return s.length===0?r.jsxs("section",{className:"ggui-pane","aria-label":"stack inspector","data-ggui-console-stack-inspectors":!0,"data-ggui-console-stack-inspectors-empty":"true",children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsx("span",{className:"ggui-pane__title",children:"stack inspector"}),r.jsx("span",{className:"ggui-pane__meta",children:"INS · 0 entries"})]}),r.jsx("div",{className:"ggui-pane__body",children:r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:["No stack entries to inspect yet. When the agent commits a generated UI to the session stack (via"," ",r.jsx("code",{className:"ggui-code",children:"ggui_push"}),"), per-entry contract / activity / test-action panels appear here."]})})]}):r.jsxs("section",{className:"ggui-pane","aria-label":"stack inspector","data-ggui-console-stack-inspectors":!0,children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsx("span",{className:"ggui-pane__title",children:"stack inspector"}),r.jsxs("span",{className:"ggui-pane__meta",children:["INS · ",s.length," ",s.length===1?"entry":"entries"]})]}),r.jsx("div",{className:"ggui-pane__body",children:s.map((c,u)=>r.jsx(N7,{entry:c,entryIndex:u,activity:n,onFireAction:d=>{i(c.id,d)}},c.id))})]})}function H7({err:e}){return r.jsxs("div",{className:"ggui-card","data-ggui-console-iframe-error":!0,children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"iframe error"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / IFR"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-body",children:[r.jsx(Ne,{tone:"signal",children:e.kind})," ",B7(e)]})})]})}function B7(e){return e.kind==="transport"||e.kind==="auth"||e.kind==="protocol"?e.message??e.code:e.kind==="contract"?`contract-error ${e.payload.error.code}: ${e.payload.error.message}`:e.kind==="bootstrap"?e.message:e.kind==="version"?e.message??"version mismatch":e.kind==="unknown"?"unknown error (see ring buffer)":"unrecognized error"}function q7({onDispatch:e}){const[n,i]=O.useState(""),[s,c]=O.useState("{}"),[u,d]=O.useState(null),[p,g]=O.useState(null),h=O.useMemo(()=>n.trim().length>0,[n]),y=O.useCallback(v=>{if(v.preventDefault(),!h)return;let j;try{j=JSON.parse(s)}catch(k){d(k instanceof Error?k.message:String(k));return}d(null),e(n,j),g(n)},[h,n,s,e]);return r.jsxs("section",{className:"ggui-pane","aria-label":"test action","data-ggui-console-test-action":!0,children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsx("span",{className:"ggui-pane__title",children:"test action"}),r.jsx("span",{className:"ggui-pane__meta",children:"TST · dispatch"})]}),r.jsxs("form",{className:"ggui-pane__body ggui-form",onSubmit:y,style:{display:"grid",gap:8},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-console-test-name",children:"action name"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-console-test-name",type:"text",value:n,onChange:v=>i(v.target.value),placeholder:"my.action","data-ggui-console-test-name":!0})}),r.jsx("label",{className:"ggui-label",htmlFor:"ggui-console-test-payload",children:"payload (JSON)"}),r.jsx("div",{className:"ggui-field",children:r.jsx("textarea",{id:"ggui-console-test-payload","data-ggui-console-test-payload":!0,value:s,onChange:v=>c(v.target.value),rows:4,spellCheck:!1,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.85em",width:"100%"}})}),u?r.jsxs("p",{className:"ggui-body",style:{margin:0},"data-ggui-console-test-parse-error":!0,children:[r.jsx(Ne,{tone:"signal",children:"parse error"})," ",u]}):null,p&&!u?r.jsxs("p",{className:"ggui-muted",style:{margin:0},"data-ggui-console-test-last-fired":p,children:["fired ",r.jsx("code",{className:"ggui-code",children:p})," — responses appear in the activity log below."]}):null,r.jsx("div",{children:r.jsx("button",{type:"submit",className:"ggui-btn","data-ggui-console-test-submit":!0,disabled:!h,children:"fire →"})})]})]})}function P7({activity:e}){return r.jsxs("section",{className:"ggui-pane","aria-label":"activity log","data-ggui-console-activity":!0,children:[r.jsxs("div",{className:"ggui-pane__head",children:[r.jsx("span",{className:"ggui-pane__title",children:"activity"}),r.jsxs("span",{className:"ggui-pane__meta",children:["ACT · ",e.length,"/",vc]})]}),r.jsx("div",{className:"ggui-pane__body",children:e.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0},children:"No observability events yet. When the iframe fires a wired tool, emits a contract-error envelope, rejects a schema- version handshake, or surfaces a non-fatal subscribe failure, a row lands here in arrival order."}):r.jsx("ul",{"data-ggui-console-activity-list":!0,style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:4,maxHeight:280,overflowY:"auto"},children:[...e].reverse().map(n=>r.jsx(Z7,{event:n},n.id))})})]})}function Z7({event:e}){const n=G7(e),i=F7(e),s=Y7(e);return r.jsx("li",{"data-ggui-console-activity-row":!0,"data-ggui-console-activity-kind":e.kind,style:{padding:"4px 8px",borderRadius:3,background:"var(--ggui-surface-subtle, #f8f8f8)"},children:r.jsxs("div",{style:{display:"flex",gap:12,alignItems:"baseline"},children:[r.jsx("span",{className:"ggui-muted",style:{fontSize:"0.8em",minWidth:80},children:K7(e.at)}),r.jsx(Ne,{tone:i,children:n}),r.jsx("code",{className:"ggui-code",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s})]})})}function G7(e){return e.kind==="dispatch"?"⟶":e.kind==="response"?"⟵ack":e.kind==="stream"?"⟵str":e.event.kind}function F7(e){return e.kind==="stream"?"draft":e.kind==="observe"?e.event.kind==="contract-error-emitted"||e.event.kind==="schema-version-mismatch"?"signal":"draft":"ink"}function Y7(e){const n=e.kind==="observe"?e.event:e.kind==="response"?e.response:e.kind==="dispatch"?e.data:e.payload,i=W7(n);return i.length>80?i.slice(0,77)+"…":i}function K7(e){try{return new Date(e).toISOString().slice(11,23)}catch{return String(e)}}function W7(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function _v({title:e,tone:n,children:i}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:"BOOT / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:n,children:e})}),r.jsx("p",{className:"ggui-muted",children:i})]})]})}function $f({title:e,body:n}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"unresolved"}),r.jsx("span",{className:"ggui-card__num",children:"ERR / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("h2",{className:"ggui-h2",children:e}),n,r.jsx("div",{children:r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/"),children:"back to landing"})})]})]})}function X7(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState("");O.useEffect(()=>{const d=new AbortController;return(async()=>{try{const p=await fetch("/ggui/console/sessions",{signal:d.signal,headers:{accept:"application/json"}});if(!p.ok){n({kind:"error",message:`server returned ${p.status}`});return}const g=await p.json();n({kind:"ready",data:g})}catch(p){if(d.signal.aborted)return;n({kind:"error",message:String(p)})}})(),()=>d.abort()},[]);const c=i.trim().toLowerCase(),u=O.useMemo(()=>e.kind!=="ready"?null:c.length===0?e.data.sessions:e.data.sessions.filter(d=>[d.sessionId,d.shortCode??"",d.appId].join(" ").toLowerCase().includes(c)),[e,c]);return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / sessions",title:"Live sessions.",mute:"Active only — push from an agent to create one.",intro:r.jsxs(r.Fragment,{children:["Every row is an active session on this server. Click-through to the viewer when a session has a"," ",r.jsx("code",{className:"ggui-code",children:"shortCode"})," minted by"," ",r.jsx("code",{className:"ggui-code",children:"ggui_push"}),"."]})}),e.kind==="loading"?r.jsx(Sv,{title:"loading",num:"SES / 01",tone:"draft",children:"Loading sessions…"}):e.kind==="error"?r.jsxs(Sv,{title:"error",num:"ERR / 01",tone:"signal",children:["Couldn't load sessions — ",e.message,"."]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"ggui-form",style:{marginBottom:20},children:[r.jsx("label",{className:"ggui-label",htmlFor:"ggui-sessions-filter",children:"filter"}),r.jsx("div",{className:"ggui-field",children:r.jsx("input",{id:"ggui-sessions-filter",name:"filter","aria-label":"filter session entries",placeholder:"substring match over sessionId, shortCode, appId…",value:i,onChange:d=>s(d.target.value),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})})]}),r.jsx(J7,{all:e.data.sessions,shown:u??e.data.sessions,filterActive:c.length>0})]})]})}function J7({all:e,shown:n,filterActive:i}){return e.length===0?r.jsx(tz,{}):r.jsxs("div",{"data-ggui-sessions-list":!0,className:"ggui-stack","aria-label":"active sessions",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"SES"}),r.jsx("span",{className:"ggui-stack__label",children:"live sessions"}),r.jsxs("span",{className:"ggui-stack__count",children:[n.length,i&&n.length!==e.length?` / ${e.length}`:""]})]}),n.length===0?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"No sessions match the filter."}):r.jsx("ul",{className:"ggui-stack__list",children:n.map((s,c)=>r.jsx(Q7,{session:s,index:c+1},s.sessionId))})]})}function Q7({session:e,index:n}){const i=e.sessionId.slice(0,8),s=e.status==="active"?"live":e.status==="expired"?"signal":"ink";return r.jsxs("li",{"data-ggui-session-id":e.sessionId,"data-ggui-session-status":e.status,className:"ggui-stack__entry",children:[r.jsxs("div",{className:"ggui-stack__entry-head",children:[r.jsx("span",{className:"ggui-stack__entry-num",children:`SES / ${String(n).padStart(2,"0")}`}),r.jsxs("span",{className:"ggui-stack__entry-title",children:[r.jsx("code",{className:"ggui-code",children:i}),"…"]}),r.jsx(Ne,{tone:s,children:e.status})]}),r.jsxs("div",{className:"ggui-stack__entry-meta",children:[r.jsxs("span",{children:["app ",r.jsx("code",{className:"ggui-code",children:e.appId})]}),r.jsxs("span",{style:{marginLeft:12},children:["stack"," ",r.jsx("code",{className:"ggui-code",children:String(e.stackSize)})]}),r.jsxs("span",{style:{marginLeft:12},children:["last active"," ",r.jsx("code",{className:"ggui-code",children:ez(e.lastActivityAt)})]})]}),r.jsx("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:e.shortCode?r.jsxs(r.Fragment,{children:[r.jsx("code",{className:"ggui-code",children:e.shortCode}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me(`/s/${encodeURIComponent(e.shortCode)}`),children:"open viewer →"})]}):r.jsxs("span",{className:"ggui-muted",children:["No shortCode — push a stack item via"," ",r.jsx("code",{className:"ggui-code",children:"ggui_push"})," to mint one."]})})]})}function ez(e){const n=Date.now()-e;if(n<0)return"just now";const i=Math.floor(n/1e3);if(i<5)return"just now";if(i<60)return`${i}s ago`;const s=Math.floor(i/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function tz(){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"empty"}),r.jsx("span",{className:"ggui-card__num",children:"SES / 00"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:"No sessions yet."}),r.jsxs("p",{className:"ggui-muted",children:["Push from an agent (",r.jsx("code",{className:"ggui-code",children:"ggui_push"}),") or open ",r.jsx("code",{className:"ggui-code",children:"/chat"})," to start a generation — new sessions appear here on reload."]})]})]})}function Sv({title:e,num:n,tone:i,children:s}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:e}),r.jsx("span",{className:"ggui-card__num",children:n})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:i,children:e})}),r.jsx("p",{className:"ggui-muted",children:s})]})]})}function az(){const[e,n]=O.useState({kind:"loading"}),[i,s]=O.useState({kind:"loading"});return O.useEffect(()=>{const c=new AbortController;return(async()=>{try{const u=await fetch("/ggui/console/info",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){n({kind:"error",message:`server returned ${u.status}`});return}const d=await u.json();n({kind:"ok",info:d})}catch(u){if(c.signal.aborted)return;n({kind:"error",message:String(u)})}})(),(async()=>{try{const u=await fetch("/ggui/console/sessions?limit=3",{signal:c.signal,headers:{accept:"application/json"}});if(!u.ok){s({kind:"error"});return}const d=await u.json();s({kind:"ok",data:d})}catch{c.signal.aborted||s({kind:"error"})}})(),()=>c.abort()},[]),r.jsxs("section",{className:"ggui-section","data-ggui-status-dashboard":!0,children:[r.jsx(tt,{num:"01 / status",title:"What's this server doing right now?",mute:"Every card reads a local endpoint. No hosted calls.",intro:r.jsxs(r.Fragment,{children:["Reloads on demand — console is an operator surface, not a live feed. Nav above points at the other pages:"," ",r.jsx("code",{className:"ggui-code",children:"playground"}),","," ",r.jsx("code",{className:"ggui-code",children:"blueprints"}),","," ",r.jsx("code",{className:"ggui-code",children:"tools"}),","," ",r.jsx("code",{className:"ggui-code",children:"config"}),"."]})}),r.jsx(lz,{state:i}),r.jsxs("div",{className:"ggui-status-grid",children:[r.jsx(nz,{state:e}),r.jsx(rz,{state:e}),r.jsx(iz,{state:e}),r.jsx(sz,{state:e})]})]})}function nz({state:e}){return r.jsx(gn,{num:"SRV / 01",title:"server",children:e.kind==="ok"?r.jsx(r.Fragment,{children:r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"name"}),r.jsx("dd",{children:e.info.server})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"version"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:e.info.version})})]}),e.info.description?r.jsxs("div",{children:[r.jsx("dt",{children:"description"}),r.jsx("dd",{children:e.info.description})]}):null]})}):e.kind==="loading"?r.jsx("p",{className:"ggui-muted",children:"Loading server identity…"}):r.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/info"})," ","— ",e.message,"."]})})}function rz({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"PAR / 01",title:"pairing",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const{enabled:n,pending:i}=e.info.pairing;if(!n)return r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"ink",children:"disabled"})}),r.jsxs("p",{className:"ggui-muted",children:["This server was composed with"," ",r.jsx("code",{className:"ggui-code",children:"pairing: false"}),". Pass"," ",r.jsx("code",{className:"ggui-code",children:"pairing: true"})," at boot to enable per-device auth."]})]});if(!i)return r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"live",children:"idle"})}),r.jsxs("p",{className:"ggui-muted",children:["Pairing is enabled. No pair code is pending — mint one via the CLI (",r.jsx("code",{className:"ggui-code",children:"ggui pair"}),") or the admin route."]})]});const s=Math.max(0,Math.round((i.codeExpiresAt-Date.now())/1e3));return r.jsxs(gn,{num:"PAR / 01",title:"pairing",children:[r.jsx("p",{className:"ggui-body",children:r.jsx(Ne,{tone:"draft",children:"pending"})}),r.jsx("p",{className:"ggui-code",style:{fontSize:24,letterSpacing:"0.08em",margin:"8px 0"},children:i.code}),r.jsxs("p",{className:"ggui-muted",children:["Valid for ",r.jsxs("code",{className:"ggui-code",children:[s,"s"]}),". Paste into a paired client or"," ",r.jsx("code",{className:"ggui-code",children:"POST /pair"})," with the bearer."]})]})}function iz({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"CAP / 01",title:"capabilities",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.capabilities;return r.jsx(gn,{num:"CAP / 01",title:"capabilities",children:r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"tools"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.toolCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"blueprints"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.blueprintCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"primitives"}),r.jsx("dd",{children:r.jsx("code",{className:"ggui-code",children:n.primitiveCount})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"agent"}),r.jsx("dd",{children:r.jsx(Ne,{tone:n.agentWired?"live":"ink",children:n.agentWired?"wired":"off"})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"generation"}),r.jsx("dd",{children:oz(n.generation)})]})]})})}function oz(e){return e.wired?e.hasCredentials?r.jsx(Ne,{tone:"live",children:"ready"}):r.jsx(Ne,{tone:"draft",children:"needs key"}):r.jsx(Ne,{tone:"ink",children:"off"})}function sz({state:e}){if(e.kind!=="ok")return r.jsx(gn,{num:"STG / 01",title:"storage",children:r.jsx("p",{className:"ggui-muted",children:e.kind==="loading"?"Loading…":"Unavailable."})});const n=e.info.storage,i=s=>s==="custom"?"live":"draft";return r.jsxs(gn,{num:"STG / 01",title:"storage",children:[r.jsxs("dl",{className:"ggui-kv",children:[r.jsxs("div",{children:[r.jsx("dt",{children:"sessions"}),r.jsx("dd",{children:r.jsx(Ne,{tone:i(n.sessionStore),children:n.sessionStore})})]}),r.jsxs("div",{children:[r.jsx("dt",{children:"vectors"}),r.jsx("dd",{children:r.jsx(Ne,{tone:i(n.vectorStore),children:n.vectorStore})})]})]}),r.jsxs("p",{className:"ggui-muted",style:{marginTop:12},children:[r.jsx("code",{className:"ggui-code",children:"memory"})," = in-process default (loss on restart). ",r.jsx("code",{className:"ggui-code",children:"custom"})," = operator-wired store."]})]})}function lz({state:e}){if(e.kind==="loading")return r.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"loading",children:r.jsx("p",{className:"ggui-muted",children:"Loading live sessions…"})});if(e.kind==="error")return r.jsx("div",{className:"ggui-status-hero","data-ggui-status-hero":"error",children:r.jsxs("p",{className:"ggui-muted",children:["Couldn't reach ",r.jsx("code",{className:"ggui-code",children:"/ggui/console/sessions"}),"."]})});if(e.data.sessions.length===0)return r.jsxs("div",{className:"ggui-status-hero ggui-status-hero--empty","data-ggui-status-hero":"empty",children:[r.jsx("div",{className:"ggui-status-hero__head",children:r.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[r.jsx(Ne,{tone:"ink",children:"idle"}),r.jsx("span",{children:"live sessions"})]})}),r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:["No sessions yet. Open"," ",r.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Me("/"),children:"playground"})," ","to start one, or point an agent at"," ",r.jsx("code",{className:"ggui-code",children:"ggui_push"}),"."]})]});const n=e.data.sessions,i=n.slice(0,3),s=i.find(c=>typeof c.shortCode=="string");return r.jsxs("div",{className:"ggui-status-hero ggui-status-hero--active","data-ggui-status-hero":"active","data-ggui-live-session-count":String(n.length),children:[r.jsxs("div",{className:"ggui-status-hero__head",children:[r.jsxs("span",{className:"ggui-status-hero__eyebrow",children:[r.jsx(Ne,{tone:"live",children:"live"}),r.jsxs("span",{children:[n.length," ",n.length===1?"session":"sessions"]})]}),s?r.jsx("button",{type:"button",className:"ggui-btn",onClick:()=>Me(`/s/${encodeURIComponent(s.shortCode)}`),"data-ggui-status-hero-open-latest":!0,children:"open latest →"}):null]}),r.jsx("ul",{className:"ggui-status-hero__list",children:i.map(c=>r.jsxs("li",{className:"ggui-status-hero__row","data-ggui-dashboard-session-id":c.sessionId,children:[r.jsxs("div",{className:"ggui-status-hero__row-main",children:[c.shortCode?r.jsxs("code",{className:"ggui-code","data-ggui-status-hero-shortcode":c.shortCode,children:["/s/",c.shortCode]}):r.jsxs("code",{className:"ggui-code",children:[c.sessionId.slice(0,8),"…"]}),r.jsxs("span",{className:"ggui-muted",children:["stack"," ",r.jsx("code",{className:"ggui-code",children:String(c.stackSize)})]}),r.jsx("span",{className:"ggui-muted",children:cz(c.lastActivityAt)})]}),c.shortCode?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me(`/s/${encodeURIComponent(c.shortCode)}`),children:"open →"}):r.jsx("span",{className:"ggui-muted",children:"no shortCode"})]},c.sessionId))}),n.length>i.length?r.jsx("div",{className:"ggui-status-hero__foot",children:r.jsxs("button",{type:"button",className:"ggui-link",onClick:()=>Me("/admin/sessions"),children:["view all ",n.length," →"]})}):r.jsx("div",{className:"ggui-status-hero__foot",children:r.jsx("button",{type:"button",className:"ggui-link",onClick:()=>Me("/admin/sessions"),children:"view all →"})})]})}function cz(e){const n=Date.now()-e;if(n<0)return"just now";const i=Math.floor(n/1e3);if(i<5)return"just now";if(i<60)return`${i}s ago`;const s=Math.floor(i/60);if(s<60)return`${s}m ago`;const c=Math.floor(s/60);if(c<24)return`${c}h ago`;const u=new Date(e),d=p=>p<10?`0${p}`:String(p);return`${u.getFullYear()}-${d(u.getMonth()+1)}-${d(u.getDate())}`}function gn({num:e,title:n,children:i}){return r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:n}),r.jsx("span",{className:"ggui-card__num",children:e})]}),r.jsx("div",{className:"ggui-card__body",children:i})]})}function uz(e){const n=e.$value;if(Array.isArray(n))return n.join(", ");if(n!==null&&typeof n=="object"){const i=n;if(e.$type==="shadow"&&"offsetX"in i)return`${i.offsetX} ${i.offsetY} ${i.blur} ${i.spread} ${i.color}`;if(e.$type==="transition"&&"duration"in i&&"timingFunction"in i)return`${typeof i.property=="string"&&i.property?`${i.property} `:""}${i.duration} ${i.timingFunction}`}return String(n)}function Kn(e,n,i){for(const[s,c]of Object.entries(e))s.startsWith("$")||(c!==null&&typeof c=="object"&&"$value"in c?i.push(` --ggui-${n}-${s}: ${uz(c)};`):c!==null&&typeof c=="object"&&Kn(c,`${n}-${s}`,i))}function dz(e){const n=[];return Kn(e.color,"color",n),Kn(e.font,"font",n),Kn(e.spacing,"spacing",n),Kn(e.shape,"shape",n),Kn({duration:e.motion.duration,easing:e.motion.easing,transition:e.motion.transition},"motion",n),Kn(e.accessibility,"accessibility",n),Kn(e.zIndex,"zIndex",n),n.push(` --ggui-canvas-mode: ${e.canvas.mode.$value};`),n.push(` --ggui-canvas-speed: ${e.canvas.speed.$value};`),n.push(` --ggui-canvas-background: ${e.canvas.background.$value};`),n.join(`
|
|
186
|
-
`)}function fz(e,n){const i=/([\d.]+%|from|to)\s*\{([^}]*)\}/g,s=[];let c;for(;(c=i.exec(n))!==null;){const u=c[1],p=c[2].trim().split(";").map(g=>g.trim()).filter(Boolean).map(g=>g.endsWith(";")?g:`${g};`).join(" ");s.push(` ${u} { ${p} }`)}return`@keyframes ggui-${e} {
|
|
187
|
-
${s.join(`
|
|
188
|
-
`)}
|
|
189
|
-
}`}function pz(e){const n=[];for(const[i,s]of Object.entries(e.motion.keyframes))i.startsWith("$")||n.push(fz(i,String(s.$value)));return n.join(`
|
|
190
|
-
|
|
191
|
-
`)}function gz(e,n){const s=`:root {
|
|
192
|
-
${dz(n)}
|
|
193
|
-
}`,c=pz(n),u=c?`${s}
|
|
194
|
-
|
|
195
|
-
${c}`:s;return{id:e,name:n.$name,description:n.$description,metadata:n.$metadata,cssVariables:s,cssKeyframes:c,css:u,canvasConfig:{mode:n.canvas.mode.$value,speed:n.canvas.speed.$value,colors:n.canvas.colors.$value,background:String(n.canvas.background.$value)}}}const Zt={light:{success:{50:{$type:"color",$value:"#f0fdf4"},100:{$type:"color",$value:"#dcfce7"},200:{$type:"color",$value:"#bbf7d0"},500:{$type:"color",$value:"#22c55e"},600:{$type:"color",$value:"#16a34a"},700:{$type:"color",$value:"#15803d"},800:{$type:"color",$value:"#166534"}},warning:{50:{$type:"color",$value:"#fffbeb"},100:{$type:"color",$value:"#fef3c7"},200:{$type:"color",$value:"#fde68a"},500:{$type:"color",$value:"#f59e0b"},600:{$type:"color",$value:"#d97706"},700:{$type:"color",$value:"#b45309"},800:{$type:"color",$value:"#92400e"}},error:{50:{$type:"color",$value:"#fef2f2"},100:{$type:"color",$value:"#fee2e2"},200:{$type:"color",$value:"#fecaca"},500:{$type:"color",$value:"#ef4444"},600:{$type:"color",$value:"#dc2626"},700:{$type:"color",$value:"#b91c1c"},800:{$type:"color",$value:"#991b1b"}},info:{50:{$type:"color",$value:"#ecfeff"},100:{$type:"color",$value:"#cffafe"},200:{$type:"color",$value:"#a5f3fc"},500:{$type:"color",$value:"#06b6d4"},600:{$type:"color",$value:"#0891b2"},700:{$type:"color",$value:"#0e7490"},800:{$type:"color",$value:"#155e75"}}},dark:{success:{50:{$type:"color",$value:"#052e16"},100:{$type:"color",$value:"#14532d"},200:{$type:"color",$value:"#166534"},500:{$type:"color",$value:"#22c55e"},600:{$type:"color",$value:"#4ade80"},700:{$type:"color",$value:"#86efac"},800:{$type:"color",$value:"#bbf7d0"}},warning:{50:{$type:"color",$value:"#451a03"},100:{$type:"color",$value:"#78350f"},200:{$type:"color",$value:"#92400e"},500:{$type:"color",$value:"#f59e0b"},600:{$type:"color",$value:"#fbbf24"},700:{$type:"color",$value:"#fcd34d"},800:{$type:"color",$value:"#fde68a"}},error:{50:{$type:"color",$value:"#450a0a"},100:{$type:"color",$value:"#7f1d1d"},200:{$type:"color",$value:"#991b1b"},500:{$type:"color",$value:"#ef4444"},600:{$type:"color",$value:"#f87171"},700:{$type:"color",$value:"#fca5a5"},800:{$type:"color",$value:"#fecaca"}},info:{50:{$type:"color",$value:"#083344"},100:{$type:"color",$value:"#164e63"},200:{$type:"color",$value:"#155e75"},500:{$type:"color",$value:"#06b6d4"},600:{$type:"color",$value:"#22d3ee"},700:{$type:"color",$value:"#67e8f9"},800:{$type:"color",$value:"#a5f3fc"}}}},Xe={light:{focusRing:{color:{$type:"color",$value:"#0284c7"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#000000"},backgroundColor:{$type:"color",$value:"#ffffff"},linkColor:{$type:"color",$value:"#0369a1"}}},dark:{focusRing:{color:{$type:"color",$value:"#38bdf8"},width:{$type:"dimension",$value:"2px"},offset:{$type:"dimension",$value:"2px"}},reducedMotion:{duration:{$type:"duration",$value:"0ms"}},highContrast:{borderWidth:{$type:"dimension",$value:"2px"},textColor:{$type:"color",$value:"#f1f5f9"},backgroundColor:{$type:"color",$value:"#0f172a"},linkColor:{$type:"color",$value:"#7dd3fc"}}}},sa={hide:{$type:"number",$value:-1},base:{$type:"number",$value:0},docked:{$type:"number",$value:10},dropdown:{$type:"number",$value:1e3},sticky:{$type:"number",$value:1100},banner:{$type:"number",$value:1200},overlay:{$type:"number",$value:1300},modal:{$type:"number",$value:1400},popover:{$type:"number",$value:1500},skipLink:{$type:"number",$value:1600},toast:{$type:"number",$value:1700},tooltip:{$type:"number",$value:1800}},Oc={fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"300ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}},rr={font:{family:{sans:{$value:'"Inter", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.125rem",$type:"dimension"},"2xl":{$value:"1.375rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.6",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"2px",$type:"dimension"},lg:{$value:"4px",$type:"dimension"},xl:{$value:"6px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"none",$type:"shadow"},md:{$value:"0 1px 2px rgba(41, 41, 41, 0.06)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(41, 41, 41, 0.08)",$type:"shadow"},xl:{$value:"0 4px 12px rgba(41, 41, 41, 0.10)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"400ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.56, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:Oc,keyframes:{"accent-pulse":{$value:"0%{opacity:1}50%{opacity:0.7}100%{opacity:1}",$type:"keyframes"},entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"},shimmer:{$value:"0%{background-position:-200% 0}100%{background-position:200% 0}",$type:"keyframes"}}}},mz={$name:"GGUI",$description:"The default ggui theme — monochrome paper + ink, architectural, no decorative flourish.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#292929",$type:"color"},600:{$value:"#1f1f1f",$type:"color"},700:{$value:"#171717",$type:"color"},800:{$value:"#0e0e0e",$type:"color"},900:{$value:"#000000",$type:"color"}},neutral:{50:{$value:"#f4f3ed",$type:"color"},100:{$value:"#ebe9e1",$type:"color"},200:{$value:"#e4e4e2",$type:"color"},300:{$value:"#d9d9d9",$type:"color"},400:{$value:"#8c8c93",$type:"color"},500:{$value:"#5a5a5a",$type:"color"},600:{$value:"#3d3d3d",$type:"color"},700:{$value:"#292929",$type:"color"},800:{$value:"#24242c",$type:"color"},900:{$value:"#0e0e0e",$type:"color"}},success:{50:{$value:"#e8f5ec",$type:"color"},100:{$value:"#c5e6cd",$type:"color"},200:{$value:"#8fcca0",$type:"color"},500:{$value:"#1b7a37",$type:"color"},600:{$value:"#15622c",$type:"color"},700:{$value:"#0f4a21",$type:"color"},800:{$value:"#093116",$type:"color"}},warning:{50:{$value:"#fbf3e0",$type:"color"},100:{$value:"#f3e1b0",$type:"color"},200:{$value:"#e6c46e",$type:"color"},500:{$value:"#a87b0e",$type:"color"},600:{$value:"#86620b",$type:"color"},700:{$value:"#654a08",$type:"color"},800:{$value:"#433105",$type:"color"}},error:{50:{$value:"#fbe7e3",$type:"color"},100:{$value:"#f4bbb1",$type:"color"},200:{$value:"#ea8a7a",$type:"color"},500:{$value:"#d93822",$type:"color"},600:{$value:"#ae2d1b",$type:"color"},700:{$value:"#822214",$type:"color"},800:{$value:"#57160d",$type:"color"}},info:{50:{$value:"#e1e1e1",$type:"color"},100:{$value:"#bababa",$type:"color"},200:{$value:"#8e8e8e",$type:"color"},500:{$value:"#3d3d3d",$type:"color"},600:{$value:"#313131",$type:"color"},700:{$value:"#252525",$type:"color"},800:{$value:"#181818",$type:"color"}},surface:{$value:"#f4f3ed",$type:"color"},onSurface:{$value:"#292929",$type:"color"},surfaceVariant:{$value:"#ebe9e1",$type:"color"},onSurfaceVariant:{$value:"#5a5a5a",$type:"color"},container:{$value:"#ebe9e1",$type:"color"},onContainer:{$value:"#292929",$type:"color"},outline:{$value:"#d6d4cb",$type:"color"},outlineVariant:{$value:"#e4e4e2",$type:"color"},onPrimary:{$value:"#f4f3ed",$type:"color"},primaryContainer:{$value:"#ebe9e1",$type:"color"},onPrimaryContainer:{$value:"#292929",$type:"color"},onError:{$value:"#f4f3ed",$type:"color"},errorContainer:{$value:"#fbe7e3",$type:"color"},onErrorContainer:{$value:"#57160d",$type:"color"},tertiary:{$value:"#1b7a37",$type:"color"},onTertiary:{$value:"#f4f3ed",$type:"color"},tertiaryContainer:{$value:"#e8f5ec",$type:"color"},onTertiaryContainer:{$value:"#093116",$type:"color"}},font:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:1,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#f4f3ed",$type:"color"}},accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#292929"}}},zIndex:sa},hz={$name:"GGUI",$description:"The default ggui theme (dark) — ink canvas, paper text, architectural and flat.",$metadata:{font:"Inter",fontUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Geist+Mono:wght@400;500;700&display=swap",philosophy:"The interface is the artifact, not the chrome around it."},color:{primary:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#f4f3ed",$type:"color"},600:{$value:"#ebe9e1",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#d9d9d9",$type:"color"},900:{$value:"#ffffff",$type:"color"}},neutral:{50:{$value:"#0e0e0e",$type:"color"},100:{$value:"#1f1f1f",$type:"color"},200:{$value:"#292929",$type:"color"},300:{$value:"#3d3d3d",$type:"color"},400:{$value:"#5a5a5a",$type:"color"},500:{$value:"#8c8c93",$type:"color"},600:{$value:"#d9d9d9",$type:"color"},700:{$value:"#e4e4e2",$type:"color"},800:{$value:"#ebe9e1",$type:"color"},900:{$value:"#f4f3ed",$type:"color"}},success:{50:{$value:"#0d2918",$type:"color"},100:{$value:"#174f2a",$type:"color"},200:{$value:"#286b3d",$type:"color"},500:{$value:"#3da85b",$type:"color"},600:{$value:"#6dbf83",$type:"color"},700:{$value:"#9dd5ab",$type:"color"},800:{$value:"#cdead3",$type:"color"}},warning:{50:{$value:"#332608",$type:"color"},100:{$value:"#5e4612",$type:"color"},200:{$value:"#896720",$type:"color"},500:{$value:"#d4a02e",$type:"color"},600:{$value:"#dfb55c",$type:"color"},700:{$value:"#eaca8a",$type:"color"},800:{$value:"#f5deb8",$type:"color"}},error:{50:{$value:"#3d130d",$type:"color"},100:{$value:"#702419",$type:"color"},200:{$value:"#a33828",$type:"color"},500:{$value:"#ff5b46",$type:"color"},600:{$value:"#ff7d6c",$type:"color"},700:{$value:"#ff9f93",$type:"color"},800:{$value:"#ffc2ba",$type:"color"}},info:{50:{$value:"#363636",$type:"color"},100:{$value:"#5a5a5a",$type:"color"},200:{$value:"#8c8c8c",$type:"color"},500:{$value:"#d9d9d9",$type:"color"},600:{$value:"#e0e0e0",$type:"color"},700:{$value:"#e8e8e8",$type:"color"},800:{$value:"#f0f0f0",$type:"color"}},surface:{$value:"#1f1f1f",$type:"color"},onSurface:{$value:"#f4f3ed",$type:"color"},surfaceVariant:{$value:"#292929",$type:"color"},onSurfaceVariant:{$value:"#d9d9d9",$type:"color"},container:{$value:"#292929",$type:"color"},onContainer:{$value:"#f4f3ed",$type:"color"},outline:{$value:"#3d3d3d",$type:"color"},outlineVariant:{$value:"#292929",$type:"color"},onPrimary:{$value:"#292929",$type:"color"},primaryContainer:{$value:"#3d3d3d",$type:"color"},onPrimaryContainer:{$value:"#f4f3ed",$type:"color"},onError:{$value:"#3d130d",$type:"color"},errorContainer:{$value:"#702419",$type:"color"},onErrorContainer:{$value:"#ffc2ba",$type:"color"},tertiary:{$value:"#3da85b",$type:"color"},onTertiary:{$value:"#0d2918",$type:"color"},tertiaryContainer:{$value:"#174f2a",$type:"color"},onTertiaryContainer:{$value:"#cdead3",$type:"color"}},font:rr.font,spacing:rr.spacing,shape:rr.shape,motion:rr.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:1,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#1a1a1a",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#f4f3ed"}}},zIndex:sa},yz={light:mz,dark:hz},ir={font:{family:{sans:{$value:'"Orbitron", "Rajdhani", system-ui, sans-serif',$type:"fontFamily"},mono:{$value:'"Share Tech Mono", "Fira Code", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8rem",$type:"dimension"},base:{$value:"0.95rem",$type:"dimension"},lg:{$value:"1.1rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.2",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"2px",$type:"dimension"},md:{$value:"4px",$type:"dimension"},lg:{$value:"6px",$type:"dimension"},xl:{$value:"8px",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 4px rgba(6, 182, 212, 0.3)",$type:"shadow"},md:{$value:"0 0 8px rgba(6, 182, 212, 0.4)",$type:"shadow"},lg:{$value:"0 0 16px rgba(6, 182, 212, 0.5)",$type:"shadow"},xl:{$value:"0 0 24px rgba(6, 182, 212, 0.6), 0 0 48px rgba(6, 182, 212, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"100ms",$type:"duration"},normal:{$value:"200ms",$type:"duration"},slow:{$value:"600ms",$type:"duration"},ambient:{$value:"2000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"glitch-flicker":{$value:"0%{opacity:1;transform:none}7%{opacity:0.8;transform:translateX(-2px) skewX(-1deg)}10%{opacity:1;transform:none}47%{opacity:1;transform:none}50%{opacity:0.6;transform:translateX(3px) skewX(2deg)}53%{opacity:1;transform:none}100%{opacity:1;transform:none}",$type:"keyframes"},"scan-line":{$value:"0%{transform:translateY(-100%)}100%{transform:translateY(100%)}",$type:"keyframes"},"neon-pulse":{$value:"0%{box-shadow:0 0 4px rgba(6,182,212,0.4)}50%{box-shadow:0 0 16px rgba(6,182,212,0.8)}100%{box-shadow:0 0 4px rgba(6,182,212,0.4)}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"100ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"200ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"600ms cubic-bezier(0.4, 0, 0.2, 1)"},colors:{$type:"transition",$value:"color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)"},opacity:{$type:"transition",$value:"opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)"},transform:{$type:"transition",$value:"transform 200ms cubic-bezier(0, 0, 0.2, 1)"}}}},vz={$name:"Cyberpunk",$description:"Neon-lit dystopian tech — cyan neon on dark chrome with glitch animations and constellation canvas.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},300:{$value:"#67e8f9",$type:"color"},400:{$value:"#22d3ee",$type:"color"},500:{$value:"#06b6d4",$type:"color"},600:{$value:"#0891b2",$type:"color"},700:{$value:"#0e7490",$type:"color"},800:{$value:"#155e75",$type:"color"},900:{$value:"#164e63",$type:"color"}},neutral:{50:{$value:"#0a0a0f",$type:"color"},100:{$value:"#111118",$type:"color"},200:{$value:"#1a1a24",$type:"color"},300:{$value:"#25252f",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#e0fff1",$type:"color"},100:{$value:"#b3ffd9",$type:"color"},200:{$value:"#66ffb3",$type:"color"},500:{$value:"#00ff88",$type:"color"},600:{$value:"#00cc6e",$type:"color"},700:{$value:"#009955",$type:"color"},800:{$value:"#006638",$type:"color"}},warning:{50:{$value:"#fff5e0",$type:"color"},100:{$value:"#ffe5b3",$type:"color"},200:{$value:"#ffcc66",$type:"color"},500:{$value:"#ffaa00",$type:"color"},600:{$value:"#cc8800",$type:"color"},700:{$value:"#996600",$type:"color"},800:{$value:"#664400",$type:"color"}},error:{50:{$value:"#ffe0e8",$type:"color"},100:{$value:"#ffb3c4",$type:"color"},200:{$value:"#ff6688",$type:"color"},500:{$value:"#ff2255",$type:"color"},600:{$value:"#cc1a44",$type:"color"},700:{$value:"#991333",$type:"color"},800:{$value:"#660d22",$type:"color"}},info:{50:{$value:"#e0f9ff",$type:"color"},100:{$value:"#b3edff",$type:"color"},200:{$value:"#66dbff",$type:"color"},500:{$value:"#00ccff",$type:"color"},600:{$value:"#00a3cc",$type:"color"},700:{$value:"#007a99",$type:"color"},800:{$value:"#005266",$type:"color"}},surface:{$value:"#0a0a0f",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#111118",$type:"color"},onSurfaceVariant:{$value:"#8888a0",$type:"color"},container:{$value:"#155e75",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#3a3a48",$type:"color"},outlineVariant:{$value:"#25252f",$type:"color"},onPrimary:{$value:"#0a0a0f",$type:"color"},primaryContainer:{$value:"#155e75",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#0a0a0f",$type:"color"},errorContainer:{$value:"#660d22",$type:"color"},onErrorContainer:{$value:"#ffe0e8",$type:"color"},tertiary:{$value:"#00ff88",$type:"color"},onTertiary:{$value:"#0a0a0f",$type:"color"},tertiaryContainer:{$value:"#006638",$type:"color"},onTertiaryContainer:{$value:"#e0fff1",$type:"color"}},font:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#06b6d4"}}},zIndex:sa,canvas:{mode:{$value:"constellation",$type:"string"},speed:{$value:1.2,$type:"number"},colors:{$value:["rgba(6, 182, 212, 0.25)","rgba(0, 255, 136, 0.12)","rgba(255, 34, 85, 0.08)"],$type:"array"},background:{$value:"#05050a",$type:"color"}}},$z={$name:"Cyberpunk",$description:"Neon-lit dystopian tech (dark) — brighter cyan on pure-black chrome, cranked neon contrast.",$metadata:{font:"Orbitron",fontUrl:"https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap",philosophy:"Chromatic noise, electric tension, digital rebellion."},color:{primary:{50:{$value:"#164e63",$type:"color"},100:{$value:"#155e75",$type:"color"},200:{$value:"#0e7490",$type:"color"},300:{$value:"#0891b2",$type:"color"},400:{$value:"#06b6d4",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"},900:{$value:"#ecfeff",$type:"color"}},neutral:{50:{$value:"#000005",$type:"color"},100:{$value:"#0a0a0f",$type:"color"},200:{$value:"#111118",$type:"color"},300:{$value:"#1a1a24",$type:"color"},400:{$value:"#3a3a48",$type:"color"},500:{$value:"#55556a",$type:"color"},600:{$value:"#8888a0",$type:"color"},700:{$value:"#aaaabe",$type:"color"},800:{$value:"#d0d0e0",$type:"color"},900:{$value:"#e8e8f0",$type:"color"}},success:{50:{$value:"#003319",$type:"color"},100:{$value:"#006633",$type:"color"},200:{$value:"#00994d",$type:"color"},500:{$value:"#33ffaa",$type:"color"},600:{$value:"#66ffbf",$type:"color"},700:{$value:"#99ffd4",$type:"color"},800:{$value:"#ccffea",$type:"color"}},warning:{50:{$value:"#332200",$type:"color"},100:{$value:"#664400",$type:"color"},200:{$value:"#996600",$type:"color"},500:{$value:"#ffbe33",$type:"color"},600:{$value:"#ffcb5c",$type:"color"},700:{$value:"#ffd985",$type:"color"},800:{$value:"#ffe7ad",$type:"color"}},error:{50:{$value:"#330a17",$type:"color"},100:{$value:"#66142e",$type:"color"},200:{$value:"#991e45",$type:"color"},500:{$value:"#ff4477",$type:"color"},600:{$value:"#ff6e94",$type:"color"},700:{$value:"#ff97b1",$type:"color"},800:{$value:"#ffc1cf",$type:"color"}},info:{50:{$value:"#002b33",$type:"color"},100:{$value:"#005566",$type:"color"},200:{$value:"#008099",$type:"color"},500:{$value:"#33d6ff",$type:"color"},600:{$value:"#5cdeff",$type:"color"},700:{$value:"#85e6ff",$type:"color"},800:{$value:"#adeeff",$type:"color"}},surface:{$value:"#000005",$type:"color"},onSurface:{$value:"#e8e8f0",$type:"color"},surfaceVariant:{$value:"#0a0a0f",$type:"color"},onSurfaceVariant:{$value:"#aaaabe",$type:"color"},container:{$value:"#0e7490",$type:"color"},onContainer:{$value:"#cffafe",$type:"color"},outline:{$value:"#1a1a24",$type:"color"},outlineVariant:{$value:"#111118",$type:"color"},onPrimary:{$value:"#000005",$type:"color"},primaryContainer:{$value:"#0e7490",$type:"color"},onPrimaryContainer:{$value:"#cffafe",$type:"color"},onError:{$value:"#000005",$type:"color"},errorContainer:{$value:"#991e45",$type:"color"},onErrorContainer:{$value:"#ffc1cf",$type:"color"},tertiary:{$value:"#33ffaa",$type:"color"},onTertiary:{$value:"#000005",$type:"color"},tertiaryContainer:{$value:"#006633",$type:"color"},onTertiaryContainer:{$value:"#ccffea",$type:"color"}},font:ir.font,spacing:ir.spacing,shape:ir.shape,motion:ir.motion,accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#22d3ee"}}},zIndex:sa,canvas:{mode:{$value:"constellation",$type:"string"},speed:{$value:1.2,$type:"number"},colors:{$value:["rgba(34, 211, 238, 0.32)","rgba(0, 255, 136, 0.16)","rgba(255, 34, 85, 0.10)"],$type:"array"},background:{$value:"#000005",$type:"color"}}},bz={light:vz,dark:$z},or={font:{family:{sans:{$value:'"Noto Serif JP", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"Noto Sans Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.6rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.9",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.125rem",$type:"dimension"},md:{$value:"0.25rem",$type:"dimension"},lg:{$value:"0.5rem",$type:"dimension"},xl:{$value:"0.75rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(42, 39, 36, 0.06)",$type:"shadow"},md:{$value:"0 3px 8px rgba(42, 39, 36, 0.08)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(42, 39, 36, 0.10)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(42, 39, 36, 0.12)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"500ms",$type:"duration"},slow:{$value:"1500ms",$type:"duration"},ambient:{$value:"6000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.33, 0, 0.67, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.2, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"slow-breathe":{$value:"0%{opacity:0.85}50%{opacity:1}100%{opacity:0.85}",$type:"keyframes"},"gentle-fade":{$value:"0%{opacity:0}100%{opacity:1}",$type:"keyframes"},"ink-ripple":{$value:"0%{transform:scale(0.95);opacity:0.5}50%{transform:scale(1);opacity:0.8}100%{transform:scale(0.95);opacity:0.5}",$type:"keyframes"}},transition:{fast:{$type:"transition",$value:"200ms cubic-bezier(0.33, 0, 0.67, 1)"},normal:{$type:"transition",$value:"500ms cubic-bezier(0.33, 0, 0.67, 1)"},slow:{$type:"transition",$value:"1500ms cubic-bezier(0.33, 0, 0.67, 1)"},colors:{$type:"transition",$value:"color 500ms cubic-bezier(0.33, 0, 0.67, 1), background-color 500ms cubic-bezier(0.33, 0, 0.67, 1), border-color 500ms cubic-bezier(0.33, 0, 0.67, 1)"},opacity:{$type:"transition",$value:"opacity 500ms cubic-bezier(0.33, 0, 0.67, 1)"},transform:{$type:"transition",$value:"transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"}}}},xz={$name:"Zen",$description:"Minimalist Japanese aesthetic — warm stone tones, deliberate space, and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#f6f7f4",$type:"color"},100:{$value:"#e8ebe2",$type:"color"},200:{$value:"#d1d7c5",$type:"color"},300:{$value:"#b3bda1",$type:"color"},400:{$value:"#93a17c",$type:"color"},500:{$value:"#748660",$type:"color"},600:{$value:"#5c6b4c",$type:"color"},700:{$value:"#48543d",$type:"color"},800:{$value:"#3b4434",$type:"color"},900:{$value:"#33392e",$type:"color"}},neutral:{50:{$value:"#faf9f7",$type:"color"},100:{$value:"#f3f1ed",$type:"color"},200:{$value:"#e7e4de",$type:"color"},300:{$value:"#d5d0c8",$type:"color"},400:{$value:"#b8b0a4",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#7a7068",$type:"color"},700:{$value:"#5e5650",$type:"color"},800:{$value:"#3e3a36",$type:"color"},900:{$value:"#2a2724",$type:"color"}},success:{50:{$type:"color",$value:"#f0f4ee"},100:{$type:"color",$value:"#dde6d8"},200:{$type:"color",$value:"#c6d4be"},500:{$type:"color",$value:"#6b8f5e"},600:{$type:"color",$value:"#58754d"},700:{$type:"color",$value:"#43583a"},800:{$type:"color",$value:"#2f3e29"}},warning:{50:{$type:"color",$value:"#faf6ea"},100:{$type:"color",$value:"#f4ebcb"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#c9a84c"},600:{$type:"color",$value:"#a88a3a"},700:{$type:"color",$value:"#7e672c"},800:{$type:"color",$value:"#59481f"}},error:{50:{$type:"color",$value:"#f8edec"},100:{$type:"color",$value:"#efd0ce"},200:{$type:"color",$value:"#e3aba8"},500:{$type:"color",$value:"#b85450"},600:{$type:"color",$value:"#9a4340"},700:{$type:"color",$value:"#743330"},800:{$type:"color",$value:"#522423"}},info:{50:{$type:"color",$value:"#eef3f5"},100:{$type:"color",$value:"#d7e2e7"},200:{$type:"color",$value:"#b9cdd5"},500:{$type:"color",$value:"#6a8fa0"},600:{$type:"color",$value:"#557585"},700:{$type:"color",$value:"#405864"},800:{$type:"color",$value:"#2c3d46"}},surface:{$value:"#faf9f7",$type:"color"},onSurface:{$value:"#2a2724",$type:"color"},surfaceVariant:{$value:"#f3f1ed",$type:"color"},onSurfaceVariant:{$value:"#6b635b",$type:"color"},container:{$value:"#e8ebe2",$type:"color"},onContainer:{$value:"#33392e",$type:"color"},outline:{$value:"#d5d0c8",$type:"color"},outlineVariant:{$value:"#e7e4de",$type:"color"},onPrimary:{$value:"#faf9f7",$type:"color"},primaryContainer:{$value:"#e8ebe2",$type:"color"},onPrimaryContainer:{$value:"#33392e",$type:"color"},onError:{$value:"#faf9f7",$type:"color"},errorContainer:{$value:"#f8edec",$type:"color"},onErrorContainer:{$value:"#522423",$type:"color"},tertiary:{$value:"#7d5e6e",$type:"color"},onTertiary:{$value:"#faf9f7",$type:"color"},tertiaryContainer:{$value:"#ebe2e6",$type:"color"},onTertiaryContainer:{$value:"#3a2a32",$type:"color"}},font:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.3,$type:"number"},colors:{$value:["rgba(92, 107, 76, 0.08)","rgba(185, 176, 164, 0.06)","rgba(213, 208, 200, 0.05)"],$type:"array"},background:{$value:"#1a1816",$type:"color"}},accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#748660"}}},zIndex:sa},jz={$name:"Zen",$description:"Minimalist Japanese aesthetic (dark) — dusk stone surfaces with restrained moss accents and unhurried motion.",$metadata:{font:"Noto Serif JP",fontUrl:"https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap",philosophy:"Beauty in imperfection. Stillness as presence."},color:{primary:{50:{$value:"#33392e",$type:"color"},100:{$value:"#3b4434",$type:"color"},200:{$value:"#48543d",$type:"color"},300:{$value:"#5c6b4c",$type:"color"},400:{$value:"#748660",$type:"color"},500:{$value:"#93a17c",$type:"color"},600:{$value:"#b3bda1",$type:"color"},700:{$value:"#d1d7c5",$type:"color"},800:{$value:"#e8ebe2",$type:"color"},900:{$value:"#f6f7f4",$type:"color"}},neutral:{50:{$value:"#1a1816",$type:"color"},100:{$value:"#2a2724",$type:"color"},200:{$value:"#3e3a36",$type:"color"},300:{$value:"#5e5650",$type:"color"},400:{$value:"#7a7068",$type:"color"},500:{$value:"#9a9084",$type:"color"},600:{$value:"#b8b0a4",$type:"color"},700:{$value:"#d5d0c8",$type:"color"},800:{$value:"#e7e4de",$type:"color"},900:{$value:"#faf9f7",$type:"color"}},success:{50:{$type:"color",$value:"#f1f6ee"},100:{$type:"color",$value:"#dceacc"},200:{$type:"color",$value:"#c4dab1"},500:{$type:"color",$value:"#8aab7a"},600:{$type:"color",$value:"#6f8d62"},700:{$type:"color",$value:"#546b4a"},800:{$type:"color",$value:"#3a4b34"}},warning:{50:{$type:"color",$value:"#fbf6e9"},100:{$type:"color",$value:"#f4e9c1"},200:{$type:"color",$value:"#ecdda4"},500:{$type:"color",$value:"#d8b96a"},600:{$type:"color",$value:"#b09553"},700:{$type:"color",$value:"#84703d"},800:{$type:"color",$value:"#5a4c2a"}},error:{50:{$type:"color",$value:"#faeae9"},100:{$type:"color",$value:"#f1cac8"},200:{$type:"color",$value:"#e4a5a1"},500:{$type:"color",$value:"#cf6f6a"},600:{$type:"color",$value:"#a85753"},700:{$type:"color",$value:"#7d403c"},800:{$type:"color",$value:"#552a27"}},info:{50:{$type:"color",$value:"#f0f4f6"},100:{$type:"color",$value:"#d7e0e5"},200:{$type:"color",$value:"#bccbd2"},500:{$type:"color",$value:"#8eaab8"},600:{$type:"color",$value:"#708995"},700:{$type:"color",$value:"#546771"},800:{$type:"color",$value:"#38454d"}},surface:{$value:"#2a2724",$type:"color"},onSurface:{$value:"#f3f1ed",$type:"color"},surfaceVariant:{$value:"#3e3a36",$type:"color"},onSurfaceVariant:{$value:"#b8b0a4",$type:"color"},container:{$value:"#48543d",$type:"color"},onContainer:{$value:"#e8ebe2",$type:"color"},outline:{$value:"#5e5650",$type:"color"},outlineVariant:{$value:"#3e3a36",$type:"color"},onPrimary:{$value:"#1a1816",$type:"color"},primaryContainer:{$value:"#3b4434",$type:"color"},onPrimaryContainer:{$value:"#e8ebe2",$type:"color"},onError:{$value:"#1a1816",$type:"color"},errorContainer:{$value:"#552a27",$type:"color"},onErrorContainer:{$value:"#f1cac8",$type:"color"},tertiary:{$value:"#a98899",$type:"color"},onTertiary:{$value:"#1a1816",$type:"color"},tertiaryContainer:{$value:"#4e3a44",$type:"color"},onTertiaryContainer:{$value:"#ebe2e6",$type:"color"}},font:or.font,spacing:or.spacing,shape:or.shape,motion:or.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.3,$type:"number"},colors:{$value:["rgba(147, 161, 124, 0.10)","rgba(185, 176, 164, 0.07)","rgba(213, 208, 200, 0.05)"],$type:"array"},background:{$value:"#1a1816",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#93a17c"}}},zIndex:sa},_z={light:xz,dark:jz},sr={font:{family:{sans:{$value:'"Outfit", system-ui, -apple-system, sans-serif',$type:"fontFamily"},mono:{$value:'"Fira Code", "JetBrains Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.5",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.25rem",$type:"dimension"},md:{$value:"0.5rem",$type:"dimension"},lg:{$value:"0.75rem",$type:"dimension"},xl:{$value:"1rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 0 6px rgba(236, 72, 153, 0.25)",$type:"shadow"},md:{$value:"0 0 12px rgba(236, 72, 153, 0.35)",$type:"shadow"},lg:{$value:"0 0 20px rgba(236, 72, 153, 0.45)",$type:"shadow"},xl:{$value:"0 0 30px rgba(236, 72, 153, 0.55), 0 0 60px rgba(236, 72, 153, 0.2)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"800ms",$type:"duration"},ambient:{$value:"2500ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.68, -0.55, 0.27, 1.55)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},transition:{fast:{$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},normal:{$value:"250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},slow:{$value:"800ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},colors:{$value:"color 250ms cubic-bezier(0.4, 0, 0.2, 1), background-color 250ms cubic-bezier(0.4, 0, 0.2, 1), border-color 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},opacity:{$value:"opacity 250ms cubic-bezier(0.4, 0, 0.2, 1)",$type:"transition"},transform:{$value:"transform 250ms cubic-bezier(0.22, 1, 0.36, 1)",$type:"transition"}},keyframes:{"neon-flicker":{$value:"0%{opacity:1}4%{opacity:0.7}8%{opacity:1}12%{opacity:0.85}16%{opacity:1}100%{opacity:1}",$type:"keyframes"},"glow-pulse":{$value:"0%{box-shadow:0 0 8px rgba(236,72,153,0.4)}50%{box-shadow:0 0 24px rgba(236,72,153,0.8)}100%{box-shadow:0 0 8px rgba(236,72,153,0.4)}",$type:"keyframes"},"electric-arc":{$value:"0%{clip-path:inset(0 100% 0 0)}50%{clip-path:inset(0 0 0 0)}100%{clip-path:inset(0 0 0 100%)}",$type:"keyframes"}}}},Sz={$name:"Neon Noir",$description:"Hot pink neon on dark — electric glow effects, neon flicker, and flowing magenta particles.",$metadata:{font:"Outfit",fontUrl:"https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",philosophy:"Midnight electricity. The city never sleeps."},color:{primary:{50:{$value:"#fdf2f8",$type:"color"},100:{$value:"#fce7f3",$type:"color"},200:{$value:"#fbcfe8",$type:"color"},300:{$value:"#f9a8d4",$type:"color"},400:{$value:"#f472b6",$type:"color"},500:{$value:"#ec4899",$type:"color"},600:{$value:"#db2777",$type:"color"},700:{$value:"#be185d",$type:"color"},800:{$value:"#9d174d",$type:"color"},900:{$value:"#831843",$type:"color"}},neutral:{50:{$value:"#09090b",$type:"color"},100:{$value:"#111114",$type:"color"},200:{$value:"#19191e",$type:"color"},300:{$value:"#232329",$type:"color"},400:{$value:"#3b3b44",$type:"color"},500:{$value:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Zt.dark.success,500:{$value:"#34d399",$type:"color"}},warning:{...Zt.dark.warning,500:{$value:"#fbbf24",$type:"color"}},error:{...Zt.dark.error,500:{$value:"#f87171",$type:"color"}},info:{...Zt.dark.info,500:{$value:"#38bdf8",$type:"color"}},surface:{$value:"#09090b",$type:"color"},onSurface:{$value:"#ececf0",$type:"color"},surfaceVariant:{$value:"#111114",$type:"color"},onSurfaceVariant:{$value:"#8a8a9a",$type:"color"},container:{$value:"#9d174d",$type:"color"},onContainer:{$value:"#fce7f3",$type:"color"},outline:{$value:"#3b3b44",$type:"color"},outlineVariant:{$value:"#232329",$type:"color"},onPrimary:{$value:"#09090b",$type:"color"},primaryContainer:{$value:"#9d174d",$type:"color"},onPrimaryContainer:{$value:"#fce7f3",$type:"color"},onError:{$value:"#09090b",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecaca",$type:"color"},tertiary:{$value:"#a855f7",$type:"color"},onTertiary:{$value:"#09090b",$type:"color"},tertiaryContainer:{$value:"#6b21a8",$type:"color"},onTertiaryContainer:{$value:"#f3e8ff",$type:"color"}},font:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,canvas:{mode:{$value:"flow",$type:"string"},speed:{$value:.8,$type:"number"},colors:{$value:["rgba(236, 72, 153, 0.18)","rgba(219, 39, 119, 0.12)","rgba(190, 24, 93, 0.08)"],$type:"array"},background:{$value:"#06060a",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$value:"#ec4899",$type:"color"}}},zIndex:sa},wz={$name:"Neon Noir",$description:"Hot pink neon on pure black (dark) — sharper noir contrast, brighter electric glow, deeper magenta containers.",$metadata:{font:"Outfit",fontUrl:"https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap",philosophy:"Midnight electricity. The city never sleeps."},color:{primary:{50:{$value:"#831843",$type:"color"},100:{$value:"#9d174d",$type:"color"},200:{$value:"#be185d",$type:"color"},300:{$value:"#db2777",$type:"color"},400:{$value:"#ec4899",$type:"color"},500:{$value:"#f472b6",$type:"color"},600:{$value:"#f9a8d4",$type:"color"},700:{$value:"#fbcfe8",$type:"color"},800:{$value:"#fce7f3",$type:"color"},900:{$value:"#fdf2f8",$type:"color"}},neutral:{50:{$value:"#000000",$type:"color"},100:{$value:"#09090b",$type:"color"},200:{$value:"#111114",$type:"color"},300:{$value:"#19191e",$type:"color"},400:{$value:"#3b3b44",$type:"color"},500:{$value:"#5a5a68",$type:"color"},600:{$value:"#8a8a9a",$type:"color"},700:{$value:"#b0b0be",$type:"color"},800:{$value:"#d4d4de",$type:"color"},900:{$value:"#ececf0",$type:"color"}},success:{...Zt.dark.success,500:{$value:"#5ee0ad",$type:"color"}},warning:{...Zt.dark.warning,500:{$value:"#ffd24a",$type:"color"}},error:{...Zt.dark.error,500:{$value:"#ff8a8a",$type:"color"}},info:{...Zt.dark.info,500:{$value:"#5acdff",$type:"color"}},surface:{$value:"#000000",$type:"color"},onSurface:{$value:"#ececf0",$type:"color"},surfaceVariant:{$value:"#09090b",$type:"color"},onSurfaceVariant:{$value:"#b0b0be",$type:"color"},container:{$value:"#be185d",$type:"color"},onContainer:{$value:"#fce7f3",$type:"color"},outline:{$value:"#19191e",$type:"color"},outlineVariant:{$value:"#111114",$type:"color"},onPrimary:{$value:"#000000",$type:"color"},primaryContainer:{$value:"#be185d",$type:"color"},onPrimaryContainer:{$value:"#fce7f3",$type:"color"},onError:{$value:"#000000",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#c084fc",$type:"color"},onTertiary:{$value:"#000000",$type:"color"},tertiaryContainer:{$value:"#581c87",$type:"color"},onTertiaryContainer:{$value:"#f3e8ff",$type:"color"}},font:sr.font,spacing:sr.spacing,shape:sr.shape,motion:sr.motion,canvas:{mode:{$value:"flow",$type:"string"},speed:{$value:.8,$type:"number"},colors:{$value:["rgba(244, 114, 182, 0.24)","rgba(236, 72, 153, 0.16)","rgba(190, 24, 93, 0.10)"],$type:"array"},background:{$value:"#000000",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$value:"#f472b6",$type:"color"}}},zIndex:sa},kz={light:Sz,dark:wz},lr={font:{family:{sans:{$value:'"Lora", "Georgia", serif',$type:"fontFamily"},mono:{$value:'"IBM Plex Mono", "Courier New", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.15rem",$type:"dimension"},xl:{$value:"1.3rem",$type:"dimension"},"2xl":{$value:"1.625rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.3",$type:"number"},normal:{$value:"1.6",$type:"number"},relaxed:{$value:"1.85",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.375rem",$type:"dimension"},md:{$value:"0.625rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px rgba(53, 46, 32, 0.08)",$type:"shadow"},md:{$value:"0 4px 8px rgba(53, 46, 32, 0.10)",$type:"shadow"},lg:{$value:"0 8px 20px rgba(53, 46, 32, 0.12)",$type:"shadow"},xl:{$value:"0 16px 40px rgba(53, 46, 32, 0.14)",$type:"shadow"}}},motion:{duration:{fast:{$value:"200ms",$type:"duration"},normal:{$value:"400ms",$type:"duration"},slow:{$value:"1200ms",$type:"duration"},ambient:{$value:"5000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},bounce:{$value:"cubic-bezier(0.34, 1.3, 0.64, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{"leaf-float":{$value:"0%{transform:translateY(0) rotate(0deg);opacity:0.7}25%{transform:translateY(-6px) rotate(3deg)}50%{transform:translateY(-2px) rotate(-2deg);opacity:1}75%{transform:translateY(-8px) rotate(2deg)}100%{transform:translateY(0) rotate(0deg);opacity:0.7}",$type:"keyframes"},"vine-grow":{$value:"0%{transform:scaleY(0);transform-origin:bottom}100%{transform:scaleY(1);transform-origin:bottom}",$type:"keyframes"},"gentle-sway":{$value:"0%{transform:rotate(-1deg)}50%{transform:rotate(1deg)}100%{transform:rotate(-1deg)}",$type:"keyframes"}},transition:Oc}},Nz={$name:"Botanical",$description:"Organic greens on warm cream — leaf-float animations, vine-grow motion, and a gentle mesh canvas.",$metadata:{font:"Lora",fontUrl:"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",philosophy:"Rooted in nature. Growing with intention."},color:{primary:{50:{$value:"#f0fdf4",$type:"color"},100:{$value:"#dcfce7",$type:"color"},200:{$value:"#bbf7d0",$type:"color"},300:{$value:"#86efac",$type:"color"},400:{$value:"#4ade80",$type:"color"},500:{$value:"#22c55e",$type:"color"},600:{$value:"#16a34a",$type:"color"},700:{$value:"#15803d",$type:"color"},800:{$value:"#166534",$type:"color"},900:{$value:"#14532d",$type:"color"}},neutral:{50:{$value:"#fefcf8",$type:"color"},100:{$value:"#fdf8ef",$type:"color"},200:{$value:"#f8f0df",$type:"color"},300:{$value:"#f0e4c9",$type:"color"},400:{$value:"#dccba5",$type:"color"},500:{$value:"#bfaa80",$type:"color"},600:{$value:"#9a8660",$type:"color"},700:{$value:"#746448",$type:"color"},800:{$value:"#504530",$type:"color"},900:{$value:"#352e20",$type:"color"}},success:Zt.light.success,warning:Zt.light.warning,error:Zt.light.error,info:Zt.light.info,surface:{$value:"#fefcf8",$type:"color"},onSurface:{$value:"#352e20",$type:"color"},surfaceVariant:{$value:"#fdf8ef",$type:"color"},onSurfaceVariant:{$value:"#746448",$type:"color"},container:{$value:"#dcfce7",$type:"color"},onContainer:{$value:"#14532d",$type:"color"},outline:{$value:"#f0e4c9",$type:"color"},outlineVariant:{$value:"#f8f0df",$type:"color"},onPrimary:{$value:"#fefcf8",$type:"color"},primaryContainer:{$value:"#dcfce7",$type:"color"},onPrimaryContainer:{$value:"#14532d",$type:"color"},onError:{$value:"#fefcf8",$type:"color"},errorContainer:{$value:"#fee2e2",$type:"color"},onErrorContainer:{$value:"#7f1d1d",$type:"color"},tertiary:{$value:"#b45309",$type:"color"},onTertiary:{$value:"#fefcf8",$type:"color"},tertiaryContainer:{$value:"#fef3c7",$type:"color"},onTertiaryContainer:{$value:"#451a03",$type:"color"}},font:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#16a34a"}}},zIndex:sa,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.4,$type:"number"},colors:{$value:["rgba(22, 163, 74, 0.10)","rgba(191, 170, 128, 0.08)","rgba(240, 228, 201, 0.06)"],$type:"array"},background:{$value:"#141210",$type:"color"}}},zz={$name:"Botanical",$description:"Forest at night (dark) — deep soil surfaces with lifted leaf-green accents and gentle organic motion.",$metadata:{font:"Lora",fontUrl:"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap",philosophy:"Rooted in nature. Growing with intention."},color:{primary:{50:{$value:"#14532d",$type:"color"},100:{$value:"#166534",$type:"color"},200:{$value:"#15803d",$type:"color"},300:{$value:"#16a34a",$type:"color"},400:{$value:"#22c55e",$type:"color"},500:{$value:"#4ade80",$type:"color"},600:{$value:"#86efac",$type:"color"},700:{$value:"#bbf7d0",$type:"color"},800:{$value:"#dcfce7",$type:"color"},900:{$value:"#f0fdf4",$type:"color"}},neutral:{50:{$value:"#141210",$type:"color"},100:{$value:"#1f1c18",$type:"color"},200:{$value:"#352e20",$type:"color"},300:{$value:"#504530",$type:"color"},400:{$value:"#746448",$type:"color"},500:{$value:"#9a8660",$type:"color"},600:{$value:"#bfaa80",$type:"color"},700:{$value:"#dccba5",$type:"color"},800:{$value:"#f0e4c9",$type:"color"},900:{$value:"#fefcf8",$type:"color"}},success:Zt.dark.success,warning:Zt.dark.warning,error:Zt.dark.error,info:Zt.dark.info,surface:{$value:"#1f1c18",$type:"color"},onSurface:{$value:"#fefcf8",$type:"color"},surfaceVariant:{$value:"#352e20",$type:"color"},onSurfaceVariant:{$value:"#dccba5",$type:"color"},container:{$value:"#166534",$type:"color"},onContainer:{$value:"#dcfce7",$type:"color"},outline:{$value:"#504530",$type:"color"},outlineVariant:{$value:"#352e20",$type:"color"},onPrimary:{$value:"#141210",$type:"color"},primaryContainer:{$value:"#166534",$type:"color"},onPrimaryContainer:{$value:"#dcfce7",$type:"color"},onError:{$value:"#450a0a",$type:"color"},errorContainer:{$value:"#7f1d1d",$type:"color"},onErrorContainer:{$value:"#fecaca",$type:"color"},tertiary:{$value:"#fbbf24",$type:"color"},onTertiary:{$value:"#451a03",$type:"color"},tertiaryContainer:{$value:"#78350f",$type:"color"},onTertiaryContainer:{$value:"#fef3c7",$type:"color"}},font:lr.font,spacing:lr.spacing,shape:lr.shape,motion:lr.motion,accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#4ade80"}}},zIndex:sa,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.4,$type:"number"},colors:{$value:["rgba(74, 222, 128, 0.12)","rgba(191, 170, 128, 0.09)","rgba(53, 46, 32, 0.06)"],$type:"array"},background:{$value:"#0a0907",$type:"color"}}},Cz={light:Nz,dark:zz},Ez={...Oc,fast:{$type:"transition",$value:"120ms cubic-bezier(0.4, 0, 0.2, 1)"},normal:{$type:"transition",$value:"240ms cubic-bezier(0.4, 0, 0.2, 1)"},slow:{$type:"transition",$value:"480ms cubic-bezier(0.4, 0, 0.2, 1)"}},cr={font:{family:{sans:{$value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.875rem",$type:"dimension"},base:{$value:"1rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.25rem",$type:"dimension"},"2xl":{$value:"1.5rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"700",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.25",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.75",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.75rem",$type:"dimension"},lg:{$value:"1rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 3px color-mix(in srgb, var(--ggui-color-primary-500) 8%, transparent)",$type:"shadow"},md:{$value:"0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 16px -4px color-mix(in srgb, var(--ggui-color-primary-500) 14%, transparent)",$type:"shadow"},lg:{$value:"0 2px 4px rgba(20, 20, 19, 0.04), 0 16px 32px -8px color-mix(in srgb, var(--ggui-color-primary-500) 20%, transparent)",$type:"shadow"},xl:{$value:"0 4px 8px rgba(20, 20, 19, 0.04), 0 24px 48px -12px color-mix(in srgb, var(--ggui-color-primary-500) 26%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"120ms",$type:"duration"},normal:{$value:"240ms",$type:"duration"},slow:{$value:"480ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.4, 0, 0.2, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.22, 1, 0.36, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(4px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:Ez}},Tz={50:{$value:"#fbf2ee",$type:"color"},100:{$value:"#f5dfd4",$type:"color"},200:{$value:"#ecbfa9",$type:"color"},300:{$value:"#df9d80",$type:"color"},400:{$value:"#d6896c",$type:"color"},500:{$value:"#cc785c",$type:"color"},600:{$value:"#b8694f",$type:"color"},700:{$value:"#965240",$type:"color"},800:{$value:"#723e30",$type:"color"},900:{$value:"#4d2920",$type:"color"}},Mz={$name:"Claudic",$description:"Fits inside claude.ai — warm ivory surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{...Tz},neutral:{50:{$value:"#faf9f5",$type:"color"},100:{$value:"#f5f4ee",$type:"color"},200:{$value:"#ebe9df",$type:"color"},300:{$value:"#dad8cc",$type:"color"},400:{$value:"#a8a59f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#56544f",$type:"color"},700:{$value:"#3d3b39",$type:"color"},800:{$value:"#262624",$type:"color"},900:{$value:"#141413",$type:"color"}},success:{50:{$value:"#f4f7ec",$type:"color"},100:{$value:"#e3ecd0",$type:"color"},200:{$value:"#c8d8a5",$type:"color"},500:{$value:"#6b8e3d",$type:"color"},600:{$value:"#587634",$type:"color"},700:{$value:"#465c29",$type:"color"},800:{$value:"#33431e",$type:"color"}},warning:{50:{$value:"#fbf3e3",$type:"color"},100:{$value:"#f6e2bb",$type:"color"},200:{$value:"#eac786",$type:"color"},500:{$value:"#c98e2e",$type:"color"},600:{$value:"#a87725",$type:"color"},700:{$value:"#825c1d",$type:"color"},800:{$value:"#5d4214",$type:"color"}},error:{50:{$value:"#f9ebe7",$type:"color"},100:{$value:"#f1cec5",$type:"color"},200:{$value:"#e3a294",$type:"color"},500:{$value:"#bc4a3a",$type:"color"},600:{$value:"#9d3d30",$type:"color"},700:{$value:"#7a2f25",$type:"color"},800:{$value:"#57211a",$type:"color"}},info:{50:{$value:"#f1f0ee",$type:"color"},100:{$value:"#dedcd8",$type:"color"},200:{$value:"#bdbab4",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#65635f",$type:"color"},700:{$value:"#4d4b48",$type:"color"},800:{$value:"#363432",$type:"color"}},surface:{$value:"#faf9f5",$type:"color"},onSurface:{$value:"#141413",$type:"color"},surfaceVariant:{$value:"#f5f4ee",$type:"color"},onSurfaceVariant:{$value:"#56544f",$type:"color"},container:{$value:"#fbf2ee",$type:"color"},onContainer:{$value:"#4d2920",$type:"color"},outline:{$value:"#dad8cc",$type:"color"},outlineVariant:{$value:"#ebe9df",$type:"color"},onPrimary:{$value:"#faf9f5",$type:"color"},primaryContainer:{$value:"#fbf2ee",$type:"color"},onPrimaryContainer:{$value:"#4d2920",$type:"color"},onError:{$value:"#faf9f5",$type:"color"},errorContainer:{$value:"#f9ebe7",$type:"color"},onErrorContainer:{$value:"#57211a",$type:"color"},tertiary:{$value:"#6b8e3d",$type:"color"},onTertiary:{$value:"#faf9f5",$type:"color"},tertiaryContainer:{$value:"#f4f7ec",$type:"color"},onTertiaryContainer:{$value:"#33431e",$type:"color"}},font:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:0,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#faf9f5",$type:"color"}},accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#cc785c"}}},zIndex:sa},Rz={$name:"Claudic",$description:"Fits inside claude.ai (dark) — warm charcoal surfaces, terracotta accent, calm by design.",$metadata:{font:"system",philosophy:"Quiet, papery, conversational. Built to feel native when rendered inside claude.ai."},color:{primary:{50:{$value:"#4d2920",$type:"color"},100:{$value:"#723e30",$type:"color"},200:{$value:"#965240",$type:"color"},300:{$value:"#b8694f",$type:"color"},400:{$value:"#cc785c",$type:"color"},500:{$value:"#d6896c",$type:"color"},600:{$value:"#df9d80",$type:"color"},700:{$value:"#ecbfa9",$type:"color"},800:{$value:"#f5dfd4",$type:"color"},900:{$value:"#fbf2ee",$type:"color"}},neutral:{50:{$value:"#1a1917",$type:"color"},100:{$value:"#262624",$type:"color"},200:{$value:"#2d2c2a",$type:"color"},300:{$value:"#3d3b39",$type:"color"},400:{$value:"#56544f",$type:"color"},500:{$value:"#7c7a76",$type:"color"},600:{$value:"#a8a59f",$type:"color"},700:{$value:"#dad8cc",$type:"color"},800:{$value:"#ebe9df",$type:"color"},900:{$value:"#faf9f5",$type:"color"}},success:{50:{$value:"#1c2412",$type:"color"},100:{$value:"#34461e",$type:"color"},200:{$value:"#4a6029",$type:"color"},500:{$value:"#9bb56b",$type:"color"},600:{$value:"#b1c688",$type:"color"},700:{$value:"#c8d8a5",$type:"color"},800:{$value:"#e3ecd0",$type:"color"}},warning:{50:{$value:"#2a1e0c",$type:"color"},100:{$value:"#523915",$type:"color"},200:{$value:"#7a541f",$type:"color"},500:{$value:"#dba14a",$type:"color"},600:{$value:"#e4b46e",$type:"color"},700:{$value:"#eac786",$type:"color"},800:{$value:"#f6e2bb",$type:"color"}},error:{50:{$value:"#2a1410",$type:"color"},100:{$value:"#52271f",$type:"color"},200:{$value:"#7a3a2e",$type:"color"},500:{$value:"#d56b59",$type:"color"},600:{$value:"#df8576",$type:"color"},700:{$value:"#e3a294",$type:"color"},800:{$value:"#f1cec5",$type:"color"}},info:{50:{$value:"#222220",$type:"color"},100:{$value:"#3a3936",$type:"color"},200:{$value:"#56544f",$type:"color"},500:{$value:"#a8a59f",$type:"color"},600:{$value:"#bcbab5",$type:"color"},700:{$value:"#d1cfca",$type:"color"},800:{$value:"#e6e4e0",$type:"color"}},surface:{$value:"#262624",$type:"color"},onSurface:{$value:"#faf9f5",$type:"color"},surfaceVariant:{$value:"#2d2c2a",$type:"color"},onSurfaceVariant:{$value:"#a8a59f",$type:"color"},container:{$value:"#3d3b39",$type:"color"},onContainer:{$value:"#fbf2ee",$type:"color"},outline:{$value:"#3d3b39",$type:"color"},outlineVariant:{$value:"#2d2c2a",$type:"color"},onPrimary:{$value:"#262624",$type:"color"},primaryContainer:{$value:"#723e30",$type:"color"},onPrimaryContainer:{$value:"#f5dfd4",$type:"color"},onError:{$value:"#2a1410",$type:"color"},errorContainer:{$value:"#52271f",$type:"color"},onErrorContainer:{$value:"#f1cec5",$type:"color"},tertiary:{$value:"#9bb56b",$type:"color"},onTertiary:{$value:"#1c2412",$type:"color"},tertiaryContainer:{$value:"#34461e",$type:"color"},onTertiaryContainer:{$value:"#e3ecd0",$type:"color"}},font:cr.font,spacing:cr.spacing,shape:cr.shape,motion:cr.motion,canvas:{mode:{$value:"none",$type:"string"},speed:{$value:0,$type:"number"},colors:{$value:[],$type:"array"},background:{$value:"#1a1917",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#d6896c"}}},zIndex:sa},Oz={light:Mz,dark:Rz},ur={font:{family:{sans:{$value:'"Inter Variable", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',$type:"fontFamily"},mono:{$value:'"JetBrains Mono", "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',$type:"fontFamily"}},size:{sm:{$value:"0.8125rem",$type:"dimension"},base:{$value:"0.9375rem",$type:"dimension"},lg:{$value:"1.0625rem",$type:"dimension"},xl:{$value:"1.3125rem",$type:"dimension"},"2xl":{$value:"1.75rem",$type:"dimension"}},weight:{normal:{$value:"400",$type:"fontWeight"},medium:{$value:"500",$type:"fontWeight"},semibold:{$value:"600",$type:"fontWeight"},bold:{$value:"680",$type:"fontWeight"}},lineHeight:{tight:{$value:"1.1",$type:"number"},normal:{$value:"1.55",$type:"number"},relaxed:{$value:"1.7",$type:"number"}}},spacing:{1:{$value:"0.25rem",$type:"dimension"},2:{$value:"0.5rem",$type:"dimension"},3:{$value:"0.75rem",$type:"dimension"},4:{$value:"1rem",$type:"dimension"},5:{$value:"1.25rem",$type:"dimension"},6:{$value:"1.5rem",$type:"dimension"},8:{$value:"2rem",$type:"dimension"},10:{$value:"2.5rem",$type:"dimension"},12:{$value:"3rem",$type:"dimension"},xs:{$value:"0.25rem",$type:"dimension"},sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"1rem",$type:"dimension"},lg:{$value:"1.5rem",$type:"dimension"},xl:{$value:"2rem",$type:"dimension"},"2xl":{$value:"3rem",$type:"dimension"}},shape:{radius:{sm:{$value:"0.5rem",$type:"dimension"},md:{$value:"0.875rem",$type:"dimension"},lg:{$value:"1.125rem",$type:"dimension"},xl:{$value:"1.5rem",$type:"dimension"},full:{$value:"9999px",$type:"dimension"}},shadow:{sm:{$value:"0 1px 2px color-mix(in srgb, var(--ggui-color-primary-500) 6%, transparent)",$type:"shadow"},md:{$value:"0 1px 3px rgba(21, 19, 31, 0.06), 0 8px 24px -6px color-mix(in srgb, var(--ggui-color-primary-500) 16%, transparent)",$type:"shadow"},lg:{$value:"0 2px 6px rgba(21, 19, 31, 0.05), 0 20px 40px -10px color-mix(in srgb, var(--ggui-color-primary-500) 22%, transparent)",$type:"shadow"},xl:{$value:"0 4px 10px rgba(21, 19, 31, 0.04), 0 32px 64px -16px color-mix(in srgb, var(--ggui-color-primary-500) 28%, transparent)",$type:"shadow"}}},motion:{duration:{fast:{$value:"150ms",$type:"duration"},normal:{$value:"250ms",$type:"duration"},slow:{$value:"420ms",$type:"duration"},ambient:{$value:"8000ms",$type:"duration"}},easing:{default:{$value:"cubic-bezier(0.32, 0.72, 0, 1)",$type:"cubicBezier"},spring:{$value:"cubic-bezier(0.16, 1, 0.3, 1)",$type:"cubicBezier"}},keyframes:{entrance:{$value:"0%{opacity:0;transform:translateY(6px)}100%{opacity:1;transform:none}",$type:"keyframes"}},transition:Oc}},Az={50:{$value:"#eef2ff",$type:"color"},100:{$value:"#e0e7ff",$type:"color"},200:{$value:"#c7d2fe",$type:"color"},300:{$value:"#a5b4fc",$type:"color"},400:{$value:"#818cf8",$type:"color"},500:{$value:"#4f46e5",$type:"color"},600:{$value:"#4338ca",$type:"color"},700:{$value:"#3730a3",$type:"color"},800:{$value:"#312e81",$type:"color"},900:{$value:"#1e1b4b",$type:"color"}},Dz={$name:"Indigo",$description:"Flagship ggui preset — refined electric indigo on a quiet paper surface. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{...Az},neutral:{50:{$value:"#fafaf7",$type:"color"},100:{$value:"#f4f4f0",$type:"color"},200:{$value:"#e8e7e3",$type:"color"},300:{$value:"#d4d3cf",$type:"color"},400:{$value:"#9c9ba0",$type:"color"},500:{$value:"#6e6d74",$type:"color"},600:{$value:"#4a4954",$type:"color"},700:{$value:"#322f3e",$type:"color"},800:{$value:"#211f2c",$type:"color"},900:{$value:"#15131f",$type:"color"}},success:{50:{$value:"#ecfdf5",$type:"color"},100:{$value:"#d1fae5",$type:"color"},200:{$value:"#a7f3d0",$type:"color"},500:{$value:"#0e9d6e",$type:"color"},600:{$value:"#0b8259",$type:"color"},700:{$value:"#086847",$type:"color"},800:{$value:"#064e36",$type:"color"}},warning:{50:{$value:"#fff8eb",$type:"color"},100:{$value:"#fdecc8",$type:"color"},200:{$value:"#fbd897",$type:"color"},500:{$value:"#e08515",$type:"color"},600:{$value:"#b86b0e",$type:"color"},700:{$value:"#90530a",$type:"color"},800:{$value:"#6b3d07",$type:"color"}},error:{50:{$value:"#fef2f4",$type:"color"},100:{$value:"#fde2e7",$type:"color"},200:{$value:"#fbc5cf",$type:"color"},500:{$value:"#dc2845",$type:"color"},600:{$value:"#b81f38",$type:"color"},700:{$value:"#94182d",$type:"color"},800:{$value:"#701222",$type:"color"}},info:{50:{$value:"#ecfeff",$type:"color"},100:{$value:"#cffafe",$type:"color"},200:{$value:"#a5f3fc",$type:"color"},500:{$value:"#0891b2",$type:"color"},600:{$value:"#0e7490",$type:"color"},700:{$value:"#155e75",$type:"color"},800:{$value:"#164e63",$type:"color"}},surface:{$value:"#fafaf7",$type:"color"},onSurface:{$value:"#15131f",$type:"color"},surfaceVariant:{$value:"#f4f4f0",$type:"color"},onSurfaceVariant:{$value:"#4a4954",$type:"color"},container:{$value:"#eef2ff",$type:"color"},onContainer:{$value:"#1e1b4b",$type:"color"},outline:{$value:"#d4d3cf",$type:"color"},outlineVariant:{$value:"#e8e7e3",$type:"color"},onPrimary:{$value:"#fafaf7",$type:"color"},primaryContainer:{$value:"#eef2ff",$type:"color"},onPrimaryContainer:{$value:"#1e1b4b",$type:"color"},onError:{$value:"#fafaf7",$type:"color"},errorContainer:{$value:"#fde2e7",$type:"color"},onErrorContainer:{$value:"#701222",$type:"color"},tertiary:{$value:"#7c3aed",$type:"color"},onTertiary:{$value:"#fafaf7",$type:"color"},tertiaryContainer:{$value:"#ede9fe",$type:"color"},onTertiaryContainer:{$value:"#4c1d95",$type:"color"}},font:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.5,$type:"number"},colors:{$value:["#eef2ff","#fafaf7","#e0e7ff"],$type:"array"},background:{$value:"#fafaf7",$type:"color"}},accessibility:{...Xe.light,focusRing:{...Xe.light.focusRing,color:{$type:"color",$value:"#4f46e5"}}},zIndex:sa},Iz={$name:"Indigo",$description:"Flagship ggui preset (dark) — refined electric indigo on rich midnight. Premium, restrained, distinctive.",$metadata:{font:"inter",philosophy:"Looks like a deliberate aesthetic choice. Linear/Arc/Vercel-grade restraint with one confident accent."},color:{primary:{50:{$value:"#1e1b4b",$type:"color"},100:{$value:"#312e81",$type:"color"},200:{$value:"#3730a3",$type:"color"},300:{$value:"#4338ca",$type:"color"},400:{$value:"#4f46e5",$type:"color"},500:{$value:"#818cf8",$type:"color"},600:{$value:"#a5b4fc",$type:"color"},700:{$value:"#c7d2fe",$type:"color"},800:{$value:"#e0e7ff",$type:"color"},900:{$value:"#eef2ff",$type:"color"}},neutral:{50:{$value:"#0c0b14",$type:"color"},100:{$value:"#15131f",$type:"color"},200:{$value:"#1d1b29",$type:"color"},300:{$value:"#2a2839",$type:"color"},400:{$value:"#3e3c50",$type:"color"},500:{$value:"#5e5c70",$type:"color"},600:{$value:"#8b8898",$type:"color"},700:{$value:"#b8b6c2",$type:"color"},800:{$value:"#dcdbe2",$type:"color"},900:{$value:"#f5f4f9",$type:"color"}},success:{50:{$value:"#022c1d",$type:"color"},100:{$value:"#064e36",$type:"color"},200:{$value:"#086847",$type:"color"},500:{$value:"#34d399",$type:"color"},600:{$value:"#6ee7b7",$type:"color"},700:{$value:"#a7f3d0",$type:"color"},800:{$value:"#d1fae5",$type:"color"}},warning:{50:{$value:"#3a2104",$type:"color"},100:{$value:"#6b3d07",$type:"color"},200:{$value:"#90530a",$type:"color"},500:{$value:"#f59e0b",$type:"color"},600:{$value:"#fbbf24",$type:"color"},700:{$value:"#fcd34d",$type:"color"},800:{$value:"#fde68a",$type:"color"}},error:{50:{$value:"#3b0a14",$type:"color"},100:{$value:"#701222",$type:"color"},200:{$value:"#94182d",$type:"color"},500:{$value:"#fb7185",$type:"color"},600:{$value:"#fda4af",$type:"color"},700:{$value:"#fecdd3",$type:"color"},800:{$value:"#ffe4e6",$type:"color"}},info:{50:{$value:"#083344",$type:"color"},100:{$value:"#164e63",$type:"color"},200:{$value:"#155e75",$type:"color"},500:{$value:"#22d3ee",$type:"color"},600:{$value:"#67e8f9",$type:"color"},700:{$value:"#a5f3fc",$type:"color"},800:{$value:"#cffafe",$type:"color"}},surface:{$value:"#15131f",$type:"color"},onSurface:{$value:"#f5f4f9",$type:"color"},surfaceVariant:{$value:"#221e35",$type:"color"},onSurfaceVariant:{$value:"#c8c6d2",$type:"color"},container:{$value:"#312e81",$type:"color"},onContainer:{$value:"#eef2ff",$type:"color"},outline:{$value:"#3e3c50",$type:"color"},outlineVariant:{$value:"#2a2839",$type:"color"},onPrimary:{$value:"#0c0b14",$type:"color"},primaryContainer:{$value:"#312e81",$type:"color"},onPrimaryContainer:{$value:"#e0e7ff",$type:"color"},onError:{$value:"#3b0a14",$type:"color"},errorContainer:{$value:"#701222",$type:"color"},onErrorContainer:{$value:"#fecdd3",$type:"color"},tertiary:{$value:"#a78bfa",$type:"color"},onTertiary:{$value:"#2e1065",$type:"color"},tertiaryContainer:{$value:"#4c1d95",$type:"color"},onTertiaryContainer:{$value:"#ede9fe",$type:"color"}},font:ur.font,spacing:ur.spacing,shape:ur.shape,motion:ur.motion,canvas:{mode:{$value:"mesh",$type:"string"},speed:{$value:.5,$type:"number"},colors:{$value:["#1e1b4b","#0c0b14","#312e81"],$type:"array"},background:{$value:"#0c0b14",$type:"color"}},accessibility:{...Xe.dark,focusRing:{...Xe.dark.focusRing,color:{$type:"color",$value:"#818cf8"}}},zIndex:sa},Uz={light:Dz,dark:Iz},u$=new Map([["ggui",yz],["indigo",Uz],["claudic",Oz],["premium-cyberpunk",bz],["premium-zen",_z],["premium-neon-noir",kz],["premium-botanical",Cz]]);function Lz(e,n){return n==="dark"&&e.dark?"dark":"light"}function d$(e,n="light"){const i=u$.get(e);return i?Lz(i,n)==="dark"?i.dark:i.light:void 0}function Vz(){const e=[];for(const[n,i]of u$){const s=i.dark?["light","dark"]:["light"];e.push({id:n,name:i.light.$name,description:i.light.$description,metadata:i.light.$metadata,modes:s})}return e}O.createContext(null);function Hz(e,n){return e===null?{presetId:n,mode:"light",fromFile:!1,overrides:{}}:typeof e=="string"?{presetId:e,mode:"light",fromFile:!1,overrides:{}}:"file"in e?{presetId:n,mode:e.mode??"light",fromFile:!0,overrides:{}}:{presetId:e.preset,mode:e.mode??"light",fromFile:!1,overrides:e.overrides??{}}}function Bz(e,n,i){const s=Object.keys(i);if(s.length===0)return{preset:e,mode:n};s.sort();const c={};for(const u of s)c[u]=i[u];return{preset:e,mode:n,overrides:c}}function qz(){var x;const e=O.useMemo(()=>Vz(),[]),n=((x=e[0])==null?void 0:x.id)??"ggui",[i,s]=O.useState({kind:"loading"}),[c,u]=O.useState(n),[d,p]=O.useState("light"),[g,h]=O.useState(!1),[y,v]=O.useState(null),[j,k]=O.useState(!1),[b,C]=O.useState({}),z=async()=>{s(_=>_.kind==="ready"?_:{kind:"loading"});try{const _=await fetch("/ggui/console/theme",{credentials:"include",headers:{accept:"application/json"}});if(_.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(!_.ok){s({kind:"error",message:`server returned ${_.status}`});return}const T=await _.json();s({kind:"ready",data:T});const A=Hz(T.current,n);u(A.presetId),p(A.mode),k(A.fromFile),C({...A.overrides})}catch(_){s({kind:"error",message:String(_)})}};O.useEffect(()=>{z()},[]);const N=(_,T)=>{C(A=>{const I={...A};return T===null||T===""?delete I[_]:I[_]=T,I})},$=()=>{C({})},w=async _=>{if(i.kind==="ready"){v(null),h(!0);try{const T=await _.text();let A;try{A=JSON.parse(T)}catch(J){v(`upload failed — file is not valid JSON: ${String(J)}`);return}const I=_.name.replace(/[^a-zA-Z0-9._-]/g,"-"),P=/\.json$/i.test(I)?I:`${I}.json`,H=await fetch("/ggui/console/theme/upload",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify({filename:P,content:A,mode:d})});if(H.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(H.status===400){const J=await H.json();v(J.message??`upload rejected — ${J.error??"invalid_content"}: ${JSON.stringify(J.issue)}`);return}if(H.status===501){const J=await H.json();v(J.message??"Theme uploads need the CLI’s themeFileUploader — launch via `ggui serve`.");return}if(!H.ok){v(`upload failed — server returned ${H.status}`);return}await z()}catch(T){v(`upload failed — ${String(T)}`)}finally{h(!1)}}},R=async()=>{if(i.kind==="ready"){v(null),h(!0);try{const _=await fetch("/ggui/console/theme",{method:"POST",credentials:"include",headers:{"content-type":"application/json",accept:"application/json"},body:JSON.stringify(Bz(c,d,b))});if(_.status===401){Me(`/admin-login?next=${encodeURIComponent("/admin/theme")}`);return}if(_.status===501){const T=await _.json();v(T.message??"Theme writes need the CLI’s themeWriter — launch via `ggui serve`.");return}if(!_.ok){v(`save failed — server returned ${_.status}`);return}await z()}catch(_){v(`save failed — ${String(_)}`)}finally{h(!1)}}};return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"01 / theme",title:"Pick a theme for your generated UI.",mute:"Persists to ggui.json#theme. Affects every UI the LLM emits — not the console chrome you’re looking at.",intro:r.jsxs(r.Fragment,{children:["Each preset ships a complete DTCG token tree (color, type, spacing, motion). Light + dark variants are independent — presets that haven’t shipped a dark mode fall back to light on selection. The chosen theme writes to"," ",r.jsx("code",{className:"ggui-code",children:"ggui.json"})," and takes effect on the next generation."]})}),i.kind==="loading"?r.jsx("p",{className:"ggui-muted",style:{margin:0,padding:12},children:"Loading themes…"}):i.kind==="error"?r.jsxs("p",{className:"ggui-muted",style:{margin:0,padding:12},"data-ggui-theme-error":!0,children:["Couldn’t load theme state — ",i.message]}):r.jsx(Pz,{presets:e,selectedPresetId:c,mode:d,writerEnabled:i.data.writerEnabled,uploadEnabled:i.data.uploadEnabled??!1,fromFile:j,busy:g,err:y,overrides:b,onSelectPreset:u,onSelectMode:p,onSetOverride:N,onClearAllOverrides:$,onSave:()=>{R()},onUploadFile:_=>{w(_)}})]})}function Pz({presets:e,selectedPresetId:n,mode:i,writerEnabled:s,uploadEnabled:c,fromFile:u,busy:d,err:p,overrides:g,onSelectPreset:h,onSelectMode:y,onSetOverride:v,onClearAllOverrides:j,onSave:k,onUploadFile:b}){const C=e.find(w=>w.id===n),z=(C==null?void 0:C.modes.includes("dark"))??!1,N=i==="dark"&&!z?"light":i,$=d$(n,N);return r.jsxs("div",{"data-ggui-theme-layout":!0,style:{display:"flex",gap:16,alignItems:"flex-start"},children:[r.jsxs("aside",{"aria-label":"theme picker controls",style:{flex:"0 0 360px",minWidth:320,maxWidth:400,display:"flex",flexDirection:"column",gap:12,position:"sticky",top:16},children:[r.jsxs("div",{className:"ggui-stack__head",style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{className:"ggui-stack__num",children:"THM"}),r.jsx("span",{className:"ggui-stack__label",children:"mode"}),r.jsxs("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"light",onClick:()=>y("light"),...N==="light"?{"aria-pressed":!0}:{},style:N==="light"?{fontWeight:600}:void 0,children:"◐ Light"}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-mode":"dark",onClick:()=>y("dark"),disabled:!z,title:z?"Switch to dark variant":"This preset hasn’t shipped a dark variant yet",...N==="dark"?{"aria-pressed":!0}:{},style:N==="dark"?{fontWeight:600}:void 0,children:"◑ Dark"})]})]}),u?r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ Current selection is a file-form theme (",r.jsx("code",{className:"ggui-code",children:'{ file: "..." }'}),"). Saving a preset below will replace it."]}):null,s?null:r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["Read-only — launch via ",r.jsx("code",{className:"ggui-code",children:"ggui serve"})," ","to enable saves."]}),r.jsx("div",{"data-ggui-theme-grid":!0,style:{display:"flex",flexDirection:"column",gap:6},children:e.map(w=>r.jsx(Wz,{preset:w,selected:w.id===n,mode:N,onSelect:()=>h(w.id)},w.id))}),r.jsx("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",paddingTop:4,borderTop:"1px solid currentColor",marginTop:4,opacity:.95},children:r.jsxs("button",{type:"button",className:"ggui-btn","data-ggui-theme-save":!0,disabled:d||!s,onClick:k,style:{flex:1},children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),d?"saving…":"Save to ggui.json"]})}),r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:11,lineHeight:1.4},children:[r.jsx("code",{className:"ggui-code",children:n})," ","· ",r.jsx("code",{className:"ggui-code",children:N}),Object.keys(g).length>0?r.jsxs(r.Fragment,{children:[" ","· ",r.jsxs("code",{className:"ggui-code",children:["+",Object.keys(g).length," override",Object.keys(g).length===1?"":"s"]})]}):null,N!==i?r.jsxs(r.Fragment,{children:[" ","· requested ",r.jsx("code",{className:"ggui-code",children:i}),", fell back"]}):null]}),r.jsx(Fz,{uploadEnabled:c,busy:d,onUploadFile:b}),p?r.jsx("p",{className:"ggui-muted",style:{margin:0,color:"#c0392b",fontSize:12},"data-ggui-theme-error":!0,children:p}):null,$?r.jsx(Yz,{rawTheme:$,overrides:g,onSetOverride:v,onClearAll:j}):r.jsxs("p",{className:"ggui-muted",style:{margin:0,fontSize:12},children:["⚠ ",r.jsx("code",{className:"ggui-code",children:n})," isn’t registered on this build. Saving still writes the manifest; overrides require a recognised preset."]})]}),r.jsx("main",{"aria-label":"theme preview",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:12},children:$?r.jsx(Xz,{presetId:n,mode:N,rawTheme:$,overrides:g}):r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"preview unavailable"}),r.jsx("span",{className:"ggui-card__num",children:"PRV / 00"})]}),r.jsx("div",{className:"ggui-card__body",children:r.jsxs("p",{className:"ggui-muted",style:{margin:0},children:[r.jsx("code",{className:"ggui-code",children:n})," isn’t a registered preset on this build, so there’s no token tree to paint from. Pick another preset on the left."]})})]})})]})}function Zz(e){const n=u=>{const d=u.$value;return typeof d=="string"?d:JSON.stringify(d)},i=(u,d)=>Object.keys(d).sort((g,h)=>{const y=Number(g),v=Number(h);return Number.isFinite(y)&&Number.isFinite(v)?y-v:g.localeCompare(h)}).map(g=>({path:`${u}.${g}`,value:n(d[g])})),s=[];s.push({label:"Color · Primary",prefix:"color.primary",leaves:i("color.primary",e.color.primary)}),s.push({label:"Color · Neutral",prefix:"color.neutral",leaves:i("color.neutral",e.color.neutral)}),s.push({label:"Color · Success",prefix:"color.success",leaves:i("color.success",e.color.success)}),s.push({label:"Color · Warning",prefix:"color.warning",leaves:i("color.warning",e.color.warning)}),s.push({label:"Color · Error",prefix:"color.error",leaves:i("color.error",e.color.error)}),s.push({label:"Color · Info",prefix:"color.info",leaves:i("color.info",e.color.info)}),s.push({label:"Color · Roles",prefix:"color",leaves:[{path:"color.surface",value:n(e.color.surface)},{path:"color.onSurface",value:n(e.color.onSurface)},{path:"color.surfaceVariant",value:n(e.color.surfaceVariant)},{path:"color.onSurfaceVariant",value:n(e.color.onSurfaceVariant)},{path:"color.container",value:n(e.color.container)},{path:"color.onContainer",value:n(e.color.onContainer)},{path:"color.outline",value:n(e.color.outline)},{path:"color.outlineVariant",value:n(e.color.outlineVariant)}]}),s.push({label:"Shape · Radius",prefix:"shape.radius",leaves:i("shape.radius",e.shape.radius)}),s.push({label:"Shape · Shadow",prefix:"shape.shadow",leaves:i("shape.shadow",e.shape.shadow)});const c=[{path:"font.family.sans",value:n(e.font.family.sans)}];return e.font.family.mono&&c.push({path:"font.family.mono",value:n(e.font.family.mono)}),s.push({label:"Font · Family",prefix:"font.family",leaves:c}),s.push({label:"Font · Size",prefix:"font.size",leaves:i("font.size",e.font.size)}),s.push({label:"Font · Weight",prefix:"font.weight",leaves:i("font.weight",e.font.weight)}),s.push({label:"Spacing",prefix:"spacing",leaves:i("spacing",e.spacing)}),s.filter(u=>u.leaves.length>0)}const Gz="https://github.com/ggui-ai/ggui/blob/main/design/CUSTOM_THEMES.md";function Fz({uploadEnabled:e,busy:n,onUploadFile:i}){return r.jsxs("div",{"data-ggui-theme-custom-row":!0,style:{display:"flex",flexDirection:"column",gap:6,paddingTop:8,marginTop:4,borderTop:"1px dashed currentColor",opacity:.95},children:[e?r.jsxs("label",{className:"ggui-btn ggui-btn--ghost","data-ggui-theme-upload":!0,style:{display:"inline-flex",alignItems:"center",gap:8,cursor:n?"not-allowed":"pointer",justifyContent:"center"},children:[r.jsx("input",{type:"file",accept:".json,application/json",disabled:n,onChange:s=>{var u;const c=(u=s.target.files)==null?void 0:u[0];c!==void 0&&i(c),s.target.value=""},style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0}}),"↑ Upload theme.json"]}):null,r.jsx("a",{href:Gz,target:"_blank",rel:"noreferrer noopener","data-ggui-theme-docs":!0,className:"ggui-muted",style:{fontSize:11,textDecoration:"underline",textAlign:"center",opacity:.85},children:"Roll your own theme →"})]})}function Yz({rawTheme:e,overrides:n,onSetOverride:i,onClearAll:s}){const c=O.useMemo(()=>Zz(e),[e]),u=Object.keys(n).length;return r.jsxs("div",{"data-ggui-theme-overrides":!0,className:"ggui-stack",style:{marginTop:16},"aria-label":"theme token overrides",children:[r.jsxs("div",{className:"ggui-stack__head",children:[r.jsx("span",{className:"ggui-stack__num",children:"DTCG"}),r.jsx("span",{className:"ggui-stack__label",children:"overrides"}),r.jsxs("span",{className:"ggui-stack__count",children:[u," ",u===1?"override":"overrides"]}),u>0?r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-overrides-clear":!0,onClick:s,style:{marginLeft:"auto"},children:"Clear all"}):null]}),r.jsxs("p",{className:"ggui-muted",style:{margin:"8px 0",fontSize:12},children:["Tweak individual DTCG tokens on top of the selected preset. Each leaf shows the preset’s shipped ",r.jsx("code",{className:"ggui-code",children:"$value"}),"; type a CSS-valid replacement to override it. Per-leaf"," ",r.jsx("em",{children:"reset"})," clears that path; saving with no overrides writes the bare ",r.jsx("code",{className:"ggui-code",children:"{ preset, mode }"})," ","shape (no ",r.jsx("code",{className:"ggui-code",children:"overrides"})," field)."]}),c.map(d=>r.jsxs("details",{...d.prefix==="color.primary"?{open:!0}:{},style:{marginTop:8},children:[r.jsxs("summary",{style:{cursor:"pointer",padding:"6px 0",fontSize:13,fontWeight:500,userSelect:"none"},children:[d.label," ",r.jsxs("span",{className:"ggui-muted",style:{fontSize:11},children:["(",d.leaves.length,d.leaves.some(p=>p.path in n)?`, +${d.leaves.filter(p=>p.path in n).length} overridden`:"",")"]})]}),r.jsx("div",{style:{display:"grid",gap:6,gridTemplateColumns:"auto 1fr auto",padding:"8px 0 8px 12px",alignItems:"center",fontSize:12},children:d.leaves.map(p=>r.jsx(Kz,{path:p.path,presetValue:p.value,overrideValue:n[p.path]??null,onChange:i},p.path))})]},d.prefix))]})}function Kz({path:e,presetValue:n,overrideValue:i,onChange:s}){const c=i!==null,u=i??"";return r.jsxs("div",{"data-ggui-theme-override-leaf":e,style:{display:"contents"},children:[r.jsx("code",{className:"ggui-code",style:{fontSize:11,opacity:.85,padding:"2px 6px"},children:e}),r.jsx("input",{type:"text","data-ggui-theme-override-input":!0,value:u,placeholder:n,onChange:d=>{const p=d.target.value;s(e,p.length===0?null:p)},spellCheck:!1,autoComplete:"off",style:{fontSize:12,fontFamily:"var(--ggui-font-mono, ui-monospace, monospace)",padding:"4px 8px",border:"1px solid currentColor",borderRadius:4,background:"transparent",color:"inherit",opacity:c?1:.85,outline:c?"1px solid currentColor":"none"},"aria-label":`override ${e}`}),r.jsx("button",{type:"button",className:"ggui-btn ggui-btn--ghost","data-ggui-theme-override-reset":!0,onClick:()=>s(e,null),disabled:!c,style:{fontSize:11,padding:"2px 8px",opacity:c?1:.4,cursor:c?"pointer":"default"},title:c?"Reset this leaf to the preset value":"No override set on this leaf",children:"reset"})]})}function Wz({preset:e,selected:n,mode:i,onSelect:s}){var g;const c=e.modes.includes("dark"),u=d$(e.id,i),d=(g=u==null?void 0:u.color.primary["500"])==null?void 0:g.$value,p=u==null?void 0:u.color.surface.$value;return r.jsxs("button",{type:"button","data-ggui-theme-card":e.id,onClick:s,"aria-pressed":n,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 10px",textAlign:"left",cursor:"pointer",border:n?"2px solid currentColor":"1px solid currentColor",borderRadius:6,background:"transparent",color:"inherit",opacity:n?1:.85},children:[r.jsxs("span",{"aria-hidden":!0,style:{display:"inline-flex",flexShrink:0,width:28,height:28,borderRadius:4,overflow:"hidden",border:"1px solid currentColor"},children:[r.jsx("span",{style:{flex:1,background:d??"#ccc"}}),r.jsx("span",{style:{flex:1,background:p??"#fff"}})]}),r.jsxs("span",{style:{flex:1,minWidth:0},children:[r.jsx("span",{style:{display:"block",fontSize:13,fontWeight:n?600:500},children:e.name}),r.jsxs("span",{className:"ggui-muted",style:{display:"block",fontSize:11,opacity:.75},children:[e.id==="claudic"?"claude.ai · ":"",c?"Light · Dark":"Light only"]})]})]})}function f$(e,n){if(Object.keys(n).length===0)return e;const i=structuredClone(e);for(const[s,c]of Object.entries(n)){const u=s.split(".");let d=i,p=!0;for(let y=0;y<u.length-1;y+=1){const v=u[y];if(v===void 0){p=!1;break}const j=d[v];if(j==null||typeof j!="object"){p=!1;break}d=j}if(!p)continue;const g=u[u.length-1];if(g===void 0)continue;const h=d[g];h===null||typeof h!="object"||(h.$value=c)}return i}function Xz({presetId:e,mode:n,rawTheme:i,overrides:s}){const c=O.useMemo(()=>`ggui-theme-preview-${e}-${n}`,[e,n]),u=O.useMemo(()=>{const d=f$(i,s),p=gz(e,d);return`${p.cssVariables.replace(/^:root\s*\{/,`.${c} {`)}
|
|
196
|
-
${p.cssKeyframes}`},[i,s,e,c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{"data-ggui-theme-preview-style":c,children:u}),r.jsxs("div",{"data-ggui-theme-preview":!0,className:c,style:{background:"var(--ggui-color-surface)",color:"var(--ggui-color-onSurface)",fontFamily:"var(--ggui-font-family-sans)",padding:"var(--ggui-spacing-lg, 24px)",borderRadius:"var(--ggui-shape-radius-lg, 12px)",border:"1px solid var(--ggui-color-outline)",boxShadow:"var(--ggui-shape-shadow-md)",display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-lg, 24px)"},children:[r.jsx(Jz,{presetName:i.$name,mode:n}),r.jsx(Qz,{}),r.jsx(eC,{}),r.jsx(tC,{}),r.jsx(aC,{theme:i,overrides:s}),r.jsx(nC,{})]})]})}function Jz({presetName:e,mode:n}){return r.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12,flexWrap:"wrap",borderBottom:"1px solid var(--ggui-color-outlineVariant)",paddingBottom:"var(--ggui-spacing-md, 16px)"},children:[r.jsx("span",{style:{fontSize:"var(--ggui-font-size-2xl, 1.5rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),r.jsx("span",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)",fontFamily:"var(--ggui-font-family-mono)"},children:n})]})}function Qz(){return r.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[r.jsx("h3",{style:{margin:0,fontSize:"var(--ggui-font-size-xl, 1.25rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)",lineHeight:"var(--ggui-font-lineHeight-tight, 1.25)"},children:"Typography reads naturally"}),r.jsxs("p",{style:{margin:0,fontSize:"var(--ggui-font-size-base, 1rem)",lineHeight:"var(--ggui-font-lineHeight-normal, 1.5)"},children:["The body paragraph is what generated UIs use for prose. Inline"," ",r.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)",fontSize:"0.9em",background:"var(--ggui-color-surfaceVariant)",color:"var(--ggui-color-onSurfaceVariant)",padding:"0.1em 0.4em",borderRadius:"var(--ggui-shape-radius-sm, 4px)"},children:"code"})," ","and a"," ",r.jsx("a",{href:"#preview",style:{color:"var(--ggui-color-primary-600)",textDecorationColor:"var(--ggui-color-primary-400)"},onClick:e=>e.preventDefault(),children:"link"})," ","sit alongside."]}),r.jsx("p",{className:"ggui-muted",style:{margin:0,fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)"},children:"Caption text — softer contrast for secondary info."})]})}function eC(){return r.jsxs("section",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[r.jsx("button",{type:"button",onClick:e=>e.preventDefault(),style:{padding:"8px 16px",background:"var(--ggui-color-primary-500)",color:"var(--ggui-color-surface)",border:"none",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontFamily:"var(--ggui-font-family-sans)",fontSize:"var(--ggui-font-size-sm, 0.875rem)",fontWeight:"var(--ggui-font-weight-medium, 500)",cursor:"pointer",boxShadow:"var(--ggui-shape-shadow-sm)"},children:"Primary"}),r.jsx("button",{type:"button",onClick:e=>e.preventDefault(),style:{padding:"8px 16px",background:"transparent",color:"var(--ggui-color-primary-600)",border:"1px solid var(--ggui-color-primary-500)",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontFamily:"var(--ggui-font-family-sans)",fontSize:"var(--ggui-font-size-sm, 0.875rem)",fontWeight:"var(--ggui-font-weight-medium, 500)",cursor:"pointer"},children:"Outline"}),r.jsx("button",{type:"button",onClick:e=>e.preventDefault(),style:{padding:"8px 16px",background:"transparent",color:"var(--ggui-color-onSurfaceVariant)",border:"none",borderRadius:"var(--ggui-shape-radius-md, 8px)",fontFamily:"var(--ggui-font-family-sans)",fontSize:"var(--ggui-font-size-sm, 0.875rem)",cursor:"pointer"},children:"Ghost"})]})}function tC(){return r.jsxs("section",{style:{background:"var(--ggui-color-container)",color:"var(--ggui-color-onContainer)",padding:"var(--ggui-spacing-md, 16px)",borderRadius:"var(--ggui-shape-radius-lg, 12px)",boxShadow:"var(--ggui-shape-shadow-lg)",display:"flex",flexDirection:"column",gap:8},children:[r.jsx("strong",{style:{fontSize:"var(--ggui-font-size-lg, 1.125rem)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:"Container card"}),r.jsxs("span",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:["Painted with ",r.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.container"})," ","+ ",r.jsx("code",{style:{fontFamily:"var(--ggui-font-family-mono)"},children:"color.onContainer"})," ","— the role pair generated UIs reach for to highlight primary-tinted content."]}),r.jsx("input",{type:"text",defaultValue:"Form input — focus to see border",onChange:()=>{},style:{padding:"6px 10px",background:"var(--ggui-color-surface)",color:"var(--ggui-color-onSurface)",border:"1px solid var(--ggui-color-outline)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",fontFamily:"var(--ggui-font-family-sans)",fontSize:"var(--ggui-font-size-sm, 0.875rem)",outline:"none"}})]})}function aC({theme:e,overrides:n}){const i=O.useMemo(()=>f$(e,n),[e,n]),s=(c,u,d)=>{const p=Object.keys(u).sort((g,h)=>{{const y=Number(g),v=Number(h);if(Number.isFinite(y)&&Number.isFinite(v))return y-v}return g.localeCompare(h)});return r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r.jsx("span",{style:{width:64,fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)"},children:c}),r.jsx("div",{style:{display:"flex",flex:1,borderRadius:"var(--ggui-shape-radius-sm, 4px)",overflow:"hidden",border:"1px solid var(--ggui-color-outlineVariant)"},children:p.map(g=>{const h=u[g];return h?r.jsx("span",{title:`${c.toLowerCase()}.${g} · ${h.$value}`,style:{flex:1,height:24,background:h.$value}},g):null})})]})};return r.jsxs("section",{style:{display:"flex",flexDirection:"column",gap:8},children:[r.jsx("strong",{style:{fontSize:"var(--ggui-font-size-sm, 0.875rem)",color:"var(--ggui-color-onSurfaceVariant)",textTransform:"uppercase",letterSpacing:"0.06em"},children:"Color ramps"}),s("Primary",i.color.primary),s("Neutral",i.color.neutral)]})}function nC(){const e=(n,i)=>r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"var(--ggui-font-size-sm, 0.875rem)"},children:[r.jsx("span",{"aria-hidden":!0,style:{width:12,height:12,borderRadius:"50%",background:n,border:"1px solid var(--ggui-color-outline)"}}),r.jsx("span",{style:{color:"var(--ggui-color-onSurfaceVariant)"},children:i})]});return r.jsxs("section",{style:{display:"flex",gap:16,flexWrap:"wrap"},children:[e("var(--ggui-color-success)","success"),e("var(--ggui-color-warning)","warning"),e("var(--ggui-color-error)","error"),e("var(--ggui-color-info)","info")]})}const p$={kind:"admin-index"};function rC(){return typeof window>"u"?p$:Gb(window.location.pathname)}function iC(){return p$}function oC(){const e=O.useSyncExternalStore(Fb,rC,iC);return e.kind==="viewer"?r.jsx(Ot,{route:e,variant:"narrow",children:r.jsx(U7,{shortCode:e.shortCode})}):e.kind==="blueprint"?r.jsx(Ot,{route:e,variant:"narrow",children:r.jsx(B9,{blueprintId:e.blueprintId})}):e.kind==="admin-index"||e.kind==="admin-status"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(az,{})}):e.kind==="admin-sessions"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(X7,{})}):e.kind==="admin-blueprints"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(G9,{})}):e.kind==="admin-variants"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(hN,{})}):e.kind==="admin-variant-detail"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(uN,{contractHash:e.contractHash})}):e.kind==="admin-variant-generate"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(fN,{contractHash:e.contractHash})}):e.kind==="admin-config"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(_N,{})}):e.kind==="admin-tools"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(j7,{})}):e.kind==="admin-llm-keys"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(dx,{})}):e.kind==="admin-connector-keys"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(y7,{})}):e.kind==="admin-oauth-providers"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(mx,{})}):e.kind==="admin-clients"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(yN,{})}):e.kind==="admin-theme"?r.jsx(Ot,{route:e,variant:"admin",children:r.jsx(qz,{})}):e.kind==="admin-login"?r.jsx(Ot,{route:e,variant:"narrow",children:r.jsx(lx,{})}):kv(e)?r.jsx(Ot,{route:e,variant:"devtools",children:r.jsx(h7,{route:e})}):r.jsx(Ot,{route:e,variant:"narrow",children:r.jsx(sC,{pathname:e.pathname})})}function sC({pathname:e}){return r.jsxs("section",{className:"ggui-section",children:[r.jsx(tt,{num:"404 / not found",title:"Nothing lives here.",mute:"This is an operator-only server.",intro:r.jsxs(r.Fragment,{children:[r.jsx("code",{className:"ggui-code",children:e})," is not a route served by this console. The end-user pages were retired — ggui’s end-users see UI through their MCP host (claude.ai, Claude Desktop, Cursor), not through this server’s own surface."]})}),r.jsxs("div",{className:"ggui-card",children:[r.jsxs("div",{className:"ggui-card__head",children:[r.jsx("span",{className:"ggui-card__title",children:"routes"}),r.jsx("span",{className:"ggui-card__num",children:"RTE / 01"})]}),r.jsxs("div",{className:"ggui-card__body",children:[r.jsxs("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gap:10},children:[r.jsx("li",{children:r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/admin/status"),children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin"]})}),r.jsx("li",{children:r.jsxs("button",{type:"button",className:"ggui-btn ggui-btn--ghost",onClick:()=>Me("/admin-login"),children:[r.jsx("span",{className:"ggui-btn__dot","aria-hidden":!0}),"/ admin-login"]})})]}),r.jsxs("p",{className:"ggui-muted",children:["The ",r.jsx("code",{className:"ggui-code",children:"/s/<shortCode>"})," and"," ",r.jsx("code",{className:"ggui-code",children:"/preview/<blueprintId>"})," ","routes require a real id — paste a session shortCode from",r.jsx("code",{className:"ggui-code",children:"ggui_push"})," or a blueprint id registered in ",r.jsx("code",{className:"ggui-code",children:"ggui.json"}),"."]})]})]})]})}const g$=document.getElementById("root");if(!g$)throw new Error("console: #root element missing from index.html");Pb.createRoot(g$).render(r.jsx(O.StrictMode,{children:r.jsx(oC,{})}));export{as as g,Hb as r};
|