@bitovi/vybit 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overlay/dist/overlay.js +535 -211
- package/package.json +3 -1
- package/panel/dist/assets/DesignMode-CZvwfLMn.js +511 -0
- package/panel/dist/assets/index-BdUOBofL.css +1 -0
- package/panel/dist/assets/index-CzGpZV08.js +62 -0
- package/panel/dist/index.html +2 -2
- package/server/app.ts +64 -1
- package/server/index.ts +5 -1
- package/server/mcp-tools.ts +120 -14
- package/server/queue.ts +4 -0
- package/server/storybook.ts +110 -0
- package/server/websocket.ts +9 -0
- package/shared/types.ts +72 -3
- package/panel/dist/assets/DesignMode-DHfdZ_OH.js +0 -510
- package/panel/dist/assets/index-Bk7q5Yfb.css +0 -1
- package/panel/dist/assets/index-DwDMVGkn.js +0 -49
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
function _m(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _d={exports:{}},Ss={},Ld={exports:{}},le={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 Yo=Symbol.for("react.element"),Am=Symbol.for("react.portal"),Im=Symbol.for("react.fragment"),Om=Symbol.for("react.strict_mode"),Dm=Symbol.for("react.profiler"),zm=Symbol.for("react.provider"),Mm=Symbol.for("react.context"),$m=Symbol.for("react.forward_ref"),Km=Symbol.for("react.suspense"),Fm=Symbol.for("react.memo"),Wm=Symbol.for("react.lazy"),$u=Symbol.iterator;function Vm(e){return e===null||typeof e!="object"?null:(e=$u&&e[$u]||e["@@iterator"],typeof e=="function"?e:null)}var Ad={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Id=Object.assign,Od={};function Yr(e,t,n){this.props=e,this.context=t,this.refs=Od,this.updater=n||Ad}Yr.prototype.isReactComponent={};Yr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dd(){}Dd.prototype=Yr.prototype;function za(e,t,n){this.props=e,this.context=t,this.refs=Od,this.updater=n||Ad}var Ma=za.prototype=new Dd;Ma.constructor=za;Id(Ma,Yr.prototype);Ma.isPureReactComponent=!0;var Ku=Array.isArray,zd=Object.prototype.hasOwnProperty,$a={current:null},Md={key:!0,ref:!0,__self:!0,__source:!0};function $d(e,t,n){var r,o={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)zd.call(t,r)&&!Md.hasOwnProperty(r)&&(o[r]=t[r]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)o[r]===void 0&&(o[r]=i[r]);return{$$typeof:Yo,type:e,key:l,ref:s,props:o,_owner:$a.current}}function Hm(e,t){return{$$typeof:Yo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ka(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yo}function Bm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fu=/\/+/g;function Bs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Bm(""+e.key):t.toString(36)}function Sl(e,t,n,r,o){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Yo:case Am:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Bs(s,0):r,Ku(o)?(n="",e!=null&&(n=e.replace(Fu,"$&/")+"/"),Sl(o,t,n,"",function(c){return c})):o!=null&&(Ka(o)&&(o=Hm(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Fu,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Ku(e))for(var i=0;i<e.length;i++){l=e[i];var u=r+Bs(l,i);s+=Sl(l,t,n,u,o)}else if(u=Vm(e),typeof u=="function")for(e=u.call(e),i=0;!(l=e.next()).done;)l=l.value,u=r+Bs(l,i++),s+=Sl(l,t,n,u,o);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function rl(e,t,n){if(e==null)return e;var r=[],o=0;return Sl(e,r,"","",function(l){return t.call(n,l,o++)}),r}function Um(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},kl={transition:null},Gm={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:kl,ReactCurrentOwner:$a};function Kd(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:rl,forEach:function(e,t,n){rl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return rl(e,function(){t++}),t},toArray:function(e){return rl(e,function(t){return t})||[]},only:function(e){if(!Ka(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=Yr;le.Fragment=Im;le.Profiler=Dm;le.PureComponent=za;le.StrictMode=Om;le.Suspense=Km;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gm;le.act=Kd;le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Id({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=$a.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(u in t)zd.call(t,u)&&!Md.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&i!==void 0?i[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){i=Array(u);for(var c=0;c<u;c++)i[c]=arguments[c+2];r.children=i}return{$$typeof:Yo,type:e.type,key:o,ref:l,props:r,_owner:s}};le.createContext=function(e){return e={$$typeof:Mm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zm,_context:e},e.Consumer=e};le.createElement=$d;le.createFactory=function(e){var t=$d.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:$m,render:e}};le.isValidElement=Ka;le.lazy=function(e){return{$$typeof:Wm,_payload:{_status:-1,_result:e},_init:Um}};le.memo=function(e,t){return{$$typeof:Fm,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=kl.transition;kl.transition={};try{e()}finally{kl.transition=t}};le.unstable_act=Kd;le.useCallback=function(e,t){return qe.current.useCallback(e,t)};le.useContext=function(e){return qe.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};le.useEffect=function(e,t){return qe.current.useEffect(e,t)};le.useId=function(){return qe.current.useId()};le.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return qe.current.useMemo(e,t)};le.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};le.useRef=function(e){return qe.current.useRef(e)};le.useState=function(e){return qe.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return qe.current.useTransition()};le.version="18.3.1";Ld.exports=le;var b=Ld.exports;const Fd=Lm(b),Wd=_m({__proto__:null,default:Fd},[b]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its 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 Ym=b,Qm=Symbol.for("react.element"),Xm=Symbol.for("react.fragment"),Zm=Object.prototype.hasOwnProperty,Jm=Ym.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qm={key:!0,ref:!0,__self:!0,__source:!0};function Vd(e,t,n){var r,o={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Zm.call(t,r)&&!qm.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Qm,type:e,key:l,ref:s,props:o,_owner:Jm.current}}Ss.Fragment=Xm;Ss.jsx=Vd;Ss.jsxs=Vd;_d.exports=Ss;var a=_d.exports,Ai={},Hd={exports:{}},ft={},Bd={exports:{}},Ud={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its 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
|
-
*/(function(e){function t(N,L){var P=N.length;N.push(L);e:for(;0<P;){var U=P-1>>>1,X=N[U];if(0<o(X,L))N[U]=L,N[P]=X,P=U;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var L=N[0],P=N.pop();if(P!==L){N[0]=P;e:for(var U=0,X=N.length,Qe=X>>>1;U<Qe;){var $e=2*(U+1)-1,je=N[$e],ae=$e+1,Re=N[ae];if(0>o(je,P))ae<X&&0>o(Re,je)?(N[U]=Re,N[ae]=P,U=ae):(N[U]=je,N[$e]=P,U=$e);else if(ae<X&&0>o(Re,P))N[U]=Re,N[ae]=P,U=ae;else break e}}return L}function o(N,L){var P=N.sortIndex-L.sortIndex;return P!==0?P:N.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,i=s.now();e.unstable_now=function(){return s.now()-i}}var u=[],c=[],d=1,p=null,f=3,g=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(N){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=N)r(c),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(c)}}function x(N){if(w=!1,y(N),!v)if(n(u)!==null)v=!0,W(j);else{var L=n(c);L!==null&&oe(x,L.startTime-N)}}function j(N,L){v=!1,w&&(w=!1,m(T),T=-1),g=!0;var P=f;try{for(y(L),p=n(u);p!==null&&(!(p.expirationTime>L)||N&&!F());){var U=p.callback;if(typeof U=="function"){p.callback=null,f=p.priorityLevel;var X=U(p.expirationTime<=L);L=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(u)&&r(u),y(L)}else r(u);p=n(u)}if(p!==null)var Qe=!0;else{var $e=n(c);$e!==null&&oe(x,$e.startTime-L),Qe=!1}return Qe}finally{p=null,f=P,g=!1}}var k=!1,C=null,T=-1,$=5,_=-1;function F(){return!(e.unstable_now()-_<$)}function z(){if(C!==null){var N=e.unstable_now();_=N;var L=!0;try{L=C(!0,N)}finally{L?R():(k=!1,C=null)}}else k=!1}var R;if(typeof h=="function")R=function(){h(z)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,q=I.port2;I.port1.onmessage=z,R=function(){q.postMessage(null)}}else R=function(){S(z,0)};function W(N){C=N,k||(k=!0,R())}function oe(N,L){T=S(function(){N(e.unstable_now())},L)}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(N){N.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,W(j))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var P=f;f=L;try{return N()}finally{f=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,L){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var P=f;f=N;try{return L()}finally{f=P}},e.unstable_scheduleCallback=function(N,L,P){var U=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?U+P:U):P=U,N){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=P+X,N={id:d++,callback:L,priorityLevel:N,startTime:P,expirationTime:X,sortIndex:-1},P>U?(N.sortIndex=P,t(c,N),n(u)===null&&N===n(c)&&(w?(m(T),T=-1):w=!0,oe(x,P-U))):(N.sortIndex=X,t(u,N),v||g||(v=!0,W(j))),N},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(N){var L=f;return function(){var P=f;f=L;try{return N.apply(this,arguments)}finally{f=P}}}})(Ud);Bd.exports=Ud;var eh=Bd.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its 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 th=b,dt=eh;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gd=new Set,Ro={};function ar(e,t){$r(e,t),$r(e+"Capture",t)}function $r(e,t){for(Ro[e]=t,e=0;e<t.length;e++)Gd.add(t[e])}var nn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ii=Object.prototype.hasOwnProperty,nh=/^[: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]*$/,Wu={},Vu={};function rh(e){return Ii.call(Vu,e)?!0:Ii.call(Wu,e)?!1:nh.test(e)?Vu[e]=!0:(Wu[e]=!0,!1)}function oh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lh(e,t,n,r){if(t===null||typeof t>"u"||oh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fa=/[\-:]([a-z])/g;function Wa(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fa,Wa);Ve[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fa,Wa);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fa,Wa);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Va(e,t,n,r){var o=Ve.hasOwnProperty(t)?Ve[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(lh(t,n,o,r)&&(n=null),r||o===null?rh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mn=th.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ol=Symbol.for("react.element"),yr=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),Ha=Symbol.for("react.strict_mode"),Oi=Symbol.for("react.profiler"),Yd=Symbol.for("react.provider"),Qd=Symbol.for("react.context"),Ba=Symbol.for("react.forward_ref"),Di=Symbol.for("react.suspense"),zi=Symbol.for("react.suspense_list"),Ua=Symbol.for("react.memo"),yn=Symbol.for("react.lazy"),Xd=Symbol.for("react.offscreen"),Hu=Symbol.iterator;function lo(e){return e===null||typeof e!="object"?null:(e=Hu&&e[Hu]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Us;function ho(e){if(Us===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Us=t&&t[1]||""}return`
|
|
34
|
-
`+Us+e}var Gs=!1;function Ys(e,t){if(!e||Gs)return"";Gs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
|
|
35
|
-
`),l=r.stack.split(`
|
|
36
|
-
`),s=o.length-1,i=l.length-1;1<=s&&0<=i&&o[s]!==l[i];)i--;for(;1<=s&&0<=i;s--,i--)if(o[s]!==l[i]){if(s!==1||i!==1)do if(s--,i--,0>i||o[s]!==l[i]){var u=`
|
|
37
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=i);break}}}finally{Gs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ho(e):""}function sh(e){switch(e.tag){case 5:return ho(e.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return e=Ys(e.type,!1),e;case 11:return e=Ys(e.type.render,!1),e;case 1:return e=Ys(e.type,!0),e;default:return""}}function Mi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case vr:return"Fragment";case yr:return"Portal";case Oi:return"Profiler";case Ha:return"StrictMode";case Di:return"Suspense";case zi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qd:return(e.displayName||"Context")+".Consumer";case Yd:return(e._context.displayName||"Context")+".Provider";case Ba:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ua:return t=e.displayName||null,t!==null?t:Mi(e.type)||"Memo";case yn:t=e._payload,e=e._init;try{return Mi(e(t))}catch{}}return null}function ih(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mi(t);case 8:return t===Ha?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function An(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ah(e){var t=Zd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ll(e){e._valueTracker||(e._valueTracker=ah(e))}function Jd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $i(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=An(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qd(e,t){t=t.checked,t!=null&&Va(e,"checked",t,!1)}function Ki(e,t){qd(e,t);var n=An(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fi(e,t.type,An(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fi(e,t,n){(t!=="number"||Fl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var go=Array.isArray;function _r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+An(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Wi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(go(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:An(n)}}function ef(e,t){var n=An(t.value),r=An(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Yu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tf(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sl,nf=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(sl=sl||document.createElement("div"),sl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=sl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Po(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},uh=["Webkit","ms","Moz","O"];Object.keys(wo).forEach(function(e){uh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wo[t]=wo[e]})});function rf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wo.hasOwnProperty(e)&&wo[e]?(""+t).trim():t+"px"}function of(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=rf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ch=Se({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Hi(e,t){if(t){if(ch[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function Bi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ui=null;function Ga(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gi=null,Lr=null,Ar=null;function Qu(e){if(e=Zo(e)){if(typeof Gi!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Ts(t),Gi(e.stateNode,e.type,t))}}function lf(e){Lr?Ar?Ar.push(e):Ar=[e]:Lr=e}function sf(){if(Lr){var e=Lr,t=Ar;if(Ar=Lr=null,Qu(e),t)for(e=0;e<t.length;e++)Qu(t[e])}}function af(e,t){return e(t)}function uf(){}var Qs=!1;function cf(e,t,n){if(Qs)return e(t,n);Qs=!0;try{return af(e,t,n)}finally{Qs=!1,(Lr!==null||Ar!==null)&&(uf(),sf())}}function _o(e,t){var n=e.stateNode;if(n===null)return null;var r=Ts(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var Yi=!1;if(nn)try{var so={};Object.defineProperty(so,"passive",{get:function(){Yi=!0}}),window.addEventListener("test",so,so),window.removeEventListener("test",so,so)}catch{Yi=!1}function dh(e,t,n,r,o,l,s,i,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var bo=!1,Wl=null,Vl=!1,Qi=null,fh={onError:function(e){bo=!0,Wl=e}};function ph(e,t,n,r,o,l,s,i,u){bo=!1,Wl=null,dh.apply(fh,arguments)}function mh(e,t,n,r,o,l,s,i,u){if(ph.apply(this,arguments),bo){if(bo){var c=Wl;bo=!1,Wl=null}else throw Error(O(198));Vl||(Vl=!0,Qi=c)}}function ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function df(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Xu(e){if(ur(e)!==e)throw Error(O(188))}function hh(e){var t=e.alternate;if(!t){if(t=ur(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return Xu(o),e;if(l===r)return Xu(o),t;l=l.sibling}throw Error(O(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,i=o.child;i;){if(i===n){s=!0,n=o,r=l;break}if(i===r){s=!0,r=o,n=l;break}i=i.sibling}if(!s){for(i=l.child;i;){if(i===n){s=!0,n=l,r=o;break}if(i===r){s=!0,r=l,n=o;break}i=i.sibling}if(!s)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function ff(e){return e=hh(e),e!==null?pf(e):null}function pf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pf(e);if(t!==null)return t;e=e.sibling}return null}var mf=dt.unstable_scheduleCallback,Zu=dt.unstable_cancelCallback,gh=dt.unstable_shouldYield,yh=dt.unstable_requestPaint,Te=dt.unstable_now,vh=dt.unstable_getCurrentPriorityLevel,Ya=dt.unstable_ImmediatePriority,hf=dt.unstable_UserBlockingPriority,Hl=dt.unstable_NormalPriority,xh=dt.unstable_LowPriority,gf=dt.unstable_IdlePriority,ks=null,At=null;function wh(e){if(At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(ks,e,void 0,(e.current.flags&128)===128)}catch{}}var Tt=Math.clz32?Math.clz32:kh,bh=Math.log,Sh=Math.LN2;function kh(e){return e>>>=0,e===0?32:31-(bh(e)/Sh|0)|0}var il=64,al=4194304;function yo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var i=s&~o;i!==0?r=yo(i):(l&=s,l!==0&&(r=yo(l)))}else s=n&~o,s!==0?r=yo(s):l!==0&&(r=yo(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tt(t),o=1<<n,r|=e[n],t&=~o;return r}function Ch(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Tt(l),i=1<<s,u=o[s];u===-1?(!(i&n)||i&r)&&(o[s]=Ch(i,t)):u<=t&&(e.expiredLanes|=i),l&=~i}}function Xi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yf(){var e=il;return il<<=1,!(il&4194240)&&(il=64),e}function Xs(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function Eh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Tt(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function Qa(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var de=0;function vf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xf,Xa,wf,bf,Sf,Zi=!1,ul=[],Cn=null,jn=null,En=null,Lo=new Map,Ao=new Map,wn=[],Th="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ju(e,t){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":En=null;break;case"pointerover":case"pointerout":Lo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ao.delete(t.pointerId)}}function io(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=Zo(t),t!==null&&Xa(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Nh(e,t,n,r,o){switch(t){case"focusin":return Cn=io(Cn,e,t,n,r,o),!0;case"dragenter":return jn=io(jn,e,t,n,r,o),!0;case"mouseover":return En=io(En,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Lo.set(l,io(Lo.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,Ao.set(l,io(Ao.get(l)||null,e,t,n,r,o)),!0}return!1}function kf(e){var t=Un(e.target);if(t!==null){var n=ur(t);if(n!==null){if(t=n.tag,t===13){if(t=df(n),t!==null){e.blockedOn=t,Sf(e.priority,function(){wf(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ji(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ui=r,n.target.dispatchEvent(r),Ui=null}else return t=Zo(n),t!==null&&Xa(t),e.blockedOn=n,!1;t.shift()}return!0}function qu(e,t,n){Cl(e)&&n.delete(t)}function Rh(){Zi=!1,Cn!==null&&Cl(Cn)&&(Cn=null),jn!==null&&Cl(jn)&&(jn=null),En!==null&&Cl(En)&&(En=null),Lo.forEach(qu),Ao.forEach(qu)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,Zi||(Zi=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,Rh)))}function Io(e){function t(o){return ao(o,e)}if(0<ul.length){ao(ul[0],e);for(var n=1;n<ul.length;n++){var r=ul[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Cn!==null&&ao(Cn,e),jn!==null&&ao(jn,e),En!==null&&ao(En,e),Lo.forEach(t),Ao.forEach(t),n=0;n<wn.length;n++)r=wn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<wn.length&&(n=wn[0],n.blockedOn===null);)kf(n),n.blockedOn===null&&wn.shift()}var Ir=mn.ReactCurrentBatchConfig,Ul=!0;function Ph(e,t,n,r){var o=de,l=Ir.transition;Ir.transition=null;try{de=1,Za(e,t,n,r)}finally{de=o,Ir.transition=l}}function _h(e,t,n,r){var o=de,l=Ir.transition;Ir.transition=null;try{de=4,Za(e,t,n,r)}finally{de=o,Ir.transition=l}}function Za(e,t,n,r){if(Ul){var o=Ji(e,t,n,r);if(o===null)si(e,t,r,Gl,n),Ju(e,r);else if(Nh(o,e,t,n,r))r.stopPropagation();else if(Ju(e,r),t&4&&-1<Th.indexOf(e)){for(;o!==null;){var l=Zo(o);if(l!==null&&xf(l),l=Ji(e,t,n,r),l===null&&si(e,t,r,Gl,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else si(e,t,r,null,n)}}var Gl=null;function Ji(e,t,n,r){if(Gl=null,e=Ga(r),e=Un(e),e!==null)if(t=ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=df(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gl=e,null}function Cf(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vh()){case Ya:return 1;case hf:return 4;case Hl:case xh:return 16;case gf:return 536870912;default:return 16}default:return 16}}var Sn=null,Ja=null,jl=null;function jf(){if(jl)return jl;var e,t=Ja,n=t.length,r,o="value"in Sn?Sn.value:Sn.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[l-r];r++);return jl=o.slice(e,1<r?1-r:void 0)}function El(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function cl(){return!0}function ec(){return!1}function pt(e){function t(n,r,o,l,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(l):l[i]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?cl:ec,this.isPropagationStopped=ec,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cl)},persist:function(){},isPersistent:cl}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qa=pt(Qr),Xo=Se({},Qr,{view:0,detail:0}),Lh=pt(Xo),Zs,Js,uo,Cs=Se({},Xo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==uo&&(uo&&e.type==="mousemove"?(Zs=e.screenX-uo.screenX,Js=e.screenY-uo.screenY):Js=Zs=0,uo=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Js}}),tc=pt(Cs),Ah=Se({},Cs,{dataTransfer:0}),Ih=pt(Ah),Oh=Se({},Xo,{relatedTarget:0}),qs=pt(Oh),Dh=Se({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),zh=pt(Dh),Mh=Se({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$h=pt(Mh),Kh=Se({},Qr,{data:0}),nc=pt(Kh),Fh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wh={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"},Vh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vh[e])?!!t[e]:!1}function eu(){return Hh}var Bh=Se({},Xo,{key:function(e){if(e.key){var t=Fh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=El(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eu,charCode:function(e){return e.type==="keypress"?El(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?El(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uh=pt(Bh),Gh=Se({},Cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rc=pt(Gh),Yh=Se({},Xo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eu}),Qh=pt(Yh),Xh=Se({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zh=pt(Xh),Jh=Se({},Cs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qh=pt(Jh),eg=[9,13,27,32],tu=nn&&"CompositionEvent"in window,So=null;nn&&"documentMode"in document&&(So=document.documentMode);var tg=nn&&"TextEvent"in window&&!So,Ef=nn&&(!tu||So&&8<So&&11>=So),oc=" ",lc=!1;function Tf(e,t){switch(e){case"keyup":return eg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xr=!1;function ng(e,t){switch(e){case"compositionend":return Nf(t);case"keypress":return t.which!==32?null:(lc=!0,oc);case"textInput":return e=t.data,e===oc&&lc?null:e;default:return null}}function rg(e,t){if(xr)return e==="compositionend"||!tu&&Tf(e,t)?(e=jf(),jl=Ja=Sn=null,xr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ef&&t.locale!=="ko"?null:t.data;default:return null}}var og={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 sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!og[e.type]:t==="textarea"}function Rf(e,t,n,r){lf(r),t=Yl(t,"onChange"),0<t.length&&(n=new qa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ko=null,Oo=null;function lg(e){Kf(e,0)}function js(e){var t=Sr(e);if(Jd(t))return e}function sg(e,t){if(e==="change")return t}var Pf=!1;if(nn){var ei;if(nn){var ti="oninput"in document;if(!ti){var ic=document.createElement("div");ic.setAttribute("oninput","return;"),ti=typeof ic.oninput=="function"}ei=ti}else ei=!1;Pf=ei&&(!document.documentMode||9<document.documentMode)}function ac(){ko&&(ko.detachEvent("onpropertychange",_f),Oo=ko=null)}function _f(e){if(e.propertyName==="value"&&js(Oo)){var t=[];Rf(t,Oo,e,Ga(e)),cf(lg,t)}}function ig(e,t,n){e==="focusin"?(ac(),ko=t,Oo=n,ko.attachEvent("onpropertychange",_f)):e==="focusout"&&ac()}function ag(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return js(Oo)}function ug(e,t){if(e==="click")return js(t)}function cg(e,t){if(e==="input"||e==="change")return js(t)}function dg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:dg;function Do(e,t){if(Rt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ii.call(t,o)||!Rt(e[o],t[o]))return!1}return!0}function uc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cc(e,t){var n=uc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uc(n)}}function Lf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Af(){for(var e=window,t=Fl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Fl(e.document)}return t}function nu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fg(e){var t=Af(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lf(n.ownerDocument.documentElement,n)){if(r!==null&&nu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=cc(n,l);var s=cc(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var pg=nn&&"documentMode"in document&&11>=document.documentMode,wr=null,qi=null,Co=null,ea=!1;function dc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ea||wr==null||wr!==Fl(r)||(r=wr,"selectionStart"in r&&nu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Co&&Do(Co,r)||(Co=r,r=Yl(qi,"onSelect"),0<r.length&&(t=new qa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}function dl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionend:dl("Transition","TransitionEnd")},ni={},If={};nn&&(If=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);function Es(e){if(ni[e])return ni[e];if(!br[e])return e;var t=br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in If)return ni[e]=t[n];return e}var Of=Es("animationend"),Df=Es("animationiteration"),zf=Es("animationstart"),Mf=Es("transitionend"),$f=new Map,fc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zn(e,t){$f.set(e,t),ar(t,[e])}for(var ri=0;ri<fc.length;ri++){var oi=fc[ri],mg=oi.toLowerCase(),hg=oi[0].toUpperCase()+oi.slice(1);zn(mg,"on"+hg)}zn(Of,"onAnimationEnd");zn(Df,"onAnimationIteration");zn(zf,"onAnimationStart");zn("dblclick","onDoubleClick");zn("focusin","onFocus");zn("focusout","onBlur");zn(Mf,"onTransitionEnd");$r("onMouseEnter",["mouseout","mouseover"]);$r("onMouseLeave",["mouseout","mouseover"]);$r("onPointerEnter",["pointerout","pointerover"]);$r("onPointerLeave",["pointerout","pointerover"]);ar("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ar("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ar("onBeforeInput",["compositionend","keypress","textInput","paste"]);ar("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ar("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ar("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vo="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(" "),gg=new Set("cancel close invalid load scroll toggle".split(" ").concat(vo));function pc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,mh(r,t,void 0,e),e.currentTarget=null}function Kf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var i=r[s],u=i.instance,c=i.currentTarget;if(i=i.listener,u!==l&&o.isPropagationStopped())break e;pc(o,i,c),l=u}else for(s=0;s<r.length;s++){if(i=r[s],u=i.instance,c=i.currentTarget,i=i.listener,u!==l&&o.isPropagationStopped())break e;pc(o,i,c),l=u}}}if(Vl)throw e=Qi,Vl=!1,Qi=null,e}function ge(e,t){var n=t[la];n===void 0&&(n=t[la]=new Set);var r=e+"__bubble";n.has(r)||(Ff(t,e,2,!1),n.add(r))}function li(e,t,n){var r=0;t&&(r|=4),Ff(n,e,r,t)}var fl="_reactListening"+Math.random().toString(36).slice(2);function zo(e){if(!e[fl]){e[fl]=!0,Gd.forEach(function(n){n!=="selectionchange"&&(gg.has(n)||li(n,!1,e),li(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fl]||(t[fl]=!0,li("selectionchange",!1,t))}}function Ff(e,t,n,r){switch(Cf(t)){case 1:var o=Ph;break;case 4:o=_h;break;default:o=Za}n=o.bind(null,t,n,e),o=void 0,!Yi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function si(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var i=r.stateNode.containerInfo;if(i===o||i.nodeType===8&&i.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;s=s.return}for(;i!==null;){if(s=Un(i),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}i=i.parentNode}}r=r.return}cf(function(){var c=l,d=Ga(n),p=[];e:{var f=$f.get(e);if(f!==void 0){var g=qa,v=e;switch(e){case"keypress":if(El(n)===0)break e;case"keydown":case"keyup":g=Uh;break;case"focusin":v="focus",g=qs;break;case"focusout":v="blur",g=qs;break;case"beforeblur":case"afterblur":g=qs;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=tc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Ih;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Qh;break;case Of:case Df:case zf:g=zh;break;case Mf:g=Zh;break;case"scroll":g=Lh;break;case"wheel":g=qh;break;case"copy":case"cut":case"paste":g=$h;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=rc}var w=(t&4)!==0,S=!w&&e==="scroll",m=w?f!==null?f+"Capture":null:f;w=[];for(var h=c,y;h!==null;){y=h;var x=y.stateNode;if(y.tag===5&&x!==null&&(y=x,m!==null&&(x=_o(h,m),x!=null&&w.push(Mo(h,x,y)))),S)break;h=h.return}0<w.length&&(f=new g(f,v,null,n,d),p.push({event:f,listeners:w}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",f&&n!==Ui&&(v=n.relatedTarget||n.fromElement)&&(Un(v)||v[rn]))break e;if((g||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=c,v=v?Un(v):null,v!==null&&(S=ur(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=c),g!==v)){if(w=tc,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(w=rc,x="onPointerLeave",m="onPointerEnter",h="pointer"),S=g==null?f:Sr(g),y=v==null?f:Sr(v),f=new w(x,h+"leave",g,n,d),f.target=S,f.relatedTarget=y,x=null,Un(d)===c&&(w=new w(m,h+"enter",v,n,d),w.target=y,w.relatedTarget=S,x=w),S=x,g&&v)t:{for(w=g,m=v,h=0,y=w;y;y=fr(y))h++;for(y=0,x=m;x;x=fr(x))y++;for(;0<h-y;)w=fr(w),h--;for(;0<y-h;)m=fr(m),y--;for(;h--;){if(w===m||m!==null&&w===m.alternate)break t;w=fr(w),m=fr(m)}w=null}else w=null;g!==null&&mc(p,f,g,w,!1),v!==null&&S!==null&&mc(p,S,v,w,!0)}}e:{if(f=c?Sr(c):window,g=f.nodeName&&f.nodeName.toLowerCase(),g==="select"||g==="input"&&f.type==="file")var j=sg;else if(sc(f))if(Pf)j=cg;else{j=ag;var k=ig}else(g=f.nodeName)&&g.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=ug);if(j&&(j=j(e,c))){Rf(p,j,n,d);break e}k&&k(e,f,c),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Fi(f,"number",f.value)}switch(k=c?Sr(c):window,e){case"focusin":(sc(k)||k.contentEditable==="true")&&(wr=k,qi=c,Co=null);break;case"focusout":Co=qi=wr=null;break;case"mousedown":ea=!0;break;case"contextmenu":case"mouseup":case"dragend":ea=!1,dc(p,n,d);break;case"selectionchange":if(pg)break;case"keydown":case"keyup":dc(p,n,d)}var C;if(tu)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else xr?Tf(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Ef&&n.locale!=="ko"&&(xr||T!=="onCompositionStart"?T==="onCompositionEnd"&&xr&&(C=jf()):(Sn=d,Ja="value"in Sn?Sn.value:Sn.textContent,xr=!0)),k=Yl(c,T),0<k.length&&(T=new nc(T,e,null,n,d),p.push({event:T,listeners:k}),C?T.data=C:(C=Nf(n),C!==null&&(T.data=C)))),(C=tg?ng(e,n):rg(e,n))&&(c=Yl(c,"onBeforeInput"),0<c.length&&(d=new nc("onBeforeInput","beforeinput",null,n,d),p.push({event:d,listeners:c}),d.data=C))}Kf(p,t)})}function Mo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=_o(e,n),l!=null&&r.unshift(Mo(e,l,o)),l=_o(e,t),l!=null&&r.push(Mo(e,l,o))),e=e.return}return r}function fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mc(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var i=n,u=i.alternate,c=i.stateNode;if(u!==null&&u===r)break;i.tag===5&&c!==null&&(i=c,o?(u=_o(n,l),u!=null&&s.unshift(Mo(n,u,i))):o||(u=_o(n,l),u!=null&&s.push(Mo(n,u,i)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var yg=/\r\n?/g,vg=/\u0000|\uFFFD/g;function hc(e){return(typeof e=="string"?e:""+e).replace(yg,`
|
|
38
|
-
`).replace(vg,"")}function pl(e,t,n){if(t=hc(t),hc(e)!==t&&n)throw Error(O(425))}function Ql(){}var ta=null,na=null;function ra(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oa=typeof setTimeout=="function"?setTimeout:void 0,xg=typeof clearTimeout=="function"?clearTimeout:void 0,gc=typeof Promise=="function"?Promise:void 0,wg=typeof queueMicrotask=="function"?queueMicrotask:typeof gc<"u"?function(e){return gc.resolve(null).then(e).catch(bg)}:oa;function bg(e){setTimeout(function(){throw e})}function ii(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Io(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Io(t)}function Tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function yc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Xr,$o="__reactProps$"+Xr,rn="__reactContainer$"+Xr,la="__reactEvents$"+Xr,Sg="__reactListeners$"+Xr,kg="__reactHandles$"+Xr;function Un(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rn]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yc(e);e!==null;){if(n=e[Lt])return n;e=yc(e)}return t}e=n,n=e.parentNode}return null}function Zo(e){return e=e[Lt]||e[rn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function Ts(e){return e[$o]||null}var sa=[],kr=-1;function Mn(e){return{current:e}}function ye(e){0>kr||(e.current=sa[kr],sa[kr]=null,kr--)}function pe(e,t){kr++,sa[kr]=e.current,e.current=t}var In={},Ye=Mn(In),rt=Mn(!1),qn=In;function Kr(e,t){var n=e.type.contextTypes;if(!n)return In;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ot(e){return e=e.childContextTypes,e!=null}function Xl(){ye(rt),ye(Ye)}function vc(e,t,n){if(Ye.current!==In)throw Error(O(168));pe(Ye,t),pe(rt,n)}function Wf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,ih(e)||"Unknown",o));return Se({},n,r)}function Zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||In,qn=Ye.current,pe(Ye,e),pe(rt,rt.current),!0}function xc(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Wf(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,ye(rt),ye(Ye),pe(Ye,e)):ye(rt),pe(rt,n)}var Yt=null,Ns=!1,ai=!1;function Vf(e){Yt===null?Yt=[e]:Yt.push(e)}function Cg(e){Ns=!0,Vf(e)}function $n(){if(!ai&&Yt!==null){ai=!0;var e=0,t=de;try{var n=Yt;for(de=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Yt=null,Ns=!1}catch(o){throw Yt!==null&&(Yt=Yt.slice(e+1)),mf(Ya,$n),o}finally{de=t,ai=!1}}return null}var Cr=[],jr=0,Jl=null,ql=0,ht=[],gt=0,er=null,Xt=1,Zt="";function Hn(e,t){Cr[jr++]=ql,Cr[jr++]=Jl,Jl=e,ql=t}function Hf(e,t,n){ht[gt++]=Xt,ht[gt++]=Zt,ht[gt++]=er,er=e;var r=Xt;e=Zt;var o=32-Tt(r)-1;r&=~(1<<o),n+=1;var l=32-Tt(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Xt=1<<32-Tt(t)+o|n<<o|r,Zt=l+e}else Xt=1<<l|n<<o|r,Zt=e}function ru(e){e.return!==null&&(Hn(e,1),Hf(e,1,0))}function ou(e){for(;e===Jl;)Jl=Cr[--jr],Cr[jr]=null,ql=Cr[--jr],Cr[jr]=null;for(;e===er;)er=ht[--gt],ht[gt]=null,Zt=ht[--gt],ht[gt]=null,Xt=ht[--gt],ht[gt]=null}var ut=null,at=null,ve=!1,Et=null;function Bf(e,t){var n=yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function wc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,at=Tn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,at=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=er!==null?{id:Xt,overflow:Zt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ut=e,at=null,!0):!1;default:return!1}}function ia(e){return(e.mode&1)!==0&&(e.flags&128)===0}function aa(e){if(ve){var t=at;if(t){var n=t;if(!wc(e,t)){if(ia(e))throw Error(O(418));t=Tn(n.nextSibling);var r=ut;t&&wc(e,t)?Bf(r,n):(e.flags=e.flags&-4097|2,ve=!1,ut=e)}}else{if(ia(e))throw Error(O(418));e.flags=e.flags&-4097|2,ve=!1,ut=e}}}function bc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function ml(e){if(e!==ut)return!1;if(!ve)return bc(e),ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ra(e.type,e.memoizedProps)),t&&(t=at)){if(ia(e))throw Uf(),Error(O(418));for(;t;)Bf(e,t),t=Tn(t.nextSibling)}if(bc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){at=Tn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}at=null}}else at=ut?Tn(e.stateNode.nextSibling):null;return!0}function Uf(){for(var e=at;e;)e=Tn(e.nextSibling)}function Fr(){at=ut=null,ve=!1}function lu(e){Et===null?Et=[e]:Et.push(e)}var jg=mn.ReactCurrentBatchConfig;function co(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var i=o.refs;s===null?delete i[l]:i[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function hl(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sc(e){var t=e._init;return t(e._payload)}function Gf(e){function t(m,h){if(e){var y=m.deletions;y===null?(m.deletions=[h],m.flags|=16):y.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function r(m,h){for(m=new Map;h!==null;)h.key!==null?m.set(h.key,h):m.set(h.index,h),h=h.sibling;return m}function o(m,h){return m=_n(m,h),m.index=0,m.sibling=null,m}function l(m,h,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<h?(m.flags|=2,h):y):(m.flags|=2,h)):(m.flags|=1048576,h)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function i(m,h,y,x){return h===null||h.tag!==6?(h=hi(y,m.mode,x),h.return=m,h):(h=o(h,y),h.return=m,h)}function u(m,h,y,x){var j=y.type;return j===vr?d(m,h,y.props.children,x,y.key):h!==null&&(h.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===yn&&Sc(j)===h.type)?(x=o(h,y.props),x.ref=co(m,h,y),x.return=m,x):(x=Al(y.type,y.key,y.props,null,m.mode,x),x.ref=co(m,h,y),x.return=m,x)}function c(m,h,y,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==y.containerInfo||h.stateNode.implementation!==y.implementation?(h=gi(y,m.mode,x),h.return=m,h):(h=o(h,y.children||[]),h.return=m,h)}function d(m,h,y,x,j){return h===null||h.tag!==7?(h=Zn(y,m.mode,x,j),h.return=m,h):(h=o(h,y),h.return=m,h)}function p(m,h,y){if(typeof h=="string"&&h!==""||typeof h=="number")return h=hi(""+h,m.mode,y),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case ol:return y=Al(h.type,h.key,h.props,null,m.mode,y),y.ref=co(m,null,h),y.return=m,y;case yr:return h=gi(h,m.mode,y),h.return=m,h;case yn:var x=h._init;return p(m,x(h._payload),y)}if(go(h)||lo(h))return h=Zn(h,m.mode,y,null),h.return=m,h;hl(m,h)}return null}function f(m,h,y,x){var j=h!==null?h.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return j!==null?null:i(m,h,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ol:return y.key===j?u(m,h,y,x):null;case yr:return y.key===j?c(m,h,y,x):null;case yn:return j=y._init,f(m,h,j(y._payload),x)}if(go(y)||lo(y))return j!==null?null:d(m,h,y,x,null);hl(m,y)}return null}function g(m,h,y,x,j){if(typeof x=="string"&&x!==""||typeof x=="number")return m=m.get(y)||null,i(h,m,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ol:return m=m.get(x.key===null?y:x.key)||null,u(h,m,x,j);case yr:return m=m.get(x.key===null?y:x.key)||null,c(h,m,x,j);case yn:var k=x._init;return g(m,h,y,k(x._payload),j)}if(go(x)||lo(x))return m=m.get(y)||null,d(h,m,x,j,null);hl(h,x)}return null}function v(m,h,y,x){for(var j=null,k=null,C=h,T=h=0,$=null;C!==null&&T<y.length;T++){C.index>T?($=C,C=null):$=C.sibling;var _=f(m,C,y[T],x);if(_===null){C===null&&(C=$);break}e&&C&&_.alternate===null&&t(m,C),h=l(_,h,T),k===null?j=_:k.sibling=_,k=_,C=$}if(T===y.length)return n(m,C),ve&&Hn(m,T),j;if(C===null){for(;T<y.length;T++)C=p(m,y[T],x),C!==null&&(h=l(C,h,T),k===null?j=C:k.sibling=C,k=C);return ve&&Hn(m,T),j}for(C=r(m,C);T<y.length;T++)$=g(C,m,T,y[T],x),$!==null&&(e&&$.alternate!==null&&C.delete($.key===null?T:$.key),h=l($,h,T),k===null?j=$:k.sibling=$,k=$);return e&&C.forEach(function(F){return t(m,F)}),ve&&Hn(m,T),j}function w(m,h,y,x){var j=lo(y);if(typeof j!="function")throw Error(O(150));if(y=j.call(y),y==null)throw Error(O(151));for(var k=j=null,C=h,T=h=0,$=null,_=y.next();C!==null&&!_.done;T++,_=y.next()){C.index>T?($=C,C=null):$=C.sibling;var F=f(m,C,_.value,x);if(F===null){C===null&&(C=$);break}e&&C&&F.alternate===null&&t(m,C),h=l(F,h,T),k===null?j=F:k.sibling=F,k=F,C=$}if(_.done)return n(m,C),ve&&Hn(m,T),j;if(C===null){for(;!_.done;T++,_=y.next())_=p(m,_.value,x),_!==null&&(h=l(_,h,T),k===null?j=_:k.sibling=_,k=_);return ve&&Hn(m,T),j}for(C=r(m,C);!_.done;T++,_=y.next())_=g(C,m,T,_.value,x),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?T:_.key),h=l(_,h,T),k===null?j=_:k.sibling=_,k=_);return e&&C.forEach(function(z){return t(m,z)}),ve&&Hn(m,T),j}function S(m,h,y,x){if(typeof y=="object"&&y!==null&&y.type===vr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ol:e:{for(var j=y.key,k=h;k!==null;){if(k.key===j){if(j=y.type,j===vr){if(k.tag===7){n(m,k.sibling),h=o(k,y.props.children),h.return=m,m=h;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===yn&&Sc(j)===k.type){n(m,k.sibling),h=o(k,y.props),h.ref=co(m,k,y),h.return=m,m=h;break e}n(m,k);break}else t(m,k);k=k.sibling}y.type===vr?(h=Zn(y.props.children,m.mode,x,y.key),h.return=m,m=h):(x=Al(y.type,y.key,y.props,null,m.mode,x),x.ref=co(m,h,y),x.return=m,m=x)}return s(m);case yr:e:{for(k=y.key;h!==null;){if(h.key===k)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){n(m,h.sibling),h=o(h,y.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=gi(y,m.mode,x),h.return=m,m=h}return s(m);case yn:return k=y._init,S(m,h,k(y._payload),x)}if(go(y))return v(m,h,y,x);if(lo(y))return w(m,h,y,x);hl(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(n(m,h.sibling),h=o(h,y),h.return=m,m=h):(n(m,h),h=hi(y,m.mode,x),h.return=m,m=h),s(m)):n(m,h)}return S}var Wr=Gf(!0),Yf=Gf(!1),es=Mn(null),ts=null,Er=null,su=null;function iu(){su=Er=ts=null}function au(e){var t=es.current;ye(es),e._currentValue=t}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){ts=e,su=Er=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nt=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(su!==e)if(e={context:e,memoizedValue:t,next:null},Er===null){if(ts===null)throw Error(O(308));Er=e,ts.dependencies={lanes:0,firstContext:e}}else Er=Er.next=e;return t}var Gn=null;function uu(e){Gn===null?Gn=[e]:Gn.push(e)}function Qf(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,uu(t)):(n.next=o.next,o.next=n),t.interleaved=n,on(e,r)}function on(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var vn=!1;function cu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Nn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ie&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,on(e,n)}return o=r.interleaved,o===null?(t.next=t,uu(r)):(t.next=o.next,o.next=t),r.interleaved=t,on(e,n)}function Tl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qa(e,n)}}function kc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ns(e,t,n,r){var o=e.updateQueue;vn=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,i=o.shared.pending;if(i!==null){o.shared.pending=null;var u=i,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var d=e.alternate;d!==null&&(d=d.updateQueue,i=d.lastBaseUpdate,i!==s&&(i===null?d.firstBaseUpdate=c:i.next=c,d.lastBaseUpdate=u))}if(l!==null){var p=o.baseState;s=0,d=c=u=null,i=l;do{var f=i.lane,g=i.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:g,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var v=e,w=i;switch(f=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){p=v.call(g,p,f);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,f=typeof v=="function"?v.call(g,p,f):v,f==null)break e;p=Se({},p,f);break e;case 2:vn=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[i]:f.push(i))}else g={eventTime:g,lane:f,tag:i.tag,payload:i.payload,callback:i.callback,next:null},d===null?(c=d=g,u=p):d=d.next=g,s|=f;if(i=i.next,i===null){if(i=o.shared.pending,i===null)break;f=i,i=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(u=p),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);nr|=s,e.lanes=s,e.memoizedState=p}}function Cc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(O(191,o));o.call(r)}}}var Jo={},It=Mn(Jo),Ko=Mn(Jo),Fo=Mn(Jo);function Yn(e){if(e===Jo)throw Error(O(174));return e}function du(e,t){switch(pe(Fo,t),pe(Ko,e),pe(It,Jo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vi(t,e)}ye(It),pe(It,t)}function Vr(){ye(It),ye(Ko),ye(Fo)}function Zf(e){Yn(Fo.current);var t=Yn(It.current),n=Vi(t,e.type);t!==n&&(pe(Ko,e),pe(It,n))}function fu(e){Ko.current===e&&(ye(It),ye(Ko))}var we=Mn(0);function rs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ui=[];function pu(){for(var e=0;e<ui.length;e++)ui[e]._workInProgressVersionPrimary=null;ui.length=0}var Nl=mn.ReactCurrentDispatcher,ci=mn.ReactCurrentBatchConfig,tr=0,be=null,Ae=null,ze=null,os=!1,jo=!1,Wo=0,Eg=0;function Be(){throw Error(O(321))}function mu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function hu(e,t,n,r,o,l){if(tr=l,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nl.current=e===null||e.memoizedState===null?Pg:_g,e=n(r,o),jo){l=0;do{if(jo=!1,Wo=0,25<=l)throw Error(O(301));l+=1,ze=Ae=null,t.updateQueue=null,Nl.current=Lg,e=n(r,o)}while(jo)}if(Nl.current=ls,t=Ae!==null&&Ae.next!==null,tr=0,ze=Ae=be=null,os=!1,t)throw Error(O(300));return e}function gu(){var e=Wo!==0;return Wo=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?be.memoizedState=ze=e:ze=ze.next=e,ze}function bt(){if(Ae===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=ze===null?be.memoizedState:ze.next;if(t!==null)ze=t,Ae=e;else{if(e===null)throw Error(O(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},ze===null?be.memoizedState=ze=e:ze=ze.next=e}return ze}function Vo(e,t){return typeof t=="function"?t(e):t}function di(e){var t=bt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Ae,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var s=o.next;o.next=l.next,l.next=s}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var i=s=null,u=null,c=l;do{var d=c.lane;if((tr&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var p={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(i=u=p,s=r):u=u.next=p,be.lanes|=d,nr|=d}c=c.next}while(c!==null&&c!==l);u===null?s=r:u.next=i,Rt(r,t.memoizedState)||(nt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,be.lanes|=l,nr|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function fi(e){var t=bt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do l=e(l,s.action),s=s.next;while(s!==o);Rt(l,t.memoizedState)||(nt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function Jf(){}function qf(e,t){var n=be,r=bt(),o=t(),l=!Rt(r.memoizedState,o);if(l&&(r.memoizedState=o,nt=!0),r=r.queue,yu(np.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,Ho(9,tp.bind(null,n,r,o,t),void 0,null),Me===null)throw Error(O(349));tr&30||ep(n,t,o)}return o}function ep(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function tp(e,t,n,r){t.value=n,t.getSnapshot=r,rp(t)&&op(e)}function np(e,t,n){return n(function(){rp(t)&&op(e)})}function rp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function op(e){var t=on(e,1);t!==null&&Nt(t,e,1,-1)}function jc(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t.queue=e,e=e.dispatch=Rg.bind(null,be,e),[t.memoizedState,e]}function Ho(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null,stores:null},be.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function lp(){return bt().memoizedState}function Rl(e,t,n,r){var o=_t();be.flags|=e,o.memoizedState=Ho(1|t,n,void 0,r===void 0?null:r)}function Rs(e,t,n,r){var o=bt();r=r===void 0?null:r;var l=void 0;if(Ae!==null){var s=Ae.memoizedState;if(l=s.destroy,r!==null&&mu(r,s.deps)){o.memoizedState=Ho(t,n,l,r);return}}be.flags|=e,o.memoizedState=Ho(1|t,n,l,r)}function Ec(e,t){return Rl(8390656,8,e,t)}function yu(e,t){return Rs(2048,8,e,t)}function sp(e,t){return Rs(4,2,e,t)}function ip(e,t){return Rs(4,4,e,t)}function ap(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function up(e,t,n){return n=n!=null?n.concat([e]):null,Rs(4,4,ap.bind(null,t,e),n)}function vu(){}function cp(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dp(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&mu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fp(e,t,n){return tr&21?(Rt(n,t)||(n=yf(),be.lanes|=n,nr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,nt=!0),e.memoizedState=n)}function Tg(e,t){var n=de;de=n!==0&&4>n?n:4,e(!0);var r=ci.transition;ci.transition={};try{e(!1),t()}finally{de=n,ci.transition=r}}function pp(){return bt().memoizedState}function Ng(e,t,n){var r=Pn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mp(e))hp(t,n);else if(n=Qf(e,t,n,r),n!==null){var o=Ze();Nt(n,e,r,o),gp(n,t,r)}}function Rg(e,t,n){var r=Pn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mp(e))hp(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,i=l(s,n);if(o.hasEagerState=!0,o.eagerState=i,Rt(i,s)){var u=t.interleaved;u===null?(o.next=o,uu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=Qf(e,t,o,r),n!==null&&(o=Ze(),Nt(n,e,r,o),gp(n,t,r))}}function mp(e){var t=e.alternate;return e===be||t!==null&&t===be}function hp(e,t){jo=os=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qa(e,n)}}var ls={readContext:wt,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useInsertionEffect:Be,useLayoutEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useMutableSource:Be,useSyncExternalStore:Be,useId:Be,unstable_isNewReconciler:!1},Pg={readContext:wt,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Ec,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Rl(4194308,4,ap.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rl(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ng.bind(null,be,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:jc,useDebugValue:vu,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=jc(!1),t=e[0];return e=Tg.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=be,o=_t();if(ve){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Me===null)throw Error(O(349));tr&30||ep(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Ec(np.bind(null,r,l,e),[e]),r.flags|=2048,Ho(9,tp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=_t(),t=Me.identifierPrefix;if(ve){var n=Zt,r=Xt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Eg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_g={readContext:wt,useCallback:cp,useContext:wt,useEffect:yu,useImperativeHandle:up,useInsertionEffect:sp,useLayoutEffect:ip,useMemo:dp,useReducer:di,useRef:lp,useState:function(){return di(Vo)},useDebugValue:vu,useDeferredValue:function(e){var t=bt();return fp(t,Ae.memoizedState,e)},useTransition:function(){var e=di(Vo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Jf,useSyncExternalStore:qf,useId:pp,unstable_isNewReconciler:!1},Lg={readContext:wt,useCallback:cp,useContext:wt,useEffect:yu,useImperativeHandle:up,useInsertionEffect:sp,useLayoutEffect:ip,useMemo:dp,useReducer:fi,useRef:lp,useState:function(){return fi(Vo)},useDebugValue:vu,useDeferredValue:function(e){var t=bt();return Ae===null?t.memoizedState=e:fp(t,Ae.memoizedState,e)},useTransition:function(){var e=fi(Vo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:Jf,useSyncExternalStore:qf,useId:pp,unstable_isNewReconciler:!1};function Ct(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ca(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Se({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ps={isMounted:function(e){return(e=e._reactInternals)?ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Pn(e),l=qt(r,o);l.payload=t,n!=null&&(l.callback=n),t=Nn(e,l,o),t!==null&&(Nt(t,e,o,r),Tl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=Pn(e),l=qt(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Nn(e,l,o),t!==null&&(Nt(t,e,o,r),Tl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=Pn(e),o=qt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Nn(e,o,r),t!==null&&(Nt(t,e,r,n),Tl(t,e,r))}};function Tc(e,t,n,r,o,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!Do(n,r)||!Do(o,l):!0}function yp(e,t,n){var r=!1,o=In,l=t.contextType;return typeof l=="object"&&l!==null?l=wt(l):(o=ot(t)?qn:Ye.current,r=t.contextTypes,l=(r=r!=null)?Kr(e,o):In),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ps,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function Nc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ps.enqueueReplaceState(t,t.state,null)}function da(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},cu(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=wt(l):(l=ot(t)?qn:Ye.current,o.context=Kr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(ca(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ps.enqueueReplaceState(o,o.state,null),ns(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Hr(e,t){try{var n="",r=t;do n+=sh(r),r=r.return;while(r);var o=n}catch(l){o=`
|
|
39
|
-
Error generating stack: `+l.message+`
|
|
40
|
-
`+l.stack}return{value:e,source:t,stack:o,digest:null}}function pi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ag=typeof WeakMap=="function"?WeakMap:Map;function vp(e,t,n){n=qt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){is||(is=!0,Sa=r),fa(e,t)},n}function xp(e,t,n){n=qt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){fa(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){fa(e,t),typeof r!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Rc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ag;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Gg.bind(null,e,t,n),t.then(e,e))}function Pc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function _c(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qt(-1,1),t.tag=2,Nn(n,t,1))),n.lanes|=1),e)}var Ig=mn.ReactCurrentOwner,nt=!1;function Xe(e,t,n,r){t.child=e===null?Yf(t,null,n,r):Wr(t,e.child,n,r)}function Lc(e,t,n,r,o){n=n.render;var l=t.ref;return Or(t,o),r=hu(e,t,n,r,l,o),n=gu(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(ve&&n&&ru(t),t.flags|=1,Xe(e,t,r,o),t.child)}function Ac(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Eu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,wp(e,t,l,r,o)):(e=Al(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Do,n(s,r)&&e.ref===t.ref)return ln(e,t,o)}return t.flags|=1,e=_n(l,r),e.ref=t.ref,e.return=t,t.child=e}function wp(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Do(l,r)&&e.ref===t.ref)if(nt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(nt=!0);else return t.lanes=e.lanes,ln(e,t,o)}return pa(e,t,n,r,o)}function bp(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},pe(Nr,st),st|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,pe(Nr,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,pe(Nr,st),st|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,pe(Nr,st),st|=r;return Xe(e,t,o,n),t.child}function Sp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pa(e,t,n,r,o){var l=ot(n)?qn:Ye.current;return l=Kr(t,l),Or(t,o),n=hu(e,t,n,r,l,o),r=gu(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o)):(ve&&r&&ru(t),t.flags|=1,Xe(e,t,n,o),t.child)}function Ic(e,t,n,r,o){if(ot(n)){var l=!0;Zl(t)}else l=!1;if(Or(t,o),t.stateNode===null)Pl(e,t),yp(t,n,r),da(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,i=t.memoizedProps;s.props=i;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=wt(c):(c=ot(n)?qn:Ye.current,c=Kr(t,c));var d=n.getDerivedStateFromProps,p=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==r||u!==c)&&Nc(t,s,r,c),vn=!1;var f=t.memoizedState;s.state=f,ns(t,r,s,o),u=t.memoizedState,i!==r||f!==u||rt.current||vn?(typeof d=="function"&&(ca(t,n,d,r),u=t.memoizedState),(i=vn||Tc(t,n,i,r,f,u,c))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=i):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Xf(e,t),i=t.memoizedProps,c=t.type===t.elementType?i:Ct(t.type,i),s.props=c,p=t.pendingProps,f=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=wt(u):(u=ot(n)?qn:Ye.current,u=Kr(t,u));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==p||f!==u)&&Nc(t,s,r,u),vn=!1,f=t.memoizedState,s.state=f,ns(t,r,s,o);var v=t.memoizedState;i!==p||f!==v||rt.current||vn?(typeof g=="function"&&(ca(t,n,g,r),v=t.memoizedState),(c=vn||Tc(t,n,c,r,f,v,u)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ma(e,t,n,r,l,o)}function ma(e,t,n,r,o,l){Sp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&xc(t,n,!1),ln(e,t,l);r=t.stateNode,Ig.current=t;var i=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wr(t,e.child,null,l),t.child=Wr(t,null,i,l)):Xe(e,t,i,l),t.memoizedState=r.state,o&&xc(t,n,!0),t.child}function kp(e){var t=e.stateNode;t.pendingContext?vc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vc(e,t.context,!1),du(e,t.containerInfo)}function Oc(e,t,n,r,o){return Fr(),lu(o),t.flags|=256,Xe(e,t,n,r),t.child}var ha={dehydrated:null,treeContext:null,retryLane:0};function ga(e){return{baseLanes:e,cachePool:null,transitions:null}}function Cp(e,t,n){var r=t.pendingProps,o=we.current,l=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(o&2)!==0),i?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),pe(we,o&1),e===null)return aa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=As(s,r,0,null),e=Zn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=ga(n),t.memoizedState=ha,e):xu(t,s));if(o=e.memoizedState,o!==null&&(i=o.dehydrated,i!==null))return Og(e,t,s,r,i,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,i=o.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=_n(o,u),r.subtreeFlags=o.subtreeFlags&14680064),i!==null?l=_n(i,l):(l=Zn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?ga(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=ha,r}return l=e.child,e=l.sibling,r=_n(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xu(e,t){return t=As({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gl(e,t,n,r){return r!==null&&lu(r),Wr(t,e.child,null,n),e=xu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Og(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=pi(Error(O(422))),gl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=As({mode:"visible",children:r.children},o,0,null),l=Zn(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Wr(t,e.child,null,s),t.child.memoizedState=ga(s),t.memoizedState=ha,l);if(!(t.mode&1))return gl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var i=r.dgst;return r=i,l=Error(O(419)),r=pi(l,r,void 0),gl(e,t,s,r)}if(i=(s&e.childLanes)!==0,nt||i){if(r=Me,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,on(e,o),Nt(r,e,o,-1))}return ju(),r=pi(Error(O(421))),gl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Yg.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,at=Tn(o.nextSibling),ut=t,ve=!0,Et=null,e!==null&&(ht[gt++]=Xt,ht[gt++]=Zt,ht[gt++]=er,Xt=e.id,Zt=e.overflow,er=t),t=xu(t,r.children),t.flags|=4096,t)}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function mi(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function jp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Xe(e,t,r.children,n),r=we.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pe(we,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&rs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),mi(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&rs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}mi(t,!0,n,null,l);break;case"together":mi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Pl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=_n(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_n(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dg(e,t,n){switch(t.tag){case 3:kp(t),Fr();break;case 5:Zf(t);break;case 1:ot(t.type)&&Zl(t);break;case 4:du(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;pe(es,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(pe(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Cp(e,t,n):(pe(we,we.current&1),e=ln(e,t,n),e!==null?e.sibling:null);pe(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,bp(e,t,n)}return ln(e,t,n)}var Ep,ya,Tp,Np;Ep=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ya=function(){};Tp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Yn(It.current);var l=null;switch(n){case"input":o=$i(e,o),r=$i(e,r),l=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),l=[];break;case"textarea":o=Wi(e,o),r=Wi(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ql)}Hi(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var i=o[c];for(s in i)i.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ro.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(i=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&u!==i&&(u!=null||i!=null))if(c==="style")if(i){for(s in i)!i.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&i[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,i=i?i.__html:void 0,u!=null&&i!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ro.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ge("scroll",e),l||i===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Np=function(e,t,n,r){n!==r&&(t.flags|=4)};function fo(e,t){if(!ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zg(e,t,n){var r=t.pendingProps;switch(ou(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return ot(t.type)&&Xl(),Ue(t),null;case 3:return r=t.stateNode,Vr(),ye(rt),ye(Ye),pu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ml(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Et!==null&&(ja(Et),Et=null))),ya(e,t),Ue(t),null;case 5:fu(t);var o=Yn(Fo.current);if(n=t.type,e!==null&&t.stateNode!=null)Tp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ue(t),null}if(e=Yn(It.current),ml(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[Lt]=t,r[$o]=l,e=(t.mode&1)!==0,n){case"dialog":ge("cancel",r),ge("close",r);break;case"iframe":case"object":case"embed":ge("load",r);break;case"video":case"audio":for(o=0;o<vo.length;o++)ge(vo[o],r);break;case"source":ge("error",r);break;case"img":case"image":case"link":ge("error",r),ge("load",r);break;case"details":ge("toggle",r);break;case"input":Bu(r,l),ge("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},ge("invalid",r);break;case"textarea":Gu(r,l),ge("invalid",r)}Hi(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var i=l[s];s==="children"?typeof i=="string"?r.textContent!==i&&(l.suppressHydrationWarning!==!0&&pl(r.textContent,i,e),o=["children",i]):typeof i=="number"&&r.textContent!==""+i&&(l.suppressHydrationWarning!==!0&&pl(r.textContent,i,e),o=["children",""+i]):Ro.hasOwnProperty(s)&&i!=null&&s==="onScroll"&&ge("scroll",r)}switch(n){case"input":ll(r),Uu(r,l,!0);break;case"textarea":ll(r),Yu(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Ql)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Lt]=t,e[$o]=r,Ep(e,t,!1,!1),t.stateNode=e;e:{switch(s=Bi(n,r),n){case"dialog":ge("cancel",e),ge("close",e),o=r;break;case"iframe":case"object":case"embed":ge("load",e),o=r;break;case"video":case"audio":for(o=0;o<vo.length;o++)ge(vo[o],e);o=r;break;case"source":ge("error",e),o=r;break;case"img":case"image":case"link":ge("error",e),ge("load",e),o=r;break;case"details":ge("toggle",e),o=r;break;case"input":Bu(e,r),o=$i(e,r),ge("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),ge("invalid",e);break;case"textarea":Gu(e,r),o=Wi(e,r),ge("invalid",e);break;default:o=r}Hi(n,o),i=o;for(l in i)if(i.hasOwnProperty(l)){var u=i[l];l==="style"?of(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&nf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Po(e,u):typeof u=="number"&&Po(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ro.hasOwnProperty(l)?u!=null&&l==="onScroll"&&ge("scroll",e):u!=null&&Va(e,l,u,s))}switch(n){case"input":ll(e),Uu(e,r,!1);break;case"textarea":ll(e),Yu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+An(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?_r(e,!!r.multiple,l,!1):r.defaultValue!=null&&_r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ql)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)Np(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Yn(Fo.current),Yn(It.current),ml(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lt]=t,(l=r.nodeValue!==n)&&(e=ut,e!==null))switch(e.tag){case 3:pl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ye(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ve&&at!==null&&t.mode&1&&!(t.flags&128))Uf(),Fr(),t.flags|=98560,l=!1;else if(l=ml(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(O(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(O(317));l[Lt]=t}else Fr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),l=!1}else Et!==null&&(ja(Et),Et=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||we.current&1?Ie===0&&(Ie=3):ju())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Vr(),ya(e,t),e===null&&zo(t.stateNode.containerInfo),Ue(t),null;case 10:return au(t.type._context),Ue(t),null;case 17:return ot(t.type)&&Xl(),Ue(t),null;case 19:if(ye(we),l=t.memoizedState,l===null)return Ue(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)fo(l,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=rs(e),s!==null){for(t.flags|=128,fo(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pe(we,we.current&1|2),t.child}e=e.sibling}l.tail!==null&&Te()>Br&&(t.flags|=128,r=!0,fo(l,!1),t.lanes=4194304)}else{if(!r)if(e=rs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fo(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ve)return Ue(t),null}else 2*Te()-l.renderingStartTime>Br&&n!==1073741824&&(t.flags|=128,r=!0,fo(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Te(),t.sibling=null,n=we.current,pe(we,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Cu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function Mg(e,t){switch(ou(t),t.tag){case 1:return ot(t.type)&&Xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),ye(rt),ye(Ye),pu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fu(t),null;case 13:if(ye(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Fr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(we),null;case 4:return Vr(),null;case 10:return au(t.type._context),null;case 22:case 23:return Cu(),null;case 24:return null;default:return null}}var yl=!1,Ge=!1,$g=typeof WeakSet=="function"?WeakSet:Set,V=null;function Tr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function va(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var zc=!1;function Kg(e,t){if(ta=Ul,e=Af(),nu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,i=-1,u=-1,c=0,d=0,p=e,f=null;t:for(;;){for(var g;p!==n||o!==0&&p.nodeType!==3||(i=s+o),p!==l||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(g=p.firstChild)!==null;)f=p,p=g;for(;;){if(p===e)break t;if(f===n&&++c===o&&(i=s),f===l&&++d===r&&(u=s),(g=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=g}n=i===-1||u===-1?null:{start:i,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(na={focusedElem:e,selectionRange:n},Ul=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ct(t.type,w),S);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(x){Ce(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=zc,zc=!1,v}function Eo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&va(t,n,l)}o=o.next}while(o!==r)}}function _s(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Rp(e){var t=e.alternate;t!==null&&(e.alternate=null,Rp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lt],delete t[$o],delete t[la],delete t[Sg],delete t[kg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pp(e){return e.tag===5||e.tag===3||e.tag===4}function Mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ql));else if(r!==4&&(e=e.child,e!==null))for(wa(e,t,n),e=e.sibling;e!==null;)wa(e,t,n),e=e.sibling}function ba(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ba(e,t,n),e=e.sibling;e!==null;)ba(e,t,n),e=e.sibling}var Fe=null,jt=!1;function hn(e,t,n){for(n=n.child;n!==null;)_p(e,t,n),n=n.sibling}function _p(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(ks,n)}catch{}switch(n.tag){case 5:Ge||Tr(n,t);case 6:var r=Fe,o=jt;Fe=null,hn(e,t,n),Fe=r,jt=o,Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(jt?(e=Fe,n=n.stateNode,e.nodeType===8?ii(e.parentNode,n):e.nodeType===1&&ii(e,n),Io(e)):ii(Fe,n.stateNode));break;case 4:r=Fe,o=jt,Fe=n.stateNode.containerInfo,jt=!0,hn(e,t,n),Fe=r,jt=o;break;case 0:case 11:case 14:case 15:if(!Ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&va(n,t,s),o=o.next}while(o!==r)}hn(e,t,n);break;case 1:if(!Ge&&(Tr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(i){Ce(n,t,i)}hn(e,t,n);break;case 21:hn(e,t,n);break;case 22:n.mode&1?(Ge=(r=Ge)||n.memoizedState!==null,hn(e,t,n),Ge=r):hn(e,t,n);break;default:hn(e,t,n)}}function $c(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new $g),t.forEach(function(r){var o=Qg.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function kt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,s=t,i=s;e:for(;i!==null;){switch(i.tag){case 5:Fe=i.stateNode,jt=!1;break e;case 3:Fe=i.stateNode.containerInfo,jt=!0;break e;case 4:Fe=i.stateNode.containerInfo,jt=!0;break e}i=i.return}if(Fe===null)throw Error(O(160));_p(l,s,o),Fe=null,jt=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(c){Ce(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Lp(t,e),t=t.sibling}function Lp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kt(t,e),Pt(e),r&4){try{Eo(3,e,e.return),_s(3,e)}catch(w){Ce(e,e.return,w)}try{Eo(5,e,e.return)}catch(w){Ce(e,e.return,w)}}break;case 1:kt(t,e),Pt(e),r&512&&n!==null&&Tr(n,n.return);break;case 5:if(kt(t,e),Pt(e),r&512&&n!==null&&Tr(n,n.return),e.flags&32){var o=e.stateNode;try{Po(o,"")}catch(w){Ce(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,i=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{i==="input"&&l.type==="radio"&&l.name!=null&&qd(o,l),Bi(i,s);var c=Bi(i,l);for(s=0;s<u.length;s+=2){var d=u[s],p=u[s+1];d==="style"?of(o,p):d==="dangerouslySetInnerHTML"?nf(o,p):d==="children"?Po(o,p):Va(o,d,p,c)}switch(i){case"input":Ki(o,l);break;case"textarea":ef(o,l);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var g=l.value;g!=null?_r(o,!!l.multiple,g,!1):f!==!!l.multiple&&(l.defaultValue!=null?_r(o,!!l.multiple,l.defaultValue,!0):_r(o,!!l.multiple,l.multiple?[]:"",!1))}o[$o]=l}catch(w){Ce(e,e.return,w)}}break;case 6:if(kt(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(O(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(w){Ce(e,e.return,w)}}break;case 3:if(kt(t,e),Pt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Io(t.containerInfo)}catch(w){Ce(e,e.return,w)}break;case 4:kt(t,e),Pt(e);break;case 13:kt(t,e),Pt(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(Su=Te())),r&4&&$c(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ge=(c=Ge)||d,kt(t,e),Ge=c):kt(t,e),Pt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(V=e,d=e.child;d!==null;){for(p=V=d;V!==null;){switch(f=V,g=f.child,f.tag){case 0:case 11:case 14:case 15:Eo(4,f,f.return);break;case 1:Tr(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){Ce(r,n,w)}}break;case 5:Tr(f,f.return);break;case 22:if(f.memoizedState!==null){Fc(p);continue}}g!==null?(g.return=f,V=g):Fc(p)}d=d.sibling}e:for(d=null,p=e;;){if(p.tag===5){if(d===null){d=p;try{o=p.stateNode,c?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(i=p.stateNode,u=p.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,i.style.display=rf("display",s))}catch(w){Ce(e,e.return,w)}}}else if(p.tag===6){if(d===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(w){Ce(e,e.return,w)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;d===p&&(d=null),p=p.return}d===p&&(d=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:kt(t,e),Pt(e),r&4&&$c(e);break;case 21:break;default:kt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Pp(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Po(o,""),r.flags&=-33);var l=Mc(e);ba(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,i=Mc(e);wa(e,i,s);break;default:throw Error(O(161))}}catch(u){Ce(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fg(e,t,n){V=e,Ap(e)}function Ap(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var o=V,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||yl;if(!s){var i=o.alternate,u=i!==null&&i.memoizedState!==null||Ge;i=yl;var c=Ge;if(yl=s,(Ge=u)&&!c)for(V=o;V!==null;)s=V,u=s.child,s.tag===22&&s.memoizedState!==null?Wc(o):u!==null?(u.return=s,V=u):Wc(o);for(;l!==null;)V=l,Ap(l),l=l.sibling;V=o,yl=i,Ge=c}Kc(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,V=l):Kc(e)}}function Kc(e){for(;V!==null;){var t=V;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ge||_s(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ge)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Ct(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Cc(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Cc(t,s,n)}break;case 5:var i=t.stateNode;if(n===null&&t.flags&4){n=i;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var p=d.dehydrated;p!==null&&Io(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ge||t.flags&512&&xa(t)}catch(f){Ce(t,t.return,f)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Fc(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Wc(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_s(4,t)}catch(u){Ce(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Ce(t,o,u)}}var l=t.return;try{xa(t)}catch(u){Ce(t,l,u)}break;case 5:var s=t.return;try{xa(t)}catch(u){Ce(t,s,u)}}}catch(u){Ce(t,t.return,u)}if(t===e){V=null;break}var i=t.sibling;if(i!==null){i.return=t.return,V=i;break}V=t.return}}var Wg=Math.ceil,ss=mn.ReactCurrentDispatcher,wu=mn.ReactCurrentOwner,vt=mn.ReactCurrentBatchConfig,ie=0,Me=null,_e=null,We=0,st=0,Nr=Mn(0),Ie=0,Bo=null,nr=0,Ls=0,bu=0,To=null,tt=null,Su=0,Br=1/0,Bt=null,is=!1,Sa=null,Rn=null,vl=!1,kn=null,as=0,No=0,ka=null,_l=-1,Ll=0;function Ze(){return ie&6?Te():_l!==-1?_l:_l=Te()}function Pn(e){return e.mode&1?ie&2&&We!==0?We&-We:jg.transition!==null?(Ll===0&&(Ll=yf()),Ll):(e=de,e!==0||(e=window.event,e=e===void 0?16:Cf(e.type)),e):1}function Nt(e,t,n,r){if(50<No)throw No=0,ka=null,Error(O(185));Qo(e,n,r),(!(ie&2)||e!==Me)&&(e===Me&&(!(ie&2)&&(Ls|=n),Ie===4&&bn(e,We)),lt(e,r),n===1&&ie===0&&!(t.mode&1)&&(Br=Te()+500,Ns&&$n()))}function lt(e,t){var n=e.callbackNode;jh(e,t);var r=Bl(e,e===Me?We:0);if(r===0)n!==null&&Zu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Zu(n),t===1)e.tag===0?Cg(Vc.bind(null,e)):Vf(Vc.bind(null,e)),wg(function(){!(ie&6)&&$n()}),n=null;else{switch(vf(r)){case 1:n=Ya;break;case 4:n=hf;break;case 16:n=Hl;break;case 536870912:n=gf;break;default:n=Hl}n=Fp(n,Ip.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ip(e,t){if(_l=-1,Ll=0,ie&6)throw Error(O(327));var n=e.callbackNode;if(Dr()&&e.callbackNode!==n)return null;var r=Bl(e,e===Me?We:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=us(e,r);else{t=r;var o=ie;ie|=2;var l=Dp();(Me!==e||We!==t)&&(Bt=null,Br=Te()+500,Xn(e,t));do try{Bg();break}catch(i){Op(e,i)}while(!0);iu(),ss.current=l,ie=o,_e!==null?t=0:(Me=null,We=0,t=Ie)}if(t!==0){if(t===2&&(o=Xi(e),o!==0&&(r=o,t=Ca(e,o))),t===1)throw n=Bo,Xn(e,0),bn(e,r),lt(e,Te()),n;if(t===6)bn(e,r);else{if(o=e.current.alternate,!(r&30)&&!Vg(o)&&(t=us(e,r),t===2&&(l=Xi(e),l!==0&&(r=l,t=Ca(e,l))),t===1))throw n=Bo,Xn(e,0),bn(e,r),lt(e,Te()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Bn(e,tt,Bt);break;case 3:if(bn(e,r),(r&130023424)===r&&(t=Su+500-Te(),10<t)){if(Bl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=oa(Bn.bind(null,e,tt,Bt),t);break}Bn(e,tt,Bt);break;case 4:if(bn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Tt(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=Te()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wg(r/1960))-r,10<r){e.timeoutHandle=oa(Bn.bind(null,e,tt,Bt),r);break}Bn(e,tt,Bt);break;case 5:Bn(e,tt,Bt);break;default:throw Error(O(329))}}}return lt(e,Te()),e.callbackNode===n?Ip.bind(null,e):null}function Ca(e,t){var n=To;return e.current.memoizedState.isDehydrated&&(Xn(e,t).flags|=256),e=us(e,t),e!==2&&(t=tt,tt=n,t!==null&&ja(t)),e}function ja(e){tt===null?tt=e:tt.push.apply(tt,e)}function Vg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Rt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bn(e,t){for(t&=~bu,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function Vc(e){if(ie&6)throw Error(O(327));Dr();var t=Bl(e,0);if(!(t&1))return lt(e,Te()),null;var n=us(e,t);if(e.tag!==0&&n===2){var r=Xi(e);r!==0&&(t=r,n=Ca(e,r))}if(n===1)throw n=Bo,Xn(e,0),bn(e,t),lt(e,Te()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bn(e,tt,Bt),lt(e,Te()),null}function ku(e,t){var n=ie;ie|=1;try{return e(t)}finally{ie=n,ie===0&&(Br=Te()+500,Ns&&$n())}}function rr(e){kn!==null&&kn.tag===0&&!(ie&6)&&Dr();var t=ie;ie|=1;var n=vt.transition,r=de;try{if(vt.transition=null,de=1,e)return e()}finally{de=r,vt.transition=n,ie=t,!(ie&6)&&$n()}}function Cu(){st=Nr.current,ye(Nr)}function Xn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,xg(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(ou(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xl();break;case 3:Vr(),ye(rt),ye(Ye),pu();break;case 5:fu(r);break;case 4:Vr();break;case 13:ye(we);break;case 19:ye(we);break;case 10:au(r.type._context);break;case 22:case 23:Cu()}n=n.return}if(Me=e,_e=e=_n(e.current,null),We=st=t,Ie=0,Bo=null,bu=Ls=nr=0,tt=To=null,Gn!==null){for(t=0;t<Gn.length;t++)if(n=Gn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=o,r.next=s}n.pending=r}Gn=null}return e}function Op(e,t){do{var n=_e;try{if(iu(),Nl.current=ls,os){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}os=!1}if(tr=0,ze=Ae=be=null,jo=!1,Wo=0,wu.current=null,n===null||n.return===null){Ie=1,Bo=t,_e=null;break}e:{var l=e,s=n.return,i=n,u=t;if(t=We,i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=i,p=d.tag;if(!(d.mode&1)&&(p===0||p===11||p===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Pc(s);if(g!==null){g.flags&=-257,_c(g,s,i,l,t),g.mode&1&&Rc(l,c,t),t=g,u=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(u),t.updateQueue=w}else v.add(u);break e}else{if(!(t&1)){Rc(l,c,t),ju();break e}u=Error(O(426))}}else if(ve&&i.mode&1){var S=Pc(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),_c(S,s,i,l,t),lu(Hr(u,i));break e}}l=u=Hr(u,i),Ie!==4&&(Ie=2),To===null?To=[l]:To.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var m=vp(l,u,t);kc(l,m);break e;case 1:i=u;var h=l.type,y=l.stateNode;if(!(l.flags&128)&&(typeof h.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Rn===null||!Rn.has(y)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=xp(l,i,t);kc(l,x);break e}}l=l.return}while(l!==null)}Mp(n)}catch(j){t=j,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function Dp(){var e=ss.current;return ss.current=ls,e===null?ls:e}function ju(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),Me===null||!(nr&268435455)&&!(Ls&268435455)||bn(Me,We)}function us(e,t){var n=ie;ie|=2;var r=Dp();(Me!==e||We!==t)&&(Bt=null,Xn(e,t));do try{Hg();break}catch(o){Op(e,o)}while(!0);if(iu(),ie=n,ss.current=r,_e!==null)throw Error(O(261));return Me=null,We=0,Ie}function Hg(){for(;_e!==null;)zp(_e)}function Bg(){for(;_e!==null&&!gh();)zp(_e)}function zp(e){var t=Kp(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?Mp(e):_e=t,wu.current=null}function Mp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Mg(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,_e=null;return}}else if(n=zg(n,t,st),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Ie===0&&(Ie=5)}function Bn(e,t,n){var r=de,o=vt.transition;try{vt.transition=null,de=1,Ug(e,t,n,r)}finally{vt.transition=o,de=r}return null}function Ug(e,t,n,r){do Dr();while(kn!==null);if(ie&6)throw Error(O(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Eh(e,l),e===Me&&(_e=Me=null,We=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||vl||(vl=!0,Fp(Hl,function(){return Dr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=vt.transition,vt.transition=null;var s=de;de=1;var i=ie;ie|=4,wu.current=null,Kg(e,n),Lp(n,e),fg(na),Ul=!!ta,na=ta=null,e.current=n,Fg(n),yh(),ie=i,de=s,vt.transition=l}else e.current=n;if(vl&&(vl=!1,kn=e,as=o),l=e.pendingLanes,l===0&&(Rn=null),wh(n.stateNode),lt(e,Te()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(is)throw is=!1,e=Sa,Sa=null,e;return as&1&&e.tag!==0&&Dr(),l=e.pendingLanes,l&1?e===ka?No++:(No=0,ka=e):No=0,$n(),null}function Dr(){if(kn!==null){var e=vf(as),t=vt.transition,n=de;try{if(vt.transition=null,de=16>e?16:e,kn===null)var r=!1;else{if(e=kn,kn=null,as=0,ie&6)throw Error(O(331));var o=ie;for(ie|=4,V=e.current;V!==null;){var l=V,s=l.child;if(V.flags&16){var i=l.deletions;if(i!==null){for(var u=0;u<i.length;u++){var c=i[u];for(V=c;V!==null;){var d=V;switch(d.tag){case 0:case 11:case 15:Eo(8,d,l)}var p=d.child;if(p!==null)p.return=d,V=p;else for(;V!==null;){d=V;var f=d.sibling,g=d.return;if(Rp(d),d===c){V=null;break}if(f!==null){f.return=g,V=f;break}V=g}}}var v=l.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}V=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,V=s;else e:for(;V!==null;){if(l=V,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Eo(9,l,l.return)}var m=l.sibling;if(m!==null){m.return=l.return,V=m;break e}V=l.return}}var h=e.current;for(V=h;V!==null;){s=V;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,V=y;else e:for(s=h;V!==null;){if(i=V,i.flags&2048)try{switch(i.tag){case 0:case 11:case 15:_s(9,i)}}catch(j){Ce(i,i.return,j)}if(i===s){V=null;break e}var x=i.sibling;if(x!==null){x.return=i.return,V=x;break e}V=i.return}}if(ie=o,$n(),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(ks,e)}catch{}r=!0}return r}finally{de=n,vt.transition=t}}return!1}function Hc(e,t,n){t=Hr(n,t),t=vp(e,t,1),e=Nn(e,t,1),t=Ze(),e!==null&&(Qo(e,1,t),lt(e,t))}function Ce(e,t,n){if(e.tag===3)Hc(e,e,n);else for(;t!==null;){if(t.tag===3){Hc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Rn===null||!Rn.has(r))){e=Hr(n,e),e=xp(t,e,1),t=Nn(t,e,1),e=Ze(),t!==null&&(Qo(t,1,e),lt(t,e));break}}t=t.return}}function Gg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(We&n)===n&&(Ie===4||Ie===3&&(We&130023424)===We&&500>Te()-Su?Xn(e,0):bu|=n),lt(e,t)}function $p(e,t){t===0&&(e.mode&1?(t=al,al<<=1,!(al&130023424)&&(al=4194304)):t=1);var n=Ze();e=on(e,t),e!==null&&(Qo(e,t,n),lt(e,n))}function Yg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$p(e,n)}function Qg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),$p(e,n)}var Kp;Kp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nt=!1,Dg(e,t,n);nt=!!(e.flags&131072)}else nt=!1,ve&&t.flags&1048576&&Hf(t,ql,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Pl(e,t),e=t.pendingProps;var o=Kr(t,Ye.current);Or(t,n),o=hu(null,t,r,e,o,n);var l=gu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(r)?(l=!0,Zl(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,cu(t),o.updater=Ps,t.stateNode=o,o._reactInternals=t,da(t,r,e,n),t=ma(null,t,r,!0,l,n)):(t.tag=0,ve&&l&&ru(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Pl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Zg(r),e=Ct(r,e),o){case 0:t=pa(null,t,r,e,n);break e;case 1:t=Ic(null,t,r,e,n);break e;case 11:t=Lc(null,t,r,e,n);break e;case 14:t=Ac(null,t,r,Ct(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),pa(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Ic(e,t,r,o,n);case 3:e:{if(kp(t),e===null)throw Error(O(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Xf(e,t),ns(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Hr(Error(O(423)),t),t=Oc(e,t,r,n,o);break e}else if(r!==o){o=Hr(Error(O(424)),t),t=Oc(e,t,r,n,o);break e}else for(at=Tn(t.stateNode.containerInfo.firstChild),ut=t,ve=!0,Et=null,n=Yf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fr(),r===o){t=ln(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return Zf(t),e===null&&aa(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,ra(r,o)?s=null:l!==null&&ra(r,l)&&(t.flags|=32),Sp(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&aa(t),null;case 13:return Cp(e,t,n);case 4:return du(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wr(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Lc(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,pe(es,r._currentValue),r._currentValue=s,l!==null)if(Rt(l.value,s)){if(l.children===o.children&&!rt.current){t=ln(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var i=l.dependencies;if(i!==null){s=l.child;for(var u=i.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=qt(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ua(l.return,n,t),i.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(O(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),ua(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Or(t,n),o=wt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=Ct(r,t.pendingProps),o=Ct(r.type,o),Ac(e,t,r,o,n);case 15:return wp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ct(r,o),Pl(e,t),t.tag=1,ot(r)?(e=!0,Zl(t)):e=!1,Or(t,n),yp(t,r,o),da(t,r,o,n),ma(null,t,r,!0,e,n);case 19:return jp(e,t,n);case 22:return bp(e,t,n)}throw Error(O(156,t.tag))};function Fp(e,t){return mf(e,t)}function Xg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,r){return new Xg(e,t,n,r)}function Eu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zg(e){if(typeof e=="function")return Eu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ba)return 11;if(e===Ua)return 14}return 2}function _n(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Al(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Eu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case vr:return Zn(n.children,o,l,t);case Ha:s=8,o|=8;break;case Oi:return e=yt(12,n,t,o|2),e.elementType=Oi,e.lanes=l,e;case Di:return e=yt(13,n,t,o),e.elementType=Di,e.lanes=l,e;case zi:return e=yt(19,n,t,o),e.elementType=zi,e.lanes=l,e;case Xd:return As(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yd:s=10;break e;case Qd:s=9;break e;case Ba:s=11;break e;case Ua:s=14;break e;case yn:s=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=yt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function Zn(e,t,n,r){return e=yt(7,e,r,t),e.lanes=n,e}function As(e,t,n,r){return e=yt(22,e,r,t),e.elementType=Xd,e.lanes=n,e.stateNode={isHidden:!1},e}function hi(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function gi(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jg(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xs(0),this.expirationTimes=Xs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xs(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Tu(e,t,n,r,o,l,s,i,u){return e=new Jg(e,t,n,i,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=yt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(l),e}function qg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:yr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Wp(e){if(!e)return In;e=e._reactInternals;e:{if(ur(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(ot(n))return Wf(e,n,t)}return t}function Vp(e,t,n,r,o,l,s,i,u){return e=Tu(n,r,!0,e,o,l,s,i,u),e.context=Wp(null),n=e.current,r=Ze(),o=Pn(n),l=qt(r,o),l.callback=t??null,Nn(n,l,o),e.current.lanes=o,Qo(e,o,r),lt(e,r),e}function Is(e,t,n,r){var o=t.current,l=Ze(),s=Pn(o);return n=Wp(n),t.context===null?t.context=n:t.pendingContext=n,t=qt(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Nn(o,t,s),e!==null&&(Nt(e,o,s,l),Tl(e,o,s)),s}function cs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nu(e,t){Bc(e,t),(e=e.alternate)&&Bc(e,t)}function ey(){return null}var Hp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ru(e){this._internalRoot=e}Os.prototype.render=Ru.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));Is(e,t,null,null)};Os.prototype.unmount=Ru.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rr(function(){Is(null,e,null,null)}),t[rn]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var t=bf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wn.length&&t!==0&&t<wn[n].priority;n++);wn.splice(n,0,e),n===0&&kf(e)}};function Pu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ds(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uc(){}function ty(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var c=cs(s);l.call(c)}}var s=Vp(t,r,e,0,null,!1,!1,"",Uc);return e._reactRootContainer=s,e[rn]=s.current,zo(e.nodeType===8?e.parentNode:e),rr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var i=r;r=function(){var c=cs(u);i.call(c)}}var u=Tu(e,0,!1,null,null,!1,!1,"",Uc);return e._reactRootContainer=u,e[rn]=u.current,zo(e.nodeType===8?e.parentNode:e),rr(function(){Is(t,u,n,r)}),u}function zs(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var i=o;o=function(){var u=cs(s);i.call(u)}}Is(t,s,e,o)}else s=ty(n,t,e,o,r);return cs(s)}xf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yo(t.pendingLanes);n!==0&&(Qa(t,n|1),lt(t,Te()),!(ie&6)&&(Br=Te()+500,$n()))}break;case 13:rr(function(){var r=on(e,1);if(r!==null){var o=Ze();Nt(r,e,1,o)}}),Nu(e,1)}};Xa=function(e){if(e.tag===13){var t=on(e,134217728);if(t!==null){var n=Ze();Nt(t,e,134217728,n)}Nu(e,134217728)}};wf=function(e){if(e.tag===13){var t=Pn(e),n=on(e,t);if(n!==null){var r=Ze();Nt(n,e,t,r)}Nu(e,t)}};bf=function(){return de};Sf=function(e,t){var n=de;try{return de=e,t()}finally{de=n}};Gi=function(e,t,n){switch(t){case"input":if(Ki(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ts(r);if(!o)throw Error(O(90));Jd(r),Ki(r,o)}}}break;case"textarea":ef(e,n);break;case"select":t=n.value,t!=null&&_r(e,!!n.multiple,t,!1)}};af=ku;uf=rr;var ny={usingClientEntryPoint:!1,Events:[Zo,Sr,Ts,lf,sf,ku]},po={findFiberByHostInstance:Un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ry={bundleType:po.bundleType,version:po.version,rendererPackageName:po.rendererPackageName,rendererConfig:po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ff(e),e===null?null:e.stateNode},findFiberByHostInstance:po.findFiberByHostInstance||ey,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xl.isDisabled&&xl.supportsFiber)try{ks=xl.inject(ry),At=xl}catch{}}ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ny;ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pu(t))throw Error(O(200));return qg(e,t,null,n)};ft.createRoot=function(e,t){if(!Pu(e))throw Error(O(299));var n=!1,r="",o=Hp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Tu(e,1,!1,null,null,n,!1,r,o),e[rn]=t.current,zo(e.nodeType===8?e.parentNode:e),new Ru(t)};ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=ff(t),e=e===null?null:e.stateNode,e};ft.flushSync=function(e){return rr(e)};ft.hydrate=function(e,t,n){if(!Ds(t))throw Error(O(200));return zs(null,e,t,!0,n)};ft.hydrateRoot=function(e,t,n){if(!Pu(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=Hp;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Vp(t,null,e,1,n??null,o,!1,l,s),e[rn]=t.current,zo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Os(t)};ft.render=function(e,t,n){if(!Ds(t))throw Error(O(200));return zs(null,e,t,!1,n)};ft.unmountComponentAtNode=function(e){if(!Ds(e))throw Error(O(40));return e._reactRootContainer?(rr(function(){zs(null,null,e,!1,function(){e._reactRootContainer=null,e[rn]=null})}),!0):!1};ft.unstable_batchedUpdates=ku;ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ds(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return zs(e,t,n,!1,r)};ft.version="18.3.1-next-f1338f8080-20240426";function Bp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bp)}catch(e){console.error(e)}}Bp(),Hd.exports=ft;var _u=Hd.exports,Gc=_u;Ai.createRoot=Gc.createRoot,Ai.hydrateRoot=Gc.hydrateRoot;const oy="modulepreload",ly=function(e){return"/panel/"+e},Yc={},sy=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=ly(u),u in Yc)return;Yc[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":oy,c||(p.as="script"),p.crossOrigin="",p.href=u,i&&p.setAttribute("nonce",i),document.head.appendChild(p),c)return new Promise((f,g)=>{p.addEventListener("load",f),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s}return o.then(s=>{for(const i of s||[])i.status==="rejected"&&l(i.reason);return t().catch(l)})},Lu=["none","2xs","xs","sm","md","lg","xl","2xl"],Up=["none","2xs","xs","sm"],Ea=["0","1","2","4","8"],Au=["none","2xs","xs","sm","md","lg"],ds=new Set(Lu),fs=new Set(Up),Ur=new Set(Ea),ps=new Set(Au),iy=["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],ay=["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],uy=["leading-none","leading-tight","leading-snug","leading-normal","leading-relaxed","leading-loose","leading-3","leading-4","leading-5","leading-6","leading-7","leading-8","leading-9","leading-10"],cy=["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],dy=Array.from({length:21},(e,t)=>`opacity-${t*5}`),Gp=["none","sm","","md","lg","xl","2xl","3xl","full"],Ta=Gp.map(e=>e?`rounded-${e}`:"rounded");function fy(e){return Gp.map(t=>t?`${e}-${t}`:e)}const Yp=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],py=["solid","dashed","dotted","double","hidden","none"],Na=["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],my=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],hy=["50","100","200","300","400","500","600","700","800","900","950"];function Q(){return e=>e===""?{props:{}}:null}function Pe(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function mt(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function G(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const gy=["t","r","b","l","x","y"],yi=["t","r","b","l","x","y","s","e","bs","be"];function Ee(...e){return t=>{for(const n of e){const r=n(t);if(r)return r}return null}}function M(e,t){return{prefix:e,segment:t}}function Vt(e,t){return t.map(n=>({...n,section:e}))}function vi(e,t,n=gy){return[...n.map(o=>({prefix:e+o,segment:t,canonical:e,extraProps:{side:o}})),{prefix:e,segment:t}]}function yy(e,t){const n=["tl","tr","br","bl"],r=["t","r","b","l"],o=n.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{corner:s}})),l=r.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{side:s}}));return[...o,...l,{prefix:e,segment:Ee(Q(),t)}]}function Qc(e,t){const n=new Set(t);return{prefix:e,segment:Q(),matches:r=>n.has(r)?{props:{value:r}}:null}}function vy(e,t){for(const n of t){const{prefix:r,matches:o,segment:l,canonical:s,section:i,extraProps:u}=n;if(o){const p=o(e);if(!p)continue;const f={property:s??r,fullClass:e};if(i&&(f.section=i),u)for(const[g,v]of Object.entries(u))f[g]=v;for(const[g,v]of Object.entries(p.props))f[g]=v;return f}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const d=l(c);if(d){const p={property:s??r,fullClass:e};if(i&&(p.section=i),u)for(const[f,g]of Object.entries(u))p[f]=g;for(const[f,g]of Object.entries(d.props))p[f]=g;return p}return{property:s??r,fullClass:e,unknown:!0}}return null}function xy(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const o of n){const l=vy(o,t);l&&r.push(l)}return r}const wy=["solid","dashed","dotted","double","none","hidden"],by=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],Sy=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],ky=["tighter","tight","normal","wide","wider","widest"],Cy=["left","center","right","justify","start","end"],jy=["inline-block","inline-grid","inline-flex","inline","flow-root","block","flex","grid","contents","hidden","table-header-group","table-footer-group","table-row-group","table-column-group","table-caption","table-column","table-row","table-cell","table"],Ey=["static","relative","absolute","fixed","sticky"],Ty=["t","tr","r","br","b","bl","l","tl"],Ny=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],Ry=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],Py=["normal","start","end","center","between","around","evenly","baseline","stretch"],_y=["start","end","center","stretch"],Ly=["auto","start","end","center","stretch","baseline"],Ay=[...Vt("spacing",[...vi("m",G("spacing"),yi),...vi("-m",G("spacing"),yi),...vi("p",G("spacing"),yi),M("gap-x",G("spacing")),M("gap-y",G("spacing")),M("gap",G("spacing")),M("space-x-reverse",Q()),M("space-y-reverse",Q()),M("space-x",G("spacing")),M("space-y",G("spacing"))]),...Vt("sizing",[M("min-w",G("spacing")),M("max-w",G("spacing")),M("min-h",G("spacing")),M("max-h",G("spacing")),M("size",G("spacing")),M("w",G("spacing")),M("h",G("spacing"))]),...Vt("typography",[M("font-sans",Q()),M("font-serif",Q()),M("font-mono",Q()),M("font",Pe("scale",by)),M("text-shadow",Ee(Pe("size",Au),mt())),M("text",Ee(Pe("align",Cy),e=>Sy.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,mt())),M("leading",Ee(Pe("scale",["none"]),G("spacing"))),M("tracking",Pe("scale",ky)),M("italic",Q()),M("not-italic",Q()),M("underline",Q()),M("line-through",Q()),M("overline",Q()),M("no-underline",Q()),M("uppercase",Q()),M("lowercase",Q()),M("capitalize",Q()),M("normal-case",Q()),M("truncate",Q()),M("align-text-top",Q()),M("align-text-bottom",Q()),M("align-baseline",Q()),M("align-top",Q()),M("align-middle",Q()),M("align-bottom",Q()),M("align-sub",Q()),M("align-super",Q())]),...Vt("color",[M("bg-gradient-to",Pe("direction",Ty)),M("bg",mt()),M("from",mt()),M("via",mt()),M("to",mt()),M("ring",mt()),M("outline",Ee(Pe("style",["solid","dashed","dotted","double","none"]),mt())),M("fill",mt()),M("stroke",mt()),M("decoration",mt())]),...Vt("borders",[{prefix:"border-bs",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Ee(Q(),G("borderWidth")),canonical:"border",extraProps:{side:"l"}},M("border",Ee(Q(),Pe("style",wy),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,mt())),...yy("rounded",G("borderRadius"))]),...Vt("effects",[M("opacity",G("opacity")),M("shadow",Pe("size",Lu))]),...Vt("layout",[Qc("display",jy),Qc("position",Ey),{prefix:"inset-bs",segment:G("spacing"),canonical:"inset",extraProps:{side:"bs"}},{prefix:"inset-be",segment:G("spacing"),canonical:"inset",extraProps:{side:"be"}},{prefix:"inset-x",segment:G("spacing"),canonical:"inset",extraProps:{side:"x"}},{prefix:"inset-y",segment:G("spacing"),canonical:"inset",extraProps:{side:"y"}},{prefix:"inset-s",segment:G("spacing"),canonical:"inset",extraProps:{side:"s"}},{prefix:"inset-e",segment:G("spacing"),canonical:"inset",extraProps:{side:"e"}},{prefix:"top",segment:G("spacing"),canonical:"inset",extraProps:{side:"top"}},{prefix:"right",segment:G("spacing"),canonical:"inset",extraProps:{side:"right"}},{prefix:"bottom",segment:G("spacing"),canonical:"inset",extraProps:{side:"bottom"}},{prefix:"left",segment:G("spacing"),canonical:"inset",extraProps:{side:"left"}},{prefix:"start",segment:G("spacing"),canonical:"inset",extraProps:{side:"start"}},{prefix:"end",segment:G("spacing"),canonical:"inset",extraProps:{side:"end"}},M("inset",G("spacing")),M("z",G("zIndex"))]),...Vt("flexbox",[M("flex-row-reverse",Q()),M("flex-col-reverse",Q()),M("flex-wrap-reverse",Q()),M("flex-row",Q()),M("flex-col",Q()),M("flex-wrap",Q()),M("flex-nowrap",Q()),M("flex",Ee(Q(),Pe("value",["auto","initial","none"]),G("number"))),M("grow",Ee(Q(),G("number"))),M("shrink",Ee(Q(),G("number"))),M("justify-items",Pe("value",_y)),M("justify",Pe("value",Ny)),M("items",Pe("value",Ry)),M("content",Pe("value",Py)),M("self",Pe("value",Ly)),M("basis",G("spacing")),M("grid-cols",Ee(Pe("value",["none","subgrid"]),G("gridCols"))),M("grid-rows",Ee(Pe("value",["none","subgrid"]),G("gridRows"))),M("col-span",G("colSpan")),M("row-span",G("rowSpan")),M("order",G("order"))]),...Vt("overflow",[M("overflow-x",Pe("value",["auto","hidden","clip","visible","scroll"])),M("overflow-y",Pe("value",["auto","hidden","clip","visible","scroll"])),M("overflow",Pe("value",["auto","hidden","clip","visible","scroll"]))])];let Ut=null,ms=!1;const Il=[],Ol=[],Dl=[];function Iy(){return window.location.origin.replace(/^http/,"ws")}function Qp(){if(Ut)return;const e=Iy();Ut=new WebSocket(e),Ut.addEventListener("open",()=>{ms=!0,Rr({type:"REGISTER",role:"panel"});for(const t of Ol)t()}),Ut.addEventListener("close",()=>{ms=!1,Ut=null;for(const t of Dl)t();setTimeout(()=>Qp(),3e3)}),Ut.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of Il)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),Ut.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function Rr(e){ms&&Ut&&Ut.send(JSON.stringify(e))}function xe(e,t){Rr({...t,to:e})}function Oy(e){return Il.push(e),()=>{const t=Il.indexOf(e);t!==-1&&Il.splice(t,1)}}function Dy(e){return Ol.push(e),()=>{const t=Ol.indexOf(e);t!==-1&&Ol.splice(t,1)}}function zy(e){return Dl.push(e),()=>{const t=Dl.indexOf(e);t!==-1&&Dl.splice(t,1)}}function My(){return ms}const Xp=[{name:"popover",label:"Popover",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),a.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),a.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],Zp="tw-panel-container";function $y(){try{const e=localStorage.getItem(Zp);if(e&&Xp.some(t=>t.name===e))return e}catch{}return"popover"}function Xc(){const[e,t]=b.useState($y),[n,r]=b.useState(!1),o=b.useRef(null);b.useEffect(()=>{function s(i){o.current&&!o.current.contains(i.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function l(s){if(s!==e){try{localStorage.setItem(Zp,s)}catch{}t(s),xe("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}return a.jsxs("div",{ref:o,className:"relative",children:[a.jsx("button",{title:"Change container",onClick:()=>r(s=>!s),className:"w-7 h-7 flex items-center justify-center rounded border border-transparent text-bv-text-mid bg-transparent cursor-pointer transition-colors hover:bg-bv-surface hover:border-bv-border hover:text-bv-text",children:a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),a.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),a.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),a.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),a.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&a.jsxs("div",{className:"absolute top-[calc(100%+4px)] right-0 bg-bv-surface border border-[#4f4f4f] rounded-lg shadow-[0_4px_16px_rgba(0,0,0,0.25)] p-1.5 flex flex-col gap-px min-w-[148px] z-50",children:[a.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),Xp.map(s=>a.jsxs("button",{onClick:()=>l(s.name),className:`flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors ${s.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[s.icon,s.label]},s.name)),a.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),a.jsxs("button",{onClick:()=>{r(!1),xe("overlay",{type:"CLOSE_PANEL"})},className:"flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors bg-transparent text-red-400 hover:bg-red-500/10 hover:text-red-300",children:[a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}const xi=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition??null:null;function Zc({draft:e,currentElementKey:t,onAddMessage:n,onDiscard:r}){const[o,l]=b.useState(""),[s,i]=b.useState(!1),[u,c]=b.useState(null),d=b.useRef(null),p=b.useRef(null),f=b.useRef("");b.useEffect(()=>{var h;(h=d.current)==null||h.focus()},[]);const g=e.filter(h=>h.kind==="message"),v=!!o.trim()&&!!t;function w(){var y;const h=o.trim();!h||!t||(n(h,t),l(""),(y=d.current)==null||y.focus())}function S(){var y;if(s){(y=p.current)==null||y.stop();return}if(!xi)return;f.current=o;const h=new xi;h.continuous=!1,h.interimResults=!0,h.lang="en-US",h.onresult=x=>{let j="";for(let C=0;C<x.results.length;C++)j+=x.results[C][0].transcript;const k=f.current.trimEnd();l(k?`${k} ${j}`:j)},h.onend=()=>i(!1),h.onerror=x=>{console.error("[mic] SpeechRecognition error:",x.error,x.message),i(!1),x.error==="not-allowed"&&c("Microphone blocked — allow access in your browser's address bar, then reload.")},p.current=h;try{h.start(),i(!0),console.log("[mic] recognition started")}catch(x){console.error("[mic] recognition.start() threw:",x)}}function m(h){(h.metaKey||h.ctrlKey)&&h.key==="Enter"&&(h.preventDefault(),w())}return a.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx("textarea",{ref:d,className:"w-full min-h-[80px] p-2 bg-bv-bg border border-bv-border rounded text-[13px] font-[family-name:var(--font-ui)] text-bv-text placeholder:text-bv-muted resize-y focus:outline-none focus:border-bv-teal",placeholder:t?"Add context for the AI agent…":"Select an element to add contextual message…",value:o,onChange:h=>l(h.target.value),onKeyDown:m,disabled:!t}),a.jsxs("div",{className:"flex items-center justify-between",children:[xi?a.jsx("button",{type:"button",title:s?"Stop recording":"Record voice message",onClick:S,className:`flex items-center justify-center w-7 h-7 rounded-full border-none cursor-pointer transition-colors ${s?"bg-bv-orange text-white":u?"bg-bv-surface text-bv-orange hover:bg-bv-surface-hi":"bg-bv-surface text-bv-text-mid hover:text-bv-teal hover:bg-bv-surface-hi"}`,children:s?a.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-white animate-pulse"}):a.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:a.jsx("path",{d:"M12 1a4 4 0 0 1 4 4v7a4 4 0 0 1-8 0V5a4 4 0 0 1 4-4zm-1.5 4v7a1.5 1.5 0 0 0 3 0V5a1.5 1.5 0 0 0-3 0zM6 11a1 1 0 0 1 1 1 5 5 0 0 0 10 0 1 1 0 1 1 2 0 7 7 0 0 1-6 6.93V21h2a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2h2v-2.07A7 7 0 0 1 5 12a1 1 0 0 1 1-1z"})})}):a.jsx("span",{}),a.jsx("button",{type:"button",className:"px-3 py-1 text-[11px] font-semibold rounded bg-bv-teal text-white border-none cursor-pointer hover:opacity-90 transition-opacity disabled:opacity-50 disabled:cursor-not-allowed",disabled:!v,onClick:w,children:"Add Message"})]}),u&&a.jsx("p",{className:"text-[11px] text-bv-orange mt-1",children:u})]}),g.length>0&&a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),a.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Staged Messages"})]}),g.map(h=>{var y;return a.jsxs("div",{className:"flex items-start gap-2 p-2 bg-bv-surface rounded border border-bv-border group",children:[a.jsx("span",{className:"text-[12px] shrink-0 mt-0.5",children:"💬"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"text-[12px] font-[family-name:var(--font-ui)] text-bv-text break-words",children:['"',h.message,'"']}),h.elementKey&&a.jsx("div",{className:"text-[11px] text-bv-text-mid mt-0.5",children:((y=h.component)==null?void 0:y.name)||h.elementKey})]}),a.jsx("button",{type:"button",className:"shrink-0 text-[10px] px-1 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange transition-colors opacity-0 group-hover:opacity-100",onClick:()=>r(h.id),title:"Discard",children:"✕"})]},h.id)})]})]})}function wl({label:e,count:t,items:n,activeColor:r,dotColor:o,onCommit:l,onDiscard:s,onCommitAll:i,onDiscardAll:u}){const[c,d]=b.useState(!1),p=b.useRef(null),f=b.useRef(null),[g,v]=b.useState(void 0);b.useEffect(()=>{if(!c||!f.current)return;const h=f.current.getBoundingClientRect(),y=220,x=window.innerWidth,j=4;let k=h.left+h.width/2-y/2;k=Math.max(j,Math.min(k,x-y-j)),v(k-h.left)},[c]),b.useEffect(()=>{if(!c)return;function m(h){p.current&&!p.current.contains(h.target)&&d(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[c]),b.useEffect(()=>{if(!c)return;function m(h){h.key==="Escape"&&d(!1)}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[c]);const w=t>0,S=l||s||i||u;return a.jsxs("div",{ref:p,className:"relative",children:[a.jsxs("button",{ref:f,className:`flex items-center gap-1 text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${w?`${r} font-medium`:"text-bv-muted"} ${w?"hover:underline":""}`,onClick:()=>w&&d(!c),disabled:!w,type:"button",children:[o&&a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o}`}),t," ",e]}),c&&a.jsxs("div",{className:"absolute bottom-full mb-1 min-w-[220px] bg-bv-surface border border-bv-border rounded-lg shadow-lg overflow-hidden flex flex-col z-[9999]",style:g!==void 0?{left:`${g}px`}:void 0,children:[a.jsxs("div",{className:"px-3 py-1.5 border-b border-bv-border text-[11px] font-semibold text-bv-text-mid uppercase tracking-wide",children:[e," (",t,")"]}),a.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?a.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(m=>{var x,j;const h="kind"in m&&m.kind==="message",y="kind"in m&&m.kind==="design";return a.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-bv-border last:border-b-0 group",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[!h&&!y&&((x=m.component)==null?void 0:x.name)&&a.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:m.component.name}),y?a.jsxs("div",{className:"text-[11px] text-bv-text",children:[a.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[a.jsx("span",{children:"✏️"}),a.jsxs("span",{className:"truncate",children:["Drawing",(j=m.component)!=null&&j.name?` in ${m.component.name}`:""]})]}),"image"in m&&m.image&&a.jsx("img",{src:m.image,alt:"Design drawing",className:"w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):h?a.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[a.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in m&&m.message||"",'"']}):a.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:m.originalClass?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"line-through text-bv-muted",children:m.originalClass})," → ",a.jsx("span",{className:"text-bv-teal",children:m.newClass})]}):a.jsxs("span",{className:"text-bv-teal",children:["+",m.newClass]})})]}),(l||s)&&a.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&a.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:k=>{k.stopPropagation(),l(m.id)},title:"Commit to Agent",type:"button",children:"✓"}),s&&a.jsx("button",{className:"text-[10px] px-1.5 py-0.5 rounded border-none cursor-pointer bg-transparent text-bv-muted hover:text-bv-orange hover:bg-bv-surface-hi transition-colors",onClick:k=>{k.stopPropagation(),s(m.id)},title:"Discard",type:"button",children:"✕"})]})]},m.id)})}),S&&n.length>0&&(i||u)&&a.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[i&&a.jsx("button",{className:"text-[10px] px-2 py-1 rounded border-none cursor-pointer font-semibold bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:()=>{i(),d(!1)},type:"button",children:"Commit All"}),u&&a.jsx("button",{className:"text-[10px] px-2 py-1 rounded cursor-pointer font-semibold bg-transparent border border-bv-border text-bv-text-mid hover:text-bv-orange hover:border-bv-orange transition-colors",onClick:()=>{u(),d(!1)},type:"button",children:"Discard All"})]})]})]})}function Jc({tabs:e,activeTab:t,onTabChange:n}){const[r,o]=b.useState(null);return a.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(l=>{const s=l.id===t,i=l.disabled===!0;return a.jsxs("div",{className:"relative",onMouseEnter:()=>i&&l.tooltip&&o(l.id),onMouseLeave:()=>o(null),children:[a.jsxs("button",{type:"button",className:`relative px-3 py-2 text-[11px] font-medium font-[family-name:var(--font-ui)] border-none bg-transparent cursor-pointer transition-colors ${i?"text-bv-muted cursor-not-allowed":s?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:i,onClick:()=>!i&&n(l.id),"aria-selected":s,role:"tab",children:[l.label,s&&a.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===l.id&&l.tooltip&&a.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-[10px] text-white bg-bv-text rounded whitespace-nowrap z-[9999]",children:l.tooltip})]},l.id)})})}function Ky(){const[e,t]=b.useState([]),[n,r]=b.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[o,l]=b.useState({draft:[],commits:[]}),[s,i]=b.useState(!1),u=b.useRef(e);u.current=e;const c=b.useRef(o);c.current=o;const d=b.useCallback((C,T)=>{xe("overlay",{type:"PATCH_PREVIEW",oldClass:C,newClass:T})},[]),p=b.useCallback(C=>{xe("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:C})},[]),f=b.useCallback(()=>{xe("overlay",{type:"PATCH_REVERT"})},[]),g=b.useCallback((C,T,$,_)=>{if(_===$){t(z=>{const R=z.find(I=>I.kind==="class-change"&&I.elementKey===C&&I.property===T);return R&&R.kind==="class-change"&&R.newClass!==$?xe("overlay",{type:"PATCH_REVERT_STAGED",oldClass:R.newClass,newClass:$}):xe("overlay",{type:"PATCH_REVERT"}),z.filter(I=>!(I.kind==="class-change"&&I.elementKey===C&&I.property===T))});return}const F=crypto.randomUUID();t(z=>{const R=z.filter(q=>!(q.kind==="class-change"&&q.elementKey===C&&q.property===T)),I={id:F,kind:"class-change",elementKey:C,status:"staged",originalClass:$,newClass:_,property:T,timestamp:new Date().toISOString()};return[...R,I]}),xe("overlay",{type:"PATCH_STAGE",id:F,oldClass:$,newClass:_,property:T})},[]),v=b.useCallback((C,T,$)=>{const _=crypto.randomUUID(),F=$?{name:$}:void 0;t(z=>{const R={id:_,kind:"message",elementKey:T,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:C,component:F};return[...z,R]}),Rr(F?{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T,component:F}:{type:"MESSAGE_STAGE",id:_,message:C,elementKey:T})},[]),w=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=u.current.filter(_=>_.status==="staged").map(_=>_.id),$=Array.from(new Set([...C,...T]));$.length!==0&&(Rr({type:"PATCH_COMMIT",ids:$}),t([]))},[]),S=b.useCallback(C=>{t(T=>T.filter($=>$.id!==C)),Rr({type:"DISCARD_DRAFTS",ids:[C]}),xe("overlay",{type:"PATCH_REVERT"})},[]),m=b.useCallback(()=>{const C=c.current.draft.map(_=>_.id),T=u.current.filter(_=>_.status==="staged").map(_=>_.id),$=Array.from(new Set([...C,...T]));t([]),$.length>0&&Rr({type:"DISCARD_DRAFTS",ids:$}),xe("overlay",{type:"PATCH_REVERT"})},[]),h=b.useCallback(()=>{},[]),y=b.useCallback(C=>{r({draft:C.draftCount,committed:C.committedCount,implementing:C.implementingCount,implemented:C.implementedCount,partial:C.partialCount,error:C.errorCount}),l({draft:C.draft,commits:C.commits}),i(!!C.agentWaiting)},[]),x=b.useCallback(C=>{r({draft:C.staged,committed:C.committed,implementing:C.implementing,implemented:C.implemented,partial:0,error:0})},[]),j=e.filter(C=>C.status==="staged").length,k={draft:Math.max(j,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:k,queueState:o,agentWaiting:s,preview:d,previewBatch:p,revertPreview:f,stage:g,stageMessage:v,commitAll:w,discard:S,discardAll:m,reset:h,handleQueueUpdate:y,handlePatchUpdate:x}}function Ms(){return typeof window<"u"}function Zr(e){return Iu(e)?(e.nodeName||"").toLowerCase():"#document"}function ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zt(e){var t;return(t=(Iu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Iu(e){return Ms()?e instanceof Node||e instanceof ct(e).Node:!1}function Ne(e){return Ms()?e instanceof Element||e instanceof ct(e).Element:!1}function Mt(e){return Ms()?e instanceof HTMLElement||e instanceof ct(e).HTMLElement:!1}function Ra(e){return!Ms()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ct(e).ShadowRoot}function qo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=St(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Fy(e){return/^(table|td|th)$/.test(Zr(e))}function $s(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Wy=/transform|translate|scale|rotate|perspective|filter/,Vy=/paint|layout|strict|content/,Fn=e=>!!e&&e!=="none";let wi;function Ou(e){const t=Ne(e)?St(e):e;return Fn(t.transform)||Fn(t.translate)||Fn(t.scale)||Fn(t.rotate)||Fn(t.perspective)||!Ks()&&(Fn(t.backdropFilter)||Fn(t.filter))||Wy.test(t.willChange||"")||Vy.test(t.contain||"")}function Hy(e){let t=sn(e);for(;Mt(t)&&!en(t);){if(Ou(t))return t;if($s(t))return null;t=sn(t)}return null}function Ks(){return wi==null&&(wi=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wi}function en(e){return/^(html|body|#document)$/.test(Zr(e))}function St(e){return ct(e).getComputedStyle(e)}function Fs(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sn(e){if(Zr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ra(e)&&e.host||zt(e);return Ra(t)?t.host:t}function Jp(e){const t=sn(e);return en(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mt(t)&&qo(t)?t:Jp(t)}function Ln(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Jp(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),s=ct(o);if(l){const i=Pa(s);return t.concat(s,s.visualViewport||[],qo(o)?o:[],i&&n?Ln(i):[])}else return t.concat(o,Ln(o,[],n))}function Pa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Gr=Math.min,it=Math.max,hs=Math.round,bl=Math.floor,Ot=e=>({x:e,y:e}),By={left:"right",right:"left",bottom:"top",top:"bottom"};function qc(e,t,n){return it(e,Gr(t,n))}function el(e,t){return typeof e=="function"?e(t):e}function On(e){return e.split("-")[0]}function tl(e){return e.split("-")[1]}function qp(e){return e==="x"?"y":"x"}function em(e){return e==="y"?"height":"width"}function Jt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function tm(e){return qp(Jt(e))}function Uy(e,t,n){n===void 0&&(n=!1);const r=tl(e),o=tm(e),l=em(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=gs(s)),[s,gs(s)]}function Gy(e){const t=gs(e);return[_a(e),t,_a(t)]}function _a(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ed=["left","right"],td=["right","left"],Yy=["top","bottom"],Qy=["bottom","top"];function Xy(e,t,n){switch(e){case"top":case"bottom":return n?t?td:ed:t?ed:td;case"left":case"right":return t?Yy:Qy;default:return[]}}function Zy(e,t,n,r){const o=tl(e);let l=Xy(On(e),n==="start",r);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(_a)))),l}function gs(e){const t=On(e);return By[t]+e.slice(t.length)}function Jy(e){return{top:0,right:0,bottom:0,left:0,...e}}function qy(e){return typeof e!="number"?Jy(e):{top:e,right:e,bottom:e,left:e}}function ys(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
|
|
41
|
-
* tabbable 6.4.0
|
|
42
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
43
|
-
*/var ev=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],La=ev.join(","),nm=typeof Element>"u",Uo=nm?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vs=!nm&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},xs=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=o===""||o==="true",s=l||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):xs(t.parentNode));return s},tv=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},nv=function(t,n,r){if(xs(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(La));return n&&Uo.call(t,La)&&o.unshift(t),o=o.filter(r),o},Aa=function(t,n,r){for(var o=[],l=Array.from(t);l.length;){var s=l.shift();if(!xs(s,!1))if(s.tagName==="SLOT"){var i=s.assignedElements(),u=i.length?i:s.children,c=Aa(u,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var d=Uo.call(s,La);d&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var p=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!xs(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(p&&f){var g=Aa(p===!0?s.children:p.children,!0,r);r.flatten?o.push.apply(o,g):o.push({scopeParent:s,candidates:g})}else l.unshift.apply(l,s.children)}}return o},rm=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},om=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||tv(t))&&!rm(t)?0:t.tabIndex},rv=function(t,n){var r=om(t);return r<0&&n&&!rm(t)?0:r},ov=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lm=function(t){return t.tagName==="INPUT"},lv=function(t){return lm(t)&&t.type==="hidden"},sv=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},iv=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},av=function(t){if(!t.name)return!0;var n=t.form||vs(t),r=function(i){return n.querySelectorAll('input[type="radio"][name="'+i+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var l=iv(o,t.form);return!l||l===t},uv=function(t){return lm(t)&&t.type==="radio"},cv=function(t){return uv(t)&&!av(t)},dv=function(t){var n,r=t&&vs(t),o=(n=r)===null||n===void 0?void 0:n.host,l=!1;if(r&&r!==t){var s,i,u;for(l=!!((s=o)!==null&&s!==void 0&&(i=s.ownerDocument)!==null&&i!==void 0&&i.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!l&&o;){var c,d,p;r=vs(o),o=(c=r)===null||c===void 0?void 0:c.host,l=!!((d=o)!==null&&d!==void 0&&(p=d.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return l},nd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},fv=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Uo.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Uo.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,d=vs(t);if(c&&!c.shadowRoot&&o(c)===!0)return nd(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=u}if(dv(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return nd(t);return!1},pv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Uo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},mv=function(t,n){return!(n.disabled||lv(n)||fv(n,t)||sv(n)||pv(n))},rd=function(t,n){return!(cv(n)||om(n)<0||!mv(t,n))},hv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},sm=function(t){var n=[],r=[];return t.forEach(function(o,l){var s=!!o.scopeParent,i=s?o.scopeParent:o,u=rv(i,s),c=s?sm(o.candidates):i;u===0?s?n.push.apply(n,c):n.push(i):r.push({documentOrder:l,tabIndex:u,item:o,isScope:s,content:c})}),r.sort(ov).reduce(function(o,l){return l.isScope?o.push.apply(o,l.content):o.push(l.content),o},[]).concat(n)},im=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Aa([t],n.includeContainer,{filter:rd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:hv}):r=nv(t,n.includeContainer,rd.bind(null,n)),sm(r)};function gv(){return/apple/i.test(navigator.vendor)}function yv(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ia(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ra(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function mo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function bi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function vv(e){return e.matches("html,body")}function Go(e){return(e==null?void 0:e.ownerDocument)||document}function zl(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var l;return o.parentId===t&&(!n||((l=o.context)==null?void 0:l.open))}).flatMap(o=>[o,...zl(e,o.id,n)])}function xv(e){return"nativeEvent"in e}var wv=typeof document<"u",bv=function(){},Jn=wv?b.useLayoutEffect:bv;const Sv={...Wd},kv=Sv.useInsertionEffect,Cv=kv||(e=>e());function gr(e){const t=b.useRef(()=>{});return Cv(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const am=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function um(e,t){const n=im(e,am()),r=n.length;if(r===0)return;const o=yv(Go(e)),l=n.indexOf(o),s=l===-1?t===1?0:r-1:l+t;return n[s]}function jv(e){return um(Go(e).body,1)||e}function Ev(e){return um(Go(e).body,-1)||e}function Si(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ia(n,r)}function Tv(e){im(e,am()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function od(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ld(e,t,n){let{reference:r,floating:o}=e;const l=Jt(t),s=tm(t),i=em(s),u=On(t),c=l==="y",d=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,f=r[i]/2-o[i]/2;let g;switch(u){case"top":g={x:d,y:r.y-o.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-o.width,y:p};break;default:g={x:r.x,y:r.y}}switch(tl(t)){case"start":g[s]-=f*(n&&c?-1:1);break;case"end":g[s]+=f*(n&&c?-1:1);break}return g}async function Nv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:s,elements:i,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:f=!1,padding:g=0}=el(t,e),v=qy(g),S=i[f?p==="floating"?"reference":"floating":p],m=ys(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(i.floating)),boundary:c,rootBoundary:d,strategy:u})),h=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(i.floating)),x=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},j=ys(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:h,offsetParent:y,strategy:u}):h);return{top:(m.top-j.top+v.top)/x.y,bottom:(j.bottom-m.bottom+v.bottom)/x.y,left:(m.left-j.left+v.left)/x.x,right:(j.right-m.right+v.right)/x.x}}const Rv=50,Pv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,i=s.detectOverflow?s:{...s,detectOverflow:Nv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:p}=ld(c,r,u),f=r,g=0;const v={};for(let w=0;w<l.length;w++){const S=l[w];if(!S)continue;const{name:m,fn:h}=S,{x:y,y:x,data:j,reset:k}=await h({x:d,y:p,initialPlacement:r,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});d=y??d,p=x??p,v[m]={...v[m],...j},k&&g<Rv&&(g++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:d,y:p}=ld(c,f,u)),w=-1)}return{x:d,y:p,placement:f,strategy:o,middlewareData:v}},_v=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:s,initialPlacement:i,platform:u,elements:c}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,...S}=el(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const m=On(o),h=Jt(i),y=On(i)===i,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),j=f||(y||!w?[gs(i)]:Gy(i)),k=v!=="none";!f&&k&&j.push(...Zy(i,w,v,x));const C=[i,...j],T=await u.detectOverflow(t,S),$=[];let _=((r=l.flip)==null?void 0:r.overflows)||[];if(d&&$.push(T[m]),p){const I=Uy(o,s,x);$.push(T[I[0]],T[I[1]])}if(_=[..._,{placement:o,overflows:$}],!$.every(I=>I<=0)){var F,z;const I=(((F=l.flip)==null?void 0:F.index)||0)+1,q=C[I];if(q&&(!(p==="alignment"?h!==Jt(q):!1)||_.every(N=>Jt(N.placement)===h?N.overflows[0]>0:!0)))return{data:{index:I,overflows:_},reset:{placement:q}};let W=(z=_.filter(oe=>oe.overflows[0]<=0).sort((oe,N)=>oe.overflows[1]-N.overflows[1])[0])==null?void 0:z.placement;if(!W)switch(g){case"bestFit":{var R;const oe=(R=_.filter(N=>{if(k){const L=Jt(N.placement);return L===h||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,P)=>L+P,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:R[0];oe&&(W=oe);break}case"initialPlacement":W=i;break}if(o!==W)return{reset:{placement:W}}}return{}}}},Lv=new Set(["left","top"]);async function Av(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=On(n),i=tl(n),u=Jt(n)==="y",c=Lv.has(s)?-1:1,d=l&&u?-1:1,p=el(t,e);let{mainAxis:f,crossAxis:g,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof v=="number"&&(g=i==="end"?v*-1:v),u?{x:g*d,y:f*c}:{x:f*c,y:g*d}}const Iv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:s,middlewareData:i}=t,u=await Av(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:s}}}}},Ov=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:u={fn:m=>{let{x:h,y}=m;return{x:h,y}}},...c}=el(e,t),d={x:n,y:r},p=await l.detectOverflow(t,c),f=Jt(On(o)),g=qp(f);let v=d[g],w=d[f];if(s){const m=g==="y"?"top":"left",h=g==="y"?"bottom":"right",y=v+p[m],x=v-p[h];v=qc(y,v,x)}if(i){const m=f==="y"?"top":"left",h=f==="y"?"bottom":"right",y=w+p[m],x=w-p[h];w=qc(y,w,x)}const S=u.fn({...t,[g]:v,[f]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:s,[f]:i}}}}}},Dv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:s,elements:i}=t,{apply:u=()=>{},...c}=el(e,t),d=await s.detectOverflow(t,c),p=On(o),f=tl(o),g=Jt(o)==="y",{width:v,height:w}=l.floating;let S,m;p==="top"||p==="bottom"?(S=p,m=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(m=p,S=f==="end"?"top":"bottom");const h=w-d.top-d.bottom,y=v-d.left-d.right,x=Gr(w-d[S],h),j=Gr(v-d[m],y),k=!t.middlewareData.shift;let C=x,T=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=h),k&&!f){const _=it(d.left,0),F=it(d.right,0),z=it(d.top,0),R=it(d.bottom,0);g?T=v-2*(_!==0||F!==0?_+F:it(d.left,d.right)):C=w-2*(z!==0||R!==0?z+R:it(d.top,d.bottom))}await u({...t,availableWidth:T,availableHeight:C});const $=await s.getDimensions(i.floating);return v!==$.width||w!==$.height?{reset:{rects:!0}}:{}}}};function cm(e){const t=St(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mt(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=hs(n)!==l||hs(r)!==s;return i&&(n=l,r=s),{width:n,height:r,$:i}}function Du(e){return Ne(e)?e:e.contextElement}function zr(e){const t=Du(e);if(!Mt(t))return Ot(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=cm(t);let s=(l?hs(n.width):n.width)/r,i=(l?hs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const zv=Ot(0);function dm(e){const t=ct(e);return!Ks()||!t.visualViewport?zv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ct(e)?!1:t}function or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Du(e);let s=Ot(1);t&&(r?Ne(r)&&(s=zr(r)):s=zr(e));const i=Mv(l,n,r)?dm(l):Ot(0);let u=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,d=o.width/s.x,p=o.height/s.y;if(l){const f=ct(l),g=r&&Ne(r)?ct(r):r;let v=f,w=Pa(v);for(;w&&r&&g!==v;){const S=zr(w),m=w.getBoundingClientRect(),h=St(w),y=m.left+(w.clientLeft+parseFloat(h.paddingLeft))*S.x,x=m.top+(w.clientTop+parseFloat(h.paddingTop))*S.y;u*=S.x,c*=S.y,d*=S.x,p*=S.y,u+=y,c+=x,v=ct(w),w=Pa(v)}}return ys({width:d,height:p,x:u,y:c})}function Ws(e,t){const n=Fs(e).scrollLeft;return t?t.left+n:or(zt(e)).left+n}function fm(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ws(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function $v(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",s=zt(r),i=t?$s(t.floating):!1;if(r===s||i&&l)return n;let u={scrollLeft:0,scrollTop:0},c=Ot(1);const d=Ot(0),p=Mt(r);if((p||!p&&!l)&&((Zr(r)!=="body"||qo(s))&&(u=Fs(r)),p)){const g=or(r);c=zr(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const f=s&&!p&&!l?fm(s,u):Ot(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-u.scrollTop*c.y+d.y+f.y}}function Kv(e){return Array.from(e.getClientRects())}function Fv(e){const t=zt(e),n=Fs(e),r=e.ownerDocument.body,o=it(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=it(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ws(e);const i=-n.scrollTop;return St(r).direction==="rtl"&&(s+=it(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:s,y:i}}const sd=25;function Wv(e,t){const n=ct(e),r=zt(e),o=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,i=0,u=0;if(o){l=o.width,s=o.height;const d=Ks();(!d||d&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}const c=Ws(r);if(c<=0){const d=r.ownerDocument,p=d.body,f=getComputedStyle(p),g=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-p.clientWidth-g);v<=sd&&(l-=v)}else c<=sd&&(l+=c);return{width:l,height:s,x:i,y:u}}function Vv(e,t){const n=or(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=Mt(e)?zr(e):Ot(1),s=e.clientWidth*l.x,i=e.clientHeight*l.y,u=o*l.x,c=r*l.y;return{width:s,height:i,x:u,y:c}}function id(e,t,n){let r;if(t==="viewport")r=Wv(e,n);else if(t==="document")r=Fv(zt(e));else if(Ne(t))r=Vv(t,n);else{const o=dm(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ys(r)}function pm(e,t){const n=sn(e);return n===t||!Ne(n)||en(n)?!1:St(n).position==="fixed"||pm(n,t)}function Hv(e,t){const n=t.get(e);if(n)return n;let r=Ln(e,[],!1).filter(i=>Ne(i)&&Zr(i)!=="body"),o=null;const l=St(e).position==="fixed";let s=l?sn(e):e;for(;Ne(s)&&!en(s);){const i=St(s),u=Ou(s);!u&&i.position==="fixed"&&(o=null),(l?!u&&!o:!u&&i.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||qo(s)&&!u&&pm(e,s))?r=r.filter(d=>d!==s):o=i,s=sn(s)}return t.set(e,r),r}function Bv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?$s(t)?[]:Hv(t,this._c):[].concat(n),r],i=id(t,s[0],o);let u=i.top,c=i.right,d=i.bottom,p=i.left;for(let f=1;f<s.length;f++){const g=id(t,s[f],o);u=it(g.top,u),c=Gr(g.right,c),d=Gr(g.bottom,d),p=it(g.left,p)}return{width:c-p,height:d-u,x:p,y:u}}function Uv(e){const{width:t,height:n}=cm(e);return{width:t,height:n}}function Gv(e,t,n){const r=Mt(t),o=zt(t),l=n==="fixed",s=or(e,!0,l,t);let i={scrollLeft:0,scrollTop:0};const u=Ot(0);function c(){u.x=Ws(o)}if(r||!r&&!l)if((Zr(t)!=="body"||qo(o))&&(i=Fs(t)),r){const g=or(t,!0,l,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else o&&c();l&&!r&&o&&c();const d=o&&!r&&!l?fm(o,i):Ot(0),p=s.left+i.scrollLeft-u.x-d.x,f=s.top+i.scrollTop-u.y-d.y;return{x:p,y:f,width:s.width,height:s.height}}function ki(e){return St(e).position==="static"}function ad(e,t){if(!Mt(e)||St(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zt(e)===n&&(n=n.ownerDocument.body),n}function mm(e,t){const n=ct(e);if($s(e))return n;if(!Mt(e)){let o=sn(e);for(;o&&!en(o);){if(Ne(o)&&!ki(o))return o;o=sn(o)}return n}let r=ad(e,t);for(;r&&Fy(r)&&ki(r);)r=ad(r,t);return r&&en(r)&&ki(r)&&!Ou(r)?n:r||Hy(e)||n}const Yv=async function(e){const t=this.getOffsetParent||mm,n=this.getDimensions,r=await n(e.floating);return{reference:Gv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qv(e){return St(e).direction==="rtl"}const Xv={convertOffsetParentRelativeRectToViewportRelativeRect:$v,getDocumentElement:zt,getClippingRect:Bv,getOffsetParent:mm,getElementRects:Yv,getClientRects:Kv,getDimensions:Uv,getScale:zr,isElement:Ne,isRTL:Qv};function hm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zv(e,t){let n=null,r;const o=zt(e);function l(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),l();const c=e.getBoundingClientRect(),{left:d,top:p,width:f,height:g}=c;if(i||t(),!f||!g)return;const v=bl(p),w=bl(o.clientWidth-(d+f)),S=bl(o.clientHeight-(p+g)),m=bl(d),y={rootMargin:-v+"px "+-w+"px "+-S+"px "+-m+"px",threshold:it(0,Gr(1,u))||1};let x=!0;function j(k){const C=k[0].intersectionRatio;if(C!==u){if(!x)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!hm(c,e.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(j,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,y)}n.observe(e)}return s(!0),l}function an(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Du(e),d=o||l?[...c?Ln(c):[],...t?Ln(t):[]]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),l&&m.addEventListener("resize",n)});const p=c&&i?Zv(c,n):null;let f=-1,g=null;s&&(g=new ResizeObserver(m=>{let[h]=m;h&&h.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(t)})),n()}),c&&!u&&g.observe(c),t&&g.observe(t));let v,w=u?or(e):null;u&&S();function S(){const m=or(e);w&&!hm(w,m)&&n(),w=m,v=requestAnimationFrame(S)}return n(),()=>{var m;d.forEach(h=>{o&&h.removeEventListener("scroll",n),l&&h.removeEventListener("resize",n)}),p==null||p(),(m=g)==null||m.disconnect(),g=null,u&&cancelAnimationFrame(v)}}const Jv=Iv,qv=Ov,ex=_v,tx=Dv,nx=(e,t,n)=>{const r=new Map,o={platform:Xv,...n},l={...o.platform,_c:r};return Pv(e,t,{...o,platform:l})};var rx=typeof document<"u",ox=function(){},Ml=rx?b.useLayoutEffect:ox;function ws(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ws(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!ws(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function gm(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ud(e,t){const n=gm(e);return Math.round(t*n)/n}function Ci(e){const t=b.useRef(e);return Ml(()=>{t.current=e}),t}function lx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:i=!0,whileElementsMounted:u,open:c}=e,[d,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=b.useState(r);ws(f,r)||g(r);const[v,w]=b.useState(null),[S,m]=b.useState(null),h=b.useCallback(N=>{N!==k.current&&(k.current=N,w(N))},[]),y=b.useCallback(N=>{N!==C.current&&(C.current=N,m(N))},[]),x=l||v,j=s||S,k=b.useRef(null),C=b.useRef(null),T=b.useRef(d),$=u!=null,_=Ci(u),F=Ci(o),z=Ci(c),R=b.useCallback(()=>{if(!k.current||!C.current)return;const N={placement:t,strategy:n,middleware:f};F.current&&(N.platform=F.current),nx(k.current,C.current,N).then(L=>{const P={...L,isPositioned:z.current!==!1};I.current&&!ws(T.current,P)&&(T.current=P,_u.flushSync(()=>{p(P)}))})},[f,t,n,F,z]);Ml(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(N=>({...N,isPositioned:!1})))},[c]);const I=b.useRef(!1);Ml(()=>(I.current=!0,()=>{I.current=!1}),[]),Ml(()=>{if(x&&(k.current=x),j&&(C.current=j),x&&j){if(_.current)return _.current(x,j,R);R()}},[x,j,R,_,$]);const q=b.useMemo(()=>({reference:k,floating:C,setReference:h,setFloating:y}),[h,y]),W=b.useMemo(()=>({reference:x,floating:j}),[x,j]),oe=b.useMemo(()=>{const N={position:n,left:0,top:0};if(!W.floating)return N;const L=ud(W.floating,d.x),P=ud(W.floating,d.y);return i?{...N,transform:"translate("+L+"px, "+P+"px)",...gm(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:P}},[n,i,W.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:R,refs:q,elements:W,floatingStyles:oe}),[d,R,q,W,oe])}const un=(e,t)=>{const n=Jv(e);return{name:n.name,fn:n.fn,options:[e,t]}},cn=(e,t)=>{const n=qv(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=(e,t)=>{const n=ex(e);return{name:n.name,fn:n.fn,options:[e,t]}},Oa=(e,t)=>{const n=tx(e);return{name:n.name,fn:n.fn,options:[e,t]}},sx="data-floating-ui-focusable",cd="active",dd="selected",ix={...Wd};let fd=!1,ax=0;const pd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ax++;function ux(){const[e,t]=b.useState(()=>fd?pd():void 0);return Jn(()=>{e==null&&t(pd())},[]),b.useEffect(()=>{fd=!0},[]),e}const cx=ix.useId,ym=cx||ux;function dx(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const fx=b.createContext(null),px=b.createContext(null),mx=()=>{var e;return((e=b.useContext(fx))==null?void 0:e.id)||null},vm=()=>b.useContext(px);function zu(e){return"data-floating-ui-"+e}const hx={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},md=b.forwardRef(function(t,n){const[r,o]=b.useState();Jn(()=>{gv()&&o("button")},[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[zu("focus-guard")]:"",style:hx};return a.jsx("span",{...t,...l})}),gx={clipPath:"inset(50%)",position:"fixed",top:0,left:0},xm=b.createContext(null),hd=zu("portal");function yx(e){e===void 0&&(e={});const{id:t,root:n}=e,r=ym(),o=vx(),[l,s]=b.useState(null),i=b.useRef(null);return Jn(()=>()=>{l==null||l.remove(),queueMicrotask(()=>{i.current=null})},[l]),Jn(()=>{if(!r||i.current)return;const u=t?document.getElementById(t):null;if(!u)return;const c=document.createElement("div");c.id=r,c.setAttribute(hd,""),u.appendChild(c),i.current=c,s(c)},[t,r]),Jn(()=>{if(n===null||!r||i.current)return;let u=n||(o==null?void 0:o.portalNode);u&&!Iu(u)&&(u=u.current),u=u||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(hd,""),u=c||u,u.appendChild(d),i.current=d,s(d)},[t,n,r,o]),l}function fn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,l=yx({id:n,root:r}),[s,i]=b.useState(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),p=b.useRef(null),f=s==null?void 0:s.modal,g=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||l);return b.useEffect(()=>{if(!l||!o||f)return;function w(S){l&&Si(S)&&(S.type==="focusin"?od:Tv)(l)}return l.addEventListener("focusin",w,!0),l.addEventListener("focusout",w,!0),()=>{l.removeEventListener("focusin",w,!0),l.removeEventListener("focusout",w,!0)}},[l,o,f]),b.useEffect(()=>{l&&(g||od(l))},[g,l]),a.jsxs(xm.Provider,{value:b.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:p,portalNode:l,setFocusManagerState:i}),[o,l]),children:[v&&l&&a.jsx(md,{"data-type":"outside",ref:u,onFocus:w=>{if(Si(w,l)){var S;(S=d.current)==null||S.focus()}else{const m=s?s.domReference:null,h=Ev(m);h==null||h.focus()}}}),v&&l&&a.jsx("span",{"aria-owns":l.id,style:gx}),l&&_u.createPortal(t,l),v&&l&&a.jsx(md,{"data-type":"outside",ref:c,onFocus:w=>{if(Si(w,l)){var S;(S=p.current)==null||S.focus()}else{const m=s?s.domReference:null,h=jv(m);h==null||h.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,w.nativeEvent,"focus-out"))}}})]})}const vx=()=>b.useContext(xm),xx={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wx={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},gd=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function lr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:l}=e,{enabled:s=!0,escapeKey:i=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:f=!1,bubbles:g,capture:v}=t,w=vm(),S=gr(typeof u=="function"?u:()=>!1),m=typeof u=="function"?S:u,h=b.useRef(!1),{escapeKey:y,outsidePress:x}=gd(g),{escapeKey:j,outsidePress:k}=gd(v),C=b.useRef(!1),T=gr(I=>{var q;if(!n||!s||!i||I.key!=="Escape"||C.current)return;const W=(q=l.current.floatingContext)==null?void 0:q.nodeId,oe=w?zl(w.nodesRef.current,W):[];if(!y&&(I.stopPropagation(),oe.length>0)){let N=!0;if(oe.forEach(L=>{var P;if((P=L.context)!=null&&P.open&&!L.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}r(!1,xv(I)?I.nativeEvent:I,"escape-key")}),$=gr(I=>{var q;const W=()=>{var oe;T(I),(oe=mo(I))==null||oe.removeEventListener("keydown",W)};(q=mo(I))==null||q.addEventListener("keydown",W)}),_=gr(I=>{var q;const W=l.current.insideReactTree;l.current.insideReactTree=!1;const oe=h.current;if(h.current=!1,c==="click"&&oe||W||typeof m=="function"&&!m(I))return;const N=mo(I),L="["+zu("inert")+"]",P=Go(o.floating).querySelectorAll(L);let U=Ne(N)?N:null;for(;U&&!en(U);){const je=sn(U);if(en(je)||!Ne(je))break;U=je}if(P.length&&Ne(N)&&!vv(N)&&!Ia(N,o.floating)&&Array.from(P).every(je=>!Ia(U,je)))return;if(Mt(N)&&R){const je=en(N),ae=St(N),Re=/auto|scroll/,me=je||Re.test(ae.overflowX),Jr=je||Re.test(ae.overflowY),qr=me&&N.clientWidth>0&&N.scrollWidth>N.clientWidth,dr=Jr&&N.clientHeight>0&&N.scrollHeight>N.clientHeight,eo=ae.direction==="rtl",to=dr&&(eo?I.offsetX<=N.offsetWidth-N.clientWidth:I.offsetX>N.clientWidth),$t=qr&&I.offsetY>N.clientHeight;if(to||$t)return}const X=(q=l.current.floatingContext)==null?void 0:q.nodeId,Qe=w&&zl(w.nodesRef.current,X).some(je=>{var ae;return bi(I,(ae=je.context)==null?void 0:ae.elements.floating)});if(bi(I,o.floating)||bi(I,o.domReference)||Qe)return;const $e=w?zl(w.nodesRef.current,X):[];if($e.length>0){let je=!0;if($e.forEach(ae=>{var Re;if((Re=ae.context)!=null&&Re.open&&!ae.context.dataRef.current.__outsidePressBubbles){je=!1;return}}),!je)return}r(!1,I,"outside-press")}),F=gr(I=>{var q;const W=()=>{var oe;_(I),(oe=mo(I))==null||oe.removeEventListener(c,W)};(q=mo(I))==null||q.addEventListener(c,W)});b.useEffect(()=>{if(!n||!s)return;l.current.__escapeKeyBubbles=y,l.current.__outsidePressBubbles=x;let I=-1;function q(P){r(!1,P,"ancestor-scroll")}function W(){window.clearTimeout(I),C.current=!0}function oe(){I=window.setTimeout(()=>{C.current=!1},Ks()?5:0)}const N=Go(o.floating);i&&(N.addEventListener("keydown",j?$:T,j),N.addEventListener("compositionstart",W),N.addEventListener("compositionend",oe)),m&&N.addEventListener(c,k?F:_,k);let L=[];return f&&(Ne(o.domReference)&&(L=Ln(o.domReference)),Ne(o.floating)&&(L=L.concat(Ln(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(Ln(o.reference.contextElement)))),L=L.filter(P=>{var U;return P!==((U=N.defaultView)==null?void 0:U.visualViewport)}),L.forEach(P=>{P.addEventListener("scroll",q,{passive:!0})}),()=>{i&&(N.removeEventListener("keydown",j?$:T,j),N.removeEventListener("compositionstart",W),N.removeEventListener("compositionend",oe)),m&&N.removeEventListener(c,k?F:_,k),L.forEach(P=>{P.removeEventListener("scroll",q)}),window.clearTimeout(I)}},[l,o,i,m,c,n,r,f,s,y,x,T,j,$,_,k,F]),b.useEffect(()=>{l.current.insideReactTree=!1},[l,m,c]);const z=b.useMemo(()=>({onKeyDown:T,...d&&{[xx[p]]:I=>{r(!1,I.nativeEvent,"reference-press")},...p!=="click"&&{onClick(I){r(!1,I.nativeEvent,"reference-press")}}}}),[T,r,d,p]),R=b.useMemo(()=>{function I(q){q.button===0&&(h.current=!0)}return{onKeyDown:T,onMouseDown:I,onMouseUp:I,[wx[c]]:()=>{l.current.insideReactTree=!0}}},[T,c,l]);return b.useMemo(()=>s?{reference:z,floating:R}:{},[s,z,R])}function bx(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=ym(),l=b.useRef({}),[s]=b.useState(()=>dx()),i=mx()!=null,[u,c]=b.useState(r.reference),d=gr((g,v,w)=>{l.current.openEvent=g?v:void 0,s.emit("openchange",{open:g,event:v,reason:w,nested:i}),n==null||n(g,v,w)}),p=b.useMemo(()=>({setPositionReference:c}),[]),f=b.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return b.useMemo(()=>({dataRef:l,open:t,onOpenChange:d,elements:f,events:s,floatingId:o,refs:p}),[t,d,f,s,o,p])}function pn(e){e===void 0&&(e={});const{nodeId:t}=e,n=bx({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,s]=b.useState(null),[i,u]=b.useState(null),d=(o==null?void 0:o.domReference)||l,p=b.useRef(null),f=vm();Jn(()=>{d&&(p.current=d)},[d]);const g=lx({...e,elements:{...o,...i&&{reference:i}}}),v=b.useCallback(y=>{const x=Ne(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;u(x),g.refs.setReference(x)},[g.refs]),w=b.useCallback(y=>{(Ne(y)||y===null)&&(p.current=y,s(y)),(Ne(g.refs.reference.current)||g.refs.reference.current===null||y!==null&&!Ne(y))&&g.refs.setReference(y)},[g.refs]),S=b.useMemo(()=>({...g.refs,setReference:w,setPositionReference:v,domReference:p}),[g.refs,w,v]),m=b.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),h=b.useMemo(()=>({...g,...r,refs:S,elements:m,nodeId:t}),[g,S,m,t,r]);return Jn(()=>{r.dataRef.current.floatingContext=h;const y=f==null?void 0:f.nodesRef.current.find(x=>x.id===t);y&&(y.context=h)}),b.useMemo(()=>({...g,context:h,refs:S,elements:m}),[g,S,m,h])}function ji(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[cd]:s,[dd]:i,...u}=e;l=u}return{...n==="floating"&&{tabIndex:-1,[sx]:""},...l,...t.map(s=>{const i=s?s[n]:null;return typeof i=="function"?e?i(e):null:i}).concat(e).reduce((s,i)=>(i&&Object.entries(i).forEach(u=>{let[c,d]=u;if(!(o&&[cd,dd].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var p;(p=r.get(c))==null||p.push(d),s[c]=function(){for(var f,g=arguments.length,v=new Array(g),w=0;w<g;w++)v[w]=arguments[w];return(f=r.get(c))==null?void 0:f.map(S=>S(...v)).find(S=>S!==void 0)}}}else s[c]=d}),s),{})}}function sr(e){e===void 0&&(e=[]);const t=e.map(i=>i==null?void 0:i.reference),n=e.map(i=>i==null?void 0:i.floating),r=e.map(i=>i==null?void 0:i.item),o=b.useCallback(i=>ji(i,e,"reference"),t),l=b.useCallback(i=>ji(i,e,"floating"),n),s=b.useCallback(i=>ji(i,e,"item"),r);return b.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:s}),[o,l,s])}const bs={"m-":{category:"spacing",themeKey:"spacing",valueType:"scalar",renderMode:"boxmodel",isComposite:!0,compositeRelatedPrefixes:["m-","mx-","my-","mt-","mr-","mb-","ml-","ms-","me-","p-","px-","py-","pt-","pr-","pb-","pl-","ps-","pe-","gap-","gap-x-","gap-y-","space-x-","space-y-","border-","border-t-","border-r-","border-b-","border-l-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-"],compositeExactMatches:["border","rounded"]},"mx-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"my-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ml-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ms-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"me-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"p-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"px-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"py-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pl-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ps-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pe-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-x-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-y-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"space-x-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"space-y-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"width"},"h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"height"},"min-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-width"},"max-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-width"},"min-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-height"},"max-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-height"},"size-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"size"},"font-":{category:"typography",themeKey:"fontWeight",valueType:"scalar",addable:!0},"text-":{category:"typography",themeKey:null,valueType:"enum"},"leading-":{category:"typography",themeKey:"lineHeight",valueType:"scalar",addable:!0},"tracking-":{category:"typography",themeKey:"letterSpacing",valueType:"scalar",addable:!0},"text-left":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-center":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-right":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-justify":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-start":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-end":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},italic:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-style",enumAlts:["italic","not-italic"]},"not-italic":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-style",enumAlts:["italic","not-italic"]},underline:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"line-through":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},overline:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"no-underline":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},uppercase:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},lowercase:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},capitalize:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},"normal-case":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},truncate:{category:"typography",themeKey:null,valueType:"enum"},"font-sans":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-serif":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-mono":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"align-baseline":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-middle":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-sub":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-super":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"bg-":{category:"color",themeKey:"colors",valueType:"color",renderMode:"gradient-editor",isComposite:!0,compositeRelatedPrefixes:["bg-","bg-gradient-to-","from-","via-","to-"]},"bg-gradient-to-":{category:"gradient",themeKey:null,valueType:"enum"},"from-":{category:"gradient",themeKey:"colors",valueType:"color"},"via-":{category:"gradient",themeKey:"colors",valueType:"color"},"to-":{category:"gradient",themeKey:"colors",valueType:"color"},"ring-":{category:"color",themeKey:"colors",valueType:"color"},"outline-":{category:"color",themeKey:"colors",valueType:"color"},"fill-":{category:"color",themeKey:"colors",valueType:"color"},"stroke-":{category:"color",themeKey:"colors",valueType:"color"},"decoration-":{category:"color",themeKey:"colors",valueType:"color"},border:{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-t-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-r-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-b-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-l-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},rounded:{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-t-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-r-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-b-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-l-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tr-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-br-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-bl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"opacity-":{category:"effects",themeKey:"opacity",valueType:"scalar",addable:!0},"shadow-":{category:"effects",themeKey:null,valueType:"enum"},block:{category:"layout",themeKey:null,valueType:"enum"},"inline-block":{category:"layout",themeKey:null,valueType:"enum"},inline:{category:"layout",themeKey:null,valueType:"enum"},grid:{category:"layout",themeKey:null,valueType:"enum"},"inline-grid":{category:"layout",themeKey:null,valueType:"enum"},hidden:{category:"layout",themeKey:null,valueType:"enum"},table:{category:"layout",themeKey:null,valueType:"enum"},contents:{category:"layout",themeKey:null,valueType:"enum"},static:{category:"layout",themeKey:null,valueType:"enum"},fixed:{category:"layout",themeKey:null,valueType:"enum"},absolute:{category:"layout",themeKey:null,valueType:"enum"},relative:{category:"layout",themeKey:null,valueType:"enum"},sticky:{category:"layout",themeKey:null,valueType:"enum"},"inset-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"top-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"right-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"bottom-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"left-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"z-":{category:"layout",themeKey:null,valueType:"enum"},flex:{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"flex-display",enumAlts:["flex","inline-flex"]},"inline-flex":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-display",enumAlts:["flex","inline-flex"]},"flex-row":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-row-reverse":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col-reverse":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-wrap":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-nowrap":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-wrap-reverse":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-1":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-initial":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-none":{category:"flexbox",themeKey:null,valueType:"enum"},grow:{category:"flexbox",themeKey:null,valueType:"enum"},"grow-0":{category:"flexbox",themeKey:null,valueType:"enum"},shrink:{category:"flexbox",themeKey:null,valueType:"enum"},"shrink-0":{category:"flexbox",themeKey:null,valueType:"enum"},"justify-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-between":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-around":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-evenly":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-baseline":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"content-normal":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-start":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-between":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-around":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-evenly":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-baseline":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"justify-items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"self-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"self-start":{category:"flexbox",themeKey:null,valueType:"enum"},"self-end":{category:"flexbox",themeKey:null,valueType:"enum"},"self-center":{category:"flexbox",themeKey:null,valueType:"enum"},"self-stretch":{category:"flexbox",themeKey:null,valueType:"enum"},"self-baseline":{category:"flexbox",themeKey:null,valueType:"enum"},"basis-":{category:"flexbox",themeKey:"spacing",valueType:"scalar"},"grid-cols-":{category:"flexbox",themeKey:null,valueType:"enum"},"grid-rows-":{category:"flexbox",themeKey:null,valueType:"enum"},"col-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"row-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"order-":{category:"flexbox",themeKey:null,valueType:"enum"}};function Sx(){const e={};for(const[t,n]of Object.entries(bs))if(n.valueType==="enum"&&n.enumAlts){const r=n.propertyKey??t.replace(/-$/g,"");for(const o of n.enumAlts)e[o]||(e[o]={alternatives:n.enumAlts,propertyKey:r})}return e}function kx(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(bs)){if(!r.addable)continue;const o=r.propertyKey??n.replace(/-$/g,"");if(t.has(o))continue;t.add(o);const l=o.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase()),s=r.enumAlts?r.enumAlts.slice(0,2).join("/")+(r.enumAlts.length>2?"/…":""):`${n}*`;e[r.category].push({name:l,prefixHint:s,prefix:n})}return e}function $l({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:o,onHover:l,onLeave:s,onClick:i,onRemove:u,onRemoveHover:c}){return a.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||s()},children:[a.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[a.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),u&&a.jsx("div",{title:"Remove class",className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] flex items-center justify-center ${t===""?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":"border-transparent hover:border-bv-orange hover:scale-110"}`,onMouseEnter:()=>{!r&&c&&c()},onClick:u,children:a.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})}),["black","white","transparent"].map(d=>n[d]!==void 0?a.jsx(yd,{prefix:e,colorName:d,colorValue:n[d],isCurrent:d===t,isLocked:o===`${e}${d}`,locked:r,onHover:l,onClick:i},d):null)]}),my.map(d=>{const p=n[d];return!p||typeof p!="object"?null:a.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[a.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:d}),hy.map(f=>p[f]!==void 0?a.jsx(yd,{prefix:e,colorName:`${d}-${f}`,colorValue:p[f],isCurrent:`${d}-${f}`===t,isLocked:o===`${e}${d}-${f}`,locked:r,onHover:l,onClick:i},`${d}-${f}`):null)]},d)})]})}function yd({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:o,locked:l,onHover:s,onClick:i}){const u=`${e}${t}`,c=o?"outline outline-2 outline-offset-2 outline-bv-teal border-transparent":r?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":l?"border-transparent":"border-transparent hover:border-bv-text hover:scale-110 hover:z-10",d=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return a.jsx("div",{title:u,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:d,onMouseEnter:()=>{l||s(u)},onClick:p=>{p.stopPropagation(),i(u)}})}const cr=b.forwardRef(function({onClose:t,children:n,...r},o){const l=b.useRef(null);return b.useEffect(()=>{var s;(s=l.current)==null||s.focus({preventScroll:!0})},[]),a.jsx("div",{ref:s=>{l.current=s,typeof o=="function"?o(s):o&&(o.current=s)},tabIndex:-1,onBlur:s=>{var i;(i=l.current)!=null&&i.contains(s.relatedTarget)||t()},onKeyDown:s=>{s.code==="Escape"&&t()},...r,children:n})}),Cx=4,jx=10;function xn({values:e,currentValue:t,lockedValue:n,locked:r,ghost:o,onStart:l,onHover:s,onLeave:i,onClick:u,onRemove:c,onRemoveHover:d}){const[p,f]=b.useState(!1),[g,v]=b.useState(null),w=b.useRef(null),S=b.useRef(null),m=b.useRef(null),{refs:h,floatingStyles:y}=pn({open:p,strategy:"fixed",placement:"bottom-start",middleware:[un(2),dn(),cn({padding:4})],whileElementsMounted:an}),x=n!==null&&e.includes(n),j=g!==null?e[g]:x?n:t;b.useEffect(()=>{var z,R;p&&m.current&&((R=(z=m.current).scrollIntoView)==null||R.call(z,{block:"nearest"}))},[p]);const k=r&&!x;function C(z){if(k)return;l==null||l();const R=x?n:t,I=e.indexOf(R);w.current={startX:z.clientX,startIndex:I>=0?I:0,didScrub:!1},z.currentTarget.setPointerCapture(z.pointerId),z.preventDefault()}function T(z){const R=w.current;if(!R)return;const I=z.clientX-R.startX;if(!R.didScrub&&Math.abs(I)>Cx&&(R.didScrub=!0,f(!1)),R.didScrub){const q=Math.round(I/jx),W=Math.max(0,Math.min(e.length-1,R.startIndex+q));v(W),s(e[W])}}function $(){const z=w.current;z&&(z.didScrub&&g!==null?u(e[g]):z.didScrub||f(R=>(R&&i(),!R)),v(null),w.current=null)}const _=g!==null,F=_?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":x?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border hover:bg-bv-teal/9 hover:text-bv-teal hover:ring-bv-teal":p?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border":k?"bg-bv-surface text-bv-text-mid":o?"border border-dashed border-bv-border text-bv-muted bg-transparent hover:border-bv-teal hover:text-bv-teal":"bg-bv-surface text-bv-text-mid hover:bg-bv-surface-hi hover:text-bv-text";return a.jsxs("div",{ref:S,className:"relative inline-block",children:[a.jsxs("div",{ref:h.setReference,className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${k?"cursor-default":"cursor-ew-resize"} ${F}`,onPointerDown:C,onPointerMove:T,onPointerUp:$,children:[!k&&a.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),j,!k&&a.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),p&&a.jsx(fn,{children:a.jsxs(cr,{ref:h.setFloating,style:y,className:"z-50 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onPointerDown:z=>z.stopPropagation(),onMouseLeave:i,onClose:()=>{f(!1),i()},children:[c&&a.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-[3px] text-[11px] font-mono cursor-pointer border-b border-bv-border text-bv-muted hover:text-red-400 ${t===""||n===""?"text-bv-orange":""}`,onMouseEnter:d,onClick:z=>{z.stopPropagation(),c(),f(!1)},children:[a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 opacity-70",children:[a.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),a.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),a.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(z=>{const R=z===(n??t),I=R?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return a.jsx("div",{ref:R?m:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${I}`,onMouseEnter:()=>s(z),onClick:q=>{q.stopPropagation(),u(z),f(!1)},children:z},z)})]})})]})}const Ex={px:.0625};function Pr(e){return isNaN(Number(e))?Ex[e]??1/0:Number(e)}function pr(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((o,l)=>Pr(o)-Pr(l)).map(o=>`${e}${o}`):t==="fontSize"?[...iy]:t==="fontWeight"?[...ay]:t==="borderRadius"?Ta:t==="lineHeight"?[...uy]:t==="letterSpacing"?[...cy]:t==="opacity"?dy:[]}const Tx=4,Nx=10;function Mr({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:o,axis:l="x",disabled:s,onHover:i,onLeave:u,onClick:c,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w}){const[S,m]=b.useState(!1),[h,y]=b.useState(null),x=b.useRef(null),j=b.useRef(null),k=b.useRef(null),{refs:C,floatingStyles:T}=pn({open:S,strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:4})],whileElementsMounted:an}),$=n!=null,_=n?t.indexOf(n):-1,F=h!==null?t[h]:null,z=F?o?o(F):F:r??e;b.useEffect(()=>{var P,U;S&&k.current&&((U=(P=k.current).scrollIntoView)==null||U.call(P,{block:"nearest"}))},[S]);function R(P){var X,Qe;if(s)return;P.preventDefault(),P.stopPropagation();const U=_>=0?_:0;x.current={startX:P.clientX,startY:P.clientY,startIndex:U,didScrub:!1},(Qe=(X=P.target).setPointerCapture)==null||Qe.call(X,P.pointerId)}function I(P){const U=x.current;if(!U)return;const X=l==="y"?-(P.clientY-U.startY):P.clientX-U.startX;if(!U.didScrub&&Math.abs(X)>Tx&&(U.didScrub=!0,m(!1),d==null||d()),U.didScrub){const Qe=Math.round(X/Nx),$e=Math.max(0,Math.min(t.length-1,U.startIndex+Qe));y($e),i==null||i(t[$e])}}function q(){const P=x.current;P&&(P.didScrub&&h!==null?(c==null||c(t[h]),y(null),x.current=null,p==null||p()):P.didScrub||(y(null),x.current=null,m(U=>U?(g==null||g(),u==null||u(),!1):(f==null||f(),!0))))}const W=h!==null,N=["bm-slot",$||W?"bm-has-val":"",W?"bm-scrubbing":""].filter(Boolean).join(" "),L=s?"default":l==="y"?"ns-resize":"ew-resize";return a.jsxs("span",{ref:P=>{j.current=P,C.setReference(P)},className:N,style:{position:"relative",cursor:L},onPointerDown:R,onPointerMove:I,onPointerUp:q,role:"button",tabIndex:s?-1:0,children:[z,S&&a.jsx(fn,{children:a.jsxs(cr,{ref:C.setFloating,style:T,className:"bm-mini-dropdown",onClick:P=>P.stopPropagation(),onMouseLeave:()=>u==null?void 0:u(),onPointerDown:P=>P.stopPropagation(),onMouseDown:P=>{P.stopPropagation(),P.preventDefault()},onClose:()=>{m(!1),g==null||g(),u==null||u()},children:[v&&a.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",tabIndex:-1,onMouseEnter:w,onMouseDown:P=>{P.preventDefault(),v(),m(!1),g==null||g()},children:[a.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline-block",flexShrink:0},children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(P=>{const U=P===n;return a.jsx("div",{ref:U?k:void 0,tabIndex:-1,className:`bm-mini-dropdown-item${U?" bm-active":""}`,onMouseEnter:()=>i==null?void 0:i(P),onMouseDown:X=>{X.preventDefault(),c==null||c(P),m(!1),g==null||g()},onClick:X=>{X.detail===0&&(X.stopPropagation(),c==null||c(P),m(!1),g==null||g())},onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),c==null||c(P),m(!1),g==null||g())},children:P},P)})]})})]})}function vd(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function Rx({value:e,placeholder:t,layer:n,frozen:r,scaleValues:o,axis:l,onClick:s,onValueChange:i,onValueHover:u,onValueLeave:c,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onValueRemove:v,onValueRemoveHover:w}){const S=e!=null,m=S?vd(e,n):null;if(o&&o.length>0)return a.jsx(Mr,{placeholder:t,values:o,currentValue:e,displayValue:m,formatValue:y=>vd(y,n),axis:l,disabled:r,onHover:u,onLeave:c,onClick:i,onScrubStart:d,onScrubEnd:p,onOpen:f,onClose:g,onRemove:v,onRemoveHover:w});const h=`bm-slot${S?" bm-has-val":""}`;return a.jsx("span",{className:h,onClick:r?void 0:y=>s==null?void 0:s(y.currentTarget),role:"button",tabIndex:r?-1:0,children:m??t})}const Px={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},_x={margin:["top","right","bottom","left"],outline:["top","right","bottom","left","tr","bl","br"],border:["top","right","bottom","left","tr","bl"],padding:["top","right","bottom","left"]},Lx={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function Ax({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:o,isHovered:l,frozen:s,onHoverChange:i,onSlotClick:u,onSlotChange:c,onSlotHover:d,onScrubStart:p,onScrubEnd:f,onSlotOpen:g,onSlotClose:v,onSlotRemove:w,onSlotRemoveHover:S,children:m}){const h=`bm-layer bm-${e}${l?" bm-hovered":""}`,[y,x]=b.useState(null),j=new Map(o.map(z=>[z.key,z])),k=(t==="shorthand"||t==="mixed")&&n,C=r&&r.length>0?a.jsx("span",{className:"bm-name bm-name-scrubber",children:a.jsx(Mr,{placeholder:e,values:r,currentValue:k?n:null,displayValue:k?n:null,formatValue:z=>z,axis:"x",disabled:s,onHover:z=>d==null?void 0:d("shorthand",z),onLeave:()=>d==null?void 0:d("shorthand",null),onClick:z=>c==null?void 0:c("shorthand",z),onScrubStart:()=>{p==null||p()},onScrubEnd:f,onOpen:()=>{x("__shorthand__"),g==null||g()},onClose:()=>{x(null),v==null||v()},onRemove:w?()=>w("shorthand"):void 0,onRemoveHover:S?()=>S("shorthand"):void 0})}):k?a.jsx("span",{className:"bm-name",children:a.jsx("span",{className:"bm-val",onClick:z=>u==null?void 0:u("shorthand",z.currentTarget),children:n})}):a.jsx("span",{className:"bm-name",children:e}),$=(_x[e]??[]).map(z=>{const I=(Px[z]??[]).map(L=>j.get(L)).filter(L=>L!=null);if(I.length===0)return null;const q=I.some(L=>L.value!=null),oe=`bm-slot-group bm-sg-${z}${q?" bm-has-values":""}${y===z?" bm-sg-active":""}`,N=Lx[z];return a.jsx("div",{className:oe,children:I.map(L=>a.jsx(Rx,{slotKey:L.key,value:L.value,placeholder:L.placeholder,layer:e,isExpanded:l,frozen:s,scaleValues:L.scaleValues,axis:N,onClick:P=>u==null?void 0:u(L.key,P),onValueChange:c?P=>c(L.key,P):void 0,onValueHover:d?P=>d(L.key,P):void 0,onValueLeave:d?()=>d(L.key,null):void 0,onScrubStart:p,onScrubEnd:f,onOpen:()=>{x(z),g==null||g()},onClose:()=>{x(null),v==null||v()},onValueRemove:w?()=>w(L.key):void 0,onValueRemoveHover:S?()=>S(L.key):void 0},L.key))},z)}),_=z=>{z.stopPropagation(),s||i(!0)},F=z=>{const R=z.relatedTarget,I=z.currentTarget;R&&I.contains(R)||s||i(!1)};return a.jsxs("div",{className:h,onMouseOver:_,onMouseOut:F,"data-layer":e,children:[C,$,m]})}const xd=["margin","outline","border","padding"];function Ix({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[u,c]=b.useState(null),[d,p]=b.useState(null),f=t||d!==null,g=new Map(e.map(y=>[y.layer,y])),v=(y,x)=>{f||c(x?y:null)},w=(y,x,j)=>{f||n==null||n(y,x,j)};let m=a.jsx("div",{className:"bm-content"});for(let y=xd.length-1;y>=0;y--){const x=xd[y],j=g.get(x);j&&(m=a.jsx(Ax,{layer:j.layer,classState:j.classState,shorthandValue:j.shorthandValue,shorthandScaleValues:j.shorthandScaleValues,slots:j.slots,isHovered:u===x||d===x,frozen:f,onHoverChange:k=>v(x,k),onSlotClick:(k,C)=>w(x,k,C),onSlotChange:r?(k,C)=>r(x,k,C):void 0,onSlotHover:o?(k,C)=>o(x,k,C):void 0,onSlotRemove:l?k=>l(x,k):void 0,onSlotRemoveHover:s?k=>s(x,k):void 0,onScrubStart:()=>{p(x),i==null||i()},onScrubEnd:()=>p(null),onSlotOpen:()=>{p(x),i==null||i()},onSlotClose:()=>p(null),children:m}))}const h=`bm-root${f?" bm-frozen":""}`;return a.jsx("div",{className:h,children:m})}const Ox={margin:{shorthand:"m",x:"mx",y:"my",t:"mt",r:"mr",b:"mb",l:"ml"},outline:{shorthand:"outline",x:"outline-x",y:"outline-y",t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l"},border:{shorthand:"border",x:"border-x",y:"border-y",t:"border-t",r:"border-r",b:"border-b",l:"border-l"},padding:{shorthand:"p",x:"px",y:"py",t:"pt",r:"pr",b:"pb",l:"pl"}},Dx=["y","t","r","b","x","l"];function zx(e){const t=Dx.map(n=>({key:n,placeholder:n}));return(e==="border"||e==="outline")&&t.push({key:"color",placeholder:"color"},{key:"style",placeholder:"style"}),e==="outline"&&t.push({key:"offset",placeholder:"offset"}),t}function Mx(e,t){const n=Ox[e],r=zx(e),o=t[n.shorthand]??null,l=o!=null?o===""?n.shorthand:`${n.shorthand}-${o}`:null,s=r.map(({key:f,placeholder:g})=>{let v;if(f==="color"){const m=e==="outline"?"outline-color":"border-color";v=m in t?m:void 0}else if(f==="style"){const m=e==="outline"?"outline-style":"border-style";v=m in t?m:void 0}else f==="offset"?v="outline-offset"in t?"outline-offset":void 0:v=n[f];const w=v?t[v]??null:null;let S;return(f==="color"||f==="style")&&w!=null?S=`${e==="outline"?"outline":"border"}-${w}`:S=w!=null&&v?`${v}-${w}`:null,{key:f,value:S,placeholder:g}}),i=l!=null,u=s.some(f=>(f.key==="x"||f.key==="y")&&f.value!=null),c=s.some(f=>(f.key==="t"||f.key==="r"||f.key==="b"||f.key==="l")&&f.value!=null),d=u||c;let p;return!i&&!d?p="none":i&&!d?p="shorthand":!i&&u&&!c?p="axis":i?p="mixed":p="individual",{layer:e,classState:p,shorthandValue:l,slots:s}}function $x(e,t,n){var s,i,u;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return py.map(d=>`${c}-${d}`)}let r;e==="border"||e==="outline"?t==="offset"?r=(s=n==null?void 0:n.theme)!=null&&s.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Pr(c)-Pr(d)):Na:r=(i=n==null?void 0:n.theme)!=null&&i.borderWidth?Object.keys(n.theme.borderWidth):Yp:r=(u=n==null?void 0:n.theme)!=null&&u.spacing?Object.keys(n.theme.spacing).sort((c,d)=>Pr(c)-Pr(d)):Na;const l={margin:{shorthand:"m",t:"mt",r:"mr",b:"mb",l:"ml",x:"mx",y:"my"},padding:{shorthand:"p",t:"pt",r:"pr",b:"pb",l:"pl",x:"px",y:"py"},border:{t:"border-t",r:"border-r",b:"border-b",l:"border-l",x:"border-x",y:"border-y",offset:"outline-offset"},outline:{t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l",x:"outline-x",y:"outline-y",offset:"outline-offset"}}[e][t];return l?r.map(c=>c===""?l:`${l}-${c}`):[]}function mr(e,t){const n={};for(const s of e){let i;s.color!==void 0?i=`${s.property}-color`:s.style!==void 0?i=`${s.property}-style`:s.side!==void 0?i=s.property.length<=2?s.property+s.side:`${s.property}-${s.side}`:i=s.property;const u=s.scale??s.color??s.style??s.align??s.size??s.value??"";n[i]=u}const r={margin:"m",padding:"p",border:"border",outline:"outline"},o={margin:!1,padding:!1,border:!0,outline:!1};return["margin","outline","border","padding"].map(s=>{var p,f;const i=Mx(s,n),u=i.slots.map(g=>{const v=$x(s,g.key,t);return v.length>0?{...g,scaleValues:v}:g}),d=(o[s]?(p=t==null?void 0:t.theme)!=null&&p.borderWidth?Object.keys(t.theme.borderWidth):Yp:(f=t==null?void 0:t.theme)!=null&&f.spacing?Object.keys(t.theme.spacing):Na).map(g=>g===""?r[s]:`${r[s]}-${g}`);return{...i,slots:u,shorthandScaleValues:d}})}const Kx={tl:[1,1],t:[1,2],tr:[1,3],l:[2,1],all:[2,2],r:[2,3],bl:[3,1],b:[3,2],br:[3,3]},Fx={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function Ei(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function Wx({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:o,onSlotHover:l,onSlotRemove:s,onSlotRemoveHover:i,onScrubStart:u,onScrubEnd:c,onOpen:d,onClose:p}){const[f,g]=Kx[e.key],v=e.value!=null,w=`cm-slot${v?" cm-has-val":""}`,S=e.key==="all"?"cm-cell cm-cell-all cm-content":`cm-cell cm-cell-${e.key}`,m={gridRow:f,gridColumn:g},h=Fx[e.key];return e.scaleValues&&e.scaleValues.length>0?a.jsx("div",{className:S,style:m,children:a.jsx(Mr,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:v?Ei(e.value):null,formatValue:Ei,axis:h,disabled:t,onHover:y=>l(e.key,y),onLeave:()=>l(e.key,null),onClick:y=>o(e.key,y),onScrubStart:()=>u(e.key),onScrubEnd:c,onOpen:()=>d(e.key),onClose:p,onRemove:s?()=>s(e.key):void 0,onRemoveHover:i?()=>i(e.key):void 0})}):a.jsx("div",{className:S,style:m,children:a.jsx("span",{className:w,role:"button",tabIndex:t?-1:0,onClick:t?void 0:y=>r(e.key,y.currentTarget),children:v?Ei(e.value):e.placeholder})})}function Vx({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:i}){const[u,c]=b.useState(null),d=t||u!==null,p=new Map(e.slots.map(w=>[w.key,w])),f=p.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},g=["tl","t","tr","l","all","r","bl","b","br"],v=`cm-root${d?" cm-frozen":""}${u?" cm-active":""}`;return a.jsx("div",{className:v,children:a.jsx("div",{className:"cm-grid",children:g.map(w=>{const S=w==="all"?f:p.get(w)??{key:w,value:null,placeholder:w,scaleValues:void 0};return a.jsx(Wx,{slot:S,frozen:d,isActive:u===w,onSlotClick:(m,h)=>n==null?void 0:n(m,h),onSlotChange:(m,h)=>r==null?void 0:r(m,h),onSlotHover:(m,h)=>o==null?void 0:o(m,h),onSlotRemove:l,onSlotRemoveHover:s,onScrubStart:m=>{c(m),i==null||i()},onScrubEnd:()=>c(null),onOpen:m=>{c(m),i==null||i()},onClose:()=>c(null)},w)})})})}function wd({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:o=0,children:l}){const[s,i]=b.useState(!1),[u,c]=b.useState(r),d=b.useRef(r),p=b.useRef(null);b.useEffect(()=>{d.current&&!r&&c(!1),d.current=r},[r]),b.useEffect(()=>{if(!s)return;function g(v){p.current&&!p.current.contains(v.target)&&i(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[s]);function f(g){n==null||n(g),i(!1)}return a.jsxs("div",{className:"px-4 py-3",children:[a.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(g=>!g),children:[a.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${u?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),a.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),u&&o>0&&a.jsx("span",{className:"ml-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold leading-none bg-bv-teal/20 text-bv-teal tabular-nums",children:o}),t.length>0&&a.jsxs("div",{ref:p,className:"relative ml-auto",children:[a.jsx("button",{type:"button","aria-label":`Add ${e} property`,className:`w-5 h-5 flex items-center justify-center rounded transition-all cursor-pointer border-none ${s?"text-bv-text bg-bv-surface-hi":"text-bv-muted bg-transparent opacity-75 group-hover/sec:opacity-100 hover:text-bv-text hover:bg-bv-surface-hi"}`,onClick:g=>{g.stopPropagation(),i(v=>!v)},children:a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),s&&a.jsx(cr,{className:"absolute z-50 top-[calc(100%+2px)] right-0 bg-bv-bg border border-bv-border rounded-md shadow-[0_4px_16px_rgba(0,0,0,0.10)] min-w-[180px] max-w-[calc(100vw-16px)] py-1",onClose:()=>i(!1),children:t.map(g=>a.jsxs("button",{type:"button",className:"w-full px-2.5 py-[5px] text-[11px] font-[family-name:var(--font-ui)] text-bv-text-mid flex items-center gap-1.5 transition-colors hover:bg-bv-teal/10 hover:text-bv-teal cursor-pointer border-none bg-transparent text-left whitespace-nowrap",onClick:()=>f(g.prefix),children:[g.name,a.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:g.prefixHint})]},g.prefix))})]})]}),a.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${u?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:r?a.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):a.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:l})})]})}const Hx=[{dir:"tl",arrow:"↖"},{dir:"t",arrow:"↑"},{dir:"tr",arrow:"↗"},{dir:"l",arrow:"←"},"center",{dir:"r",arrow:"→"},{dir:"bl",arrow:"↙"},{dir:"b",arrow:"↓"},{dir:"br",arrow:"↘"}];function Bx({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:o,onSolidClick:l,solidColorName:s}){const i=t==="solid";return a.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[a.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:Hx.map((u,c)=>{if(u==="center"){const p=i;return a.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-xs cursor-pointer transition-all duration-150
|
|
44
|
-
${p?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,title:"Solid color",onClick:l,children:"●"},"center")}const d=!i&&e===u.dir;return a.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-[10px] cursor-pointer transition-all duration-150
|
|
45
|
-
${i?"opacity-35 hover:opacity-100":""}
|
|
46
|
-
${d?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,onMouseEnter:()=>n(u.dir),onClick:()=>o(u.dir),children:u.arrow},u.dir)})}),a.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:i?s?a.jsx("span",{className:"text-bv-text font-bold",children:s}):a.jsx("span",{className:"text-bv-muted italic",children:"none"}):a.jsxs("span",{children:["to-",a.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function Ux(e,t){const r=[...e].sort((o,l)=>(o.position??0)-(l.position??0)).map(o=>o.position!=null?`${o.hex} ${o.position}%`:o.hex);return`linear-gradient(${t}, ${r.join(", ")})`}function Ti(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function Gx({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:o,onRemove:l}){const s=b.useRef(!1),i=b.useCallback(p=>{p.preventDefault(),p.stopPropagation(),s.current=!1,r(e.id,p.clientX);const f=()=>{s.current=!0},g=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",g)},[e.id,r]),u=b.useCallback(p=>{p.stopPropagation(),s.current||o(e.id,p.currentTarget)},[e.id,o]),c=b.useCallback(p=>{p.stopPropagation(),l(e.id)},[e.id,l]),d=e.position??0;return a.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
|
|
47
|
-
hover:z-20
|
|
48
|
-
${n?"z-25":""}`,style:{left:`${d}%`,transform:"translateX(-50%)",width:22,height:26,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.2))"},onMouseDown:i,onClick:u,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[a.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M2 1 L20 1 L20 16 L11 25 L2 16 Z",fill:e.hex,stroke:n?"#00848B":"white",strokeWidth:n?2:1.5,strokeLinejoin:"round"})}),!t&&a.jsx("div",{className:"absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-bv-orange text-white text-[9px] leading-3.5 text-center cursor-pointer z-40 hidden group-hover/handle:block hover:block!",style:{display:void 0},onClick:c,onMouseDown:p=>p.stopPropagation(),children:"×"})]})}function Yx({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:o,onBarClick:l,onStopRemove:s,selectedStopId:i}){const u=b.useRef(null),c=b.useRef(null),d=[...e].sort((v,w)=>(v.position??0)-(w.position??0)),p=b.useCallback((v,w)=>{const S=e.find(y=>y.id===v);if(!S)return;c.current={stopId:v,startX:w,startPos:S.position??0};const m=y=>{const x=c.current;if(!x||!u.current)return;const j=u.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ti(x.startPos+C);n(x.stopId,T)},h=y=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",h);const x=c.current;if(x&&u.current){const j=u.current.getBoundingClientRect(),C=(y.clientX-x.startX)/j.width*100,T=Ti(x.startPos+C);r(x.stopId,T)}c.current=null};document.addEventListener("mousemove",m),document.addEventListener("mouseup",h)},[e,n,r]),f=b.useCallback(v=>{if(!u.current)return;const w=u.current.getBoundingClientRect(),S=(v.clientX-w.left)/w.width*100;l(Ti(S))},[l]),g=Ux(d,t);return a.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[d.map((v,w)=>a.jsx(Gx,{stop:v,isEndpoint:w===0||w===d.length-1,isSelected:v.id===i,onDragStart:p,onClick:o,onRemove:s},v.id)),a.jsx("div",{ref:u,className:"h-9 rounded-md cursor-pointer relative",style:{background:g,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:f,children:a.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-lg font-bold text-white/0 hover:text-white/60 transition-colors pointer-events-none",children:"+"})})]})}const Qx={t:"to top",tr:"to top right",r:"to right",br:"to bottom right",b:"to bottom",bl:"to bottom left",l:"to left",tl:"to top left"};function Xx(e){var $t,Kn;const{direction:t,stops:n,mode:r,solidColorName:o,solidColorHex:l,onPreview:s,onPreviewBatch:i,onRevert:u,onStage:c}=e,[d,p]=b.useState(t),[f,g]=b.useState(n),[v,w]=b.useState(r),[S,m]=b.useState(o),[h,y]=b.useState(l),[x,j]=b.useState(null),[k,C]=b.useState(!1),[T,$]=b.useState(null),[_,F]=b.useState(null),z=b.useRef(n.length+1),R=b.useCallback(ee=>{if(v==="gradient")s(`bg-gradient-to-${d}`,`bg-gradient-to-${ee}`);else{const te=S??"slate-500",re=S?`bg-${S}`:"";i([{oldClass:re,newClass:`bg-gradient-to-${ee}`},{oldClass:"",newClass:`from-${te}`},{oldClass:"",newClass:`to-${te}`}])}},[d,v,S,s,i]),I=b.useCallback(()=>{u()},[u]),q=b.useCallback(ee=>{if(p(ee),w("gradient"),v==="gradient"&&f.length>=2){const te=`bg-gradient-to-${d}`,re=`bg-gradient-to-${ee}`;c(te,re)}else{const te=S??"slate-500",re=h??Qn(te,e.colors),E={id:"1",role:"from",colorName:te,hex:re,position:0},D={id:"2",role:"to",colorName:te,hex:re,position:100};z.current=3,g([E,D]);const K=S?`bg-${S}`:"";c(K,`bg-gradient-to-${ee}`),c("",`from-${te}`),c("",`to-${te}`)}},[d,v,f,S,h,e.colors,c]),W=b.useCallback(()=>{w("solid"),C(!1),j(null),$(null),f.length>0&&!S&&(m(f[0].colorName),y(f[0].hex))},[f,S]),oe=b.useCallback((ee,te)=>{g(E=>E.map(D=>D.id===ee?{...D,position:te}:D));const re=f.find(E=>E.id===ee);if(re){const E=re.position!=null?`${re.role}-${re.position}%`:"",D=`${re.role}-${te}%`;s(E,D)}},[f,s]),N=b.useCallback((ee,te)=>{g(E=>E.map(D=>D.id===ee?{...D,position:te}:D));const re=f.find(E=>E.id===ee);if(re){const E=re.position!=null?`${re.role}-${re.position}%`:"",D=`${re.role}-${te}%`;c(E,D)}},[f,c]),L=b.useCallback((ee,te)=>{x===ee&&k?(j(null),C(!1),$(null),F(null)):(j(ee),C(!0),$("stop"),F(te))},[x,k]),P=b.useCallback(ee=>{const te=String(z.current++),re=[...f].sort((K,Z)=>(K.position??0)-(Z.position??0));let E=re[0];for(const K of re)(K.position??0)<=ee&&(E=K);const D={id:te,role:"via",colorName:(E==null?void 0:E.colorName)??"gray-500",hex:(E==null?void 0:E.hex)??"#6B7280",position:ee};g(K=>[...K,D]),j(te),C(!0),$("stop")},[f]),U=b.useCallback(ee=>{const te=f.find(E=>E.id===ee);if(!te)return;const re=f.filter(E=>E.id!==ee);if(j(null),C(!1),$(null),F(null),re.length>=2)g(re),c(`${te.role}-${te.colorName}`,"");else if(re.length===1){const E=re[0];g([]),w("solid"),m(E.colorName),y(E.hex),c(`bg-gradient-to-${d}`,""),f.forEach(D=>c(`${D.role}-${D.colorName}`,"")),c("",`bg-${E.colorName}`)}else g([]),w("none"),m(null),y(null),c(`bg-gradient-to-${d}`,""),f.forEach(E=>c(`${E.role}-${E.colorName}`,""))},[f,d,c]),X=b.useCallback(ee=>{C(!0),$("solid"),j(null),F(ee)},[]),Qe=b.useCallback(()=>{s(S?`bg-${S}`:"","")},[S,s]),$e=b.useCallback(()=>{S&&c(`bg-${S}`,""),m(null),y(null),C(!1),$(null),F(null)},[S,c]),je=b.useCallback(ee=>{if(T==="stop"&&x){const te=f.find(re=>re.id===x);te&&s(`${te.role}-${te.colorName}`,ee)}else T==="solid"&&s(`bg-${S}`,ee)},[T,x,f,S,s]),ae=b.useCallback(()=>{u()},[u]),Re=b.useCallback(ee=>{if(T==="stop"&&x){const te=f.find(re=>re.id===x);if(te){const re=te.role+"-",E=ee.startsWith(re)?ee.slice(re.length):ee;g(D=>D.map(K=>K.id===x?{...K,colorName:E,hex:Qn(E,e.colors)}:K)),c(`${te.role}-${te.colorName}`,`${te.role}-${E}`),C(!1),j(null),$(null),F(null)}}else if(T==="solid"){const te="bg-",re=ee.startsWith(te)?ee.slice(te.length):ee,E=S?`bg-${S}`:"";m(re),y(Qn(re,e.colors)),c(E,`bg-${re}`),C(!1),$(null),F(null)}},[T,x,f,S,c,e.colors]),me=b.useCallback(()=>{C(!1),j(null),$(null),F(null),u()},[u]),Jr=T==="stop"&&x?((($t=f.find(ee=>ee.id===x))==null?void 0:$t.role)??"from")+"-":"bg-",qr=T==="stop"&&x?((Kn=f.find(ee=>ee.id===x))==null?void 0:Kn.colorName)??"":S??"",dr=Qx[d],to=!!(x?f.find(ee=>ee.id===x):null);return{direction:d,stops:f,mode:v,solidColorName:S,solidColorHex:h,selectedStopId:x,colorPickerOpen:k,editingTarget:T,anchorEl:_,colorPrefix:Jr,colorPickerCurrentValue:qr,directionCSS:dr,selectedStopIsRemovable:to,handleDirectionHover:R,handleDirectionLeave:I,handleDirectionClick:q,handleSolidToggle:W,handleStopDrag:oe,handleStopDragEnd:N,handleStopClick:L,handleBarClick:P,handleStopRemove:U,handleSwatchClick:X,handleHoverRemoveSolid:Qe,handleRemoveSolid:$e,handleColorHover:je,handleColorLeave:ae,handleColorClick:Re,handleCloseColorPicker:me}}function Qn(e,t){if(typeof t[e]=="string")return t[e];const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),o=e.slice(n+1);if(t[r]&&typeof t[r][o]=="string")return t[r][o]}return"#888888"}function Zx(e){const t=Xx(e),n=t.mode==="solid",{refs:r,floatingStyles:o,context:l}=pn({open:t.colorPickerOpen,onOpenChange:u=>{u||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Oa({apply({availableHeight:u,elements:c}){Object.assign(c.floating.style,{maxHeight:`${u}px`})},padding:8})],whileElementsMounted:an}),s=lr(l),{getFloatingProps:i}=sr([s]);return b.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),a.jsxs("div",{className:"group",children:[a.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[a.jsx(Bx,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?a.jsx("div",{className:"flex-1 min-w-0 self-stretch rounded-md cursor-pointer relative overflow-hidden",style:{background:t.solidColorHex??"transparent",border:"1px solid rgba(255,255,255,0.12)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)",minHeight:36},onClick:u=>t.handleSwatchClick(u.currentTarget),title:t.solidColorName?`bg-${t.solidColorName}`:"Click to pick color",children:!t.solidColorHex&&a.jsxs("svg",{className:"absolute inset-0 w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),a.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):a.jsx(Yx,{stops:t.stops,direction:t.directionCSS,onStopDrag:t.handleStopDrag,onStopDragEnd:t.handleStopDragEnd,onStopClick:t.handleStopClick,onBarClick:t.handleBarClick,onStopRemove:t.handleStopRemove,selectedStopId:t.selectedStopId})]}),t.colorPickerOpen&&a.jsx(fn,{children:a.jsxs("div",{ref:r.setFloating,style:{...o,zIndex:9999,overflowY:"auto"},...i(),children:[a.jsx($l,{prefix:t.colorPrefix,currentValue:t.colorPickerCurrentValue,colors:e.colors,locked:!1,lockedValue:null,onHover:t.handleColorHover,onLeave:t.handleColorLeave,onClick:t.handleColorClick,onRemove:t.editingTarget==="solid"?t.handleRemoveSolid:void 0,onRemoveHover:t.editingTarget==="solid"?t.handleHoverRemoveSolid:void 0}),t.selectedStopIsRemovable&&a.jsx("button",{type:"button",className:"mt-1.5 w-full text-[10px] text-bv-orange border border-bv-orange/40 rounded px-2 py-0.5 cursor-pointer hover:bg-bv-orange hover:text-white transition-colors",onClick:()=>{t.selectedStopId&&t.handleStopRemove(t.selectedStopId)},children:"Remove stop"})]})}),a.jsx("div",{className:"min-h-[1rem] text-[10px] text-bv-muted italic opacity-0 invisible transition-opacity duration-150 group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible",children:n?"Click the swatch to change color · Click a direction arrow for gradient":"Click handles to change color · Drag to reposition · Click bar to add stop"})]})}function Jx(e,t,n){var y;const r=new Map;for(const x of e)r.set(x.fullClass,!0);if(n)for(const x of n)x.kind==="class-change"&&x.status==="staged"&&(x.originalClass&&r.delete(x.originalClass),x.newClass&&r.set(x.newClass,!0));const o=e.find(x=>x.property==="bg-gradient-to"),l=Array.from(r.keys()).find(x=>x.startsWith("bg-gradient-to-")),i=(l==null?void 0:l.replace("bg-gradient-to-",""))||(o==null?void 0:o.fullClass.slice(15))||"r",c=((y=Array.from(r.keys()).filter(x=>x.startsWith("bg-")&&!x.startsWith("bg-gradient-to-"))[0])==null?void 0:y.replace("bg-",""))??null,d=(c==null?void 0:c.split("/")[0])??null,p=d?Qn(d,t):null,f=Array.from(r.keys()),g=f.filter(x=>x.startsWith("from-")),v=f.filter(x=>x.startsWith("via-")),w=f.filter(x=>x.startsWith("to-")),S=!!(l||g.length>0&&w.length>0),m=S?"gradient":"solid",h=[];if(S){let x=1;for(const j of g){const k=j.replace("from-",""),C=k.split("/")[0];h.push({id:String(x++),role:"from",colorName:k,hex:Qn(C,t),position:null})}for(const j of v){const k=j.replace("via-",""),C=k.split("/")[0];h.push({id:String(x++),role:"via",colorName:k,hex:Qn(C,t),position:null})}for(const j of w){const k=j.replace("to-",""),C=k.split("/")[0];h.push({id:String(x++),role:"to",colorName:k,hex:Qn(C,t),position:null})}}return{direction:i,stops:h,mode:m,solidColorName:c,solidColorHex:p,colors:t}}const Oe="#00848B",ir="rgba(0,132,139,0.18)",qx="#F5532D",xt="#4a4a4a",Dn="#333333",Le="#999999",Je="'Roboto Mono', 'Menlo', ui-monospace, monospace",Dt={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:xt,background:Dn,display:"flex",padding:4,overflow:"hidden",transition:"border-color 150ms ease-in-out, background-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box"},Da={background:Oe,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},bd={...Da,opacity:.9},wm={flexShrink:0,background:qx,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},e0={...wm,opacity:.38};function Gt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:o,children:l}){const[s,i]=b.useState(!1),u=t||s,c={...Dt,borderColor:u?Oe:xt,background:u?ir:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return a.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{i(!0),o==null||o()},onMouseLeave:()=>i(!1),onClick:r,children:[a.jsx("div",{style:c,children:l(u)}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:u?Oe:Le,fontWeight:u?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}const Ni=[{value:"flex-row",label:"row",arrow:"→"},{value:"flex-col",label:"col",arrow:"↓"},{value:"flex-row-reverse",label:"row-reverse",arrow:"←"},{value:"flex-col-reverse",label:"col-reverse",arrow:"↑"}];function bm({direction:e,color:t}){const n={stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};switch(e){case"flex-row":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"5",y1:"15",x2:"25",y2:"15",...n}),a.jsx("polyline",{points:"19,9 25,15 19,21",...n})]});case"flex-col":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"15",y1:"5",x2:"15",y2:"25",...n}),a.jsx("polyline",{points:"9,19 15,25 21,19",...n})]});case"flex-row-reverse":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"25",y1:"15",x2:"5",y2:"15",...n}),a.jsx("polyline",{points:"11,9 5,15 11,21",...n})]});case"flex-col-reverse":return a.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[a.jsx("line",{x1:"15",y1:"25",x2:"15",y2:"5",...n}),a.jsx("polyline",{points:"9,11 15,5 21,11",...n})]})}}function t0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:u,floatingStyles:c,context:d}=pn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),p=lr(d),{getReferenceProps:f,getFloatingProps:g}=sr([p]),v=t!==null&&Ni.some(k=>k.value===t),w=n&&!v,S=v?t:e??"",m=Ni.find(k=>k.value===S),h=!m;function y(){i(!1),o()}function x(){w||i(k=>(k&&o(),!k))}const j=h?{...Dt,borderStyle:"dashed",borderColor:s?Oe:xt,background:s?ir:"transparent",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"}:{...Dt,borderColor:s?Oe:xt,background:s?ir:Dn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center",cursor:w?"default":"pointer"};return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Direction"}),a.jsxs("div",{ref:u.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Direction",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&x()},onClick:x,...f(),children:[a.jsx("div",{style:j,children:m?a.jsx(bm,{direction:m.value,color:s?Oe:Le}):a.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Le},children:"—"})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Le,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:(m==null?void 0:m.label)??"—"})]}),s&&a.jsx(fn,{children:a.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...g(),children:a.jsx(cr,{style:{background:"#1e1e1e",border:`1px solid ${xt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:y,children:a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:Ni.map(k=>{const C=k.value===S;return a.jsx(n0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),y()}},k.value)})})})})})]})}function n0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...Dt,borderColor:s?Oe:xt,background:s?ir:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[a.jsx("div",{style:i,children:a.jsx(bm,{direction:e.value,color:s?Oe:Le})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Le,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}const Ri=[{value:"flex-nowrap",label:"no-wrap"},{value:"flex-wrap",label:"wrap"},{value:"flex-wrap-reverse",label:"wrap-reverse"}],r0=e=>({stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"});function Sm({mode:e,color:t}){const n=r0(t),r={...n,strokeDasharray:"2 3"};return e==="flex-nowrap"?a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("polyline",{points:"31,1 37,7 31,13",...n})]}):e==="flex-wrap"?a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("line",{x1:"37",y1:"7",x2:"3",y2:"33",...r}),a.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),a.jsx("polyline",{points:"31,27 37,33 31,39",...n})]}):a.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[a.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),a.jsx("line",{x1:"37",y1:"33",x2:"3",y2:"7",...r}),a.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),a.jsx("polyline",{points:"31,1 37,7 31,13",...n})]})}function o0({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=b.useState(!1),s=t||o,i={...Dt,borderColor:s?Oe:xt,background:s?ir:Dn,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[a.jsx("div",{style:i,children:a.jsx(Sm,{mode:e.value,color:s?Oe:Le})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Le,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}function l0({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,i]=b.useState(!1),{refs:u,floatingStyles:c,context:d}=pn({open:s,onOpenChange:k=>{k||(i(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),p=lr(d),{getReferenceProps:f,getFloatingProps:g}=sr([p]),v=t!==null&&Ri.some(k=>k.value===t),w=n&&!v,S=!v&&e===null,m=v?t:e??"",h=Ri.find(k=>k.value===m),y=(h==null?void 0:h.label)??"Wrap";function x(){i(!1),o()}function j(){w||i(k=>(k&&o(),!k))}return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Wrap"}),a.jsxs("div",{ref:u.setReference,role:"button",tabIndex:w?-1:0,"aria-label":"Wrap",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&j()},onClick:j,...f(),children:[S?a.jsx("div",{style:{...Dt,borderStyle:"dashed",borderColor:s?Oe:xt,background:s?ir:"transparent",alignItems:"center",justifyContent:"center"},children:a.jsx("span",{style:{fontSize:10,fontFamily:Je,color:Le},children:"—"})}):a.jsx("div",{style:{...Dt,borderColor:s?Oe:xt,background:s?ir:Dn,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center"},children:a.jsx(Sm,{mode:m,color:s?Oe:Le})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?Oe:Le,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y})]}),s&&a.jsx(fn,{children:a.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...g(),children:a.jsx(cr,{style:{background:"#1e1e1e",border:`1px solid ${xt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:x,children:a.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(3, 60px)"},children:Ri.map(k=>{const C=k.value===m;return a.jsx(o0,{option:k,isActive:C,onHover:()=>r(k.value),onClick:()=>{l(k.value),x()}},k.value)})})})})})]})}function s0({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const o=e.startsWith("column"),l=e;function s(f,g){const v=g?bd:Da;return o?{...v,width:"100%",height:f}:{...v,width:f,height:"100%"}}function i(f){const g=f?bd:Da;return o?{...g,flex:1,width:"100%"}:{...g,flex:1,height:"100%"}}function u(f,g){return{...g?e0:wm,flex:f}}const c=f=>t===f,d=f=>()=>n==null?void 0:n(f),p=f=>()=>r==null?void 0:r(f);return a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[a.jsx(Gt,{label:"start",isActive:c("justify-start"),onClick:d("justify-start"),onHover:p("justify-start"),containerStyle:{flexDirection:l,justifyContent:"flex-start",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})}),a.jsx(Gt,{label:"center",isActive:c("justify-center"),onClick:d("justify-center"),onHover:p("justify-center"),containerStyle:{flexDirection:l,justifyContent:"center",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})}),a.jsx(Gt,{label:"stretch",isActive:c("justify-stretch"),onClick:d("justify-stretch"),onHover:p("justify-stretch"),containerStyle:{flexDirection:l,gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:i(f)}),a.jsx("div",{style:i(f)}),a.jsx("div",{style:i(f)})]})}),a.jsx(Gt,{label:"between",isActive:c("justify-between"),onClick:d("justify-between"),onHover:p("justify-between"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)})]})}),a.jsx(Gt,{label:"around",isActive:c("justify-around"),onClick:d("justify-around"),onHover:p("justify-around"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(2,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)})]})}),a.jsx(Gt,{label:"evenly",isActive:c("justify-evenly"),onClick:d("justify-evenly"),onHover:p("justify-evenly"),containerStyle:{flexDirection:l},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)}),a.jsx("div",{style:s(12,f)}),a.jsx("div",{style:u(1,f)})]})}),a.jsx(Gt,{label:"end",isActive:c("justify-end"),onClick:d("justify-end"),onHover:p("justify-end"),containerStyle:{flexDirection:l,justifyContent:"flex-end",gap:2},children:f=>a.jsxs(a.Fragment,{children:[a.jsx("div",{style:s(10,f)}),a.jsx("div",{style:s(14,f)}),a.jsx("div",{style:s(8,f)})]})})]})}const tn="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",i0="bg-bv-orange/10 rounded-[2px]";function Qt({isCol:e,main:t}){return a.jsx("div",{className:tn,style:e?{height:t}:{width:t}})}function Wn({flex:e=1}){return a.jsx("div",{className:i0,style:{flex:e}})}function Ht({isCol:e,w:t,h:n}){return a.jsx("div",{className:tn,style:e?{width:n,height:t}:{width:t,height:n}})}function Pi({isCol:e,w:t,h:n,pt:r}){return a.jsx("div",{className:`${tn} text-[5px] text-white/80 leading-none overflow-hidden text-center`,style:e?{width:n,height:t,paddingLeft:r}:{width:t,height:n,paddingTop:r},children:"t"})}function _i(e){return a.jsxs(a.Fragment,{children:[a.jsx(Qt,{isCol:e,main:10}),a.jsx(Qt,{isCol:e,main:14}),a.jsx(Qt,{isCol:e,main:8})]})}const Sd=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>_i(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>_i(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`${tn} flex-1`}),a.jsx("div",{className:`${tn} flex-1`}),a.jsx("div",{className:`${tn} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Qt,{isCol:t,main:12}),a.jsx(Wn,{}),a.jsx(Qt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Wn,{flex:1}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Wn,{flex:2}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Wn,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Wn,{}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Wn,{}),a.jsx(Qt,{isCol:t,main:12}),a.jsx(Wn,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>_i(e.startsWith("column"))}],Li=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}},{value:"items-center",label:"center",getContainerStyle:e=>({flexDirection:e,alignItems:"center",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}},{value:"items-baseline",label:"baseline",getContainerStyle:e=>({flexDirection:e,alignItems:"baseline",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Pi,{isCol:t,w:13,h:38,pt:17}),a.jsx(Pi,{isCol:t,w:15,h:26,pt:3}),a.jsx(Pi,{isCol:t,w:11,h:32,pt:10})]})}},{value:"items-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,alignItems:"stretch",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:tn,style:t?{height:13}:{width:13}}),a.jsx("div",{className:tn,style:t?{height:15}:{width:15}}),a.jsx("div",{className:tn,style:t?{height:11}:{width:11}})]})}},{value:"items-end",label:"end",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-end",gap:3}),renderItems:e=>{const t=e.startsWith("column");return a.jsxs(a.Fragment,{children:[a.jsx(Ht,{isCol:t,w:13,h:22}),a.jsx(Ht,{isCol:t,w:15,h:42}),a.jsx(Ht,{isCol:t,w:11,h:14})]})}}];function a0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:u}){const[c,d]=b.useState(!1),{refs:p,floatingStyles:f,context:g}=pn({open:c,onOpenChange:_=>{_||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),v=lr(g),{getReferenceProps:w,getFloatingProps:S}=sr([v]),m=t!==null&&Sd.some(_=>_.value===t),h=n&&!m,y=!m&&(e===null||e===""),x=m?t:e??"",j=Sd.find(_=>_.value===x),k=(j==null?void 0:j.label)??"—";function C(){d(!1),l()}function T(){h||d(_=>(_&&l(),!_))}const $={...Dt,borderStyle:"dashed",alignItems:"center",justifyContent:"center"};return a.jsxs("div",{className:"flex flex-col items-start gap-1",children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le,fontWeight:500},children:"JUSTIFY →"}),a.jsx("div",{ref:p.setReference,className:"cursor-pointer",role:"button",tabIndex:h?-1:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&T()},onClick:T,...w(),children:y?a.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[a.jsx("div",{style:$,children:a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le},children:"—"})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le},children:"none"})]}):a.jsx(Gt,{label:k,isActive:c,containerStyle:(j==null?void 0:j.getContainerStyle(r))??{flexDirection:r},children:_=>(j==null?void 0:j.renderItems(r))??null})}),c&&a.jsx(fn,{children:a.jsx("div",{ref:p.setFloating,style:f,className:"z-[9999]",...S(),children:a.jsxs(cr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:C,children:[i&&a.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{i(),C()},children:[a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),a.jsx(s0,{flexDirection:r,activeValue:x,onSelect:_=>{s(_),C()},onHover:o})]})})})]})}function u0({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:i,onRemoveHover:u}){const[c,d]=b.useState(!1),{refs:p,floatingStyles:f,context:g}=pn({open:c,onOpenChange:F=>{F||(d(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8})],whileElementsMounted:an}),v=lr(g),{getReferenceProps:w,getFloatingProps:S}=sr([v]),m=t!==null&&Li.some(F=>F.value===t),h=n&&!m,y=!m&&(e===null||e===""),x=m?t:e??"",j=Li.find(F=>F.value===x),k=(j==null?void 0:j.label)??"—",C=r;function T(){d(!1),l()}function $(){h||d(F=>(F&&l(),!F))}const _=y?{...Dt,borderStyle:"dashed",borderColor:xt,background:Dn,cursor:h?"default":"pointer",alignItems:"center",justifyContent:"center"}:{...Dt,borderColor:c?Oe:xt,background:c?"rgba(0,132,139,0.09)":Dn,cursor:h?"default":"pointer",...j?j.getContainerStyle(r):{}};return a.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:2},children:[a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Align ↓"}),a.jsx("div",{ref:p.setReference,role:"button",tabIndex:h?-1:0,onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&$()},onClick:$,...w(),children:a.jsx("div",{style:_,children:y?a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:Le},children:"—"}):j==null?void 0:j.renderItems(r)})}),a.jsx("span",{style:{fontSize:9,fontFamily:Je,color:c?Oe:Le,fontWeight:c?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:y?"—":k}),c&&a.jsx(fn,{children:a.jsx("div",{ref:p.setFloating,style:f,className:"z-[9999]",...S(),children:a.jsxs(cr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:T,children:[i&&a.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{i(),T()},children:[a.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),a.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:Li.map(F=>a.jsx(Gt,{label:F.label,isActive:F.value===x,containerStyle:{flexDirection:C,...F.getContainerStyle(r)},onHover:()=>o(F.value),onClick:()=>{s(F.value),T()},children:z=>F.renderItems(r)},F.value))})]})})})]})}function kd(e){return e.replace(/^gap-x-/,"x-")}function Cd(e){return e.replace(/^gap-y-/,"y-")}function c0({slots:e,onSlotChange:t,onSlotHover:n,onSlotRemove:r,onSlotRemoveHover:o}){const[l,s]=b.useState(null),[i,u]=b.useState(null),c=e.find(S=>S.key==="gap"),d=e.find(S=>S.key==="gap-x"),p=e.find(S=>S.key==="gap-y");function f(S,m){u(m!=null?S:null),n==null||n(S,m)}function g(S){u(S)}function v(){u(null)}const w=i==="gap-x"?"gm-active-x":i==="gap-y"?"gm-active-y":i==="gap"?"gm-active-gap":"";return a.jsx("div",{className:"gm-root",children:a.jsxs("div",{className:`gm-grid${w?` ${w}`:""}`,children:[a.jsx("div",{className:"gm-col-highlight",style:{gridArea:"1 / 2 / 4 / 3"}}),a.jsx("div",{className:"gm-row-highlight",style:{gridArea:"2 / 1 / 3 / 4"}}),a.jsx("div",{className:"gm-box gm-box-tl",style:{gridArea:"1 / 1"}}),a.jsx("div",{className:"gm-cell",style:{gridArea:"1 / 2"},onMouseEnter:()=>g("gap-x"),onMouseLeave:v,children:(d==null?void 0:d.scaleValues)&&a.jsx(Mr,{placeholder:"x",values:d.scaleValues,currentValue:d.value,displayValue:d.value?kd(d.value):null,formatValue:kd,axis:"x",disabled:l!==null&&l!=="gap-x",onHover:S=>f("gap-x",S),onLeave:()=>f("gap-x",null),onClick:S=>t==null?void 0:t("gap-x",S),onOpen:()=>s("gap-x"),onClose:()=>s(null),onScrubStart:()=>s("gap-x"),onScrubEnd:()=>s(null),onRemove:d.value?()=>r==null?void 0:r("gap-x"):void 0,onRemoveHover:d.value?()=>{u(null),o==null||o("gap-x")}:void 0})}),a.jsx("div",{className:"gm-box gm-box-tr",style:{gridArea:"1 / 3"}}),a.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 1"},onMouseEnter:()=>g("gap-y"),onMouseLeave:v,children:(p==null?void 0:p.scaleValues)&&a.jsx(Mr,{placeholder:"y",values:p.scaleValues,currentValue:p.value,displayValue:p.value?Cd(p.value):null,formatValue:Cd,axis:"y",disabled:l!==null&&l!=="gap-y",onHover:S=>f("gap-y",S),onLeave:()=>f("gap-y",null),onClick:S=>t==null?void 0:t("gap-y",S),onOpen:()=>s("gap-y"),onClose:()=>s(null),onScrubStart:()=>s("gap-y"),onScrubEnd:()=>s(null),onRemove:p.value?()=>r==null?void 0:r("gap-y"):void 0,onRemoveHover:p.value?()=>{u(null),o==null||o("gap-y")}:void 0})}),a.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 2"},onMouseEnter:()=>g("gap"),onMouseLeave:v,children:(c==null?void 0:c.scaleValues)&&a.jsx(Mr,{placeholder:"gap",values:c.scaleValues,currentValue:c.value,displayValue:c.value??null,axis:"x",disabled:l!==null&&l!=="gap",onHover:S=>f("gap",S),onLeave:()=>f("gap",null),onClick:S=>t==null?void 0:t("gap",S),onOpen:()=>s("gap"),onClose:()=>s(null),onScrubStart:()=>s("gap"),onScrubEnd:()=>s(null),onRemove:c.value?()=>r==null?void 0:r("gap"):void 0,onRemoveHover:c.value?()=>{u(null),o==null||o("gap")}:void 0})}),a.jsx("div",{className:"gm-box gm-box-bl",style:{gridArea:"3 / 1"}})]})})}const km={shadow:"Shadow","inset-shadow":"Inset Shadow",ring:"Ring","inset-ring":"Inset Ring","text-shadow":"Text Shadow"},jd={shadow:"shadow-md","inset-shadow":"inset-shadow-sm",ring:"ring-2","inset-ring":"inset-ring-2","text-shadow":"text-shadow-md"};function d0(e){switch(e){case"shadow":return[...Lu];case"inset-shadow":return[...Up];case"ring":return[...Ea];case"inset-ring":return[...Ea];case"text-shadow":return[...Au]}}function Ed(e,t){return`${e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-"}${t}`}function f0(e,t){const n=e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-";return t.startsWith(n)?t.slice(n.length):t}function p0(e){if(e.isNone||!e.sizeClass)return"none";const t=r=>{if(!e.colorHex)return r;if(e.opacity!==null&&e.opacity<100){const o=(e.opacity/100).toFixed(2),l=parseInt(e.colorHex.slice(1,3),16),s=parseInt(e.colorHex.slice(3,5),16),i=parseInt(e.colorHex.slice(5,7),16);return`rgba(${l},${s},${i},${o})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0;switch(e.type){case"shadow":{const r=xo(e.sizeClass,"shadow-");return g0(r,n)}case"inset-shadow":{const r=xo(e.sizeClass,"inset-shadow-");return y0(r,n)}case"ring":{const r=xo(e.sizeClass,"ring-");return`0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"inset-ring":{const r=xo(e.sizeClass,"inset-ring-");return`inset 0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"text-shadow":return"none"}}function m0(e){if(e.isNone||!e.sizeClass)return"none";const t=o=>{if(!e.colorHex)return o;if(e.opacity!==null&&e.opacity<100){const l=(e.opacity/100).toFixed(2),s=parseInt(e.colorHex.slice(1,3),16),i=parseInt(e.colorHex.slice(3,5),16),u=parseInt(e.colorHex.slice(5,7),16);return`rgba(${s},${i},${u},${l})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0,r=xo(e.sizeClass,"text-shadow-");return h0(r,n)}function h0(e,t){const n=t??"rgba(0,0,0,0.25)";return{"2xs":`0 1px 0 ${n}`,xs:`0 1px 1px ${n}`,sm:`0 1px 2px ${n}`,md:`0 2px 4px ${n}`,lg:`0 4px 6px ${n}`}[e]??"none"}function xo(e,t){return e.startsWith(t)?e.slice(t.length):e}function g0(e,t){const n=t??"rgba(0,0,0,0.15)";return{"2xs":`0 1px ${n}`,xs:`0 1px 2px 0 ${n}`,sm:`0 1px 3px 0 ${n}, 0 1px 2px -1px ${n}`,md:`0 4px 6px -1px ${n}, 0 2px 4px -2px ${n}`,lg:`0 10px 15px -3px ${n}, 0 4px 6px -4px ${n}`,xl:`0 20px 25px -5px ${n}, 0 8px 10px -6px ${n}`,"2xl":`0 25px 50px -12px ${n}`}[e]??"none"}function y0(e,t){const n=t??"rgba(0,0,0,0.05)";return{"2xs":`inset 0 0.5px ${n}`,xs:`inset 0 1px 1px ${n}`,sm:`inset 0 2px 4px ${n}`}[e]??"none"}const v0=Array.from({length:21},(e,t)=>`${t*5}%`);function x0({layer:e,onSizeHover:t,onSizeLeave:n,onSizeClick:r,onColorClick:o,onOpacityHover:l,onOpacityLeave:s,onOpacityClick:i,onRemove:u,onRemoveHover:c}){const[d,p]=b.useState(!1),f=b.useRef(),g={onMouseEnter:()=>{clearTimeout(f.current),p(!0)},onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),60)}},v=d0(e.type),w=p0(e),S=e.type==="text-shadow"?m0(e):"none",m=e.isNone,h=e.sizeClass?f0(e.type,e.sizeClass):v[0],y=!!e.colorHex,x=e.opacity!==null?`${e.opacity}%`:"100%",j=e.colorHex??void 0;function k(T){t(Ed(e.type,T))}function C(T){r(Ed(e.type,T))}return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"flex items-center justify-center",...g,children:a.jsx("span",{className:"w-1 h-1 rounded-full bg-bv-orange"})}),a.jsx("span",{className:"flex items-center text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-text-mid font-mono whitespace-nowrap",...g,children:km[e.type]}),a.jsx("span",{className:"flex items-center",...g,children:a.jsx(xn,{values:v,currentValue:h,lockedValue:null,locked:!1,onHover:k,onLeave:n,onClick:C})}),a.jsx("button",{type:"button",className:`w-[26px] h-[26px] rounded-[5px] border shrink-0 cursor-pointer transition-[border-color] ${e.colorHex?"border-bv-border hover:border-bv-teal":"border-dashed border-bv-border hover:border-bv-teal"} ${m?"opacity-30 pointer-events-none":""}`,onClick:T=>o(T.currentTarget),title:e.colorClass?e.colorClass:"Default color — click to override",...g,children:e.colorHex?a.jsx("div",{className:"w-full h-full rounded-[4px]",style:{background:j,opacity:e.opacity!==null?e.opacity/100:1}}):a.jsx("div",{className:"w-full h-full rounded-[4px] flex items-center justify-center",children:a.jsx("span",{className:"w-2 h-2 rounded-full bg-bv-text-mid opacity-40"})})}),a.jsx("span",{className:`flex items-center ${m||!y?"opacity-30 pointer-events-none":""}`,...g,children:y&&!m?a.jsx(xn,{values:v0,currentValue:x,lockedValue:null,locked:!1,onHover:l,onLeave:s,onClick:i}):a.jsx("span",{className:"flex items-center justify-center w-full h-[26px] bg-bv-surface border border-bv-border rounded-[5px]",children:a.jsx("span",{className:"font-mono text-[11px] text-bv-muted select-none",children:"—"})})}),a.jsx("span",{className:"ml-4 flex w-[26px] h-[26px] rounded-[5px] bg-bv-surface-hi border border-bv-border transition-[box-shadow] duration-200 items-center justify-center overflow-hidden",style:e.type==="text-shadow"?{}:{boxShadow:w},title:`Preview: ${e.sizeClass??""} ${e.colorClass??""}`.trim(),...g,children:e.type==="text-shadow"&&a.jsx("span",{className:"text-[11px] font-semibold text-bv-text select-none transition-[text-shadow] duration-200",style:{textShadow:S},children:"Aa"})}),a.jsx("button",{type:"button",className:`ml-4 w-[18px] h-[18px] rounded-[3px] border-none bg-transparent text-bv-muted text-xs cursor-pointer flex items-center justify-center transition-all hover:text-bv-orange hover:bg-bv-orange/10 ${d?"opacity-100":"opacity-0"}`,onClick:u,onMouseEnter:()=>{clearTimeout(f.current),p(!0),c()},onMouseLeave:()=>{f.current=setTimeout(()=>p(!1),60)},title:"Remove layer",children:"×"})]})}const w0=["shadow","inset-shadow","ring","inset-ring","text-shadow"];function b0({layers:e,onPreview:t,onRevert:n,onStage:r,onAdd:o,onRemove:l,onRemoveHover:s,onColorClick:i}){function u(d){const p=[];return d.sizeClass&&p.push(d.sizeClass),d.colorClass&&p.push(d.opacity!==null?`${d.colorClass}/${d.opacity}`:d.colorClass),p}const c=w0.map(d=>({type:d,layer:e.find(p=>p.type===d)}));return a.jsx("div",{className:"grid items-center gap-x-1.5 gap-y-1",style:{gridTemplateColumns:"16px auto 1fr 26px 1fr 26px 18px"},children:c.map(({type:d,layer:p},f)=>a.jsxs(b.Fragment,{children:[f>0&&a.jsx("div",{className:"h-px bg-bv-border opacity-50",style:{gridColumn:"1 / -1"}}),p?a.jsx(x0,{layer:p,onSizeHover:g=>t(p.sizeClass??"",g),onSizeLeave:n,onSizeClick:g=>r(p.sizeClass??"",g),onColorClick:g=>i==null?void 0:i(p,g),onOpacityHover:g=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,m=p.opacity!==null?`${v}/${p.opacity}`:v;t(m,S)},onOpacityLeave:n,onOpacityClick:g=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],w=parseInt(g),S=w===100?v:`${v}/${w}`,m=p.opacity!==null?`${v}/${p.opacity}`:v;r(m,S)},onRemove:()=>l(u(p)),onRemoveHover:()=>s(u(p))}):a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"w-4 h-4 rounded-[3px] border border-dashed border-bv-border bg-transparent text-bv-muted text-[11px] cursor-pointer flex items-center justify-center transition-all hover:border-bv-teal hover:border-solid hover:text-bv-teal hover:bg-bv-teal/10",onClick:()=>o(jd[d]),title:`Add ${jd[d]}`,children:"+"}),a.jsx("div",{className:"flex items-center leading-none text-[9px] font-mono uppercase tracking-[0.6px] text-bv-muted whitespace-nowrap",children:km[d]})]})]},d))})}const Td=[{prop:"shadow",prefix:"shadow-",sizeSet:ds},{prop:"inset-shadow",prefix:"inset-shadow-",sizeSet:fs},{prop:"ring",prefix:"ring-",sizeSet:Ur},{prop:"inset-ring",prefix:"inset-ring-",sizeSet:Ur},{prop:"text-shadow",prefix:"text-shadow-",sizeSet:ps}];function hr(e,t,n,r,o){if(!t)return n?[...e,n]:e;if(e.includes(t))return n?e.map(c=>c===t?n:c):e.filter(c=>c!==t);if(e.length===0)return n?[n]:[];const l=t.startsWith(r)?t.slice(r.length).split("/")[0]:"",s=o.has(l);let i=!1;const u=e.flatMap(c=>{const d=c.startsWith(r)?c.slice(r.length).split("/")[0]:"";return o.has(d)===s&&!i?(i=!0,n?[n]:[]):[c]});return i?u:n?[...e,n]:e}function S0(e,t){if(!t)return null;const n=e.lastIndexOf("-");if(n===-1){const i=t[e];return typeof i=="string"?i:null}const r=e.slice(0,n),o=e.slice(n+1),l=t[r];if(!l)return null;if(typeof l=="string")return l;const s=l[o];return typeof s=="string"?s:null}function k0(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=t==null?void 0:t.colors,o=[{type:"shadow",prefix:"shadow-",sizeSet:ds},{type:"inset-shadow",prefix:"inset-shadow-",sizeSet:fs},{type:"ring",prefix:"ring-",sizeSet:Ur},{type:"inset-ring",prefix:"inset-ring-",sizeSet:Ur},{type:"text-shadow",prefix:"text-shadow-",sizeSet:ps}],l=[];for(const{type:s,prefix:i,sizeSet:u}of o){const c=n.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c.length===0)continue;let d=null,p=null,f=null,g=null;for(const v of c){const S=v.slice(i.length).split("/")[0];if(u.has(S))d=v;else{p=v;const m=v.split("/");m.length===2&&(g=parseInt(m[1])),f=S0(S,r??null)}}l.push({type:s,sizeClass:d,colorClass:p,colorHex:f,opacity:g,isNone:d!==null&&(d.endsWith("-none")||d.endsWith("-0"))})}return l}function C0(e,t){const n=new Set(["shadow","inset-shadow","ring","inset-ring","text-shadow","shadow-size","shadow-color","inset-shadow-size","inset-shadow-color","ring-size","ring-color","inset-ring-size","inset-ring-color","text-shadow-size","text-shadow-color"]),r=t.filter(s=>n.has(s.property)),o=e.trim().split(/\s+/).filter(Boolean),l=o.filter(s=>!Td.some(({prefix:i})=>s===i.slice(0,-1)||s.startsWith(i)));for(const{prop:s,prefix:i,sizeSet:u}of Td){const c=r.find(v=>v.property===s),d=r.find(v=>v.property===`${s}-size`),p=r.find(v=>v.property===`${s}-color`),f=o.filter(v=>v===i.slice(0,-1)||v.startsWith(i));if(c){if(c.newClass)l.push(...hr(f,c.originalClass,c.newClass,i,u));else{const v=c.originalClass.startsWith(i)?c.originalClass.slice(i.length).split("/")[0]:"";u.has(v)||!c.originalClass||l.push(...hr(f,c.originalClass,c.newClass,i,u))}continue}let g=[...f];d&&(d.newClass?g=hr(g,d.originalClass,d.newClass,i,u):d.originalClass&&(g=hr(g,d.originalClass,"",i,u))),p&&(p.newClass?g=hr(g,p.originalClass,p.newClass,i,u):p.originalClass&&(g=hr(g,p.originalClass,"",i,u))),l.push(...g)}return l.join(" ")}const j0={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},E0=["borders","sizing","typography","color","flexbox","shadows","effects","layout"];function Nd(e){const t=e.scale??e.color??e.style??e.align??e.size??e.value;return t?e.fullClass.slice(0,e.fullClass.length-t.length):e.property+"-"}function T0(e){return e.section==="spacing"||e.property==="border"||e.property==="rounded"||e.property==="bg"||e.property==="bg-gradient-to"||e.property==="from"||e.property==="via"||e.property==="to"||e.property==="shadow"||e.property==="text-shadow"}function Vn(e){const t=e.filter(s=>s.property==="rounded"),n=[{prefix:/^rounded-tl(-|$)/,key:"tl"},{prefix:/^rounded-tr(-|$)/,key:"tr"},{prefix:/^rounded-br(-|$)/,key:"br"},{prefix:/^rounded-bl(-|$)/,key:"bl"},{prefix:/^rounded-t(-|$)/,key:"t"},{prefix:/^rounded-r(-|$)/,key:"r"},{prefix:/^rounded-b(-|$)/,key:"b"},{prefix:/^rounded-l(-|$)/,key:"l"}],r=new Map;let o=null;for(const s of t){const i=s.fullClass,u=n.find(c=>c.prefix.test(i));u?r.set(u.key,i):o=i}return{shorthandValue:o,shorthandScaleValues:Ta,slots:["all","t","r","b","l","tl","tr","br","bl"].map(s=>({key:s,value:s==="all"?o:r.get(s)??null,placeholder:s,scaleValues:s==="all"?Ta:fy(`rounded-${s}`)}))}}const gn=Sx(),Cm=kx(),N0={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Cm.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function Kl(e){const t=N0[e];if(t)return{...t,stagingKey:e};const n=Object.entries(bs).find(([o,l])=>(l.propertyKey??o.replace(/-$/g,""))===e&&l.addable);if(n){const[o,l]=n;return{scaleName:l.themeKey,valueType:l.valueType,enumAlts:l.enumAlts,stagingKey:e}}const r=bs[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function R0(e,t,n,r){const o=new Set(t.map(s=>s.fullClass)),l=new Set(t.map(s=>s.property));return e.filter(s=>{if(n.has(s.prefix)||r!=null&&r.has(s.prefix))return!1;const i=Kl(s.prefix);if((i==null?void 0:i.valueType)==="enum"&&i.enumAlts)return!i.enumAlts.some(u=>o.has(u));if(i&&i.valueType!=="enum"){if(s.prefix==="text-size")return!t.some(u=>u.property==="text"&&u.scaleName==="fontSize");if(s.prefix==="text-color")return!t.some(u=>u.property==="text"&&u.color!==void 0)}return!l.has(s.prefix.replace(/-$/g,""))})}function P0(e){const t=new Map;for(const n of e){const r=n.section??"unknown",o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function _0({componentName:e,instanceCount:t,rawClasses:n,parsedClasses:r,tailwindConfig:o,patchManager:l}){var te,re;const[s,i]=b.useState(null),[u,c]=b.useState(new Map),[d,p]=b.useState(new Map),[f,g]=b.useState(null),[v,w]=b.useState(null),[S,m]=b.useState(null),h=b.useRef(null),{refs:y,floatingStyles:x,context:j}=pn({open:f!==null,onOpenChange:E=>{E||(g(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Oa({apply({availableHeight:E,elements:D}){Object.assign(D.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:an}),k=lr(j),{getFloatingProps:C}=sr([k]);b.useEffect(()=>{f!=null&&f.anchorEl&&y.setReference(f.anchorEl)},[f==null?void 0:f.anchorEl]);const{refs:T,floatingStyles:$,context:_}=pn({open:v!==null||S!==null,onOpenChange:E=>{E||(w(null),m(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[un(4),dn(),cn({padding:8}),Oa({apply({availableHeight:E,elements:D}){Object.assign(D.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:an}),F=lr(_),{getFloatingProps:z}=sr([F]);b.useEffect(()=>{const E=(v==null?void 0:v.anchorEl)??(S==null?void 0:S.anchorEl);E&&T.setReference(E)},[v==null?void 0:v.anchorEl,S==null?void 0:S.anchorEl]);const[R,I]=b.useState(new Set),[q,W]=b.useState(!1),oe=b.useRef(r.map(E=>E.fullClass).join(" ")),N=r.map(E=>E.fullClass).join(" ");b.useEffect(()=>{oe.current!==N&&(oe.current=N,l.revertPreview(),c(new Map),p(new Map),g(null),w(null),I(new Set))});const L=e,P=l.patches.filter(E=>E.status==="staged"&&E.elementKey===L),U=new Set(P.filter(E=>E.originalClass==="").map(E=>E.property));function X(E,D){const K=P.find(he=>he.property===E),Z=(D==null?void 0:D.fullClass)??(K==null?void 0:K.originalClass)??"",se=(K==null?void 0:K.newClass)??(D==null?void 0:D.fullClass)??"";return{originalClass:Z,effectiveClass:se,hasValue:se!==""}}function Qe(E){return u.size===0?E:E.map(D=>{const K=u.get(`${D.layer}-shorthand`),Z=D.slots.map(he=>{const ke=u.get(`${D.layer}-${he.key}`);return ke!==void 0?{...he,value:ke}:he}),se=K??D.shorthandValue;let fe=D.classState;return K!==void 0&&(fe=Z.some(ke=>ke.value!=null)?"mixed":"shorthand"),{...D,shorthandValue:se,classState:fe,slots:Z}})}function $e(E){if(d.size===0)return E;const D=d.get("all");return{...E,shorthandValue:D===void 0?E.shorthandValue:D,slots:E.slots.map(K=>{const Z=d.get(K.key);return Z===void 0?K:{...K,value:Z}})}}const je=P0(r);function ae(E,D){l.preview(E,D)}function Re(){l.revertPreview()}function me(E,D,K){l.stage(L,E,D,K)}function Jr(E,D){const K=E||D,Z=K.startsWith("bg-gradient-to-")?"bg-gradient-to-":K.startsWith("from-")?"from-":K.startsWith("via-")?"via-":K.startsWith("to-")?"to-":"bg-";me(Z,E,D)}function qr(E,D){l.revertPreview(),xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),E.color!==void 0&&D?(w(K=>(K==null?void 0:K.cls.fullClass)===E.fullClass?null:{cls:E,anchorEl:D}),i(null)):(w(null),i(E))}function dr(E,D){l.preview(E.fullClass,D)}function eo(E){l.revertPreview()}function to(E){I(D=>new Set(D).add(E))}function $t(E,D){l.preview("",D)}function Kn(E){l.revertPreview()}function ee(E,D){const K=Kl(E);l.stage(L,(K==null?void 0:K.stagingKey)??E,"",D),I(Z=>{const se=new Set(Z);return se.delete(E),se})}return a.jsxs("div",{className:"divide-y divide-bv-border",children:[a.jsxs("div",{className:"px-4 py-3",children:[a.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>W(E=>!E),children:[a.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${q?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),a.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),a.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${q?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:a.jsxs("div",{className:"mt-3",children:[a.jsx(Ix,{layers:Qe(mr(r,o)),onEditStart:()=>{xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),g(null)},onSlotClick:(E,D,K)=>{var ke;if(D!=="color"||!K){g(null);return}const Z=mr(r,o).find(Kt=>Kt.layer===E),se=`${E}-color`,fe=u.get(se)??((ke=Z==null?void 0:Z.slots.find(Kt=>Kt.key==="color"))==null?void 0:ke.value)??"",he=E==="outline"?"outline-":"border-";g(Kt=>(Kt==null?void 0:Kt.layer)===E?null:{layer:E,prefix:he,currentClass:fe,staged:!1,anchorEl:K})},onSlotHover:(E,D,K)=>{var Z;if(K===null)l.revertPreview();else{const se=`${E}-${D}`,fe=mr(r,o).find(ke=>ke.layer===E),he=D==="shorthand"?u.get(se)??(fe==null?void 0:fe.shorthandValue):u.get(se)??((Z=fe==null?void 0:fe.slots.find(ke=>ke.key===D))==null?void 0:Z.value);l.preview(he??"",K)}},onSlotChange:(E,D,K)=>{var he;const Z=`${E}-${D}`,se=mr(r,o).find(ke=>ke.layer===E),fe=D==="shorthand"?u.get(Z)??(se==null?void 0:se.shorthandValue):u.get(Z)??((he=se==null?void 0:se.slots.find(ke=>ke.key===D))==null?void 0:he.value);me(`${E}-${D}`,fe??"",K),c(ke=>new Map(ke).set(Z,K))},onSlotRemoveHover:(E,D)=>{var fe;const K=`${E}-${D}`,Z=mr(r,o).find(he=>he.layer===E),se=D==="shorthand"?u.get(K)??(Z==null?void 0:Z.shorthandValue):u.get(K)??((fe=Z==null?void 0:Z.slots.find(he=>he.key===D))==null?void 0:fe.value);se&&l.preview(se,"")},onSlotRemove:(E,D)=>{var fe;const K=`${E}-${D}`,Z=mr(r,o).find(he=>he.layer===E),se=D==="shorthand"?u.get(K)??(Z==null?void 0:Z.shorthandValue):u.get(K)??((fe=Z==null?void 0:Z.slots.find(he=>he.key===D))==null?void 0:fe.value);se&&(me(`${E}-${D}`,se,""),c(he=>{const ke=new Map(he);return ke.delete(K),ke}))}}),f&&a.jsx(fn,{children:a.jsx("div",{ref:y.setFloating,style:{...x,zIndex:9999,overflowY:"auto"},...C(),children:a.jsx($l,{prefix:f.prefix,currentValue:f.currentClass.startsWith(f.prefix)?f.currentClass.slice(f.prefix.length):"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((te=P.find(E=>E.property===f.prefix))==null?void 0:te.newClass)??null,onHover:E=>{h.current=E,l.preview(f.currentClass,E)},onLeave:()=>{f.staged&&h.current?(l.preview(h.current,f.currentClass),h.current=null):l.revertPreview()},onClick:E=>{const D=`${f.layer}-color`;me(f.prefix,f.currentClass,E),c(K=>new Map(K).set(D,E)),g(K=>K?{...K,currentClass:E,staged:!0}:null)}})})})]})})]}),(v||S)&&a.jsx(fn,{children:a.jsxs("div",{ref:T.setFloating,style:{...$,zIndex:9999,overflowY:"auto"},...z(),children:[v&&a.jsx($l,{prefix:Nd(v.cls),currentValue:v.cls.color??"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((re=P.find(E=>E.property===v.cls.property))==null?void 0:re.newClass)??null,onHover:E=>ae(v.cls.fullClass,E),onLeave:Re,onClick:E=>me(v.cls.property,v.cls.fullClass,E),onRemoveHover:()=>ae(v.cls.fullClass,""),onRemove:()=>{me(v.cls.property,v.cls.fullClass,""),w(null)}}),S&&(()=>{const{layer:E}=S,D=E.type==="shadow"?"shadow-":E.type==="inset-shadow"?"inset-shadow-":E.type==="ring"?"ring-":E.type==="text-shadow"?"text-shadow-":"inset-ring-",K=E.colorClass??"",Z=K?K.slice(D.length).split("/")[0]:"";return a.jsx($l,{prefix:D,currentValue:Z,colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:null,onHover:se=>ae(K,se),onLeave:Re,onClick:se=>{const fe=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(L,fe,K,se),m(null)},onRemoveHover:()=>{K&&ae(K,"")},onRemove:()=>{if(K){const se=E.type==="shadow"?"shadow-color":E.type==="inset-shadow"?"inset-shadow-color":E.type==="ring"?"ring-color":E.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(L,se,K,"")}m(null)}})})()]})}),E0.map(E=>{if(E==="shadows"){const A=C0(n,P),Y=k0(A,o);return a.jsx(wd,{label:"Shadows & Rings",onAddProperty:()=>{},isEmpty:!1,classCount:Y.length,children:a.jsx(b0,{layers:Y,onPreview:(H,B)=>l.preview(H,B),onRevert:()=>l.revertPreview(),onStage:(H,B)=>{const ce=H||B,ne=He=>{if(He.startsWith("shadow-")){const Ke=He.slice(7).split("/")[0];return ds.has(Ke)}if(He.startsWith("inset-shadow-")){const Ke=He.slice(13).split("/")[0];return fs.has(Ke)}if(He.startsWith("ring-")||He.startsWith("inset-ring-")){const Ke=He.slice(He.startsWith("ring-")?5:11).split("/")[0];return Ur.has(Ke)}if(He.startsWith("text-shadow-")){const Ke=He.slice(12).split("/")[0];return ps.has(Ke)}return!1},De=ce.startsWith("text-shadow")?"text-shadow":ce.startsWith("inset-shadow")?"inset-shadow":ce.startsWith("inset-ring")?"inset-ring":ce.startsWith("ring")?"ring":"shadow",Ft=ne(H)||H===""&&ne(B)?`${De}-size`:`${De}-color`;l.stage(L,Ft,H,B)},onAdd:H=>{const B=H.startsWith("text-shadow")?"text-shadow-size":H.startsWith("inset-shadow")?"inset-shadow-size":H.startsWith("inset-ring")?"inset-ring-size":H.startsWith("ring")?"ring-size":"shadow-size";l.stage(L,B,"",H)},onRemove:H=>{const B=ne=>{if(ne.startsWith("shadow-")){const De=ne.slice(7).split("/")[0];return ds.has(De)}if(ne.startsWith("inset-shadow-")){const De=ne.slice(13).split("/")[0];return fs.has(De)}if(ne.startsWith("ring-")||ne.startsWith("inset-ring-")){const De=ne.slice(ne.startsWith("ring-")?5:11).split("/")[0];return Ur.has(De)}if(ne.startsWith("text-shadow-")){const De=ne.slice(12).split("/")[0];return ps.has(De)}return!1},ce=[...H].reverse();for(const ne of ce){const De=ne.startsWith("text-shadow")?"text-shadow":ne.startsWith("inset-shadow")?"inset-shadow":ne.startsWith("inset-ring")?"inset-ring":ne.startsWith("ring")?"ring":"shadow",Ft=B(ne)?`${De}-size`:`${De}-color`;l.stage(L,Ft,ne,"")}},onRemoveHover:H=>{H.length===1?l.preview(H[0],""):H.length>1&&l.preview(H.join(" "),"")},onColorClick:(H,B)=>{w(null),m(ce=>(ce==null?void 0:ce.layer.type)===H.type?null:{layer:H,anchorEl:B})}})},"shadows")}const K=(je.get(E)||[]).filter(A=>!T0(A)),Z=Cm[E]||[],se=new Set(["flex-display","flex-direction","justify-content","align-items","flex-wrap"]),fe=E==="flexbox"&&r.some(A=>{const Y=gn[A.fullClass];return Y&&se.has(Y.propertyKey??"")}),he=new Set(["flex","flex-row","flex-wrap","justify-start","items-start"]),ke=fe?Z.filter(A=>!he.has(A.prefix.replace(/-$/,""))):Z,Kt=R0(ke,K,R,U),Vs=Z.filter(A=>R.has(A.prefix)).map(A=>A.prefix),Hs=Z.filter(A=>U.has(A.prefix.replace(/-$/g,""))).map(A=>A.prefix),jm=E==="color"||E==="flexbox"&&fe||E==="borders"?!1:K.length===0&&Vs.length===0&&Hs.length===0,Em=E==="borders"?Vn(r).slots.filter(A=>A.value!=null).length+(Vn(r).shorthandValue?1:0):K.length+Vs.length+Hs.length;return a.jsxs(wd,{label:j0[E]??E,availableProperties:Kt,onAddProperty:to,isEmpty:jm,classCount:Em,children:[E==="borders"&&a.jsx(Vx,{state:$e(Vn(r)),onSlotHover:(A,Y)=>{var ne;const H=Vn(r),ce=(A==="all"?d.get("all")??H.shorthandValue:d.get(A)??((ne=H.slots.find(De=>De.key===A))==null?void 0:ne.value)??null)??"";Y===null?l.revertPreview():l.preview(ce,Y)},onSlotChange:(A,Y)=>{var ce;const H=Vn(r),B=d.get(A)??(A==="all"?H.shorthandValue:(ce=H.slots.find(ne=>ne.key===A))==null?void 0:ce.value)??"";me(`rounded-${A}`,B,Y),p(ne=>new Map(ne).set(A,Y))},onSlotRemove:A=>{var H;const Y=d.get(A)??((H=Vn(r).slots.find(B=>B.key===A))==null?void 0:H.value)??"";Y&&(me(`rounded-${A}`,Y,""),p(B=>new Map(B).set(A,null)))},onSlotRemoveHover:A=>{var H;const Y=d.get(A)??((H=Vn(r).slots.find(B=>B.key===A))==null?void 0:H.value)??"";Y&&l.preview(Y,"")},onEditStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"})}),E==="color"&&a.jsx(Zx,{...Jx(r,(o==null?void 0:o.colors)||{},P.filter(A=>A.elementKey===L)),onPreview:ae,onPreviewBatch:A=>l.previewBatch(A),onRevert:Re,onStage:Jr}),E==="flexbox"&&fe&&(()=>{const A=r;A.find(J=>{const ue=gn[J.fullClass];return(ue==null?void 0:ue.propertyKey)==="flex-display"});const Y=A.find(J=>{const ue=gn[J.fullClass];return(ue==null?void 0:ue.propertyKey)==="flex-direction"}),H=A.find(J=>{const ue=gn[J.fullClass];return(ue==null?void 0:ue.propertyKey)==="justify-content"}),B=A.find(J=>{const ue=gn[J.fullClass];return(ue==null?void 0:ue.propertyKey)==="align-items"}),ce=A.find(J=>{const ue=gn[J.fullClass];return(ue==null?void 0:ue.propertyKey)==="flex-wrap"}),ne={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},De=(Y==null?void 0:Y.fullClass)??null,nl=De?ne[De]??"row":"row",Ft=X("flex-direction",Y),He=X("flex-wrap",ce),Ke=X("justify-content",H),Wt=X("align-items",B),Tm=r.find(J=>J.property==="gap"),Nm=r.find(J=>J.property==="gap-x"),Rm=r.find(J=>J.property==="gap-y"),no=X("gap",Tm),ro=X("gap-x",Nm),oo=X("gap-y",Rm),Pm=[{key:"gap",value:no.effectiveClass||null,scaleValues:pr("gap-","spacing",o)},{key:"gap-x",value:ro.effectiveClass||null,scaleValues:pr("gap-x-","spacing",o)},{key:"gap-y",value:oo.effectiveClass||null,scaleValues:pr("gap-y-","spacing",o)}];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex justify-between items-start w-full",children:[a.jsx(t0,{currentValue:(Y==null?void 0:Y.fullClass)??null,lockedValue:Ft.effectiveClass!==Ft.originalClass?Ft.effectiveClass:null,locked:!1,onHover:J=>ae(Ft.effectiveClass,J),onLeave:Re,onClick:J=>me("flex-direction",Ft.originalClass,J)}),a.jsx(l0,{currentValue:(ce==null?void 0:ce.fullClass)??null,lockedValue:He.effectiveClass!==He.originalClass?He.effectiveClass:null,locked:!1,onHover:J=>ae(He.effectiveClass,J),onLeave:Re,onClick:J=>me("flex-wrap",He.originalClass,J)}),a.jsx(a0,{currentValue:(H==null?void 0:H.fullClass)??null,lockedValue:Ke.effectiveClass!==Ke.originalClass?Ke.effectiveClass:null,locked:!1,flexDirection:nl,onHover:J=>ae(Ke.effectiveClass,J),onLeave:Re,onClick:J=>me("justify-content",Ke.originalClass,J),onRemove:Ke.hasValue?()=>me("justify-content",Ke.originalClass,""):void 0,onRemoveHover:Ke.hasValue?()=>ae(Ke.effectiveClass,""):void 0}),a.jsx(u0,{currentValue:(B==null?void 0:B.fullClass)??null,lockedValue:Wt.effectiveClass!==Wt.originalClass?Wt.effectiveClass:null,locked:!1,flexDirection:nl,onHover:J=>ae(Wt.effectiveClass,J),onLeave:Re,onClick:J=>me("align-items",Wt.originalClass,J),onRemove:Wt.hasValue?()=>me("align-items",Wt.originalClass,""):void 0,onRemoveHover:Wt.hasValue?()=>ae(Wt.effectiveClass,""):void 0})]}),a.jsx("div",{className:"h-px w-full bg-bv-border opacity-50 my-2"}),a.jsx(c0,{slots:Pm,onSlotHover:(J,ue)=>{const Mu=J==="gap"?no:J==="gap-x"?ro:oo;ue===null?l.revertPreview():l.preview(Mu.effectiveClass,ue)},onSlotRemoveHover:J=>{const ue=J==="gap"?no:J==="gap-x"?ro:oo;ue.hasValue&&l.preview(ue.effectiveClass,"")},onSlotChange:(J,ue)=>{me(J,(J==="gap"?no:J==="gap-x"?ro:oo).originalClass,ue)},onSlotRemove:J=>{const ue=J==="gap"?no:J==="gap-x"?ro:oo;ue.hasValue&&(l.preview(ue.effectiveClass,""),me(J,ue.originalClass,""))}})]})})(),K.map(A=>{var Y,H;if(fe){const B=gn[A.fullClass];if(B&&se.has(B.propertyKey??""))return null}if(A.scaleName!==void 0){const B=pr(Nd(A),A.scaleName,o);if(B.length>0){const ce=((Y=P.find(ne=>ne.property===A.property))==null?void 0:Y.newClass)??null;return a.jsx(xn,{values:B,currentValue:A.fullClass,lockedValue:ce,locked:!1,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ne=>dr(A,ne),onLeave:()=>eo(),onClick:ne=>me(A.property,A.fullClass,ne),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>me(A.property,A.fullClass,"")},A.fullClass)}}if(A.scaleName===void 0&&A.color===void 0){const B=gn[A.fullClass];if(B){const ce=((H=P.find(ne=>ne.property===B.propertyKey))==null?void 0:H.newClass)??null;return a.jsx(xn,{values:B.alternatives,currentValue:A.fullClass,lockedValue:ce,locked:!1,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ne=>dr(A,ne),onLeave:()=>eo(),onClick:ne=>me(B.propertyKey,A.fullClass,ne),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>me(B.propertyKey,A.fullClass,"")},A.fullClass)}}return a.jsxs("div",{className:`group flex items-center gap-1 px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(s==null?void 0:s.fullClass)===A.fullClass||(v==null?void 0:v.cls.fullClass)===A.fullClass?"border-bv-border bg-bv-surface-hi text-bv-text":"bg-bv-surface text-bv-text-mid border-transparent hover:border-bv-teal hover:text-bv-teal"}`,onClick:B=>qr(A,B.currentTarget),children:[A.fullClass,a.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:B=>{B.stopPropagation(),me(A.property,A.fullClass,"")},onMouseEnter:B=>{B.stopPropagation(),l.preview(A.fullClass,"")},onMouseLeave:B=>{B.stopPropagation(),l.revertPreview()},children:a.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),a.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},A.fullClass)}),Hs.map(A=>{const Y=Kl(A);if(!Y)return null;if(Y.valueType==="scalar"){const H=pr(A,Y.scaleName,o);if(H.length===0)return null;const B=P.find(ce=>ce.property===Y.stagingKey);return a.jsx(xn,{values:H,currentValue:(B==null?void 0:B.newClass)??H[Math.floor(H.length/2)],lockedValue:(B==null?void 0:B.newClass)??null,locked:!1,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ce=>$t(A,ce),onLeave:()=>Kn(),onClick:ce=>ee(A,ce)},`staged-${A}`)}if(Y.valueType==="enum"&&Y.enumAlts){const H=P.find(B=>B.property===Y.stagingKey);return a.jsx(xn,{values:Y.enumAlts,currentValue:(H==null?void 0:H.newClass)??Y.enumAlts[0],lockedValue:(H==null?void 0:H.newClass)??null,locked:!1,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>$t(A,B),onLeave:()=>Kn(),onClick:B=>ee(A,B)},`staged-${A}`)}return null}),Vs.map(A=>{const Y=Kl(A);if(!Y)return null;if(Y.valueType==="scalar"){const H=pr(A,Y.scaleName,o);if(H.length>0)return a.jsx(xn,{values:H,currentValue:H[Math.floor(H.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:B=>$t(A,B),onLeave:()=>Kn(),onClick:B=>ee(A,B)},`pending-${A}`)}return Y.valueType==="enum"&&Y.enumAlts?a.jsx(xn,{values:Y.enumAlts,currentValue:Y.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>xe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:H=>$t(A,H),onLeave:()=>Kn(),onClick:H=>ee(A,H)},`pending-${A}`):Y.valueType==="color"?a.jsxs("div",{"data-testid":`pending-ghost-${A}`,className:"px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border border-dashed border-bv-border text-bv-muted hover:border-bv-teal hover:text-bv-teal transition-colors",onClick:H=>{w({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:H.currentTarget}),i(null)},children:[A==="text-color"?"text-":A,"color"]},`pending-${A}`):null})]},E)})]})}const L0=b.lazy(()=>sy(()=>import("./DesignMode-DHfdZ_OH.js"),[]).then(e=>({default:e.DesignMode}))),A0=new URLSearchParams(window.location.search),I0=A0.get("mode"),Rd=[{id:"design",label:"Design"},{id:"message",label:"Message"}];function O0(){return I0==="design"?a.jsx(b.Suspense,{fallback:null,children:a.jsx(L0,{})}):a.jsx(D0,{})}function D0(){const[e,t]=b.useState(!1),[n,r]=b.useState(null),[o,l]=b.useState(0),[s,i]=b.useState("design"),[u,c]=b.useState(!1),d=Ky();b.useEffect(()=>{const R=Dy(()=>{t(!0);try{const W=localStorage.getItem("tw-panel-container");W&&W!=="popover"&&xe("overlay",{type:"SWITCH_CONTAINER",container:W})}catch{}}),I=zy(()=>t(!1)),q=Oy(W=>{W.type==="ELEMENT_SELECTED"?(r({componentName:W.componentName,instanceCount:W.instanceCount,classes:W.classes,parsedClasses:xy(W.classes,Ay),tailwindConfig:W.tailwindConfig}),l(oe=>oe+1),c(!1)):W.type==="SELECT_MODE_CHANGED"?c(!!W.active):W.type==="QUEUE_UPDATE"?d.handleQueueUpdate({draftCount:W.draftCount,committedCount:W.committedCount,implementingCount:W.implementingCount,implementedCount:W.implementedCount,partialCount:W.partialCount,errorCount:W.errorCount,draft:W.draft,commits:W.commits,agentWaiting:W.agentWaiting}):W.type==="PATCH_UPDATE"&&d.handlePatchUpdate({staged:W.staged,committed:W.committed,implementing:W.implementing,implemented:W.implemented,patches:W.patches})});return Qp(),t(My()),()=>{R(),I(),q()}},[]);const{draft:p,committed:f,implementing:g,implemented:v,partial:w,error:S}=d.counts,m=f>0&&!d.agentWaiting&&g===0,h=new Map(d.patches.filter(R=>R.status==="staged").map(R=>[R.id,{id:R.id,kind:R.kind??"class-change",elementKey:R.elementKey,status:R.status,originalClass:R.originalClass,newClass:R.newClass,property:R.property,timestamp:R.timestamp,component:R.component,message:R.message,image:R.image}])),y=new Set(d.queueState.draft.map(R=>R.id)),x=[...d.queueState.draft.map(R=>h.get(R.id)??R),...d.patches.filter(R=>R.status==="staged"&&!y.has(R.id)).map(R=>h.get(R.id))],j=d.queueState.commits.filter(R=>R.status==="committed"),k=d.queueState.commits.filter(R=>R.status==="implementing"),C=d.queueState.commits.filter(R=>R.status==="implemented"),T="Please implement the next change and continue implementing changes with VyBit.";async function $(R){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){_(R);return}}catch{}navigator.clipboard.writeText(R).catch(()=>_(R))}else _(R)}function _(R){const I=document.createElement("textarea");I.value=R,I.style.position="fixed",I.style.opacity="0",document.body.appendChild(I),I.select(),document.execCommand("copy"),document.body.removeChild(I)}const F=a.jsxs("div",{className:"shrink-0",children:[!e&&a.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[a.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-bv-orange animate-pulse shrink-0"}),a.jsxs("span",{className:"flex-1 leading-tight",children:["No agent listening —"," ",a.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start!"]}),a.jsx("button",{onClick:()=>$(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),m&&a.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:a.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.19-1.458-1.516-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),a.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",a.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start"]}),a.jsx("button",{onClick:()=>$(T),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${T}"`,children:"Copy prompt"})]}),a.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[10px]",children:[a.jsx(wl,{label:"draft",count:p,items:x,activeColor:"text-amber-400",onDiscard:R=>d.discard(R),onCommitAll:()=>d.commitAll(),onDiscardAll:()=>d.discardAll()}),a.jsx(wl,{label:"committed",count:f,items:j.flatMap(R=>R.patches),activeColor:"text-bv-orange"}),a.jsx(wl,{label:"implementing",count:g,items:k.flatMap(R=>R.patches),activeColor:"text-blue-400"}),a.jsx(wl,{label:"implemented",count:v,items:C.flatMap(R=>R.patches),activeColor:"text-bv-teal"})]})]});if(!n)return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(Pd,{active:u,onToggle:()=>{const R=!u;c(R),xe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),a.jsx("div",{className:"flex-1 min-w-0",children:u?a.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"● Selecting… click an element on the page"}):a.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),a.jsx(Xc,{})]})}),a.jsx(Jc,{tabs:Rd,activeTab:s,onTabChange:i}),a.jsx("div",{className:"flex-1 overflow-auto",children:s==="message"?a.jsx(Zc,{draft:x,currentElementKey:"",onAddMessage:(R,I)=>d.stageMessage(R,I),onDiscard:R=>d.discard(R)}):u?a.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),a.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})}),a.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),a.jsxs("span",{className:"text-[12px] text-bv-muted text-center leading-relaxed",children:["Hover over elements on the page to preview, then click to select.",a.jsx("br",{}),"Press"," ",a.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-white/6 border border-white/8 font-mono text-[10px] text-bv-text-mid leading-none",children:"Esc"})," ","to cancel."]})]}):a.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:a.jsxs("button",{onClick:()=>{c(!0),xe("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})},className:"w-full flex flex-col items-center gap-3 px-6 py-5 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[a.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:a.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[a.jsx("path",{d:"M2,9C1.447,9,1,8.552,1,8V2c0-0.552,0.447-1,1-1h6c0.553,0,1,0.448,1,1S8.553,3,8,3H3v5C3,8.552,2.553,9,2,9z"}),a.jsx("path",{d:"M8,48H2c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v5h5c0.553,0,1,0.448,1,1S8.553,48,8,48z"}),a.jsx("path",{d:"M47,9c-0.553,0-1-0.448-1-1V3h-5c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1v6C48,8.552,47.553,9,47,9z"}),a.jsx("path",{d:"M21,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,3,21,3z"}),a.jsx("path",{d:"M2,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,21.552,2.553,22,2,22z"}),a.jsx("path",{d:"M2,35c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,34.552,2.553,35,2,35z"}),a.jsx("path",{d:"M47,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C48,21.552,47.553,22,47,22z"}),a.jsx("path",{d:"M47,31c-0.553,0-1-0.448-1-1v-2c0-0.552,0.447-1,1-1s1,0.448,1,1v2C48,30.552,47.553,31,47,31z"}),a.jsx("path",{d:"M34,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S34.553,3,34,3z"}),a.jsx("path",{d:"M21,48h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,48,21,48z"}),a.jsx("path",{d:"M30,48h-2c-0.553,0-1-0.448-1-1s0.447-1,1-1h2c0.553,0,1,0.448,1,1S30.553,48,30,48z"}),a.jsx("path",{d:"M62.707,57.293L51.688,46.274l10.759-5.379c0.368-0.184,0.586-0.575,0.549-0.985c-0.037-0.41-0.322-0.755-0.717-0.87l-31-9c-0.355-0.1-0.729-0.005-0.986,0.253c-0.258,0.258-0.355,0.636-0.253,0.986l9,31c0.114,0.396,0.46,0.68,0.869,0.717C39.94,62.999,39.971,63,40,63c0.376,0,0.724-0.212,0.895-0.553l5.38-10.759l11.019,11.019c0.391,0.391,1.023,0.391,1.414,0l4-4C63.098,58.316,63.098,57.684,62.707,57.293z"})]})}),a.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⌘"}),a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⇧"}),a.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"C"})]})]})})}),F]});const z=n.parsedClasses;return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(Pd,{active:u,onToggle:()=>{const R=!u;c(R),xe("overlay",{type:"TOGGLE_SELECT_MODE",active:R})}}),a.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",a.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),a.jsx(Xc,{})]})}),a.jsx(Jc,{tabs:Rd,activeTab:s,onTabChange:i}),a.jsxs("div",{className:"flex-1 overflow-auto",children:[s==="design"&&a.jsx(_0,{componentName:n.componentName,instanceCount:n.instanceCount,rawClasses:n.classes,parsedClasses:z,tailwindConfig:n.tailwindConfig,patchManager:d},o),s==="message"&&a.jsx(Zc,{draft:x,currentElementKey:n.componentName,onAddMessage:(R,I)=>d.stageMessage(R,I,n.componentName),onDiscard:R=>d.discard(R)})]}),F]})}function Pd({active:e,onToggle:t}){return a.jsx("button",{onClick:t,title:`${e?"Stop selecting":"Select an element"} (⌘⇧C)`,className:`w-7 h-7 rounded flex items-center justify-center shrink-0 border transition-all
|
|
49
|
-
${e?"bg-bv-teal border-bv-teal text-white":"bg-transparent border-bv-border text-bv-text-mid hover:border-bv-teal hover:text-bv-teal hover:bg-bv-teal/10"}`,children:a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[a.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),a.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})})}Ai.createRoot(document.getElementById("root")).render(a.jsx(Fd.StrictMode,{children:a.jsx(O0,{})}));export{Oy as a,Qp as c,a as j,Dy as o,b as r,Rr as s};
|