@bitovi/vybit 0.6.0 → 0.7.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.
@@ -0,0 +1,53 @@
1
+ function Xp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(r,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>r[l]})}}}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 l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Zp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var td={exports:{}},ti={},nd={exports:{}},ne={};/**
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 bl=Symbol.for("react.element"),Jp=Symbol.for("react.portal"),qp=Symbol.for("react.fragment"),em=Symbol.for("react.strict_mode"),tm=Symbol.for("react.profiler"),nm=Symbol.for("react.provider"),rm=Symbol.for("react.context"),lm=Symbol.for("react.forward_ref"),om=Symbol.for("react.suspense"),im=Symbol.for("react.memo"),sm=Symbol.for("react.lazy"),mu=Symbol.iterator;function am(e){return e===null||typeof e!="object"?null:(e=mu&&e[mu]||e["@@iterator"],typeof e=="function"?e:null)}var rd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ld=Object.assign,od={};function Cr(e,t,n){this.props=e,this.context=t,this.refs=od,this.updater=n||rd}Cr.prototype.isReactComponent={};Cr.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")};Cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function id(){}id.prototype=Cr.prototype;function ma(e,t,n){this.props=e,this.context=t,this.refs=od,this.updater=n||rd}var ha=ma.prototype=new id;ha.constructor=ma;ld(ha,Cr.prototype);ha.isPureReactComponent=!0;var hu=Array.isArray,sd=Object.prototype.hasOwnProperty,ya={current:null},ad={key:!0,ref:!0,__self:!0,__source:!0};function ud(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)sd.call(t,r)&&!ad.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];l.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)l[r]===void 0&&(l[r]=s[r]);return{$$typeof:bl,type:e,key:o,ref:i,props:l,_owner:ya.current}}function um(e,t){return{$$typeof:bl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ga(e){return typeof e=="object"&&e!==null&&e.$$typeof===bl}function cm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var yu=/\/+/g;function Ei(e,t){return typeof e=="object"&&e!==null&&e.key!=null?cm(""+e.key):t.toString(36)}function Ql(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case bl:case Jp:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+Ei(i,0):r,hu(l)?(n="",e!=null&&(n=e.replace(yu,"$&/")+"/"),Ql(l,t,n,"",function(c){return c})):l!=null&&(ga(l)&&(l=um(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(yu,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",hu(e))for(var s=0;s<e.length;s++){o=e[s];var a=r+Ei(o,s);i+=Ql(o,t,n,a,l)}else if(a=am(e),typeof a=="function")for(e=a.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Ei(o,s++),i+=Ql(o,t,n,a,l);else if(o==="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 i}function Nl(e,t,n){if(e==null)return e;var r=[],l=0;return Ql(e,r,"","",function(o){return t.call(n,o,l++)}),r}function dm(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 Ve={current:null},Yl={transition:null},fm={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:Yl,ReactCurrentOwner:ya};function cd(){throw Error("act(...) is not supported in production builds of React.")}ne.Children={map:Nl,forEach:function(e,t,n){Nl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nl(e,function(){t++}),t},toArray:function(e){return Nl(e,function(t){return t})||[]},only:function(e){if(!ga(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=Cr;ne.Fragment=qp;ne.Profiler=tm;ne.PureComponent=ma;ne.StrictMode=em;ne.Suspense=om;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fm;ne.act=cd;ne.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=ld({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ya.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)sd.call(t,a)&&!ad.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var c=0;c<a;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:bl,type:e.type,key:l,ref:o,props:r,_owner:i}};ne.createContext=function(e){return e={$$typeof:rm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:nm,_context:e},e.Consumer=e};ne.createElement=ud;ne.createFactory=function(e){var t=ud.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:lm,render:e}};ne.isValidElement=ga;ne.lazy=function(e){return{$$typeof:sm,_payload:{_status:-1,_result:e},_init:dm}};ne.memo=function(e,t){return{$$typeof:im,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=Yl.transition;Yl.transition={};try{e()}finally{Yl.transition=t}};ne.unstable_act=cd;ne.useCallback=function(e,t){return Ve.current.useCallback(e,t)};ne.useContext=function(e){return Ve.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};ne.useEffect=function(e,t){return Ve.current.useEffect(e,t)};ne.useId=function(){return Ve.current.useId()};ne.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};ne.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return Ve.current.useMemo(e,t)};ne.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};ne.useRef=function(e){return Ve.current.useRef(e)};ne.useState=function(e){return Ve.current.useState(e)};ne.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};ne.useTransition=function(){return Ve.current.useTransition()};ne.version="18.3.1";nd.exports=ne;var b=nd.exports;const dd=Zp(b),fd=Xp({__proto__:null,default:dd},[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 pm=b,mm=Symbol.for("react.element"),hm=Symbol.for("react.fragment"),ym=Object.prototype.hasOwnProperty,gm=pm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vm={key:!0,ref:!0,__self:!0,__source:!0};function pd(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)ym.call(t,r)&&!vm.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:mm,type:e,key:o,ref:i,props:l,_owner:gm.current}}ti.Fragment=hm;ti.jsx=pd;ti.jsxs=pd;td.exports=ti;var u=td.exports,fs={},md={exports:{}},nt={},hd={exports:{}},yd={};/**
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(T,A){var _=T.length;T.push(A);e:for(;0<_;){var H=_-1>>>1,re=T[H];if(0<l(re,A))T[H]=A,T[_]=re,_=H;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var A=T[0],_=T.pop();if(_!==A){T[0]=_;e:for(var H=0,re=T.length,fe=re>>>1;H<fe;){var ge=2*(H+1)-1,ee=T[ge],we=ge+1,Be=T[we];if(0>l(ee,_))we<re&&0>l(Be,ee)?(T[H]=Be,T[we]=_,H=we):(T[H]=ee,T[ge]=_,H=ge);else if(we<re&&0>l(Be,_))T[H]=Be,T[we]=_,H=we;else break e}}return A}function l(T,A){var _=T.sortIndex-A.sortIndex;return _!==0?_:T.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var a=[],c=[],f=1,p=null,d=3,y=!1,x=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(T){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=T)r(c),A.sortIndex=A.expirationTime,t(a,A);else break;A=n(c)}}function v(T){if(w=!1,g(T),!x)if(n(a)!==null)x=!0,K(C);else{var A=n(c);A!==null&&Y(v,A.startTime-T)}}function C(T,A){x=!1,w&&(w=!1,h(R),R=-1),y=!0;var _=d;try{for(g(A),p=n(a);p!==null&&(!(p.expirationTime>A)||T&&!V());){var H=p.callback;if(typeof H=="function"){p.callback=null,d=p.priorityLevel;var re=H(p.expirationTime<=A);A=e.unstable_now(),typeof re=="function"?p.callback=re:p===n(a)&&r(a),g(A)}else r(a);p=n(a)}if(p!==null)var fe=!0;else{var ge=n(c);ge!==null&&Y(v,ge.startTime-A),fe=!1}return fe}finally{p=null,d=_,y=!1}}var j=!1,S=null,R=-1,F=5,N=-1;function V(){return!(e.unstable_now()-N<F)}function W(){if(S!==null){var T=e.unstable_now();N=T;var A=!0;try{A=S(!0,T)}finally{A?P():(j=!1,S=null)}}else j=!1}var P;if(typeof m=="function")P=function(){m(W)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,Z=M.port2;M.port1.onmessage=W,P=function(){Z.postMessage(null)}}else P=function(){k(W,0)};function K(T){S=T,j||(j=!0,P())}function Y(T,A){R=k(function(){T(e.unstable_now())},A)}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(T){T.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,K(C))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(T){switch(d){case 1:case 2:case 3:var A=3;break;default:A=d}var _=d;d=A;try{return T()}finally{d=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,A){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var _=d;d=T;try{return A()}finally{d=_}},e.unstable_scheduleCallback=function(T,A,_){var H=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?H+_:H):_=H,T){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=_+re,T={id:f++,callback:A,priorityLevel:T,startTime:_,expirationTime:re,sortIndex:-1},_>H?(T.sortIndex=_,t(c,T),n(a)===null&&T===n(c)&&(w?(h(R),R=-1):w=!0,Y(v,_-H))):(T.sortIndex=re,t(a,T),x||y||(x=!0,K(C))),T},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(T){var A=d;return function(){var _=d;d=A;try{return T.apply(this,arguments)}finally{d=_}}}})(yd);hd.exports=yd;var xm=hd.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 wm=b,tt=xm;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,tl={};function Fn(e,t){yr(e,t),yr(e+"Capture",t)}function yr(e,t){for(tl[e]=t,e=0;e<t.length;e++)gd.add(t[e])}var Wt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ps=Object.prototype.hasOwnProperty,bm=/^[: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]*$/,gu={},vu={};function Sm(e){return ps.call(vu,e)?!0:ps.call(gu,e)?!1:bm.test(e)?vu[e]=!0:(gu[e]=!0,!1)}function km(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 Cm(e,t,n,r){if(t===null||typeof t>"u"||km(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 We(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new We(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){Oe[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var va=/[\-:]([a-z])/g;function xa(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(va,xa);Oe[t]=new We(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(va,xa);Oe[t]=new We(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(va,xa);Oe[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function wa(e,t,n,r){var l=Oe.hasOwnProperty(t)?Oe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Cm(t,n,l,r)&&(n=null),r||l===null?Sm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qt=wm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pl=Symbol.for("react.element"),Yn=Symbol.for("react.portal"),Xn=Symbol.for("react.fragment"),ba=Symbol.for("react.strict_mode"),ms=Symbol.for("react.profiler"),vd=Symbol.for("react.provider"),xd=Symbol.for("react.context"),Sa=Symbol.for("react.forward_ref"),hs=Symbol.for("react.suspense"),ys=Symbol.for("react.suspense_list"),ka=Symbol.for("react.memo"),qt=Symbol.for("react.lazy"),wd=Symbol.for("react.offscreen"),xu=Symbol.iterator;function Ar(e){return e===null||typeof e!="object"?null:(e=xu&&e[xu]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,Ti;function Vr(e){if(Ti===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ti=t&&t[1]||""}return`
34
+ `+Ti+e}var Ri=!1;function Ni(e,t){if(!e||Ri)return"";Ri=!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 l=c.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),i=l.length-1,s=o.length-1;1<=i&&0<=s&&l[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(l[i]!==o[s]){if(i!==1||s!==1)do if(i--,s--,0>s||l[i]!==o[s]){var a=`
37
+ `+l[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=s);break}}}finally{Ri=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vr(e):""}function jm(e){switch(e.tag){case 5:return Vr(e.type);case 16:return Vr("Lazy");case 13:return Vr("Suspense");case 19:return Vr("SuspenseList");case 0:case 2:case 15:return e=Ni(e.type,!1),e;case 11:return e=Ni(e.type.render,!1),e;case 1:return e=Ni(e.type,!0),e;default:return""}}function gs(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 Xn:return"Fragment";case Yn:return"Portal";case ms:return"Profiler";case ba:return"StrictMode";case hs:return"Suspense";case ys:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xd:return(e.displayName||"Context")+".Consumer";case vd:return(e._context.displayName||"Context")+".Provider";case Sa:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ka:return t=e.displayName||null,t!==null?t:gs(e.type)||"Memo";case qt:t=e._payload,e=e._init;try{return gs(e(t))}catch{}}return null}function Em(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 gs(t);case 8:return t===ba?"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 hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tm(e){var t=bd(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 l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _l(e){e._valueTracker||(e._valueTracker=Tm(e))}function Sd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function po(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 vs(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hn(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 kd(e,t){t=t.checked,t!=null&&wa(e,"checked",t,!1)}function xs(e,t){kd(e,t);var n=hn(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")?ws(e,t.type,n):t.hasOwnProperty("defaultValue")&&ws(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bu(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 ws(e,t,n){(t!=="number"||po(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wr=Array.isArray;function ur(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+hn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function bs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Su(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(Wr(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:hn(n)}}function Cd(e,t){var n=hn(t.value),r=hn(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 ku(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function jd(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 Ss(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?jd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ll,Ed=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ll=Ll||document.createElement("div"),Ll.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ur={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},Rm=["Webkit","ms","Moz","O"];Object.keys(Ur).forEach(function(e){Rm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ur[t]=Ur[e]})});function Td(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ur.hasOwnProperty(e)&&Ur[e]?(""+t).trim():t+"px"}function Rd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Td(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Nm=ye({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 ks(e,t){if(t){if(Nm[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 Cs(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 js=null;function Ca(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Es=null,cr=null,dr=null;function Cu(e){if(e=Cl(e)){if(typeof Es!="function")throw Error(O(280));var t=e.stateNode;t&&(t=ii(t),Es(e.stateNode,e.type,t))}}function Nd(e){cr?dr?dr.push(e):dr=[e]:cr=e}function Pd(){if(cr){var e=cr,t=dr;if(dr=cr=null,Cu(e),t)for(e=0;e<t.length;e++)Cu(t[e])}}function _d(e,t){return e(t)}function Ld(){}var Pi=!1;function Ad(e,t,n){if(Pi)return e(t,n);Pi=!0;try{return _d(e,t,n)}finally{Pi=!1,(cr!==null||dr!==null)&&(Ld(),Pd())}}function rl(e,t){var n=e.stateNode;if(n===null)return null;var r=ii(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 Ts=!1;if(Wt)try{var Ir={};Object.defineProperty(Ir,"passive",{get:function(){Ts=!0}}),window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Ts=!1}function Pm(e,t,n,r,l,o,i,s,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var Gr=!1,mo=null,ho=!1,Rs=null,_m={onError:function(e){Gr=!0,mo=e}};function Lm(e,t,n,r,l,o,i,s,a){Gr=!1,mo=null,Pm.apply(_m,arguments)}function Am(e,t,n,r,l,o,i,s,a){if(Lm.apply(this,arguments),Gr){if(Gr){var c=mo;Gr=!1,mo=null}else throw Error(O(198));ho||(ho=!0,Rs=c)}}function Vn(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 Id(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 ju(e){if(Vn(e)!==e)throw Error(O(188))}function Im(e){var t=e.alternate;if(!t){if(t=Vn(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return ju(l),e;if(o===r)return ju(l),t;o=o.sibling}throw Error(O(188))}if(n.return!==r.return)n=l,r=o;else{for(var i=!1,s=l.child;s;){if(s===n){i=!0,n=l,r=o;break}if(s===r){i=!0,r=l,n=o;break}s=s.sibling}if(!i){for(s=o.child;s;){if(s===n){i=!0,n=o,r=l;break}if(s===r){i=!0,r=o,n=l;break}s=s.sibling}if(!i)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 Od(e){return e=Im(e),e!==null?Dd(e):null}function Dd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Dd(e);if(t!==null)return t;e=e.sibling}return null}var Md=tt.unstable_scheduleCallback,Eu=tt.unstable_cancelCallback,Om=tt.unstable_shouldYield,Dm=tt.unstable_requestPaint,be=tt.unstable_now,Mm=tt.unstable_getCurrentPriorityLevel,ja=tt.unstable_ImmediatePriority,Kd=tt.unstable_UserBlockingPriority,yo=tt.unstable_NormalPriority,Km=tt.unstable_LowPriority,zd=tt.unstable_IdlePriority,ni=null,kt=null;function zm(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(ni,e,void 0,(e.current.flags&128)===128)}catch{}}var gt=Math.clz32?Math.clz32:Vm,$m=Math.log,Fm=Math.LN2;function Vm(e){return e>>>=0,e===0?32:31-($m(e)/Fm|0)|0}var Al=64,Il=4194304;function Br(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 go(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~l;s!==0?r=Br(s):(o&=i,o!==0&&(r=Br(o)))}else i=n&~l,i!==0?r=Br(i):o!==0&&(r=Br(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&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-gt(t),l=1<<n,r|=e[n],t&=~l;return r}function Wm(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 Bm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-gt(o),s=1<<i,a=l[i];a===-1?(!(s&n)||s&r)&&(l[i]=Wm(s,t)):a<=t&&(e.expiredLanes|=s),o&=~s}}function Ns(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $d(){var e=Al;return Al<<=1,!(Al&4194240)&&(Al=64),e}function _i(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gt(t),e[t]=n}function Hm(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 l=31-gt(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function Ea(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-gt(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var oe=0;function Fd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Vd,Ta,Wd,Bd,Hd,Ps=!1,Ol=[],on=null,sn=null,an=null,ll=new Map,ol=new Map,tn=[],Um="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 Tu(e,t){switch(e){case"focusin":case"focusout":on=null;break;case"dragenter":case"dragleave":sn=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":ll.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(t.pointerId)}}function Or(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=Cl(t),t!==null&&Ta(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Gm(e,t,n,r,l){switch(t){case"focusin":return on=Or(on,e,t,n,r,l),!0;case"dragenter":return sn=Or(sn,e,t,n,r,l),!0;case"mouseover":return an=Or(an,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return ll.set(o,Or(ll.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,ol.set(o,Or(ol.get(o)||null,e,t,n,r,l)),!0}return!1}function Ud(e){var t=Rn(e.target);if(t!==null){var n=Vn(t);if(n!==null){if(t=n.tag,t===13){if(t=Id(n),t!==null){e.blockedOn=t,Hd(e.priority,function(){Wd(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 Xl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_s(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);js=r,n.target.dispatchEvent(r),js=null}else return t=Cl(n),t!==null&&Ta(t),e.blockedOn=n,!1;t.shift()}return!0}function Ru(e,t,n){Xl(e)&&n.delete(t)}function Qm(){Ps=!1,on!==null&&Xl(on)&&(on=null),sn!==null&&Xl(sn)&&(sn=null),an!==null&&Xl(an)&&(an=null),ll.forEach(Ru),ol.forEach(Ru)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ps||(Ps=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,Qm)))}function il(e){function t(l){return Dr(l,e)}if(0<Ol.length){Dr(Ol[0],e);for(var n=1;n<Ol.length;n++){var r=Ol[n];r.blockedOn===e&&(r.blockedOn=null)}}for(on!==null&&Dr(on,e),sn!==null&&Dr(sn,e),an!==null&&Dr(an,e),ll.forEach(t),ol.forEach(t),n=0;n<tn.length;n++)r=tn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<tn.length&&(n=tn[0],n.blockedOn===null);)Ud(n),n.blockedOn===null&&tn.shift()}var fr=Qt.ReactCurrentBatchConfig,vo=!0;function Ym(e,t,n,r){var l=oe,o=fr.transition;fr.transition=null;try{oe=1,Ra(e,t,n,r)}finally{oe=l,fr.transition=o}}function Xm(e,t,n,r){var l=oe,o=fr.transition;fr.transition=null;try{oe=4,Ra(e,t,n,r)}finally{oe=l,fr.transition=o}}function Ra(e,t,n,r){if(vo){var l=_s(e,t,n,r);if(l===null)Fi(e,t,r,xo,n),Tu(e,r);else if(Gm(l,e,t,n,r))r.stopPropagation();else if(Tu(e,r),t&4&&-1<Um.indexOf(e)){for(;l!==null;){var o=Cl(l);if(o!==null&&Vd(o),o=_s(e,t,n,r),o===null&&Fi(e,t,r,xo,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else Fi(e,t,r,null,n)}}var xo=null;function _s(e,t,n,r){if(xo=null,e=Ca(r),e=Rn(e),e!==null)if(t=Vn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Id(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 xo=e,null}function Gd(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(Mm()){case ja:return 1;case Kd:return 4;case yo:case Km:return 16;case zd:return 536870912;default:return 16}default:return 16}}var rn=null,Na=null,Zl=null;function Qd(){if(Zl)return Zl;var e,t=Na,n=t.length,r,l="value"in rn?rn.value:rn.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[o-r];r++);return Zl=l.slice(e,1<r?1-r:void 0)}function Jl(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 Dl(){return!0}function Nu(){return!1}function rt(e){function t(n,r,l,o,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Dl:Nu,this.isPropagationStopped=Nu,this}return ye(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=Dl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Dl)},persist:function(){},isPersistent:Dl}),t}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pa=rt(jr),kl=ye({},jr,{view:0,detail:0}),Zm=rt(kl),Li,Ai,Mr,ri=ye({},kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_a,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!==Mr&&(Mr&&e.type==="mousemove"?(Li=e.screenX-Mr.screenX,Ai=e.screenY-Mr.screenY):Ai=Li=0,Mr=e),Li)},movementY:function(e){return"movementY"in e?e.movementY:Ai}}),Pu=rt(ri),Jm=ye({},ri,{dataTransfer:0}),qm=rt(Jm),eh=ye({},kl,{relatedTarget:0}),Ii=rt(eh),th=ye({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),nh=rt(th),rh=ye({},jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lh=rt(rh),oh=ye({},jr,{data:0}),_u=rt(oh),ih={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sh={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"},ah={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ah[e])?!!t[e]:!1}function _a(){return uh}var ch=ye({},kl,{key:function(e){if(e.key){var t=ih[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_a,charCode:function(e){return e.type==="keypress"?Jl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dh=rt(ch),fh=ye({},ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lu=rt(fh),ph=ye({},kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_a}),mh=rt(ph),hh=ye({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),yh=rt(hh),gh=ye({},ri,{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}),vh=rt(gh),xh=[9,13,27,32],La=Wt&&"CompositionEvent"in window,Qr=null;Wt&&"documentMode"in document&&(Qr=document.documentMode);var wh=Wt&&"TextEvent"in window&&!Qr,Yd=Wt&&(!La||Qr&&8<Qr&&11>=Qr),Au=" ",Iu=!1;function Xd(e,t){switch(e){case"keyup":return xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zn=!1;function bh(e,t){switch(e){case"compositionend":return Zd(t);case"keypress":return t.which!==32?null:(Iu=!0,Au);case"textInput":return e=t.data,e===Au&&Iu?null:e;default:return null}}function Sh(e,t){if(Zn)return e==="compositionend"||!La&&Xd(e,t)?(e=Qd(),Zl=Na=rn=null,Zn=!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 Yd&&t.locale!=="ko"?null:t.data;default:return null}}var kh={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 Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kh[e.type]:t==="textarea"}function Jd(e,t,n,r){Nd(r),t=wo(t,"onChange"),0<t.length&&(n=new Pa("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yr=null,sl=null;function Ch(e){cf(e,0)}function li(e){var t=er(e);if(Sd(t))return e}function jh(e,t){if(e==="change")return t}var qd=!1;if(Wt){var Oi;if(Wt){var Di="oninput"in document;if(!Di){var Du=document.createElement("div");Du.setAttribute("oninput","return;"),Di=typeof Du.oninput=="function"}Oi=Di}else Oi=!1;qd=Oi&&(!document.documentMode||9<document.documentMode)}function Mu(){Yr&&(Yr.detachEvent("onpropertychange",ef),sl=Yr=null)}function ef(e){if(e.propertyName==="value"&&li(sl)){var t=[];Jd(t,sl,e,Ca(e)),Ad(Ch,t)}}function Eh(e,t,n){e==="focusin"?(Mu(),Yr=t,sl=n,Yr.attachEvent("onpropertychange",ef)):e==="focusout"&&Mu()}function Th(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return li(sl)}function Rh(e,t){if(e==="click")return li(t)}function Nh(e,t){if(e==="input"||e==="change")return li(t)}function Ph(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:Ph;function al(e,t){if(xt(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 l=n[r];if(!ps.call(t,l)||!xt(e[l],t[l]))return!1}return!0}function Ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zu(e,t){var n=Ku(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=Ku(n)}}function tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nf(){for(var e=window,t=po();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=po(e.document)}return t}function Aa(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 _h(e){var t=nf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tf(n.ownerDocument.documentElement,n)){if(r!==null&&Aa(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 l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=zu(n,o);var i=zu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 Lh=Wt&&"documentMode"in document&&11>=document.documentMode,Jn=null,Ls=null,Xr=null,As=!1;function $u(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;As||Jn==null||Jn!==po(r)||(r=Jn,"selectionStart"in r&&Aa(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}),Xr&&al(Xr,r)||(Xr=r,r=wo(Ls,"onSelect"),0<r.length&&(t=new Pa("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Jn)))}function Ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qn={animationend:Ml("Animation","AnimationEnd"),animationiteration:Ml("Animation","AnimationIteration"),animationstart:Ml("Animation","AnimationStart"),transitionend:Ml("Transition","TransitionEnd")},Mi={},rf={};Wt&&(rf=document.createElement("div").style,"AnimationEvent"in window||(delete qn.animationend.animation,delete qn.animationiteration.animation,delete qn.animationstart.animation),"TransitionEvent"in window||delete qn.transitionend.transition);function oi(e){if(Mi[e])return Mi[e];if(!qn[e])return e;var t=qn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rf)return Mi[e]=t[n];return e}var lf=oi("animationend"),of=oi("animationiteration"),sf=oi("animationstart"),af=oi("transitionend"),uf=new Map,Fu="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 vn(e,t){uf.set(e,t),Fn(t,[e])}for(var Ki=0;Ki<Fu.length;Ki++){var zi=Fu[Ki],Ah=zi.toLowerCase(),Ih=zi[0].toUpperCase()+zi.slice(1);vn(Ah,"on"+Ih)}vn(lf,"onAnimationEnd");vn(of,"onAnimationIteration");vn(sf,"onAnimationStart");vn("dblclick","onDoubleClick");vn("focusin","onFocus");vn("focusout","onBlur");vn(af,"onTransitionEnd");yr("onMouseEnter",["mouseout","mouseover"]);yr("onMouseLeave",["mouseout","mouseover"]);yr("onPointerEnter",["pointerout","pointerover"]);yr("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hr="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(" "),Oh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hr));function Vu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Am(r,t,void 0,e),e.currentTarget=null}function cf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],a=s.instance,c=s.currentTarget;if(s=s.listener,a!==o&&l.isPropagationStopped())break e;Vu(l,s,c),o=a}else for(i=0;i<r.length;i++){if(s=r[i],a=s.instance,c=s.currentTarget,s=s.listener,a!==o&&l.isPropagationStopped())break e;Vu(l,s,c),o=a}}}if(ho)throw e=Rs,ho=!1,Rs=null,e}function ue(e,t){var n=t[Ks];n===void 0&&(n=t[Ks]=new Set);var r=e+"__bubble";n.has(r)||(df(t,e,2,!1),n.add(r))}function $i(e,t,n){var r=0;t&&(r|=4),df(n,e,r,t)}var Kl="_reactListening"+Math.random().toString(36).slice(2);function ul(e){if(!e[Kl]){e[Kl]=!0,gd.forEach(function(n){n!=="selectionchange"&&(Oh.has(n)||$i(n,!1,e),$i(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kl]||(t[Kl]=!0,$i("selectionchange",!1,t))}}function df(e,t,n,r){switch(Gd(t)){case 1:var l=Ym;break;case 4:l=Xm;break;default:l=Ra}n=l.bind(null,t,n,e),l=void 0,!Ts||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Fi(e,t,n,r,l){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===l||s.nodeType===8&&s.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var a=i.tag;if((a===3||a===4)&&(a=i.stateNode.containerInfo,a===l||a.nodeType===8&&a.parentNode===l))return;i=i.return}for(;s!==null;){if(i=Rn(s),i===null)return;if(a=i.tag,a===5||a===6){r=o=i;continue e}s=s.parentNode}}r=r.return}Ad(function(){var c=o,f=Ca(n),p=[];e:{var d=uf.get(e);if(d!==void 0){var y=Pa,x=e;switch(e){case"keypress":if(Jl(n)===0)break e;case"keydown":case"keyup":y=dh;break;case"focusin":x="focus",y=Ii;break;case"focusout":x="blur",y=Ii;break;case"beforeblur":case"afterblur":y=Ii;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":y=Pu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=qm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=mh;break;case lf:case of:case sf:y=nh;break;case af:y=yh;break;case"scroll":y=Zm;break;case"wheel":y=vh;break;case"copy":case"cut":case"paste":y=lh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Lu}var w=(t&4)!==0,k=!w&&e==="scroll",h=w?d!==null?d+"Capture":null:d;w=[];for(var m=c,g;m!==null;){g=m;var v=g.stateNode;if(g.tag===5&&v!==null&&(g=v,h!==null&&(v=rl(m,h),v!=null&&w.push(cl(m,v,g)))),k)break;m=m.return}0<w.length&&(d=new y(d,x,null,n,f),p.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&n!==js&&(x=n.relatedTarget||n.fromElement)&&(Rn(x)||x[Bt]))break e;if((y||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=c,x=x?Rn(x):null,x!==null&&(k=Vn(x),x!==k||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=c),y!==x)){if(w=Pu,v="onMouseLeave",h="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(w=Lu,v="onPointerLeave",h="onPointerEnter",m="pointer"),k=y==null?d:er(y),g=x==null?d:er(x),d=new w(v,m+"leave",y,n,f),d.target=k,d.relatedTarget=g,v=null,Rn(f)===c&&(w=new w(h,m+"enter",x,n,f),w.target=g,w.relatedTarget=k,v=w),k=v,y&&x)t:{for(w=y,h=x,m=0,g=w;g;g=Hn(g))m++;for(g=0,v=h;v;v=Hn(v))g++;for(;0<m-g;)w=Hn(w),m--;for(;0<g-m;)h=Hn(h),g--;for(;m--;){if(w===h||h!==null&&w===h.alternate)break t;w=Hn(w),h=Hn(h)}w=null}else w=null;y!==null&&Wu(p,d,y,w,!1),x!==null&&k!==null&&Wu(p,k,x,w,!0)}}e:{if(d=c?er(c):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=jh;else if(Ou(d))if(qd)C=Nh;else{C=Th;var j=Eh}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=Rh);if(C&&(C=C(e,c))){Jd(p,C,n,f);break e}j&&j(e,d,c),e==="focusout"&&(j=d._wrapperState)&&j.controlled&&d.type==="number"&&ws(d,"number",d.value)}switch(j=c?er(c):window,e){case"focusin":(Ou(j)||j.contentEditable==="true")&&(Jn=j,Ls=c,Xr=null);break;case"focusout":Xr=Ls=Jn=null;break;case"mousedown":As=!0;break;case"contextmenu":case"mouseup":case"dragend":As=!1,$u(p,n,f);break;case"selectionchange":if(Lh)break;case"keydown":case"keyup":$u(p,n,f)}var S;if(La)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Zn?Xd(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Yd&&n.locale!=="ko"&&(Zn||R!=="onCompositionStart"?R==="onCompositionEnd"&&Zn&&(S=Qd()):(rn=f,Na="value"in rn?rn.value:rn.textContent,Zn=!0)),j=wo(c,R),0<j.length&&(R=new _u(R,e,null,n,f),p.push({event:R,listeners:j}),S?R.data=S:(S=Zd(n),S!==null&&(R.data=S)))),(S=wh?bh(e,n):Sh(e,n))&&(c=wo(c,"onBeforeInput"),0<c.length&&(f=new _u("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:c}),f.data=S))}cf(p,t)})}function cl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wo(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=rl(e,n),o!=null&&r.unshift(cl(e,o,l)),o=rl(e,t),o!=null&&r.push(cl(e,o,l))),e=e.return}return r}function Hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wu(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var s=n,a=s.alternate,c=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&c!==null&&(s=c,l?(a=rl(n,o),a!=null&&i.unshift(cl(n,a,s))):l||(a=rl(n,o),a!=null&&i.push(cl(n,a,s)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Dh=/\r\n?/g,Mh=/\u0000|\uFFFD/g;function Bu(e){return(typeof e=="string"?e:""+e).replace(Dh,`
38
+ `).replace(Mh,"")}function zl(e,t,n){if(t=Bu(t),Bu(e)!==t&&n)throw Error(O(425))}function bo(){}var Is=null,Os=null;function Ds(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 Ms=typeof setTimeout=="function"?setTimeout:void 0,Kh=typeof clearTimeout=="function"?clearTimeout:void 0,Hu=typeof Promise=="function"?Promise:void 0,zh=typeof queueMicrotask=="function"?queueMicrotask:typeof Hu<"u"?function(e){return Hu.resolve(null).then(e).catch($h)}:Ms;function $h(e){setTimeout(function(){throw e})}function Vi(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),il(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);il(t)}function un(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 Uu(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 Er=Math.random().toString(36).slice(2),St="__reactFiber$"+Er,dl="__reactProps$"+Er,Bt="__reactContainer$"+Er,Ks="__reactEvents$"+Er,Fh="__reactListeners$"+Er,Vh="__reactHandles$"+Er;function Rn(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Uu(e);e!==null;){if(n=e[St])return n;e=Uu(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){return e=e[St]||e[Bt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function ii(e){return e[dl]||null}var zs=[],tr=-1;function xn(e){return{current:e}}function ce(e){0>tr||(e.current=zs[tr],zs[tr]=null,tr--)}function se(e,t){tr++,zs[tr]=e.current,e.current=t}var yn={},ze=xn(yn),Ge=xn(!1),On=yn;function gr(e,t){var n=e.type.contextTypes;if(!n)return yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Qe(e){return e=e.childContextTypes,e!=null}function So(){ce(Ge),ce(ze)}function Gu(e,t,n){if(ze.current!==yn)throw Error(O(168));se(ze,t),se(Ge,n)}function ff(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(O(108,Em(e)||"Unknown",l));return ye({},n,r)}function ko(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,On=ze.current,se(ze,e),se(Ge,Ge.current),!0}function Qu(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=ff(e,t,On),r.__reactInternalMemoizedMergedChildContext=e,ce(Ge),ce(ze),se(ze,e)):ce(Ge),se(Ge,n)}var Ot=null,si=!1,Wi=!1;function pf(e){Ot===null?Ot=[e]:Ot.push(e)}function Wh(e){si=!0,pf(e)}function wn(){if(!Wi&&Ot!==null){Wi=!0;var e=0,t=oe;try{var n=Ot;for(oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ot=null,si=!1}catch(l){throw Ot!==null&&(Ot=Ot.slice(e+1)),Md(ja,wn),l}finally{oe=t,Wi=!1}}return null}var nr=[],rr=0,Co=null,jo=0,ot=[],it=0,Dn=null,Mt=1,Kt="";function En(e,t){nr[rr++]=jo,nr[rr++]=Co,Co=e,jo=t}function mf(e,t,n){ot[it++]=Mt,ot[it++]=Kt,ot[it++]=Dn,Dn=e;var r=Mt;e=Kt;var l=32-gt(r)-1;r&=~(1<<l),n+=1;var o=32-gt(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,Mt=1<<32-gt(t)+l|n<<l|r,Kt=o+e}else Mt=1<<o|n<<l|r,Kt=e}function Ia(e){e.return!==null&&(En(e,1),mf(e,1,0))}function Oa(e){for(;e===Co;)Co=nr[--rr],nr[rr]=null,jo=nr[--rr],nr[rr]=null;for(;e===Dn;)Dn=ot[--it],ot[it]=null,Kt=ot[--it],ot[it]=null,Mt=ot[--it],ot[it]=null}var qe=null,Je=null,de=!1,yt=null;function hf(e,t){var n=st(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 Yu(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,qe=e,Je=un(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qe=e,Je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Dn!==null?{id:Mt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=st(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qe=e,Je=null,!0):!1;default:return!1}}function $s(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fs(e){if(de){var t=Je;if(t){var n=t;if(!Yu(e,t)){if($s(e))throw Error(O(418));t=un(n.nextSibling);var r=qe;t&&Yu(e,t)?hf(r,n):(e.flags=e.flags&-4097|2,de=!1,qe=e)}}else{if($s(e))throw Error(O(418));e.flags=e.flags&-4097|2,de=!1,qe=e}}}function Xu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qe=e}function $l(e){if(e!==qe)return!1;if(!de)return Xu(e),de=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ds(e.type,e.memoizedProps)),t&&(t=Je)){if($s(e))throw yf(),Error(O(418));for(;t;)hf(e,t),t=un(t.nextSibling)}if(Xu(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){Je=un(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Je=null}}else Je=qe?un(e.stateNode.nextSibling):null;return!0}function yf(){for(var e=Je;e;)e=un(e.nextSibling)}function vr(){Je=qe=null,de=!1}function Da(e){yt===null?yt=[e]:yt.push(e)}var Bh=Qt.ReactCurrentBatchConfig;function Kr(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 l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=l.refs;i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Fl(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Zu(e){var t=e._init;return t(e._payload)}function gf(e){function t(h,m){if(e){var g=h.deletions;g===null?(h.deletions=[m],h.flags|=16):g.push(m)}}function n(h,m){if(!e)return null;for(;m!==null;)t(h,m),m=m.sibling;return null}function r(h,m){for(h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function l(h,m){return h=pn(h,m),h.index=0,h.sibling=null,h}function o(h,m,g){return h.index=g,e?(g=h.alternate,g!==null?(g=g.index,g<m?(h.flags|=2,m):g):(h.flags|=2,m)):(h.flags|=1048576,m)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,m,g,v){return m===null||m.tag!==6?(m=Xi(g,h.mode,v),m.return=h,m):(m=l(m,g),m.return=h,m)}function a(h,m,g,v){var C=g.type;return C===Xn?f(h,m,g.props.children,v,g.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qt&&Zu(C)===m.type)?(v=l(m,g.props),v.ref=Kr(h,m,g),v.return=h,v):(v=oo(g.type,g.key,g.props,null,h.mode,v),v.ref=Kr(h,m,g),v.return=h,v)}function c(h,m,g,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==g.containerInfo||m.stateNode.implementation!==g.implementation?(m=Zi(g,h.mode,v),m.return=h,m):(m=l(m,g.children||[]),m.return=h,m)}function f(h,m,g,v,C){return m===null||m.tag!==7?(m=An(g,h.mode,v,C),m.return=h,m):(m=l(m,g),m.return=h,m)}function p(h,m,g){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Xi(""+m,h.mode,g),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Pl:return g=oo(m.type,m.key,m.props,null,h.mode,g),g.ref=Kr(h,null,m),g.return=h,g;case Yn:return m=Zi(m,h.mode,g),m.return=h,m;case qt:var v=m._init;return p(h,v(m._payload),g)}if(Wr(m)||Ar(m))return m=An(m,h.mode,g,null),m.return=h,m;Fl(h,m)}return null}function d(h,m,g,v){var C=m!==null?m.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:s(h,m,""+g,v);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Pl:return g.key===C?a(h,m,g,v):null;case Yn:return g.key===C?c(h,m,g,v):null;case qt:return C=g._init,d(h,m,C(g._payload),v)}if(Wr(g)||Ar(g))return C!==null?null:f(h,m,g,v,null);Fl(h,g)}return null}function y(h,m,g,v,C){if(typeof v=="string"&&v!==""||typeof v=="number")return h=h.get(g)||null,s(m,h,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pl:return h=h.get(v.key===null?g:v.key)||null,a(m,h,v,C);case Yn:return h=h.get(v.key===null?g:v.key)||null,c(m,h,v,C);case qt:var j=v._init;return y(h,m,g,j(v._payload),C)}if(Wr(v)||Ar(v))return h=h.get(g)||null,f(m,h,v,C,null);Fl(m,v)}return null}function x(h,m,g,v){for(var C=null,j=null,S=m,R=m=0,F=null;S!==null&&R<g.length;R++){S.index>R?(F=S,S=null):F=S.sibling;var N=d(h,S,g[R],v);if(N===null){S===null&&(S=F);break}e&&S&&N.alternate===null&&t(h,S),m=o(N,m,R),j===null?C=N:j.sibling=N,j=N,S=F}if(R===g.length)return n(h,S),de&&En(h,R),C;if(S===null){for(;R<g.length;R++)S=p(h,g[R],v),S!==null&&(m=o(S,m,R),j===null?C=S:j.sibling=S,j=S);return de&&En(h,R),C}for(S=r(h,S);R<g.length;R++)F=y(S,h,R,g[R],v),F!==null&&(e&&F.alternate!==null&&S.delete(F.key===null?R:F.key),m=o(F,m,R),j===null?C=F:j.sibling=F,j=F);return e&&S.forEach(function(V){return t(h,V)}),de&&En(h,R),C}function w(h,m,g,v){var C=Ar(g);if(typeof C!="function")throw Error(O(150));if(g=C.call(g),g==null)throw Error(O(151));for(var j=C=null,S=m,R=m=0,F=null,N=g.next();S!==null&&!N.done;R++,N=g.next()){S.index>R?(F=S,S=null):F=S.sibling;var V=d(h,S,N.value,v);if(V===null){S===null&&(S=F);break}e&&S&&V.alternate===null&&t(h,S),m=o(V,m,R),j===null?C=V:j.sibling=V,j=V,S=F}if(N.done)return n(h,S),de&&En(h,R),C;if(S===null){for(;!N.done;R++,N=g.next())N=p(h,N.value,v),N!==null&&(m=o(N,m,R),j===null?C=N:j.sibling=N,j=N);return de&&En(h,R),C}for(S=r(h,S);!N.done;R++,N=g.next())N=y(S,h,R,N.value,v),N!==null&&(e&&N.alternate!==null&&S.delete(N.key===null?R:N.key),m=o(N,m,R),j===null?C=N:j.sibling=N,j=N);return e&&S.forEach(function(W){return t(h,W)}),de&&En(h,R),C}function k(h,m,g,v){if(typeof g=="object"&&g!==null&&g.type===Xn&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Pl:e:{for(var C=g.key,j=m;j!==null;){if(j.key===C){if(C=g.type,C===Xn){if(j.tag===7){n(h,j.sibling),m=l(j,g.props.children),m.return=h,h=m;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qt&&Zu(C)===j.type){n(h,j.sibling),m=l(j,g.props),m.ref=Kr(h,j,g),m.return=h,h=m;break e}n(h,j);break}else t(h,j);j=j.sibling}g.type===Xn?(m=An(g.props.children,h.mode,v,g.key),m.return=h,h=m):(v=oo(g.type,g.key,g.props,null,h.mode,v),v.ref=Kr(h,m,g),v.return=h,h=v)}return i(h);case Yn:e:{for(j=g.key;m!==null;){if(m.key===j)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){n(h,m.sibling),m=l(m,g.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Zi(g,h.mode,v),m.return=h,h=m}return i(h);case qt:return j=g._init,k(h,m,j(g._payload),v)}if(Wr(g))return x(h,m,g,v);if(Ar(g))return w(h,m,g,v);Fl(h,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(n(h,m.sibling),m=l(m,g),m.return=h,h=m):(n(h,m),m=Xi(g,h.mode,v),m.return=h,h=m),i(h)):n(h,m)}return k}var xr=gf(!0),vf=gf(!1),Eo=xn(null),To=null,lr=null,Ma=null;function Ka(){Ma=lr=To=null}function za(e){var t=Eo.current;ce(Eo),e._currentValue=t}function Vs(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 pr(e,t){To=e,Ma=lr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ue=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(Ma!==e)if(e={context:e,memoizedValue:t,next:null},lr===null){if(To===null)throw Error(O(308));lr=e,To.dependencies={lanes:0,firstContext:e}}else lr=lr.next=e;return t}var Nn=null;function $a(e){Nn===null?Nn=[e]:Nn.push(e)}function xf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,$a(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ht(e,r)}function Ht(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 en=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wf(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ht(e,n)}return l=r.interleaved,l===null?(t.next=t,$a(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ht(e,n)}function ql(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,Ea(e,n)}}function Ju(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,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 Ro(e,t,n,r){var l=e.updateQueue;en=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var a=s,c=a.next;a.next=null,i===null?o=c:i.next=c,i=a;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==i&&(s===null?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=a))}if(o!==null){var p=l.baseState;i=0,f=c=a=null,s=o;do{var d=s.lane,y=s.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:y,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var x=e,w=s;switch(d=t,y=n,w.tag){case 1:if(x=w.payload,typeof x=="function"){p=x.call(y,p,d);break e}p=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=w.payload,d=typeof x=="function"?x.call(y,p,d):x,d==null)break e;p=ye({},p,d);break e;case 2:en=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=l.effects,d===null?l.effects=[s]:d.push(s))}else y={eventTime:y,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(c=f=y,a=p):f=f.next=y,i|=d;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;d=s,s=d.next,d.next=null,l.lastBaseUpdate=d,l.shared.pending=null}}while(!0);if(f===null&&(a=p),l.baseState=a,l.firstBaseUpdate=c,l.lastBaseUpdate=f,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Kn|=i,e.lanes=i,e.memoizedState=p}}function qu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(O(191,l));l.call(r)}}}var jl={},Ct=xn(jl),fl=xn(jl),pl=xn(jl);function Pn(e){if(e===jl)throw Error(O(174));return e}function Va(e,t){switch(se(pl,t),se(fl,e),se(Ct,jl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ss(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ss(t,e)}ce(Ct),se(Ct,t)}function wr(){ce(Ct),ce(fl),ce(pl)}function bf(e){Pn(pl.current);var t=Pn(Ct.current),n=Ss(t,e.type);t!==n&&(se(fl,e),se(Ct,n))}function Wa(e){fl.current===e&&(ce(Ct),ce(fl))}var me=xn(0);function No(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 Bi=[];function Ba(){for(var e=0;e<Bi.length;e++)Bi[e]._workInProgressVersionPrimary=null;Bi.length=0}var eo=Qt.ReactCurrentDispatcher,Hi=Qt.ReactCurrentBatchConfig,Mn=0,he=null,Ne=null,_e=null,Po=!1,Zr=!1,ml=0,Hh=0;function De(){throw Error(O(321))}function Ha(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function Ua(e,t,n,r,l,o){if(Mn=o,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,eo.current=e===null||e.memoizedState===null?Yh:Xh,e=n(r,l),Zr){o=0;do{if(Zr=!1,ml=0,25<=o)throw Error(O(301));o+=1,_e=Ne=null,t.updateQueue=null,eo.current=Zh,e=n(r,l)}while(Zr)}if(eo.current=_o,t=Ne!==null&&Ne.next!==null,Mn=0,_e=Ne=he=null,Po=!1,t)throw Error(O(300));return e}function Ga(){var e=ml!==0;return ml=0,e}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?he.memoizedState=_e=e:_e=_e.next=e,_e}function ct(){if(Ne===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=_e===null?he.memoizedState:_e.next;if(t!==null)_e=t,Ne=e;else{if(e===null)throw Error(O(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},_e===null?he.memoizedState=_e=e:_e=_e.next=e}return _e}function hl(e,t){return typeof t=="function"?t(e):t}function Ui(e){var t=ct(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Ne,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var i=l.next;l.next=o.next,o.next=i}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var s=i=null,a=null,c=o;do{var f=c.lane;if((Mn&f)===f)a!==null&&(a=a.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:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(s=a=p,i=r):a=a.next=p,he.lanes|=f,Kn|=f}c=c.next}while(c!==null&&c!==o);a===null?i=r:a.next=s,xt(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,he.lanes|=o,Kn|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Gi(e){var t=ct(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do o=e(o,i.action),i=i.next;while(i!==l);xt(o,t.memoizedState)||(Ue=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Sf(){}function kf(e,t){var n=he,r=ct(),l=t(),o=!xt(r.memoizedState,l);if(o&&(r.memoizedState=l,Ue=!0),r=r.queue,Qa(Ef.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||_e!==null&&_e.memoizedState.tag&1){if(n.flags|=2048,yl(9,jf.bind(null,n,r,l,t),void 0,null),Le===null)throw Error(O(349));Mn&30||Cf(n,t,l)}return l}function Cf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function jf(e,t,n,r){t.value=n,t.getSnapshot=r,Tf(t)&&Rf(e)}function Ef(e,t,n){return n(function(){Tf(t)&&Rf(e)})}function Tf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function Rf(e){var t=Ht(e,1);t!==null&&vt(t,e,1,-1)}function ec(e){var t=bt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hl,lastRenderedState:e},t.queue=e,e=e.dispatch=Qh.bind(null,he,e),[t.memoizedState,e]}function yl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null,stores:null},he.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 Nf(){return ct().memoizedState}function to(e,t,n,r){var l=bt();he.flags|=e,l.memoizedState=yl(1|t,n,void 0,r===void 0?null:r)}function ai(e,t,n,r){var l=ct();r=r===void 0?null:r;var o=void 0;if(Ne!==null){var i=Ne.memoizedState;if(o=i.destroy,r!==null&&Ha(r,i.deps)){l.memoizedState=yl(t,n,o,r);return}}he.flags|=e,l.memoizedState=yl(1|t,n,o,r)}function tc(e,t){return to(8390656,8,e,t)}function Qa(e,t){return ai(2048,8,e,t)}function Pf(e,t){return ai(4,2,e,t)}function _f(e,t){return ai(4,4,e,t)}function Lf(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 Af(e,t,n){return n=n!=null?n.concat([e]):null,ai(4,4,Lf.bind(null,t,e),n)}function Ya(){}function If(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ha(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Of(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ha(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Df(e,t,n){return Mn&21?(xt(n,t)||(n=$d(),he.lanes|=n,Kn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n)}function Uh(e,t){var n=oe;oe=n!==0&&4>n?n:4,e(!0);var r=Hi.transition;Hi.transition={};try{e(!1),t()}finally{oe=n,Hi.transition=r}}function Mf(){return ct().memoizedState}function Gh(e,t,n){var r=fn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kf(e))zf(t,n);else if(n=xf(e,t,n,r),n!==null){var l=Fe();vt(n,e,r,l),$f(n,t,r)}}function Qh(e,t,n){var r=fn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kf(e))zf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,xt(s,i)){var a=t.interleaved;a===null?(l.next=l,$a(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=xf(e,t,l,r),n!==null&&(l=Fe(),vt(n,e,r,l),$f(n,t,r))}}function Kf(e){var t=e.alternate;return e===he||t!==null&&t===he}function zf(e,t){Zr=Po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $f(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ea(e,n)}}var _o={readContext:ut,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Yh={readContext:ut,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:tc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,to(4194308,4,Lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return to(4194308,4,e,t)},useInsertionEffect:function(e,t){return to(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();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=Gh.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:ec,useDebugValue:Ya,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=ec(!1),t=e[0];return e=Uh.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,l=bt();if(de){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Le===null)throw Error(O(349));Mn&30||Cf(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,tc(Ef.bind(null,r,o,e),[e]),r.flags|=2048,yl(9,jf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bt(),t=Le.identifierPrefix;if(de){var n=Kt,r=Mt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ml++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Hh++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xh={readContext:ut,useCallback:If,useContext:ut,useEffect:Qa,useImperativeHandle:Af,useInsertionEffect:Pf,useLayoutEffect:_f,useMemo:Of,useReducer:Ui,useRef:Nf,useState:function(){return Ui(hl)},useDebugValue:Ya,useDeferredValue:function(e){var t=ct();return Df(t,Ne.memoizedState,e)},useTransition:function(){var e=Ui(hl)[0],t=ct().memoizedState;return[e,t]},useMutableSource:Sf,useSyncExternalStore:kf,useId:Mf,unstable_isNewReconciler:!1},Zh={readContext:ut,useCallback:If,useContext:ut,useEffect:Qa,useImperativeHandle:Af,useInsertionEffect:Pf,useLayoutEffect:_f,useMemo:Of,useReducer:Gi,useRef:Nf,useState:function(){return Gi(hl)},useDebugValue:Ya,useDeferredValue:function(e){var t=ct();return Ne===null?t.memoizedState=e:Df(t,Ne.memoizedState,e)},useTransition:function(){var e=Gi(hl)[0],t=ct().memoizedState;return[e,t]},useMutableSource:Sf,useSyncExternalStore:kf,useId:Mf,unstable_isNewReconciler:!1};function mt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ui={isMounted:function(e){return(e=e._reactInternals)?Vn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),l=fn(e),o=$t(r,l);o.payload=t,n!=null&&(o.callback=n),t=cn(e,o,l),t!==null&&(vt(t,e,l,r),ql(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),l=fn(e),o=$t(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=cn(e,o,l),t!==null&&(vt(t,e,l,r),ql(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=fn(e),l=$t(n,r);l.tag=2,t!=null&&(l.callback=t),t=cn(e,l,r),t!==null&&(vt(t,e,r,n),ql(t,e,r))}};function nc(e,t,n,r,l,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!al(n,r)||!al(l,o):!0}function Ff(e,t,n){var r=!1,l=yn,o=t.contextType;return typeof o=="object"&&o!==null?o=ut(o):(l=Qe(t)?On:ze.current,r=t.contextTypes,o=(r=r!=null)?gr(e,l):yn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ui,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function rc(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&&ui.enqueueReplaceState(t,t.state,null)}function Bs(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Fa(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=ut(o):(o=Qe(t)?On:ze.current,l.context=gr(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ws(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&ui.enqueueReplaceState(l,l.state,null),Ro(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function br(e,t){try{var n="",r=t;do n+=jm(r),r=r.return;while(r);var l=n}catch(o){l=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:l,digest:null}}function Qi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Hs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jh=typeof WeakMap=="function"?WeakMap:Map;function Vf(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ao||(Ao=!0,ta=r),Hs(e,t)},n}function Wf(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Hs(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Hs(e,t),typeof r!="function"&&(dn===null?dn=new Set([this]):dn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function lc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jh;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=fy.bind(null,e,t,n),t.then(e,e))}function oc(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 ic(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=$t(-1,1),t.tag=2,cn(n,t,1))),n.lanes|=1),e)}var qh=Qt.ReactCurrentOwner,Ue=!1;function $e(e,t,n,r){t.child=e===null?vf(t,null,n,r):xr(t,e.child,n,r)}function sc(e,t,n,r,l){n=n.render;var o=t.ref;return pr(t,l),r=Ua(e,t,n,r,o,l),n=Ga(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(de&&n&&Ia(t),t.flags|=1,$e(e,t,r,l),t.child)}function ac(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!ru(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Bf(e,t,o,r,l)):(e=oo(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:al,n(i,r)&&e.ref===t.ref)return Ut(e,t,l)}return t.flags|=1,e=pn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Bf(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(al(o,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,Ut(e,t,l)}return Us(e,t,n,r,l)}function Hf(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(ir,Xe),Xe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(ir,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,se(ir,Xe),Xe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,se(ir,Xe),Xe|=r;return $e(e,t,l,n),t.child}function Uf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Us(e,t,n,r,l){var o=Qe(n)?On:ze.current;return o=gr(t,o),pr(t,l),n=Ua(e,t,n,r,o,l),r=Ga(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Ut(e,t,l)):(de&&r&&Ia(t),t.flags|=1,$e(e,t,n,l),t.child)}function uc(e,t,n,r,l){if(Qe(n)){var o=!0;ko(t)}else o=!1;if(pr(t,l),t.stateNode===null)no(e,t),Ff(t,n,r),Bs(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var a=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=ut(c):(c=Qe(n)?On:ze.current,c=gr(t,c));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function";p||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||a!==c)&&rc(t,i,r,c),en=!1;var d=t.memoizedState;i.state=d,Ro(t,r,i,l),a=t.memoizedState,s!==r||d!==a||Ge.current||en?(typeof f=="function"&&(Ws(t,n,f,r),a=t.memoizedState),(s=en||nc(t,n,s,r,d,a,c))?(p||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),i.props=r,i.state=a,i.context=c,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,wf(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:mt(t.type,s),i.props=c,p=t.pendingProps,d=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=ut(a):(a=Qe(n)?On:ze.current,a=gr(t,a));var y=n.getDerivedStateFromProps;(f=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==p||d!==a)&&rc(t,i,r,a),en=!1,d=t.memoizedState,i.state=d,Ro(t,r,i,l);var x=t.memoizedState;s!==p||d!==x||Ge.current||en?(typeof y=="function"&&(Ws(t,n,y,r),x=t.memoizedState),(c=en||nc(t,n,c,r,d,x,a)||!1)?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=a,r=c):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Gs(e,t,n,r,o,l)}function Gs(e,t,n,r,l,o){Uf(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Qu(t,n,!1),Ut(e,t,o);r=t.stateNode,qh.current=t;var s=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=xr(t,e.child,null,o),t.child=xr(t,null,s,o)):$e(e,t,s,o),t.memoizedState=r.state,l&&Qu(t,n,!0),t.child}function Gf(e){var t=e.stateNode;t.pendingContext?Gu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Gu(e,t.context,!1),Va(e,t.containerInfo)}function cc(e,t,n,r,l){return vr(),Da(l),t.flags|=256,$e(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0};function Ys(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qf(e,t,n){var r=t.pendingProps,l=me.current,o=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(l&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),se(me,l&1),e===null)return Fs(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):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=fi(i,r,0,null),e=An(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ys(n),t.memoizedState=Qs,e):Xa(t,i));if(l=e.memoizedState,l!==null&&(s=l.dehydrated,s!==null))return ey(e,t,i,r,s,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,s=l.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=pn(l,a),r.subtreeFlags=l.subtreeFlags&14680064),s!==null?o=pn(s,o):(o=An(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Ys(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Qs,r}return o=e.child,e=o.sibling,r=pn(o,{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 Xa(e,t){return t=fi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vl(e,t,n,r){return r!==null&&Da(r),xr(t,e.child,null,n),e=Xa(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ey(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Qi(Error(O(422))),Vl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=fi({mode:"visible",children:r.children},l,0,null),o=An(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&xr(t,e.child,null,i),t.child.memoizedState=Ys(i),t.memoizedState=Qs,o);if(!(t.mode&1))return Vl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(O(419)),r=Qi(o,r,void 0),Vl(e,t,i,r)}if(s=(i&e.childLanes)!==0,Ue||s){if(r=Le,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ht(e,l),vt(r,e,l,-1))}return nu(),r=Qi(Error(O(421))),Vl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=py.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,Je=un(l.nextSibling),qe=t,de=!0,yt=null,e!==null&&(ot[it++]=Mt,ot[it++]=Kt,ot[it++]=Dn,Mt=e.id,Kt=e.overflow,Dn=t),t=Xa(t,r.children),t.flags|=4096,t)}function dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Vs(e.return,t,n)}function Yi(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Yf(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if($e(e,t,r.children,n),r=me.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(se(me,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&No(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Yi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&No(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Yi(t,!0,n,null,o);break;case"together":Yi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function no(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kn|=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=pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ty(e,t,n){switch(t.tag){case 3:Gf(t),vr();break;case 5:bf(t);break;case 1:Qe(t.type)&&ko(t);break;case 4:Va(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;se(Eo,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?Qf(e,t,n):(se(me,me.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);se(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Yf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),se(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,Hf(e,t,n)}return Ut(e,t,n)}var Xf,Xs,Zf,Jf;Xf=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}};Xs=function(){};Zf=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Pn(Ct.current);var o=null;switch(n){case"input":l=vs(e,l),r=vs(e,r),o=[];break;case"select":l=ye({},l,{value:void 0}),r=ye({},r,{value:void 0}),o=[];break;case"textarea":l=bs(e,l),r=bs(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bo)}ks(n,r);var i;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var s=l[c];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(tl.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(s=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&a!==s&&(a!=null||s!=null))if(c==="style")if(s){for(i in s)!s.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&s[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(tl.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&ue("scroll",e),o||s===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Jf=function(e,t,n,r){n!==r&&(t.flags|=4)};function zr(e,t){if(!de)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 Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ny(e,t,n){var r=t.pendingProps;switch(Oa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Qe(t.type)&&So(),Me(t),null;case 3:return r=t.stateNode,wr(),ce(Ge),ce(ze),Ba(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($l(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yt!==null&&(la(yt),yt=null))),Xs(e,t),Me(t),null;case 5:Wa(t);var l=Pn(pl.current);if(n=t.type,e!==null&&t.stateNode!=null)Zf(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Me(t),null}if(e=Pn(Ct.current),$l(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[St]=t,r[dl]=o,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(l=0;l<Hr.length;l++)ue(Hr[l],r);break;case"source":ue("error",r);break;case"img":case"image":case"link":ue("error",r),ue("load",r);break;case"details":ue("toggle",r);break;case"input":wu(r,o),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ue("invalid",r);break;case"textarea":Su(r,o),ue("invalid",r)}ks(n,o),l=null;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];i==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&zl(r.textContent,s,e),l=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&zl(r.textContent,s,e),l=["children",""+s]):tl.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&ue("scroll",r)}switch(n){case"input":_l(r),bu(r,o,!0);break;case"textarea":_l(r),ku(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=bo)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=jd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[St]=t,e[dl]=r,Xf(e,t,!1,!1),t.stateNode=e;e:{switch(i=Cs(n,r),n){case"dialog":ue("cancel",e),ue("close",e),l=r;break;case"iframe":case"object":case"embed":ue("load",e),l=r;break;case"video":case"audio":for(l=0;l<Hr.length;l++)ue(Hr[l],e);l=r;break;case"source":ue("error",e),l=r;break;case"img":case"image":case"link":ue("error",e),ue("load",e),l=r;break;case"details":ue("toggle",e),l=r;break;case"input":wu(e,r),l=vs(e,r),ue("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ye({},r,{value:void 0}),ue("invalid",e);break;case"textarea":Su(e,r),l=bs(e,r),ue("invalid",e);break;default:l=r}ks(n,l),s=l;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?Rd(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Ed(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&nl(e,a):typeof a=="number"&&nl(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(tl.hasOwnProperty(o)?a!=null&&o==="onScroll"&&ue("scroll",e):a!=null&&wa(e,o,a,i))}switch(n){case"input":_l(e),bu(e,r,!1);break;case"textarea":_l(e),ku(e);break;case"option":r.value!=null&&e.setAttribute("value",""+hn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ur(e,!!r.multiple,o,!1):r.defaultValue!=null&&ur(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=bo)}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 Me(t),null;case 6:if(e&&t.stateNode!=null)Jf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Pn(pl.current),Pn(Ct.current),$l(t)){if(r=t.stateNode,n=t.memoizedProps,r[St]=t,(o=r.nodeValue!==n)&&(e=qe,e!==null))switch(e.tag){case 3:zl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&zl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[St]=t,t.stateNode=r}return Me(t),null;case 13:if(ce(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(de&&Je!==null&&t.mode&1&&!(t.flags&128))yf(),vr(),t.flags|=98560,o=!1;else if(o=$l(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(O(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(O(317));o[St]=t}else vr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),o=!1}else yt!==null&&(la(yt),yt=null),o=!0;if(!o)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||me.current&1?Pe===0&&(Pe=3):nu())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return wr(),Xs(e,t),e===null&&ul(t.stateNode.containerInfo),Me(t),null;case 10:return za(t.type._context),Me(t),null;case 17:return Qe(t.type)&&So(),Me(t),null;case 19:if(ce(me),o=t.memoizedState,o===null)return Me(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)zr(o,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=No(e),i!==null){for(t.flags|=128,zr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return se(me,me.current&1|2),t.child}e=e.sibling}o.tail!==null&&be()>Sr&&(t.flags|=128,r=!0,zr(o,!1),t.lanes=4194304)}else{if(!r)if(e=No(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),zr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!de)return Me(t),null}else 2*be()-o.renderingStartTime>Sr&&n!==1073741824&&(t.flags|=128,r=!0,zr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=be(),t.sibling=null,n=me.current,se(me,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return tu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xe&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function ry(e,t){switch(Oa(t),t.tag){case 1:return Qe(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wr(),ce(Ge),ce(ze),Ba(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wa(t),null;case 13:if(ce(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(me),null;case 4:return wr(),null;case 10:return za(t.type._context),null;case 22:case 23:return tu(),null;case 24:return null;default:return null}}var Wl=!1,Ke=!1,ly=typeof WeakSet=="function"?WeakSet:Set,B=null;function or(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function Zs(e,t,n){try{n()}catch(r){xe(e,t,r)}}var fc=!1;function oy(e,t){if(Is=vo,e=nf(),Aa(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 l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,s=-1,a=-1,c=0,f=0,p=e,d=null;t:for(;;){for(var y;p!==n||l!==0&&p.nodeType!==3||(s=i+l),p!==o||r!==0&&p.nodeType!==3||(a=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(y=p.firstChild)!==null;)d=p,p=y;for(;;){if(p===e)break t;if(d===n&&++c===l&&(s=i),d===o&&++f===r&&(a=i),(y=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=y}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Os={focusedElem:e,selectionRange:n},vo=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var w=x.memoizedProps,k=x.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:mt(t.type,w),k);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(v){xe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return x=fc,fc=!1,x}function Jr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Zs(t,n,o)}l=l.next}while(l!==r)}}function ci(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 Js(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 qf(e){var t=e.alternate;t!==null&&(e.alternate=null,qf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[dl],delete t[Ks],delete t[Fh],delete t[Vh])),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 ep(e){return e.tag===5||e.tag===3||e.tag===4}function pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ep(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 qs(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=bo));else if(r!==4&&(e=e.child,e!==null))for(qs(e,t,n),e=e.sibling;e!==null;)qs(e,t,n),e=e.sibling}function ea(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(ea(e,t,n),e=e.sibling;e!==null;)ea(e,t,n),e=e.sibling}var Ae=null,ht=!1;function Zt(e,t,n){for(n=n.child;n!==null;)tp(e,t,n),n=n.sibling}function tp(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(ni,n)}catch{}switch(n.tag){case 5:Ke||or(n,t);case 6:var r=Ae,l=ht;Ae=null,Zt(e,t,n),Ae=r,ht=l,Ae!==null&&(ht?(e=Ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ae.removeChild(n.stateNode));break;case 18:Ae!==null&&(ht?(e=Ae,n=n.stateNode,e.nodeType===8?Vi(e.parentNode,n):e.nodeType===1&&Vi(e,n),il(e)):Vi(Ae,n.stateNode));break;case 4:r=Ae,l=ht,Ae=n.stateNode.containerInfo,ht=!0,Zt(e,t,n),Ae=r,ht=l;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Zs(n,t,i),l=l.next}while(l!==r)}Zt(e,t,n);break;case 1:if(!Ke&&(or(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xe(n,t,s)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Zt(e,t,n),Ke=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function mc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ly),t.forEach(function(r){var l=my.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:Ae=s.stateNode,ht=!1;break e;case 3:Ae=s.stateNode.containerInfo,ht=!0;break e;case 4:Ae=s.stateNode.containerInfo,ht=!0;break e}s=s.return}if(Ae===null)throw Error(O(160));tp(o,i,l),Ae=null,ht=!1;var a=l.alternate;a!==null&&(a.return=null),l.return=null}catch(c){xe(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)np(t,e),t=t.sibling}function np(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ft(t,e),wt(e),r&4){try{Jr(3,e,e.return),ci(3,e)}catch(w){xe(e,e.return,w)}try{Jr(5,e,e.return)}catch(w){xe(e,e.return,w)}}break;case 1:ft(t,e),wt(e),r&512&&n!==null&&or(n,n.return);break;case 5:if(ft(t,e),wt(e),r&512&&n!==null&&or(n,n.return),e.flags&32){var l=e.stateNode;try{nl(l,"")}catch(w){xe(e,e.return,w)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&kd(l,o),Cs(s,i);var c=Cs(s,o);for(i=0;i<a.length;i+=2){var f=a[i],p=a[i+1];f==="style"?Rd(l,p):f==="dangerouslySetInnerHTML"?Ed(l,p):f==="children"?nl(l,p):wa(l,f,p,c)}switch(s){case"input":xs(l,o);break;case"textarea":Cd(l,o);break;case"select":var d=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?ur(l,!!o.multiple,y,!1):d!==!!o.multiple&&(o.defaultValue!=null?ur(l,!!o.multiple,o.defaultValue,!0):ur(l,!!o.multiple,o.multiple?[]:"",!1))}l[dl]=o}catch(w){xe(e,e.return,w)}}break;case 6:if(ft(t,e),wt(e),r&4){if(e.stateNode===null)throw Error(O(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(w){xe(e,e.return,w)}}break;case 3:if(ft(t,e),wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{il(t.containerInfo)}catch(w){xe(e,e.return,w)}break;case 4:ft(t,e),wt(e);break;case 13:ft(t,e),wt(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(qa=be())),r&4&&mc(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(c=Ke)||f,ft(t,e),Ke=c):ft(t,e),wt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(B=e,f=e.child;f!==null;){for(p=B=f;B!==null;){switch(d=B,y=d.child,d.tag){case 0:case 11:case 14:case 15:Jr(4,d,d.return);break;case 1:or(d,d.return);var x=d.stateNode;if(typeof x.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(w){xe(r,n,w)}}break;case 5:or(d,d.return);break;case 22:if(d.memoizedState!==null){yc(p);continue}}y!==null?(y.return=d,B=y):yc(p)}f=f.sibling}e:for(f=null,p=e;;){if(p.tag===5){if(f===null){f=p;try{l=p.stateNode,c?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=p.stateNode,a=p.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=Td("display",i))}catch(w){xe(e,e.return,w)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(w){xe(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;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:ft(t,e),wt(e),r&4&&mc(e);break;case 21:break;default:ft(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ep(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(nl(l,""),r.flags&=-33);var o=pc(e);ea(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,s=pc(e);qs(e,s,i);break;default:throw Error(O(161))}}catch(a){xe(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function iy(e,t,n){B=e,rp(e)}function rp(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var l=B,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Wl;if(!i){var s=l.alternate,a=s!==null&&s.memoizedState!==null||Ke;s=Wl;var c=Ke;if(Wl=i,(Ke=a)&&!c)for(B=l;B!==null;)i=B,a=i.child,i.tag===22&&i.memoizedState!==null?gc(l):a!==null?(a.return=i,B=a):gc(l);for(;o!==null;)B=o,rp(o),o=o.sibling;B=l,Wl=s,Ke=c}hc(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,B=o):hc(e)}}function hc(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||ci(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:mt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&qu(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qu(t,i,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.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 f=c.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&il(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ke||t.flags&512&&Js(t)}catch(d){xe(t,t.return,d)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function yc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function gc(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ci(4,t)}catch(a){xe(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(a){xe(t,l,a)}}var o=t.return;try{Js(t)}catch(a){xe(t,o,a)}break;case 5:var i=t.return;try{Js(t)}catch(a){xe(t,i,a)}}}catch(a){xe(t,t.return,a)}if(t===e){B=null;break}var s=t.sibling;if(s!==null){s.return=t.return,B=s;break}B=t.return}}var sy=Math.ceil,Lo=Qt.ReactCurrentDispatcher,Za=Qt.ReactCurrentOwner,at=Qt.ReactCurrentBatchConfig,le=0,Le=null,je=null,Ie=0,Xe=0,ir=xn(0),Pe=0,gl=null,Kn=0,di=0,Ja=0,qr=null,He=null,qa=0,Sr=1/0,At=null,Ao=!1,ta=null,dn=null,Bl=!1,ln=null,Io=0,el=0,na=null,ro=-1,lo=0;function Fe(){return le&6?be():ro!==-1?ro:ro=be()}function fn(e){return e.mode&1?le&2&&Ie!==0?Ie&-Ie:Bh.transition!==null?(lo===0&&(lo=$d()),lo):(e=oe,e!==0||(e=window.event,e=e===void 0?16:Gd(e.type)),e):1}function vt(e,t,n,r){if(50<el)throw el=0,na=null,Error(O(185));Sl(e,n,r),(!(le&2)||e!==Le)&&(e===Le&&(!(le&2)&&(di|=n),Pe===4&&nn(e,Ie)),Ye(e,r),n===1&&le===0&&!(t.mode&1)&&(Sr=be()+500,si&&wn()))}function Ye(e,t){var n=e.callbackNode;Bm(e,t);var r=go(e,e===Le?Ie:0);if(r===0)n!==null&&Eu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Eu(n),t===1)e.tag===0?Wh(vc.bind(null,e)):pf(vc.bind(null,e)),zh(function(){!(le&6)&&wn()}),n=null;else{switch(Fd(r)){case 1:n=ja;break;case 4:n=Kd;break;case 16:n=yo;break;case 536870912:n=zd;break;default:n=yo}n=dp(n,lp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lp(e,t){if(ro=-1,lo=0,le&6)throw Error(O(327));var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var r=go(e,e===Le?Ie:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Oo(e,r);else{t=r;var l=le;le|=2;var o=ip();(Le!==e||Ie!==t)&&(At=null,Sr=be()+500,Ln(e,t));do try{cy();break}catch(s){op(e,s)}while(!0);Ka(),Lo.current=o,le=l,je!==null?t=0:(Le=null,Ie=0,t=Pe)}if(t!==0){if(t===2&&(l=Ns(e),l!==0&&(r=l,t=ra(e,l))),t===1)throw n=gl,Ln(e,0),nn(e,r),Ye(e,be()),n;if(t===6)nn(e,r);else{if(l=e.current.alternate,!(r&30)&&!ay(l)&&(t=Oo(e,r),t===2&&(o=Ns(e),o!==0&&(r=o,t=ra(e,o))),t===1))throw n=gl,Ln(e,0),nn(e,r),Ye(e,be()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Tn(e,He,At);break;case 3:if(nn(e,r),(r&130023424)===r&&(t=qa+500-be(),10<t)){if(go(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Ms(Tn.bind(null,e,He,At),t);break}Tn(e,He,At);break;case 4:if(nn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-gt(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sy(r/1960))-r,10<r){e.timeoutHandle=Ms(Tn.bind(null,e,He,At),r);break}Tn(e,He,At);break;case 5:Tn(e,He,At);break;default:throw Error(O(329))}}}return Ye(e,be()),e.callbackNode===n?lp.bind(null,e):null}function ra(e,t){var n=qr;return e.current.memoizedState.isDehydrated&&(Ln(e,t).flags|=256),e=Oo(e,t),e!==2&&(t=He,He=n,t!==null&&la(t)),e}function la(e){He===null?He=e:He.push.apply(He,e)}function ay(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 l=n[r],o=l.getSnapshot;l=l.value;try{if(!xt(o(),l))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 nn(e,t){for(t&=~Ja,t&=~di,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-gt(t),r=1<<n;e[n]=-1,t&=~r}}function vc(e){if(le&6)throw Error(O(327));mr();var t=go(e,0);if(!(t&1))return Ye(e,be()),null;var n=Oo(e,t);if(e.tag!==0&&n===2){var r=Ns(e);r!==0&&(t=r,n=ra(e,r))}if(n===1)throw n=gl,Ln(e,0),nn(e,t),Ye(e,be()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,He,At),Ye(e,be()),null}function eu(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Sr=be()+500,si&&wn())}}function zn(e){ln!==null&&ln.tag===0&&!(le&6)&&mr();var t=le;le|=1;var n=at.transition,r=oe;try{if(at.transition=null,oe=1,e)return e()}finally{oe=r,at.transition=n,le=t,!(le&6)&&wn()}}function tu(){Xe=ir.current,ce(ir)}function Ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Kh(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(Oa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&So();break;case 3:wr(),ce(Ge),ce(ze),Ba();break;case 5:Wa(r);break;case 4:wr();break;case 13:ce(me);break;case 19:ce(me);break;case 10:za(r.type._context);break;case 22:case 23:tu()}n=n.return}if(Le=e,je=e=pn(e.current,null),Ie=Xe=t,Pe=0,gl=null,Ja=di=Kn=0,He=qr=null,Nn!==null){for(t=0;t<Nn.length;t++)if(n=Nn[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=l,r.next=i}n.pending=r}Nn=null}return e}function op(e,t){do{var n=je;try{if(Ka(),eo.current=_o,Po){for(var r=he.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}Po=!1}if(Mn=0,_e=Ne=he=null,Zr=!1,ml=0,Za.current=null,n===null||n.return===null){Pe=1,gl=t,je=null;break}e:{var o=e,i=n.return,s=n,a=t;if(t=Ie,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,f=s,p=f.tag;if(!(f.mode&1)&&(p===0||p===11||p===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var y=oc(i);if(y!==null){y.flags&=-257,ic(y,i,s,o,t),y.mode&1&&lc(o,c,t),t=y,a=c;var x=t.updateQueue;if(x===null){var w=new Set;w.add(a),t.updateQueue=w}else x.add(a);break e}else{if(!(t&1)){lc(o,c,t),nu();break e}a=Error(O(426))}}else if(de&&s.mode&1){var k=oc(i);if(k!==null){!(k.flags&65536)&&(k.flags|=256),ic(k,i,s,o,t),Da(br(a,s));break e}}o=a=br(a,s),Pe!==4&&(Pe=2),qr===null?qr=[o]:qr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var h=Vf(o,a,t);Ju(o,h);break e;case 1:s=a;var m=o.type,g=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(dn===null||!dn.has(g)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=Wf(o,s,t);Ju(o,v);break e}}o=o.return}while(o!==null)}ap(n)}catch(C){t=C,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function ip(){var e=Lo.current;return Lo.current=_o,e===null?_o:e}function nu(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Le===null||!(Kn&268435455)&&!(di&268435455)||nn(Le,Ie)}function Oo(e,t){var n=le;le|=2;var r=ip();(Le!==e||Ie!==t)&&(At=null,Ln(e,t));do try{uy();break}catch(l){op(e,l)}while(!0);if(Ka(),le=n,Lo.current=r,je!==null)throw Error(O(261));return Le=null,Ie=0,Pe}function uy(){for(;je!==null;)sp(je)}function cy(){for(;je!==null&&!Om();)sp(je)}function sp(e){var t=cp(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?ap(e):je=t,Za.current=null}function ap(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ry(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pe=6,je=null;return}}else if(n=ny(n,t,Xe),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Pe===0&&(Pe=5)}function Tn(e,t,n){var r=oe,l=at.transition;try{at.transition=null,oe=1,dy(e,t,n,r)}finally{at.transition=l,oe=r}return null}function dy(e,t,n,r){do mr();while(ln!==null);if(le&6)throw Error(O(327));n=e.finishedWork;var l=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 o=n.lanes|n.childLanes;if(Hm(e,o),e===Le&&(je=Le=null,Ie=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Bl||(Bl=!0,dp(yo,function(){return mr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=at.transition,at.transition=null;var i=oe;oe=1;var s=le;le|=4,Za.current=null,oy(e,n),np(n,e),_h(Os),vo=!!Is,Os=Is=null,e.current=n,iy(n),Dm(),le=s,oe=i,at.transition=o}else e.current=n;if(Bl&&(Bl=!1,ln=e,Io=l),o=e.pendingLanes,o===0&&(dn=null),zm(n.stateNode),Ye(e,be()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(Ao)throw Ao=!1,e=ta,ta=null,e;return Io&1&&e.tag!==0&&mr(),o=e.pendingLanes,o&1?e===na?el++:(el=0,na=e):el=0,wn(),null}function mr(){if(ln!==null){var e=Fd(Io),t=at.transition,n=oe;try{if(at.transition=null,oe=16>e?16:e,ln===null)var r=!1;else{if(e=ln,ln=null,Io=0,le&6)throw Error(O(331));var l=le;for(le|=4,B=e.current;B!==null;){var o=B,i=o.child;if(B.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var c=s[a];for(B=c;B!==null;){var f=B;switch(f.tag){case 0:case 11:case 15:Jr(8,f,o)}var p=f.child;if(p!==null)p.return=f,B=p;else for(;B!==null;){f=B;var d=f.sibling,y=f.return;if(qf(f),f===c){B=null;break}if(d!==null){d.return=y,B=d;break}B=y}}}var x=o.alternate;if(x!==null){var w=x.child;if(w!==null){x.child=null;do{var k=w.sibling;w.sibling=null,w=k}while(w!==null)}}B=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,B=i;else e:for(;B!==null;){if(o=B,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Jr(9,o,o.return)}var h=o.sibling;if(h!==null){h.return=o.return,B=h;break e}B=o.return}}var m=e.current;for(B=m;B!==null;){i=B;var g=i.child;if(i.subtreeFlags&2064&&g!==null)g.return=i,B=g;else e:for(i=m;B!==null;){if(s=B,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ci(9,s)}}catch(C){xe(s,s.return,C)}if(s===i){B=null;break e}var v=s.sibling;if(v!==null){v.return=s.return,B=v;break e}B=s.return}}if(le=l,wn(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(ni,e)}catch{}r=!0}return r}finally{oe=n,at.transition=t}}return!1}function xc(e,t,n){t=br(n,t),t=Vf(e,t,1),e=cn(e,t,1),t=Fe(),e!==null&&(Sl(e,1,t),Ye(e,t))}function xe(e,t,n){if(e.tag===3)xc(e,e,n);else for(;t!==null;){if(t.tag===3){xc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(dn===null||!dn.has(r))){e=br(n,e),e=Wf(t,e,1),t=cn(t,e,1),e=Fe(),t!==null&&(Sl(t,1,e),Ye(t,e));break}}t=t.return}}function fy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Le===e&&(Ie&n)===n&&(Pe===4||Pe===3&&(Ie&130023424)===Ie&&500>be()-qa?Ln(e,0):Ja|=n),Ye(e,t)}function up(e,t){t===0&&(e.mode&1?(t=Il,Il<<=1,!(Il&130023424)&&(Il=4194304)):t=1);var n=Fe();e=Ht(e,t),e!==null&&(Sl(e,t,n),Ye(e,n))}function py(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),up(e,n)}function my(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),up(e,n)}var cp;cp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ue=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ue=!1,ty(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,de&&t.flags&1048576&&mf(t,jo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;no(e,t),e=t.pendingProps;var l=gr(t,ze.current);pr(t,n),l=Ua(null,t,r,e,l,n);var o=Ga();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(o=!0,ko(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Fa(t),l.updater=ui,t.stateNode=l,l._reactInternals=t,Bs(t,r,e,n),t=Gs(null,t,r,!0,o,n)):(t.tag=0,de&&o&&Ia(t),$e(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(no(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=yy(r),e=mt(r,e),l){case 0:t=Us(null,t,r,e,n);break e;case 1:t=uc(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=ac(null,t,r,mt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),Us(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),uc(e,t,r,l,n);case 3:e:{if(Gf(t),e===null)throw Error(O(387));r=t.pendingProps,o=t.memoizedState,l=o.element,wf(e,t),Ro(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=br(Error(O(423)),t),t=cc(e,t,r,n,l);break e}else if(r!==l){l=br(Error(O(424)),t),t=cc(e,t,r,n,l);break e}else for(Je=un(t.stateNode.containerInfo.firstChild),qe=t,de=!0,yt=null,n=vf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vr(),r===l){t=Ut(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return bf(t),e===null&&Fs(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Ds(r,l)?i=null:o!==null&&Ds(r,o)&&(t.flags|=32),Uf(e,t),$e(e,t,i,n),t.child;case 6:return e===null&&Fs(t),null;case 13:return Qf(e,t,n);case 4:return Va(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),sc(e,t,r,l,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,se(Eo,r._currentValue),r._currentValue=i,o!==null)if(xt(o.value,i)){if(o.children===l.children&&!Ge.current){t=Ut(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=$t(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?a.next=a:(a.next=f.next,f.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Vs(o.return,n,t),s.lanes|=n;break}a=a.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(O(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Vs(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}$e(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,pr(t,n),l=ut(l),r=r(l),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,l=mt(r,t.pendingProps),l=mt(r.type,l),ac(e,t,r,l,n);case 15:return Bf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),no(e,t),t.tag=1,Qe(r)?(e=!0,ko(t)):e=!1,pr(t,n),Ff(t,r,l),Bs(t,r,l,n),Gs(null,t,r,!0,e,n);case 19:return Yf(e,t,n);case 22:return Hf(e,t,n)}throw Error(O(156,t.tag))};function dp(e,t){return Md(e,t)}function hy(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 st(e,t,n,r){return new hy(e,t,n,r)}function ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yy(e){if(typeof e=="function")return ru(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sa)return 11;if(e===ka)return 14}return 2}function pn(e,t){var n=e.alternate;return n===null?(n=st(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 oo(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")ru(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Xn:return An(n.children,l,o,t);case ba:i=8,l|=8;break;case ms:return e=st(12,n,t,l|2),e.elementType=ms,e.lanes=o,e;case hs:return e=st(13,n,t,l),e.elementType=hs,e.lanes=o,e;case ys:return e=st(19,n,t,l),e.elementType=ys,e.lanes=o,e;case wd:return fi(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vd:i=10;break e;case xd:i=9;break e;case Sa:i=11;break e;case ka:i=14;break e;case qt:i=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=st(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function An(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function fi(e,t,n,r){return e=st(22,e,r,t),e.elementType=wd,e.lanes=n,e.stateNode={isHidden:!1},e}function Xi(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function Zi(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function gy(e,t,n,r,l){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=_i(0),this.expirationTimes=_i(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_i(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function lu(e,t,n,r,l,o,i,s,a){return e=new gy(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=st(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fa(o),e}function vy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fp(e){if(!e)return yn;e=e._reactInternals;e:{if(Vn(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(Qe(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(Qe(n))return ff(e,n,t)}return t}function pp(e,t,n,r,l,o,i,s,a){return e=lu(n,r,!0,e,l,o,i,s,a),e.context=fp(null),n=e.current,r=Fe(),l=fn(n),o=$t(r,l),o.callback=t??null,cn(n,o,l),e.current.lanes=l,Sl(e,l,r),Ye(e,r),e}function pi(e,t,n,r){var l=t.current,o=Fe(),i=fn(l);return n=fp(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=cn(l,t,i),e!==null&&(vt(e,l,i,o),ql(e,l,i)),i}function Do(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 wc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ou(e,t){wc(e,t),(e=e.alternate)&&wc(e,t)}function xy(){return null}var mp=typeof reportError=="function"?reportError:function(e){console.error(e)};function iu(e){this._internalRoot=e}mi.prototype.render=iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));pi(e,t,null,null)};mi.prototype.unmount=iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zn(function(){pi(null,e,null,null)}),t[Bt]=null}};function mi(e){this._internalRoot=e}mi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tn.length&&t!==0&&t<tn[n].priority;n++);tn.splice(n,0,e),n===0&&Ud(e)}};function su(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function bc(){}function wy(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var c=Do(i);o.call(c)}}var i=pp(t,r,e,0,null,!1,!1,"",bc);return e._reactRootContainer=i,e[Bt]=i.current,ul(e.nodeType===8?e.parentNode:e),zn(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var s=r;r=function(){var c=Do(a);s.call(c)}}var a=lu(e,0,!1,null,null,!1,!1,"",bc);return e._reactRootContainer=a,e[Bt]=a.current,ul(e.nodeType===8?e.parentNode:e),zn(function(){pi(t,a,n,r)}),a}function yi(e,t,n,r,l){var o=n._reactRootContainer;if(o){var i=o;if(typeof l=="function"){var s=l;l=function(){var a=Do(i);s.call(a)}}pi(t,i,e,l)}else i=wy(n,t,e,l,r);return Do(i)}Vd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Br(t.pendingLanes);n!==0&&(Ea(t,n|1),Ye(t,be()),!(le&6)&&(Sr=be()+500,wn()))}break;case 13:zn(function(){var r=Ht(e,1);if(r!==null){var l=Fe();vt(r,e,1,l)}}),ou(e,1)}};Ta=function(e){if(e.tag===13){var t=Ht(e,134217728);if(t!==null){var n=Fe();vt(t,e,134217728,n)}ou(e,134217728)}};Wd=function(e){if(e.tag===13){var t=fn(e),n=Ht(e,t);if(n!==null){var r=Fe();vt(n,e,t,r)}ou(e,t)}};Bd=function(){return oe};Hd=function(e,t){var n=oe;try{return oe=e,t()}finally{oe=n}};Es=function(e,t,n){switch(t){case"input":if(xs(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 l=ii(r);if(!l)throw Error(O(90));Sd(r),xs(r,l)}}}break;case"textarea":Cd(e,n);break;case"select":t=n.value,t!=null&&ur(e,!!n.multiple,t,!1)}};_d=eu;Ld=zn;var by={usingClientEntryPoint:!1,Events:[Cl,er,ii,Nd,Pd,eu]},$r={findFiberByHostInstance:Rn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sy={bundleType:$r.bundleType,version:$r.version,rendererPackageName:$r.rendererPackageName,rendererConfig:$r.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Od(e),e===null?null:e.stateNode},findFiberByHostInstance:$r.findFiberByHostInstance||xy,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 Hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hl.isDisabled&&Hl.supportsFiber)try{ni=Hl.inject(Sy),kt=Hl}catch{}}nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=by;nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!su(t))throw Error(O(200));return vy(e,t,null,n)};nt.createRoot=function(e,t){if(!su(e))throw Error(O(299));var n=!1,r="",l=mp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=lu(e,1,!1,null,null,n,!1,r,l),e[Bt]=t.current,ul(e.nodeType===8?e.parentNode:e),new iu(t)};nt.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=Od(t),e=e===null?null:e.stateNode,e};nt.flushSync=function(e){return zn(e)};nt.hydrate=function(e,t,n){if(!hi(t))throw Error(O(200));return yi(null,e,t,!0,n)};nt.hydrateRoot=function(e,t,n){if(!su(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=mp;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=pp(t,null,e,1,n??null,l,!1,o,i),e[Bt]=t.current,ul(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new mi(t)};nt.render=function(e,t,n){if(!hi(t))throw Error(O(200));return yi(null,e,t,!1,n)};nt.unmountComponentAtNode=function(e){if(!hi(e))throw Error(O(40));return e._reactRootContainer?(zn(function(){yi(null,null,e,!1,function(){e._reactRootContainer=null,e[Bt]=null})}),!0):!1};nt.unstable_batchedUpdates=eu;nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!hi(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return yi(e,t,n,!1,r)};nt.version="18.3.1-next-f1338f8080-20240426";function hp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hp)}catch(e){console.error(e)}}hp(),md.exports=nt;var gi=md.exports,Sc=gi;fs.createRoot=Sc.createRoot,fs.hydrateRoot=Sc.hydrateRoot;const ky="modulepreload",Cy=function(e){return"/panel/"+e},kc={},jy=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));l=Promise.allSettled(n.map(a=>{if(a=Cy(a),a in kc)return;kc[a]=!0;const c=a.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":ky,c||(p.as="script"),p.crossOrigin="",p.href=a,s&&p.setAttribute("nonce",s),document.head.appendChild(p),c)return new Promise((d,y)=>{p.addEventListener("load",d),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return l.then(i=>{for(const s of i||[])s.status==="rejected"&&o(s.reason);return t().catch(o)})};function X(){return e=>e===""?{props:{}}:null}function Re(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function pt(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function G(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const Ey=["t","r","b","l","x","y"],Ji=["t","r","b","l","x","y","s","e","bs","be"];function Ce(...e){return t=>{for(const n of e){const r=n(t);if(r)return r}return null}}function $(e,t){return{prefix:e,segment:t}}function _t(e,t){return t.map(n=>({...n,section:e}))}function qi(e,t,n=Ey){return[...n.map(l=>({prefix:e+l,segment:t,canonical:e,extraProps:{side:l}})),{prefix:e,segment:t}]}function Ty(e,t){const n=["tl","tr","br","bl"],r=["t","r","b","l"],l=n.map(i=>({prefix:e+"-"+i,segment:t,canonical:e,extraProps:{corner:i}})),o=r.map(i=>({prefix:e+"-"+i,segment:t,canonical:e,extraProps:{side:i}}));return[...l,...o,{prefix:e,segment:Ce(X(),t)}]}function Cc(e,t){const n=new Set(t);return{prefix:e,segment:X(),matches:r=>n.has(r)?{props:{value:r}}:null}}function Ry(e,t){for(const n of t){const{prefix:r,matches:l,segment:o,canonical:i,section:s,extraProps:a}=n;if(l){const p=l(e);if(!p)continue;const d={property:i??r,fullClass:e};if(s&&(d.section=s),a)for(const[y,x]of Object.entries(a))d[y]=x;for(const[y,x]of Object.entries(p.props))d[y]=x;return d}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const f=o(c);if(f){const p={property:i??r,fullClass:e};if(s&&(p.section=s),a)for(const[d,y]of Object.entries(a))p[d]=y;for(const[d,y]of Object.entries(f.props))p[d]=y;return p}return{property:i??r,fullClass:e,unknown:!0}}return null}function Ny(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const l of n){const o=Ry(l,t);o&&r.push(o)}return r}const Py=["solid","dashed","dotted","double","none","hidden"],_y=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],Ly=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],Ay=["tighter","tight","normal","wide","wider","widest"],Iy=["left","center","right","justify","start","end"],Oy=["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"],Dy=["static","relative","absolute","fixed","sticky"],My=["2xs","xs","sm","md","lg","xl","2xl","none"],Ky=["t","tr","r","br","b","bl","l","tl"],zy=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],$y=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],Fy=["normal","start","end","center","between","around","evenly","baseline","stretch"],Vy=["start","end","center","stretch"],Wy=["auto","start","end","center","stretch","baseline"],By=[..._t("spacing",[...qi("m",G("spacing"),Ji),...qi("-m",G("spacing"),Ji),...qi("p",G("spacing"),Ji),$("gap-x",G("spacing")),$("gap-y",G("spacing")),$("gap",G("spacing")),$("space-x-reverse",X()),$("space-y-reverse",X()),$("space-x",G("spacing")),$("space-y",G("spacing"))]),..._t("sizing",[$("min-w",G("spacing")),$("max-w",G("spacing")),$("min-h",G("spacing")),$("max-h",G("spacing")),$("size",G("spacing")),$("w",G("spacing")),$("h",G("spacing"))]),..._t("typography",[$("font-sans",X()),$("font-serif",X()),$("font-mono",X()),$("font",Re("scale",_y)),$("text",Ce(Re("align",Iy),e=>Ly.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,pt())),$("leading",Ce(Re("scale",["none"]),G("spacing"))),$("tracking",Re("scale",Ay)),$("italic",X()),$("not-italic",X()),$("underline",X()),$("line-through",X()),$("overline",X()),$("no-underline",X()),$("uppercase",X()),$("lowercase",X()),$("capitalize",X()),$("normal-case",X()),$("truncate",X()),$("align-text-top",X()),$("align-text-bottom",X()),$("align-baseline",X()),$("align-top",X()),$("align-middle",X()),$("align-bottom",X()),$("align-sub",X()),$("align-super",X())]),..._t("color",[$("bg-gradient-to",Re("direction",Ky)),$("bg",pt()),$("from",pt()),$("via",pt()),$("to",pt()),$("ring",pt()),$("outline",Ce(Re("style",["solid","dashed","dotted","double","none"]),pt())),$("fill",pt()),$("stroke",pt()),$("decoration",pt())]),..._t("borders",[{prefix:"border-bs",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Ce(X(),G("borderWidth")),canonical:"border",extraProps:{side:"l"}},$("border",Ce(X(),Re("style",Py),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,pt())),...Ty("rounded",G("borderRadius"))]),..._t("effects",[$("opacity",G("opacity")),$("shadow",Re("size",My))]),..._t("layout",[Cc("display",Oy),Cc("position",Dy),{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"}},$("inset",G("spacing")),$("z",G("zIndex"))]),..._t("flexbox",[$("flex-row-reverse",X()),$("flex-col-reverse",X()),$("flex-wrap-reverse",X()),$("flex-row",X()),$("flex-col",X()),$("flex-wrap",X()),$("flex-nowrap",X()),$("flex",Ce(X(),Re("value",["auto","initial","none"]),G("number"))),$("grow",Ce(X(),G("number"))),$("shrink",Ce(X(),G("number"))),$("justify-items",Re("value",Vy)),$("justify",Re("value",zy)),$("items",Re("value",$y)),$("content",Re("value",Fy)),$("self",Re("value",Wy)),$("basis",G("spacing")),$("grid-cols",Ce(Re("value",["none","subgrid"]),G("gridCols"))),$("grid-rows",Ce(Re("value",["none","subgrid"]),G("gridRows"))),$("col-span",G("colSpan")),$("row-span",G("rowSpan")),$("order",G("order"))]),..._t("overflow",[$("overflow-x",Re("value",["auto","hidden","clip","visible","scroll"])),$("overflow-y",Re("value",["auto","hidden","clip","visible","scroll"])),$("overflow",Re("value",["auto","hidden","clip","visible","scroll"]))])];let It=null,Mo=!1;const io=[],so=[],ao=[];function Hy(){return window.location.origin.replace(/^http/,"ws")}function yp(){if(It)return;const e=Hy();It=new WebSocket(e),It.addEventListener("open",()=>{Mo=!0,sr({type:"REGISTER",role:"panel"});for(const t of so)t()}),It.addEventListener("close",()=>{Mo=!1,It=null;for(const t of ao)t();setTimeout(()=>yp(),3e3)}),It.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of io)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),It.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function sr(e){Mo&&It&&It.send(JSON.stringify(e))}function pe(e,t){sr({...t,to:e})}function Uy(e){return io.push(e),()=>{const t=io.indexOf(e);t!==-1&&io.splice(t,1)}}function Gy(e){return so.push(e),()=>{const t=so.indexOf(e);t!==-1&&so.splice(t,1)}}function Qy(e){return ao.push(e),()=>{const t=ao.indexOf(e);t!==-1&&ao.splice(t,1)}}function Yy(){return Mo}const gp=[{name:"popover",label:"Popover",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),u.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),u.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],vp="tw-panel-container";function Xy(){try{const e=localStorage.getItem(vp);if(e&&gp.some(t=>t.name===e))return e}catch{}return"popover"}function jc(){const[e,t]=b.useState(Xy),[n,r]=b.useState(!1),l=b.useRef(null);b.useEffect(()=>{function i(s){l.current&&!l.current.contains(s.target)&&r(!1)}return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);function o(i){if(i!==e){try{localStorage.setItem(vp,i)}catch{}t(i),pe("overlay",{type:"SWITCH_CONTAINER",container:i})}r(!1)}return u.jsxs("div",{ref:l,className:"relative",children:[u.jsx("button",{title:"Change container",onClick:()=>r(i=>!i),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:u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[u.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),u.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),u.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),u.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),u.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&u.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:[u.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),gp.map(i=>u.jsxs("button",{onClick:()=>o(i.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 ${i.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[i.icon,i.label]},i.name)),u.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),u.jsxs("button",{onClick:()=>{r(!1),pe("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:[u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}const es=typeof window<"u"?window.SpeechRecognition??window.webkitSpeechRecognition??null:null;function Ec({draft:e,currentElementKey:t,onAddMessage:n,onDiscard:r}){const[l,o]=b.useState(""),[i,s]=b.useState(!1),[a,c]=b.useState(null),f=b.useRef(null),p=b.useRef(null),d=b.useRef("");b.useEffect(()=>{var m;(m=f.current)==null||m.focus()},[]);const y=e.filter(m=>m.kind==="message"),x=!!l.trim()&&!!t;function w(){var g;const m=l.trim();!m||!t||(n(m,t),o(""),(g=f.current)==null||g.focus())}function k(){var g;if(i){(g=p.current)==null||g.stop();return}if(!es)return;d.current=l;const m=new es;m.continuous=!1,m.interimResults=!0,m.lang="en-US",m.onresult=v=>{let C="";for(let S=0;S<v.results.length;S++)C+=v.results[S][0].transcript;const j=d.current.trimEnd();o(j?`${j} ${C}`:C)},m.onend=()=>s(!1),m.onerror=v=>{console.error("[mic] SpeechRecognition error:",v.error,v.message),s(!1),v.error==="not-allowed"&&c("Microphone blocked — allow access in your browser's address bar, then reload.")},p.current=m;try{m.start(),s(!0),console.log("[mic] recognition started")}catch(v){console.error("[mic] recognition.start() threw:",v)}}function h(m){(m.metaKey||m.ctrlKey)&&m.key==="Enter"&&(m.preventDefault(),w())}return u.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx("textarea",{ref:f,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:l,onChange:m=>o(m.target.value),onKeyDown:h,disabled:!t}),u.jsxs("div",{className:"flex items-center justify-between",children:[es?u.jsx("button",{type:"button",title:i?"Stop recording":"Record voice message",onClick:k,className:`flex items-center justify-center w-7 h-7 rounded-full border-none cursor-pointer transition-colors ${i?"bg-bv-orange text-white":a?"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:i?u.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-white animate-pulse"}):u.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:u.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"})})}):u.jsx("span",{}),u.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:!x,onClick:w,children:"Add Message"})]}),a&&u.jsx("p",{className:"text-[11px] text-bv-orange mt-1",children:a})]}),y.length>0&&u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),u.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Staged Messages"})]}),y.map(m=>{var g;return u.jsxs("div",{className:"flex items-start gap-2 p-2 bg-bv-surface rounded border border-bv-border group",children:[u.jsx("span",{className:"text-[12px] shrink-0 mt-0.5",children:"💬"}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"text-[12px] font-[family-name:var(--font-ui)] text-bv-text break-words",children:['"',m.message,'"']}),m.elementKey&&u.jsx("div",{className:"text-[11px] text-bv-text-mid mt-0.5",children:((g=m.component)==null?void 0:g.name)||m.elementKey})]}),u.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(m.id),title:"Discard",children:"✕"})]},m.id)})]})]})}function Ul({label:e,count:t,items:n,activeColor:r,dotColor:l,onCommit:o,onDiscard:i,onCommitAll:s,onDiscardAll:a}){const[c,f]=b.useState(!1),p=b.useRef(null),d=b.useRef(null),[y,x]=b.useState(void 0);b.useEffect(()=>{if(!c||!d.current)return;const m=d.current.getBoundingClientRect(),g=220,v=window.innerWidth,C=4;let j=m.left+m.width/2-g/2;j=Math.max(C,Math.min(j,v-g-C)),x(j-m.left)},[c]),b.useEffect(()=>{if(!c)return;function h(m){p.current&&!p.current.contains(m.target)&&f(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),b.useEffect(()=>{if(!c)return;function h(m){m.key==="Escape"&&f(!1)}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[c]);const w=t>0,k=o||i||s||a;return u.jsxs("div",{ref:p,className:"relative",children:[u.jsxs("button",{ref:d,className:`flex items-center gap-1 text-[9px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${w?`${r} font-medium`:"text-bv-muted"} ${w?"hover:underline":""}`,onClick:()=>w&&f(!c),disabled:!w,type:"button",children:[l&&u.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${l}`}),t," ",e]}),c&&u.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:y!==void 0?{left:`${y}px`}:void 0,children:[u.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,")"]}),u.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?u.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(h=>{var v,C;const m="kind"in h&&h.kind==="message",g="kind"in h&&h.kind==="design";return u.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:[u.jsxs("div",{className:"flex-1 min-w-0",children:[!m&&!g&&((v=h.component)==null?void 0:v.name)&&u.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:h.component.name}),g?u.jsxs("div",{className:"text-[11px] text-bv-text",children:[u.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[u.jsx("span",{children:"✏️"}),u.jsxs("span",{className:"truncate",children:["Drawing",(C=h.component)!=null&&C.name?` in ${h.component.name}`:""]})]}),"image"in h&&h.image&&u.jsx("img",{src:h.image,alt:"Design drawing",className:"w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):m?u.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[u.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in h&&h.message||"",'"']}):u.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:h.originalClass?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"line-through text-bv-muted",children:h.originalClass})," → ",u.jsx("span",{className:"text-bv-teal",children:h.newClass})]}):u.jsxs("span",{className:"text-bv-teal",children:["+",h.newClass]})})]}),(o||i)&&u.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[o&&u.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:j=>{j.stopPropagation(),o(h.id)},title:"Commit to Agent",type:"button",children:"✓"}),i&&u.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:j=>{j.stopPropagation(),i(h.id)},title:"Discard",type:"button",children:"✕"})]})]},h.id)})}),k&&n.length>0&&(s||a)&&u.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[s&&u.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:()=>{s(),f(!1)},type:"button",children:"Commit All"}),a&&u.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:()=>{a(),f(!1)},type:"button",children:"Discard All"})]})]})]})}function Tc({tabs:e,activeTab:t,onTabChange:n}){const[r,l]=b.useState(null);return u.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(o=>{const i=o.id===t,s=o.disabled===!0;return u.jsxs("div",{className:"relative",onMouseEnter:()=>s&&o.tooltip&&l(o.id),onMouseLeave:()=>l(null),children:[u.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 ${s?"text-bv-muted cursor-not-allowed":i?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:s,onClick:()=>!s&&n(o.id),"aria-selected":i,role:"tab",children:[o.label,i&&u.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===o.id&&o.tooltip&&u.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:o.tooltip})]},o.id)})})}function Zy(){const[e,t]=b.useState([]),[n,r]=b.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[l,o]=b.useState({draft:[],commits:[]}),[i,s]=b.useState(!1),a=b.useRef(e);a.current=e;const c=b.useRef(l);c.current=l;const f=b.useCallback((S,R)=>{pe("overlay",{type:"PATCH_PREVIEW",oldClass:S,newClass:R})},[]),p=b.useCallback(S=>{pe("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:S})},[]),d=b.useCallback(()=>{pe("overlay",{type:"PATCH_REVERT"})},[]),y=b.useCallback((S,R,F,N)=>{if(N===F){t(W=>{const P=W.find(M=>M.kind==="class-change"&&M.elementKey===S&&M.property===R);return P&&P.kind==="class-change"&&P.newClass!==F?pe("overlay",{type:"PATCH_REVERT_STAGED",oldClass:P.newClass,newClass:F}):pe("overlay",{type:"PATCH_REVERT"}),W.filter(M=>!(M.kind==="class-change"&&M.elementKey===S&&M.property===R))});return}const V=crypto.randomUUID();t(W=>{const P=W.filter(Z=>!(Z.kind==="class-change"&&Z.elementKey===S&&Z.property===R)),M={id:V,kind:"class-change",elementKey:S,status:"staged",originalClass:F,newClass:N,property:R,timestamp:new Date().toISOString()};return[...P,M]}),pe("overlay",{type:"PATCH_STAGE",id:V,oldClass:F,newClass:N,property:R})},[]),x=b.useCallback((S,R,F)=>{const N=crypto.randomUUID(),V=F?{name:F}:void 0;t(W=>{const P={id:N,kind:"message",elementKey:R,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:S,component:V};return[...W,P]}),sr(V?{type:"MESSAGE_STAGE",id:N,message:S,elementKey:R,component:V}:{type:"MESSAGE_STAGE",id:N,message:S,elementKey:R})},[]),w=b.useCallback(()=>{const S=c.current.draft.map(N=>N.id),R=a.current.filter(N=>N.status==="staged").map(N=>N.id),F=Array.from(new Set([...S,...R]));F.length!==0&&(sr({type:"PATCH_COMMIT",ids:F}),t([]))},[]),k=b.useCallback(S=>{t(R=>R.filter(F=>F.id!==S)),sr({type:"DISCARD_DRAFTS",ids:[S]}),pe("overlay",{type:"PATCH_REVERT"})},[]),h=b.useCallback(()=>{const S=c.current.draft.map(N=>N.id),R=a.current.filter(N=>N.status==="staged").map(N=>N.id),F=Array.from(new Set([...S,...R]));t([]),F.length>0&&sr({type:"DISCARD_DRAFTS",ids:F}),pe("overlay",{type:"PATCH_REVERT"})},[]),m=b.useCallback(()=>{},[]),g=b.useCallback(S=>{r({draft:S.draftCount,committed:S.committedCount,implementing:S.implementingCount,implemented:S.implementedCount,partial:S.partialCount,error:S.errorCount}),o({draft:S.draft,commits:S.commits}),s(!!S.agentWaiting)},[]),v=b.useCallback(S=>{r({draft:S.staged,committed:S.committed,implementing:S.implementing,implemented:S.implemented,partial:0,error:0})},[]),C=e.filter(S=>S.status==="staged").length,j={draft:Math.max(C,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:j,queueState:l,agentWaiting:i,preview:f,previewBatch:p,revertPreview:d,stage:y,stageMessage:x,commitAll:w,discard:k,discardAll:h,reset:m,handleQueueUpdate:g,handlePatchUpdate:v}}function vi(){return typeof window<"u"}function Tr(e){return au(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Et(e){var t;return(t=(au(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function au(e){return vi()?e instanceof Node||e instanceof et(e).Node:!1}function Se(e){return vi()?e instanceof Element||e instanceof et(e).Element:!1}function Tt(e){return vi()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function oa(e){return!vi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}function El(e){const{overflow:t,overflowX:n,overflowY:r,display:l}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&l!=="inline"&&l!=="contents"}function Jy(e){return/^(table|td|th)$/.test(Tr(e))}function xi(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const qy=/transform|translate|scale|rotate|perspective|filter/,eg=/paint|layout|strict|content/,kn=e=>!!e&&e!=="none";let ts;function uu(e){const t=Se(e)?dt(e):e;return kn(t.transform)||kn(t.translate)||kn(t.scale)||kn(t.rotate)||kn(t.perspective)||!wi()&&(kn(t.backdropFilter)||kn(t.filter))||qy.test(t.willChange||"")||eg.test(t.contain||"")}function tg(e){let t=Gt(e);for(;Tt(t)&&!Ft(t);){if(uu(t))return t;if(xi(t))return null;t=Gt(t)}return null}function wi(){return ts==null&&(ts=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ts}function Ft(e){return/^(html|body|#document)$/.test(Tr(e))}function dt(e){return et(e).getComputedStyle(e)}function bi(e){return Se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gt(e){if(Tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||oa(e)&&e.host||Et(e);return oa(t)?t.host:t}function xp(e){const t=Gt(e);return Ft(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tt(t)&&El(t)?t:xp(t)}function mn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=xp(e),o=l===((r=e.ownerDocument)==null?void 0:r.body),i=et(l);if(o){const s=ia(i);return t.concat(i,i.visualViewport||[],El(l)?l:[],s&&n?mn(s):[])}else return t.concat(l,mn(l,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const kr=Math.min,Ze=Math.max,Ko=Math.round,Gl=Math.floor,jt=e=>({x:e,y:e}),ng={left:"right",right:"left",bottom:"top",top:"bottom"};function Rc(e,t,n){return Ze(e,kr(t,n))}function Tl(e,t){return typeof e=="function"?e(t):e}function gn(e){return e.split("-")[0]}function Rl(e){return e.split("-")[1]}function wp(e){return e==="x"?"y":"x"}function bp(e){return e==="y"?"height":"width"}function zt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Sp(e){return wp(zt(e))}function rg(e,t,n){n===void 0&&(n=!1);const r=Rl(e),l=Sp(e),o=bp(l);let i=l==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=zo(i)),[i,zo(i)]}function lg(e){const t=zo(e);return[sa(e),t,sa(t)]}function sa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nc=["left","right"],Pc=["right","left"],og=["top","bottom"],ig=["bottom","top"];function sg(e,t,n){switch(e){case"top":case"bottom":return n?t?Pc:Nc:t?Nc:Pc;case"left":case"right":return t?og:ig;default:return[]}}function ag(e,t,n,r){const l=Rl(e);let o=sg(gn(e),n==="start",r);return l&&(o=o.map(i=>i+"-"+l),t&&(o=o.concat(o.map(sa)))),o}function zo(e){const t=gn(e);return ng[t]+e.slice(t.length)}function ug(e){return{top:0,right:0,bottom:0,left:0,...e}}function cg(e){return typeof e!="number"?ug(e):{top:e,right:e,bottom:e,left:e}}function $o(e){const{x:t,y:n,width:r,height:l}=e;return{width:r,height:l,top:n,left:t,right:t+r,bottom:n+l,x:t,y:n}}/*!
41
+ * tabbable 6.4.0
42
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
43
+ */var dg=["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] *)"],aa=dg.join(","),kp=typeof Element>"u",vl=kp?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fo=!kp&&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},Vo=function(t,n){var r;n===void 0&&(n=!0);var l=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=l===""||l==="true",i=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Vo(t.parentNode));return i},fg=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},pg=function(t,n,r){if(Vo(t))return[];var l=Array.prototype.slice.apply(t.querySelectorAll(aa));return n&&vl.call(t,aa)&&l.unshift(t),l=l.filter(r),l},ua=function(t,n,r){for(var l=[],o=Array.from(t);o.length;){var i=o.shift();if(!Vo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,c=ua(a,!0,r);r.flatten?l.push.apply(l,c):l.push({scopeParent:i,candidates:c})}else{var f=vl.call(i,aa);f&&r.filter(i)&&(n||!t.includes(i))&&l.push(i);var p=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),d=!Vo(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(p&&d){var y=ua(p===!0?i.children:p.children,!0,r);r.flatten?l.push.apply(l,y):l.push({scopeParent:i,candidates:y})}else o.unshift.apply(o,i.children)}}return l},Cp=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},jp=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||fg(t))&&!Cp(t)?0:t.tabIndex},mg=function(t,n){var r=jp(t);return r<0&&n&&!Cp(t)?0:r},hg=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ep=function(t){return t.tagName==="INPUT"},yg=function(t){return Ep(t)&&t.type==="hidden"},gg=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},vg=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xg=function(t){if(!t.name)return!0;var n=t.form||Fo(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},l;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")l=r(window.CSS.escape(t.name));else try{l=r(t.name)}catch(i){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",i.message),!1}var o=vg(l,t.form);return!o||o===t},wg=function(t){return Ep(t)&&t.type==="radio"},bg=function(t){return wg(t)&&!xg(t)},Sg=function(t){var n,r=t&&Fo(t),l=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var i,s,a;for(o=!!((i=l)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(l)||t!=null&&(a=t.ownerDocument)!==null&&a!==void 0&&a.contains(t));!o&&l;){var c,f,p;r=Fo(l),l=(c=r)===null||c===void 0?void 0:c.host,o=!!((f=l)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(l))}}return o},_c=function(t){var n=t.getBoundingClientRect(),r=n.width,l=n.height;return r===0&&l===0},kg=function(t,n){var r=n.displayCheck,l=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var i=vl.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(vl.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof l=="function"){for(var a=t;t;){var c=t.parentElement,f=Fo(t);if(c&&!c.shadowRoot&&l(c)===!0)return _c(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=a}if(Sg(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _c(t);return!1},Cg=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 l=n.children.item(r);if(l.tagName==="LEGEND")return vl.call(n,"fieldset[disabled] *")?!0:!l.contains(t)}return!0}n=n.parentElement}return!1},jg=function(t,n){return!(n.disabled||yg(n)||kg(n,t)||gg(n)||Cg(n))},Lc=function(t,n){return!(bg(n)||jp(n)<0||!jg(t,n))},Eg=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Tp=function(t){var n=[],r=[];return t.forEach(function(l,o){var i=!!l.scopeParent,s=i?l.scopeParent:l,a=mg(s,i),c=i?Tp(l.candidates):s;a===0?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:a,item:l,isScope:i,content:c})}),r.sort(hg).reduce(function(l,o){return o.isScope?l.push.apply(l,o.content):l.push(o.content),l},[]).concat(n)},Rp=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ua([t],n.includeContainer,{filter:Lc.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Eg}):r=pg(t,n.includeContainer,Lc.bind(null,n)),Tp(r)};function Tg(){return/apple/i.test(navigator.vendor)}function Rg(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 ca(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&oa(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Fr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ns(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 Ng(e){return e.matches("html,body")}function xl(e){return(e==null?void 0:e.ownerDocument)||document}function uo(e,t,n){return n===void 0&&(n=!0),e.filter(l=>{var o;return l.parentId===t&&(!n||((o=l.context)==null?void 0:o.open))}).flatMap(l=>[l,...uo(e,l.id,n)])}function Pg(e){return"nativeEvent"in e}var _g=typeof document<"u",Lg=function(){},In=_g?b.useLayoutEffect:Lg;const Ag={...fd},Ig=Ag.useInsertionEffect,Og=Ig||(e=>e());function Qn(e){const t=b.useRef(()=>{});return Og(()=>{t.current=e}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return t.current==null?void 0:t.current(...r)},[])}const Np=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Pp(e,t){const n=Rp(e,Np()),r=n.length;if(r===0)return;const l=Rg(xl(e)),o=n.indexOf(l),i=o===-1?t===1?0:r-1:o+t;return n[i]}function Dg(e){return Pp(xl(e).body,1)||e}function Mg(e){return Pp(xl(e).body,-1)||e}function rs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ca(n,r)}function Kg(e){Rp(e,Np()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ac(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 Ic(e,t,n){let{reference:r,floating:l}=e;const o=zt(t),i=Sp(t),s=bp(i),a=gn(t),c=o==="y",f=r.x+r.width/2-l.width/2,p=r.y+r.height/2-l.height/2,d=r[s]/2-l[s]/2;let y;switch(a){case"top":y={x:f,y:r.y-l.height};break;case"bottom":y={x:f,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-l.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Rl(t)){case"start":y[i]-=d*(n&&c?-1:1);break;case"end":y[i]+=d*(n&&c?-1:1);break}return y}async function zg(e,t){var n;t===void 0&&(t={});const{x:r,y:l,platform:o,rects:i,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:d=!1,padding:y=0}=Tl(t,e),x=cg(y),k=s[d?p==="floating"?"reference":"floating":p],h=$o(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(k)))==null||n?k:k.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:a})),m=p==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),v=await(o.isElement==null?void 0:o.isElement(g))?await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1}:{x:1,y:1},C=$o(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:g,strategy:a}):m);return{top:(h.top-C.top+x.top)/v.y,bottom:(C.bottom-h.bottom+x.bottom)/v.y,left:(h.left-C.left+x.left)/v.x,right:(C.right-h.right+x.right)/v.x}}const $g=50,Fg=async(e,t,n)=>{const{placement:r="bottom",strategy:l="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:zg},a=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:p}=Ic(c,r,a),d=r,y=0;const x={};for(let w=0;w<o.length;w++){const k=o[w];if(!k)continue;const{name:h,fn:m}=k,{x:g,y:v,data:C,reset:j}=await m({x:f,y:p,initialPlacement:r,placement:d,strategy:l,middlewareData:x,rects:c,platform:s,elements:{reference:e,floating:t}});f=g??f,p=v??p,x[h]={...x[h],...C},j&&y<$g&&(y++,typeof j=="object"&&(j.placement&&(d=j.placement),j.rects&&(c=j.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:l}):j.rects),{x:f,y:p}=Ic(c,d,a)),w=-1)}return{x:f,y:p,placement:d,strategy:l,middlewareData:x}},Vg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:l,middlewareData:o,rects:i,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...k}=Tl(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const h=gn(l),m=zt(s),g=gn(s)===s,v=await(a.isRTL==null?void 0:a.isRTL(c.floating)),C=d||(g||!w?[zo(s)]:lg(s)),j=x!=="none";!d&&j&&C.push(...ag(s,w,x,v));const S=[s,...C],R=await a.detectOverflow(t,k),F=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&F.push(R[h]),p){const M=rg(l,i,v);F.push(R[M[0]],R[M[1]])}if(N=[...N,{placement:l,overflows:F}],!F.every(M=>M<=0)){var V,W;const M=(((V=o.flip)==null?void 0:V.index)||0)+1,Z=S[M];if(Z&&(!(p==="alignment"?m!==zt(Z):!1)||N.every(T=>zt(T.placement)===m?T.overflows[0]>0:!0)))return{data:{index:M,overflows:N},reset:{placement:Z}};let K=(W=N.filter(Y=>Y.overflows[0]<=0).sort((Y,T)=>Y.overflows[1]-T.overflows[1])[0])==null?void 0:W.placement;if(!K)switch(y){case"bestFit":{var P;const Y=(P=N.filter(T=>{if(j){const A=zt(T.placement);return A===m||A==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(A=>A>0).reduce((A,_)=>A+_,0)]).sort((T,A)=>T[1]-A[1])[0])==null?void 0:P[0];Y&&(K=Y);break}case"initialPlacement":K=s;break}if(l!==K)return{reset:{placement:K}}}return{}}}},Wg=new Set(["left","top"]);async function Bg(e,t){const{placement:n,platform:r,elements:l}=e,o=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=gn(n),s=Rl(n),a=zt(n)==="y",c=Wg.has(i)?-1:1,f=o&&a?-1:1,p=Tl(t,e);let{mainAxis:d,crossAxis:y,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof x=="number"&&(y=s==="end"?x*-1:x),a?{x:y*f,y:d*c}:{x:d*c,y:y*f}}const Hg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:l,y:o,placement:i,middlewareData:s}=t,a=await Bg(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:l+a.x,y:o+a.y,data:{...a,placement:i}}}}},Ug=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:l,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:h=>{let{x:m,y:g}=h;return{x:m,y:g}}},...c}=Tl(e,t),f={x:n,y:r},p=await o.detectOverflow(t,c),d=zt(gn(l)),y=wp(d);let x=f[y],w=f[d];if(i){const h=y==="y"?"top":"left",m=y==="y"?"bottom":"right",g=x+p[h],v=x-p[m];x=Rc(g,x,v)}if(s){const h=d==="y"?"top":"left",m=d==="y"?"bottom":"right",g=w+p[h],v=w-p[m];w=Rc(g,w,v)}const k=a.fn({...t,[y]:x,[d]:w});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[y]:i,[d]:s}}}}}},Gg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:l,rects:o,platform:i,elements:s}=t,{apply:a=()=>{},...c}=Tl(e,t),f=await i.detectOverflow(t,c),p=gn(l),d=Rl(l),y=zt(l)==="y",{width:x,height:w}=o.floating;let k,h;p==="top"||p==="bottom"?(k=p,h=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=p,k=d==="end"?"top":"bottom");const m=w-f.top-f.bottom,g=x-f.left-f.right,v=kr(w-f[k],m),C=kr(x-f[h],g),j=!t.middlewareData.shift;let S=v,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=m),j&&!d){const N=Ze(f.left,0),V=Ze(f.right,0),W=Ze(f.top,0),P=Ze(f.bottom,0);y?R=x-2*(N!==0||V!==0?N+V:Ze(f.left,f.right)):S=w-2*(W!==0||P!==0?W+P:Ze(f.top,f.bottom))}await a({...t,availableWidth:R,availableHeight:S});const F=await i.getDimensions(s.floating);return x!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function _p(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const l=Tt(e),o=l?e.offsetWidth:n,i=l?e.offsetHeight:r,s=Ko(n)!==o||Ko(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function cu(e){return Se(e)?e:e.contextElement}function hr(e){const t=cu(e);if(!Tt(t))return jt(1);const n=t.getBoundingClientRect(),{width:r,height:l,$:o}=_p(t);let i=(o?Ko(n.width):n.width)/r,s=(o?Ko(n.height):n.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Qg=jt(0);function Lp(e){const t=et(e);return!wi()||!t.visualViewport?Qg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function $n(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),o=cu(e);let i=jt(1);t&&(r?Se(r)&&(i=hr(r)):i=hr(e));const s=Yg(o,n,r)?Lp(o):jt(0);let a=(l.left+s.x)/i.x,c=(l.top+s.y)/i.y,f=l.width/i.x,p=l.height/i.y;if(o){const d=et(o),y=r&&Se(r)?et(r):r;let x=d,w=ia(x);for(;w&&r&&y!==x;){const k=hr(w),h=w.getBoundingClientRect(),m=dt(w),g=h.left+(w.clientLeft+parseFloat(m.paddingLeft))*k.x,v=h.top+(w.clientTop+parseFloat(m.paddingTop))*k.y;a*=k.x,c*=k.y,f*=k.x,p*=k.y,a+=g,c+=v,x=et(w),w=ia(x)}}return $o({width:f,height:p,x:a,y:c})}function Si(e,t){const n=bi(e).scrollLeft;return t?t.left+n:$n(Et(e)).left+n}function Ap(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Si(e,n),l=n.top+t.scrollTop;return{x:r,y:l}}function Xg(e){let{elements:t,rect:n,offsetParent:r,strategy:l}=e;const o=l==="fixed",i=Et(r),s=t?xi(t.floating):!1;if(r===i||s&&o)return n;let a={scrollLeft:0,scrollTop:0},c=jt(1);const f=jt(0),p=Tt(r);if((p||!p&&!o)&&((Tr(r)!=="body"||El(i))&&(a=bi(r)),p)){const y=$n(r);c=hr(r),f.x=y.x+r.clientLeft,f.y=y.y+r.clientTop}const d=i&&!p&&!o?Ap(i,a):jt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-a.scrollTop*c.y+f.y+d.y}}function Zg(e){return Array.from(e.getClientRects())}function Jg(e){const t=Et(e),n=bi(e),r=e.ownerDocument.body,l=Ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Si(e);const s=-n.scrollTop;return dt(r).direction==="rtl"&&(i+=Ze(t.clientWidth,r.clientWidth)-l),{width:l,height:o,x:i,y:s}}const Oc=25;function qg(e,t){const n=et(e),r=Et(e),l=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,a=0;if(l){o=l.width,i=l.height;const f=wi();(!f||f&&t==="fixed")&&(s=l.offsetLeft,a=l.offsetTop)}const c=Si(r);if(c<=0){const f=r.ownerDocument,p=f.body,d=getComputedStyle(p),y=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,x=Math.abs(r.clientWidth-p.clientWidth-y);x<=Oc&&(o-=x)}else c<=Oc&&(o+=c);return{width:o,height:i,x:s,y:a}}function ev(e,t){const n=$n(e,!0,t==="fixed"),r=n.top+e.clientTop,l=n.left+e.clientLeft,o=Tt(e)?hr(e):jt(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,a=l*o.x,c=r*o.y;return{width:i,height:s,x:a,y:c}}function Dc(e,t,n){let r;if(t==="viewport")r=qg(e,n);else if(t==="document")r=Jg(Et(e));else if(Se(t))r=ev(t,n);else{const l=Lp(e);r={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return $o(r)}function Ip(e,t){const n=Gt(e);return n===t||!Se(n)||Ft(n)?!1:dt(n).position==="fixed"||Ip(n,t)}function tv(e,t){const n=t.get(e);if(n)return n;let r=mn(e,[],!1).filter(s=>Se(s)&&Tr(s)!=="body"),l=null;const o=dt(e).position==="fixed";let i=o?Gt(e):e;for(;Se(i)&&!Ft(i);){const s=dt(i),a=uu(i);!a&&s.position==="fixed"&&(l=null),(o?!a&&!l:!a&&s.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||El(i)&&!a&&Ip(e,i))?r=r.filter(f=>f!==i):l=s,i=Gt(i)}return t.set(e,r),r}function nv(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e;const i=[...n==="clippingAncestors"?xi(t)?[]:tv(t,this._c):[].concat(n),r],s=Dc(t,i[0],l);let a=s.top,c=s.right,f=s.bottom,p=s.left;for(let d=1;d<i.length;d++){const y=Dc(t,i[d],l);a=Ze(y.top,a),c=kr(y.right,c),f=kr(y.bottom,f),p=Ze(y.left,p)}return{width:c-p,height:f-a,x:p,y:a}}function rv(e){const{width:t,height:n}=_p(e);return{width:t,height:n}}function lv(e,t,n){const r=Tt(t),l=Et(t),o=n==="fixed",i=$n(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const a=jt(0);function c(){a.x=Si(l)}if(r||!r&&!o)if((Tr(t)!=="body"||El(l))&&(s=bi(t)),r){const y=$n(t,!0,o,t);a.x=y.x+t.clientLeft,a.y=y.y+t.clientTop}else l&&c();o&&!r&&l&&c();const f=l&&!r&&!o?Ap(l,s):jt(0),p=i.left+s.scrollLeft-a.x-f.x,d=i.top+s.scrollTop-a.y-f.y;return{x:p,y:d,width:i.width,height:i.height}}function ls(e){return dt(e).position==="static"}function Mc(e,t){if(!Tt(e)||dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Et(e)===n&&(n=n.ownerDocument.body),n}function Op(e,t){const n=et(e);if(xi(e))return n;if(!Tt(e)){let l=Gt(e);for(;l&&!Ft(l);){if(Se(l)&&!ls(l))return l;l=Gt(l)}return n}let r=Mc(e,t);for(;r&&Jy(r)&&ls(r);)r=Mc(r,t);return r&&Ft(r)&&ls(r)&&!uu(r)?n:r||tg(e)||n}const ov=async function(e){const t=this.getOffsetParent||Op,n=this.getDimensions,r=await n(e.floating);return{reference:lv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iv(e){return dt(e).direction==="rtl"}const sv={convertOffsetParentRelativeRectToViewportRelativeRect:Xg,getDocumentElement:Et,getClippingRect:nv,getOffsetParent:Op,getElementRects:ov,getClientRects:Zg,getDimensions:rv,getScale:hr,isElement:Se,isRTL:iv};function Dp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function av(e,t){let n=null,r;const l=Et(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),o();const c=e.getBoundingClientRect(),{left:f,top:p,width:d,height:y}=c;if(s||t(),!d||!y)return;const x=Gl(p),w=Gl(l.clientWidth-(f+d)),k=Gl(l.clientHeight-(p+y)),h=Gl(f),g={rootMargin:-x+"px "+-w+"px "+-k+"px "+-h+"px",threshold:Ze(0,kr(1,a))||1};let v=!0;function C(j){const S=j[0].intersectionRatio;if(S!==a){if(!v)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Dp(c,e.getBoundingClientRect())&&i(),v=!1}try{n=new IntersectionObserver(C,{...g,root:l.ownerDocument})}catch{n=new IntersectionObserver(C,g)}n.observe(e)}return i(!0),o}function Wo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=cu(e),f=l||o?[...c?mn(c):[],...t?mn(t):[]]:[];f.forEach(h=>{l&&h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});const p=c&&s?av(c,n):null;let d=-1,y=null;i&&(y=new ResizeObserver(h=>{let[m]=h;m&&m.target===c&&y&&t&&(y.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=y)==null||g.observe(t)})),n()}),c&&!a&&y.observe(c),t&&y.observe(t));let x,w=a?$n(e):null;a&&k();function k(){const h=$n(e);w&&!Dp(w,h)&&n(),w=h,x=requestAnimationFrame(k)}return n(),()=>{var h;f.forEach(m=>{l&&m.removeEventListener("scroll",n),o&&m.removeEventListener("resize",n)}),p==null||p(),(h=y)==null||h.disconnect(),y=null,a&&cancelAnimationFrame(x)}}const uv=Hg,cv=Ug,dv=Vg,fv=Gg,pv=(e,t,n)=>{const r=new Map,l={platform:sv,...n},o={...l.platform,_c:r};return Fg(e,t,{...l,platform:o})};var mv=typeof document<"u",hv=function(){},co=mv?b.useLayoutEffect:hv;function Bo(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,l;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(!Bo(e[r],t[r]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,l[r]))return!1;for(r=n;r--!==0;){const o=l[r];if(!(o==="_owner"&&e.$$typeof)&&!Bo(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Mp(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kc(e,t){const n=Mp(e);return Math.round(t*n)/n}function os(e){const t=b.useRef(e);return co(()=>{t.current=e}),t}function yv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[f,p]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,y]=b.useState(r);Bo(d,r)||y(r);const[x,w]=b.useState(null),[k,h]=b.useState(null),m=b.useCallback(T=>{T!==j.current&&(j.current=T,w(T))},[]),g=b.useCallback(T=>{T!==S.current&&(S.current=T,h(T))},[]),v=o||x,C=i||k,j=b.useRef(null),S=b.useRef(null),R=b.useRef(f),F=a!=null,N=os(a),V=os(l),W=os(c),P=b.useCallback(()=>{if(!j.current||!S.current)return;const T={placement:t,strategy:n,middleware:d};V.current&&(T.platform=V.current),pv(j.current,S.current,T).then(A=>{const _={...A,isPositioned:W.current!==!1};M.current&&!Bo(R.current,_)&&(R.current=_,gi.flushSync(()=>{p(_)}))})},[d,t,n,V,W]);co(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[c]);const M=b.useRef(!1);co(()=>(M.current=!0,()=>{M.current=!1}),[]),co(()=>{if(v&&(j.current=v),C&&(S.current=C),v&&C){if(N.current)return N.current(v,C,P);P()}},[v,C,P,N,F]);const Z=b.useMemo(()=>({reference:j,floating:S,setReference:m,setFloating:g}),[m,g]),K=b.useMemo(()=>({reference:v,floating:C}),[v,C]),Y=b.useMemo(()=>{const T={position:n,left:0,top:0};if(!K.floating)return T;const A=Kc(K.floating,f.x),_=Kc(K.floating,f.y);return s?{...T,transform:"translate("+A+"px, "+_+"px)",...Mp(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:_}},[n,s,K.floating,f.x,f.y]);return b.useMemo(()=>({...f,update:P,refs:Z,elements:K,floatingStyles:Y}),[f,P,Z,K,Y])}const Ho=(e,t)=>{const n=uv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uo=(e,t)=>{const n=cv(e);return{name:n.name,fn:n.fn,options:[e,t]}},Go=(e,t)=>{const n=dv(e);return{name:n.name,fn:n.fn,options:[e,t]}},da=(e,t)=>{const n=fv(e);return{name:n.name,fn:n.fn,options:[e,t]}},gv="data-floating-ui-focusable",zc="active",$c="selected",vv={...fd};let Fc=!1,xv=0;const Vc=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xv++;function wv(){const[e,t]=b.useState(()=>Fc?Vc():void 0);return In(()=>{e==null&&t(Vc())},[]),b.useEffect(()=>{Fc=!0},[]),e}const bv=vv.useId,Kp=bv||wv;function Sv(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(l=>l(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 kv=b.createContext(null),Cv=b.createContext(null),jv=()=>{var e;return((e=b.useContext(kv))==null?void 0:e.id)||null},zp=()=>b.useContext(Cv);function du(e){return"data-floating-ui-"+e}const Ev={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},Wc=b.forwardRef(function(t,n){const[r,l]=b.useState();In(()=>{Tg()&&l("button")},[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[du("focus-guard")]:"",style:Ev};return u.jsx("span",{...t,...o})}),Tv={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$p=b.createContext(null),Bc=du("portal");function Rv(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Kp(),l=Nv(),[o,i]=b.useState(null),s=b.useRef(null);return In(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),In(()=>{if(!r||s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(Bc,""),a.appendChild(c),s.current=c,i(c)},[t,r]),In(()=>{if(n===null||!r||s.current)return;let a=n||(l==null?void 0:l.portalNode);a&&!au(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const f=document.createElement("div");f.id=r,f.setAttribute(Bc,""),a=c||a,a.appendChild(f),s.current=f,i(f)},[t,n,r,l]),o}function Qo(e){const{children:t,id:n,root:r,preserveTabOrder:l=!0}=e,o=Rv({id:n,root:r}),[i,s]=b.useState(null),a=b.useRef(null),c=b.useRef(null),f=b.useRef(null),p=b.useRef(null),d=i==null?void 0:i.modal,y=i==null?void 0:i.open,x=!!i&&!i.modal&&i.open&&l&&!!(r||o);return b.useEffect(()=>{if(!o||!l||d)return;function w(k){o&&rs(k)&&(k.type==="focusin"?Ac:Kg)(o)}return o.addEventListener("focusin",w,!0),o.addEventListener("focusout",w,!0),()=>{o.removeEventListener("focusin",w,!0),o.removeEventListener("focusout",w,!0)}},[o,l,d]),b.useEffect(()=>{o&&(y||Ac(o))},[y,o]),u.jsxs($p.Provider,{value:b.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:p,portalNode:o,setFocusManagerState:s}),[l,o]),children:[x&&o&&u.jsx(Wc,{"data-type":"outside",ref:a,onFocus:w=>{if(rs(w,o)){var k;(k=f.current)==null||k.focus()}else{const h=i?i.domReference:null,m=Mg(h);m==null||m.focus()}}}),x&&o&&u.jsx("span",{"aria-owns":o.id,style:Tv}),o&&gi.createPortal(t,o),x&&o&&u.jsx(Wc,{"data-type":"outside",ref:c,onFocus:w=>{if(rs(w,o)){var k;(k=p.current)==null||k.focus()}else{const h=i?i.domReference:null,m=Dg(h);m==null||m.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,w.nativeEvent,"focus-out"))}}})]})}const Nv=()=>b.useContext($p),Pv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},_v={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Hc=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 Yo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:l,dataRef:o}=e,{enabled:i=!0,escapeKey:s=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:d=!1,bubbles:y,capture:x}=t,w=zp(),k=Qn(typeof a=="function"?a:()=>!1),h=typeof a=="function"?k:a,m=b.useRef(!1),{escapeKey:g,outsidePress:v}=Hc(y),{escapeKey:C,outsidePress:j}=Hc(x),S=b.useRef(!1),R=Qn(M=>{var Z;if(!n||!i||!s||M.key!=="Escape"||S.current)return;const K=(Z=o.current.floatingContext)==null?void 0:Z.nodeId,Y=w?uo(w.nodesRef.current,K):[];if(!g&&(M.stopPropagation(),Y.length>0)){let T=!0;if(Y.forEach(A=>{var _;if((_=A.context)!=null&&_.open&&!A.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}r(!1,Pg(M)?M.nativeEvent:M,"escape-key")}),F=Qn(M=>{var Z;const K=()=>{var Y;R(M),(Y=Fr(M))==null||Y.removeEventListener("keydown",K)};(Z=Fr(M))==null||Z.addEventListener("keydown",K)}),N=Qn(M=>{var Z;const K=o.current.insideReactTree;o.current.insideReactTree=!1;const Y=m.current;if(m.current=!1,c==="click"&&Y||K||typeof h=="function"&&!h(M))return;const T=Fr(M),A="["+du("inert")+"]",_=xl(l.floating).querySelectorAll(A);let H=Se(T)?T:null;for(;H&&!Ft(H);){const ee=Gt(H);if(Ft(ee)||!Se(ee))break;H=ee}if(_.length&&Se(T)&&!Ng(T)&&!ca(T,l.floating)&&Array.from(_).every(ee=>!ca(H,ee)))return;if(Tt(T)&&P){const ee=Ft(T),we=dt(T),Be=/auto|scroll/,Wn=ee||Be.test(we.overflowX),Bn=ee||Be.test(we.overflowY),Rr=Wn&&T.clientWidth>0&&T.scrollWidth>T.clientWidth,Yt=Bn&&T.clientHeight>0&&T.scrollHeight>T.clientHeight,bn=we.direction==="rtl",Xt=Yt&&(bn?M.offsetX<=T.offsetWidth-T.clientWidth:M.offsetX>T.clientWidth),Sn=Rr&&M.offsetY>T.clientHeight;if(Xt||Sn)return}const re=(Z=o.current.floatingContext)==null?void 0:Z.nodeId,fe=w&&uo(w.nodesRef.current,re).some(ee=>{var we;return ns(M,(we=ee.context)==null?void 0:we.elements.floating)});if(ns(M,l.floating)||ns(M,l.domReference)||fe)return;const ge=w?uo(w.nodesRef.current,re):[];if(ge.length>0){let ee=!0;if(ge.forEach(we=>{var Be;if((Be=we.context)!=null&&Be.open&&!we.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,M,"outside-press")}),V=Qn(M=>{var Z;const K=()=>{var Y;N(M),(Y=Fr(M))==null||Y.removeEventListener(c,K)};(Z=Fr(M))==null||Z.addEventListener(c,K)});b.useEffect(()=>{if(!n||!i)return;o.current.__escapeKeyBubbles=g,o.current.__outsidePressBubbles=v;let M=-1;function Z(_){r(!1,_,"ancestor-scroll")}function K(){window.clearTimeout(M),S.current=!0}function Y(){M=window.setTimeout(()=>{S.current=!1},wi()?5:0)}const T=xl(l.floating);s&&(T.addEventListener("keydown",C?F:R,C),T.addEventListener("compositionstart",K),T.addEventListener("compositionend",Y)),h&&T.addEventListener(c,j?V:N,j);let A=[];return d&&(Se(l.domReference)&&(A=mn(l.domReference)),Se(l.floating)&&(A=A.concat(mn(l.floating))),!Se(l.reference)&&l.reference&&l.reference.contextElement&&(A=A.concat(mn(l.reference.contextElement)))),A=A.filter(_=>{var H;return _!==((H=T.defaultView)==null?void 0:H.visualViewport)}),A.forEach(_=>{_.addEventListener("scroll",Z,{passive:!0})}),()=>{s&&(T.removeEventListener("keydown",C?F:R,C),T.removeEventListener("compositionstart",K),T.removeEventListener("compositionend",Y)),h&&T.removeEventListener(c,j?V:N,j),A.forEach(_=>{_.removeEventListener("scroll",Z)}),window.clearTimeout(M)}},[o,l,s,h,c,n,r,d,i,g,v,R,C,F,N,j,V]),b.useEffect(()=>{o.current.insideReactTree=!1},[o,h,c]);const W=b.useMemo(()=>({onKeyDown:R,...f&&{[Pv[p]]:M=>{r(!1,M.nativeEvent,"reference-press")},...p!=="click"&&{onClick(M){r(!1,M.nativeEvent,"reference-press")}}}}),[R,r,f,p]),P=b.useMemo(()=>{function M(Z){Z.button===0&&(m.current=!0)}return{onKeyDown:R,onMouseDown:M,onMouseUp:M,[_v[c]]:()=>{o.current.insideReactTree=!0}}},[R,c,o]);return b.useMemo(()=>i?{reference:W,floating:P}:{},[i,W,P])}function Lv(e){const{open:t=!1,onOpenChange:n,elements:r}=e,l=Kp(),o=b.useRef({}),[i]=b.useState(()=>Sv()),s=jv()!=null,[a,c]=b.useState(r.reference),f=Qn((y,x,w)=>{o.current.openEvent=y?x:void 0,i.emit("openchange",{open:y,event:x,reason:w,nested:s}),n==null||n(y,x,w)}),p=b.useMemo(()=>({setPositionReference:c}),[]),d=b.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return b.useMemo(()=>({dataRef:o,open:t,onOpenChange:f,elements:d,events:i,floatingId:l,refs:p}),[t,f,d,i,l,p])}function Xo(e){e===void 0&&(e={});const{nodeId:t}=e,n=Lv({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,l=r.elements,[o,i]=b.useState(null),[s,a]=b.useState(null),f=(l==null?void 0:l.domReference)||o,p=b.useRef(null),d=zp();In(()=>{f&&(p.current=f)},[f]);const y=yv({...e,elements:{...l,...s&&{reference:s}}}),x=b.useCallback(g=>{const v=Se(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),getClientRects:()=>g.getClientRects(),contextElement:g}:g;a(v),y.refs.setReference(v)},[y.refs]),w=b.useCallback(g=>{(Se(g)||g===null)&&(p.current=g,i(g)),(Se(y.refs.reference.current)||y.refs.reference.current===null||g!==null&&!Se(g))&&y.refs.setReference(g)},[y.refs]),k=b.useMemo(()=>({...y.refs,setReference:w,setPositionReference:x,domReference:p}),[y.refs,w,x]),h=b.useMemo(()=>({...y.elements,domReference:f}),[y.elements,f]),m=b.useMemo(()=>({...y,...r,refs:k,elements:h,nodeId:t}),[y,k,h,t,r]);return In(()=>{r.dataRef.current.floatingContext=m;const g=d==null?void 0:d.nodesRef.current.find(v=>v.id===t);g&&(g.context=m)}),b.useMemo(()=>({...y,context:m,refs:k,elements:h}),[y,k,h,m])}function is(e,t,n){const r=new Map,l=n==="item";let o=e;if(l&&e){const{[zc]:i,[$c]:s,...a}=e;o=a}return{...n==="floating"&&{tabIndex:-1,[gv]:""},...o,...t.map(i=>{const s=i?i[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((i,s)=>(s&&Object.entries(s).forEach(a=>{let[c,f]=a;if(!(l&&[zc,$c].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var p;(p=r.get(c))==null||p.push(f),i[c]=function(){for(var d,y=arguments.length,x=new Array(y),w=0;w<y;w++)x[w]=arguments[w];return(d=r.get(c))==null?void 0:d.map(k=>k(...x)).find(k=>k!==void 0)}}}else i[c]=f}),i),{})}}function Zo(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),l=b.useCallback(s=>is(s,e,"reference"),t),o=b.useCallback(s=>is(s,e,"floating"),n),i=b.useCallback(s=>is(s,e,"item"),r);return b.useMemo(()=>({getReferenceProps:l,getFloatingProps:o,getItemProps:i}),[l,o,i])}const Jo={"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:null,valueType:"enum"},"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 Av(){const e={};for(const[t,n]of Object.entries(Jo))if(n.valueType==="enum"&&n.enumAlts){const r=n.propertyKey??t.replace(/-$/g,"");for(const l of n.enumAlts)e[l]||(e[l]={alternatives:n.enumAlts,propertyKey:r})}return e}function Iv(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(Jo)){if(!r.addable)continue;const l=r.propertyKey??n.replace(/-$/g,"");if(t.has(l))continue;t.add(l);const o=l.replace(/-/g," ").replace(/\b\w/g,s=>s.toUpperCase()),i=r.enumAlts?r.enumAlts.slice(0,2).join("/")+(r.enumAlts.length>2?"/…":""):`${n}*`;e[r.category].push({name:o,prefixHint:i,prefix:n})}return e}const Ov=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Dv=["50","100","200","300","400","500","600","700","800","900","950"];function fa({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:l,onHover:o,onLeave:i,onClick:s,onRemove:a,onRemoveHover:c}){return u.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||i()},children:[u.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[u.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),a&&u.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:a,children:u.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})}),["black","white","transparent"].map(f=>n[f]!==void 0?u.jsx(Uc,{prefix:e,colorName:f,colorValue:n[f],isCurrent:f===t,isLocked:l===`${e}${f}`,locked:r,onHover:o,onClick:s},f):null)]}),Ov.map(f=>{const p=n[f];return!p||typeof p!="object"?null:u.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[u.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:f}),Dv.map(d=>p[d]!==void 0?u.jsx(Uc,{prefix:e,colorName:`${f}-${d}`,colorValue:p[d],isCurrent:`${f}-${d}`===t,isLocked:l===`${e}${f}-${d}`,locked:r,onHover:o,onClick:s},`${f}-${d}`):null)]},f)})]})}function Uc({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:l,locked:o,onHover:i,onClick:s}){const a=`${e}${t}`,c=l?"outline outline-2 outline-offset-2 outline-bv-teal border-transparent":r?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":o?"border-transparent":"border-transparent hover:border-bv-text hover:scale-110 hover:z-10",f=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return u.jsx("div",{title:a,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:f,onMouseEnter:()=>{o||i(a)},onClick:p=>{p.stopPropagation(),s(a)}})}function ki({onClose:e,children:t,...n}){const r=b.useRef(null);return b.useEffect(()=>{var l;(l=r.current)==null||l.focus()},[]),u.jsx("div",{ref:r,tabIndex:-1,onBlur:l=>{var o;(o=r.current)!=null&&o.contains(l.relatedTarget)||e()},onKeyDown:l=>{l.code==="Escape"&&e()},...n,children:t})}const Mv=4,Kv=10;function Un({values:e,currentValue:t,lockedValue:n,locked:r,ghost:l,onStart:o,onHover:i,onLeave:s,onClick:a,onRemove:c,onRemoveHover:f}){const[p,d]=b.useState(!1),[y,x]=b.useState(null),w=b.useRef(null),k=b.useRef(null),h=b.useRef(null),m=n!==null&&e.includes(n),g=y!==null?e[y]:m?n:t;b.useEffect(()=>{var N,V;p&&h.current&&((V=(N=h.current).scrollIntoView)==null||V.call(N,{block:"nearest"}))},[p]);const v=r&&!m;function C(N){if(v)return;o==null||o();const V=m?n:t,W=e.indexOf(V);w.current={startX:N.clientX,startIndex:W>=0?W:0,didScrub:!1},N.currentTarget.setPointerCapture(N.pointerId),N.preventDefault()}function j(N){const V=w.current;if(!V)return;const W=N.clientX-V.startX;if(!V.didScrub&&Math.abs(W)>Mv&&(V.didScrub=!0,d(!1)),V.didScrub){const P=Math.round(W/Kv),M=Math.max(0,Math.min(e.length-1,V.startIndex+P));x(M),i(e[M])}}function S(){const N=w.current;N&&(N.didScrub&&y!==null?a(e[y]):N.didScrub||d(V=>(V&&s(),!V)),x(null),w.current=null)}const R=y!==null,F=R?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":m?"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":v?"bg-bv-surface text-bv-text-mid":l?"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 u.jsxs("div",{ref:k,className:"relative inline-block",children:[u.jsxs("div",{className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${v?"cursor-default":"cursor-ew-resize"} ${F}`,onPointerDown:C,onPointerMove:j,onPointerUp:S,children:[!v&&u.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${R?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),g,!v&&u.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${R?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),p&&u.jsxs(ki,{className:"absolute z-50 top-full left-0 mt-0.5 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onMouseLeave:s,onClose:()=>{d(!1),s()},children:[c&&u.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:f,onClick:N=>{N.stopPropagation(),c(),d(!1)},children:[u.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:[u.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),u.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),u.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(N=>{const V=N===(n??t),W=V?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return u.jsx("div",{ref:V?h:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${W}`,onMouseEnter:()=>i(N),onClick:P=>{P.stopPropagation(),a(N),d(!1)},children:N},N)})]})]})}const zv={px:.0625};function ar(e){return isNaN(Number(e))?zv[e]??1/0:Number(e)}function ss(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((l,o)=>ar(l)-ar(o)).map(l=>`${e}${l}`):t==="fontSize"?["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"]:t==="fontWeight"?["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"]:t==="borderRadius"?["rounded-none","rounded-sm","rounded","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","rounded-full"]:t==="lineHeight"?["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"]:t==="letterSpacing"?["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"]:[]}const $v=4,Fv=10;function fu({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:l,axis:o="x",disabled:i,onHover:s,onLeave:a,onClick:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:y,onRemove:x,onRemoveHover:w}){const[k,h]=b.useState(!1),[m,g]=b.useState(null),[v,C]=b.useState(null),j=b.useRef(null),S=b.useRef(null),R=b.useRef(null),F=n!=null,N=n?t.indexOf(n):-1,V=v!==null?t[v]:null,W=V?l?l(V):V:r??e;b.useEffect(()=>{var H;if(!k){g(null);return}const _=(H=S.current)==null?void 0:H.getBoundingClientRect();_&&g({top:_.bottom+4,left:_.left+_.width/2})},[k]),b.useEffect(()=>{var _,H;k&&R.current&&((H=(_=R.current).scrollIntoView)==null||H.call(_,{block:"nearest"}))},[k]);function P(_){var re,fe;if(i)return;_.preventDefault(),_.stopPropagation();const H=N>=0?N:0;j.current={startX:_.clientX,startY:_.clientY,startIndex:H,didScrub:!1},(fe=(re=_.target).setPointerCapture)==null||fe.call(re,_.pointerId)}function M(_){const H=j.current;if(!H)return;const re=o==="y"?-(_.clientY-H.startY):_.clientX-H.startX;if(!H.didScrub&&Math.abs(re)>$v&&(H.didScrub=!0,h(!1),f==null||f()),H.didScrub){const fe=Math.round(re/Fv),ge=Math.max(0,Math.min(t.length-1,H.startIndex+fe));C(ge),s==null||s(t[ge])}}function Z(){const _=j.current;_&&(_.didScrub&&v!==null?(c==null||c(t[v]),C(null),j.current=null,p==null||p()):_.didScrub||(C(null),j.current=null,h(H=>H?(y==null||y(),a==null||a(),!1):(d==null||d(),!0))))}const K=v!==null,T=["bm-slot",F||K?"bm-has-val":"",K?"bm-scrubbing":""].filter(Boolean).join(" "),A=i?"default":o==="y"?"ns-resize":"ew-resize";return u.jsxs("span",{ref:S,className:T,style:{position:"relative",cursor:A},onPointerDown:P,onPointerMove:M,onPointerUp:Z,role:"button",tabIndex:i?-1:0,children:[W,k&&m&&gi.createPortal(u.jsxs(ki,{className:"bm-mini-dropdown",style:{position:"fixed",top:m.top,left:m.left,transform:"translateX(-50%)"},onClick:_=>_.stopPropagation(),onMouseLeave:()=>a==null?void 0:a(),onMouseDown:_=>_.stopPropagation(),onClose:()=>{h(!1),y==null||y(),a==null||a()},children:[x&&u.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",onMouseEnter:w,onClick:_=>{_.stopPropagation(),x(),h(!1),y==null||y()},children:[u.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:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(_=>{const H=_===n;return u.jsx("div",{ref:H?R:void 0,className:`bm-mini-dropdown-item${H?" bm-active":""}`,onMouseEnter:()=>s==null?void 0:s(_),onClick:re=>{re.stopPropagation(),c==null||c(_),h(!1),y==null||y()},children:_},_)})]}),document.body)]})}function Gc(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function Vv({value:e,placeholder:t,layer:n,frozen:r,scaleValues:l,axis:o,onClick:i,onValueChange:s,onValueHover:a,onValueLeave:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:y,onValueRemove:x,onValueRemoveHover:w}){const k=e!=null,h=k?Gc(e,n):null;if(l&&l.length>0)return u.jsx(fu,{placeholder:t,values:l,currentValue:e,displayValue:h,formatValue:g=>Gc(g,n),axis:o,disabled:r,onHover:a,onLeave:c,onClick:s,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:y,onRemove:x,onRemoveHover:w});const m=`bm-slot${k?" bm-has-val":""}`;return u.jsx("span",{className:m,onClick:r?void 0:g=>i==null?void 0:i(g.currentTarget),role:"button",tabIndex:r?-1:0,children:h??t})}const Wv={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},Bv={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"]},Hv={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function Uv({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:l,isHovered:o,frozen:i,onHoverChange:s,onSlotClick:a,onSlotChange:c,onSlotHover:f,onScrubStart:p,onScrubEnd:d,onSlotOpen:y,onSlotClose:x,onSlotRemove:w,onSlotRemoveHover:k,children:h}){const m=`bm-layer bm-${e}${o?" bm-hovered":""}`,[g,v]=b.useState(null),C=new Map(l.map(W=>[W.key,W])),j=(t==="shorthand"||t==="mixed")&&n,S=r&&r.length>0?u.jsx("span",{className:"bm-name bm-name-scrubber",children:u.jsx(fu,{placeholder:e,values:r,currentValue:j?n:null,displayValue:j?n:null,formatValue:W=>W,axis:"x",disabled:i,onHover:W=>f==null?void 0:f("shorthand",W),onLeave:()=>f==null?void 0:f("shorthand",null),onClick:W=>c==null?void 0:c("shorthand",W),onScrubStart:()=>{p==null||p()},onScrubEnd:d,onOpen:()=>{v("__shorthand__"),y==null||y()},onClose:()=>{v(null),x==null||x()},onRemove:w?()=>w("shorthand"):void 0,onRemoveHover:k?()=>k("shorthand"):void 0})}):j?u.jsx("span",{className:"bm-name",children:u.jsx("span",{className:"bm-val",onClick:W=>a==null?void 0:a("shorthand",W.currentTarget),children:n})}):u.jsx("span",{className:"bm-name",children:e}),F=(Bv[e]??[]).map(W=>{const M=(Wv[W]??[]).map(A=>C.get(A)).filter(A=>A!=null);if(M.length===0)return null;const Z=M.some(A=>A.value!=null),Y=`bm-slot-group bm-sg-${W}${Z?" bm-has-values":""}${g===W?" bm-sg-active":""}`,T=Hv[W];return u.jsx("div",{className:Y,children:M.map(A=>u.jsx(Vv,{slotKey:A.key,value:A.value,placeholder:A.placeholder,layer:e,isExpanded:o,frozen:i,scaleValues:A.scaleValues,axis:T,onClick:_=>a==null?void 0:a(A.key,_),onValueChange:c?_=>c(A.key,_):void 0,onValueHover:f?_=>f(A.key,_):void 0,onValueLeave:f?()=>f(A.key,null):void 0,onScrubStart:p,onScrubEnd:d,onOpen:()=>{v(W),y==null||y()},onClose:()=>{v(null),x==null||x()},onValueRemove:w?()=>w(A.key):void 0,onValueRemoveHover:k?()=>k(A.key):void 0},A.key))},W)}),N=W=>{W.stopPropagation(),i||s(!0)},V=W=>{const P=W.relatedTarget,M=W.currentTarget;P&&M.contains(P)||i||s(!1)};return u.jsxs("div",{className:m,onMouseOver:N,onMouseOut:V,"data-layer":e,children:[S,F,h]})}const Qc=["margin","outline","border","padding"];function Gv({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:l,onSlotRemove:o,onSlotRemoveHover:i,onEditStart:s}){const[a,c]=b.useState(null),[f,p]=b.useState(null),d=t||f!==null,y=new Map(e.map(g=>[g.layer,g])),x=(g,v)=>{d||c(v?g:null)},w=(g,v,C)=>{d||n==null||n(g,v,C)};let h=u.jsx("div",{className:"bm-content"});for(let g=Qc.length-1;g>=0;g--){const v=Qc[g],C=y.get(v);C&&(h=u.jsx(Uv,{layer:C.layer,classState:C.classState,shorthandValue:C.shorthandValue,shorthandScaleValues:C.shorthandScaleValues,slots:C.slots,isHovered:a===v||f===v,frozen:d,onHoverChange:j=>x(v,j),onSlotClick:(j,S)=>w(v,j,S),onSlotChange:r?(j,S)=>r(v,j,S):void 0,onSlotHover:l?(j,S)=>l(v,j,S):void 0,onSlotRemove:o?j=>o(v,j):void 0,onSlotRemoveHover:i?j=>i(v,j):void 0,onScrubStart:()=>{p(v),s==null||s()},onScrubEnd:()=>p(null),onSlotOpen:()=>{p(v),s==null||s()},onSlotClose:()=>p(null),children:h}))}const m=`bm-root${d?" bm-frozen":""}`;return u.jsx("div",{className:m,children:h})}const Qv={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"}},Yv=["y","t","r","b","x","l"];function Xv(e){const t=Yv.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 Zv(e,t){const n=Qv[e],r=Xv(e),l=t[n.shorthand]??null,o=l!=null?l===""?n.shorthand:`${n.shorthand}-${l}`:null,i=r.map(({key:d,placeholder:y})=>{let x;if(d==="color"){const h=e==="outline"?"outline-color":"border-color";x=h in t?h:void 0}else if(d==="style"){const h=e==="outline"?"outline-style":"border-style";x=h in t?h:void 0}else d==="offset"?x="outline-offset"in t?"outline-offset":void 0:x=n[d];const w=x?t[x]??null:null;let k;return(d==="color"||d==="style")&&w!=null?k=`${e==="outline"?"outline":"border"}-${w}`:k=w!=null&&x?`${x}-${w}`:null,{key:d,value:k,placeholder:y}}),s=o!=null,a=i.some(d=>(d.key==="x"||d.key==="y")&&d.value!=null),c=i.some(d=>(d.key==="t"||d.key==="r"||d.key==="b"||d.key==="l")&&d.value!=null),f=a||c;let p;return!s&&!f?p="none":s&&!f?p="shorthand":!s&&a&&!c?p="axis":s?p="mixed":p="individual",{layer:e,classState:p,shorthandValue:o,slots:i}}const pa=["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"],Fp=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],Jv=["solid","dashed","dotted","double","hidden","none"];function qv(e,t,n){var i,s,a;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return Jv.map(f=>`${c}-${f}`)}let r;e==="border"||e==="outline"?t==="offset"?r=(i=n==null?void 0:n.theme)!=null&&i.spacing?Object.keys(n.theme.spacing).sort((c,f)=>ar(c)-ar(f)):pa:r=(s=n==null?void 0:n.theme)!=null&&s.borderWidth?Object.keys(n.theme.borderWidth):Fp:r=(a=n==null?void 0:n.theme)!=null&&a.spacing?Object.keys(n.theme.spacing).sort((c,f)=>ar(c)-ar(f)):pa;const o={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 o?r.map(c=>c===""?o:`${o}-${c}`):[]}function Gn(e,t){const n={};for(const i of e){let s;i.color!==void 0?s=`${i.property}-color`:i.style!==void 0?s=`${i.property}-style`:i.side!==void 0?s=i.property.length<=2?i.property+i.side:`${i.property}-${i.side}`:s=i.property;const a=i.scale??i.color??i.style??i.align??i.size??i.value??"";n[s]=a}const r={margin:"m",padding:"p",border:"border",outline:"outline"},l={margin:!1,padding:!1,border:!0,outline:!1};return["margin","outline","border","padding"].map(i=>{var p,d;const s=Zv(i,n),a=s.slots.map(y=>{const x=qv(i,y.key,t);return x.length>0?{...y,scaleValues:x}:y}),f=(l[i]?(p=t==null?void 0:t.theme)!=null&&p.borderWidth?Object.keys(t.theme.borderWidth):Fp:(d=t==null?void 0:t.theme)!=null&&d.spacing?Object.keys(t.theme.spacing):pa).map(y=>y===""?r[i]:`${r[i]}-${y}`);return{...s,slots:a,shorthandScaleValues:f}})}const ex={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]},tx={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function as(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function nx({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:l,onSlotHover:o,onSlotRemove:i,onSlotRemoveHover:s,onScrubStart:a,onScrubEnd:c,onOpen:f,onClose:p}){const[d,y]=ex[e.key],x=e.value!=null,w=`cm-slot${x?" cm-has-val":""}`,k=e.key==="all"?"cm-cell cm-cell-all cm-content":`cm-cell cm-cell-${e.key}`,h={gridRow:d,gridColumn:y},m=tx[e.key];return e.scaleValues&&e.scaleValues.length>0?u.jsx("div",{className:k,style:h,children:u.jsx(fu,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:x?as(e.value):null,formatValue:as,axis:m,disabled:t,onHover:g=>o(e.key,g),onLeave:()=>o(e.key,null),onClick:g=>l(e.key,g),onScrubStart:()=>a(e.key),onScrubEnd:c,onOpen:()=>f(e.key),onClose:p,onRemove:i?()=>i(e.key):void 0,onRemoveHover:s?()=>s(e.key):void 0})}):u.jsx("div",{className:k,style:h,children:u.jsx("span",{className:w,role:"button",tabIndex:t?-1:0,onClick:t?void 0:g=>r(e.key,g.currentTarget),children:x?as(e.value):e.placeholder})})}function rx({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:l,onSlotRemove:o,onSlotRemoveHover:i,onEditStart:s}){const[a,c]=b.useState(null),f=t||a!==null,p=new Map(e.slots.map(w=>[w.key,w])),d=p.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},y=["tl","t","tr","l","all","r","bl","b","br"],x=`cm-root${f?" cm-frozen":""}${a?" cm-active":""}`;return u.jsx("div",{className:x,children:u.jsx("div",{className:"cm-grid",children:y.map(w=>{const k=w==="all"?d:p.get(w)??{key:w,value:null,placeholder:w,scaleValues:void 0};return u.jsx(nx,{slot:k,frozen:f,isActive:a===w,onSlotClick:(h,m)=>n==null?void 0:n(h,m),onSlotChange:(h,m)=>r==null?void 0:r(h,m),onSlotHover:(h,m)=>l==null?void 0:l(h,m),onSlotRemove:o,onSlotRemoveHover:i,onScrubStart:h=>{c(h),s==null||s()},onScrubEnd:()=>c(null),onOpen:h=>{c(h),s==null||s()},onClose:()=>c(null)},w)})})})}function lx({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:l=0,children:o}){const[i,s]=b.useState(!1),[a,c]=b.useState(r),f=b.useRef(r),p=b.useRef(null);b.useEffect(()=>{f.current&&!r&&c(!1),f.current=r},[r]),b.useEffect(()=>{if(!i)return;function y(x){p.current&&!p.current.contains(x.target)&&s(!1)}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[i]);function d(y){n==null||n(y),s(!1)}return u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(y=>!y),children:[u.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${a?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),u.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),a&&l>0&&u.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:l}),t.length>0&&u.jsxs("div",{ref:p,className:"relative ml-auto",children:[u.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 ${i?"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:y=>{y.stopPropagation(),s(x=>!x)},children:u.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),i&&u.jsx(ki,{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:()=>s(!1),children:t.map(y=>u.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:()=>d(y.prefix),children:[y.name,u.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:y.prefixHint})]},y.prefix))})]})]}),u.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${a?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:r?u.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):u.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:o})})]})}const ox=[{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 ix({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:l,onSolidClick:o,solidColorName:i}){const s=t==="solid";return u.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[u.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:ox.map((a,c)=>{if(a==="center"){const p=s;return u.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-orange bg-bv-orange text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-orange hover:bg-bv-orange/9 hover:text-bv-orange"}`,title:"Solid color",onClick:o,children:"●"},"center")}const f=!s&&e===a.dir;return u.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
+ ${s?"opacity-35 hover:opacity-100":""}
46
+ ${f?"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(a.dir),onClick:()=>l(a.dir),children:a.arrow},a.dir)})}),u.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:s?i?u.jsx("span",{className:"text-bv-orange font-bold",children:i}):u.jsx("span",{className:"text-bv-muted italic",children:"none"}):u.jsxs("span",{children:["to-",u.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function sx(e,t){const r=[...e].sort((l,o)=>(l.position??0)-(o.position??0)).map(l=>l.position!=null?`${l.hex} ${l.position}%`:l.hex);return`linear-gradient(${t}, ${r.join(", ")})`}function us(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function ax({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:l,onRemove:o}){const i=b.useRef(!1),s=b.useCallback(p=>{p.preventDefault(),p.stopPropagation(),i.current=!1,r(e.id,p.clientX);const d=()=>{i.current=!0},y=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",y)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",y)},[e.id,r]),a=b.useCallback(p=>{p.stopPropagation(),i.current||l(e.id,p.currentTarget)},[e.id,l]),c=b.useCallback(p=>{p.stopPropagation(),o(e.id)},[e.id,o]),f=e.position??0;return u.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
47
+ hover:z-20
48
+ ${n?"z-25":""}`,style:{left:`${f}%`,transform:"translateX(-50%)",width:22,height:26,filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.2))"},onMouseDown:s,onClick:a,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[u.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:u.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&&u.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 ux({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:l,onBarClick:o,onStopRemove:i,selectedStopId:s}){const a=b.useRef(null),c=b.useRef(null),f=[...e].sort((x,w)=>(x.position??0)-(w.position??0)),p=b.useCallback((x,w)=>{const k=e.find(g=>g.id===x);if(!k)return;c.current={stopId:x,startX:w,startPos:k.position??0};const h=g=>{const v=c.current;if(!v||!a.current)return;const C=a.current.getBoundingClientRect(),S=(g.clientX-v.startX)/C.width*100,R=us(v.startPos+S);n(v.stopId,R)},m=g=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m);const v=c.current;if(v&&a.current){const C=a.current.getBoundingClientRect(),S=(g.clientX-v.startX)/C.width*100,R=us(v.startPos+S);r(v.stopId,R)}c.current=null};document.addEventListener("mousemove",h),document.addEventListener("mouseup",m)},[e,n,r]),d=b.useCallback(x=>{if(!a.current)return;const w=a.current.getBoundingClientRect(),k=(x.clientX-w.left)/w.width*100;o(us(k))},[o]),y=sx(f,t);return u.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[f.map((x,w)=>u.jsx(ax,{stop:x,isEndpoint:w===0||w===f.length-1,isSelected:x.id===s,onDragStart:p,onClick:l,onRemove:i},x.id)),u.jsx("div",{ref:a,className:"h-9 rounded-md cursor-pointer relative",style:{background:y,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:d,children:u.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 cx={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 dx(e){var Sn,Nr;const{direction:t,stops:n,mode:r,solidColorName:l,solidColorHex:o,onPreview:i,onPreviewBatch:s,onRevert:a,onStage:c}=e,[f,p]=b.useState(t),[d,y]=b.useState(n),[x,w]=b.useState(r),[k,h]=b.useState(l),[m,g]=b.useState(o),[v,C]=b.useState(null),[j,S]=b.useState(!1),[R,F]=b.useState(null),[N,V]=b.useState(null),W=b.useRef(n.length+1),P=b.useCallback(E=>{if(x==="gradient")i(`bg-gradient-to-${f}`,`bg-gradient-to-${E}`);else{const L=k??"slate-500",D=k?`bg-${k}`:"";s([{oldClass:D,newClass:`bg-gradient-to-${E}`},{oldClass:"",newClass:`from-${L}`},{oldClass:"",newClass:`to-${L}`}])}},[f,x,k,i,s]),M=b.useCallback(()=>{a()},[a]),Z=b.useCallback(E=>{if(p(E),w("gradient"),x==="gradient"&&d.length>=2){const L=`bg-gradient-to-${f}`,D=`bg-gradient-to-${E}`;c(L,D)}else{const L=k??"slate-500",D=m??_n(L,e.colors),z={id:"1",role:"from",colorName:L,hex:D,position:0},Q={id:"2",role:"to",colorName:L,hex:D,position:100};W.current=3,y([z,Q]);const te=k?`bg-${k}`:"";c(te,`bg-gradient-to-${E}`),c("",`from-${L}`),c("",`to-${L}`)}},[f,x,d,k,m,e.colors,c]),K=b.useCallback(()=>{w("solid"),S(!1),C(null),F(null),d.length>0&&!k&&(h(d[0].colorName),g(d[0].hex))},[d,k]),Y=b.useCallback((E,L)=>{y(z=>z.map(Q=>Q.id===E?{...Q,position:L}:Q));const D=d.find(z=>z.id===E);if(D){const z=D.position!=null?`${D.role}-${D.position}%`:"",Q=`${D.role}-${L}%`;i(z,Q)}},[d,i]),T=b.useCallback((E,L)=>{y(z=>z.map(Q=>Q.id===E?{...Q,position:L}:Q));const D=d.find(z=>z.id===E);if(D){const z=D.position!=null?`${D.role}-${D.position}%`:"",Q=`${D.role}-${L}%`;c(z,Q)}},[d,c]),A=b.useCallback((E,L)=>{v===E&&j?(C(null),S(!1),F(null),V(null)):(C(E),S(!0),F("stop"),V(L))},[v,j]),_=b.useCallback(E=>{const L=String(W.current++),D=[...d].sort((te,ie)=>(te.position??0)-(ie.position??0));let z=D[0];for(const te of D)(te.position??0)<=E&&(z=te);const Q={id:L,role:"via",colorName:(z==null?void 0:z.colorName)??"gray-500",hex:(z==null?void 0:z.hex)??"#6B7280",position:E};y(te=>[...te,Q]),C(L),S(!0),F("stop")},[d]),H=b.useCallback(E=>{const L=d.find(z=>z.id===E);if(!L)return;const D=d.filter(z=>z.id!==E);if(C(null),S(!1),F(null),V(null),D.length>=2)y(D),c(`${L.role}-${L.colorName}`,"");else if(D.length===1){const z=D[0];y([]),w("solid"),h(z.colorName),g(z.hex),c(`bg-gradient-to-${f}`,""),d.forEach(Q=>c(`${Q.role}-${Q.colorName}`,"")),c("",`bg-${z.colorName}`)}else y([]),w("none"),h(null),g(null),c(`bg-gradient-to-${f}`,""),d.forEach(z=>c(`${z.role}-${z.colorName}`,""))},[d,f,c]),re=b.useCallback(E=>{S(!0),F("solid"),C(null),V(E)},[]),fe=b.useCallback(()=>{i(k?`bg-${k}`:"","")},[k,i]),ge=b.useCallback(()=>{k&&c(`bg-${k}`,""),h(null),g(null),S(!1),F(null),V(null)},[k,c]),ee=b.useCallback(E=>{if(R==="stop"&&v){const L=d.find(D=>D.id===v);L&&i(`${L.role}-${L.colorName}`,E)}else R==="solid"&&i(`bg-${k}`,E)},[R,v,d,k,i]),we=b.useCallback(()=>{a()},[a]),Be=b.useCallback(E=>{if(R==="stop"&&v){const L=d.find(D=>D.id===v);if(L){const D=L.role+"-",z=E.startsWith(D)?E.slice(D.length):E;y(Q=>Q.map(te=>te.id===v?{...te,colorName:z,hex:_n(z,e.colors)}:te)),c(`${L.role}-${L.colorName}`,`${L.role}-${z}`),S(!1),C(null),F(null),V(null)}}else if(R==="solid"){const L="bg-",D=E.startsWith(L)?E.slice(L.length):E,z=k?`bg-${k}`:"";h(D),g(_n(D,e.colors)),c(z,`bg-${D}`),S(!1),F(null),V(null)}},[R,v,d,k,c,e.colors]),Wn=b.useCallback(()=>{S(!1),C(null),F(null),V(null),a()},[a]),Bn=R==="stop"&&v?(((Sn=d.find(E=>E.id===v))==null?void 0:Sn.role)??"from")+"-":"bg-",Rr=R==="stop"&&v?((Nr=d.find(E=>E.id===v))==null?void 0:Nr.colorName)??"":k??"",Yt=cx[f],Xt=!!(v?d.find(E=>E.id===v):null);return{direction:f,stops:d,mode:x,solidColorName:k,solidColorHex:m,selectedStopId:v,colorPickerOpen:j,editingTarget:R,anchorEl:N,colorPrefix:Bn,colorPickerCurrentValue:Rr,directionCSS:Yt,selectedStopIsRemovable:Xt,handleDirectionHover:P,handleDirectionLeave:M,handleDirectionClick:Z,handleSolidToggle:K,handleStopDrag:Y,handleStopDragEnd:T,handleStopClick:A,handleBarClick:_,handleStopRemove:H,handleSwatchClick:re,handleHoverRemoveSolid:fe,handleRemoveSolid:ge,handleColorHover:ee,handleColorLeave:we,handleColorClick:Be,handleCloseColorPicker:Wn}}function _n(e,t){if(typeof t[e]=="string")return t[e];const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),l=e.slice(n+1);if(t[r]&&typeof t[r][l]=="string")return t[r][l]}return"#888888"}function fx(e){const t=dx(e),n=t.mode==="solid",{refs:r,floatingStyles:l,context:o}=Xo({open:t.colorPickerOpen,onOpenChange:a=>{a||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[Ho(4),Go(),Uo({padding:8}),da({apply({availableHeight:a,elements:c}){Object.assign(c.floating.style,{maxHeight:`${a}px`})},padding:8})],whileElementsMounted:Wo}),i=Yo(o),{getFloatingProps:s}=Zo([i]);return b.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[u.jsx(ix,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?u.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:a=>t.handleSwatchClick(a.currentTarget),title:t.solidColorName?`bg-${t.solidColorName}`:"Click to pick color",children:!t.solidColorHex&&u.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:[u.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),u.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):u.jsx(ux,{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&&u.jsx(Qo,{children:u.jsxs("div",{ref:r.setFloating,style:{...l,zIndex:9999,overflowY:"auto"},...s(),children:[u.jsx(fa,{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&&u.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"})]})}),u.jsx("div",{className:"text-[10px] text-bv-muted italic",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 px(e,t,n){var g;const r=new Map;for(const v of e)r.set(v.fullClass,!0);if(n)for(const v of n)v.kind==="class-change"&&v.status==="staged"&&(v.originalClass&&r.delete(v.originalClass),v.newClass&&r.set(v.newClass,!0));const l=e.find(v=>v.property==="bg-gradient-to"),o=Array.from(r.keys()).find(v=>v.startsWith("bg-gradient-to-")),s=(o==null?void 0:o.replace("bg-gradient-to-",""))||(l==null?void 0:l.fullClass.slice(15))||"r",c=((g=Array.from(r.keys()).filter(v=>v.startsWith("bg-")&&!v.startsWith("bg-gradient-to-"))[0])==null?void 0:g.replace("bg-",""))??null,f=(c==null?void 0:c.split("/")[0])??null,p=f?_n(f,t):null,d=Array.from(r.keys()),y=d.filter(v=>v.startsWith("from-")),x=d.filter(v=>v.startsWith("via-")),w=d.filter(v=>v.startsWith("to-")),k=!!(o||y.length>0&&w.length>0),h=k?"gradient":"solid",m=[];if(k){let v=1;for(const C of y){const j=C.replace("from-",""),S=j.split("/")[0];m.push({id:String(v++),role:"from",colorName:j,hex:_n(S,t),position:null})}for(const C of x){const j=C.replace("via-",""),S=j.split("/")[0];m.push({id:String(v++),role:"via",colorName:j,hex:_n(S,t),position:null})}for(const C of w){const j=C.replace("to-",""),S=j.split("/")[0];m.push({id:String(v++),role:"to",colorName:j,hex:_n(S,t),position:null})}}return{direction:s,stops:m,mode:h,solidColorName:c,solidColorHex:p,colors:t}}const Yc=[{value:"flex-row",arrow:"→",title:"flex-row"},{value:"flex-col",arrow:"↓",title:"flex-col"},{value:"flex-row-reverse",arrow:"←",title:"flex-row-reverse"},{value:"flex-col-reverse",arrow:"↑",title:"flex-col-reverse"}];function mx({value:e,lockedValue:t,locked:n,onHover:r,onLeave:l,onClick:o}){const i=t!==null&&Yc.some(c=>c.value===t),s=n&&!i,a=i?t:e;return u.jsx("div",{className:"inline-flex rounded border border-bv-border overflow-hidden",onMouseLeave:l,children:Yc.map(c=>{const f=c.value===a;return u.jsx("button",{type:"button",title:c.title,disabled:s,className:`w-7 h-[22px] flex items-center justify-center text-xs transition-all duration-150 border-r border-bv-border last:border-r-0
49
+ ${f?"bg-bv-teal text-white":s?"bg-bv-bg text-bv-muted cursor-default":"bg-bv-bg text-bv-text-mid hover:bg-bv-teal/9 hover:text-bv-teal cursor-pointer"}`,onMouseEnter:()=>!s&&r(c.value),onClick:()=>!s&&o(c.value),children:c.arrow},c.value)})})}function Vp({options:e,currentValue:t,lockedValue:n,locked:r,axisArrow:l,placeholder:o,onHover:i,onLeave:s,onClick:a,onRemove:c,onRemoveHover:f,columns:p=4,diagramFlexDirection:d="row",renderGrid:y}){const[x,w]=b.useState(!1),{refs:k,floatingStyles:h,context:m}=Xo({open:x,onOpenChange:K=>{K||(w(!1),s())},strategy:"fixed",placement:"bottom-start",middleware:[Ho(4),Go(),Uo({padding:8})],whileElementsMounted:Wo}),g=Yo(m),{getReferenceProps:v,getFloatingProps:C}=Zo([g]),j=n!==null&&e.some(K=>K.value===n),S=r&&!j,R=!j&&(t===null||t===""),F=j?n:t??"",N=e.find(K=>K.value===F),V=(N==null?void 0:N.label)??(R?o??"—":F);function W(){w(!1),s()}function P(){S||w(K=>(K&&s(),!K))}const M="inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] font-mono border cursor-pointer select-none transition-all duration-150",Z=x?"border-bv-teal bg-bv-teal/9 text-bv-teal":j?"border-bv-border bg-bv-surface-hi text-bv-text hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal":S?"border-transparent bg-bv-surface text-bv-text-mid cursor-default":R?"border-dashed border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal":"border-bv-border bg-bv-bg text-bv-text-mid hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal";return u.jsxs("div",{className:"relative inline-block",children:[u.jsxs("div",{ref:k.setReference,className:`${M} ${Z}`,role:"button",tabIndex:S?-1:0,onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&P()},onClick:P,...v(),children:[u.jsx("span",{className:`text-[10px] transition-opacity duration-150 ${x?"opacity-100":"opacity-50"}`,children:l}),u.jsx("span",{children:V}),u.jsx("span",{className:`text-[8px] ml-0.5 transition-all duration-150 ${x?"opacity-70 rotate-180":"opacity-35"}`,children:"▾"})]}),x&&u.jsx(Qo,{children:u.jsx("div",{ref:k.setFloating,style:h,className:"z-[9999]",...C(),children:u.jsxs(ki,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:s,onClose:W,children:[c&&u.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:f,onMouseLeave:s,onClick:()=>{c(),W()},children:[u.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),y?y({activeValue:F,onSelect:K=>{a(K),W()},onHoverValue:i}):u.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 60px)`},children:e.map(K=>{const Y=K.value===F;return u.jsxs("div",{className:"flex flex-col items-center gap-0.5 cursor-pointer",onMouseEnter:()=>i(K.value),onClick:()=>{a(K.value),W()},children:[u.jsx("div",{className:`group w-[60px] h-[60px] rounded-[5px] border-[1.5px] p-1 flex overflow-hidden transition-all duration-150
50
+ ${Y?"border-bv-teal bg-bv-teal/9 shadow-[0_0_0_2px_rgba(0,132,139,0.18)]":"border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/9"}`,style:K.getContainerStyle(d),children:K.renderItems(d)}),u.jsx("span",{className:`text-[9px] font-mono text-center transition-colors duration-150
51
+ ${Y?"text-bv-teal font-semibold":"text-bv-text-mid"}`,children:K.label})]},K.value)})})]})})})]})}const qo="#00848B",hx="rgba(0,132,139,0.18)",yx="#F5532D",Wp="#4a4a4a",Bp="#333333",gx="#999999",vx="'Roboto Mono', 'Menlo', ui-monospace, monospace",xx={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:Wp,background:Bp,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"},wl={background:qo,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},ei={...wl,opacity:.9},Hp={flexShrink:0,background:yx,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},wx={...Hp,opacity:.38},Up={background:qo,opacity:.65,borderRadius:2,flexShrink:0,fontSize:5,color:"rgba(255,255,255,0.9)",lineHeight:1,overflow:"hidden",textAlign:"center",transition:"opacity 150ms ease-in-out"},bx={...Up,opacity:.9};function lt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:l,children:o}){const[i,s]=b.useState(!1),a=t||i,c={...xx,borderColor:a?qo:Wp,background:a?hx:Bp,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return u.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{s(!0),l==null||l()},onMouseLeave:()=>s(!1),onClick:r,children:[u.jsx("div",{style:c,children:o(a)}),u.jsx("span",{style:{fontSize:9,fontFamily:vx,color:a?qo:gx,fontWeight:a?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}function Sx({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const l=e.startsWith("column"),o=e;function i(d,y){const x=y?ei:wl;return l?{...x,width:"100%",height:d}:{...x,width:d,height:"100%"}}function s(d){const y=d?ei:wl;return l?{...y,flex:1,width:"100%"}:{...y,flex:1,height:"100%"}}function a(d,y){return{...y?wx:Hp,flex:d}}const c=d=>t===d,f=d=>()=>n==null?void 0:n(d),p=d=>()=>r==null?void 0:r(d);return u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[u.jsx(lt,{label:"start",isActive:c("justify-start"),onClick:f("justify-start"),onHover:p("justify-start"),containerStyle:{flexDirection:o,justifyContent:"flex-start",gap:2},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(10,d)}),u.jsx("div",{style:i(14,d)}),u.jsx("div",{style:i(8,d)})]})}),u.jsx(lt,{label:"center",isActive:c("justify-center"),onClick:f("justify-center"),onHover:p("justify-center"),containerStyle:{flexDirection:o,justifyContent:"center",gap:2},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(10,d)}),u.jsx("div",{style:i(14,d)}),u.jsx("div",{style:i(8,d)})]})}),u.jsx(lt,{label:"stretch",isActive:c("justify-stretch"),onClick:f("justify-stretch"),onHover:p("justify-stretch"),containerStyle:{flexDirection:o,gap:2},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(d)}),u.jsx("div",{style:s(d)}),u.jsx("div",{style:s(d)})]})}),u.jsx(lt,{label:"between",isActive:c("justify-between"),onClick:f("justify-between"),onHover:p("justify-between"),containerStyle:{flexDirection:o},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(12,d)}),u.jsx("div",{style:a(1,d)}),u.jsx("div",{style:i(12,d)})]})}),u.jsx(lt,{label:"around",isActive:c("justify-around"),onClick:f("justify-around"),onHover:p("justify-around"),containerStyle:{flexDirection:o},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:a(1,d)}),u.jsx("div",{style:i(12,d)}),u.jsx("div",{style:a(2,d)}),u.jsx("div",{style:i(12,d)}),u.jsx("div",{style:a(1,d)})]})}),u.jsx(lt,{label:"evenly",isActive:c("justify-evenly"),onClick:f("justify-evenly"),onHover:p("justify-evenly"),containerStyle:{flexDirection:o},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:a(1,d)}),u.jsx("div",{style:i(12,d)}),u.jsx("div",{style:a(1,d)}),u.jsx("div",{style:i(12,d)}),u.jsx("div",{style:a(1,d)})]})}),u.jsx(lt,{label:"end",isActive:c("justify-end"),onClick:f("justify-end"),onHover:p("justify-end"),containerStyle:{flexDirection:o,justifyContent:"flex-end",gap:2},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(10,d)}),u.jsx("div",{style:i(14,d)}),u.jsx("div",{style:i(8,d)})]})})]})}function kx({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const l=e.startsWith("column"),o=e;function i(d,y,x){const w=x?ei:wl;return l?{...w,width:y,height:d}:{...w,width:d,height:y}}function s(d,y){const x=y?ei:wl;return l?{...x,width:"100%",height:d}:{...x,width:d,height:"100%"}}function a(d,y,x,w){const k=w?bx:Up;return l?{...k,width:y,height:d,paddingLeft:x,paddingTop:0}:{...k,width:d,height:y,paddingTop:x,paddingLeft:0}}const c=d=>t===d,f=d=>()=>n==null?void 0:n(d),p=d=>()=>r==null?void 0:r(d);return u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:[u.jsx(lt,{label:"start",isActive:c("items-start"),onClick:f("items-start"),onHover:p("items-start"),containerStyle:{flexDirection:o,alignItems:"flex-start",gap:3},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(13,22,d)}),u.jsx("div",{style:i(15,42,d)}),u.jsx("div",{style:i(11,14,d)})]})}),u.jsx(lt,{label:"center",isActive:c("items-center"),onClick:f("items-center"),onHover:p("items-center"),containerStyle:{flexDirection:o,alignItems:"center",gap:3},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(13,22,d)}),u.jsx("div",{style:i(15,42,d)}),u.jsx("div",{style:i(11,14,d)})]})}),u.jsx(lt,{label:"baseline",isActive:c("items-baseline"),onClick:f("items-baseline"),onHover:p("items-baseline"),containerStyle:{flexDirection:o,alignItems:"baseline",gap:3},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:a(13,38,17,d),children:"t"}),u.jsx("div",{style:a(15,26,3,d),children:"t"}),u.jsx("div",{style:a(11,32,10,d),children:"t"})]})}),u.jsx(lt,{label:"stretch",isActive:c("items-stretch"),onClick:f("items-stretch"),onHover:p("items-stretch"),containerStyle:{flexDirection:o,alignItems:"stretch",gap:3},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:s(13,d)}),u.jsx("div",{style:s(15,d)}),u.jsx("div",{style:s(11,d)})]})}),u.jsx(lt,{label:"end",isActive:c("items-end"),onClick:f("items-end"),onHover:p("items-end"),containerStyle:{flexDirection:o,alignItems:"flex-end",gap:3},children:d=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:i(13,22,d)}),u.jsx("div",{style:i(15,42,d)}),u.jsx("div",{style:i(11,14,d)})]})})]})}const Vt="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",Cx="bg-bv-orange/10 rounded-[2px]";function Dt({isCol:e,main:t}){return u.jsx("div",{className:Vt,style:e?{height:t}:{width:t}})}function Cn({flex:e=1}){return u.jsx("div",{className:Cx,style:{flex:e}})}function Lt({isCol:e,w:t,h:n}){return u.jsx("div",{className:Vt,style:e?{width:n,height:t}:{width:t,height:n}})}function cs({isCol:e,w:t,h:n,pt:r}){return u.jsx("div",{className:`${Vt} 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 ds(e){return u.jsxs(u.Fragment,{children:[u.jsx(Dt,{isCol:e,main:10}),u.jsx(Dt,{isCol:e,main:14}),u.jsx(Dt,{isCol:e,main:8})]})}const jx=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>ds(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>ds(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`${Vt} flex-1`}),u.jsx("div",{className:`${Vt} flex-1`}),u.jsx("div",{className:`${Vt} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Dt,{isCol:t,main:12}),u.jsx(Cn,{}),u.jsx(Dt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Cn,{flex:1}),u.jsx(Dt,{isCol:t,main:12}),u.jsx(Cn,{flex:2}),u.jsx(Dt,{isCol:t,main:12}),u.jsx(Cn,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Cn,{}),u.jsx(Dt,{isCol:t,main:12}),u.jsx(Cn,{}),u.jsx(Dt,{isCol:t,main:12}),u.jsx(Cn,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>ds(e.startsWith("column"))}],Ex=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return u.jsxs(u.Fragment,{children:[u.jsx(Lt,{isCol:t,w:13,h:22}),u.jsx(Lt,{isCol:t,w:15,h:42}),u.jsx(Lt,{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 u.jsxs(u.Fragment,{children:[u.jsx(Lt,{isCol:t,w:13,h:22}),u.jsx(Lt,{isCol:t,w:15,h:42}),u.jsx(Lt,{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 u.jsxs(u.Fragment,{children:[u.jsx(cs,{isCol:t,w:13,h:38,pt:17}),u.jsx(cs,{isCol:t,w:15,h:26,pt:3}),u.jsx(cs,{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 u.jsxs(u.Fragment,{children:[u.jsx("div",{className:Vt,style:t?{height:13}:{width:13}}),u.jsx("div",{className:Vt,style:t?{height:15}:{width:15}}),u.jsx("div",{className:Vt,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 u.jsxs(u.Fragment,{children:[u.jsx(Lt,{isCol:t,w:13,h:22}),u.jsx(Lt,{isCol:t,w:15,h:42}),u.jsx(Lt,{isCol:t,w:11,h:14})]})}}],Tx={row:"→",column:"↓","row-reverse":"←","column-reverse":"↑"};function Rx({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:l,onLeave:o,onClick:i,onRemove:s,onRemoveHover:a}){return u.jsx(Vp,{options:jx,currentValue:e,lockedValue:t,locked:n,axisArrow:Tx[r]??"→",placeholder:"justify-content",diagramFlexDirection:r,columns:4,onHover:l,onLeave:o,onClick:i,onRemove:s,onRemoveHover:a,renderGrid:({activeValue:c,onSelect:f,onHoverValue:p})=>u.jsx(Sx,{flexDirection:r,activeValue:c,onSelect:f,onHover:p})})}const Nx={row:"↓",column:"→","row-reverse":"↓","column-reverse":"→"};function Px({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:l,onLeave:o,onClick:i,onRemove:s,onRemoveHover:a}){return u.jsx(Vp,{options:Ex,currentValue:e,lockedValue:t,locked:n,axisArrow:Nx[r]??"↓",placeholder:"align-items",diagramFlexDirection:r,columns:5,onHover:l,onLeave:o,onClick:i,onRemove:s,onRemoveHover:a,renderGrid:({activeValue:c,onSelect:f,onHoverValue:p})=>u.jsx(kx,{flexDirection:r,activeValue:c,onSelect:f,onHover:p})})}const Xc=[{value:"flex-nowrap",label:"⊣",title:"flex-nowrap"},{value:"flex-wrap",label:"↩",title:"flex-wrap"},{value:"flex-wrap-reverse",label:"↪",title:"flex-wrap-reverse"}];function _x({value:e,lockedValue:t,locked:n,onHover:r,onLeave:l,onClick:o}){const i=t!==null&&Xc.some(c=>c.value===t),s=n&&!i,a=i?t:e;return u.jsx("div",{className:"inline-flex rounded border border-bv-border overflow-hidden",onMouseLeave:l,children:Xc.map(c=>{const f=c.value===a;return u.jsx("button",{type:"button",title:c.title,disabled:s,className:`px-2 h-[22px] flex items-center justify-center text-[11px] font-mono transition-all duration-150 border-r border-bv-border last:border-r-0
52
+ ${f?"bg-bv-teal text-white":s?"bg-bv-bg text-bv-muted cursor-default":"bg-bv-bg text-bv-text-mid hover:bg-bv-teal/9 hover:text-bv-teal cursor-pointer"}`,onMouseEnter:()=>!s&&r(c.value),onClick:()=>!s&&o(c.value),children:c.label},c.value)})})}const Lx={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Borders & Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},Ax=["borders","sizing","typography","color","flexbox","effects","layout"];function Zc(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 Ix(e){return e.section==="spacing"||e.property==="border"&&!e.style&&!e.color||e.property==="rounded"||e.property==="bg"||e.property==="bg-gradient-to"||e.property==="from"||e.property==="via"||e.property==="to"}const Jc=["rounded-none","rounded-sm","rounded","rounded-md","rounded-lg","rounded-xl","rounded-2xl","rounded-3xl","rounded-full"];function Ox(e){return[`${e}-none`,`${e}-sm`,e,`${e}-md`,`${e}-lg`,`${e}-xl`,`${e}-2xl`,`${e}-3xl`,`${e}-full`]}function jn(e){const t=e.filter(i=>i.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 l=null;for(const i of t){const s=i.fullClass,a=n.find(c=>c.prefix.test(s));a?r.set(a.key,s):l=s}return{shorthandValue:l,shorthandScaleValues:Jc,slots:["all","t","r","b","l","tl","tr","br","bl"].map(i=>({key:i,value:i==="all"?l:r.get(i)??null,placeholder:i,scaleValues:i==="all"?Jc:Ox(`rounded-${i}`)}))}}const Jt=Av(),Gp=Iv(),Dx={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Gp.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function fo(e){const t=Dx[e];if(t)return{...t,stagingKey:e};const n=Object.entries(Jo).find(([l,o])=>(o.propertyKey??l.replace(/-$/g,""))===e&&o.addable);if(n){const[l,o]=n;return{scaleName:o.themeKey,valueType:o.valueType,enumAlts:o.enumAlts,stagingKey:e}}const r=Jo[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function Mx(e,t,n,r){const l=new Set(t.map(i=>i.fullClass)),o=new Set(t.map(i=>i.property));return e.filter(i=>{if(n.has(i.prefix)||r!=null&&r.has(i.prefix))return!1;const s=fo(i.prefix);if((s==null?void 0:s.valueType)==="enum"&&s.enumAlts)return!s.enumAlts.some(a=>l.has(a));if(s&&s.valueType!=="enum"){if(i.prefix==="text-size")return!t.some(a=>a.property==="text"&&a.scaleName==="fontSize");if(i.prefix==="text-color")return!t.some(a=>a.property==="text"&&a.color!==void 0)}return!o.has(i.prefix.replace(/-$/g,""))})}function Kx(e){const t=new Map;for(const n of e){const r=n.section??"unknown",l=t.get(r)||[];l.push(n),t.set(r,l)}return t}function zx({componentName:e,instanceCount:t,parsedClasses:n,tailwindConfig:r,patchManager:l}){var Sn,Nr;const[o,i]=b.useState(null),[s,a]=b.useState(new Map),[c,f]=b.useState(new Map),[p,d]=b.useState(null),[y,x]=b.useState(null),w=b.useRef(null),{refs:k,floatingStyles:h,context:m}=Xo({open:p!==null,onOpenChange:E=>{E||(d(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[Ho(4),Go(),Uo({padding:8}),da({apply({availableHeight:E,elements:L}){Object.assign(L.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:Wo}),g=Yo(m),{getFloatingProps:v}=Zo([g]);b.useEffect(()=>{p!=null&&p.anchorEl&&k.setReference(p.anchorEl)},[p==null?void 0:p.anchorEl]);const{refs:C,floatingStyles:j,context:S}=Xo({open:y!==null,onOpenChange:E=>{E||(x(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[Ho(4),Go(),Uo({padding:8}),da({apply({availableHeight:E,elements:L}){Object.assign(L.floating.style,{maxHeight:`${E}px`})},padding:8})],whileElementsMounted:Wo}),R=Yo(S),{getFloatingProps:F}=Zo([R]);b.useEffect(()=>{y!=null&&y.anchorEl&&C.setReference(y.anchorEl)},[y==null?void 0:y.anchorEl]);const[N,V]=b.useState(new Set),[W,P]=b.useState(!1),M=b.useRef(n.map(E=>E.fullClass).join(" ")),Z=n.map(E=>E.fullClass).join(" ");b.useEffect(()=>{M.current!==Z&&(M.current=Z,l.revertPreview(),a(new Map),f(new Map),d(null),x(null),V(new Set))});const K=e,Y=l.patches.filter(E=>E.status==="staged"),T=new Set(Y.filter(E=>E.originalClass==="").map(E=>E.property));function A(E,L){const D=Y.find(ie=>ie.property===E),z=(L==null?void 0:L.fullClass)??(D==null?void 0:D.originalClass)??"",Q=(D==null?void 0:D.newClass)??(L==null?void 0:L.fullClass)??"";return{originalClass:z,effectiveClass:Q,hasValue:Q!==""}}function _(E){return s.size===0?E:E.map(L=>{const D=s.get(`${L.layer}-shorthand`),z=L.slots.map(ie=>{const ve=s.get(`${L.layer}-${ie.key}`);return ve!==void 0?{...ie,value:ve}:ie}),Q=D??L.shorthandValue;let te=L.classState;return D!==void 0&&(te=z.some(ve=>ve.value!=null)?"mixed":"shorthand"),{...L,shorthandValue:Q,classState:te,slots:z}})}function H(E){if(c.size===0)return E;const L=c.get("all");return{...E,shorthandValue:L===void 0?E.shorthandValue:L,slots:E.slots.map(D=>{const z=c.get(D.key);return z===void 0?D:{...D,value:z}})}}const re=Kx(n);function fe(E,L){l.preview(E,L)}function ge(){l.revertPreview()}function ee(E,L,D){l.stage(K,E,L,D)}function we(E,L){const D=E||L,z=D.startsWith("bg-gradient-to-")?"bg-gradient-to-":D.startsWith("from-")?"from-":D.startsWith("via-")?"via-":D.startsWith("to-")?"to-":"bg-";ee(z,E,L)}function Be(E,L){l.revertPreview(),pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),E.color!==void 0&&L?(x(D=>(D==null?void 0:D.cls.fullClass)===E.fullClass?null:{cls:E,anchorEl:L}),i(null)):(x(null),i(E))}function Wn(E,L){l.preview(E.fullClass,L)}function Bn(E){l.revertPreview()}function Rr(E){V(L=>new Set(L).add(E))}function Yt(E,L){l.preview("",L)}function bn(E){l.revertPreview()}function Xt(E,L){const D=fo(E);l.stage(K,(D==null?void 0:D.stagingKey)??E,"",L),V(z=>{const Q=new Set(z);return Q.delete(E),Q})}return u.jsxs("div",{className:"divide-y divide-bv-border",children:[u.jsxs("div",{className:"px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>P(E=>!E),children:[u.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${W?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),u.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),u.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${W?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:u.jsxs("div",{className:"mt-3",children:[u.jsx(Gv,{layers:_(Gn(n,r)),onEditStart:()=>{pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),d(null)},onSlotClick:(E,L,D)=>{var ve;if(L!=="color"||!D){d(null);return}const z=Gn(n,r).find(Rt=>Rt.layer===E),Q=`${E}-color`,te=s.get(Q)??((ve=z==null?void 0:z.slots.find(Rt=>Rt.key==="color"))==null?void 0:ve.value)??"",ie=E==="outline"?"outline-":"border-";d(Rt=>(Rt==null?void 0:Rt.layer)===E?null:{layer:E,prefix:ie,currentClass:te,staged:!1,anchorEl:D})},onSlotHover:(E,L,D)=>{var z;if(D===null)l.revertPreview();else{const Q=`${E}-${L}`,te=Gn(n,r).find(ve=>ve.layer===E),ie=L==="shorthand"?s.get(Q)??(te==null?void 0:te.shorthandValue):s.get(Q)??((z=te==null?void 0:te.slots.find(ve=>ve.key===L))==null?void 0:z.value);l.preview(ie??"",D)}},onSlotChange:(E,L,D)=>{var ie;const z=`${E}-${L}`,Q=Gn(n,r).find(ve=>ve.layer===E),te=L==="shorthand"?s.get(z)??(Q==null?void 0:Q.shorthandValue):s.get(z)??((ie=Q==null?void 0:Q.slots.find(ve=>ve.key===L))==null?void 0:ie.value);ee(`${E}-${L}`,te??"",D),a(ve=>new Map(ve).set(z,D))},onSlotRemoveHover:(E,L)=>{var te;const D=`${E}-${L}`,z=Gn(n,r).find(ie=>ie.layer===E),Q=L==="shorthand"?s.get(D)??(z==null?void 0:z.shorthandValue):s.get(D)??((te=z==null?void 0:z.slots.find(ie=>ie.key===L))==null?void 0:te.value);Q&&l.preview(Q,"")},onSlotRemove:(E,L)=>{var te;const D=`${E}-${L}`,z=Gn(n,r).find(ie=>ie.layer===E),Q=L==="shorthand"?s.get(D)??(z==null?void 0:z.shorthandValue):s.get(D)??((te=z==null?void 0:z.slots.find(ie=>ie.key===L))==null?void 0:te.value);Q&&(ee(`${E}-${L}`,Q,""),a(ie=>{const ve=new Map(ie);return ve.delete(D),ve}))}}),p&&u.jsx(Qo,{children:u.jsx("div",{ref:k.setFloating,style:{...h,zIndex:9999,overflowY:"auto"},...v(),children:u.jsx(fa,{prefix:p.prefix,currentValue:p.currentClass.startsWith(p.prefix)?p.currentClass.slice(p.prefix.length):"",colors:(r==null?void 0:r.colors)||{},locked:!1,lockedValue:((Sn=Y.find(E=>E.property===p.prefix))==null?void 0:Sn.newClass)??null,onHover:E=>{w.current=E,l.preview(p.currentClass,E)},onLeave:()=>{p.staged&&w.current?(l.preview(w.current,p.currentClass),w.current=null):l.revertPreview()},onClick:E=>{const L=`${p.layer}-color`;ee(p.prefix,p.currentClass,E),a(D=>new Map(D).set(L,E)),d(D=>D?{...D,currentClass:E,staged:!0}:null)}})})})]})})]}),y&&u.jsx(Qo,{children:u.jsx("div",{ref:C.setFloating,style:{...j,zIndex:9999,overflowY:"auto"},...F(),children:u.jsx(fa,{prefix:Zc(y.cls),currentValue:y.cls.color??"",colors:(r==null?void 0:r.colors)||{},locked:!1,lockedValue:((Nr=Y.find(E=>E.property===y.cls.property))==null?void 0:Nr.newClass)??null,onHover:E=>fe(y.cls.fullClass,E),onLeave:ge,onClick:E=>ee(y.cls.property,y.cls.fullClass,E),onRemoveHover:()=>fe(y.cls.fullClass,""),onRemove:()=>{ee(y.cls.property,y.cls.fullClass,""),x(null)}})})}),Ax.map(E=>{const D=(re.get(E)||[]).filter(I=>!Ix(I)),z=Gp[E]||[],Q=new Set(["flex-display","flex-direction","justify-content","align-items","flex-wrap"]),te=E==="flexbox"&&n.some(I=>{const q=Jt[I.fullClass];return q&&Q.has(q.propertyKey??"")}),ie=new Set(["flex","flex-row","flex-wrap","justify-start","items-start"]),ve=te?z.filter(I=>!ie.has(I.prefix.replace(/-$/,""))):z,Rt=Mx(ve,D,N,T),Ci=z.filter(I=>N.has(I.prefix)).map(I=>I.prefix),ji=z.filter(I=>T.has(I.prefix.replace(/-$/g,""))).map(I=>I.prefix),Qp=E==="color"||E==="flexbox"&&te||E==="borders"?!1:D.length===0&&Ci.length===0&&ji.length===0,Yp=E==="borders"?jn(n).slots.filter(I=>I.value!=null).length+(jn(n).shorthandValue?1:0):D.length+Ci.length+ji.length;return u.jsxs(lx,{label:Lx[E]??E,availableProperties:Rt,onAddProperty:Rr,isEmpty:Qp,classCount:Yp,children:[E==="borders"&&u.jsx(rx,{state:H(jn(n)),onSlotHover:(I,q)=>{var ke;const J=jn(n),Ee=(I==="all"?c.get("all")??J.shorthandValue:c.get(I)??((ke=J.slots.find(Pr=>Pr.key===I))==null?void 0:ke.value)??null)??"";q===null?l.revertPreview():l.preview(Ee,q)},onSlotChange:(I,q)=>{var Ee;const J=jn(n),U=c.get(I)??(I==="all"?J.shorthandValue:(Ee=J.slots.find(ke=>ke.key===I))==null?void 0:Ee.value)??"";ee(`rounded-${I}`,U,q),f(ke=>new Map(ke).set(I,q))},onSlotRemove:I=>{var J;const q=c.get(I)??((J=jn(n).slots.find(U=>U.key===I))==null?void 0:J.value)??"";q&&(ee(`rounded-${I}`,q,""),f(U=>new Map(U).set(I,null)))},onSlotRemoveHover:I=>{var J;const q=c.get(I)??((J=jn(n).slots.find(U=>U.key===I))==null?void 0:J.value)??"";q&&l.preview(q,"")},onEditStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"})}),E==="color"&&u.jsx(fx,{...px(n,(r==null?void 0:r.colors)||{},Y.filter(I=>I.elementKey===K)),onPreview:fe,onPreviewBatch:I=>l.previewBatch(I),onRevert:ge,onStage:we}),E==="flexbox"&&te&&(()=>{const I=n;I.find(ae=>{const Te=Jt[ae.fullClass];return(Te==null?void 0:Te.propertyKey)==="flex-display"});const q=I.find(ae=>{const Te=Jt[ae.fullClass];return(Te==null?void 0:Te.propertyKey)==="flex-direction"}),J=I.find(ae=>{const Te=Jt[ae.fullClass];return(Te==null?void 0:Te.propertyKey)==="justify-content"}),U=I.find(ae=>{const Te=Jt[ae.fullClass];return(Te==null?void 0:Te.propertyKey)==="align-items"}),Ee=I.find(ae=>{const Te=Jt[ae.fullClass];return(Te==null?void 0:Te.propertyKey)==="flex-wrap"}),ke={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},Pr=(q==null?void 0:q.fullClass)??null,pu=Pr?ke[Pr]??"row":"row",_r=A("flex-direction",q),Lr=A("flex-wrap",Ee),Nt=A("justify-content",J),Pt=A("align-items",U);return u.jsxs("div",{className:"flex flex-wrap gap-1",children:[u.jsx(mx,{value:Pr,lockedValue:_r.effectiveClass!==_r.originalClass?_r.effectiveClass:null,locked:!1,onHover:ae=>fe(_r.effectiveClass,ae),onLeave:ge,onClick:ae=>ee("flex-direction",_r.originalClass,ae)}),u.jsx(_x,{value:(Ee==null?void 0:Ee.fullClass)??null,lockedValue:Lr.effectiveClass!==Lr.originalClass?Lr.effectiveClass:null,locked:!1,onHover:ae=>fe(Lr.effectiveClass,ae),onLeave:ge,onClick:ae=>ee("flex-wrap",Lr.originalClass,ae)}),u.jsx(Rx,{currentValue:(J==null?void 0:J.fullClass)??null,lockedValue:Nt.effectiveClass!==Nt.originalClass?Nt.effectiveClass:null,locked:!1,flexDirection:pu,onHover:ae=>fe(Nt.effectiveClass,ae),onLeave:ge,onClick:ae=>ee("justify-content",Nt.originalClass,ae),onRemove:Nt.hasValue?()=>ee("justify-content",Nt.originalClass,""):void 0,onRemoveHover:Nt.hasValue?()=>fe(Nt.effectiveClass,""):void 0}),u.jsx(Px,{currentValue:(U==null?void 0:U.fullClass)??null,lockedValue:Pt.effectiveClass!==Pt.originalClass?Pt.effectiveClass:null,locked:!1,flexDirection:pu,onHover:ae=>fe(Pt.effectiveClass,ae),onLeave:ge,onClick:ae=>ee("align-items",Pt.originalClass,ae),onRemove:Pt.hasValue?()=>ee("align-items",Pt.originalClass,""):void 0,onRemoveHover:Pt.hasValue?()=>fe(Pt.effectiveClass,""):void 0})]})})(),D.map(I=>{var q,J;if(te){const U=Jt[I.fullClass];if(U&&Q.has(U.propertyKey??""))return null}if(I.scaleName!==void 0){const U=ss(Zc(I),I.scaleName,r);if(U.length>0){const Ee=((q=Y.find(ke=>ke.property===I.property))==null?void 0:q.newClass)??null;return u.jsx(Un,{values:U,currentValue:I.fullClass,lockedValue:Ee,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ke=>Wn(I,ke),onLeave:()=>Bn(),onClick:ke=>ee(I.property,I.fullClass,ke),onRemoveHover:()=>l.preview(I.fullClass,""),onRemove:()=>ee(I.property,I.fullClass,"")},I.fullClass)}}if(I.scaleName===void 0&&I.color===void 0){const U=Jt[I.fullClass];if(U){const Ee=((J=Y.find(ke=>ke.property===U.propertyKey))==null?void 0:J.newClass)??null;return u.jsx(Un,{values:U.alternatives,currentValue:I.fullClass,lockedValue:Ee,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:ke=>Wn(I,ke),onLeave:()=>Bn(),onClick:ke=>ee(U.propertyKey,I.fullClass,ke),onRemoveHover:()=>l.preview(I.fullClass,""),onRemove:()=>ee(U.propertyKey,I.fullClass,"")},I.fullClass)}}return u.jsxs("div",{className:`group flex items-center gap-1 px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(o==null?void 0:o.fullClass)===I.fullClass||(y==null?void 0:y.cls.fullClass)===I.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:U=>Be(I,U.currentTarget),children:[I.fullClass,u.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:U=>{U.stopPropagation(),ee(I.property,I.fullClass,"")},onMouseEnter:U=>{U.stopPropagation(),l.preview(I.fullClass,"")},onMouseLeave:U=>{U.stopPropagation(),l.revertPreview()},children:u.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},I.fullClass)}),ji.map(I=>{const q=fo(I);if(!q)return null;if(q.valueType==="scalar"){const J=ss(I,q.scaleName,r);if(J.length===0)return null;const U=Y.find(Ee=>Ee.property===q.stagingKey);return u.jsx(Un,{values:J,currentValue:(U==null?void 0:U.newClass)??J[Math.floor(J.length/2)],lockedValue:(U==null?void 0:U.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:Ee=>Yt(I,Ee),onLeave:()=>bn(),onClick:Ee=>Xt(I,Ee)},`staged-${I}`)}if(q.valueType==="enum"&&q.enumAlts){const J=Y.find(U=>U.property===q.stagingKey);return u.jsx(Un,{values:q.enumAlts,currentValue:(J==null?void 0:J.newClass)??q.enumAlts[0],lockedValue:(J==null?void 0:J.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:U=>Yt(I,U),onLeave:()=>bn(),onClick:U=>Xt(I,U)},`staged-${I}`)}return null}),Ci.map(I=>{const q=fo(I);if(!q)return null;if(q.valueType==="scalar"){const J=ss(I,q.scaleName,r);if(J.length>0)return u.jsx(Un,{values:J,currentValue:J[Math.floor(J.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:U=>Yt(I,U),onLeave:()=>bn(),onClick:U=>Xt(I,U)},`pending-${I}`)}return q.valueType==="enum"&&q.enumAlts?u.jsx(Un,{values:q.enumAlts,currentValue:q.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:J=>Yt(I,J),onLeave:()=>bn(),onClick:J=>Xt(I,J)},`pending-${I}`):q.valueType==="color"?u.jsxs("div",{"data-testid":`pending-ghost-${I}`,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:J=>{x({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:J.currentTarget}),i(null)},children:[I==="text-color"?"text-":I,"color"]},`pending-${I}`):null})]},E)})]})}const $x=b.lazy(()=>jy(()=>import("./DesignMode-nOHHHxgv.js"),[]).then(e=>({default:e.DesignMode}))),Fx=new URLSearchParams(window.location.search),Vx=Fx.get("mode"),qc=[{id:"design",label:"Design"},{id:"message",label:"Message"}];function Wx(){return Vx==="design"?u.jsx(b.Suspense,{fallback:null,children:u.jsx($x,{})}):u.jsx(Bx,{})}function Bx(){const[e,t]=b.useState(!1),[n,r]=b.useState(null),[l,o]=b.useState(0),[i,s]=b.useState("design"),[a,c]=b.useState(!1),f=Zy();b.useEffect(()=>{const P=Gy(()=>{t(!0);try{const K=localStorage.getItem("tw-panel-container");K&&K!=="popover"&&pe("overlay",{type:"SWITCH_CONTAINER",container:K})}catch{}}),M=Qy(()=>t(!1)),Z=Uy(K=>{K.type==="ELEMENT_SELECTED"?(r({componentName:K.componentName,instanceCount:K.instanceCount,classes:K.classes,parsedClasses:Ny(K.classes,By),tailwindConfig:K.tailwindConfig}),o(Y=>Y+1),c(!1)):K.type==="SELECT_MODE_CHANGED"?c(!!K.active):K.type==="QUEUE_UPDATE"?f.handleQueueUpdate({draftCount:K.draftCount,committedCount:K.committedCount,implementingCount:K.implementingCount,implementedCount:K.implementedCount,partialCount:K.partialCount,errorCount:K.errorCount,draft:K.draft,commits:K.commits,agentWaiting:K.agentWaiting}):K.type==="PATCH_UPDATE"&&f.handlePatchUpdate({staged:K.staged,committed:K.committed,implementing:K.implementing,implemented:K.implemented,patches:K.patches})});return yp(),t(Yy()),()=>{P(),M(),Z()}},[]);const{draft:p,committed:d,implementing:y,implemented:x,partial:w,error:k}=f.counts,h=d>0&&!f.agentWaiting&&y===0,m=new Map(f.patches.filter(P=>P.status==="staged").map(P=>[P.id,{id:P.id,kind:P.kind??"class-change",elementKey:P.elementKey,status:P.status,originalClass:P.originalClass,newClass:P.newClass,property:P.property,timestamp:P.timestamp,component:P.component,message:P.message,image:P.image}])),g=new Set(f.queueState.draft.map(P=>P.id)),v=[...f.queueState.draft.map(P=>m.get(P.id)??P),...f.patches.filter(P=>P.status==="staged"&&!g.has(P.id)).map(P=>m.get(P.id))],C=f.queueState.commits.filter(P=>P.status==="committed"),j=f.queueState.commits.filter(P=>P.status==="implementing"),S=f.queueState.commits.filter(P=>P.status==="implemented"),R="Please implement the next change and continue implementing changes with VyBit.";async function F(P){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){N(P);return}}catch{}navigator.clipboard.writeText(P).catch(()=>N(P))}else N(P)}function N(P){const M=document.createElement("textarea");M.value=P,M.style.position="fixed",M.style.opacity="0",document.body.appendChild(M),M.select(),document.execCommand("copy"),document.body.removeChild(M)}const V=u.jsxs("div",{className:"shrink-0",children:[h&&u.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:[u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:u.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"})}),u.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",u.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"]}),u.jsx("button",{onClick:()=>F(R),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: "${R}"`,children:"Copy prompt"})]}),u.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[9px]",children:[u.jsx(Ul,{label:"draft",count:p,items:v,activeColor:"text-bv-text",dotColor:"bg-amber-400",onDiscard:P=>f.discard(P),onCommitAll:()=>f.commitAll(),onDiscardAll:()=>f.discardAll()}),u.jsx(Ul,{label:"committed",count:d,items:C.flatMap(P=>P.patches),activeColor:"text-bv-orange",dotColor:"bg-emerald-400"}),u.jsx(Ul,{label:"implementing",count:y,items:j.flatMap(P=>P.patches),activeColor:"text-bv-orange",dotColor:"bg-blue-400"}),u.jsx(Ul,{label:"implemented",count:x,items:S.flatMap(P=>P.patches),activeColor:"text-bv-teal",dotColor:"bg-green-400"})]})]});if(!e)return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6",children:[u.jsx("div",{className:"w-2 h-2 rounded-full bg-bv-orange animate-pulse"}),u.jsx("span",{className:"text-bv-text-mid text-[12px]",children:"Waiting for connection…"})]}),V]});if(!n)return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx(ed,{active:a,onToggle:()=>{const P=!a;c(P),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:P})}}),u.jsx("div",{className:"flex-1 min-w-0",children:a?u.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"● Selecting… click an element on the page"}):u.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),u.jsx(jc,{})]})}),u.jsx(Tc,{tabs:qc,activeTab:i,onTabChange:s}),u.jsx("div",{className:"flex-1 overflow-auto",children:i==="message"?u.jsx(Ec,{draft:v,currentElementKey:"",onAddMessage:(P,M)=>f.stageMessage(P,M),onDiscard:P=>f.discard(P)}):a?u.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[u.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[u.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"}),u.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"})]})}),u.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),u.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.",u.jsx("br",{}),"Press"," ",u.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."]})]}):u.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:u.jsxs("button",{onClick:()=>{c(!0),pe("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:[u.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:u.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"}),u.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"})]})}),u.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.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:"⌘"}),u.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:"⇧"}),u.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"})]})]})})}),V]});const W=n.parsedClasses;return u.jsxs("div",{className:"h-full flex flex-col",children:[u.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(ed,{active:a,onToggle:()=>{const P=!a;c(P),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:P})}}),u.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",u.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),u.jsx(jc,{})]})}),u.jsx(Tc,{tabs:qc,activeTab:i,onTabChange:s}),u.jsxs("div",{className:"flex-1 overflow-auto",children:[i==="design"&&u.jsx(zx,{componentName:n.componentName,instanceCount:n.instanceCount,parsedClasses:W,tailwindConfig:n.tailwindConfig,patchManager:f},l),i==="message"&&u.jsx(Ec,{draft:v,currentElementKey:n.componentName,onAddMessage:(P,M)=>f.stageMessage(P,M,n.componentName),onDiscard:P=>f.discard(P)})]}),V]})}function ed({active:e,onToggle:t}){return u.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
53
+ ${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:u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[u.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"}),u.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"})]})})}fs.createRoot(document.getElementById("root")).render(u.jsx(dd.StrictMode,{children:u.jsx(Wx,{})}));export{Uy as a,yp as c,u as j,Gy as o,b as r,sr as s};