@bitovi/vybit 0.4.9 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/overlay/dist/overlay.js +1338 -354
- package/package.json +2 -1
- package/panel/dist/assets/DesignMode-BAyjCFC8.js +510 -0
- package/panel/dist/assets/index-DVWn5Mcj.js +49 -0
- package/panel/dist/assets/index-_AiRfYt4.css +1 -0
- package/panel/dist/index.html +2 -2
- package/shared/types.ts +10 -2
- package/panel/dist/assets/index-2r5Abawu.js +0 -553
- package/panel/dist/assets/index-CLQ2EbNt.css +0 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function tp(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 np(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mc={exports:{}},mo={},hc={exports:{}},Z={};/**
|
|
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 Vr=Symbol.for("react.element"),rp=Symbol.for("react.portal"),lp=Symbol.for("react.fragment"),op=Symbol.for("react.strict_mode"),ip=Symbol.for("react.profiler"),sp=Symbol.for("react.provider"),ap=Symbol.for("react.context"),up=Symbol.for("react.forward_ref"),cp=Symbol.for("react.suspense"),fp=Symbol.for("react.memo"),dp=Symbol.for("react.lazy"),Ca=Symbol.iterator;function pp(e){return e===null||typeof e!="object"?null:(e=Ca&&e[Ca]||e["@@iterator"],typeof e=="function"?e:null)}var gc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vc=Object.assign,yc={};function Jn(e,t,n){this.props=e,this.context=t,this.refs=yc,this.updater=n||gc}Jn.prototype.isReactComponent={};Jn.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")};Jn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xc(){}xc.prototype=Jn.prototype;function Ns(e,t,n){this.props=e,this.context=t,this.refs=yc,this.updater=n||gc}var Ps=Ns.prototype=new xc;Ps.constructor=Ns;vc(Ps,Jn.prototype);Ps.isPureReactComponent=!0;var Ra=Array.isArray,wc=Object.prototype.hasOwnProperty,Ts={current:null},Sc={key:!0,ref:!0,__self:!0,__source:!0};function kc(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)wc.call(t,r)&&!Sc.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),u=0;u<s;u++)a[u]=arguments[u+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:Vr,type:e,key:o,ref:i,props:l,_owner:Ts.current}}function mp(e,t){return{$$typeof:Vr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _s(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vr}function hp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Na=/\/+/g;function Mo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?hp(""+e.key):t.toString(36)}function yl(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 Vr:case rp:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+Mo(i,0):r,Ra(l)?(n="",e!=null&&(n=e.replace(Na,"$&/")+"/"),yl(l,t,n,"",function(u){return u})):l!=null&&(_s(l)&&(l=mp(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Na,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",Ra(e))for(var s=0;s<e.length;s++){o=e[s];var a=r+Mo(o,s);i+=yl(o,t,n,a,l)}else if(a=pp(e),typeof a=="function")for(e=a.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Mo(o,s++),i+=yl(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 Zr(e,t,n){if(e==null)return e;var r=[],l=0;return yl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function gp(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 je={current:null},xl={transition:null},vp={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:xl,ReactCurrentOwner:Ts};function bc(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Zr,forEach:function(e,t,n){Zr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zr(e,function(){t++}),t},toArray:function(e){return Zr(e,function(t){return t})||[]},only:function(e){if(!_s(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=Jn;Z.Fragment=lp;Z.Profiler=ip;Z.PureComponent=Ns;Z.StrictMode=op;Z.Suspense=cp;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vp;Z.act=bc;Z.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=vc({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Ts.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)wc.call(t,a)&&!Sc.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 u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Vr,type:e.type,key:l,ref:o,props:r,_owner:i}};Z.createContext=function(e){return e={$$typeof:ap,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:sp,_context:e},e.Consumer=e};Z.createElement=kc;Z.createFactory=function(e){var t=kc.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:up,render:e}};Z.isValidElement=_s;Z.lazy=function(e){return{$$typeof:dp,_payload:{_status:-1,_result:e},_init:gp}};Z.memo=function(e,t){return{$$typeof:fp,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=xl.transition;xl.transition={};try{e()}finally{xl.transition=t}};Z.unstable_act=bc;Z.useCallback=function(e,t){return je.current.useCallback(e,t)};Z.useContext=function(e){return je.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return je.current.useDeferredValue(e)};Z.useEffect=function(e,t){return je.current.useEffect(e,t)};Z.useId=function(){return je.current.useId()};Z.useImperativeHandle=function(e,t,n){return je.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return je.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return je.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return je.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return je.current.useReducer(e,t,n)};Z.useRef=function(e){return je.current.useRef(e)};Z.useState=function(e){return je.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return je.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return je.current.useTransition()};Z.version="18.3.1";hc.exports=Z;var S=hc.exports;const Ec=np(S),Cc=tp({__proto__:null,default:Ec},[S]);/**
|
|
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 yp=S,xp=Symbol.for("react.element"),wp=Symbol.for("react.fragment"),Sp=Object.prototype.hasOwnProperty,kp=yp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bp={key:!0,ref:!0,__self:!0,__source:!0};function Rc(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)Sp.call(t,r)&&!bp.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:xp,type:e,key:o,ref:i,props:l,_owner:kp.current}}mo.Fragment=wp;mo.jsx=Rc;mo.jsxs=Rc;mc.exports=mo;var g=mc.exports,gi={},Nc={exports:{}},Ue={},Pc={exports:{}},Tc={};/**
|
|
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(k,_){var z=k.length;k.push(_);e:for(;0<z;){var Y=z-1>>>1,ee=k[Y];if(0<l(ee,_))k[Y]=_,k[z]=ee,z=Y;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var _=k[0],z=k.pop();if(z!==_){k[0]=z;e:for(var Y=0,ee=k.length,Ke=ee>>>1;Y<Ke;){var Oe=2*(Y+1)-1,ie=k[Oe],se=Oe+1,Se=k[se];if(0>l(ie,z))se<ee&&0>l(Se,ie)?(k[Y]=Se,k[se]=z,Y=se):(k[Y]=ie,k[Oe]=z,Y=Oe);else if(se<ee&&0>l(Se,z))k[Y]=Se,k[se]=z,Y=se;else break e}}return _}function l(k,_){var z=k.sortIndex-_.sortIndex;return z!==0?z:k.id-_.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=[],u=[],f=1,c=null,m=3,v=!1,y=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(k){for(var _=n(u);_!==null;){if(_.callback===null)r(u);else if(_.startTime<=k)r(u),_.sortIndex=_.expirationTime,t(a,_);else break;_=n(u)}}function w(k){if(x=!1,h(k),!y)if(n(a)!==null)y=!0,A(R);else{var _=n(u);_!==null&&H(w,_.startTime-k)}}function R(k,_){y=!1,x&&(x=!1,p(C),C=-1),v=!0;var z=m;try{for(h(_),c=n(a);c!==null&&(!(c.expirationTime>_)||k&&!V());){var Y=c.callback;if(typeof Y=="function"){c.callback=null,m=c.priorityLevel;var ee=Y(c.expirationTime<=_);_=e.unstable_now(),typeof ee=="function"?c.callback=ee:c===n(a)&&r(a),h(_)}else r(a);c=n(a)}if(c!==null)var Ke=!0;else{var Oe=n(u);Oe!==null&&H(w,Oe.startTime-_),Ke=!1}return Ke}finally{c=null,m=z,v=!1}}var E=!1,N=null,C=-1,I=5,P=-1;function V(){return!(e.unstable_now()-P<I)}function G(){if(N!==null){var k=e.unstable_now();P=k;var _=!0;try{_=N(!0,k)}finally{_?j():(E=!1,N=null)}}else E=!1}var j;if(typeof d=="function")j=function(){d(G)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,J=M.port2;M.port1.onmessage=G,j=function(){J.postMessage(null)}}else j=function(){b(G,0)};function A(k){N=k,E||(E=!0,j())}function H(k,_){C=b(function(){k(e.unstable_now())},_)}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(k){k.callback=null},e.unstable_continueExecution=function(){y||v||(y=!0,A(R))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(k){switch(m){case 1:case 2:case 3:var _=3;break;default:_=m}var z=m;m=_;try{return k()}finally{m=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,_){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=m;m=k;try{return _()}finally{m=z}},e.unstable_scheduleCallback=function(k,_,z){var Y=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Y+z:Y):z=Y,k){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=z+ee,k={id:f++,callback:_,priorityLevel:k,startTime:z,expirationTime:ee,sortIndex:-1},z>Y?(k.sortIndex=z,t(u,k),n(a)===null&&k===n(u)&&(x?(p(C),C=-1):x=!0,H(w,z-Y))):(k.sortIndex=ee,t(a,k),y||v||(y=!0,A(R))),k},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(k){var _=m;return function(){var z=m;m=_;try{return k.apply(this,arguments)}finally{m=z}}}})(Tc);Pc.exports=Tc;var Ep=Pc.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 Cp=S,We=Ep;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 _c=new Set,Er={};function yn(e,t){Bn(e,t),Bn(e+"Capture",t)}function Bn(e,t){for(Er[e]=t,e=0;e<t.length;e++)_c.add(t[e])}var Rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vi=Object.prototype.hasOwnProperty,Rp=/^[: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]*$/,Pa={},Ta={};function Np(e){return vi.call(Ta,e)?!0:vi.call(Pa,e)?!1:Rp.test(e)?Ta[e]=!0:(Pa[e]=!0,!1)}function Pp(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 Tp(e,t,n,r){if(t===null||typeof t>"u"||Pp(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 Le(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 Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Le(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){Ee[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var js=/[\-:]([a-z])/g;function Ls(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(js,Ls);Ee[t]=new Le(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(js,Ls);Ee[t]=new Le(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(js,Ls);Ee[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function Os(e,t,n,r){var l=Ee.hasOwnProperty(t)?Ee[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Tp(t,n,l,r)&&(n=null),r||l===null?Np(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 jt=Cp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Jr=Symbol.for("react.element"),En=Symbol.for("react.portal"),Cn=Symbol.for("react.fragment"),Is=Symbol.for("react.strict_mode"),yi=Symbol.for("react.profiler"),jc=Symbol.for("react.provider"),Lc=Symbol.for("react.context"),Ds=Symbol.for("react.forward_ref"),xi=Symbol.for("react.suspense"),wi=Symbol.for("react.suspense_list"),Ms=Symbol.for("react.memo"),It=Symbol.for("react.lazy"),Oc=Symbol.for("react.offscreen"),_a=Symbol.iterator;function nr(e){return e===null||typeof e!="object"?null:(e=_a&&e[_a]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,zo;function fr(e){if(zo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);zo=t&&t[1]||""}return`
|
|
34
|
+
`+zo+e}var Ao=!1;function Ko(e,t){if(!e||Ao)return"";Ao=!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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var l=u.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{Ao=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fr(e):""}function _p(e){switch(e.tag){case 5:return fr(e.type);case 16:return fr("Lazy");case 13:return fr("Suspense");case 19:return fr("SuspenseList");case 0:case 2:case 15:return e=Ko(e.type,!1),e;case 11:return e=Ko(e.type.render,!1),e;case 1:return e=Ko(e.type,!0),e;default:return""}}function Si(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 Cn:return"Fragment";case En:return"Portal";case yi:return"Profiler";case Is:return"StrictMode";case xi:return"Suspense";case wi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lc:return(e.displayName||"Context")+".Consumer";case jc:return(e._context.displayName||"Context")+".Provider";case Ds:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ms:return t=e.displayName||null,t!==null?t:Si(e.type)||"Memo";case It:t=e._payload,e=e._init;try{return Si(e(t))}catch{}}return null}function jp(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 Si(t);case 8:return t===Is?"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 Xt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ic(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lp(e){var t=Ic(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 qr(e){e._valueTracker||(e._valueTracker=Lp(e))}function Dc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ic(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ml(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 ki(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ja(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xt(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 Mc(e,t){t=t.checked,t!=null&&Os(e,"checked",t,!1)}function bi(e,t){Mc(e,t);var n=Xt(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")?Ei(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ei(e,t.type,Xt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function La(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 Ei(e,t,n){(t!=="number"||Ml(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var dr=Array.isArray;function zn(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=""+Xt(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 Ci(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oa(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(dr(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Xt(n)}}function zc(e,t){var n=Xt(t.value),r=Xt(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 Ia(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ac(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 Ri(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ac(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var el,Kc=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(el=el||document.createElement("div"),el.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=el.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hr={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},Op=["Webkit","ms","Moz","O"];Object.keys(hr).forEach(function(e){Op.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hr[t]=hr[e]})});function $c(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hr.hasOwnProperty(e)&&hr[e]?(""+t).trim():t+"px"}function Fc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=$c(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Ip=fe({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 Ni(e,t){if(t){if(Ip[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 Pi(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 Ti=null;function zs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _i=null,An=null,Kn=null;function Da(e){if(e=Ur(e)){if(typeof _i!="function")throw Error(O(280));var t=e.stateNode;t&&(t=xo(t),_i(e.stateNode,e.type,t))}}function Hc(e){An?Kn?Kn.push(e):Kn=[e]:An=e}function Vc(){if(An){var e=An,t=Kn;if(Kn=An=null,Da(e),t)for(e=0;e<t.length;e++)Da(t[e])}}function Bc(e,t){return e(t)}function Wc(){}var $o=!1;function Uc(e,t,n){if($o)return e(t,n);$o=!0;try{return Bc(e,t,n)}finally{$o=!1,(An!==null||Kn!==null)&&(Wc(),Vc())}}function Rr(e,t){var n=e.stateNode;if(n===null)return null;var r=xo(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 ji=!1;if(Rt)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){ji=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{ji=!1}function Dp(e,t,n,r,l,o,i,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var gr=!1,zl=null,Al=!1,Li=null,Mp={onError:function(e){gr=!0,zl=e}};function zp(e,t,n,r,l,o,i,s,a){gr=!1,zl=null,Dp.apply(Mp,arguments)}function Ap(e,t,n,r,l,o,i,s,a){if(zp.apply(this,arguments),gr){if(gr){var u=zl;gr=!1,zl=null}else throw Error(O(198));Al||(Al=!0,Li=u)}}function xn(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 Gc(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 Ma(e){if(xn(e)!==e)throw Error(O(188))}function Kp(e){var t=e.alternate;if(!t){if(t=xn(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 Ma(l),e;if(o===r)return Ma(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 Qc(e){return e=Kp(e),e!==null?Xc(e):null}function Xc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xc(e);if(t!==null)return t;e=e.sibling}return null}var Yc=We.unstable_scheduleCallback,za=We.unstable_cancelCallback,$p=We.unstable_shouldYield,Fp=We.unstable_requestPaint,me=We.unstable_now,Hp=We.unstable_getCurrentPriorityLevel,As=We.unstable_ImmediatePriority,Zc=We.unstable_UserBlockingPriority,Kl=We.unstable_NormalPriority,Vp=We.unstable_LowPriority,Jc=We.unstable_IdlePriority,ho=null,pt=null;function Bp(e){if(pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(ho,e,void 0,(e.current.flags&128)===128)}catch{}}var st=Math.clz32?Math.clz32:Gp,Wp=Math.log,Up=Math.LN2;function Gp(e){return e>>>=0,e===0?32:31-(Wp(e)/Up|0)|0}var tl=64,nl=4194304;function pr(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 $l(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=pr(s):(o&=i,o!==0&&(r=pr(o)))}else i=n&~l,i!==0?r=pr(i):o!==0&&(r=pr(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-st(t),l=1<<n,r|=e[n],t&=~l;return r}function Qp(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 Xp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-st(o),s=1<<i,a=l[i];a===-1?(!(s&n)||s&r)&&(l[i]=Qp(s,t)):a<=t&&(e.expiredLanes|=s),o&=~s}}function Oi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qc(){var e=tl;return tl<<=1,!(tl&4194240)&&(tl=64),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-st(t),e[t]=n}function Yp(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-st(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function Ks(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var te=0;function ef(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tf,$s,nf,rf,lf,Ii=!1,rl=[],$t=null,Ft=null,Ht=null,Nr=new Map,Pr=new Map,Mt=[],Zp="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 Aa(e,t){switch(e){case"focusin":case"focusout":$t=null;break;case"dragenter":case"dragleave":Ft=null;break;case"mouseover":case"mouseout":Ht=null;break;case"pointerover":case"pointerout":Nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(t.pointerId)}}function lr(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=Ur(t),t!==null&&$s(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Jp(e,t,n,r,l){switch(t){case"focusin":return $t=lr($t,e,t,n,r,l),!0;case"dragenter":return Ft=lr(Ft,e,t,n,r,l),!0;case"mouseover":return Ht=lr(Ht,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return Nr.set(o,lr(Nr.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Pr.set(o,lr(Pr.get(o)||null,e,t,n,r,l)),!0}return!1}function of(e){var t=ln(e.target);if(t!==null){var n=xn(t);if(n!==null){if(t=n.tag,t===13){if(t=Gc(n),t!==null){e.blockedOn=t,lf(e.priority,function(){nf(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 wl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Di(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ti=r,n.target.dispatchEvent(r),Ti=null}else return t=Ur(n),t!==null&&$s(t),e.blockedOn=n,!1;t.shift()}return!0}function Ka(e,t,n){wl(e)&&n.delete(t)}function qp(){Ii=!1,$t!==null&&wl($t)&&($t=null),Ft!==null&&wl(Ft)&&(Ft=null),Ht!==null&&wl(Ht)&&(Ht=null),Nr.forEach(Ka),Pr.forEach(Ka)}function or(e,t){e.blockedOn===t&&(e.blockedOn=null,Ii||(Ii=!0,We.unstable_scheduleCallback(We.unstable_NormalPriority,qp)))}function Tr(e){function t(l){return or(l,e)}if(0<rl.length){or(rl[0],e);for(var n=1;n<rl.length;n++){var r=rl[n];r.blockedOn===e&&(r.blockedOn=null)}}for($t!==null&&or($t,e),Ft!==null&&or(Ft,e),Ht!==null&&or(Ht,e),Nr.forEach(t),Pr.forEach(t),n=0;n<Mt.length;n++)r=Mt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mt.length&&(n=Mt[0],n.blockedOn===null);)of(n),n.blockedOn===null&&Mt.shift()}var $n=jt.ReactCurrentBatchConfig,Fl=!0;function em(e,t,n,r){var l=te,o=$n.transition;$n.transition=null;try{te=1,Fs(e,t,n,r)}finally{te=l,$n.transition=o}}function tm(e,t,n,r){var l=te,o=$n.transition;$n.transition=null;try{te=4,Fs(e,t,n,r)}finally{te=l,$n.transition=o}}function Fs(e,t,n,r){if(Fl){var l=Di(e,t,n,r);if(l===null)Zo(e,t,r,Hl,n),Aa(e,r);else if(Jp(l,e,t,n,r))r.stopPropagation();else if(Aa(e,r),t&4&&-1<Zp.indexOf(e)){for(;l!==null;){var o=Ur(l);if(o!==null&&tf(o),o=Di(e,t,n,r),o===null&&Zo(e,t,r,Hl,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else Zo(e,t,r,null,n)}}var Hl=null;function Di(e,t,n,r){if(Hl=null,e=zs(r),e=ln(e),e!==null)if(t=xn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gc(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 Hl=e,null}function sf(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(Hp()){case As:return 1;case Zc:return 4;case Kl:case Vp:return 16;case Jc:return 536870912;default:return 16}default:return 16}}var At=null,Hs=null,Sl=null;function af(){if(Sl)return Sl;var e,t=Hs,n=t.length,r,l="value"in At?At.value:At.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 Sl=l.slice(e,1<r?1-r:void 0)}function kl(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 ll(){return!0}function $a(){return!1}function Ge(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)?ll:$a,this.isPropagationStopped=$a,this}return fe(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=ll)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vs=Ge(qn),Wr=fe({},qn,{view:0,detail:0}),nm=Ge(Wr),Ho,Vo,ir,go=fe({},Wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bs,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!==ir&&(ir&&e.type==="mousemove"?(Ho=e.screenX-ir.screenX,Vo=e.screenY-ir.screenY):Vo=Ho=0,ir=e),Ho)},movementY:function(e){return"movementY"in e?e.movementY:Vo}}),Fa=Ge(go),rm=fe({},go,{dataTransfer:0}),lm=Ge(rm),om=fe({},Wr,{relatedTarget:0}),Bo=Ge(om),im=fe({},qn,{animationName:0,elapsedTime:0,pseudoElement:0}),sm=Ge(im),am=fe({},qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),um=Ge(am),cm=fe({},qn,{data:0}),Ha=Ge(cm),fm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dm={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"},pm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pm[e])?!!t[e]:!1}function Bs(){return mm}var hm=fe({},Wr,{key:function(e){if(e.key){var t=fm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=kl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bs,charCode:function(e){return e.type==="keypress"?kl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?kl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gm=Ge(hm),vm=fe({},go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Va=Ge(vm),ym=fe({},Wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bs}),xm=Ge(ym),wm=fe({},qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sm=Ge(wm),km=fe({},go,{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}),bm=Ge(km),Em=[9,13,27,32],Ws=Rt&&"CompositionEvent"in window,vr=null;Rt&&"documentMode"in document&&(vr=document.documentMode);var Cm=Rt&&"TextEvent"in window&&!vr,uf=Rt&&(!Ws||vr&&8<vr&&11>=vr),Ba=" ",Wa=!1;function cf(e,t){switch(e){case"keyup":return Em.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ff(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rn=!1;function Rm(e,t){switch(e){case"compositionend":return ff(t);case"keypress":return t.which!==32?null:(Wa=!0,Ba);case"textInput":return e=t.data,e===Ba&&Wa?null:e;default:return null}}function Nm(e,t){if(Rn)return e==="compositionend"||!Ws&&cf(e,t)?(e=af(),Sl=Hs=At=null,Rn=!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 uf&&t.locale!=="ko"?null:t.data;default:return null}}var Pm={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 Ua(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Pm[e.type]:t==="textarea"}function df(e,t,n,r){Hc(r),t=Vl(t,"onChange"),0<t.length&&(n=new Vs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var yr=null,_r=null;function Tm(e){bf(e,0)}function vo(e){var t=Tn(e);if(Dc(t))return e}function _m(e,t){if(e==="change")return t}var pf=!1;if(Rt){var Wo;if(Rt){var Uo="oninput"in document;if(!Uo){var Ga=document.createElement("div");Ga.setAttribute("oninput","return;"),Uo=typeof Ga.oninput=="function"}Wo=Uo}else Wo=!1;pf=Wo&&(!document.documentMode||9<document.documentMode)}function Qa(){yr&&(yr.detachEvent("onpropertychange",mf),_r=yr=null)}function mf(e){if(e.propertyName==="value"&&vo(_r)){var t=[];df(t,_r,e,zs(e)),Uc(Tm,t)}}function jm(e,t,n){e==="focusin"?(Qa(),yr=t,_r=n,yr.attachEvent("onpropertychange",mf)):e==="focusout"&&Qa()}function Lm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vo(_r)}function Om(e,t){if(e==="click")return vo(t)}function Im(e,t){if(e==="input"||e==="change")return vo(t)}function Dm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ut=typeof Object.is=="function"?Object.is:Dm;function jr(e,t){if(ut(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(!vi.call(t,l)||!ut(e[l],t[l]))return!1}return!0}function Xa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ya(e,t){var n=Xa(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=Xa(n)}}function hf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gf(){for(var e=window,t=Ml();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ml(e.document)}return t}function Us(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 Mm(e){var t=gf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hf(n.ownerDocument.documentElement,n)){if(r!==null&&Us(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=Ya(n,o);var i=Ya(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 zm=Rt&&"documentMode"in document&&11>=document.documentMode,Nn=null,Mi=null,xr=null,zi=!1;function Za(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zi||Nn==null||Nn!==Ml(r)||(r=Nn,"selectionStart"in r&&Us(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&&jr(xr,r)||(xr=r,r=Vl(Mi,"onSelect"),0<r.length&&(t=new Vs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nn)))}function ol(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pn={animationend:ol("Animation","AnimationEnd"),animationiteration:ol("Animation","AnimationIteration"),animationstart:ol("Animation","AnimationStart"),transitionend:ol("Transition","TransitionEnd")},Go={},vf={};Rt&&(vf=document.createElement("div").style,"AnimationEvent"in window||(delete Pn.animationend.animation,delete Pn.animationiteration.animation,delete Pn.animationstart.animation),"TransitionEvent"in window||delete Pn.transitionend.transition);function yo(e){if(Go[e])return Go[e];if(!Pn[e])return e;var t=Pn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in vf)return Go[e]=t[n];return e}var yf=yo("animationend"),xf=yo("animationiteration"),wf=yo("animationstart"),Sf=yo("transitionend"),kf=new Map,Ja="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 Jt(e,t){kf.set(e,t),yn(t,[e])}for(var Qo=0;Qo<Ja.length;Qo++){var Xo=Ja[Qo],Am=Xo.toLowerCase(),Km=Xo[0].toUpperCase()+Xo.slice(1);Jt(Am,"on"+Km)}Jt(yf,"onAnimationEnd");Jt(xf,"onAnimationIteration");Jt(wf,"onAnimationStart");Jt("dblclick","onDoubleClick");Jt("focusin","onFocus");Jt("focusout","onBlur");Jt(Sf,"onTransitionEnd");Bn("onMouseEnter",["mouseout","mouseover"]);Bn("onMouseLeave",["mouseout","mouseover"]);Bn("onPointerEnter",["pointerout","pointerover"]);Bn("onPointerLeave",["pointerout","pointerover"]);yn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yn("onBeforeInput",["compositionend","keypress","textInput","paste"]);yn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mr="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(" "),$m=new Set("cancel close invalid load scroll toggle".split(" ").concat(mr));function qa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Ap(r,t,void 0,e),e.currentTarget=null}function bf(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,u=s.currentTarget;if(s=s.listener,a!==o&&l.isPropagationStopped())break e;qa(l,s,u),o=a}else for(i=0;i<r.length;i++){if(s=r[i],a=s.instance,u=s.currentTarget,s=s.listener,a!==o&&l.isPropagationStopped())break e;qa(l,s,u),o=a}}}if(Al)throw e=Li,Al=!1,Li=null,e}function le(e,t){var n=t[Hi];n===void 0&&(n=t[Hi]=new Set);var r=e+"__bubble";n.has(r)||(Ef(t,e,2,!1),n.add(r))}function Yo(e,t,n){var r=0;t&&(r|=4),Ef(n,e,r,t)}var il="_reactListening"+Math.random().toString(36).slice(2);function Lr(e){if(!e[il]){e[il]=!0,_c.forEach(function(n){n!=="selectionchange"&&($m.has(n)||Yo(n,!1,e),Yo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[il]||(t[il]=!0,Yo("selectionchange",!1,t))}}function Ef(e,t,n,r){switch(sf(t)){case 1:var l=em;break;case 4:l=tm;break;default:l=Fs}n=l.bind(null,t,n,e),l=void 0,!ji||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 Zo(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=ln(s),i===null)return;if(a=i.tag,a===5||a===6){r=o=i;continue e}s=s.parentNode}}r=r.return}Uc(function(){var u=o,f=zs(n),c=[];e:{var m=kf.get(e);if(m!==void 0){var v=Vs,y=e;switch(e){case"keypress":if(kl(n)===0)break e;case"keydown":case"keyup":v=gm;break;case"focusin":y="focus",v=Bo;break;case"focusout":y="blur",v=Bo;break;case"beforeblur":case"afterblur":v=Bo;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":v=Fa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=lm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=xm;break;case yf:case xf:case wf:v=sm;break;case Sf:v=Sm;break;case"scroll":v=nm;break;case"wheel":v=bm;break;case"copy":case"cut":case"paste":v=um;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Va}var x=(t&4)!==0,b=!x&&e==="scroll",p=x?m!==null?m+"Capture":null:m;x=[];for(var d=u,h;d!==null;){h=d;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,p!==null&&(w=Rr(d,p),w!=null&&x.push(Or(d,w,h)))),b)break;d=d.return}0<x.length&&(m=new v(m,y,null,n,f),c.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Ti&&(y=n.relatedTarget||n.fromElement)&&(ln(y)||y[Nt]))break e;if((v||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,v?(y=n.relatedTarget||n.toElement,v=u,y=y?ln(y):null,y!==null&&(b=xn(y),y!==b||y.tag!==5&&y.tag!==6)&&(y=null)):(v=null,y=u),v!==y)){if(x=Fa,w="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(x=Va,w="onPointerLeave",p="onPointerEnter",d="pointer"),b=v==null?m:Tn(v),h=y==null?m:Tn(y),m=new x(w,d+"leave",v,n,f),m.target=b,m.relatedTarget=h,w=null,ln(f)===u&&(x=new x(p,d+"enter",y,n,f),x.target=h,x.relatedTarget=b,w=x),b=w,v&&y)t:{for(x=v,p=y,d=0,h=x;h;h=kn(h))d++;for(h=0,w=p;w;w=kn(w))h++;for(;0<d-h;)x=kn(x),d--;for(;0<h-d;)p=kn(p),h--;for(;d--;){if(x===p||p!==null&&x===p.alternate)break t;x=kn(x),p=kn(p)}x=null}else x=null;v!==null&&eu(c,m,v,x,!1),y!==null&&b!==null&&eu(c,b,y,x,!0)}}e:{if(m=u?Tn(u):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var R=_m;else if(Ua(m))if(pf)R=Im;else{R=Lm;var E=jm}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(R=Om);if(R&&(R=R(e,u))){df(c,R,n,f);break e}E&&E(e,m,u),e==="focusout"&&(E=m._wrapperState)&&E.controlled&&m.type==="number"&&Ei(m,"number",m.value)}switch(E=u?Tn(u):window,e){case"focusin":(Ua(E)||E.contentEditable==="true")&&(Nn=E,Mi=u,xr=null);break;case"focusout":xr=Mi=Nn=null;break;case"mousedown":zi=!0;break;case"contextmenu":case"mouseup":case"dragend":zi=!1,Za(c,n,f);break;case"selectionchange":if(zm)break;case"keydown":case"keyup":Za(c,n,f)}var N;if(Ws)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Rn?cf(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(uf&&n.locale!=="ko"&&(Rn||C!=="onCompositionStart"?C==="onCompositionEnd"&&Rn&&(N=af()):(At=f,Hs="value"in At?At.value:At.textContent,Rn=!0)),E=Vl(u,C),0<E.length&&(C=new Ha(C,e,null,n,f),c.push({event:C,listeners:E}),N?C.data=N:(N=ff(n),N!==null&&(C.data=N)))),(N=Cm?Rm(e,n):Nm(e,n))&&(u=Vl(u,"onBeforeInput"),0<u.length&&(f=new Ha("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=N))}bf(c,t)})}function Or(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=Rr(e,n),o!=null&&r.unshift(Or(e,o,l)),o=Rr(e,t),o!=null&&r.push(Or(e,o,l))),e=e.return}return r}function kn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function eu(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,l?(a=Rr(n,o),a!=null&&i.unshift(Or(n,a,s))):l||(a=Rr(n,o),a!=null&&i.push(Or(n,a,s)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Fm=/\r\n?/g,Hm=/\u0000|\uFFFD/g;function tu(e){return(typeof e=="string"?e:""+e).replace(Fm,`
|
|
38
|
+
`).replace(Hm,"")}function sl(e,t,n){if(t=tu(t),tu(e)!==t&&n)throw Error(O(425))}function Bl(){}var Ai=null,Ki=null;function $i(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 Fi=typeof setTimeout=="function"?setTimeout:void 0,Vm=typeof clearTimeout=="function"?clearTimeout:void 0,nu=typeof Promise=="function"?Promise:void 0,Bm=typeof queueMicrotask=="function"?queueMicrotask:typeof nu<"u"?function(e){return nu.resolve(null).then(e).catch(Wm)}:Fi;function Wm(e){setTimeout(function(){throw e})}function Jo(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),Tr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Tr(t)}function Vt(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 ru(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),dt="__reactFiber$"+er,Ir="__reactProps$"+er,Nt="__reactContainer$"+er,Hi="__reactEvents$"+er,Um="__reactListeners$"+er,Gm="__reactHandles$"+er;function ln(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ru(e);e!==null;){if(n=e[dt])return n;e=ru(e)}return t}e=n,n=e.parentNode}return null}function Ur(e){return e=e[dt]||e[Nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Tn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function xo(e){return e[Ir]||null}var Vi=[],_n=-1;function qt(e){return{current:e}}function oe(e){0>_n||(e.current=Vi[_n],Vi[_n]=null,_n--)}function re(e,t){_n++,Vi[_n]=e.current,e.current=t}var Yt={},Pe=qt(Yt),Me=qt(!1),dn=Yt;function Wn(e,t){var n=e.type.contextTypes;if(!n)return Yt;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 ze(e){return e=e.childContextTypes,e!=null}function Wl(){oe(Me),oe(Pe)}function lu(e,t,n){if(Pe.current!==Yt)throw Error(O(168));re(Pe,t),re(Me,n)}function Cf(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,jp(e)||"Unknown",l));return fe({},n,r)}function Ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yt,dn=Pe.current,re(Pe,e),re(Me,Me.current),!0}function ou(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Cf(e,t,dn),r.__reactInternalMemoizedMergedChildContext=e,oe(Me),oe(Pe),re(Pe,e)):oe(Me),re(Me,n)}var wt=null,wo=!1,qo=!1;function Rf(e){wt===null?wt=[e]:wt.push(e)}function Qm(e){wo=!0,Rf(e)}function en(){if(!qo&&wt!==null){qo=!0;var e=0,t=te;try{var n=wt;for(te=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wt=null,wo=!1}catch(l){throw wt!==null&&(wt=wt.slice(e+1)),Yc(As,en),l}finally{te=t,qo=!1}}return null}var jn=[],Ln=0,Gl=null,Ql=0,Qe=[],Xe=0,pn=null,St=1,kt="";function nn(e,t){jn[Ln++]=Ql,jn[Ln++]=Gl,Gl=e,Ql=t}function Nf(e,t,n){Qe[Xe++]=St,Qe[Xe++]=kt,Qe[Xe++]=pn,pn=e;var r=St;e=kt;var l=32-st(r)-1;r&=~(1<<l),n+=1;var o=32-st(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,St=1<<32-st(t)+l|n<<l|r,kt=o+e}else St=1<<o|n<<l|r,kt=e}function Gs(e){e.return!==null&&(nn(e,1),Nf(e,1,0))}function Qs(e){for(;e===Gl;)Gl=jn[--Ln],jn[Ln]=null,Ql=jn[--Ln],jn[Ln]=null;for(;e===pn;)pn=Qe[--Xe],Qe[Xe]=null,kt=Qe[--Xe],Qe[Xe]=null,St=Qe[--Xe],Qe[Xe]=null}var Ve=null,He=null,ae=!1,it=null;function Pf(e,t){var n=Ye(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 iu(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,Ve=e,He=Vt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ve=e,He=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pn!==null?{id:St,overflow:kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ye(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ve=e,He=null,!0):!1;default:return!1}}function Bi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wi(e){if(ae){var t=He;if(t){var n=t;if(!iu(e,t)){if(Bi(e))throw Error(O(418));t=Vt(n.nextSibling);var r=Ve;t&&iu(e,t)?Pf(r,n):(e.flags=e.flags&-4097|2,ae=!1,Ve=e)}}else{if(Bi(e))throw Error(O(418));e.flags=e.flags&-4097|2,ae=!1,Ve=e}}}function su(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ve=e}function al(e){if(e!==Ve)return!1;if(!ae)return su(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$i(e.type,e.memoizedProps)),t&&(t=He)){if(Bi(e))throw Tf(),Error(O(418));for(;t;)Pf(e,t),t=Vt(t.nextSibling)}if(su(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){He=Vt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}He=null}}else He=Ve?Vt(e.stateNode.nextSibling):null;return!0}function Tf(){for(var e=He;e;)e=Vt(e.nextSibling)}function Un(){He=Ve=null,ae=!1}function Xs(e){it===null?it=[e]:it.push(e)}var Xm=jt.ReactCurrentBatchConfig;function sr(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 ul(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function au(e){var t=e._init;return t(e._payload)}function _f(e){function t(p,d){if(e){var h=p.deletions;h===null?(p.deletions=[d],p.flags|=16):h.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function l(p,d){return p=Gt(p,d),p.index=0,p.sibling=null,p}function o(p,d,h){return p.index=h,e?(h=p.alternate,h!==null?(h=h.index,h<d?(p.flags|=2,d):h):(p.flags|=2,d)):(p.flags|=1048576,d)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,d,h,w){return d===null||d.tag!==6?(d=ii(h,p.mode,w),d.return=p,d):(d=l(d,h),d.return=p,d)}function a(p,d,h,w){var R=h.type;return R===Cn?f(p,d,h.props.children,w,h.key):d!==null&&(d.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===It&&au(R)===d.type)?(w=l(d,h.props),w.ref=sr(p,d,h),w.return=p,w):(w=Tl(h.type,h.key,h.props,null,p.mode,w),w.ref=sr(p,d,h),w.return=p,w)}function u(p,d,h,w){return d===null||d.tag!==4||d.stateNode.containerInfo!==h.containerInfo||d.stateNode.implementation!==h.implementation?(d=si(h,p.mode,w),d.return=p,d):(d=l(d,h.children||[]),d.return=p,d)}function f(p,d,h,w,R){return d===null||d.tag!==7?(d=cn(h,p.mode,w,R),d.return=p,d):(d=l(d,h),d.return=p,d)}function c(p,d,h){if(typeof d=="string"&&d!==""||typeof d=="number")return d=ii(""+d,p.mode,h),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case Jr:return h=Tl(d.type,d.key,d.props,null,p.mode,h),h.ref=sr(p,null,d),h.return=p,h;case En:return d=si(d,p.mode,h),d.return=p,d;case It:var w=d._init;return c(p,w(d._payload),h)}if(dr(d)||nr(d))return d=cn(d,p.mode,h,null),d.return=p,d;ul(p,d)}return null}function m(p,d,h,w){var R=d!==null?d.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return R!==null?null:s(p,d,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Jr:return h.key===R?a(p,d,h,w):null;case En:return h.key===R?u(p,d,h,w):null;case It:return R=h._init,m(p,d,R(h._payload),w)}if(dr(h)||nr(h))return R!==null?null:f(p,d,h,w,null);ul(p,h)}return null}function v(p,d,h,w,R){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(h)||null,s(d,p,""+w,R);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Jr:return p=p.get(w.key===null?h:w.key)||null,a(d,p,w,R);case En:return p=p.get(w.key===null?h:w.key)||null,u(d,p,w,R);case It:var E=w._init;return v(p,d,h,E(w._payload),R)}if(dr(w)||nr(w))return p=p.get(h)||null,f(d,p,w,R,null);ul(d,w)}return null}function y(p,d,h,w){for(var R=null,E=null,N=d,C=d=0,I=null;N!==null&&C<h.length;C++){N.index>C?(I=N,N=null):I=N.sibling;var P=m(p,N,h[C],w);if(P===null){N===null&&(N=I);break}e&&N&&P.alternate===null&&t(p,N),d=o(P,d,C),E===null?R=P:E.sibling=P,E=P,N=I}if(C===h.length)return n(p,N),ae&&nn(p,C),R;if(N===null){for(;C<h.length;C++)N=c(p,h[C],w),N!==null&&(d=o(N,d,C),E===null?R=N:E.sibling=N,E=N);return ae&&nn(p,C),R}for(N=r(p,N);C<h.length;C++)I=v(N,p,C,h[C],w),I!==null&&(e&&I.alternate!==null&&N.delete(I.key===null?C:I.key),d=o(I,d,C),E===null?R=I:E.sibling=I,E=I);return e&&N.forEach(function(V){return t(p,V)}),ae&&nn(p,C),R}function x(p,d,h,w){var R=nr(h);if(typeof R!="function")throw Error(O(150));if(h=R.call(h),h==null)throw Error(O(151));for(var E=R=null,N=d,C=d=0,I=null,P=h.next();N!==null&&!P.done;C++,P=h.next()){N.index>C?(I=N,N=null):I=N.sibling;var V=m(p,N,P.value,w);if(V===null){N===null&&(N=I);break}e&&N&&V.alternate===null&&t(p,N),d=o(V,d,C),E===null?R=V:E.sibling=V,E=V,N=I}if(P.done)return n(p,N),ae&&nn(p,C),R;if(N===null){for(;!P.done;C++,P=h.next())P=c(p,P.value,w),P!==null&&(d=o(P,d,C),E===null?R=P:E.sibling=P,E=P);return ae&&nn(p,C),R}for(N=r(p,N);!P.done;C++,P=h.next())P=v(N,p,C,P.value,w),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?C:P.key),d=o(P,d,C),E===null?R=P:E.sibling=P,E=P);return e&&N.forEach(function(G){return t(p,G)}),ae&&nn(p,C),R}function b(p,d,h,w){if(typeof h=="object"&&h!==null&&h.type===Cn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Jr:e:{for(var R=h.key,E=d;E!==null;){if(E.key===R){if(R=h.type,R===Cn){if(E.tag===7){n(p,E.sibling),d=l(E,h.props.children),d.return=p,p=d;break e}}else if(E.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===It&&au(R)===E.type){n(p,E.sibling),d=l(E,h.props),d.ref=sr(p,E,h),d.return=p,p=d;break e}n(p,E);break}else t(p,E);E=E.sibling}h.type===Cn?(d=cn(h.props.children,p.mode,w,h.key),d.return=p,p=d):(w=Tl(h.type,h.key,h.props,null,p.mode,w),w.ref=sr(p,d,h),w.return=p,p=w)}return i(p);case En:e:{for(E=h.key;d!==null;){if(d.key===E)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(p,d.sibling),d=l(d,h.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=si(h,p.mode,w),d.return=p,p=d}return i(p);case It:return E=h._init,b(p,d,E(h._payload),w)}if(dr(h))return y(p,d,h,w);if(nr(h))return x(p,d,h,w);ul(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(p,d.sibling),d=l(d,h),d.return=p,p=d):(n(p,d),d=ii(h,p.mode,w),d.return=p,p=d),i(p)):n(p,d)}return b}var Gn=_f(!0),jf=_f(!1),Xl=qt(null),Yl=null,On=null,Ys=null;function Zs(){Ys=On=Yl=null}function Js(e){var t=Xl.current;oe(Xl),e._currentValue=t}function Ui(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 Fn(e,t){Yl=e,Ys=On=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(De=!0),e.firstContext=null)}function Je(e){var t=e._currentValue;if(Ys!==e)if(e={context:e,memoizedValue:t,next:null},On===null){if(Yl===null)throw Error(O(308));On=e,Yl.dependencies={lanes:0,firstContext:e}}else On=On.next=e;return t}var on=null;function qs(e){on===null?on=[e]:on.push(e)}function Lf(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,qs(t)):(n.next=l.next,l.next=n),t.interleaved=n,Pt(e,r)}function Pt(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 Dt=!1;function ea(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Of(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 Et(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Pt(e,n)}return l=r.interleaved,l===null?(t.next=t,qs(r)):(t.next=l.next,l.next=t),r.interleaved=t,Pt(e,n)}function bl(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,Ks(e,n)}}function uu(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 Zl(e,t,n,r){var l=e.updateQueue;Dt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var a=s,u=a.next;a.next=null,i===null?o=u:i.next=u,i=a;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==i&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=a))}if(o!==null){var c=l.baseState;i=0,f=u=a=null,s=o;do{var m=s.lane,v=s.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:v,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=e,x=s;switch(m=t,v=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){c=y.call(v,c,m);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,m=typeof y=="function"?y.call(v,c,m):y,m==null)break e;c=fe({},c,m);break e;case 2:Dt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[s]:m.push(s))}else v={eventTime:v,lane:m,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=v,a=c):f=f.next=v,i|=m;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;m=s,s=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(f===null&&(a=c),l.baseState=a,l.firstBaseUpdate=u,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);hn|=i,e.lanes=i,e.memoizedState=c}}function cu(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 Gr={},mt=qt(Gr),Dr=qt(Gr),Mr=qt(Gr);function sn(e){if(e===Gr)throw Error(O(174));return e}function ta(e,t){switch(re(Mr,t),re(Dr,e),re(mt,Gr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ri(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ri(t,e)}oe(mt),re(mt,t)}function Qn(){oe(mt),oe(Dr),oe(Mr)}function If(e){sn(Mr.current);var t=sn(mt.current),n=Ri(t,e.type);t!==n&&(re(Dr,e),re(mt,n))}function na(e){Dr.current===e&&(oe(mt),oe(Dr))}var ue=qt(0);function Jl(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 ei=[];function ra(){for(var e=0;e<ei.length;e++)ei[e]._workInProgressVersionPrimary=null;ei.length=0}var El=jt.ReactCurrentDispatcher,ti=jt.ReactCurrentBatchConfig,mn=0,ce=null,ve=null,xe=null,ql=!1,wr=!1,zr=0,Ym=0;function Ce(){throw Error(O(321))}function la(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}function oa(e,t,n,r,l,o){if(mn=o,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,El.current=e===null||e.memoizedState===null?eh:th,e=n(r,l),wr){o=0;do{if(wr=!1,zr=0,25<=o)throw Error(O(301));o+=1,xe=ve=null,t.updateQueue=null,El.current=nh,e=n(r,l)}while(wr)}if(El.current=eo,t=ve!==null&&ve.next!==null,mn=0,xe=ve=ce=null,ql=!1,t)throw Error(O(300));return e}function ia(){var e=zr!==0;return zr=0,e}function ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xe===null?ce.memoizedState=xe=e:xe=xe.next=e,xe}function qe(){if(ve===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=xe===null?ce.memoizedState:xe.next;if(t!==null)xe=t,ve=e;else{if(e===null)throw Error(O(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},xe===null?ce.memoizedState=xe=e:xe=xe.next=e}return xe}function Ar(e,t){return typeof t=="function"?t(e):t}function ni(e){var t=qe(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=ve,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,u=o;do{var f=u.lane;if((mn&f)===f)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,ce.lanes|=f,hn|=f}u=u.next}while(u!==null&&u!==o);a===null?i=r:a.next=s,ut(r,t.memoizedState)||(De=!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,ce.lanes|=o,hn|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ri(e){var t=qe(),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);ut(o,t.memoizedState)||(De=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Df(){}function Mf(e,t){var n=ce,r=qe(),l=t(),o=!ut(r.memoizedState,l);if(o&&(r.memoizedState=l,De=!0),r=r.queue,sa(Kf.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||xe!==null&&xe.memoizedState.tag&1){if(n.flags|=2048,Kr(9,Af.bind(null,n,r,l,t),void 0,null),we===null)throw Error(O(349));mn&30||zf(n,t,l)}return l}function zf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Af(e,t,n,r){t.value=n,t.getSnapshot=r,$f(t)&&Ff(e)}function Kf(e,t,n){return n(function(){$f(t)&&Ff(e)})}function $f(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ut(e,n)}catch{return!0}}function Ff(e){var t=Pt(e,1);t!==null&&at(t,e,1,-1)}function fu(e){var t=ft();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ar,lastRenderedState:e},t.queue=e,e=e.dispatch=qm.bind(null,ce,e),[t.memoizedState,e]}function Kr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.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 Hf(){return qe().memoizedState}function Cl(e,t,n,r){var l=ft();ce.flags|=e,l.memoizedState=Kr(1|t,n,void 0,r===void 0?null:r)}function So(e,t,n,r){var l=qe();r=r===void 0?null:r;var o=void 0;if(ve!==null){var i=ve.memoizedState;if(o=i.destroy,r!==null&&la(r,i.deps)){l.memoizedState=Kr(t,n,o,r);return}}ce.flags|=e,l.memoizedState=Kr(1|t,n,o,r)}function du(e,t){return Cl(8390656,8,e,t)}function sa(e,t){return So(2048,8,e,t)}function Vf(e,t){return So(4,2,e,t)}function Bf(e,t){return So(4,4,e,t)}function Wf(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 Uf(e,t,n){return n=n!=null?n.concat([e]):null,So(4,4,Wf.bind(null,t,e),n)}function aa(){}function Gf(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&la(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qf(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&la(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xf(e,t,n){return mn&21?(ut(n,t)||(n=qc(),ce.lanes|=n,hn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,De=!0),e.memoizedState=n)}function Zm(e,t){var n=te;te=n!==0&&4>n?n:4,e(!0);var r=ti.transition;ti.transition={};try{e(!1),t()}finally{te=n,ti.transition=r}}function Yf(){return qe().memoizedState}function Jm(e,t,n){var r=Ut(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zf(e))Jf(t,n);else if(n=Lf(e,t,n,r),n!==null){var l=_e();at(n,e,r,l),qf(n,t,r)}}function qm(e,t,n){var r=Ut(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zf(e))Jf(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,ut(s,i)){var a=t.interleaved;a===null?(l.next=l,qs(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=Lf(e,t,l,r),n!==null&&(l=_e(),at(n,e,r,l),qf(n,t,r))}}function Zf(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Jf(e,t){wr=ql=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ks(e,n)}}var eo={readContext:Je,useCallback:Ce,useContext:Ce,useEffect:Ce,useImperativeHandle:Ce,useInsertionEffect:Ce,useLayoutEffect:Ce,useMemo:Ce,useReducer:Ce,useRef:Ce,useState:Ce,useDebugValue:Ce,useDeferredValue:Ce,useTransition:Ce,useMutableSource:Ce,useSyncExternalStore:Ce,useId:Ce,unstable_isNewReconciler:!1},eh={readContext:Je,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:du,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Cl(4194308,4,Wf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cl(4,2,e,t)},useMemo:function(e,t){var n=ft();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ft();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=Jm.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:fu,useDebugValue:aa,useDeferredValue:function(e){return ft().memoizedState=e},useTransition:function(){var e=fu(!1),t=e[0];return e=Zm.bind(null,e[1]),ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,l=ft();if(ae){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),we===null)throw Error(O(349));mn&30||zf(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,du(Kf.bind(null,r,o,e),[e]),r.flags|=2048,Kr(9,Af.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ft(),t=we.identifierPrefix;if(ae){var n=kt,r=St;n=(r&~(1<<32-st(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ym++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},th={readContext:Je,useCallback:Gf,useContext:Je,useEffect:sa,useImperativeHandle:Uf,useInsertionEffect:Vf,useLayoutEffect:Bf,useMemo:Qf,useReducer:ni,useRef:Hf,useState:function(){return ni(Ar)},useDebugValue:aa,useDeferredValue:function(e){var t=qe();return Xf(t,ve.memoizedState,e)},useTransition:function(){var e=ni(Ar)[0],t=qe().memoizedState;return[e,t]},useMutableSource:Df,useSyncExternalStore:Mf,useId:Yf,unstable_isNewReconciler:!1},nh={readContext:Je,useCallback:Gf,useContext:Je,useEffect:sa,useImperativeHandle:Uf,useInsertionEffect:Vf,useLayoutEffect:Bf,useMemo:Qf,useReducer:ri,useRef:Hf,useState:function(){return ri(Ar)},useDebugValue:aa,useDeferredValue:function(e){var t=qe();return ve===null?t.memoizedState=e:Xf(t,ve.memoizedState,e)},useTransition:function(){var e=ri(Ar)[0],t=qe().memoizedState;return[e,t]},useMutableSource:Df,useSyncExternalStore:Mf,useId:Yf,unstable_isNewReconciler:!1};function lt(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Gi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ko={isMounted:function(e){return(e=e._reactInternals)?xn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),l=Ut(e),o=Et(r,l);o.payload=t,n!=null&&(o.callback=n),t=Bt(e,o,l),t!==null&&(at(t,e,l,r),bl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),l=Ut(e),o=Et(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Bt(e,o,l),t!==null&&(at(t,e,l,r),bl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=Ut(e),l=Et(n,r);l.tag=2,t!=null&&(l.callback=t),t=Bt(e,l,r),t!==null&&(at(t,e,r,n),bl(t,e,r))}};function pu(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?!jr(n,r)||!jr(l,o):!0}function ed(e,t,n){var r=!1,l=Yt,o=t.contextType;return typeof o=="object"&&o!==null?o=Je(o):(l=ze(t)?dn:Pe.current,r=t.contextTypes,o=(r=r!=null)?Wn(e,l):Yt),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ko,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function mu(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&&ko.enqueueReplaceState(t,t.state,null)}function Qi(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},ea(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=Je(o):(o=ze(t)?dn:Pe.current,l.context=Wn(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Gi(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&&ko.enqueueReplaceState(l,l.state,null),Zl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Xn(e,t){try{var n="",r=t;do n+=_p(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 li(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var rh=typeof WeakMap=="function"?WeakMap:Map;function td(e,t,n){n=Et(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){no||(no=!0,os=r),Xi(e,t)},n}function nd(e,t,n){n=Et(-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(){Xi(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Xi(e,t),typeof r!="function"&&(Wt===null?Wt=new Set([this]):Wt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function hu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new rh;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=vh.bind(null,e,t,n),t.then(e,e))}function gu(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 vu(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=Et(-1,1),t.tag=2,Bt(n,t,1))),n.lanes|=1),e)}var lh=jt.ReactCurrentOwner,De=!1;function Te(e,t,n,r){t.child=e===null?jf(t,null,n,r):Gn(t,e.child,n,r)}function yu(e,t,n,r,l){n=n.render;var o=t.ref;return Fn(t,l),r=oa(e,t,n,r,o,l),n=ia(),e!==null&&!De?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Tt(e,t,l)):(ae&&n&&Gs(t),t.flags|=1,Te(e,t,r,l),t.child)}function xu(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!ga(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,rd(e,t,o,r,l)):(e=Tl(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:jr,n(i,r)&&e.ref===t.ref)return Tt(e,t,l)}return t.flags|=1,e=Gt(o,r),e.ref=t.ref,e.return=t,t.child=e}function rd(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(jr(o,r)&&e.ref===t.ref)if(De=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(De=!0);else return t.lanes=e.lanes,Tt(e,t,l)}return Yi(e,t,n,r,l)}function ld(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},re(Dn,$e),$e|=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,re(Dn,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,re(Dn,$e),$e|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,re(Dn,$e),$e|=r;return Te(e,t,l,n),t.child}function od(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Yi(e,t,n,r,l){var o=ze(n)?dn:Pe.current;return o=Wn(t,o),Fn(t,l),n=oa(e,t,n,r,o,l),r=ia(),e!==null&&!De?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Tt(e,t,l)):(ae&&r&&Gs(t),t.flags|=1,Te(e,t,n,l),t.child)}function wu(e,t,n,r,l){if(ze(n)){var o=!0;Ul(t)}else o=!1;if(Fn(t,l),t.stateNode===null)Rl(e,t),ed(t,n,r),Qi(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var a=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Je(u):(u=ze(n)?dn:Pe.current,u=Wn(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||a!==u)&&mu(t,i,r,u),Dt=!1;var m=t.memoizedState;i.state=m,Zl(t,r,i,l),a=t.memoizedState,s!==r||m!==a||Me.current||Dt?(typeof f=="function"&&(Gi(t,n,f,r),a=t.memoizedState),(s=Dt||pu(t,n,s,r,m,a,u))?(c||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=u,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Of(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:lt(t.type,s),i.props=u,c=t.pendingProps,m=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=Je(a):(a=ze(n)?dn:Pe.current,a=Wn(t,a));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==c||m!==a)&&mu(t,i,r,a),Dt=!1,m=t.memoizedState,i.state=m,Zl(t,r,i,l);var y=t.memoizedState;s!==c||m!==y||Me.current||Dt?(typeof v=="function"&&(Gi(t,n,v,r),y=t.memoizedState),(u=Dt||pu(t,n,u,r,m,y,a)||!1)?(f||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,y,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,y,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),i.props=r,i.state=y,i.context=a,r=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Zi(e,t,n,r,o,l)}function Zi(e,t,n,r,l,o){od(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&ou(t,n,!1),Tt(e,t,o);r=t.stateNode,lh.current=t;var s=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Gn(t,e.child,null,o),t.child=Gn(t,null,s,o)):Te(e,t,s,o),t.memoizedState=r.state,l&&ou(t,n,!0),t.child}function id(e){var t=e.stateNode;t.pendingContext?lu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lu(e,t.context,!1),ta(e,t.containerInfo)}function Su(e,t,n,r,l){return Un(),Xs(l),t.flags|=256,Te(e,t,n,r),t.child}var Ji={dehydrated:null,treeContext:null,retryLane:0};function qi(e){return{baseLanes:e,cachePool:null,transitions:null}}function sd(e,t,n){var r=t.pendingProps,l=ue.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),re(ue,l&1),e===null)return Wi(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=Co(i,r,0,null),e=cn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=qi(n),t.memoizedState=Ji,e):ua(t,i));if(l=e.memoizedState,l!==null&&(s=l.dehydrated,s!==null))return oh(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=Gt(l,a),r.subtreeFlags=l.subtreeFlags&14680064),s!==null?o=Gt(s,o):(o=cn(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?qi(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Ji,r}return o=e.child,e=o.sibling,r=Gt(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 ua(e,t){return t=Co({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function cl(e,t,n,r){return r!==null&&Xs(r),Gn(t,e.child,null,n),e=ua(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oh(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=li(Error(O(422))),cl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Co({mode:"visible",children:r.children},l,0,null),o=cn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Gn(t,e.child,null,i),t.child.memoizedState=qi(i),t.memoizedState=Ji,o);if(!(t.mode&1))return cl(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=li(o,r,void 0),cl(e,t,i,r)}if(s=(i&e.childLanes)!==0,De||s){if(r=we,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,Pt(e,l),at(r,e,l,-1))}return ha(),r=li(Error(O(421))),cl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=yh.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,He=Vt(l.nextSibling),Ve=t,ae=!0,it=null,e!==null&&(Qe[Xe++]=St,Qe[Xe++]=kt,Qe[Xe++]=pn,St=e.id,kt=e.overflow,pn=t),t=ua(t,r.children),t.flags|=4096,t)}function ku(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ui(e.return,t,n)}function oi(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 ad(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Te(e,t,r.children,n),r=ue.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&&ku(e,n,t);else if(e.tag===19)ku(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(re(ue,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&&Jl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),oi(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&&Jl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}oi(t,!0,n,null,o);break;case"together":oi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Rl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hn|=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=Gt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ih(e,t,n){switch(t.tag){case 3:id(t),Un();break;case 5:If(t);break;case 1:ze(t.type)&&Ul(t);break;case 4:ta(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;re(Xl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(re(ue,ue.current&1),t.flags|=128,null):n&t.child.childLanes?sd(e,t,n):(re(ue,ue.current&1),e=Tt(e,t,n),e!==null?e.sibling:null);re(ue,ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ad(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),re(ue,ue.current),r)break;return null;case 22:case 23:return t.lanes=0,ld(e,t,n)}return Tt(e,t,n)}var ud,es,cd,fd;ud=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}};es=function(){};cd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,sn(mt.current);var o=null;switch(n){case"input":l=ki(e,l),r=ki(e,r),o=[];break;case"select":l=fe({},l,{value:void 0}),r=fe({},r,{value:void 0}),o=[];break;case"textarea":l=Ci(e,l),r=Ci(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Bl)}Ni(n,r);var i;n=null;for(u in l)if(!r.hasOwnProperty(u)&&l.hasOwnProperty(u)&&l[u]!=null)if(u==="style"){var s=l[u];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Er.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(s=l!=null?l[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="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(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Er.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&le("scroll",e),o||s===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};fd=function(e,t,n,r){n!==r&&(t.flags|=4)};function ar(e,t){if(!ae)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 Re(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 sh(e,t,n){var r=t.pendingProps;switch(Qs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return ze(t.type)&&Wl(),Re(t),null;case 3:return r=t.stateNode,Qn(),oe(Me),oe(Pe),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(al(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,it!==null&&(as(it),it=null))),es(e,t),Re(t),null;case 5:na(t);var l=sn(Mr.current);if(n=t.type,e!==null&&t.stateNode!=null)cd(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 Re(t),null}if(e=sn(mt.current),al(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[dt]=t,r[Ir]=o,e=(t.mode&1)!==0,n){case"dialog":le("cancel",r),le("close",r);break;case"iframe":case"object":case"embed":le("load",r);break;case"video":case"audio":for(l=0;l<mr.length;l++)le(mr[l],r);break;case"source":le("error",r);break;case"img":case"image":case"link":le("error",r),le("load",r);break;case"details":le("toggle",r);break;case"input":ja(r,o),le("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},le("invalid",r);break;case"textarea":Oa(r,o),le("invalid",r)}Ni(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&&sl(r.textContent,s,e),l=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&sl(r.textContent,s,e),l=["children",""+s]):Er.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&le("scroll",r)}switch(n){case"input":qr(r),La(r,o,!0);break;case"textarea":qr(r),Ia(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Bl)}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=Ac(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[dt]=t,e[Ir]=r,ud(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pi(n,r),n){case"dialog":le("cancel",e),le("close",e),l=r;break;case"iframe":case"object":case"embed":le("load",e),l=r;break;case"video":case"audio":for(l=0;l<mr.length;l++)le(mr[l],e);l=r;break;case"source":le("error",e),l=r;break;case"img":case"image":case"link":le("error",e),le("load",e),l=r;break;case"details":le("toggle",e),l=r;break;case"input":ja(e,r),l=ki(e,r),le("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=fe({},r,{value:void 0}),le("invalid",e);break;case"textarea":Oa(e,r),l=Ci(e,r),le("invalid",e);break;default:l=r}Ni(n,l),s=l;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?Fc(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Kc(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Cr(e,a):typeof a=="number"&&Cr(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Er.hasOwnProperty(o)?a!=null&&o==="onScroll"&&le("scroll",e):a!=null&&Os(e,o,a,i))}switch(n){case"input":qr(e),La(e,r,!1);break;case"textarea":qr(e),Ia(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Xt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?zn(e,!!r.multiple,o,!1):r.defaultValue!=null&&zn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Bl)}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 Re(t),null;case 6:if(e&&t.stateNode!=null)fd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=sn(Mr.current),sn(mt.current),al(t)){if(r=t.stateNode,n=t.memoizedProps,r[dt]=t,(o=r.nodeValue!==n)&&(e=Ve,e!==null))switch(e.tag){case 3:sl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&sl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dt]=t,t.stateNode=r}return Re(t),null;case 13:if(oe(ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&He!==null&&t.mode&1&&!(t.flags&128))Tf(),Un(),t.flags|=98560,o=!1;else if(o=al(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[dt]=t}else Un(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),o=!1}else it!==null&&(as(it),it=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||ue.current&1?ye===0&&(ye=3):ha())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Qn(),es(e,t),e===null&&Lr(t.stateNode.containerInfo),Re(t),null;case 10:return Js(t.type._context),Re(t),null;case 17:return ze(t.type)&&Wl(),Re(t),null;case 19:if(oe(ue),o=t.memoizedState,o===null)return Re(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)ar(o,!1);else{if(ye!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Jl(e),i!==null){for(t.flags|=128,ar(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 re(ue,ue.current&1|2),t.child}e=e.sibling}o.tail!==null&&me()>Yn&&(t.flags|=128,r=!0,ar(o,!1),t.lanes=4194304)}else{if(!r)if(e=Jl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ar(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ae)return Re(t),null}else 2*me()-o.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,ar(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=me(),t.sibling=null,n=ue.current,re(ue,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return ma(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function ah(e,t){switch(Qs(t),t.tag){case 1:return ze(t.type)&&Wl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),oe(Me),oe(Pe),ra(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return na(t),null;case 13:if(oe(ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(ue),null;case 4:return Qn(),null;case 10:return Js(t.type._context),null;case 22:case 23:return ma(),null;case 24:return null;default:return null}}var fl=!1,Ne=!1,uh=typeof WeakSet=="function"?WeakSet:Set,K=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){de(e,t,r)}else n.current=null}function ts(e,t,n){try{n()}catch(r){de(e,t,r)}}var bu=!1;function ch(e,t){if(Ai=Fl,e=gf(),Us(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,u=0,f=0,c=e,m=null;t:for(;;){for(var v;c!==n||l!==0&&c.nodeType!==3||(s=i+l),c!==o||r!==0&&c.nodeType!==3||(a=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(v=c.firstChild)!==null;)m=c,c=v;for(;;){if(c===e)break t;if(m===n&&++u===l&&(s=i),m===o&&++f===r&&(a=i),(v=c.nextSibling)!==null)break;c=m,m=c.parentNode}c=v}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ki={focusedElem:e,selectionRange:n},Fl=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,b=y.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:lt(t.type,x),b);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(w){de(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return y=bu,bu=!1,y}function Sr(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&&ts(t,n,o)}l=l.next}while(l!==r)}}function bo(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 ns(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 dd(e){var t=e.alternate;t!==null&&(e.alternate=null,dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dt],delete t[Ir],delete t[Hi],delete t[Um],delete t[Gm])),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 pd(e){return e.tag===5||e.tag===3||e.tag===4}function Eu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pd(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 rs(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=Bl));else if(r!==4&&(e=e.child,e!==null))for(rs(e,t,n),e=e.sibling;e!==null;)rs(e,t,n),e=e.sibling}function ls(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(ls(e,t,n),e=e.sibling;e!==null;)ls(e,t,n),e=e.sibling}var ke=null,ot=!1;function Lt(e,t,n){for(n=n.child;n!==null;)md(e,t,n),n=n.sibling}function md(e,t,n){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(ho,n)}catch{}switch(n.tag){case 5:Ne||In(n,t);case 6:var r=ke,l=ot;ke=null,Lt(e,t,n),ke=r,ot=l,ke!==null&&(ot?(e=ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ke.removeChild(n.stateNode));break;case 18:ke!==null&&(ot?(e=ke,n=n.stateNode,e.nodeType===8?Jo(e.parentNode,n):e.nodeType===1&&Jo(e,n),Tr(e)):Jo(ke,n.stateNode));break;case 4:r=ke,l=ot,ke=n.stateNode.containerInfo,ot=!0,Lt(e,t,n),ke=r,ot=l;break;case 0:case 11:case 14:case 15:if(!Ne&&(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)&&ts(n,t,i),l=l.next}while(l!==r)}Lt(e,t,n);break;case 1:if(!Ne&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){de(n,t,s)}Lt(e,t,n);break;case 21:Lt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Lt(e,t,n),Ne=r):Lt(e,t,n);break;default:Lt(e,t,n)}}function Cu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uh),t.forEach(function(r){var l=xh.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function rt(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:ke=s.stateNode,ot=!1;break e;case 3:ke=s.stateNode.containerInfo,ot=!0;break e;case 4:ke=s.stateNode.containerInfo,ot=!0;break e}s=s.return}if(ke===null)throw Error(O(160));md(o,i,l),ke=null,ot=!1;var a=l.alternate;a!==null&&(a.return=null),l.return=null}catch(u){de(l,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)hd(t,e),t=t.sibling}function hd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(rt(t,e),ct(e),r&4){try{Sr(3,e,e.return),bo(3,e)}catch(x){de(e,e.return,x)}try{Sr(5,e,e.return)}catch(x){de(e,e.return,x)}}break;case 1:rt(t,e),ct(e),r&512&&n!==null&&In(n,n.return);break;case 5:if(rt(t,e),ct(e),r&512&&n!==null&&In(n,n.return),e.flags&32){var l=e.stateNode;try{Cr(l,"")}catch(x){de(e,e.return,x)}}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&&Mc(l,o),Pi(s,i);var u=Pi(s,o);for(i=0;i<a.length;i+=2){var f=a[i],c=a[i+1];f==="style"?Fc(l,c):f==="dangerouslySetInnerHTML"?Kc(l,c):f==="children"?Cr(l,c):Os(l,f,c,u)}switch(s){case"input":bi(l,o);break;case"textarea":zc(l,o);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var v=o.value;v!=null?zn(l,!!o.multiple,v,!1):m!==!!o.multiple&&(o.defaultValue!=null?zn(l,!!o.multiple,o.defaultValue,!0):zn(l,!!o.multiple,o.multiple?[]:"",!1))}l[Ir]=o}catch(x){de(e,e.return,x)}}break;case 6:if(rt(t,e),ct(e),r&4){if(e.stateNode===null)throw Error(O(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(x){de(e,e.return,x)}}break;case 3:if(rt(t,e),ct(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(x){de(e,e.return,x)}break;case 4:rt(t,e),ct(e);break;case 13:rt(t,e),ct(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(da=me())),r&4&&Cu(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ne=(u=Ne)||f,rt(t,e),Ne=u):rt(t,e),ct(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(K=e,f=e.child;f!==null;){for(c=K=f;K!==null;){switch(m=K,v=m.child,m.tag){case 0:case 11:case 14:case 15:Sr(4,m,m.return);break;case 1:In(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(x){de(r,n,x)}}break;case 5:In(m,m.return);break;case 22:if(m.memoizedState!==null){Nu(c);continue}}v!==null?(v.return=m,K=v):Nu(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{l=c.stateNode,u?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=c.stateNode,a=c.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=$c("display",i))}catch(x){de(e,e.return,x)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(x){de(e,e.return,x)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:rt(t,e),ct(e),r&4&&Cu(e);break;case 21:break;default:rt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(pd(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&&(Cr(l,""),r.flags&=-33);var o=Eu(e);ls(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,s=Eu(e);rs(e,s,i);break;default:throw Error(O(161))}}catch(a){de(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fh(e,t,n){K=e,gd(e)}function gd(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var l=K,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||fl;if(!i){var s=l.alternate,a=s!==null&&s.memoizedState!==null||Ne;s=fl;var u=Ne;if(fl=i,(Ne=a)&&!u)for(K=l;K!==null;)i=K,a=i.child,i.tag===22&&i.memoizedState!==null?Pu(l):a!==null?(a.return=i,K=a):Pu(l);for(;o!==null;)K=o,gd(o),o=o.sibling;K=l,fl=s,Ne=u}Ru(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,K=o):Ru(e)}}function Ru(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ne||bo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:lt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&cu(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}cu(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 u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Tr(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ne||t.flags&512&&ns(t)}catch(m){de(t,t.return,m)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function Nu(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Pu(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bo(4,t)}catch(a){de(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(a){de(t,l,a)}}var o=t.return;try{ns(t)}catch(a){de(t,o,a)}break;case 5:var i=t.return;try{ns(t)}catch(a){de(t,i,a)}}}catch(a){de(t,t.return,a)}if(t===e){K=null;break}var s=t.sibling;if(s!==null){s.return=t.return,K=s;break}K=t.return}}var dh=Math.ceil,to=jt.ReactCurrentDispatcher,ca=jt.ReactCurrentOwner,Ze=jt.ReactCurrentBatchConfig,q=0,we=null,ge=null,be=0,$e=0,Dn=qt(0),ye=0,$r=null,hn=0,Eo=0,fa=0,kr=null,Ie=null,da=0,Yn=1/0,yt=null,no=!1,os=null,Wt=null,dl=!1,Kt=null,ro=0,br=0,is=null,Nl=-1,Pl=0;function _e(){return q&6?me():Nl!==-1?Nl:Nl=me()}function Ut(e){return e.mode&1?q&2&&be!==0?be&-be:Xm.transition!==null?(Pl===0&&(Pl=qc()),Pl):(e=te,e!==0||(e=window.event,e=e===void 0?16:sf(e.type)),e):1}function at(e,t,n,r){if(50<br)throw br=0,is=null,Error(O(185));Br(e,n,r),(!(q&2)||e!==we)&&(e===we&&(!(q&2)&&(Eo|=n),ye===4&&zt(e,be)),Ae(e,r),n===1&&q===0&&!(t.mode&1)&&(Yn=me()+500,wo&&en()))}function Ae(e,t){var n=e.callbackNode;Xp(e,t);var r=$l(e,e===we?be:0);if(r===0)n!==null&&za(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&za(n),t===1)e.tag===0?Qm(Tu.bind(null,e)):Rf(Tu.bind(null,e)),Bm(function(){!(q&6)&&en()}),n=null;else{switch(ef(r)){case 1:n=As;break;case 4:n=Zc;break;case 16:n=Kl;break;case 536870912:n=Jc;break;default:n=Kl}n=Ed(n,vd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function vd(e,t){if(Nl=-1,Pl=0,q&6)throw Error(O(327));var n=e.callbackNode;if(Hn()&&e.callbackNode!==n)return null;var r=$l(e,e===we?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=lo(e,r);else{t=r;var l=q;q|=2;var o=xd();(we!==e||be!==t)&&(yt=null,Yn=me()+500,un(e,t));do try{hh();break}catch(s){yd(e,s)}while(!0);Zs(),to.current=o,q=l,ge!==null?t=0:(we=null,be=0,t=ye)}if(t!==0){if(t===2&&(l=Oi(e),l!==0&&(r=l,t=ss(e,l))),t===1)throw n=$r,un(e,0),zt(e,r),Ae(e,me()),n;if(t===6)zt(e,r);else{if(l=e.current.alternate,!(r&30)&&!ph(l)&&(t=lo(e,r),t===2&&(o=Oi(e),o!==0&&(r=o,t=ss(e,o))),t===1))throw n=$r,un(e,0),zt(e,r),Ae(e,me()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:rn(e,Ie,yt);break;case 3:if(zt(e,r),(r&130023424)===r&&(t=da+500-me(),10<t)){if($l(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Fi(rn.bind(null,e,Ie,yt),t);break}rn(e,Ie,yt);break;case 4:if(zt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-st(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dh(r/1960))-r,10<r){e.timeoutHandle=Fi(rn.bind(null,e,Ie,yt),r);break}rn(e,Ie,yt);break;case 5:rn(e,Ie,yt);break;default:throw Error(O(329))}}}return Ae(e,me()),e.callbackNode===n?vd.bind(null,e):null}function ss(e,t){var n=kr;return e.current.memoizedState.isDehydrated&&(un(e,t).flags|=256),e=lo(e,t),e!==2&&(t=Ie,Ie=n,t!==null&&as(t)),e}function as(e){Ie===null?Ie=e:Ie.push.apply(Ie,e)}function ph(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(!ut(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 zt(e,t){for(t&=~fa,t&=~Eo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function Tu(e){if(q&6)throw Error(O(327));Hn();var t=$l(e,0);if(!(t&1))return Ae(e,me()),null;var n=lo(e,t);if(e.tag!==0&&n===2){var r=Oi(e);r!==0&&(t=r,n=ss(e,r))}if(n===1)throw n=$r,un(e,0),zt(e,t),Ae(e,me()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,rn(e,Ie,yt),Ae(e,me()),null}function pa(e,t){var n=q;q|=1;try{return e(t)}finally{q=n,q===0&&(Yn=me()+500,wo&&en())}}function gn(e){Kt!==null&&Kt.tag===0&&!(q&6)&&Hn();var t=q;q|=1;var n=Ze.transition,r=te;try{if(Ze.transition=null,te=1,e)return e()}finally{te=r,Ze.transition=n,q=t,!(q&6)&&en()}}function ma(){$e=Dn.current,oe(Dn)}function un(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vm(n)),ge!==null)for(n=ge.return;n!==null;){var r=n;switch(Qs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wl();break;case 3:Qn(),oe(Me),oe(Pe),ra();break;case 5:na(r);break;case 4:Qn();break;case 13:oe(ue);break;case 19:oe(ue);break;case 10:Js(r.type._context);break;case 22:case 23:ma()}n=n.return}if(we=e,ge=e=Gt(e.current,null),be=$e=t,ye=0,$r=null,fa=Eo=hn=0,Ie=kr=null,on!==null){for(t=0;t<on.length;t++)if(n=on[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}on=null}return e}function yd(e,t){do{var n=ge;try{if(Zs(),El.current=eo,ql){for(var r=ce.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}ql=!1}if(mn=0,xe=ve=ce=null,wr=!1,zr=0,ca.current=null,n===null||n.return===null){ye=1,$r=t,ge=null;break}e:{var o=e,i=n.return,s=n,a=t;if(t=be,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,f=s,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=gu(i);if(v!==null){v.flags&=-257,vu(v,i,s,o,t),v.mode&1&&hu(o,u,t),t=v,a=u;var y=t.updateQueue;if(y===null){var x=new Set;x.add(a),t.updateQueue=x}else y.add(a);break e}else{if(!(t&1)){hu(o,u,t),ha();break e}a=Error(O(426))}}else if(ae&&s.mode&1){var b=gu(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),vu(b,i,s,o,t),Xs(Xn(a,s));break e}}o=a=Xn(a,s),ye!==4&&(ye=2),kr===null?kr=[o]:kr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=td(o,a,t);uu(o,p);break e;case 1:s=a;var d=o.type,h=o.stateNode;if(!(o.flags&128)&&(typeof d.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Wt===null||!Wt.has(h)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=nd(o,s,t);uu(o,w);break e}}o=o.return}while(o!==null)}Sd(n)}catch(R){t=R,ge===n&&n!==null&&(ge=n=n.return);continue}break}while(!0)}function xd(){var e=to.current;return to.current=eo,e===null?eo:e}function ha(){(ye===0||ye===3||ye===2)&&(ye=4),we===null||!(hn&268435455)&&!(Eo&268435455)||zt(we,be)}function lo(e,t){var n=q;q|=2;var r=xd();(we!==e||be!==t)&&(yt=null,un(e,t));do try{mh();break}catch(l){yd(e,l)}while(!0);if(Zs(),q=n,to.current=r,ge!==null)throw Error(O(261));return we=null,be=0,ye}function mh(){for(;ge!==null;)wd(ge)}function hh(){for(;ge!==null&&!$p();)wd(ge)}function wd(e){var t=bd(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?Sd(e):ge=t,ca.current=null}function Sd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ah(n,t),n!==null){n.flags&=32767,ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ye=6,ge=null;return}}else if(n=sh(n,t,$e),n!==null){ge=n;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);ye===0&&(ye=5)}function rn(e,t,n){var r=te,l=Ze.transition;try{Ze.transition=null,te=1,gh(e,t,n,r)}finally{Ze.transition=l,te=r}return null}function gh(e,t,n,r){do Hn();while(Kt!==null);if(q&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(Yp(e,o),e===we&&(ge=we=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||dl||(dl=!0,Ed(Kl,function(){return Hn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ze.transition,Ze.transition=null;var i=te;te=1;var s=q;q|=4,ca.current=null,ch(e,n),hd(n,e),Mm(Ki),Fl=!!Ai,Ki=Ai=null,e.current=n,fh(n),Fp(),q=s,te=i,Ze.transition=o}else e.current=n;if(dl&&(dl=!1,Kt=e,ro=l),o=e.pendingLanes,o===0&&(Wt=null),Bp(n.stateNode),Ae(e,me()),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(no)throw no=!1,e=os,os=null,e;return ro&1&&e.tag!==0&&Hn(),o=e.pendingLanes,o&1?e===is?br++:(br=0,is=e):br=0,en(),null}function Hn(){if(Kt!==null){var e=ef(ro),t=Ze.transition,n=te;try{if(Ze.transition=null,te=16>e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,ro=0,q&6)throw Error(O(331));var l=q;for(q|=4,K=e.current;K!==null;){var o=K,i=o.child;if(K.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(K=u;K!==null;){var f=K;switch(f.tag){case 0:case 11:case 15:Sr(8,f,o)}var c=f.child;if(c!==null)c.return=f,K=c;else for(;K!==null;){f=K;var m=f.sibling,v=f.return;if(dd(f),f===u){K=null;break}if(m!==null){m.return=v,K=m;break}K=v}}}var y=o.alternate;if(y!==null){var x=y.child;if(x!==null){y.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}K=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,K=i;else e:for(;K!==null;){if(o=K,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Sr(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,K=p;break e}K=o.return}}var d=e.current;for(K=d;K!==null;){i=K;var h=i.child;if(i.subtreeFlags&2064&&h!==null)h.return=i,K=h;else e:for(i=d;K!==null;){if(s=K,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:bo(9,s)}}catch(R){de(s,s.return,R)}if(s===i){K=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,K=w;break e}K=s.return}}if(q=l,en(),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(ho,e)}catch{}r=!0}return r}finally{te=n,Ze.transition=t}}return!1}function _u(e,t,n){t=Xn(n,t),t=td(e,t,1),e=Bt(e,t,1),t=_e(),e!==null&&(Br(e,1,t),Ae(e,t))}function de(e,t,n){if(e.tag===3)_u(e,e,n);else for(;t!==null;){if(t.tag===3){_u(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wt===null||!Wt.has(r))){e=Xn(n,e),e=nd(t,e,1),t=Bt(t,e,1),e=_e(),t!==null&&(Br(t,1,e),Ae(t,e));break}}t=t.return}}function vh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,we===e&&(be&n)===n&&(ye===4||ye===3&&(be&130023424)===be&&500>me()-da?un(e,0):fa|=n),Ae(e,t)}function kd(e,t){t===0&&(e.mode&1?(t=nl,nl<<=1,!(nl&130023424)&&(nl=4194304)):t=1);var n=_e();e=Pt(e,t),e!==null&&(Br(e,t,n),Ae(e,n))}function yh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kd(e,n)}function xh(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),kd(e,n)}var bd;bd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)De=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return De=!1,ih(e,t,n);De=!!(e.flags&131072)}else De=!1,ae&&t.flags&1048576&&Nf(t,Ql,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rl(e,t),e=t.pendingProps;var l=Wn(t,Pe.current);Fn(t,n),l=oa(null,t,r,e,l,n);var o=ia();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,ze(r)?(o=!0,Ul(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ea(t),l.updater=ko,t.stateNode=l,l._reactInternals=t,Qi(t,r,e,n),t=Zi(null,t,r,!0,o,n)):(t.tag=0,ae&&o&&Gs(t),Te(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Sh(r),e=lt(r,e),l){case 0:t=Yi(null,t,r,e,n);break e;case 1:t=wu(null,t,r,e,n);break e;case 11:t=yu(null,t,r,e,n);break e;case 14:t=xu(null,t,r,lt(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:lt(r,l),Yi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),wu(e,t,r,l,n);case 3:e:{if(id(t),e===null)throw Error(O(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Of(e,t),Zl(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=Xn(Error(O(423)),t),t=Su(e,t,r,n,l);break e}else if(r!==l){l=Xn(Error(O(424)),t),t=Su(e,t,r,n,l);break e}else for(He=Vt(t.stateNode.containerInfo.firstChild),Ve=t,ae=!0,it=null,n=jf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===l){t=Tt(e,t,n);break e}Te(e,t,r,n)}t=t.child}return t;case 5:return If(t),e===null&&Wi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,$i(r,l)?i=null:o!==null&&$i(r,o)&&(t.flags|=32),od(e,t),Te(e,t,i,n),t.child;case 6:return e===null&&Wi(t),null;case 13:return sd(e,t,n);case 4:return ta(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gn(t,null,r,n):Te(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),yu(e,t,r,l,n);case 7:return Te(e,t,t.pendingProps,n),t.child;case 8:return Te(e,t,t.pendingProps.children,n),t.child;case 12:return Te(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,re(Xl,r._currentValue),r._currentValue=i,o!==null)if(ut(o.value,i)){if(o.children===l.children&&!Me.current){t=Tt(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=Et(-1,n&-n),a.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ui(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),Ui(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}Te(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Fn(t,n),l=Je(l),r=r(l),t.flags|=1,Te(e,t,r,n),t.child;case 14:return r=t.type,l=lt(r,t.pendingProps),l=lt(r.type,l),xu(e,t,r,l,n);case 15:return rd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Rl(e,t),t.tag=1,ze(r)?(e=!0,Ul(t)):e=!1,Fn(t,n),ed(t,r,l),Qi(t,r,l,n),Zi(null,t,r,!0,e,n);case 19:return ad(e,t,n);case 22:return ld(e,t,n)}throw Error(O(156,t.tag))};function Ed(e,t){return Yc(e,t)}function wh(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 Ye(e,t,n,r){return new wh(e,t,n,r)}function ga(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sh(e){if(typeof e=="function")return ga(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ds)return 11;if(e===Ms)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=Ye(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 Tl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")ga(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Cn:return cn(n.children,l,o,t);case Is:i=8,l|=8;break;case yi:return e=Ye(12,n,t,l|2),e.elementType=yi,e.lanes=o,e;case xi:return e=Ye(13,n,t,l),e.elementType=xi,e.lanes=o,e;case wi:return e=Ye(19,n,t,l),e.elementType=wi,e.lanes=o,e;case Oc:return Co(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jc:i=10;break e;case Lc:i=9;break e;case Ds:i=11;break e;case Ms:i=14;break e;case It:i=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=Ye(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function cn(e,t,n,r){return e=Ye(7,e,r,t),e.lanes=n,e}function Co(e,t,n,r){return e=Ye(22,e,r,t),e.elementType=Oc,e.lanes=n,e.stateNode={isHidden:!1},e}function ii(e,t,n){return e=Ye(6,e,null,t),e.lanes=n,e}function si(e,t,n){return t=Ye(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kh(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=Fo(0),this.expirationTimes=Fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function va(e,t,n,r,l,o,i,s,a){return e=new kh(e,t,n,s,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ye(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ea(o),e}function bh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:En,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cd(e){if(!e)return Yt;e=e._reactInternals;e:{if(xn(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(ze(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(ze(n))return Cf(e,n,t)}return t}function Rd(e,t,n,r,l,o,i,s,a){return e=va(n,r,!0,e,l,o,i,s,a),e.context=Cd(null),n=e.current,r=_e(),l=Ut(n),o=Et(r,l),o.callback=t??null,Bt(n,o,l),e.current.lanes=l,Br(e,l,r),Ae(e,r),e}function Ro(e,t,n,r){var l=t.current,o=_e(),i=Ut(l);return n=Cd(n),t.context===null?t.context=n:t.pendingContext=n,t=Et(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bt(l,t,i),e!==null&&(at(e,l,i,o),bl(e,l,i)),i}function oo(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 ju(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ya(e,t){ju(e,t),(e=e.alternate)&&ju(e,t)}function Eh(){return null}var Nd=typeof reportError=="function"?reportError:function(e){console.error(e)};function xa(e){this._internalRoot=e}No.prototype.render=xa.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));Ro(e,t,null,null)};No.prototype.unmount=xa.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gn(function(){Ro(null,e,null,null)}),t[Nt]=null}};function No(e){this._internalRoot=e}No.prototype.unstable_scheduleHydration=function(e){if(e){var t=rf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mt.length&&t!==0&&t<Mt[n].priority;n++);Mt.splice(n,0,e),n===0&&of(e)}};function wa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Po(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lu(){}function Ch(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var u=oo(i);o.call(u)}}var i=Rd(t,r,e,0,null,!1,!1,"",Lu);return e._reactRootContainer=i,e[Nt]=i.current,Lr(e.nodeType===8?e.parentNode:e),gn(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var s=r;r=function(){var u=oo(a);s.call(u)}}var a=va(e,0,!1,null,null,!1,!1,"",Lu);return e._reactRootContainer=a,e[Nt]=a.current,Lr(e.nodeType===8?e.parentNode:e),gn(function(){Ro(t,a,n,r)}),a}function To(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=oo(i);s.call(a)}}Ro(t,i,e,l)}else i=Ch(n,t,e,l,r);return oo(i)}tf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=pr(t.pendingLanes);n!==0&&(Ks(t,n|1),Ae(t,me()),!(q&6)&&(Yn=me()+500,en()))}break;case 13:gn(function(){var r=Pt(e,1);if(r!==null){var l=_e();at(r,e,1,l)}}),ya(e,1)}};$s=function(e){if(e.tag===13){var t=Pt(e,134217728);if(t!==null){var n=_e();at(t,e,134217728,n)}ya(e,134217728)}};nf=function(e){if(e.tag===13){var t=Ut(e),n=Pt(e,t);if(n!==null){var r=_e();at(n,e,t,r)}ya(e,t)}};rf=function(){return te};lf=function(e,t){var n=te;try{return te=e,t()}finally{te=n}};_i=function(e,t,n){switch(t){case"input":if(bi(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=xo(r);if(!l)throw Error(O(90));Dc(r),bi(r,l)}}}break;case"textarea":zc(e,n);break;case"select":t=n.value,t!=null&&zn(e,!!n.multiple,t,!1)}};Bc=pa;Wc=gn;var Rh={usingClientEntryPoint:!1,Events:[Ur,Tn,xo,Hc,Vc,pa]},ur={findFiberByHostInstance:ln,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nh={bundleType:ur.bundleType,version:ur.version,rendererPackageName:ur.rendererPackageName,rendererConfig:ur.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Qc(e),e===null?null:e.stateNode},findFiberByHostInstance:ur.findFiberByHostInstance||Eh,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 pl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pl.isDisabled&&pl.supportsFiber)try{ho=pl.inject(Nh),pt=pl}catch{}}Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rh;Ue.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wa(t))throw Error(O(200));return bh(e,t,null,n)};Ue.createRoot=function(e,t){if(!wa(e))throw Error(O(299));var n=!1,r="",l=Nd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=va(e,1,!1,null,null,n,!1,r,l),e[Nt]=t.current,Lr(e.nodeType===8?e.parentNode:e),new xa(t)};Ue.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=Qc(t),e=e===null?null:e.stateNode,e};Ue.flushSync=function(e){return gn(e)};Ue.hydrate=function(e,t,n){if(!Po(t))throw Error(O(200));return To(null,e,t,!0,n)};Ue.hydrateRoot=function(e,t,n){if(!wa(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=Nd;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Rd(t,null,e,1,n??null,l,!1,o,i),e[Nt]=t.current,Lr(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 No(t)};Ue.render=function(e,t,n){if(!Po(t))throw Error(O(200));return To(null,e,t,!1,n)};Ue.unmountComponentAtNode=function(e){if(!Po(e))throw Error(O(40));return e._reactRootContainer?(gn(function(){To(null,null,e,!1,function(){e._reactRootContainer=null,e[Nt]=null})}),!0):!1};Ue.unstable_batchedUpdates=pa;Ue.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Po(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return To(e,t,n,!1,r)};Ue.version="18.3.1-next-f1338f8080-20240426";function Pd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Pd)}catch(e){console.error(e)}}Pd(),Nc.exports=Ue;var _o=Nc.exports,Ou=_o;gi.createRoot=Ou.createRoot,gi.hydrateRoot=Ou.hydrateRoot;const Ph="modulepreload",Th=function(e){return"/panel/"+e},Iu={},_h=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=Th(a),a in Iu)return;Iu[a]=!0;const u=a.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":Ph,u||(c.as="script"),c.crossOrigin="",c.href=a,s&&c.setAttribute("nonce",s),document.head.appendChild(c),u)return new Promise((m,v)=>{c.addEventListener("load",m),c.addEventListener("error",()=>v(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 ai(e){return e==="colors"?"color":e!==null?"scalar":"enum"}const Du=[{prefix:"px-",category:"spacing",themeKey:"spacing"},{prefix:"py-",category:"spacing",themeKey:"spacing"},{prefix:"pt-",category:"spacing",themeKey:"spacing"},{prefix:"pr-",category:"spacing",themeKey:"spacing"},{prefix:"pb-",category:"spacing",themeKey:"spacing"},{prefix:"pl-",category:"spacing",themeKey:"spacing"},{prefix:"ps-",category:"spacing",themeKey:"spacing"},{prefix:"pe-",category:"spacing",themeKey:"spacing"},{prefix:"p-",category:"spacing",themeKey:"spacing"},{prefix:"mx-",category:"spacing",themeKey:"spacing"},{prefix:"my-",category:"spacing",themeKey:"spacing"},{prefix:"mt-",category:"spacing",themeKey:"spacing"},{prefix:"mr-",category:"spacing",themeKey:"spacing"},{prefix:"mb-",category:"spacing",themeKey:"spacing"},{prefix:"ml-",category:"spacing",themeKey:"spacing"},{prefix:"ms-",category:"spacing",themeKey:"spacing"},{prefix:"me-",category:"spacing",themeKey:"spacing"},{prefix:"m-",category:"spacing",themeKey:"spacing"},{prefix:"gap-x-",category:"spacing",themeKey:"spacing"},{prefix:"gap-y-",category:"spacing",themeKey:"spacing"},{prefix:"gap-",category:"spacing",themeKey:"spacing"},{prefix:"space-x-",category:"spacing",themeKey:"spacing"},{prefix:"space-y-",category:"spacing",themeKey:"spacing"},{prefix:"min-w-",category:"sizing",themeKey:"spacing"},{prefix:"max-w-",category:"sizing",themeKey:"spacing"},{prefix:"min-h-",category:"sizing",themeKey:"spacing"},{prefix:"max-h-",category:"sizing",themeKey:"spacing"},{prefix:"size-",category:"sizing",themeKey:"spacing"},{prefix:"w-",category:"sizing",themeKey:"spacing"},{prefix:"h-",category:"sizing",themeKey:"spacing"},{prefix:"bg-gradient-to-",category:"gradient",themeKey:null},{prefix:"bg-",category:"color",themeKey:"colors"},{prefix:"from-",category:"gradient",themeKey:"colors"},{prefix:"via-",category:"gradient",themeKey:"colors"},{prefix:"to-",category:"gradient",themeKey:"colors"},{prefix:"ring-",category:"color",themeKey:"colors"},{prefix:"outline-",category:"color",themeKey:"colors"},{prefix:"fill-",category:"color",themeKey:"colors"},{prefix:"stroke-",category:"color",themeKey:"colors"},{prefix:"decoration-",category:"color",themeKey:"colors"},{prefix:"font-",category:"typography",themeKey:"fontWeight"},{prefix:"leading-",category:"typography",themeKey:"lineHeight"},{prefix:"tracking-",category:"typography",themeKey:"letterSpacing"},{prefix:"rounded-tl-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-tr-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-br-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-bl-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-t-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-r-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-b-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-l-",category:"borders",themeKey:"borderRadius"},{prefix:"rounded-",category:"borders",themeKey:"borderRadius"},{prefix:"border-t-",category:"borders",themeKey:"borderWidth"},{prefix:"border-r-",category:"borders",themeKey:"borderWidth"},{prefix:"border-b-",category:"borders",themeKey:"borderWidth"},{prefix:"border-l-",category:"borders",themeKey:"borderWidth"},{prefix:"opacity-",category:"effects",themeKey:null},{prefix:"shadow-",category:"effects",themeKey:null},{prefix:"inset-",category:"layout",themeKey:"spacing"},{prefix:"top-",category:"layout",themeKey:"spacing"},{prefix:"right-",category:"layout",themeKey:"spacing"},{prefix:"bottom-",category:"layout",themeKey:"spacing"},{prefix:"left-",category:"layout",themeKey:"spacing"},{prefix:"z-",category:"layout",themeKey:null},{prefix:"basis-",category:"flexbox",themeKey:"spacing"},{prefix:"grid-cols-",category:"flexbox",themeKey:null},{prefix:"grid-rows-",category:"flexbox",themeKey:null},{prefix:"col-span-",category:"flexbox",themeKey:null},{prefix:"row-span-",category:"flexbox",themeKey:null},{prefix:"order-",category:"flexbox",themeKey:null}].sort((e,t)=>t.prefix.length-e.prefix.length),jh=new Set(["0","2","4","8"]),Lh=new Set(["solid","dashed","dotted","double","hidden","none"]),Oh=new Set(["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"]),Ih=new Set(["left","center","right","justify","start","end"]),Dh={rounded:{category:"borders",themeKey:"borderRadius"},border:{category:"borders",themeKey:"borderWidth"},shadow:{category:"effects",themeKey:null},underline:{category:"typography",themeKey:null},overline:{category:"typography",themeKey:null},"line-through":{category:"typography",themeKey:null},"no-underline":{category:"typography",themeKey:null},uppercase:{category:"typography",themeKey:null},lowercase:{category:"typography",themeKey:null},capitalize:{category:"typography",themeKey:null},"normal-case":{category:"typography",themeKey:null},truncate:{category:"typography",themeKey:null},italic:{category:"typography",themeKey:null},"not-italic":{category:"typography",themeKey:null},"font-sans":{category:"typography",themeKey:null},"font-serif":{category:"typography",themeKey:null},"font-mono":{category:"typography",themeKey:null},"align-baseline":{category:"typography",themeKey:null},"align-top":{category:"typography",themeKey:null},"align-middle":{category:"typography",themeKey:null},"align-bottom":{category:"typography",themeKey:null},"align-text-top":{category:"typography",themeKey:null},"align-text-bottom":{category:"typography",themeKey:null},"align-sub":{category:"typography",themeKey:null},"align-super":{category:"typography",themeKey:null},block:{category:"layout",themeKey:null},"inline-block":{category:"layout",themeKey:null},inline:{category:"layout",themeKey:null},flex:{category:"layout",themeKey:null},"inline-flex":{category:"layout",themeKey:null},grid:{category:"layout",themeKey:null},"inline-grid":{category:"layout",themeKey:null},hidden:{category:"layout",themeKey:null},table:{category:"layout",themeKey:null},contents:{category:"layout",themeKey:null},static:{category:"layout",themeKey:null},fixed:{category:"layout",themeKey:null},absolute:{category:"layout",themeKey:null},relative:{category:"layout",themeKey:null},sticky:{category:"layout",themeKey:null},"flex-row":{category:"flexbox",themeKey:null},"flex-row-reverse":{category:"flexbox",themeKey:null},"flex-col":{category:"flexbox",themeKey:null},"flex-col-reverse":{category:"flexbox",themeKey:null},"flex-wrap":{category:"flexbox",themeKey:null},"flex-wrap-reverse":{category:"flexbox",themeKey:null},"flex-nowrap":{category:"flexbox",themeKey:null},"flex-1":{category:"flexbox",themeKey:null},"flex-auto":{category:"flexbox",themeKey:null},"flex-initial":{category:"flexbox",themeKey:null},"flex-none":{category:"flexbox",themeKey:null},grow:{category:"flexbox",themeKey:null},"grow-0":{category:"flexbox",themeKey:null},shrink:{category:"flexbox",themeKey:null},"shrink-0":{category:"flexbox",themeKey:null},"justify-start":{category:"flexbox",themeKey:null},"justify-end":{category:"flexbox",themeKey:null},"justify-center":{category:"flexbox",themeKey:null},"justify-between":{category:"flexbox",themeKey:null},"justify-around":{category:"flexbox",themeKey:null},"justify-evenly":{category:"flexbox",themeKey:null},"justify-stretch":{category:"flexbox",themeKey:null},"items-start":{category:"flexbox",themeKey:null},"items-end":{category:"flexbox",themeKey:null},"items-center":{category:"flexbox",themeKey:null},"items-baseline":{category:"flexbox",themeKey:null},"items-stretch":{category:"flexbox",themeKey:null},"self-auto":{category:"flexbox",themeKey:null},"self-start":{category:"flexbox",themeKey:null},"self-end":{category:"flexbox",themeKey:null},"self-center":{category:"flexbox",themeKey:null},"self-stretch":{category:"flexbox",themeKey:null},"self-baseline":{category:"flexbox",themeKey:null}},Mh=/^(sm:|md:|lg:|xl:|2xl:|hover:|focus:|active:|disabled:|visited:|first:|last:|odd:|even:|group-hover:|focus-within:|focus-visible:|dark:|motion-safe:|motion-reduce:)+/;function zh(e){return Mh.test(e)}function Ah(e){return Oh.has(e)?{category:"typography",valueType:"scalar",prefix:"text-",value:e,fullClass:`text-${e}`,themeKey:"fontSize"}:Ih.has(e)?{category:"typography",valueType:"enum",prefix:"text-",value:e,fullClass:`text-${e}`,themeKey:null}:{category:"typography",valueType:"color",prefix:"text-",value:e,fullClass:`text-${e}`,themeKey:"colors"}}function Kh(e){return jh.has(e)?{category:"borders",valueType:"scalar",prefix:"border-",value:e,fullClass:`border-${e}`,themeKey:"borderWidth"}:Lh.has(e)?{category:"borders",valueType:"enum",prefix:"border-",value:e,fullClass:`border-${e}`,themeKey:null}:{category:"color",valueType:"color",prefix:"border-",value:e,fullClass:`border-${e}`,themeKey:"colors"}}function $h(e){const t=[],n=e.trim().split(/\s+/).filter(Boolean);for(const r of n){if(zh(r))continue;const l=Dh[r];if(l){t.push({category:l.category,valueType:ai(l.themeKey),prefix:r,value:"",fullClass:r,themeKey:l.themeKey});continue}if(r.startsWith("text-")){const o=r.slice(5),i=Ah(o);i&&t.push(i);continue}if(r.startsWith("border-")){const o=r.slice(7);let i=!1;for(const s of Du)if(s.prefix!=="border-"&&r.startsWith(s.prefix)){i=!0,t.push({category:s.category,valueType:ai(s.themeKey),prefix:s.prefix,value:r.slice(s.prefix.length),fullClass:r,themeKey:s.themeKey});break}if(!i){const s=Kh(o);s&&t.push(s)}continue}for(const o of Du)if(r.startsWith(o.prefix)){t.push({category:o.category,valueType:ai(o.themeKey),prefix:o.prefix,value:r.slice(o.prefix.length),fullClass:r,themeKey:o.themeKey});break}}return t}let xt=null,io=!1;const _l=[],jl=[],Ll=[];function Fh(){return window.location.origin.replace(/^http/,"ws")}function Td(){if(xt)return;const e=Fh();xt=new WebSocket(e),xt.addEventListener("open",()=>{io=!0,Mn({type:"REGISTER",role:"panel"});for(const t of jl)t()}),xt.addEventListener("close",()=>{io=!1,xt=null;for(const t of Ll)t();setTimeout(()=>Td(),3e3)}),xt.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of _l)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),xt.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function Mn(e){io&&xt&&xt.send(JSON.stringify(e))}function pe(e,t){Mn({...t,to:e})}function Hh(e){return _l.push(e),()=>{const t=_l.indexOf(e);t!==-1&&_l.splice(t,1)}}function Vh(e){return jl.push(e),()=>{const t=jl.indexOf(e);t!==-1&&jl.splice(t,1)}}function Bh(e){return Ll.push(e),()=>{const t=Ll.indexOf(e);t!==-1&&Ll.splice(t,1)}}function Wh(){return io}function jo(){return typeof window<"u"}function tr(e){return Sa(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gt(e){var t;return(t=(Sa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sa(e){return jo()?e instanceof Node||e instanceof Be(e).Node:!1}function he(e){return jo()?e instanceof Element||e instanceof Be(e).Element:!1}function vt(e){return jo()?e instanceof HTMLElement||e instanceof Be(e).HTMLElement:!1}function us(e){return!jo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot}function Qr(e){const{overflow:t,overflowX:n,overflowY:r,display:l}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&l!=="inline"&&l!=="contents"}function Uh(e){return/^(table|td|th)$/.test(tr(e))}function Lo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Gh=/transform|translate|scale|rotate|perspective|filter/,Qh=/paint|layout|strict|content/,tn=e=>!!e&&e!=="none";let ui;function ka(e){const t=he(e)?et(e):e;return tn(t.transform)||tn(t.translate)||tn(t.scale)||tn(t.rotate)||tn(t.perspective)||!Oo()&&(tn(t.backdropFilter)||tn(t.filter))||Gh.test(t.willChange||"")||Qh.test(t.contain||"")}function Xh(e){let t=_t(e);for(;vt(t)&&!Ct(t);){if(ka(t))return t;if(Lo(t))return null;t=_t(t)}return null}function Oo(){return ui==null&&(ui=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ui}function Ct(e){return/^(html|body|#document)$/.test(tr(e))}function et(e){return Be(e).getComputedStyle(e)}function Io(e){return he(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||us(e)&&e.host||gt(e);return us(t)?t.host:t}function _d(e){const t=_t(e);return Ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&Qr(t)?t:_d(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=_d(e),o=l===((r=e.ownerDocument)==null?void 0:r.body),i=Be(l);if(o){const s=cs(i);return t.concat(i,i.visualViewport||[],Qr(l)?l:[],s&&n?Qt(s):[])}else return t.concat(l,Qt(l,[],n))}function cs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Zn=Math.min,Fe=Math.max,so=Math.round,ml=Math.floor,ht=e=>({x:e,y:e}),Yh={left:"right",right:"left",bottom:"top",top:"bottom"};function Mu(e,t,n){return Fe(e,Zn(t,n))}function Xr(e,t){return typeof e=="function"?e(t):e}function Zt(e){return e.split("-")[0]}function Yr(e){return e.split("-")[1]}function jd(e){return e==="x"?"y":"x"}function Ld(e){return e==="y"?"height":"width"}function bt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Od(e){return jd(bt(e))}function Zh(e,t,n){n===void 0&&(n=!1);const r=Yr(e),l=Od(e),o=Ld(l);let i=l==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ao(i)),[i,ao(i)]}function Jh(e){const t=ao(e);return[fs(e),t,fs(t)]}function fs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zu=["left","right"],Au=["right","left"],qh=["top","bottom"],eg=["bottom","top"];function tg(e,t,n){switch(e){case"top":case"bottom":return n?t?Au:zu:t?zu:Au;case"left":case"right":return t?qh:eg;default:return[]}}function ng(e,t,n,r){const l=Yr(e);let o=tg(Zt(e),n==="start",r);return l&&(o=o.map(i=>i+"-"+l),t&&(o=o.concat(o.map(fs)))),o}function ao(e){const t=Zt(e);return Yh[t]+e.slice(t.length)}function rg(e){return{top:0,right:0,bottom:0,left:0,...e}}function lg(e){return typeof e!="number"?rg(e):{top:e,right:e,bottom:e,left:e}}function uo(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 og=["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] *)"],ds=og.join(","),Id=typeof Element>"u",Fr=Id?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,co=!Id&&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},fo=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]"):fo(t.parentNode));return i},ig=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},sg=function(t,n,r){if(fo(t))return[];var l=Array.prototype.slice.apply(t.querySelectorAll(ds));return n&&Fr.call(t,ds)&&l.unshift(t),l=l.filter(r),l},ps=function(t,n,r){for(var l=[],o=Array.from(t);o.length;){var i=o.shift();if(!fo(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),a=s.length?s:i.children,u=ps(a,!0,r);r.flatten?l.push.apply(l,u):l.push({scopeParent:i,candidates:u})}else{var f=Fr.call(i,ds);f&&r.filter(i)&&(n||!t.includes(i))&&l.push(i);var c=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),m=!fo(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(c&&m){var v=ps(c===!0?i.children:c.children,!0,r);r.flatten?l.push.apply(l,v):l.push({scopeParent:i,candidates:v})}else o.unshift.apply(o,i.children)}}return l},Dd=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Md=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||ig(t))&&!Dd(t)?0:t.tabIndex},ag=function(t,n){var r=Md(t);return r<0&&n&&!Dd(t)?0:r},ug=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},zd=function(t){return t.tagName==="INPUT"},cg=function(t){return zd(t)&&t.type==="hidden"},fg=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},dg=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},pg=function(t){if(!t.name)return!0;var n=t.form||co(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=dg(l,t.form);return!o||o===t},mg=function(t){return zd(t)&&t.type==="radio"},hg=function(t){return mg(t)&&!pg(t)},gg=function(t){var n,r=t&&co(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 u,f,c;r=co(l),l=(u=r)===null||u===void 0?void 0:u.host,o=!!((f=l)!==null&&f!==void 0&&(c=f.ownerDocument)!==null&&c!==void 0&&c.contains(l))}}return o},Ku=function(t){var n=t.getBoundingClientRect(),r=n.width,l=n.height;return r===0&&l===0},vg=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=Fr.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(Fr.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 u=t.parentElement,f=co(t);if(u&&!u.shadowRoot&&l(u)===!0)return Ku(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=a}if(gg(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ku(t);return!1},yg=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 Fr.call(n,"fieldset[disabled] *")?!0:!l.contains(t)}return!0}n=n.parentElement}return!1},xg=function(t,n){return!(n.disabled||cg(n)||vg(n,t)||fg(n)||yg(n))},$u=function(t,n){return!(hg(n)||Md(n)<0||!xg(t,n))},wg=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ad=function(t){var n=[],r=[];return t.forEach(function(l,o){var i=!!l.scopeParent,s=i?l.scopeParent:l,a=ag(s,i),u=i?Ad(l.candidates):s;a===0?i?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:a,item:l,isScope:i,content:u})}),r.sort(ug).reduce(function(l,o){return o.isScope?l.push.apply(l,o.content):l.push(o.content),l},[]).concat(n)},Kd=function(t,n){n=n||{};var r;return n.getShadowRoot?r=ps([t],n.includeContainer,{filter:$u.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:wg}):r=sg(t,n.includeContainer,$u.bind(null,n)),Ad(r)};function Sg(){return/apple/i.test(navigator.vendor)}function kg(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 ms(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&us(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function cr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ci(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 bg(e){return e.matches("html,body")}function Hr(e){return(e==null?void 0:e.ownerDocument)||document}function Ol(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,...Ol(e,l.id,n)])}function Eg(e){return"nativeEvent"in e}var Cg=typeof document<"u",Rg=function(){},fn=Cg?S.useLayoutEffect:Rg;const Ng={...Cc},Pg=Ng.useInsertionEffect,Tg=Pg||(e=>e());function bn(e){const t=S.useRef(()=>{});return Tg(()=>{t.current=e}),S.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 $d=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Fd(e,t){const n=Kd(e,$d()),r=n.length;if(r===0)return;const l=kg(Hr(e)),o=n.indexOf(l),i=o===-1?t===1?0:r-1:o+t;return n[i]}function _g(e){return Fd(Hr(e).body,1)||e}function jg(e){return Fd(Hr(e).body,-1)||e}function fi(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ms(n,r)}function Lg(e){Kd(e,$d()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Fu(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 Hu(e,t,n){let{reference:r,floating:l}=e;const o=bt(t),i=Od(t),s=Ld(i),a=Zt(t),u=o==="y",f=r.x+r.width/2-l.width/2,c=r.y+r.height/2-l.height/2,m=r[s]/2-l[s]/2;let v;switch(a){case"top":v={x:f,y:r.y-l.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:c};break;case"left":v={x:r.x-l.width,y:c};break;default:v={x:r.x,y:r.y}}switch(Yr(t)){case"start":v[i]-=m*(n&&u?-1:1);break;case"end":v[i]+=m*(n&&u?-1:1);break}return v}async function Og(e,t){var n;t===void 0&&(t={});const{x:r,y:l,platform:o,rects:i,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:m=!1,padding:v=0}=Xr(t,e),y=lg(v),b=s[m?c==="floating"?"reference":"floating":c],p=uo(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:a})),d=c==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,h=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),w=await(o.isElement==null?void 0:o.isElement(h))?await(o.getScale==null?void 0:o.getScale(h))||{x:1,y:1}:{x:1,y:1},R=uo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:d,offsetParent:h,strategy:a}):d);return{top:(p.top-R.top+y.top)/w.y,bottom:(R.bottom-p.bottom+y.bottom)/w.y,left:(p.left-R.left+y.left)/w.x,right:(R.right-p.right+y.right)/w.x}}const Ig=50,Dg=async(e,t,n)=>{const{placement:r="bottom",strategy:l="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:Og},a=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:c}=Hu(u,r,a),m=r,v=0;const y={};for(let x=0;x<o.length;x++){const b=o[x];if(!b)continue;const{name:p,fn:d}=b,{x:h,y:w,data:R,reset:E}=await d({x:f,y:c,initialPlacement:r,placement:m,strategy:l,middlewareData:y,rects:u,platform:s,elements:{reference:e,floating:t}});f=h??f,c=w??c,y[p]={...y[p],...R},E&&v<Ig&&(v++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:l}):E.rects),{x:f,y:c}=Hu(u,m,a)),x=-1)}return{x:f,y:c,placement:m,strategy:l,middlewareData:y}},Mg=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:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=!0,...b}=Xr(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const p=Zt(l),d=bt(s),h=Zt(s)===s,w=await(a.isRTL==null?void 0:a.isRTL(u.floating)),R=m||(h||!x?[ao(s)]:Jh(s)),E=y!=="none";!m&&E&&R.push(...ng(s,x,y,w));const N=[s,...R],C=await a.detectOverflow(t,b),I=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&I.push(C[p]),c){const M=Zh(l,i,w);I.push(C[M[0]],C[M[1]])}if(P=[...P,{placement:l,overflows:I}],!I.every(M=>M<=0)){var V,G;const M=(((V=o.flip)==null?void 0:V.index)||0)+1,J=N[M];if(J&&(!(c==="alignment"?d!==bt(J):!1)||P.every(k=>bt(k.placement)===d?k.overflows[0]>0:!0)))return{data:{index:M,overflows:P},reset:{placement:J}};let A=(G=P.filter(H=>H.overflows[0]<=0).sort((H,k)=>H.overflows[1]-k.overflows[1])[0])==null?void 0:G.placement;if(!A)switch(v){case"bestFit":{var j;const H=(j=P.filter(k=>{if(E){const _=bt(k.placement);return _===d||_==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(_=>_>0).reduce((_,z)=>_+z,0)]).sort((k,_)=>k[1]-_[1])[0])==null?void 0:j[0];H&&(A=H);break}case"initialPlacement":A=s;break}if(l!==A)return{reset:{placement:A}}}return{}}}},zg=new Set(["left","top"]);async function Ag(e,t){const{placement:n,platform:r,elements:l}=e,o=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=Zt(n),s=Yr(n),a=bt(n)==="y",u=zg.has(i)?-1:1,f=o&&a?-1:1,c=Xr(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof y=="number"&&(v=s==="end"?y*-1:y),a?{x:v*f,y:m*u}:{x:m*u,y:v*f}}const Kg=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 Ag(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}}}}},$g=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:p=>{let{x:d,y:h}=p;return{x:d,y:h}}},...u}=Xr(e,t),f={x:n,y:r},c=await o.detectOverflow(t,u),m=bt(Zt(l)),v=jd(m);let y=f[v],x=f[m];if(i){const p=v==="y"?"top":"left",d=v==="y"?"bottom":"right",h=y+c[p],w=y-c[d];y=Mu(h,y,w)}if(s){const p=m==="y"?"top":"left",d=m==="y"?"bottom":"right",h=x+c[p],w=x-c[d];x=Mu(h,x,w)}const b=a.fn({...t,[v]:y,[m]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[v]:i,[m]:s}}}}}},Fg=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=()=>{},...u}=Xr(e,t),f=await i.detectOverflow(t,u),c=Zt(l),m=Yr(l),v=bt(l)==="y",{width:y,height:x}=o.floating;let b,p;c==="top"||c==="bottom"?(b=c,p=m===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,b=m==="end"?"top":"bottom");const d=x-f.top-f.bottom,h=y-f.left-f.right,w=Zn(x-f[b],d),R=Zn(y-f[p],h),E=!t.middlewareData.shift;let N=w,C=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=h),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=d),E&&!m){const P=Fe(f.left,0),V=Fe(f.right,0),G=Fe(f.top,0),j=Fe(f.bottom,0);v?C=y-2*(P!==0||V!==0?P+V:Fe(f.left,f.right)):N=x-2*(G!==0||j!==0?G+j:Fe(f.top,f.bottom))}await a({...t,availableWidth:C,availableHeight:N});const I=await i.getDimensions(s.floating);return y!==I.width||x!==I.height?{reset:{rects:!0}}:{}}}};function Hd(e){const t=et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const l=vt(e),o=l?e.offsetWidth:n,i=l?e.offsetHeight:r,s=so(n)!==o||so(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function ba(e){return he(e)?e:e.contextElement}function Vn(e){const t=ba(e);if(!vt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:l,$:o}=Hd(t);let i=(o?so(n.width):n.width)/r,s=(o?so(n.height):n.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Hg=ht(0);function Vd(e){const t=Be(e);return!Oo()||!t.visualViewport?Hg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Be(e)?!1:t}function vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),o=ba(e);let i=ht(1);t&&(r?he(r)&&(i=Vn(r)):i=Vn(e));const s=Vg(o,n,r)?Vd(o):ht(0);let a=(l.left+s.x)/i.x,u=(l.top+s.y)/i.y,f=l.width/i.x,c=l.height/i.y;if(o){const m=Be(o),v=r&&he(r)?Be(r):r;let y=m,x=cs(y);for(;x&&r&&v!==y;){const b=Vn(x),p=x.getBoundingClientRect(),d=et(x),h=p.left+(x.clientLeft+parseFloat(d.paddingLeft))*b.x,w=p.top+(x.clientTop+parseFloat(d.paddingTop))*b.y;a*=b.x,u*=b.y,f*=b.x,c*=b.y,a+=h,u+=w,y=Be(x),x=cs(y)}}return uo({width:f,height:c,x:a,y:u})}function Do(e,t){const n=Io(e).scrollLeft;return t?t.left+n:vn(gt(e)).left+n}function Bd(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Do(e,n),l=n.top+t.scrollTop;return{x:r,y:l}}function Bg(e){let{elements:t,rect:n,offsetParent:r,strategy:l}=e;const o=l==="fixed",i=gt(r),s=t?Lo(t.floating):!1;if(r===i||s&&o)return n;let a={scrollLeft:0,scrollTop:0},u=ht(1);const f=ht(0),c=vt(r);if((c||!c&&!o)&&((tr(r)!=="body"||Qr(i))&&(a=Io(r)),c)){const v=vn(r);u=Vn(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const m=i&&!c&&!o?Bd(i,a):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-a.scrollTop*u.y+f.y+m.y}}function Wg(e){return Array.from(e.getClientRects())}function Ug(e){const t=gt(e),n=Io(e),r=e.ownerDocument.body,l=Fe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Fe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Do(e);const s=-n.scrollTop;return et(r).direction==="rtl"&&(i+=Fe(t.clientWidth,r.clientWidth)-l),{width:l,height:o,x:i,y:s}}const Vu=25;function Gg(e,t){const n=Be(e),r=gt(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=Oo();(!f||f&&t==="fixed")&&(s=l.offsetLeft,a=l.offsetTop)}const u=Do(r);if(u<=0){const f=r.ownerDocument,c=f.body,m=getComputedStyle(c),v=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(r.clientWidth-c.clientWidth-v);y<=Vu&&(o-=y)}else u<=Vu&&(o+=u);return{width:o,height:i,x:s,y:a}}function Qg(e,t){const n=vn(e,!0,t==="fixed"),r=n.top+e.clientTop,l=n.left+e.clientLeft,o=vt(e)?Vn(e):ht(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,a=l*o.x,u=r*o.y;return{width:i,height:s,x:a,y:u}}function Bu(e,t,n){let r;if(t==="viewport")r=Gg(e,n);else if(t==="document")r=Ug(gt(e));else if(he(t))r=Qg(t,n);else{const l=Vd(e);r={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return uo(r)}function Wd(e,t){const n=_t(e);return n===t||!he(n)||Ct(n)?!1:et(n).position==="fixed"||Wd(n,t)}function Xg(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(s=>he(s)&&tr(s)!=="body"),l=null;const o=et(e).position==="fixed";let i=o?_t(e):e;for(;he(i)&&!Ct(i);){const s=et(i),a=ka(i);!a&&s.position==="fixed"&&(l=null),(o?!a&&!l:!a&&s.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||Qr(i)&&!a&&Wd(e,i))?r=r.filter(f=>f!==i):l=s,i=_t(i)}return t.set(e,r),r}function Yg(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e;const i=[...n==="clippingAncestors"?Lo(t)?[]:Xg(t,this._c):[].concat(n),r],s=Bu(t,i[0],l);let a=s.top,u=s.right,f=s.bottom,c=s.left;for(let m=1;m<i.length;m++){const v=Bu(t,i[m],l);a=Fe(v.top,a),u=Zn(v.right,u),f=Zn(v.bottom,f),c=Fe(v.left,c)}return{width:u-c,height:f-a,x:c,y:a}}function Zg(e){const{width:t,height:n}=Hd(e);return{width:t,height:n}}function Jg(e,t,n){const r=vt(t),l=gt(t),o=n==="fixed",i=vn(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const a=ht(0);function u(){a.x=Do(l)}if(r||!r&&!o)if((tr(t)!=="body"||Qr(l))&&(s=Io(t)),r){const v=vn(t,!0,o,t);a.x=v.x+t.clientLeft,a.y=v.y+t.clientTop}else l&&u();o&&!r&&l&&u();const f=l&&!r&&!o?Bd(l,s):ht(0),c=i.left+s.scrollLeft-a.x-f.x,m=i.top+s.scrollTop-a.y-f.y;return{x:c,y:m,width:i.width,height:i.height}}function di(e){return et(e).position==="static"}function Wu(e,t){if(!vt(e)||et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gt(e)===n&&(n=n.ownerDocument.body),n}function Ud(e,t){const n=Be(e);if(Lo(e))return n;if(!vt(e)){let l=_t(e);for(;l&&!Ct(l);){if(he(l)&&!di(l))return l;l=_t(l)}return n}let r=Wu(e,t);for(;r&&Uh(r)&&di(r);)r=Wu(r,t);return r&&Ct(r)&&di(r)&&!ka(r)?n:r||Xh(e)||n}const qg=async function(e){const t=this.getOffsetParent||Ud,n=this.getDimensions,r=await n(e.floating);return{reference:Jg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ev(e){return et(e).direction==="rtl"}const tv={convertOffsetParentRelativeRectToViewportRelativeRect:Bg,getDocumentElement:gt,getClippingRect:Yg,getOffsetParent:Ud,getElementRects:qg,getClientRects:Wg,getDimensions:Zg,getScale:Vn,isElement:he,isRTL:ev};function Gd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nv(e,t){let n=null,r;const l=gt(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 u=e.getBoundingClientRect(),{left:f,top:c,width:m,height:v}=u;if(s||t(),!m||!v)return;const y=ml(c),x=ml(l.clientWidth-(f+m)),b=ml(l.clientHeight-(c+v)),p=ml(f),h={rootMargin:-y+"px "+-x+"px "+-b+"px "+-p+"px",threshold:Fe(0,Zn(1,a))||1};let w=!0;function R(E){const N=E[0].intersectionRatio;if(N!==a){if(!w)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Gd(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(R,{...h,root:l.ownerDocument})}catch{n=new IntersectionObserver(R,h)}n.observe(e)}return i(!0),o}function hs(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,u=ba(e),f=l||o?[...u?Qt(u):[],...t?Qt(t):[]]:[];f.forEach(p=>{l&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const c=u&&s?nv(u,n):null;let m=-1,v=null;i&&(v=new ResizeObserver(p=>{let[d]=p;d&&d.target===u&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var h;(h=v)==null||h.observe(t)})),n()}),u&&!a&&v.observe(u),t&&v.observe(t));let y,x=a?vn(e):null;a&&b();function b(){const p=vn(e);x&&!Gd(x,p)&&n(),x=p,y=requestAnimationFrame(b)}return n(),()=>{var p;f.forEach(d=>{l&&d.removeEventListener("scroll",n),o&&d.removeEventListener("resize",n)}),c==null||c(),(p=v)==null||p.disconnect(),v=null,a&&cancelAnimationFrame(y)}}const rv=Kg,lv=$g,ov=Mg,iv=Fg,sv=(e,t,n)=>{const r=new Map,l={platform:tv,...n},o={...l.platform,_c:r};return Dg(e,t,{...l,platform:o})};var av=typeof document<"u",uv=function(){},Il=av?S.useLayoutEffect:uv;function po(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(!po(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)&&!po(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Qd(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uu(e,t){const n=Qd(e);return Math.round(t*n)/n}function pi(e){const t=S.useRef(e);return Il(()=>{t.current=e}),t}function cv(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:u}=e,[f,c]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=S.useState(r);po(m,r)||v(r);const[y,x]=S.useState(null),[b,p]=S.useState(null),d=S.useCallback(k=>{k!==E.current&&(E.current=k,x(k))},[]),h=S.useCallback(k=>{k!==N.current&&(N.current=k,p(k))},[]),w=o||y,R=i||b,E=S.useRef(null),N=S.useRef(null),C=S.useRef(f),I=a!=null,P=pi(a),V=pi(l),G=pi(u),j=S.useCallback(()=>{if(!E.current||!N.current)return;const k={placement:t,strategy:n,middleware:m};V.current&&(k.platform=V.current),sv(E.current,N.current,k).then(_=>{const z={..._,isPositioned:G.current!==!1};M.current&&!po(C.current,z)&&(C.current=z,_o.flushSync(()=>{c(z)}))})},[m,t,n,V,G]);Il(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[u]);const M=S.useRef(!1);Il(()=>(M.current=!0,()=>{M.current=!1}),[]),Il(()=>{if(w&&(E.current=w),R&&(N.current=R),w&&R){if(P.current)return P.current(w,R,j);j()}},[w,R,j,P,I]);const J=S.useMemo(()=>({reference:E,floating:N,setReference:d,setFloating:h}),[d,h]),A=S.useMemo(()=>({reference:w,floating:R}),[w,R]),H=S.useMemo(()=>{const k={position:n,left:0,top:0};if(!A.floating)return k;const _=Uu(A.floating,f.x),z=Uu(A.floating,f.y);return s?{...k,transform:"translate("+_+"px, "+z+"px)",...Qd(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:z}},[n,s,A.floating,f.x,f.y]);return S.useMemo(()=>({...f,update:j,refs:J,elements:A,floatingStyles:H}),[f,j,J,A,H])}const gs=(e,t)=>{const n=rv(e);return{name:n.name,fn:n.fn,options:[e,t]}},vs=(e,t)=>{const n=lv(e);return{name:n.name,fn:n.fn,options:[e,t]}},ys=(e,t)=>{const n=ov(e);return{name:n.name,fn:n.fn,options:[e,t]}},xs=(e,t)=>{const n=iv(e);return{name:n.name,fn:n.fn,options:[e,t]}},fv="data-floating-ui-focusable",Gu="active",Qu="selected",dv={...Cc};let Xu=!1,pv=0;const Yu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pv++;function mv(){const[e,t]=S.useState(()=>Xu?Yu():void 0);return fn(()=>{e==null&&t(Yu())},[]),S.useEffect(()=>{Xu=!0},[]),e}const hv=dv.useId,Xd=hv||mv;function gv(){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 vv=S.createContext(null),yv=S.createContext(null),xv=()=>{var e;return((e=S.useContext(vv))==null?void 0:e.id)||null},Yd=()=>S.useContext(yv);function Ea(e){return"data-floating-ui-"+e}const wv={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},Zu=S.forwardRef(function(t,n){const[r,l]=S.useState();fn(()=>{Sg()&&l("button")},[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ea("focus-guard")]:"",style:wv};return g.jsx("span",{...t,...o})}),Sv={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Zd=S.createContext(null),Ju=Ea("portal");function kv(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Xd(),l=bv(),[o,i]=S.useState(null),s=S.useRef(null);return fn(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),fn(()=>{if(!r||s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const u=document.createElement("div");u.id=r,u.setAttribute(Ju,""),a.appendChild(u),s.current=u,i(u)},[t,r]),fn(()=>{if(n===null||!r||s.current)return;let a=n||(l==null?void 0:l.portalNode);a&&!Sa(a)&&(a=a.current),a=a||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,a.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(Ju,""),a=u||a,a.appendChild(f),s.current=f,i(f)},[t,n,r,l]),o}function ws(e){const{children:t,id:n,root:r,preserveTabOrder:l=!0}=e,o=kv({id:n,root:r}),[i,s]=S.useState(null),a=S.useRef(null),u=S.useRef(null),f=S.useRef(null),c=S.useRef(null),m=i==null?void 0:i.modal,v=i==null?void 0:i.open,y=!!i&&!i.modal&&i.open&&l&&!!(r||o);return S.useEffect(()=>{if(!o||!l||m)return;function x(b){o&&fi(b)&&(b.type==="focusin"?Fu:Lg)(o)}return o.addEventListener("focusin",x,!0),o.addEventListener("focusout",x,!0),()=>{o.removeEventListener("focusin",x,!0),o.removeEventListener("focusout",x,!0)}},[o,l,m]),S.useEffect(()=>{o&&(v||Fu(o))},[v,o]),g.jsxs(Zd.Provider,{value:S.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:a,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:c,portalNode:o,setFocusManagerState:s}),[l,o]),children:[y&&o&&g.jsx(Zu,{"data-type":"outside",ref:a,onFocus:x=>{if(fi(x,o)){var b;(b=f.current)==null||b.focus()}else{const p=i?i.domReference:null,d=jg(p);d==null||d.focus()}}}),y&&o&&g.jsx("span",{"aria-owns":o.id,style:Sv}),o&&_o.createPortal(t,o),y&&o&&g.jsx(Zu,{"data-type":"outside",ref:u,onFocus:x=>{if(fi(x,o)){var b;(b=c.current)==null||b.focus()}else{const p=i?i.domReference:null,d=_g(p);d==null||d.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,x.nativeEvent,"focus-out"))}}})]})}const bv=()=>S.useContext(Zd),Ev={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},qu=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 Ss(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:u="pointerdown",referencePress:f=!1,referencePressEvent:c="pointerdown",ancestorScroll:m=!1,bubbles:v,capture:y}=t,x=Yd(),b=bn(typeof a=="function"?a:()=>!1),p=typeof a=="function"?b:a,d=S.useRef(!1),{escapeKey:h,outsidePress:w}=qu(v),{escapeKey:R,outsidePress:E}=qu(y),N=S.useRef(!1),C=bn(M=>{var J;if(!n||!i||!s||M.key!=="Escape"||N.current)return;const A=(J=o.current.floatingContext)==null?void 0:J.nodeId,H=x?Ol(x.nodesRef.current,A):[];if(!h&&(M.stopPropagation(),H.length>0)){let k=!0;if(H.forEach(_=>{var z;if((z=_.context)!=null&&z.open&&!_.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,Eg(M)?M.nativeEvent:M,"escape-key")}),I=bn(M=>{var J;const A=()=>{var H;C(M),(H=cr(M))==null||H.removeEventListener("keydown",A)};(J=cr(M))==null||J.addEventListener("keydown",A)}),P=bn(M=>{var J;const A=o.current.insideReactTree;o.current.insideReactTree=!1;const H=d.current;if(d.current=!1,u==="click"&&H||A||typeof p=="function"&&!p(M))return;const k=cr(M),_="["+Ea("inert")+"]",z=Hr(l.floating).querySelectorAll(_);let Y=he(k)?k:null;for(;Y&&!Ct(Y);){const ie=_t(Y);if(Ct(ie)||!he(ie))break;Y=ie}if(z.length&&he(k)&&!bg(k)&&!ms(k,l.floating)&&Array.from(z).every(ie=>!ms(Y,ie)))return;if(vt(k)&&j){const ie=Ct(k),se=et(k),Se=/auto|scroll/,wn=ie||Se.test(se.overflowX),Sn=ie||Se.test(se.overflowY),L=wn&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,W=Sn&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,Q=se.direction==="rtl",B=W&&(Q?M.offsetX<=k.offsetWidth-k.clientWidth:M.offsetX>k.clientWidth),ne=L&&M.offsetY>k.clientHeight;if(B||ne)return}const ee=(J=o.current.floatingContext)==null?void 0:J.nodeId,Ke=x&&Ol(x.nodesRef.current,ee).some(ie=>{var se;return ci(M,(se=ie.context)==null?void 0:se.elements.floating)});if(ci(M,l.floating)||ci(M,l.domReference)||Ke)return;const Oe=x?Ol(x.nodesRef.current,ee):[];if(Oe.length>0){let ie=!0;if(Oe.forEach(se=>{var Se;if((Se=se.context)!=null&&Se.open&&!se.context.dataRef.current.__outsidePressBubbles){ie=!1;return}}),!ie)return}r(!1,M,"outside-press")}),V=bn(M=>{var J;const A=()=>{var H;P(M),(H=cr(M))==null||H.removeEventListener(u,A)};(J=cr(M))==null||J.addEventListener(u,A)});S.useEffect(()=>{if(!n||!i)return;o.current.__escapeKeyBubbles=h,o.current.__outsidePressBubbles=w;let M=-1;function J(z){r(!1,z,"ancestor-scroll")}function A(){window.clearTimeout(M),N.current=!0}function H(){M=window.setTimeout(()=>{N.current=!1},Oo()?5:0)}const k=Hr(l.floating);s&&(k.addEventListener("keydown",R?I:C,R),k.addEventListener("compositionstart",A),k.addEventListener("compositionend",H)),p&&k.addEventListener(u,E?V:P,E);let _=[];return m&&(he(l.domReference)&&(_=Qt(l.domReference)),he(l.floating)&&(_=_.concat(Qt(l.floating))),!he(l.reference)&&l.reference&&l.reference.contextElement&&(_=_.concat(Qt(l.reference.contextElement)))),_=_.filter(z=>{var Y;return z!==((Y=k.defaultView)==null?void 0:Y.visualViewport)}),_.forEach(z=>{z.addEventListener("scroll",J,{passive:!0})}),()=>{s&&(k.removeEventListener("keydown",R?I:C,R),k.removeEventListener("compositionstart",A),k.removeEventListener("compositionend",H)),p&&k.removeEventListener(u,E?V:P,E),_.forEach(z=>{z.removeEventListener("scroll",J)}),window.clearTimeout(M)}},[o,l,s,p,u,n,r,m,i,h,w,C,R,I,P,E,V]),S.useEffect(()=>{o.current.insideReactTree=!1},[o,p,u]);const G=S.useMemo(()=>({onKeyDown:C,...f&&{[Ev[c]]:M=>{r(!1,M.nativeEvent,"reference-press")},...c!=="click"&&{onClick(M){r(!1,M.nativeEvent,"reference-press")}}}}),[C,r,f,c]),j=S.useMemo(()=>{function M(J){J.button===0&&(d.current=!0)}return{onKeyDown:C,onMouseDown:M,onMouseUp:M,[Cv[u]]:()=>{o.current.insideReactTree=!0}}},[C,u,o]);return S.useMemo(()=>i?{reference:G,floating:j}:{},[i,G,j])}function Rv(e){const{open:t=!1,onOpenChange:n,elements:r}=e,l=Xd(),o=S.useRef({}),[i]=S.useState(()=>gv()),s=xv()!=null,[a,u]=S.useState(r.reference),f=bn((v,y,x)=>{o.current.openEvent=v?y:void 0,i.emit("openchange",{open:v,event:y,reason:x,nested:s}),n==null||n(v,y,x)}),c=S.useMemo(()=>({setPositionReference:u}),[]),m=S.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return S.useMemo(()=>({dataRef:o,open:t,onOpenChange:f,elements:m,events:i,floatingId:l,refs:c}),[t,f,m,i,l,c])}function ks(e){e===void 0&&(e={});const{nodeId:t}=e,n=Rv({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,l=r.elements,[o,i]=S.useState(null),[s,a]=S.useState(null),f=(l==null?void 0:l.domReference)||o,c=S.useRef(null),m=Yd();fn(()=>{f&&(c.current=f)},[f]);const v=cv({...e,elements:{...l,...s&&{reference:s}}}),y=S.useCallback(h=>{const w=he(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;a(w),v.refs.setReference(w)},[v.refs]),x=S.useCallback(h=>{(he(h)||h===null)&&(c.current=h,i(h)),(he(v.refs.reference.current)||v.refs.reference.current===null||h!==null&&!he(h))&&v.refs.setReference(h)},[v.refs]),b=S.useMemo(()=>({...v.refs,setReference:x,setPositionReference:y,domReference:c}),[v.refs,x,y]),p=S.useMemo(()=>({...v.elements,domReference:f}),[v.elements,f]),d=S.useMemo(()=>({...v,...r,refs:b,elements:p,nodeId:t}),[v,b,p,t,r]);return fn(()=>{r.dataRef.current.floatingContext=d;const h=m==null?void 0:m.nodesRef.current.find(w=>w.id===t);h&&(h.context=d)}),S.useMemo(()=>({...v,context:d,refs:b,elements:p}),[v,b,p,d])}function mi(e,t,n){const r=new Map,l=n==="item";let o=e;if(l&&e){const{[Gu]:i,[Qu]:s,...a}=e;o=a}return{...n==="floating"&&{tabIndex:-1,[fv]:""},...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[u,f]=a;if(!(l&&[Gu,Qu].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var c;(c=r.get(u))==null||c.push(f),i[u]=function(){for(var m,v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];return(m=r.get(u))==null?void 0:m.map(b=>b(...y)).find(b=>b!==void 0)}}}else i[u]=f}),i),{})}}function bs(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=S.useCallback(s=>mi(s,e,"reference"),t),o=S.useCallback(s=>mi(s,e,"floating"),n),i=S.useCallback(s=>mi(s,e,"item"),r);return S.useMemo(()=>({getReferenceProps:l,getFloatingProps:o,getItemProps:i}),[l,o,i])}const Nv=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Pv=["50","100","200","300","400","500","600","700","800","900","950"];function Es({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:l,onHover:o,onLeave:i,onClick:s,onRemove:a,onRemoveHover:u}){return g.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||i()},children:[g.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[g.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),a&&g.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&&u&&u()},onClick:a,children:g.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),g.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?g.jsx(ec,{prefix:e,colorName:f,colorValue:n[f],isCurrent:f===t,isLocked:l===`${e}${f}`,locked:r,onHover:o,onClick:s},f):null)]}),Nv.map(f=>{const c=n[f];return!c||typeof c!="object"?null:g.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[g.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:f}),Pv.map(m=>c[m]!==void 0?g.jsx(ec,{prefix:e,colorName:`${f}-${m}`,colorValue:c[m],isCurrent:`${f}-${m}`===t,isLocked:l===`${e}${f}-${m}`,locked:r,onHover:o,onClick:s},`${f}-${m}`):null)]},f)})]})}function ec({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:l,locked:o,onHover:i,onClick:s}){const a=`${e}${t}`,u=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 g.jsx("div",{title:a,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${u}`,style:f,onMouseEnter:()=>{o||i(a)},onClick:c=>{c.stopPropagation(),s(a)}})}const Tv=4,_v=10;function Ot({values:e,currentValue:t,lockedValue:n,locked:r,ghost:l,onStart:o,onHover:i,onLeave:s,onClick:a}){const[u,f]=S.useState(!1),[c,m]=S.useState(null),v=S.useRef(null),y=S.useRef(null),x=S.useRef(null),b=n!==null&&e.includes(n),p=c!==null?e[c]:b?n:t;S.useEffect(()=>{if(!u)return;const C=I=>{var P;(P=y.current)!=null&&P.contains(I.target)||(f(!1),s())};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[u,s]),S.useEffect(()=>{var C,I;u&&x.current&&((I=(C=x.current).scrollIntoView)==null||I.call(C,{block:"nearest"}))},[u]);const d=r&&!b;function h(C){if(d)return;o==null||o();const I=b?n:t,P=e.indexOf(I);v.current={startX:C.clientX,startIndex:P>=0?P:0,didScrub:!1},C.currentTarget.setPointerCapture(C.pointerId),C.preventDefault()}function w(C){const I=v.current;if(!I)return;const P=C.clientX-I.startX;if(!I.didScrub&&Math.abs(P)>Tv&&(I.didScrub=!0,f(!1)),I.didScrub){const V=Math.round(P/_v),G=Math.max(0,Math.min(e.length-1,I.startIndex+V));m(G),i(e[G])}}function R(){const C=v.current;C&&(C.didScrub&&c!==null?a(e[c]):C.didScrub||f(I=>(I&&s(),!I)),m(null),v.current=null)}const E=c!==null,N=E?"border-bv-teal bg-bv-teal/9 text-bv-teal":b?"border-bv-border bg-bv-surface-hi text-bv-text hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal":u?"border-bv-border bg-bv-surface-hi text-bv-text":d?"bg-bv-surface text-bv-text-mid border-transparent":l?"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 border-transparent hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal";return g.jsxs("div",{ref:y,className:"relative inline-block",children:[g.jsxs("div",{className:`group select-none px-2 py-0.5 rounded text-[11px] font-mono border transition-colors ${d?"cursor-default":"cursor-ew-resize"} ${N}`,onPointerDown:h,onPointerMove:w,onPointerUp:R,children:[!d&&g.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${E?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),p,!d&&g.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${E?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),u&&g.jsx("div",{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,children:e.map(C=>{const I=C===(n??t),P=I?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return g.jsx("div",{ref:I?x:void 0,className:`px-2 py-[3px] text-[11px] font-mono cursor-pointer ${P}`,onMouseEnter:()=>i(C),onClick:V=>{V.stopPropagation(),a(C),f(!1)},children:C},C)})})]})}const jv={px:.0625};function tc(e){return isNaN(Number(e))?jv[e]??1/0:Number(e)}function hl(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((l,o)=>tc(l)-tc(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 Lv=4,Ov=10;function Jd({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:l,axis:o="x",disabled:i,onHover:s,onLeave:a,onClick:u,onScrubStart:f,onScrubEnd:c,onOpen:m,onClose:v}){const[y,x]=S.useState(!1),[b,p]=S.useState(null),[d,h]=S.useState(null),w=S.useRef(null),R=S.useRef(null),E=S.useRef(null),N=n!=null,C=n?t.indexOf(n):-1,I=d!==null?t[d]:null,P=I?l?l(I):I:r??e;S.useEffect(()=>{var _;if(!y){p(null);return}const k=(_=R.current)==null?void 0:_.getBoundingClientRect();k&&p({top:k.bottom+4,left:k.left+k.width/2})},[y]),S.useEffect(()=>{if(!y)return;const k=_=>{var z;(z=R.current)!=null&&z.contains(_.target)||(x(!1),v==null||v(),a==null||a())};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[y,a,v]),S.useEffect(()=>{var k,_;y&&E.current&&((_=(k=E.current).scrollIntoView)==null||_.call(k,{block:"nearest"}))},[y]);function V(k){var z,Y;if(i)return;k.preventDefault(),k.stopPropagation();const _=C>=0?C:0;w.current={startX:k.clientX,startY:k.clientY,startIndex:_,didScrub:!1},(Y=(z=k.target).setPointerCapture)==null||Y.call(z,k.pointerId)}function G(k){const _=w.current;if(!_)return;const z=o==="y"?-(k.clientY-_.startY):k.clientX-_.startX;if(!_.didScrub&&Math.abs(z)>Lv&&(_.didScrub=!0,x(!1),f==null||f()),_.didScrub){const Y=Math.round(z/Ov),ee=Math.max(0,Math.min(t.length-1,_.startIndex+Y));h(ee),s==null||s(t[ee])}}function j(){const k=w.current;k&&(k.didScrub&&d!==null?(u==null||u(t[d]),h(null),w.current=null,c==null||c()):k.didScrub||(h(null),w.current=null,x(_=>_?(v==null||v(),a==null||a(),!1):(m==null||m(),!0))))}const M=d!==null,A=["bm-slot",N||M?"bm-has-val":"",M?"bm-scrubbing":""].filter(Boolean).join(" "),H=i?"default":o==="y"?"ns-resize":"ew-resize";return g.jsxs("span",{ref:R,className:A,style:{position:"relative",cursor:H},onPointerDown:V,onPointerMove:G,onPointerUp:j,role:"button",tabIndex:i?-1:0,children:[P,y&&b&&_o.createPortal(g.jsx("div",{className:"bm-mini-dropdown",style:{position:"fixed",top:b.top,left:b.left,transform:"translateX(-50%)"},onClick:k=>k.stopPropagation(),onMouseLeave:()=>a==null?void 0:a(),onMouseDown:k=>k.stopPropagation(),children:t.map(k=>{const _=k===n;return g.jsx("div",{ref:_?E:void 0,className:`bm-mini-dropdown-item${_?" bm-active":""}`,onMouseEnter:()=>s==null?void 0:s(k),onClick:z=>{z.stopPropagation(),u==null||u(k),x(!1),v==null||v()},children:k},k)})}),document.body)]})}function nc(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function Iv({value:e,placeholder:t,layer:n,frozen:r,scaleValues:l,axis:o,onClick:i,onValueChange:s,onValueHover:a,onValueLeave:u,onScrubStart:f,onScrubEnd:c,onOpen:m,onClose:v}){const y=e!=null,x=y?nc(e,n):null;if(l&&l.length>0)return g.jsx(Jd,{placeholder:t,values:l,currentValue:e,displayValue:x,formatValue:p=>nc(p,n),axis:o,disabled:r,onHover:a,onLeave:u,onClick:s,onScrubStart:f,onScrubEnd:c,onOpen:m,onClose:v});const b=`bm-slot${y?" bm-has-val":""}`;return g.jsx("span",{className:b,onClick:r?void 0:p=>i==null?void 0:i(p.currentTarget),role:"button",tabIndex:r?-1:0,children:x??t})}const Dv={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},Mv={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"]},zv={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function Av({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:l,isHovered:o,frozen:i,onHoverChange:s,onSlotClick:a,onSlotChange:u,onSlotHover:f,onScrubStart:c,onScrubEnd:m,onSlotOpen:v,onSlotClose:y,children:x}){const b=`bm-layer bm-${e}${o?" bm-hovered":""}`,[p,d]=S.useState(null),h=new Map(l.map(P=>[P.key,P])),w=(t==="shorthand"||t==="mixed")&&n,R=r&&r.length>0?g.jsx("span",{className:"bm-name bm-name-scrubber",children:g.jsx(Jd,{placeholder:e,values:r,currentValue:w?n:null,displayValue:w?n:null,formatValue:P=>P,axis:"x",disabled:i,onHover:P=>f==null?void 0:f("shorthand",P),onLeave:()=>f==null?void 0:f("shorthand",null),onClick:P=>u==null?void 0:u("shorthand",P),onScrubStart:()=>{c==null||c()},onScrubEnd:m,onOpen:()=>{d("__shorthand__"),v==null||v()},onClose:()=>{d(null),y==null||y()}})}):w?g.jsx("span",{className:"bm-name",children:g.jsx("span",{className:"bm-val",onClick:P=>a==null?void 0:a("shorthand",P.currentTarget),children:n})}):g.jsx("span",{className:"bm-name",children:e}),N=(Mv[e]??[]).map(P=>{const G=(Dv[P]??[]).map(H=>h.get(H)).filter(H=>H!=null);if(G.length===0)return null;const j=G.some(H=>H.value!=null),J=`bm-slot-group bm-sg-${P}${j?" bm-has-values":""}${p===P?" bm-sg-active":""}`,A=zv[P];return g.jsx("div",{className:J,children:G.map(H=>g.jsx(Iv,{slotKey:H.key,value:H.value,placeholder:H.placeholder,layer:e,isExpanded:o,frozen:i,scaleValues:H.scaleValues,axis:A,onClick:k=>a==null?void 0:a(H.key,k),onValueChange:u?k=>u(H.key,k):void 0,onValueHover:f?k=>f(H.key,k):void 0,onValueLeave:f?()=>f(H.key,null):void 0,onScrubStart:c,onScrubEnd:m,onOpen:()=>{d(P),v==null||v()},onClose:()=>{d(null),y==null||y()}},H.key))},P)}),C=P=>{P.stopPropagation(),i||s(!0)},I=P=>{const V=P.relatedTarget,G=P.currentTarget;V&&G.contains(V)||i||s(!1)};return g.jsxs("div",{className:b,onMouseOver:C,onMouseOut:I,"data-layer":e,children:[R,N,x]})}const rc=["margin","outline","border","padding"];function Kv({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:l,onEditStart:o}){const[i,s]=S.useState(null),[a,u]=S.useState(null),f=t||a!==null,c=new Map(e.map(p=>[p.layer,p])),m=(p,d)=>{f||s(d?p:null)},v=(p,d,h)=>{f||n==null||n(p,d,h)};let x=g.jsx("div",{className:"bm-content"});for(let p=rc.length-1;p>=0;p--){const d=rc[p],h=c.get(d);h&&(x=g.jsx(Av,{layer:h.layer,classState:h.classState,shorthandValue:h.shorthandValue,shorthandScaleValues:h.shorthandScaleValues,slots:h.slots,isHovered:i===d||a===d,frozen:f,onHoverChange:w=>m(d,w),onSlotClick:(w,R)=>v(d,w,R),onSlotChange:r?(w,R)=>r(d,w,R):void 0,onSlotHover:l?(w,R)=>l(d,w,R):void 0,onScrubStart:()=>{u(d),o==null||o()},onScrubEnd:()=>u(null),onSlotOpen:()=>{u(d),o==null||o()},onSlotClose:()=>u(null),children:x}))}const b=`bm-root${f?" bm-frozen":""}`;return g.jsx("div",{className:b,children:x})}const $v={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"}},Fv=["y","t","r","b","x","l"];function Hv(e){const t=Fv.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 Vv(e,t){const n=$v[e],r=Hv(e),l=t[n.shorthand]??null,o=l!=null?l===""?n.shorthand:`${n.shorthand}-${l}`:null,i=r.map(({key:m,placeholder:v})=>{let y;if(m==="color"){const p=e==="outline"?"outline-color":"border-color";y=p in t?p:void 0}else if(m==="style"){const p=e==="outline"?"outline-style":"border-style";y=p in t?p:void 0}else m==="offset"?y="outline-offset"in t?"outline-offset":void 0:y=n[m];const x=y?t[y]??null:null;let b;return(m==="color"||m==="style")&&x!=null?b=`${e==="outline"?"outline":"border"}-${x}`:b=x!=null&&y?`${y}-${x}`:null,{key:m,value:b,placeholder:v}}),s=o!=null,a=i.some(m=>(m.key==="x"||m.key==="y")&&m.value!=null),u=i.some(m=>(m.key==="t"||m.key==="r"||m.key==="b"||m.key==="l")&&m.value!=null),f=a||u;let c;return!s&&!f?c="none":s&&!f?c="shorthand":!s&&a&&!u?c="axis":s?c="mixed":c="individual",{layer:e,classState:c,shorthandValue:o,slots:i}}const Cs=["px","0","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"],qd=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],Bv=["solid","dashed","dotted","double","hidden","none"];function Wv(e,t,n){var i,s,a;if(t==="color")return[];if(t==="style"){const u=e==="outline"?"outline":"border";return Bv.map(f=>`${u}-${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):Cs:r=(s=n==null?void 0:n.theme)!=null&&s.borderWidth?Object.keys(n.theme.borderWidth):qd:r=(a=n==null?void 0:n.theme)!=null&&a.spacing?Object.keys(n.theme.spacing):Cs;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(u=>u===""?o:`${o}-${u}`):[]}function gl(e,t){const n={};for(const i of e){let s=i.prefix.replace(/-$/,"");s==="border"&&i.themeKey==="colors"?s="border-color":s==="border"&&i.themeKey===null&&i.valueType==="enum"?s="border-style":s==="outline"&&i.themeKey==="colors"&&(s="outline-color"),n[s]=i.value}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 c,m;const s=Vv(i,n),a=s.slots.map(v=>{const y=Wv(i,v.key,t);return y.length>0?{...v,scaleValues:y}:v}),f=(l[i]?(c=t==null?void 0:t.theme)!=null&&c.borderWidth?Object.keys(t.theme.borderWidth):qd:(m=t==null?void 0:t.theme)!=null&&m.spacing?Object.keys(t.theme.spacing):Cs).map(v=>v===""?r[i]:`${r[i]}-${v}`);return{...s,slots:a,shorthandScaleValues:f}})}function Uv({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,children:l}){const[o,i]=S.useState(!1),s=S.useRef(null);S.useEffect(()=>{if(!o)return;function u(f){s.current&&!s.current.contains(f.target)&&i(!1)}return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[o]);function a(u){n==null||n(u),i(!1)}return g.jsxs("div",{className:"mb-1",children:[g.jsxs("div",{className:"mt-3 mb-1 flex items-center gap-1.5",children:[g.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),g.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:e}),t.length>0&&g.jsxs("div",{className:"relative ml-auto",ref:s,children:[g.jsx("button",{type:"button","aria-label":`Add ${e} property`,className:`w-[18px] h-[18px] flex items-center justify-center rounded text-[11px] leading-none border transition-colors cursor-pointer ${o?"border-bv-teal text-bv-teal bg-bv-teal/10":"border-bv-border text-bv-muted bg-transparent hover:border-bv-teal hover:text-bv-teal hover:bg-bv-teal/10"}`,onClick:()=>i(u=>!u),children:"+"}),o&&g.jsx("div",{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",children:t.map(u=>g.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:()=>a(u.prefix),children:[u.name,g.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:u.prefixHint})]},u.prefix))})]})]}),r?g.jsxs("div",{className:"text-[10px] text-bv-muted italic mb-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):g.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:l}),g.jsx("hr",{className:"border-none border-t border-bv-border my-1"})]})}const Gv=[{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 Qv({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:l,onSolidClick:o,solidColorName:i}){const s=t==="solid";return g.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[g.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:Gv.map((a,u)=>{if(a==="center"){const c=s;return g.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
|
+
${c?"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 g.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)})}),g.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:s?i?g.jsx("span",{className:"text-bv-orange font-bold",children:i}):g.jsx("span",{className:"text-bv-muted italic",children:"none"}):g.jsxs("span",{children:["to-",g.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function Xv(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 hi(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function Yv({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:l,onRemove:o}){const i=S.useRef(!1),s=S.useCallback(c=>{c.preventDefault(),c.stopPropagation(),i.current=!1,r(e.id,c.clientX);const m=()=>{i.current=!0},v=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",v)},[e.id,r]),a=S.useCallback(c=>{c.stopPropagation(),i.current||l(e.id,c.currentTarget)},[e.id,l]),u=S.useCallback(c=>{c.stopPropagation(),o(e.id)},[e.id,o]),f=e.position??0;return g.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:[g.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:g.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&&g.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:u,onMouseDown:c=>c.stopPropagation(),children:"×"})]})}function Zv({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:l,onBarClick:o,onStopRemove:i,selectedStopId:s}){const a=S.useRef(null),u=S.useRef(null),f=[...e].sort((y,x)=>(y.position??0)-(x.position??0)),c=S.useCallback((y,x)=>{const b=e.find(h=>h.id===y);if(!b)return;u.current={stopId:y,startX:x,startPos:b.position??0};const p=h=>{const w=u.current;if(!w||!a.current)return;const R=a.current.getBoundingClientRect(),N=(h.clientX-w.startX)/R.width*100,C=hi(w.startPos+N);n(w.stopId,C)},d=h=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",d);const w=u.current;if(w&&a.current){const R=a.current.getBoundingClientRect(),N=(h.clientX-w.startX)/R.width*100,C=hi(w.startPos+N);r(w.stopId,C)}u.current=null};document.addEventListener("mousemove",p),document.addEventListener("mouseup",d)},[e,n,r]),m=S.useCallback(y=>{if(!a.current)return;const x=a.current.getBoundingClientRect(),b=(y.clientX-x.left)/x.width*100;o(hi(b))},[o]),v=Xv(f,t);return g.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[f.map((y,x)=>g.jsx(Yv,{stop:y,isEndpoint:x===0||x===f.length-1,isSelected:y.id===s,onDragStart:c,onClick:l,onRemove:i},y.id)),g.jsx("div",{ref:a,className:"h-9 rounded-md cursor-pointer relative",style:{background:v,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:m,children:g.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 Jv={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 qv(e){var B,ne;const{direction:t,stops:n,mode:r,solidColorName:l,solidColorHex:o,onPreview:i,onRevert:s,onStage:a}=e,[u,f]=S.useState(t),[c,m]=S.useState(n),[v,y]=S.useState(r),[x,b]=S.useState(l),[p,d]=S.useState(o),[h,w]=S.useState(null),[R,E]=S.useState(!1),[N,C]=S.useState(null),[I,P]=S.useState(null),V=S.useRef(n.length+1),G=S.useCallback(F=>{i(`bg-gradient-to-${u}`,`bg-gradient-to-${F}`)},[u,i]),j=S.useCallback(()=>{s()},[s]),M=S.useCallback(F=>{if(f(F),y("gradient"),v==="gradient"&&c.length>=2){const $=`bg-gradient-to-${u}`,T=`bg-gradient-to-${F}`;a($,T)}else{const $=x??"slate-500",T=p??an($,e.colors),D={id:"1",role:"from",colorName:$,hex:T,position:null},U={id:"2",role:"to",colorName:$,hex:T,position:null};V.current=3,m([D,U]);const X=x?`bg-${x}`:"";a(X,`bg-gradient-to-${F}`),a("",`from-${$}`),a("",`to-${$}`)}},[u,v,c,x,p,e.colors,a]),J=S.useCallback(()=>{y("solid"),E(!1),w(null),C(null),c.length>0&&!x&&(b(c[0].colorName),d(c[0].hex))},[c,x]),A=S.useCallback((F,$)=>{m(D=>D.map(U=>U.id===F?{...U,position:$}:U));const T=c.find(D=>D.id===F);if(T){const D=T.position!=null?`${T.role}-${T.position}%`:"",U=`${T.role}-${$}%`;i(D,U)}},[c,i]),H=S.useCallback((F,$)=>{m(D=>D.map(U=>U.id===F?{...U,position:$}:U));const T=c.find(D=>D.id===F);if(T){const D=T.position!=null?`${T.role}-${T.position}%`:"",U=`${T.role}-${$}%`;a(D,U)}},[c,a]),k=S.useCallback((F,$)=>{h===F&&R?(w(null),E(!1),C(null),P(null)):(w(F),E(!0),C("stop"),P($))},[h,R]),_=S.useCallback(F=>{const $=String(V.current++),T=[...c].sort((X,tt)=>(X.position??0)-(tt.position??0));let D=T[0];for(const X of T)(X.position??0)<=F&&(D=X);const U={id:$,role:"via",colorName:(D==null?void 0:D.colorName)??"gray-500",hex:(D==null?void 0:D.hex)??"#6B7280",position:F};m(X=>[...X,U]),w($),E(!0),C("stop")},[c]),z=S.useCallback(F=>{const $=c.find(D=>D.id===F);if(!$)return;const T=c.filter(D=>D.id!==F);if(w(null),E(!1),C(null),P(null),T.length>=2)m(T),a(`${$.role}-${$.colorName}`,"");else if(T.length===1){const D=T[0];m([]),y("solid"),b(D.colorName),d(D.hex),a(`bg-gradient-to-${u}`,""),c.forEach(U=>a(`${U.role}-${U.colorName}`,"")),a("",`bg-${D.colorName}`)}else m([]),y("none"),b(null),d(null),a(`bg-gradient-to-${u}`,""),c.forEach(D=>a(`${D.role}-${D.colorName}`,""))},[c,u,a]),Y=S.useCallback(F=>{E(!0),C("solid"),w(null),P(F)},[]),ee=S.useCallback(()=>{i(x?`bg-${x}`:"","")},[x,i]),Ke=S.useCallback(()=>{x&&a(`bg-${x}`,""),b(null),d(null),E(!1),C(null),P(null)},[x,a]),Oe=S.useCallback(F=>{if(N==="stop"&&h){const $=c.find(T=>T.id===h);$&&i(`${$.role}-${$.colorName}`,F)}else N==="solid"&&i(`bg-${x}`,F)},[N,h,c,x,i]),ie=S.useCallback(()=>{s()},[s]),se=S.useCallback(F=>{if(N==="stop"&&h){const $=c.find(T=>T.id===h);if($){const T=$.role+"-",D=F.startsWith(T)?F.slice(T.length):F;m(U=>U.map(X=>X.id===h?{...X,colorName:D,hex:an(D,e.colors)}:X)),a(`${$.role}-${$.colorName}`,`${$.role}-${D}`),E(!1),w(null),C(null),P(null)}}else if(N==="solid"){const $="bg-",T=F.startsWith($)?F.slice($.length):F,D=x?`bg-${x}`:"";b(T),d(an(T,e.colors)),a(D,`bg-${T}`),E(!1),C(null),P(null)}},[N,h,c,x,a,e.colors]),Se=S.useCallback(()=>{E(!1),w(null),C(null),P(null),s()},[s]),wn=N==="stop"&&h?(((B=c.find(F=>F.id===h))==null?void 0:B.role)??"from")+"-":"bg-",Sn=N==="stop"&&h?((ne=c.find(F=>F.id===h))==null?void 0:ne.colorName)??"":x??"",L=Jv[u],Q=!!(h?c.find(F=>F.id===h):null);return{direction:u,stops:c,mode:v,solidColorName:x,solidColorHex:p,selectedStopId:h,colorPickerOpen:R,editingTarget:N,anchorEl:I,colorPrefix:wn,colorPickerCurrentValue:Sn,directionCSS:L,selectedStopIsRemovable:Q,handleDirectionHover:G,handleDirectionLeave:j,handleDirectionClick:M,handleSolidToggle:J,handleStopDrag:A,handleStopDragEnd:H,handleStopClick:k,handleBarClick:_,handleStopRemove:z,handleSwatchClick:Y,handleHoverRemoveSolid:ee,handleRemoveSolid:Ke,handleColorHover:Oe,handleColorLeave:ie,handleColorClick:se,handleCloseColorPicker:Se}}function an(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 ey(e){const t=qv(e),n=t.mode==="solid",{refs:r,floatingStyles:l,context:o}=ks({open:t.colorPickerOpen,onOpenChange:a=>{a||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[gs(4),ys(),vs({padding:8}),xs({apply({availableHeight:a,elements:u}){Object.assign(u.floating.style,{maxHeight:`${a}px`})},padding:8})],whileElementsMounted:hs}),i=Ss(o),{getFloatingProps:s}=bs([i]);return S.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[g.jsx(Qv,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?g.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(0,0,0,0.08)",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&&g.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:[g.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),g.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):g.jsx(Zv,{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&&g.jsx(ws,{children:g.jsxs("div",{ref:r.setFloating,style:{...l,zIndex:9999,overflowY:"auto"},className:"p-2 bg-bv-surface border border-bv-border rounded-md shadow-lg",...s(),children:[g.jsx(Es,{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&&g.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"})]})}),g.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 ty(e,t){const n=e.find(y=>y.prefix==="bg-gradient-to-"),r=(n==null?void 0:n.value)??"r",l=e.find(y=>y.prefix==="bg-"&&y.category==="color"),o=(l==null?void 0:l.value)??null,i=(o==null?void 0:o.split("/")[0])??null,s=i?an(i,t):null,a=e.filter(y=>y.prefix==="from-"&&y.category==="gradient"),u=e.filter(y=>y.prefix==="via-"&&y.category==="gradient"),f=e.filter(y=>y.prefix==="to-"&&y.category==="gradient"),c=!!(n||a.length>0&&f.length>0),m=c?"gradient":"solid",v=[];if(c){let y=1;for(const x of a){const b=x.value,p=b.split("/")[0];v.push({id:String(y++),role:"from",colorName:b,hex:an(p,t),position:null})}for(const x of u){const b=x.value,p=b.split("/")[0];v.push({id:String(y++),role:"via",colorName:b,hex:an(p,t),position:null})}for(const x of f){const b=x.value,p=b.split("/")[0];v.push({id:String(y++),role:"to",colorName:b,hex:an(p,t),position:null})}}return{direction:r,stops:v,mode:m,solidColorName:o,solidColorHex:s,colors:t}}const lc={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Color",borders:"Borders",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid"},oc=new Set(["m-","mx-","my-","mt-","mr-","mb-","ml-","ms-","me-","p-","px-","py-","pt-","pr-","pb-","pl-","ps-","pe-","border-","border-t-","border-r-","border-b-","border-l-","outline-","outline-offset-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-","gap-","gap-x-","gap-y-","space-x-","space-y-"]),ic=new Set(["border","rounded"]),ny=new Set(["bg-","bg-gradient-to-","from-","via-","to-"]),ry=[{name:"Font family",prefixHint:"font-sans/serif/mono",prefix:"font-family"},{name:"Font size",prefixHint:"text-{size}",prefix:"text-size"},{name:"Font style",prefixHint:"italic / not-italic",prefix:"font-style"},{name:"Font weight",prefixHint:"font-*",prefix:"font-"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"},{name:"Text align",prefixHint:"text-{align}",prefix:"text-align"},{name:"Line height",prefixHint:"leading-*",prefix:"leading-"},{name:"Letter spacing",prefixHint:"tracking-*",prefix:"tracking-"},{name:"Vertical align",prefixHint:"align-*",prefix:"vertical-align"}],ly=[{name:"Width",prefixHint:"w-*",prefix:"w-"},{name:"Height",prefixHint:"h-*",prefix:"h-"},{name:"Min width",prefixHint:"min-w-*",prefix:"min-w-"},{name:"Max width",prefixHint:"max-w-*",prefix:"max-w-"},{name:"Min height",prefixHint:"min-h-*",prefix:"min-h-"},{name:"Max height",prefixHint:"max-h-*",prefix:"max-h-"},{name:"Size",prefixHint:"size-*",prefix:"size-"}],sc=["sizing","typography","color"],ac={"text-left":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},"text-center":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},"text-right":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},"text-justify":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},"text-start":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},"text-end":{alternatives:["text-left","text-center","text-right","text-justify","text-start","text-end"],propertyKey:"text-align"},italic:{alternatives:["italic","not-italic"],propertyKey:"font-style"},"not-italic":{alternatives:["italic","not-italic"],propertyKey:"font-style"},"font-sans":{alternatives:["font-sans","font-serif","font-mono"],propertyKey:"font-family"},"font-serif":{alternatives:["font-sans","font-serif","font-mono"],propertyKey:"font-family"},"font-mono":{alternatives:["font-sans","font-serif","font-mono"],propertyKey:"font-family"},"align-baseline":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-top":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-middle":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-bottom":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-text-top":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-text-bottom":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-sub":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},"align-super":{alternatives:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"],propertyKey:"vertical-align"},uppercase:{alternatives:["uppercase","lowercase","capitalize","normal-case"],propertyKey:"text-transform"},lowercase:{alternatives:["uppercase","lowercase","capitalize","normal-case"],propertyKey:"text-transform"},capitalize:{alternatives:["uppercase","lowercase","capitalize","normal-case"],propertyKey:"text-transform"},"normal-case":{alternatives:["uppercase","lowercase","capitalize","normal-case"],propertyKey:"text-transform"}},Dl={"w-":{parserPrefix:"w-",themeKey:"spacing",valueType:"scalar"},"h-":{parserPrefix:"h-",themeKey:"spacing",valueType:"scalar"},"min-w-":{parserPrefix:"min-w-",themeKey:"spacing",valueType:"scalar"},"max-w-":{parserPrefix:"max-w-",themeKey:"spacing",valueType:"scalar"},"min-h-":{parserPrefix:"min-h-",themeKey:"spacing",valueType:"scalar"},"max-h-":{parserPrefix:"max-h-",themeKey:"spacing",valueType:"scalar"},"size-":{parserPrefix:"size-",themeKey:"spacing",valueType:"scalar"},"font-":{parserPrefix:"font-",themeKey:"fontWeight",valueType:"scalar"},"text-size":{parserPrefix:"text-",themeKey:"fontSize",valueType:"scalar"},"text-color":{parserPrefix:"text-",themeKey:"colors",valueType:"color"},"text-align":{parserPrefix:"text-align",themeKey:null,valueType:"enum",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"font-family":{parserPrefix:"font-family",themeKey:null,valueType:"enum",enumAlts:["font-sans","font-serif","font-mono"]},"font-style":{parserPrefix:"font-style",themeKey:null,valueType:"enum",enumAlts:["italic","not-italic"]},"vertical-align":{parserPrefix:"vertical-align",themeKey:null,valueType:"enum",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"leading-":{parserPrefix:"leading-",themeKey:"lineHeight",valueType:"scalar"},"tracking-":{parserPrefix:"tracking-",themeKey:"letterSpacing",valueType:"scalar"},"bg-":{parserPrefix:"bg-",themeKey:"colors",valueType:"color"}};function oy(e,t,n,r){const l=new Set(t.map(i=>i.prefix)),o=new Set(t.map(i=>i.fullClass));return e.filter(i=>{if(n.has(i.prefix)||r!=null&&r.has(i.prefix))return!1;const s=Dl[i.prefix];if((s==null?void 0:s.valueType)==="enum"&&s.enumAlts)return!s.enumAlts.some(u=>o.has(u));const a=(s==null?void 0:s.parserPrefix)??i.prefix;return!l.has(a)})}function iy(e){const t=new Map;for(const n of e){const r=t.get(n.category)||[];r.push(n),t.set(n.category,r)}return t}function sy({componentName:e,instanceCount:t,parsedClasses:n,tailwindConfig:r,patchManager:l}){var wn,Sn;const[o,i]=S.useState(null),[s,a]=S.useState(new Map),[u,f]=S.useState(null),[c,m]=S.useState(null),v=S.useRef(null),{refs:y,floatingStyles:x,context:b}=ks({open:u!==null,onOpenChange:L=>{L||f(null)},strategy:"fixed",placement:"bottom-start",middleware:[gs(4),ys(),vs({padding:8}),xs({apply({availableHeight:L,elements:W}){Object.assign(W.floating.style,{maxHeight:`${L}px`})},padding:8})],whileElementsMounted:hs}),p=Ss(b),{getFloatingProps:d}=bs([p]);S.useEffect(()=>{u!=null&&u.anchorEl&&y.setReference(u.anchorEl)},[u==null?void 0:u.anchorEl]);const{refs:h,floatingStyles:w,context:R}=ks({open:c!==null,onOpenChange:L=>{L||(m(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[gs(4),ys(),vs({padding:8}),xs({apply({availableHeight:L,elements:W}){Object.assign(W.floating.style,{maxHeight:`${L}px`})},padding:8})],whileElementsMounted:hs}),E=Ss(R),{getFloatingProps:N}=bs([E]);S.useEffect(()=>{c!=null&&c.anchorEl&&h.setReference(c.anchorEl)},[c==null?void 0:c.anchorEl]);const[C,I]=S.useState(new Set),P=S.useRef(n.map(L=>L.fullClass).join(" ")),V=n.map(L=>L.fullClass).join(" ");S.useEffect(()=>{P.current!==V&&(P.current=V,a(new Map),f(null),m(null),I(new Set))});const G=e,j=l.patches.filter(L=>L.status==="staged"),M=new Set(j.filter(L=>L.originalClass==="").map(L=>L.property));function J(L){return s.size===0?L:L.map(W=>{const Q=s.get(`${W.layer}-shorthand`),B=W.slots.map($=>{const T=s.get(`${W.layer}-${$.key}`);return T!==void 0?{...$,value:T}:$}),ne=Q??W.shorthandValue;let F=W.classState;return Q!==void 0&&(F=B.some(T=>T.value!=null)?"mixed":"shorthand"),{...W,shorthandValue:ne,classState:F,slots:B}})}const A=iy(n);function H(L,W){l.preview(L,W)}function k(){l.revertPreview()}function _(L,W,Q){l.stage(G,L,W,Q)}function z(L,W){const Q=L||W,B=Q.startsWith("bg-gradient-to-")?"bg-gradient-to-":Q.startsWith("from-")?"from-":Q.startsWith("via-")?"via-":Q.startsWith("to-")?"to-":"bg-";_(B,L,W)}function Y(L,W){l.revertPreview(),pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),L.valueType==="color"&&W?(m(Q=>(Q==null?void 0:Q.cls.fullClass)===L.fullClass?null:{cls:L,anchorEl:W}),i(null)):(m(null),i(L))}function ee(L,W){l.preview(L.fullClass,W)}function Ke(L){l.revertPreview()}function Oe(L){I(W=>new Set(W).add(L))}function ie(L,W){l.preview("",W)}function se(L){l.revertPreview()}function Se(L,W){const Q=Dl[L];l.stage(G,(Q==null?void 0:Q.parserPrefix)??L,"",W),I(B=>{const ne=new Set(B);return ne.delete(L),ne})}return g.jsxs("div",{className:"p-3",children:[g.jsxs("div",{className:"mt-3 mb-1 flex items-center gap-1.5",children:[g.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),g.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Box Model"})]}),g.jsxs("div",{className:"mb-4",children:[g.jsx(Kv,{layers:J(gl(n,r)),onEditStart:()=>{pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),f(null)},onSlotClick:(L,W,Q)=>{var T;if(W!=="color"||!Q){f(null);return}const B=gl(n,r).find(D=>D.layer===L),ne=`${L}-color`,F=s.get(ne)??((T=B==null?void 0:B.slots.find(D=>D.key==="color"))==null?void 0:T.value)??"",$=L==="outline"?"outline-":"border-";f(D=>(D==null?void 0:D.layer)===L?null:{layer:L,prefix:$,currentClass:F,staged:!1,anchorEl:Q})},onSlotHover:(L,W,Q)=>{var B;if(Q===null)l.revertPreview();else{const ne=`${L}-${W}`,F=gl(n,r).find(T=>T.layer===L),$=W==="shorthand"?s.get(ne)??(F==null?void 0:F.shorthandValue):s.get(ne)??((B=F==null?void 0:F.slots.find(T=>T.key===W))==null?void 0:B.value);l.preview($??"",Q)}},onSlotChange:(L,W,Q)=>{var $;const B=`${L}-${W}`,ne=gl(n,r).find(T=>T.layer===L),F=W==="shorthand"?s.get(B)??(ne==null?void 0:ne.shorthandValue):s.get(B)??(($=ne==null?void 0:ne.slots.find(T=>T.key===W))==null?void 0:$.value);_(`${L}-${W}`,F??"",Q),a(T=>new Map(T).set(B,Q))}}),u&&g.jsx(ws,{children:g.jsx("div",{ref:y.setFloating,style:{...x,zIndex:9999,overflowY:"auto"},...d(),children:g.jsx(Es,{prefix:u.prefix,currentValue:u.currentClass.startsWith(u.prefix)?u.currentClass.slice(u.prefix.length):"",colors:(r==null?void 0:r.colors)||{},locked:!1,lockedValue:((wn=j.find(L=>L.property===u.prefix))==null?void 0:wn.newClass)??null,onHover:L=>{v.current=L,l.preview(u.currentClass,L)},onLeave:()=>{u.staged&&v.current?(l.preview(v.current,u.currentClass),v.current=null):l.revertPreview()},onClick:L=>{const W=`${u.layer}-color`;_(u.prefix,u.currentClass,L),a(Q=>new Map(Q).set(W,L)),f(Q=>Q?{...Q,currentClass:L,staged:!0}:null)}})})})]}),c&&g.jsx(ws,{children:g.jsx("div",{ref:h.setFloating,style:{...w,zIndex:9999,overflowY:"auto"},...N(),children:g.jsx(Es,{prefix:c.cls.prefix,currentValue:c.cls.value,colors:(r==null?void 0:r.colors)||{},locked:!1,lockedValue:((Sn=j.find(L=>L.property===c.cls.prefix))==null?void 0:Sn.newClass)??null,onHover:L=>H(c.cls.fullClass,L),onLeave:k,onClick:L=>_(c.cls.prefix,c.cls.fullClass,L)})})}),sc.map(L=>{const Q=(A.get(L)||[]).filter(T=>!oc.has(T.prefix)&&!ic.has(T.fullClass)&&!(L==="color"&&ny.has(T.prefix))),B={typography:ry,sizing:ly,color:[]},ne=oy(B[L]||[],Q,C,M),F=(B[L]||[]).filter(T=>C.has(T.prefix)).map(T=>T.prefix),$=(B[L]||[]).filter(T=>M.has(T.prefix)).map(T=>T.prefix);return g.jsxs(Uv,{label:L==="color"?"Backgrounds":lc[L]||L,availableProperties:ne,onAddProperty:Oe,isEmpty:L==="color"?!1:Q.length===0&&F.length===0&&$.length===0,children:[L==="color"&&g.jsx(ey,{...ty(n,(r==null?void 0:r.colors)||{}),onPreview:H,onRevert:k,onStage:z}),Q.map(T=>{var D,U;if(T.valueType==="scalar"){const X=hl(T.prefix,T.themeKey,r);if(X.length>0){const tt=((D=j.find(nt=>nt.property===T.prefix))==null?void 0:D.newClass)??null;return g.jsx(Ot,{values:X,currentValue:T.fullClass,lockedValue:tt,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:nt=>ee(T,nt),onLeave:()=>Ke(),onClick:nt=>_(T.prefix,T.fullClass,nt)},T.fullClass)}}if(T.valueType==="enum"){const X=ac[T.fullClass];if(X){const tt=((U=j.find(nt=>nt.property===X.propertyKey))==null?void 0:U.newClass)??null;return g.jsx(Ot,{values:X.alternatives,currentValue:T.fullClass,lockedValue:tt,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:nt=>ee(T,nt),onLeave:()=>Ke(),onClick:nt=>_(X.propertyKey,T.fullClass,nt)},T.fullClass)}}return g.jsx("div",{className:`px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(o==null?void 0:o.fullClass)===T.fullClass||(c==null?void 0:c.cls.fullClass)===T.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:X=>Y(T,X.currentTarget),children:T.fullClass},T.fullClass)}),(B[L]||[]).filter(T=>M.has(T.prefix)).map(T=>{const D=Dl[T.prefix];if(!D)return null;if(D.valueType==="scalar"){const U=hl(D.parserPrefix,D.themeKey,r);if(U.length===0)return null;const X=j.find(tt=>tt.property===(D.parserPrefix??T.prefix));return g.jsx(Ot,{values:U,currentValue:(X==null?void 0:X.newClass)??U[Math.floor(U.length/2)],lockedValue:(X==null?void 0:X.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:tt=>ie(T.prefix,tt),onLeave:()=>se(T.prefix),onClick:tt=>Se(T.prefix,tt)},`staged-${T.prefix}`)}if(D.valueType==="enum"&&D.enumAlts){const U=j.find(X=>X.property===D.parserPrefix);return g.jsx(Ot,{values:D.enumAlts,currentValue:(U==null?void 0:U.newClass)??D.enumAlts[0],lockedValue:(U==null?void 0:U.newClass)??null,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:X=>ie(T.prefix,X),onLeave:()=>se(T.prefix),onClick:X=>Se(T.prefix,X)},`staged-${T.prefix}`)}return null}),F.map(T=>{const D=Dl[T];if(!D)return null;if(D.valueType==="scalar"){const U=hl(D.parserPrefix,D.themeKey,r);if(U.length>0)return g.jsx(Ot,{values:U,currentValue:U[Math.floor(U.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:X=>ie(T,X),onLeave:()=>se(),onClick:X=>Se(T,X)},`pending-${T}`)}return D.valueType==="enum"&&D.enumAlts?g.jsx(Ot,{values:D.enumAlts,currentValue:D.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:U=>ie(T,U),onLeave:()=>se(),onClick:U=>Se(T,U)},`pending-${T}`):D.valueType==="color"?g.jsxs("div",{"data-testid":`pending-ghost-${T}`,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:U=>{const X={category:"color",valueType:"color",prefix:D.parserPrefix,value:"",fullClass:"",themeKey:"colors"};m({cls:X,anchorEl:U.currentTarget}),i(null)},children:[D.parserPrefix,"color"]},`pending-${T}`):null})]},L)}),Array.from(A).filter(([L])=>!sc.includes(L)&&L!=="gradient").map(([L,W])=>{const Q=W.filter(B=>!oc.has(B.prefix)&&!ic.has(B.fullClass));return Q.length===0?null:g.jsxs("div",{children:[g.jsxs("div",{className:"mt-3 mb-1 flex items-center gap-1.5",children:[g.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),g.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:lc[L]||L})]}),g.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:Q.map(B=>{var ne,F;if(B.valueType==="scalar"){const $=hl(B.prefix,B.themeKey,r);if($.length>0){const T=((ne=j.find(D=>D.property===B.prefix))==null?void 0:ne.newClass)??null;return g.jsx(Ot,{values:$,currentValue:B.fullClass,lockedValue:T,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:D=>ee(B,D),onLeave:()=>Ke(),onClick:D=>_(B.prefix,B.fullClass,D)},B.fullClass)}}if(B.valueType==="enum"){const $=ac[B.fullClass];if($){const T=((F=j.find(D=>D.property===$.propertyKey))==null?void 0:F.newClass)??null;return g.jsx(Ot,{values:$.alternatives,currentValue:B.fullClass,lockedValue:T,locked:!1,onStart:()=>pe("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:D=>ee(B,D),onLeave:()=>Ke(),onClick:D=>_($.propertyKey,B.fullClass,D)},B.fullClass)}}return g.jsx("div",{className:`px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(o==null?void 0:o.fullClass)===B.fullClass||(c==null?void 0:c.cls.fullClass)===B.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:$=>Y(B,$.currentTarget),children:B.fullClass},B.fullClass)})})]},L)})]})}function ay(){const[e,t]=S.useState([]),[n,r]=S.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[l,o]=S.useState({draft:[],commits:[]}),[i,s]=S.useState(!1),a=S.useRef(e);a.current=e;const u=S.useRef(l);u.current=l;const f=S.useCallback((E,N)=>{pe("overlay",{type:"PATCH_PREVIEW",oldClass:E,newClass:N})},[]),c=S.useCallback(()=>{pe("overlay",{type:"PATCH_REVERT"})},[]),m=S.useCallback((E,N,C,I)=>{if(I===C){t(V=>V.filter(G=>!(G.kind==="class-change"&&G.elementKey===E&&G.property===N))),pe("overlay",{type:"PATCH_REVERT"});return}const P=crypto.randomUUID();t(V=>{const G=V.filter(M=>!(M.kind==="class-change"&&M.elementKey===E&&M.property===N)),j={id:P,kind:"class-change",elementKey:E,status:"staged",originalClass:C,newClass:I,property:N,timestamp:new Date().toISOString()};return[...G,j]}),pe("overlay",{type:"PATCH_STAGE",id:P,oldClass:C,newClass:I,property:N})},[]),v=S.useCallback((E,N,C)=>{const I=crypto.randomUUID(),P=C?{name:C}:void 0;t(V=>{const G={id:I,kind:"message",elementKey:N,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:E,component:P};return[...V,G]}),Mn(P?{type:"MESSAGE_STAGE",id:I,message:E,elementKey:N,component:P}:{type:"MESSAGE_STAGE",id:I,message:E,elementKey:N})},[]),y=S.useCallback(()=>{const E=u.current.draft.map(I=>I.id),N=a.current.filter(I=>I.status==="staged").map(I=>I.id),C=Array.from(new Set([...E,...N]));C.length!==0&&(Mn({type:"PATCH_COMMIT",ids:C}),t([]))},[]),x=S.useCallback(E=>{t(N=>N.filter(C=>C.id!==E)),Mn({type:"DISCARD_DRAFTS",ids:[E]}),pe("overlay",{type:"PATCH_REVERT"})},[]),b=S.useCallback(()=>{const E=u.current.draft.map(I=>I.id),N=a.current.filter(I=>I.status==="staged").map(I=>I.id),C=Array.from(new Set([...E,...N]));t([]),C.length>0&&Mn({type:"DISCARD_DRAFTS",ids:C}),pe("overlay",{type:"PATCH_REVERT"})},[]),p=S.useCallback(()=>{},[]),d=S.useCallback(E=>{r({draft:E.draftCount,committed:E.committedCount,implementing:E.implementingCount,implemented:E.implementedCount,partial:E.partialCount,error:E.errorCount}),o({draft:E.draft,commits:E.commits}),s(!!E.agentWaiting)},[]),h=S.useCallback(E=>{r({draft:E.staged,committed:E.committed,implementing:E.implementing,implemented:E.implemented,partial:0,error:0})},[]),w=e.filter(E=>E.status==="staged").length,R={draft:Math.max(w,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:R,queueState:l,agentWaiting:i,preview:f,revertPreview:c,stage:m,stageMessage:v,commitAll:y,discard:x,discardAll:b,reset:p,handleQueueUpdate:d,handlePatchUpdate:h}}function vl({label:e,count:t,items:n,activeColor:r,onCommit:l,onDiscard:o,onCommitAll:i,onDiscardAll:s}){const[a,u]=S.useState(!1),f=S.useRef(null),c=S.useRef(null),[m,v]=S.useState(void 0);S.useEffect(()=>{if(!a||!c.current)return;const p=c.current.getBoundingClientRect(),d=220,h=window.innerWidth,w=4;let R=p.left+p.width/2-d/2;R=Math.max(w,Math.min(R,h-d-w)),v(R-p.left)},[a]),S.useEffect(()=>{if(!a)return;function b(p){f.current&&!f.current.contains(p.target)&&u(!1)}return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[a]),S.useEffect(()=>{if(!a)return;function b(p){p.key==="Escape"&&u(!1)}return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[a]);const y=t>0,x=l||o||i||s;return g.jsxs("div",{ref:f,className:"relative",children:[g.jsxs("button",{ref:c,className:`text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${y?`${r} font-medium`:"text-bv-muted"} ${y?"hover:underline":""}`,onClick:()=>y&&u(!a),disabled:!y,type:"button",children:[t," ",e]}),a&&g.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:m!==void 0?{left:`${m}px`}:void 0,children:[g.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,")"]}),g.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?g.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(b=>{var h,w;const p="kind"in b&&b.kind==="message",d="kind"in b&&b.kind==="design";return g.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:[g.jsxs("div",{className:"flex-1 min-w-0",children:[!p&&!d&&((h=b.component)==null?void 0:h.name)&&g.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:b.component.name}),d?g.jsxs("div",{className:"text-[11px] text-bv-text",children:[g.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[g.jsx("span",{children:"✏️"}),g.jsxs("span",{className:"truncate",children:["Drawing",(w=b.component)!=null&&w.name?` in ${b.component.name}`:""]})]}),"image"in b&&b.image&&g.jsx("img",{src:b.image,alt:"Design drawing",className:"w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):p?g.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[g.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in b&&b.message||"",'"']}):g.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:b.originalClass?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"line-through text-bv-muted",children:b.originalClass})," → ",g.jsx("span",{className:"text-bv-teal",children:b.newClass})]}):g.jsxs("span",{className:"text-bv-teal",children:["+",b.newClass]})})]}),(l||o)&&g.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&g.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:R=>{R.stopPropagation(),l(b.id)},title:"Commit to Agent",type:"button",children:"✓"}),o&&g.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:R=>{R.stopPropagation(),o(b.id)},title:"Discard",type:"button",children:"✕"})]})]},b.id)})}),x&&n.length>0&&(i||s)&&g.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[i&&g.jsx("button",{className:"text-[10px] px-2 py-1 rounded border-none cursor-pointer font-semibold bg-bv-teal text-white hover:bg-bv-teal-dark transition-colors",onClick:()=>{i(),u(!1)},type:"button",children:"Commit All"}),s&&g.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:()=>{s(),u(!1)},type:"button",children:"Discard All"})]})]})]})}function uc({tabs:e,activeTab:t,onTabChange:n}){const[r,l]=S.useState(null);return g.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 g.jsxs("div",{className:"relative",onMouseEnter:()=>s&&o.tooltip&&l(o.id),onMouseLeave:()=>l(null),children:[g.jsxs("button",{type:"button",className:`relative px-3 py-2 text-[12px] 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&&g.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===o.id&&o.tooltip&&g.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 cc({draft:e,currentElementKey:t,onAddMessage:n,onDiscard:r}){const[l,o]=S.useState(""),i=S.useRef(null);S.useEffect(()=>{var c;(c=i.current)==null||c.focus()},[]);const s=e.filter(c=>c.kind==="message"),a=!!l.trim()&&!!t;function u(){var m;const c=l.trim();!c||!t||(n(c,t),o(""),(m=i.current)==null||m.focus())}function f(c){(c.metaKey||c.ctrlKey)&&c.key==="Enter"&&(c.preventDefault(),u())}return g.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("textarea",{ref:i,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:c=>o(c.target.value),onKeyDown:f,disabled:!t}),g.jsx("div",{className:"flex items-center justify-end",children:g.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:!a,onClick:u,children:"Add Message"})})]}),s.length>0&&g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"w-[5px] h-[5px] rounded-full bg-bv-teal opacity-50 shrink-0"}),g.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-[1px] text-bv-text-mid",children:"Staged Messages"})]}),s.map(c=>{var m;return g.jsxs("div",{className:"flex items-start gap-2 p-2 bg-bv-surface rounded border border-bv-border group",children:[g.jsx("span",{className:"text-[12px] shrink-0 mt-0.5",children:"💬"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"text-[12px] font-[family-name:var(--font-ui)] text-bv-text break-words",children:['"',c.message,'"']}),c.elementKey&&g.jsx("div",{className:"text-[11px] text-bv-text-mid mt-0.5",children:((m=c.component)==null?void 0:m.name)||c.elementKey})]}),g.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(c.id),title:"Discard",children:"✕"})]},c.id)})]})]})}const Rs=[{name:"popover",label:"Popover",icon:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[g.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),g.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[g.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),g.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[g.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),g.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[g.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),g.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],ep="tw-panel-container";function uy(){try{const e=localStorage.getItem(ep);if(e&&Rs.some(t=>t.name===e))return e}catch{}return"popover"}function fc(){const[e,t]=S.useState(uy),[n,r]=S.useState(!1),l=S.useRef(null);S.useEffect(()=>{function s(a){l.current&&!l.current.contains(a.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function o(s){if(s!==e){try{localStorage.setItem(ep,s)}catch{}t(s),pe("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}const i=Rs.find(s=>s.name===e);return g.jsxs("div",{ref:l,className:"relative",children:[g.jsx("button",{title:"Change container",onClick:()=>r(s=>!s),className:"w-7 h-7 flex items-center justify-center rounded border border-transparent text-bv-text-mid bg-transparent cursor-pointer transition-colors hover:bg-bv-surface hover:border-bv-border hover:text-bv-text",children:i.icon}),n&&g.jsxs("div",{className:"absolute top-[calc(100%+4px)] right-0 bg-white border border-bv-border rounded-lg shadow-[0_4px_16px_rgba(0,0,0,0.12)] p-1.5 flex flex-col gap-px min-w-[148px] z-50",children:[g.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),Rs.map(s=>g.jsxs("button",{onClick:()=>o(s.name),className:`flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors ${s.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[s.icon,s.label]},s.name))]})]})}const cy=S.lazy(()=>_h(()=>import("./DesignMode-BAyjCFC8.js"),[]).then(e=>({default:e.DesignMode}))),fy=new URLSearchParams(window.location.search),dy=fy.get("mode"),dc=[{id:"design",label:"Design"},{id:"message",label:"Message"}];function py(){return dy==="design"?g.jsx(S.Suspense,{fallback:null,children:g.jsx(cy,{})}):g.jsx(my,{})}function my(){const[e,t]=S.useState(!1),[n,r]=S.useState(null),[l,o]=S.useState(0),[i,s]=S.useState("design"),[a,u]=S.useState(!1),f=ay();S.useEffect(()=>{const j=Vh(()=>{t(!0);try{const A=localStorage.getItem("tw-panel-container");A&&A!=="popover"&&pe("overlay",{type:"SWITCH_CONTAINER",container:A})}catch{}}),M=Bh(()=>t(!1)),J=Hh(A=>{A.type==="ELEMENT_SELECTED"?(r({componentName:A.componentName,instanceCount:A.instanceCount,classes:A.classes,tailwindConfig:A.tailwindConfig}),o(H=>H+1),u(!1)):A.type==="SELECT_MODE_CHANGED"?u(!!A.active):A.type==="QUEUE_UPDATE"?f.handleQueueUpdate({draftCount:A.draftCount,committedCount:A.committedCount,implementingCount:A.implementingCount,implementedCount:A.implementedCount,partialCount:A.partialCount,errorCount:A.errorCount,draft:A.draft,commits:A.commits,agentWaiting:A.agentWaiting}):A.type==="PATCH_UPDATE"&&f.handlePatchUpdate({staged:A.staged,committed:A.committed,implementing:A.implementing,implemented:A.implemented,patches:A.patches})});return Td(),t(Wh()),()=>{j(),M(),J()}},[]);const{draft:c,committed:m,implementing:v,implemented:y,partial:x,error:b}=f.counts,p=m>0&&!f.agentWaiting&&v===0,d=new Map(f.patches.filter(j=>j.status==="staged").map(j=>[j.id,{id:j.id,kind:j.kind??"class-change",elementKey:j.elementKey,status:j.status,originalClass:j.originalClass,newClass:j.newClass,property:j.property,timestamp:j.timestamp,component:j.component,message:j.message,image:j.image}])),h=new Set(f.queueState.draft.map(j=>j.id)),w=[...f.queueState.draft.map(j=>d.get(j.id)??j),...f.patches.filter(j=>j.status==="staged"&&!h.has(j.id)).map(j=>d.get(j.id))],R=f.queueState.commits.filter(j=>j.status==="committed"),E=f.queueState.commits.filter(j=>j.status==="implementing"),N=f.queueState.commits.filter(j=>j.status==="implemented"),C="Please implement the next change and continue implementing changes with VyBit.";async function I(j){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){P(j);return}}catch{}navigator.clipboard.writeText(j).catch(()=>P(j))}else P(j)}function P(j){const M=document.createElement("textarea");M.value=j,M.style.position="fixed",M.style.opacity="0",document.body.appendChild(M),M.select(),document.execCommand("copy"),document.body.removeChild(M)}const V=g.jsxs("div",{className:"shrink-0",children:[p&&g.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-50 border-t border-amber-200 text-amber-700 text-[10px] font-medium",children:[g.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-500",children:g.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"})}),g.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",g.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-900",children:"ask your agent"})," ","to start"]}),g.jsx("button",{onClick:()=>I(C),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-300 bg-amber-100 hover:bg-amber-200 text-amber-700 font-semibold text-[9px] transition-colors",title:`Copy: "${C}"`,children:"Copy prompt"})]}),g.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-2.5",children:[g.jsx(vl,{label:"draft",count:c,items:w,activeColor:"text-bv-text",onDiscard:j=>f.discard(j),onCommitAll:()=>f.commitAll(),onDiscardAll:()=>f.discardAll()}),g.jsx("span",{className:"text-bv-border text-[11px]",children:"·"}),g.jsx(vl,{label:"committed",count:m,items:R.flatMap(j=>j.patches),activeColor:"text-bv-orange"}),g.jsx("span",{className:"text-bv-border text-[11px]",children:"·"}),g.jsx(vl,{label:"implementing",count:v,items:E.flatMap(j=>j.patches),activeColor:"text-bv-orange"}),g.jsx("span",{className:"text-bv-border text-[11px]",children:"·"}),g.jsx(vl,{label:"implemented",count:y,items:N.flatMap(j=>j.patches),activeColor:"text-bv-teal"})]})]});if(!e)return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6",children:[g.jsx("div",{className:"w-2 h-2 rounded-full bg-bv-orange animate-pulse"}),g.jsx("span",{className:"text-bv-text-mid text-[12px]",children:"Waiting for connection…"})]}),V]});if(!n)return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx(pc,{active:a,onToggle:()=>{const j=!a;u(j),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:j})}}),g.jsx("div",{className:"flex-1 min-w-0",children:a?g.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"● Selecting… click an element on the page"}):g.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),g.jsx(fc,{})]})}),g.jsx(uc,{tabs:dc,activeTab:i,onTabChange:s}),g.jsx("div",{className:"flex-1 overflow-auto",children:i==="message"?g.jsx(cc,{draft:w,currentElementKey:"",onAddMessage:(j,M)=>f.stageMessage(j,M),onDiscard:j=>f.discard(j)}):a?g.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[g.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:g.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:g.jsx("path",{d:"M8 12l2.5 6 1.5-3 3-1.5z"})})}),g.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),g.jsxs("span",{className:"text-[10px] text-bv-muted text-center leading-relaxed",children:["Hover over elements on the page to preview, then click to select.",g.jsx("br",{}),"Press ",g.jsx("kbd",{className:"font-mono text-[9px] text-bv-text-mid",children:"Esc"})," to cancel."]})]}):g.jsx("div",{className:"flex flex-1 flex-col items-center justify-center p-8",children:g.jsxs("button",{onClick:()=>{u(!0),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})},className:"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:[g.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:g.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:g.jsx("path",{d:"M8 12l2.5 6 1.5-3 3-1.5z"})})}),g.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),g.jsxs("span",{className:"text-[10px] text-bv-muted",children:["or press ",g.jsx("kbd",{className:"font-mono text-[9px] text-bv-text-mid font-semibold",children:"⌘⇧C"})]})]})})}),V]});const G=$h(n.classes);return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx(pc,{active:a,onToggle:()=>{const j=!a;u(j),pe("overlay",{type:"TOGGLE_SELECT_MODE",active:j})}}),g.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",g.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),g.jsx(fc,{})]})}),g.jsx(uc,{tabs:dc,activeTab:i,onTabChange:s}),g.jsxs("div",{className:"flex-1 overflow-auto",children:[i==="design"&&g.jsx(sy,{componentName:n.componentName,instanceCount:n.instanceCount,parsedClasses:G,tailwindConfig:n.tailwindConfig,patchManager:f},l),i==="message"&&g.jsx(cc,{draft:w,currentElementKey:n.componentName,onAddMessage:(j,M)=>f.stageMessage(j,M,n.componentName),onDiscard:j=>f.discard(j)})]}),V]})}function pc({active:e,onToggle:t}){return g.jsx("button",{onClick:t,title:`${e?"Stop selecting":"Select an element"} (⌘⇧C)`,className:`w-7 h-7 rounded flex items-center justify-center shrink-0 border transition-all
|
|
49
|
+
${e?"bg-bv-teal border-bv-teal text-white":"bg-transparent border-bv-border text-bv-text-mid hover:border-bv-teal hover:text-bv-teal hover:bg-bv-teal/10"}`,children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),g.jsx("path",{d:"M8 12l2.5 6 1.5-3 3-1.5z"})]})})}gi.createRoot(document.getElementById("root")).render(g.jsx(Ec.StrictMode,{children:g.jsx(py,{})}));export{Hh as a,Td as c,g as j,Vh as o,S as r,Mn as s};
|