@bitovi/vybit 0.12.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,63 +0,0 @@
1
- var em=Object.defineProperty;var tm=(e,t,n)=>t in e?em(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tt=(e,t,n)=>tm(e,typeof t!="symbol"?t+"":t,n);function nm(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vd={exports:{}},Ps={},Ud={exports:{}},ae={};/**
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 Jo=Symbol.for("react.element"),om=Symbol.for("react.portal"),lm=Symbol.for("react.fragment"),sm=Symbol.for("react.strict_mode"),im=Symbol.for("react.profiler"),am=Symbol.for("react.provider"),um=Symbol.for("react.context"),cm=Symbol.for("react.forward_ref"),dm=Symbol.for("react.suspense"),fm=Symbol.for("react.memo"),pm=Symbol.for("react.lazy"),Zu=Symbol.iterator;function hm(e){return e===null||typeof e!="object"?null:(e=Zu&&e[Zu]||e["@@iterator"],typeof e=="function"?e:null)}var Gd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yd=Object.assign,Qd={};function Zr(e,t,n){this.props=e,this.context=t,this.refs=Qd,this.updater=n||Gd}Zr.prototype.isReactComponent={};Zr.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")};Zr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Xd(){}Xd.prototype=Zr.prototype;function Qa(e,t,n){this.props=e,this.context=t,this.refs=Qd,this.updater=n||Gd}var Xa=Qa.prototype=new Xd;Xa.constructor=Qa;Yd(Xa,Zr.prototype);Xa.isPureReactComponent=!0;var Ju=Array.isArray,Zd=Object.prototype.hasOwnProperty,Za={current:null},Jd={key:!0,ref:!0,__self:!0,__source:!0};function qd(e,t,n){var r,o={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)Zd.call(t,r)&&!Jd.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Jo,type:e,key:l,ref:s,props:o,_owner:Za.current}}function mm(e,t){return{$$typeof:Jo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ja(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jo}function gm(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qu=/\/+/g;function qs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gm(""+e.key):t.toString(36)}function Rl(e,t,n,r,o){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Jo:case om:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+qs(s,0):r,Ju(o)?(n="",e!=null&&(n=e.replace(qu,"$&/")+"/"),Rl(o,t,n,"",function(c){return c})):o!=null&&(Ja(o)&&(o=mm(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(qu,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Ju(e))for(var a=0;a<e.length;a++){l=e[a];var u=r+qs(l,a);s+=Rl(l,t,n,u,o)}else if(u=hm(e),typeof u=="function")for(e=u.call(e),a=0;!(l=e.next()).done;)l=l.value,u=r+qs(l,a++),s+=Rl(l,t,n,u,o);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function il(e,t,n){if(e==null)return e;var r=[],o=0;return Rl(e,r,"","",function(l){return t.call(n,l,o++)}),r}function ym(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},Pl={transition:null},xm={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:Pl,ReactCurrentOwner:Za};function ef(){throw Error("act(...) is not supported in production builds of React.")}ae.Children={map:il,forEach:function(e,t,n){il(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return il(e,function(){t++}),t},toArray:function(e){return il(e,function(t){return t})||[]},only:function(e){if(!Ja(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=Zr;ae.Fragment=lm;ae.Profiler=im;ae.PureComponent=Qa;ae.StrictMode=sm;ae.Suspense=dm;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xm;ae.act=ef;ae.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=Yd({},e.props),o=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Za.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Zd.call(t,u)&&!Jd.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Jo,type:e.type,key:o,ref:l,props:r,_owner:s}};ae.createContext=function(e){return e={$$typeof:um,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:am,_context:e},e.Consumer=e};ae.createElement=qd;ae.createFactory=function(e){var t=qd.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:cm,render:e}};ae.isValidElement=Ja;ae.lazy=function(e){return{$$typeof:pm,_payload:{_status:-1,_result:e},_init:ym}};ae.memo=function(e,t){return{$$typeof:fm,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=Pl.transition;Pl.transition={};try{e()}finally{Pl.transition=t}};ae.unstable_act=ef;ae.useCallback=function(e,t){return qe.current.useCallback(e,t)};ae.useContext=function(e){return qe.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};ae.useEffect=function(e,t){return qe.current.useEffect(e,t)};ae.useId=function(){return qe.current.useId()};ae.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return qe.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};ae.useRef=function(e){return qe.current.useRef(e)};ae.useState=function(e){return qe.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return qe.current.useTransition()};ae.version="18.3.1";Ud.exports=ae;var w=Ud.exports;const tf=rm(w),nf=nm({__proto__:null,default:tf},[w]);/**
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 vm=w,bm=Symbol.for("react.element"),wm=Symbol.for("react.fragment"),Sm=Object.prototype.hasOwnProperty,km=vm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cm={key:!0,ref:!0,__self:!0,__source:!0};function rf(e,t,n){var r,o={},l=null,s=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Sm.call(t,r)&&!Cm.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:bm,type:e,key:l,ref:s,props:o,_owner:km.current}}Ps.Fragment=wm;Ps.jsx=rf;Ps.jsxs=rf;Vd.exports=Ps;var i=Vd.exports,Bi={},of={exports:{}},pt={},lf={exports:{}},sf={};/**
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(j,R){var P=j.length;j.push(R);e:for(;0<P;){var Y=P-1>>>1,Z=j[Y];if(0<o(Z,R))j[Y]=R,j[P]=Z,P=Y;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var R=j[0],P=j.pop();if(P!==R){j[0]=P;e:for(var Y=0,Z=j.length,M=Z>>>1;Y<M;){var ce=2*(Y+1)-1,de=j[ce],W=ce+1,ye=j[W];if(0>o(de,P))W<Z&&0>o(ye,de)?(j[Y]=ye,j[W]=P,Y=W):(j[Y]=de,j[ce]=P,Y=ce);else if(W<Z&&0>o(ye,P))j[Y]=ye,j[W]=P,Y=W;else break e}}return R}function o(j,R){var P=j.sortIndex-R.sortIndex;return P!==0?P:j.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],f=1,p=null,d=3,m=!1,v=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=j)r(c),R.sortIndex=R.expirationTime,t(u,R);else break;R=n(c)}}function y(j){if(b=!1,x(j),!v)if(n(u)!==null)v=!0,Q(C);else{var R=n(c);R!==null&&J(y,R.startTime-j)}}function C(j,R){v=!1,b&&(b=!1,h(E),E=-1),m=!0;var P=d;try{for(x(R),p=n(u);p!==null&&(!(p.expirationTime>R)||j&&!_());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,d=p.priorityLevel;var Z=Y(p.expirationTime<=R);R=e.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(u)&&r(u),x(R)}else r(u);p=n(u)}if(p!==null)var M=!0;else{var ce=n(c);ce!==null&&J(y,ce.startTime-R),M=!1}return M}finally{p=null,d=P,m=!1}}var k=!1,T=null,E=-1,O=5,I=-1;function _(){return!(e.unstable_now()-I<O)}function z(){if(T!==null){var j=e.unstable_now();I=j;var R=!0;try{R=T(!0,j)}finally{R?H():(k=!1,T=null)}}else k=!1}var H;if(typeof g=="function")H=function(){g(z)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,U=L.port2;L.port1.onmessage=z,H=function(){U.postMessage(null)}}else H=function(){S(z,0)};function Q(j){T=j,k||(k=!0,H())}function J(j,R){E=S(function(){j(e.unstable_now())},R)}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(j){j.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,Q(C))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(j){switch(d){case 1:case 2:case 3:var R=3;break;default:R=d}var P=d;d=R;try{return j()}finally{d=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,R){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=d;d=j;try{return R()}finally{d=P}},e.unstable_scheduleCallback=function(j,R,P){var Y=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?Y+P:Y):P=Y,j){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=P+Z,j={id:f++,callback:R,priorityLevel:j,startTime:P,expirationTime:Z,sortIndex:-1},P>Y?(j.sortIndex=P,t(c,j),n(u)===null&&j===n(c)&&(b?(h(E),E=-1):b=!0,J(y,P-Y))):(j.sortIndex=Z,t(u,j),v||m||(v=!0,Q(C))),j},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(j){var R=d;return function(){var P=d;d=R;try{return j.apply(this,arguments)}finally{d=P}}}})(sf);lf.exports=sf;var jm=lf.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 Em=w,ft=jm;function $(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 af=new Set,Ao={};function dr(e,t){Hr(e,t),Hr(e+"Capture",t)}function Hr(e,t){for(Ao[e]=t,e=0;e<t.length;e++)af.add(t[e])}var rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vi=Object.prototype.hasOwnProperty,Tm=/^[: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]*$/,ec={},tc={};function Nm(e){return Vi.call(tc,e)?!0:Vi.call(ec,e)?!1:Tm.test(e)?tc[e]=!0:(ec[e]=!0,!1)}function Rm(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 Pm(e,t,n,r){if(t===null||typeof t>"u"||Rm(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ve[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var qa=/[\-:]([a-z])/g;function eu(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(qa,eu);Ve[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qa,eu);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qa,eu);Ve[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function tu(e,t,n,r){var o=Ve.hasOwnProperty(t)?Ve[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Pm(t,n,o,r)&&(n=null),r||o===null?Nm(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var mn=Em.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,al=Symbol.for("react.element"),wr=Symbol.for("react.portal"),Sr=Symbol.for("react.fragment"),nu=Symbol.for("react.strict_mode"),Ui=Symbol.for("react.profiler"),uf=Symbol.for("react.provider"),cf=Symbol.for("react.context"),ru=Symbol.for("react.forward_ref"),Gi=Symbol.for("react.suspense"),Yi=Symbol.for("react.suspense_list"),ou=Symbol.for("react.memo"),yn=Symbol.for("react.lazy"),df=Symbol.for("react.offscreen"),nc=Symbol.iterator;function ao(e){return e===null||typeof e!="object"?null:(e=nc&&e[nc]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,ei;function vo(e){if(ei===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ei=t&&t[1]||""}return`
34
- `+ei+e}var ti=!1;function ni(e,t){if(!e||ti)return"";ti=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
35
- `),l=r.stack.split(`
36
- `),s=o.length-1,a=l.length-1;1<=s&&0<=a&&o[s]!==l[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==l[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==l[a]){var u=`
37
- `+o[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{ti=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?vo(e):""}function _m(e){switch(e.tag){case 5:return vo(e.type);case 16:return vo("Lazy");case 13:return vo("Suspense");case 19:return vo("SuspenseList");case 0:case 2:case 15:return e=ni(e.type,!1),e;case 11:return e=ni(e.type.render,!1),e;case 1:return e=ni(e.type,!0),e;default:return""}}function Qi(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 Sr:return"Fragment";case wr:return"Portal";case Ui:return"Profiler";case nu:return"StrictMode";case Gi:return"Suspense";case Yi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cf:return(e.displayName||"Context")+".Consumer";case uf:return(e._context.displayName||"Context")+".Provider";case ru:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ou:return t=e.displayName||null,t!==null?t:Qi(e.type)||"Memo";case yn:t=e._payload,e=e._init;try{return Qi(e(t))}catch{}}return null}function Im(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 Qi(t);case 8:return t===nu?"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 Ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ff(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Am(e){var t=ff(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ul(e){e._valueTracker||(e._valueTracker=Am(e))}function pf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ff(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yl(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 Xi(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ln(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 hf(e,t){t=t.checked,t!=null&&tu(e,"checked",t,!1)}function Zi(e,t){hf(e,t);var n=Ln(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")?Ji(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ji(e,t.type,Ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function oc(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 Ji(e,t,n){(t!=="number"||Yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bo=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ln(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function qi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(bo(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ln(n)}}function mf(e,t){var n=Ln(t.value),r=Ln(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 sc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gf(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 ea(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gf(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,yf=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Lo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Co={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},Lm=["Webkit","ms","Moz","O"];Object.keys(Co).forEach(function(e){Lm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Co[t]=Co[e]})});function xf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Co.hasOwnProperty(e)&&Co[e]?(""+t).trim():t+"px"}function vf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=xf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Om=Ne({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 ta(e,t){if(t){if(Om[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function na(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 ra=null;function lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oa=null,Or=null,Dr=null;function ic(e){if(e=tl(e)){if(typeof oa!="function")throw Error($(280));var t=e.stateNode;t&&(t=Os(t),oa(e.stateNode,e.type,t))}}function bf(e){Or?Dr?Dr.push(e):Dr=[e]:Or=e}function wf(){if(Or){var e=Or,t=Dr;if(Dr=Or=null,ic(e),t)for(e=0;e<t.length;e++)ic(t[e])}}function Sf(e,t){return e(t)}function kf(){}var ri=!1;function Cf(e,t,n){if(ri)return e(t,n);ri=!0;try{return Sf(e,t,n)}finally{ri=!1,(Or!==null||Dr!==null)&&(kf(),wf())}}function Oo(e,t){var n=e.stateNode;if(n===null)return null;var r=Os(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($(231,t,typeof n));return n}var la=!1;if(rn)try{var uo={};Object.defineProperty(uo,"passive",{get:function(){la=!0}}),window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{la=!1}function Dm(e,t,n,r,o,l,s,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var jo=!1,Ql=null,Xl=!1,sa=null,$m={onError:function(e){jo=!0,Ql=e}};function Mm(e,t,n,r,o,l,s,a,u){jo=!1,Ql=null,Dm.apply($m,arguments)}function zm(e,t,n,r,o,l,s,a,u){if(Mm.apply(this,arguments),jo){if(jo){var c=Ql;jo=!1,Ql=null}else throw Error($(198));Xl||(Xl=!0,sa=c)}}function fr(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 jf(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 ac(e){if(fr(e)!==e)throw Error($(188))}function Km(e){var t=e.alternate;if(!t){if(t=fr(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var l=o.alternate;if(l===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return ac(o),e;if(l===r)return ac(o),t;l=l.sibling}throw Error($(188))}if(n.return!==r.return)n=o,r=l;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=l;break}if(a===r){s=!0,r=o,n=l;break}a=a.sibling}if(!s){for(a=l.child;a;){if(a===n){s=!0,n=l,r=o;break}if(a===r){s=!0,r=l,n=o;break}a=a.sibling}if(!s)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function Ef(e){return e=Km(e),e!==null?Tf(e):null}function Tf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Tf(e);if(t!==null)return t;e=e.sibling}return null}var Nf=ft.unstable_scheduleCallback,uc=ft.unstable_cancelCallback,Fm=ft.unstable_shouldYield,Hm=ft.unstable_requestPaint,_e=ft.unstable_now,Wm=ft.unstable_getCurrentPriorityLevel,su=ft.unstable_ImmediatePriority,Rf=ft.unstable_UserBlockingPriority,Zl=ft.unstable_NormalPriority,Bm=ft.unstable_LowPriority,Pf=ft.unstable_IdlePriority,_s=null,Lt=null;function Vm(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(_s,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:Ym,Um=Math.log,Gm=Math.LN2;function Ym(e){return e>>>=0,e===0?32:31-(Um(e)/Gm|0)|0}var dl=64,fl=4194304;function wo(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 Jl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=wo(a):(l&=s,l!==0&&(r=wo(l)))}else s=n&~o,s!==0?r=wo(s):l!==0&&(r=wo(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function Qm(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 Xm(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Nt(l),a=1<<s,u=o[s];u===-1?(!(a&n)||a&r)&&(o[s]=Qm(a,t)):u<=t&&(e.expiredLanes|=a),l&=~a}}function ia(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _f(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function oi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function Zm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),l=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~l}}function iu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var he=0;function If(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Af,au,Lf,Of,Df,aa=!1,pl=[],jn=null,En=null,Tn=null,Do=new Map,$o=new Map,bn=[],Jm="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 cc(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":En=null;break;case"mouseover":case"mouseout":Tn=null;break;case"pointerover":case"pointerout":Do.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(t.pointerId)}}function co(e,t,n,r,o,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[o]},t!==null&&(t=tl(t),t!==null&&au(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function qm(e,t,n,r,o){switch(t){case"focusin":return jn=co(jn,e,t,n,r,o),!0;case"dragenter":return En=co(En,e,t,n,r,o),!0;case"mouseover":return Tn=co(Tn,e,t,n,r,o),!0;case"pointerover":var l=o.pointerId;return Do.set(l,co(Do.get(l)||null,e,t,n,r,o)),!0;case"gotpointercapture":return l=o.pointerId,$o.set(l,co($o.get(l)||null,e,t,n,r,o)),!0}return!1}function $f(e){var t=Yn(e.target);if(t!==null){var n=fr(t);if(n!==null){if(t=n.tag,t===13){if(t=jf(n),t!==null){e.blockedOn=t,Df(e.priority,function(){Lf(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 _l(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ua(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ra=r,n.target.dispatchEvent(r),ra=null}else return t=tl(n),t!==null&&au(t),e.blockedOn=n,!1;t.shift()}return!0}function dc(e,t,n){_l(e)&&n.delete(t)}function eg(){aa=!1,jn!==null&&_l(jn)&&(jn=null),En!==null&&_l(En)&&(En=null),Tn!==null&&_l(Tn)&&(Tn=null),Do.forEach(dc),$o.forEach(dc)}function fo(e,t){e.blockedOn===t&&(e.blockedOn=null,aa||(aa=!0,ft.unstable_scheduleCallback(ft.unstable_NormalPriority,eg)))}function Mo(e){function t(o){return fo(o,e)}if(0<pl.length){fo(pl[0],e);for(var n=1;n<pl.length;n++){var r=pl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(jn!==null&&fo(jn,e),En!==null&&fo(En,e),Tn!==null&&fo(Tn,e),Do.forEach(t),$o.forEach(t),n=0;n<bn.length;n++)r=bn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<bn.length&&(n=bn[0],n.blockedOn===null);)$f(n),n.blockedOn===null&&bn.shift()}var $r=mn.ReactCurrentBatchConfig,ql=!0;function tg(e,t,n,r){var o=he,l=$r.transition;$r.transition=null;try{he=1,uu(e,t,n,r)}finally{he=o,$r.transition=l}}function ng(e,t,n,r){var o=he,l=$r.transition;$r.transition=null;try{he=4,uu(e,t,n,r)}finally{he=o,$r.transition=l}}function uu(e,t,n,r){if(ql){var o=ua(e,t,n,r);if(o===null)hi(e,t,r,es,n),cc(e,r);else if(qm(o,e,t,n,r))r.stopPropagation();else if(cc(e,r),t&4&&-1<Jm.indexOf(e)){for(;o!==null;){var l=tl(o);if(l!==null&&Af(l),l=ua(e,t,n,r),l===null&&hi(e,t,r,es,n),l===o)break;o=l}o!==null&&r.stopPropagation()}else hi(e,t,r,null,n)}}var es=null;function ua(e,t,n,r){if(es=null,e=lu(r),e=Yn(e),e!==null)if(t=fr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=jf(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 es=e,null}function Mf(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(Wm()){case su:return 1;case Rf:return 4;case Zl:case Bm:return 16;case Pf:return 536870912;default:return 16}default:return 16}}var kn=null,cu=null,Il=null;function zf(){if(Il)return Il;var e,t=cu,n=t.length,r,o="value"in kn?kn.value:kn.textContent,l=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[l-r];r++);return Il=o.slice(e,1<r?1-r:void 0)}function Al(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 hl(){return!0}function fc(){return!1}function ht(e){function t(n,r,o,l,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(l):l[a]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?hl:fc,this.isPropagationStopped=fc,this}return Ne(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=hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),t}var Jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=ht(Jr),el=Ne({},Jr,{view:0,detail:0}),rg=ht(el),li,si,po,Is=Ne({},el,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==po&&(po&&e.type==="mousemove"?(li=e.screenX-po.screenX,si=e.screenY-po.screenY):si=li=0,po=e),li)},movementY:function(e){return"movementY"in e?e.movementY:si}}),pc=ht(Is),og=Ne({},Is,{dataTransfer:0}),lg=ht(og),sg=Ne({},el,{relatedTarget:0}),ii=ht(sg),ig=Ne({},Jr,{animationName:0,elapsedTime:0,pseudoElement:0}),ag=ht(ig),ug=Ne({},Jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cg=ht(ug),dg=Ne({},Jr,{data:0}),hc=ht(dg),fg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pg={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"},hg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hg[e])?!!t[e]:!1}function fu(){return mg}var gg=Ne({},el,{key:function(e){if(e.key){var t=fg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Al(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?Al(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Al(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yg=ht(gg),xg=Ne({},Is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mc=ht(xg),vg=Ne({},el,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),bg=ht(vg),wg=Ne({},Jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sg=ht(wg),kg=Ne({},Is,{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}),Cg=ht(kg),jg=[9,13,27,32],pu=rn&&"CompositionEvent"in window,Eo=null;rn&&"documentMode"in document&&(Eo=document.documentMode);var Eg=rn&&"TextEvent"in window&&!Eo,Kf=rn&&(!pu||Eo&&8<Eo&&11>=Eo),gc=" ",yc=!1;function Ff(e,t){switch(e){case"keyup":return jg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kr=!1;function Tg(e,t){switch(e){case"compositionend":return Hf(t);case"keypress":return t.which!==32?null:(yc=!0,gc);case"textInput":return e=t.data,e===gc&&yc?null:e;default:return null}}function Ng(e,t){if(kr)return e==="compositionend"||!pu&&Ff(e,t)?(e=zf(),Il=cu=kn=null,kr=!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 Kf&&t.locale!=="ko"?null:t.data;default:return null}}var Rg={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 xc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rg[e.type]:t==="textarea"}function Wf(e,t,n,r){bf(r),t=ts(t,"onChange"),0<t.length&&(n=new du("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var To=null,zo=null;function Pg(e){ep(e,0)}function As(e){var t=Er(e);if(pf(t))return e}function _g(e,t){if(e==="change")return t}var Bf=!1;if(rn){var ai;if(rn){var ui="oninput"in document;if(!ui){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),ui=typeof vc.oninput=="function"}ai=ui}else ai=!1;Bf=ai&&(!document.documentMode||9<document.documentMode)}function bc(){To&&(To.detachEvent("onpropertychange",Vf),zo=To=null)}function Vf(e){if(e.propertyName==="value"&&As(zo)){var t=[];Wf(t,zo,e,lu(e)),Cf(Pg,t)}}function Ig(e,t,n){e==="focusin"?(bc(),To=t,zo=n,To.attachEvent("onpropertychange",Vf)):e==="focusout"&&bc()}function Ag(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return As(zo)}function Lg(e,t){if(e==="click")return As(t)}function Og(e,t){if(e==="input"||e==="change")return As(t)}function Dg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:Dg;function Ko(e,t){if(Pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Vi.call(t,o)||!Pt(e[o],t[o]))return!1}return!0}function wc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var n=wc(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=wc(n)}}function Uf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gf(){for(var e=window,t=Yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yl(e.document)}return t}function hu(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 $g(e){var t=Gf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Uf(n.ownerDocument.documentElement,n)){if(r!==null&&hu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=Sc(n,l);var s=Sc(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Mg=rn&&"documentMode"in document&&11>=document.documentMode,Cr=null,ca=null,No=null,da=!1;function kc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;da||Cr==null||Cr!==Yl(r)||(r=Cr,"selectionStart"in r&&hu(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}),No&&Ko(No,r)||(No=r,r=ts(ca,"onSelect"),0<r.length&&(t=new du("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var jr={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},ci={},Yf={};rn&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete jr.animationend.animation,delete jr.animationiteration.animation,delete jr.animationstart.animation),"TransitionEvent"in window||delete jr.transitionend.transition);function Ls(e){if(ci[e])return ci[e];if(!jr[e])return e;var t=jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yf)return ci[e]=t[n];return e}var Qf=Ls("animationend"),Xf=Ls("animationiteration"),Zf=Ls("animationstart"),Jf=Ls("transitionend"),qf=new Map,Cc="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 Mn(e,t){qf.set(e,t),dr(t,[e])}for(var di=0;di<Cc.length;di++){var fi=Cc[di],zg=fi.toLowerCase(),Kg=fi[0].toUpperCase()+fi.slice(1);Mn(zg,"on"+Kg)}Mn(Qf,"onAnimationEnd");Mn(Xf,"onAnimationIteration");Mn(Zf,"onAnimationStart");Mn("dblclick","onDoubleClick");Mn("focusin","onFocus");Mn("focusout","onBlur");Mn(Jf,"onTransitionEnd");Hr("onMouseEnter",["mouseout","mouseover"]);Hr("onMouseLeave",["mouseout","mouseover"]);Hr("onPointerEnter",["pointerout","pointerover"]);Hr("onPointerLeave",["pointerout","pointerover"]);dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var So="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(" "),Fg=new Set("cancel close invalid load scroll toggle".split(" ").concat(So));function jc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,zm(r,t,void 0,e),e.currentTarget=null}function ep(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==l&&o.isPropagationStopped())break e;jc(o,a,c),l=u}else for(s=0;s<r.length;s++){if(a=r[s],u=a.instance,c=a.currentTarget,a=a.listener,u!==l&&o.isPropagationStopped())break e;jc(o,a,c),l=u}}}if(Xl)throw e=sa,Xl=!1,sa=null,e}function we(e,t){var n=t[ga];n===void 0&&(n=t[ga]=new Set);var r=e+"__bubble";n.has(r)||(tp(t,e,2,!1),n.add(r))}function pi(e,t,n){var r=0;t&&(r|=4),tp(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function Fo(e){if(!e[gl]){e[gl]=!0,af.forEach(function(n){n!=="selectionchange"&&(Fg.has(n)||pi(n,!1,e),pi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,pi("selectionchange",!1,t))}}function tp(e,t,n,r){switch(Mf(t)){case 1:var o=tg;break;case 4:o=ng;break;default:o=uu}n=o.bind(null,t,n,e),o=void 0,!la||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function hi(e,t,n,r,o){var l=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Yn(a),s===null)return;if(u=s.tag,u===5||u===6){r=l=s;continue e}a=a.parentNode}}r=r.return}Cf(function(){var c=l,f=lu(n),p=[];e:{var d=qf.get(e);if(d!==void 0){var m=du,v=e;switch(e){case"keypress":if(Al(n)===0)break e;case"keydown":case"keyup":m=yg;break;case"focusin":v="focus",m=ii;break;case"focusout":v="blur",m=ii;break;case"beforeblur":case"afterblur":m=ii;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=pc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=lg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=bg;break;case Qf:case Xf:case Zf:m=ag;break;case Jf:m=Sg;break;case"scroll":m=rg;break;case"wheel":m=Cg;break;case"copy":case"cut":case"paste":m=cg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=mc}var b=(t&4)!==0,S=!b&&e==="scroll",h=b?d!==null?d+"Capture":null:d;b=[];for(var g=c,x;g!==null;){x=g;var y=x.stateNode;if(x.tag===5&&y!==null&&(x=y,h!==null&&(y=Oo(g,h),y!=null&&b.push(Ho(g,y,x)))),S)break;g=g.return}0<b.length&&(d=new m(d,v,null,n,f),p.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==ra&&(v=n.relatedTarget||n.fromElement)&&(Yn(v)||v[on]))break e;if((m||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?Yn(v):null,v!==null&&(S=fr(v),v!==S||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=c),m!==v)){if(b=pc,y="onMouseLeave",h="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(b=mc,y="onPointerLeave",h="onPointerEnter",g="pointer"),S=m==null?d:Er(m),x=v==null?d:Er(v),d=new b(y,g+"leave",m,n,f),d.target=S,d.relatedTarget=x,y=null,Yn(f)===c&&(b=new b(h,g+"enter",v,n,f),b.target=x,b.relatedTarget=S,y=b),S=y,m&&v)t:{for(b=m,h=v,g=0,x=b;x;x=gr(x))g++;for(x=0,y=h;y;y=gr(y))x++;for(;0<g-x;)b=gr(b),g--;for(;0<x-g;)h=gr(h),x--;for(;g--;){if(b===h||h!==null&&b===h.alternate)break t;b=gr(b),h=gr(h)}b=null}else b=null;m!==null&&Ec(p,d,m,b,!1),v!==null&&S!==null&&Ec(p,S,v,b,!0)}}e:{if(d=c?Er(c):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var C=_g;else if(xc(d))if(Bf)C=Og;else{C=Ag;var k=Ig}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=Lg);if(C&&(C=C(e,c))){Wf(p,C,n,f);break e}k&&k(e,d,c),e==="focusout"&&(k=d._wrapperState)&&k.controlled&&d.type==="number"&&Ji(d,"number",d.value)}switch(k=c?Er(c):window,e){case"focusin":(xc(k)||k.contentEditable==="true")&&(Cr=k,ca=c,No=null);break;case"focusout":No=ca=Cr=null;break;case"mousedown":da=!0;break;case"contextmenu":case"mouseup":case"dragend":da=!1,kc(p,n,f);break;case"selectionchange":if(Mg)break;case"keydown":case"keyup":kc(p,n,f)}var T;if(pu)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else kr?Ff(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(Kf&&n.locale!=="ko"&&(kr||E!=="onCompositionStart"?E==="onCompositionEnd"&&kr&&(T=zf()):(kn=f,cu="value"in kn?kn.value:kn.textContent,kr=!0)),k=ts(c,E),0<k.length&&(E=new hc(E,e,null,n,f),p.push({event:E,listeners:k}),T?E.data=T:(T=Hf(n),T!==null&&(E.data=T)))),(T=Eg?Tg(e,n):Ng(e,n))&&(c=ts(c,"onBeforeInput"),0<c.length&&(f=new hc("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:c}),f.data=T))}ep(p,t)})}function Ho(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ts(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,l=o.stateNode;o.tag===5&&l!==null&&(o=l,l=Oo(e,n),l!=null&&r.unshift(Ho(e,l,o)),l=Oo(e,t),l!=null&&r.push(Ho(e,l,o))),e=e.return}return r}function gr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ec(e,t,n,r,o){for(var l=t._reactName,s=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,o?(u=Oo(n,l),u!=null&&s.unshift(Ho(n,u,a))):o||(u=Oo(n,l),u!=null&&s.push(Ho(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Hg=/\r\n?/g,Wg=/\u0000|\uFFFD/g;function Tc(e){return(typeof e=="string"?e:""+e).replace(Hg,`
38
- `).replace(Wg,"")}function yl(e,t,n){if(t=Tc(t),Tc(e)!==t&&n)throw Error($(425))}function ns(){}var fa=null,pa=null;function ha(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 ma=typeof setTimeout=="function"?setTimeout:void 0,Bg=typeof clearTimeout=="function"?clearTimeout:void 0,Nc=typeof Promise=="function"?Promise:void 0,Vg=typeof queueMicrotask=="function"?queueMicrotask:typeof Nc<"u"?function(e){return Nc.resolve(null).then(e).catch(Ug)}:ma;function Ug(e){setTimeout(function(){throw e})}function mi(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Mo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Mo(t)}function Nn(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 Rc(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 qr=Math.random().toString(36).slice(2),At="__reactFiber$"+qr,Wo="__reactProps$"+qr,on="__reactContainer$"+qr,ga="__reactEvents$"+qr,Gg="__reactListeners$"+qr,Yg="__reactHandles$"+qr;function Yn(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Rc(e);e!==null;){if(n=e[At])return n;e=Rc(e)}return t}e=n,n=e.parentNode}return null}function tl(e){return e=e[At]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Er(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Os(e){return e[Wo]||null}var ya=[],Tr=-1;function zn(e){return{current:e}}function Se(e){0>Tr||(e.current=ya[Tr],ya[Tr]=null,Tr--)}function xe(e,t){Tr++,ya[Tr]=e.current,e.current=t}var On={},Qe=zn(On),ot=zn(!1),tr=On;function Wr(e,t){var n=e.type.contextTypes;if(!n)return On;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function lt(e){return e=e.childContextTypes,e!=null}function rs(){Se(ot),Se(Qe)}function Pc(e,t,n){if(Qe.current!==On)throw Error($(168));xe(Qe,t),xe(ot,n)}function np(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error($(108,Im(e)||"Unknown",o));return Ne({},n,r)}function os(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,tr=Qe.current,xe(Qe,e),xe(ot,ot.current),!0}function _c(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=np(e,t,tr),r.__reactInternalMemoizedMergedChildContext=e,Se(ot),Se(Qe),xe(Qe,e)):Se(ot),xe(ot,n)}var Qt=null,Ds=!1,gi=!1;function rp(e){Qt===null?Qt=[e]:Qt.push(e)}function Qg(e){Ds=!0,rp(e)}function Kn(){if(!gi&&Qt!==null){gi=!0;var e=0,t=he;try{var n=Qt;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Qt=null,Ds=!1}catch(o){throw Qt!==null&&(Qt=Qt.slice(e+1)),Nf(su,Kn),o}finally{he=t,gi=!1}}return null}var Nr=[],Rr=0,ls=null,ss=0,gt=[],yt=0,nr=null,Zt=1,Jt="";function Un(e,t){Nr[Rr++]=ss,Nr[Rr++]=ls,ls=e,ss=t}function op(e,t,n){gt[yt++]=Zt,gt[yt++]=Jt,gt[yt++]=nr,nr=e;var r=Zt;e=Jt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var l=32-Nt(t)+o;if(30<l){var s=o-o%5;l=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Zt=1<<32-Nt(t)+o|n<<o|r,Jt=l+e}else Zt=1<<l|n<<o|r,Jt=e}function mu(e){e.return!==null&&(Un(e,1),op(e,1,0))}function gu(e){for(;e===ls;)ls=Nr[--Rr],Nr[Rr]=null,ss=Nr[--Rr],Nr[Rr]=null;for(;e===nr;)nr=gt[--yt],gt[yt]=null,Jt=gt[--yt],gt[yt]=null,Zt=gt[--yt],gt[yt]=null}var ct=null,ut=null,ke=!1,Tt=null;function lp(e,t){var n=xt(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 Ic(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,ct=e,ut=Nn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ut=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=nr!==null?{id:Zt,overflow:Jt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ct=e,ut=null,!0):!1;default:return!1}}function xa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function va(e){if(ke){var t=ut;if(t){var n=t;if(!Ic(e,t)){if(xa(e))throw Error($(418));t=Nn(n.nextSibling);var r=ct;t&&Ic(e,t)?lp(r,n):(e.flags=e.flags&-4097|2,ke=!1,ct=e)}}else{if(xa(e))throw Error($(418));e.flags=e.flags&-4097|2,ke=!1,ct=e}}}function Ac(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ct=e}function xl(e){if(e!==ct)return!1;if(!ke)return Ac(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ha(e.type,e.memoizedProps)),t&&(t=ut)){if(xa(e))throw sp(),Error($(418));for(;t;)lp(e,t),t=Nn(t.nextSibling)}if(Ac(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ut=Nn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ut=null}}else ut=ct?Nn(e.stateNode.nextSibling):null;return!0}function sp(){for(var e=ut;e;)e=Nn(e.nextSibling)}function Br(){ut=ct=null,ke=!1}function yu(e){Tt===null?Tt=[e]:Tt.push(e)}var Xg=mn.ReactCurrentBatchConfig;function ho(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($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var o=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var a=o.refs;s===null?delete a[l]:a[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function vl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Lc(e){var t=e._init;return t(e._payload)}function ip(e){function t(h,g){if(e){var x=h.deletions;x===null?(h.deletions=[g],h.flags|=16):x.push(g)}}function n(h,g){if(!e)return null;for(;g!==null;)t(h,g),g=g.sibling;return null}function r(h,g){for(h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function o(h,g){return h=In(h,g),h.index=0,h.sibling=null,h}function l(h,g,x){return h.index=x,e?(x=h.alternate,x!==null?(x=x.index,x<g?(h.flags|=2,g):x):(h.flags|=2,g)):(h.flags|=1048576,g)}function s(h){return e&&h.alternate===null&&(h.flags|=2),h}function a(h,g,x,y){return g===null||g.tag!==6?(g=ki(x,h.mode,y),g.return=h,g):(g=o(g,x),g.return=h,g)}function u(h,g,x,y){var C=x.type;return C===Sr?f(h,g,x.props.children,y,x.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===yn&&Lc(C)===g.type)?(y=o(g,x.props),y.ref=ho(h,g,x),y.return=h,y):(y=Kl(x.type,x.key,x.props,null,h.mode,y),y.ref=ho(h,g,x),y.return=h,y)}function c(h,g,x,y){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Ci(x,h.mode,y),g.return=h,g):(g=o(g,x.children||[]),g.return=h,g)}function f(h,g,x,y,C){return g===null||g.tag!==7?(g=qn(x,h.mode,y,C),g.return=h,g):(g=o(g,x),g.return=h,g)}function p(h,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=ki(""+g,h.mode,x),g.return=h,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case al:return x=Kl(g.type,g.key,g.props,null,h.mode,x),x.ref=ho(h,null,g),x.return=h,x;case wr:return g=Ci(g,h.mode,x),g.return=h,g;case yn:var y=g._init;return p(h,y(g._payload),x)}if(bo(g)||ao(g))return g=qn(g,h.mode,x,null),g.return=h,g;vl(h,g)}return null}function d(h,g,x,y){var C=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(h,g,""+x,y);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case al:return x.key===C?u(h,g,x,y):null;case wr:return x.key===C?c(h,g,x,y):null;case yn:return C=x._init,d(h,g,C(x._payload),y)}if(bo(x)||ao(x))return C!==null?null:f(h,g,x,y,null);vl(h,x)}return null}function m(h,g,x,y,C){if(typeof y=="string"&&y!==""||typeof y=="number")return h=h.get(x)||null,a(g,h,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case al:return h=h.get(y.key===null?x:y.key)||null,u(g,h,y,C);case wr:return h=h.get(y.key===null?x:y.key)||null,c(g,h,y,C);case yn:var k=y._init;return m(h,g,x,k(y._payload),C)}if(bo(y)||ao(y))return h=h.get(x)||null,f(g,h,y,C,null);vl(g,y)}return null}function v(h,g,x,y){for(var C=null,k=null,T=g,E=g=0,O=null;T!==null&&E<x.length;E++){T.index>E?(O=T,T=null):O=T.sibling;var I=d(h,T,x[E],y);if(I===null){T===null&&(T=O);break}e&&T&&I.alternate===null&&t(h,T),g=l(I,g,E),k===null?C=I:k.sibling=I,k=I,T=O}if(E===x.length)return n(h,T),ke&&Un(h,E),C;if(T===null){for(;E<x.length;E++)T=p(h,x[E],y),T!==null&&(g=l(T,g,E),k===null?C=T:k.sibling=T,k=T);return ke&&Un(h,E),C}for(T=r(h,T);E<x.length;E++)O=m(T,h,E,x[E],y),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?E:O.key),g=l(O,g,E),k===null?C=O:k.sibling=O,k=O);return e&&T.forEach(function(_){return t(h,_)}),ke&&Un(h,E),C}function b(h,g,x,y){var C=ao(x);if(typeof C!="function")throw Error($(150));if(x=C.call(x),x==null)throw Error($(151));for(var k=C=null,T=g,E=g=0,O=null,I=x.next();T!==null&&!I.done;E++,I=x.next()){T.index>E?(O=T,T=null):O=T.sibling;var _=d(h,T,I.value,y);if(_===null){T===null&&(T=O);break}e&&T&&_.alternate===null&&t(h,T),g=l(_,g,E),k===null?C=_:k.sibling=_,k=_,T=O}if(I.done)return n(h,T),ke&&Un(h,E),C;if(T===null){for(;!I.done;E++,I=x.next())I=p(h,I.value,y),I!==null&&(g=l(I,g,E),k===null?C=I:k.sibling=I,k=I);return ke&&Un(h,E),C}for(T=r(h,T);!I.done;E++,I=x.next())I=m(T,h,E,I.value,y),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?E:I.key),g=l(I,g,E),k===null?C=I:k.sibling=I,k=I);return e&&T.forEach(function(z){return t(h,z)}),ke&&Un(h,E),C}function S(h,g,x,y){if(typeof x=="object"&&x!==null&&x.type===Sr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case al:e:{for(var C=x.key,k=g;k!==null;){if(k.key===C){if(C=x.type,C===Sr){if(k.tag===7){n(h,k.sibling),g=o(k,x.props.children),g.return=h,h=g;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===yn&&Lc(C)===k.type){n(h,k.sibling),g=o(k,x.props),g.ref=ho(h,k,x),g.return=h,h=g;break e}n(h,k);break}else t(h,k);k=k.sibling}x.type===Sr?(g=qn(x.props.children,h.mode,y,x.key),g.return=h,h=g):(y=Kl(x.type,x.key,x.props,null,h.mode,y),y.ref=ho(h,g,x),y.return=h,h=y)}return s(h);case wr:e:{for(k=x.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(h,g.sibling),g=o(g,x.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=Ci(x,h.mode,y),g.return=h,h=g}return s(h);case yn:return k=x._init,S(h,g,k(x._payload),y)}if(bo(x))return v(h,g,x,y);if(ao(x))return b(h,g,x,y);vl(h,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(h,g.sibling),g=o(g,x),g.return=h,h=g):(n(h,g),g=ki(x,h.mode,y),g.return=h,h=g),s(h)):n(h,g)}return S}var Vr=ip(!0),ap=ip(!1),is=zn(null),as=null,Pr=null,xu=null;function vu(){xu=Pr=as=null}function bu(e){var t=is.current;Se(is),e._currentValue=t}function ba(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 Mr(e,t){as=e,xu=Pr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(rt=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if(xu!==e)if(e={context:e,memoizedValue:t,next:null},Pr===null){if(as===null)throw Error($(308));Pr=e,as.dependencies={lanes:0,firstContext:e}}else Pr=Pr.next=e;return t}var Qn=null;function wu(e){Qn===null?Qn=[e]:Qn.push(e)}function up(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,wu(t)):(n.next=o.next,o.next=n),t.interleaved=n,ln(e,r)}function ln(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 xn=!1;function Su(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cp(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 en(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,fe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ln(e,n)}return o=r.interleaved,o===null?(t.next=t,wu(r)):(t.next=o.next,o.next=t),r.interleaved=t,ln(e,n)}function Ll(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,iu(e,n)}}function Oc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?o=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?o=l=t:l=l.next=t}else o=l=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function us(e,t,n,r){var o=e.updateQueue;xn=!1;var l=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var u=a,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==s&&(a===null?f.firstBaseUpdate=c:a.next=c,f.lastBaseUpdate=u))}if(l!==null){var p=o.baseState;s=0,f=c=u=null,a=l;do{var d=a.lane,m=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,b=a;switch(d=t,m=n,b.tag){case 1:if(v=b.payload,typeof v=="function"){p=v.call(m,p,d);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,d=typeof v=="function"?v.call(m,p,d):v,d==null)break e;p=Ne({},p,d);break e;case 2:xn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[a]:d.push(a))}else m={eventTime:m,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(c=f=m,u=p):f=f.next=m,s|=d;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;d=a,a=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(f===null&&(u=p),o.baseState=u,o.firstBaseUpdate=c,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else l===null&&(o.shared.lanes=0);or|=s,e.lanes=s,e.memoizedState=p}}function Dc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error($(191,o));o.call(r)}}}var nl={},Ot=zn(nl),Bo=zn(nl),Vo=zn(nl);function Xn(e){if(e===nl)throw Error($(174));return e}function ku(e,t){switch(xe(Vo,t),xe(Bo,e),xe(Ot,nl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ea(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ea(t,e)}Se(Ot),xe(Ot,t)}function Ur(){Se(Ot),Se(Bo),Se(Vo)}function dp(e){Xn(Vo.current);var t=Xn(Ot.current),n=ea(t,e.type);t!==n&&(xe(Bo,e),xe(Ot,n))}function Cu(e){Bo.current===e&&(Se(Ot),Se(Bo))}var Ee=zn(0);function cs(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 yi=[];function ju(){for(var e=0;e<yi.length;e++)yi[e]._workInProgressVersionPrimary=null;yi.length=0}var Ol=mn.ReactCurrentDispatcher,xi=mn.ReactCurrentBatchConfig,rr=0,Te=null,$e=null,Ke=null,ds=!1,Ro=!1,Uo=0,Zg=0;function Ue(){throw Error($(321))}function Eu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function Tu(e,t,n,r,o,l){if(rr=l,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ol.current=e===null||e.memoizedState===null?ty:ny,e=n(r,o),Ro){l=0;do{if(Ro=!1,Uo=0,25<=l)throw Error($(301));l+=1,Ke=$e=null,t.updateQueue=null,Ol.current=ry,e=n(r,o)}while(Ro)}if(Ol.current=fs,t=$e!==null&&$e.next!==null,rr=0,Ke=$e=Te=null,ds=!1,t)throw Error($(300));return e}function Nu(){var e=Uo!==0;return Uo=0,e}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Te.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function St(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Ke===null?Te.memoizedState:Ke.next;if(t!==null)Ke=t,$e=e;else{if(e===null)throw Error($(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Ke===null?Te.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Go(e,t){return typeof t=="function"?t(e):t}function vi(e){var t=St(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=$e,o=r.baseQueue,l=n.pending;if(l!==null){if(o!==null){var s=o.next;o.next=l.next,l.next=s}r.baseQueue=o=l,n.pending=null}if(o!==null){l=o.next,r=r.baseState;var a=s=null,u=null,c=l;do{var f=c.lane;if((rr&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var p={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=p,s=r):u=u.next=p,Te.lanes|=f,or|=f}c=c.next}while(c!==null&&c!==l);u===null?s=r:u.next=a,Pt(r,t.memoizedState)||(rt=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do l=o.lane,Te.lanes|=l,or|=l,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bi(e){var t=St(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,l=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do l=e(l,s.action),s=s.next;while(s!==o);Pt(l,t.memoizedState)||(rt=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function fp(){}function pp(e,t){var n=Te,r=St(),o=t(),l=!Pt(r.memoizedState,o);if(l&&(r.memoizedState=o,rt=!0),r=r.queue,Ru(gp.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,Yo(9,mp.bind(null,n,r,o,t),void 0,null),Fe===null)throw Error($(349));rr&30||hp(n,t,o)}return o}function hp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mp(e,t,n,r){t.value=n,t.getSnapshot=r,yp(t)&&xp(e)}function gp(e,t,n){return n(function(){yp(t)&&xp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function xp(e){var t=ln(e,1);t!==null&&Rt(t,e,1,-1)}function $c(e){var t=It();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t.queue=e,e=e.dispatch=ey.bind(null,Te,e),[t.memoizedState,e]}function Yo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null,stores:null},Te.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 vp(){return St().memoizedState}function Dl(e,t,n,r){var o=It();Te.flags|=e,o.memoizedState=Yo(1|t,n,void 0,r===void 0?null:r)}function $s(e,t,n,r){var o=St();r=r===void 0?null:r;var l=void 0;if($e!==null){var s=$e.memoizedState;if(l=s.destroy,r!==null&&Eu(r,s.deps)){o.memoizedState=Yo(t,n,l,r);return}}Te.flags|=e,o.memoizedState=Yo(1|t,n,l,r)}function Mc(e,t){return Dl(8390656,8,e,t)}function Ru(e,t){return $s(2048,8,e,t)}function bp(e,t){return $s(4,2,e,t)}function wp(e,t){return $s(4,4,e,t)}function Sp(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 kp(e,t,n){return n=n!=null?n.concat([e]):null,$s(4,4,Sp.bind(null,t,e),n)}function Pu(){}function Cp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Eu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function jp(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Eu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ep(e,t,n){return rr&21?(Pt(n,t)||(n=_f(),Te.lanes|=n,or|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,rt=!0),e.memoizedState=n)}function Jg(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{he=n,xi.transition=r}}function Tp(){return St().memoizedState}function qg(e,t,n){var r=_n(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Np(e))Rp(t,n);else if(n=up(e,t,n,r),n!==null){var o=Ze();Rt(n,e,r,o),Pp(n,t,r)}}function ey(e,t,n){var r=_n(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Np(e))Rp(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,a=l(s,n);if(o.hasEagerState=!0,o.eagerState=a,Pt(a,s)){var u=t.interleaved;u===null?(o.next=o,wu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=up(e,t,o,r),n!==null&&(o=Ze(),Rt(n,e,r,o),Pp(n,t,r))}}function Np(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Rp(e,t){Ro=ds=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,iu(e,n)}}var fs={readContext:wt,useCallback:Ue,useContext:Ue,useEffect:Ue,useImperativeHandle:Ue,useInsertionEffect:Ue,useLayoutEffect:Ue,useMemo:Ue,useReducer:Ue,useRef:Ue,useState:Ue,useDebugValue:Ue,useDeferredValue:Ue,useTransition:Ue,useMutableSource:Ue,useSyncExternalStore:Ue,useId:Ue,unstable_isNewReconciler:!1},ty={readContext:wt,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Mc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Dl(4194308,4,Sp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var n=It();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=It();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=qg.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:$c,useDebugValue:Pu,useDeferredValue:function(e){return It().memoizedState=e},useTransition:function(){var e=$c(!1),t=e[0];return e=Jg.bind(null,e[1]),It().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,o=It();if(ke){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Fe===null)throw Error($(349));rr&30||hp(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Mc(gp.bind(null,r,l,e),[e]),r.flags|=2048,Yo(9,mp.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=It(),t=Fe.identifierPrefix;if(ke){var n=Jt,r=Zt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Uo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Zg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ny={readContext:wt,useCallback:Cp,useContext:wt,useEffect:Ru,useImperativeHandle:kp,useInsertionEffect:bp,useLayoutEffect:wp,useMemo:jp,useReducer:vi,useRef:vp,useState:function(){return vi(Go)},useDebugValue:Pu,useDeferredValue:function(e){var t=St();return Ep(t,$e.memoizedState,e)},useTransition:function(){var e=vi(Go)[0],t=St().memoizedState;return[e,t]},useMutableSource:fp,useSyncExternalStore:pp,useId:Tp,unstable_isNewReconciler:!1},ry={readContext:wt,useCallback:Cp,useContext:wt,useEffect:Ru,useImperativeHandle:kp,useInsertionEffect:bp,useLayoutEffect:wp,useMemo:jp,useReducer:bi,useRef:vp,useState:function(){return bi(Go)},useDebugValue:Pu,useDeferredValue:function(e){var t=St();return $e===null?t.memoizedState=e:Ep(t,$e.memoizedState,e)},useTransition:function(){var e=bi(Go)[0],t=St().memoizedState;return[e,t]},useMutableSource:fp,useSyncExternalStore:pp,useId:Tp,unstable_isNewReconciler:!1};function jt(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function wa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ms={isMounted:function(e){return(e=e._reactInternals)?fr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=_n(e),l=en(r,o);l.payload=t,n!=null&&(l.callback=n),t=Rn(e,l,o),t!==null&&(Rt(t,e,o,r),Ll(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=_n(e),l=en(r,o);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Rn(e,l,o),t!==null&&(Rt(t,e,o,r),Ll(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=_n(e),o=en(n,r);o.tag=2,t!=null&&(o.callback=t),t=Rn(e,o,r),t!==null&&(Rt(t,e,r,n),Ll(t,e,r))}};function zc(e,t,n,r,o,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,s):t.prototype&&t.prototype.isPureReactComponent?!Ko(n,r)||!Ko(o,l):!0}function _p(e,t,n){var r=!1,o=On,l=t.contextType;return typeof l=="object"&&l!==null?l=wt(l):(o=lt(t)?tr:Qe.current,r=t.contextTypes,l=(r=r!=null)?Wr(e,o):On),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ms,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=l),t}function Kc(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&&Ms.enqueueReplaceState(t,t.state,null)}function Sa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Su(e);var l=t.contextType;typeof l=="object"&&l!==null?o.context=wt(l):(l=lt(t)?tr:Qe.current,o.context=Wr(e,l)),o.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(wa(e,t,l,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ms.enqueueReplaceState(o,o.state,null),us(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Gr(e,t){try{var n="",r=t;do n+=_m(r),r=r.return;while(r);var o=n}catch(l){o=`
39
- Error generating stack: `+l.message+`
40
- `+l.stack}return{value:e,source:t,stack:o,digest:null}}function wi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ka(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var oy=typeof WeakMap=="function"?WeakMap:Map;function Ip(e,t,n){n=en(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hs||(hs=!0,Aa=r),ka(e,t)},n}function Ap(e,t,n){n=en(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ka(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){ka(e,t),typeof r!="function"&&(Pn===null?Pn=new Set([this]):Pn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Fc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new oy;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=xy.bind(null,e,t,n),t.then(e,e))}function Hc(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 Wc(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=en(-1,1),t.tag=2,Rn(n,t,1))),n.lanes|=1),e)}var ly=mn.ReactCurrentOwner,rt=!1;function Xe(e,t,n,r){t.child=e===null?ap(t,null,n,r):Vr(t,e.child,n,r)}function Bc(e,t,n,r,o){n=n.render;var l=t.ref;return Mr(t,o),r=Tu(e,t,n,r,l,o),n=Nu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,sn(e,t,o)):(ke&&n&&mu(t),t.flags|=1,Xe(e,t,r,o),t.child)}function Vc(e,t,n,r,o){if(e===null){var l=n.type;return typeof l=="function"&&!Mu(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,Lp(e,t,l,r,o)):(e=Kl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&o)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Ko,n(s,r)&&e.ref===t.ref)return sn(e,t,o)}return t.flags|=1,e=In(l,r),e.ref=t.ref,e.return=t,t.child=e}function Lp(e,t,n,r,o){if(e!==null){var l=e.memoizedProps;if(Ko(l,r)&&e.ref===t.ref)if(rt=!1,t.pendingProps=r=l,(e.lanes&o)!==0)e.flags&131072&&(rt=!0);else return t.lanes=e.lanes,sn(e,t,o)}return Ca(e,t,n,r,o)}function Op(e,t,n){var r=t.pendingProps,o=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(Ir,it),it|=n;else{if(!(n&1073741824))return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(Ir,it),it|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,xe(Ir,it),it|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,xe(Ir,it),it|=r;return Xe(e,t,o,n),t.child}function Dp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ca(e,t,n,r,o){var l=lt(n)?tr:Qe.current;return l=Wr(t,l),Mr(t,o),n=Tu(e,t,n,r,l,o),r=Nu(),e!==null&&!rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,sn(e,t,o)):(ke&&r&&mu(t),t.flags|=1,Xe(e,t,n,o),t.child)}function Uc(e,t,n,r,o){if(lt(n)){var l=!0;os(t)}else l=!1;if(Mr(t,o),t.stateNode===null)$l(e,t),_p(t,n,r),Sa(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=wt(c):(c=lt(n)?tr:Qe.current,c=Wr(t,c));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==c)&&Kc(t,s,r,c),xn=!1;var d=t.memoizedState;s.state=d,us(t,r,s,o),u=t.memoizedState,a!==r||d!==u||ot.current||xn?(typeof f=="function"&&(wa(t,n,f,r),u=t.memoizedState),(a=xn||zc(t,n,a,r,d,u,c))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,cp(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:jt(t.type,a),s.props=c,p=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=wt(u):(u=lt(n)?tr:Qe.current,u=Wr(t,u));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==u)&&Kc(t,s,r,u),xn=!1,d=t.memoizedState,s.state=d,us(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||ot.current||xn?(typeof m=="function"&&(wa(t,n,m,r),v=t.memoizedState),(c=xn||zc(t,n,c,r,d,v,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ja(e,t,n,r,l,o)}function ja(e,t,n,r,o,l){Dp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&_c(t,n,!1),sn(e,t,l);r=t.stateNode,ly.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Vr(t,e.child,null,l),t.child=Vr(t,null,a,l)):Xe(e,t,a,l),t.memoizedState=r.state,o&&_c(t,n,!0),t.child}function $p(e){var t=e.stateNode;t.pendingContext?Pc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Pc(e,t.context,!1),ku(e,t.containerInfo)}function Gc(e,t,n,r,o){return Br(),yu(o),t.flags|=256,Xe(e,t,n,r),t.child}var Ea={dehydrated:null,treeContext:null,retryLane:0};function Ta(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mp(e,t,n){var r=t.pendingProps,o=Ee.current,l=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),xe(Ee,o&1),e===null)return va(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,l?(r=t.mode,l=t.child,s={mode:"hidden",children:s},!(r&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=Fs(s,r,0,null),e=qn(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ta(n),t.memoizedState=Ea,e):_u(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return sy(e,t,s,r,a,o,n);if(l){l=r.fallback,s=t.mode,o=e.child,a=o.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=In(o,u),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?l=In(a,l):(l=qn(l,s,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,s=e.child.memoizedState,s=s===null?Ta(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~n,t.memoizedState=Ea,r}return l=e.child,e=l.sibling,r=In(l,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function _u(e,t){return t=Fs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bl(e,t,n,r){return r!==null&&yu(r),Vr(t,e.child,null,n),e=_u(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sy(e,t,n,r,o,l,s){if(n)return t.flags&256?(t.flags&=-257,r=wi(Error($(422))),bl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,o=t.mode,r=Fs({mode:"visible",children:r.children},o,0,null),l=qn(l,o,s,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,t.mode&1&&Vr(t,e.child,null,s),t.child.memoizedState=Ta(s),t.memoizedState=Ea,l);if(!(t.mode&1))return bl(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,l=Error($(419)),r=wi(l,r,void 0),bl(e,t,s,r)}if(a=(s&e.childLanes)!==0,rt||a){if(r=Fe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==l.retryLane&&(l.retryLane=o,ln(e,o),Rt(r,e,o,-1))}return $u(),r=wi(Error($(421))),bl(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=vy.bind(null,e),o._reactRetry=t,null):(e=l.treeContext,ut=Nn(o.nextSibling),ct=t,ke=!0,Tt=null,e!==null&&(gt[yt++]=Zt,gt[yt++]=Jt,gt[yt++]=nr,Zt=e.id,Jt=e.overflow,nr=t),t=_u(t,r.children),t.flags|=4096,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ba(e.return,t,n)}function Si(e,t,n,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=o)}function zp(e,t,n){var r=t.pendingProps,o=r.revealOrder,l=r.tail;if(Xe(e,t,r.children,n),r=Ee.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&&Yc(e,n,t);else if(e.tag===19)Yc(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(xe(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&cs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Si(t,!1,o,n,l);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&cs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Si(t,!0,n,null,l);break;case"together":Si(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function sn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),or|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function iy(e,t,n){switch(t.tag){case 3:$p(t),Br();break;case 5:dp(t);break;case 1:lt(t.type)&&os(t);break;case 4:ku(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xe(is,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?Mp(e,t,n):(xe(Ee,Ee.current&1),e=sn(e,t,n),e!==null?e.sibling:null);xe(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return zp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xe(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Op(e,t,n)}return sn(e,t,n)}var Kp,Na,Fp,Hp;Kp=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}};Na=function(){};Fp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Xn(Ot.current);var l=null;switch(n){case"input":o=Xi(e,o),r=Xi(e,r),l=[];break;case"select":o=Ne({},o,{value:void 0}),r=Ne({},r,{value:void 0}),l=[];break;case"textarea":o=qi(e,o),r=qi(e,r),l=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ns)}ta(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ao.hasOwnProperty(c)?l||(l=[]):(l=l||[]).push(c,null));for(c in r){var u=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(l||(l=[]),l.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(l=l||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ao.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&we("scroll",e),l||a===u||(l=[])):(l=l||[]).push(c,u))}n&&(l=l||[]).push("style",n);var c=l;(t.updateQueue=c)&&(t.flags|=4)}};Hp=function(e,t,n,r){n!==r&&(t.flags|=4)};function mo(e,t){if(!ke)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 Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ay(e,t,n){var r=t.pendingProps;switch(gu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return lt(t.type)&&rs(),Ge(t),null;case 3:return r=t.stateNode,Ur(),Se(ot),Se(Qe),ju(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tt!==null&&(Da(Tt),Tt=null))),Na(e,t),Ge(t),null;case 5:Cu(t);var o=Xn(Vo.current);if(n=t.type,e!==null&&t.stateNode!=null)Fp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ge(t),null}if(e=Xn(Ot.current),xl(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[At]=t,r[Wo]=l,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(o=0;o<So.length;o++)we(So[o],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":rc(r,l),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},we("invalid",r);break;case"textarea":lc(r,l),we("invalid",r)}ta(n,l),o=null;for(var s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="children"?typeof a=="string"?r.textContent!==a&&(l.suppressHydrationWarning!==!0&&yl(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(l.suppressHydrationWarning!==!0&&yl(r.textContent,a,e),o=["children",""+a]):Ao.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&we("scroll",r)}switch(n){case"input":ul(r),oc(r,l,!0);break;case"textarea":ul(r),sc(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=ns)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gf(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[At]=t,e[Wo]=r,Kp(e,t,!1,!1),t.stateNode=e;e:{switch(s=na(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;o<So.length;o++)we(So[o],e);o=r;break;case"source":we("error",e),o=r;break;case"img":case"image":case"link":we("error",e),we("load",e),o=r;break;case"details":we("toggle",e),o=r;break;case"input":rc(e,r),o=Xi(e,r),we("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ne({},r,{value:void 0}),we("invalid",e);break;case"textarea":lc(e,r),o=qi(e,r),we("invalid",e);break;default:o=r}ta(n,o),a=o;for(l in a)if(a.hasOwnProperty(l)){var u=a[l];l==="style"?vf(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&yf(e,u)):l==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Lo(e,u):typeof u=="number"&&Lo(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Ao.hasOwnProperty(l)?u!=null&&l==="onScroll"&&we("scroll",e):u!=null&&tu(e,l,u,s))}switch(n){case"input":ul(e),oc(e,r,!1);break;case"textarea":ul(e),sc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ln(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Lr(e,!!r.multiple,l,!1):r.defaultValue!=null&&Lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ns)}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 Ge(t),null;case 6:if(e&&t.stateNode!=null)Hp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=Xn(Vo.current),Xn(Ot.current),xl(t)){if(r=t.stateNode,n=t.memoizedProps,r[At]=t,(l=r.nodeValue!==n)&&(e=ct,e!==null))switch(e.tag){case 3:yl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yl(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[At]=t,t.stateNode=r}return Ge(t),null;case 13:if(Se(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&ut!==null&&t.mode&1&&!(t.flags&128))sp(),Br(),t.flags|=98560,l=!1;else if(l=xl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error($(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error($(317));l[At]=t}else Br(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ge(t),l=!1}else Tt!==null&&(Da(Tt),Tt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?Me===0&&(Me=3):$u())),t.updateQueue!==null&&(t.flags|=4),Ge(t),null);case 4:return Ur(),Na(e,t),e===null&&Fo(t.stateNode.containerInfo),Ge(t),null;case 10:return bu(t.type._context),Ge(t),null;case 17:return lt(t.type)&&rs(),Ge(t),null;case 19:if(Se(Ee),l=t.memoizedState,l===null)return Ge(t),null;if(r=(t.flags&128)!==0,s=l.rendering,s===null)if(r)mo(l,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=cs(e),s!==null){for(t.flags|=128,mo(l,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Ee,Ee.current&1|2),t.child}e=e.sibling}l.tail!==null&&_e()>Yr&&(t.flags|=128,r=!0,mo(l,!1),t.lanes=4194304)}else{if(!r)if(e=cs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mo(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ke)return Ge(t),null}else 2*_e()-l.renderingStartTime>Yr&&n!==1073741824&&(t.flags|=128,r=!0,mo(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=_e(),t.sibling=null,n=Ee.current,xe(Ee,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?it&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function uy(e,t){switch(gu(t),t.tag){case 1:return lt(t.type)&&rs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ur(),Se(ot),Se(Qe),ju(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cu(t),null;case 13:if(Se(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ee),null;case 4:return Ur(),null;case 10:return bu(t.type._context),null;case 22:case 23:return Du(),null;case 24:return null;default:return null}}var wl=!1,Ye=!1,cy=typeof WeakSet=="function"?WeakSet:Set,B=null;function _r(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function Ra(e,t,n){try{n()}catch(r){Re(e,t,r)}}var Qc=!1;function dy(e,t){if(fa=ql,e=Gf(),hu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,c=0,f=0,p=e,d=null;t:for(;;){for(var m;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==l||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(m=p.firstChild)!==null;)d=p,p=m;for(;;){if(p===e)break t;if(d===n&&++c===o&&(a=s),d===l&&++f===r&&(u=s),(m=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(pa={focusedElem:e,selectionRange:n},ql=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var b=v.memoizedProps,S=v.memoizedState,h=t.stateNode,g=h.getSnapshotBeforeUpdate(t.elementType===t.type?b:jt(t.type,b),S);h.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(y){Re(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return v=Qc,Qc=!1,v}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&Ra(t,n,l)}o=o.next}while(o!==r)}}function zs(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 Pa(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 Wp(e){var t=e.alternate;t!==null&&(e.alternate=null,Wp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[Wo],delete t[ga],delete t[Gg],delete t[Yg])),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 Bp(e){return e.tag===5||e.tag===3||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bp(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 _a(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=ns));else if(r!==4&&(e=e.child,e!==null))for(_a(e,t,n),e=e.sibling;e!==null;)_a(e,t,n),e=e.sibling}function Ia(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(Ia(e,t,n),e=e.sibling;e!==null;)Ia(e,t,n),e=e.sibling}var We=null,Et=!1;function gn(e,t,n){for(n=n.child;n!==null;)Vp(e,t,n),n=n.sibling}function Vp(e,t,n){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(_s,n)}catch{}switch(n.tag){case 5:Ye||_r(n,t);case 6:var r=We,o=Et;We=null,gn(e,t,n),We=r,Et=o,We!==null&&(Et?(e=We,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):We.removeChild(n.stateNode));break;case 18:We!==null&&(Et?(e=We,n=n.stateNode,e.nodeType===8?mi(e.parentNode,n):e.nodeType===1&&mi(e,n),Mo(e)):mi(We,n.stateNode));break;case 4:r=We,o=Et,We=n.stateNode.containerInfo,Et=!0,gn(e,t,n),We=r,Et=o;break;case 0:case 11:case 14:case 15:if(!Ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Ra(n,t,s),o=o.next}while(o!==r)}gn(e,t,n);break;case 1:if(!Ye&&(_r(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Re(n,t,a)}gn(e,t,n);break;case 21:gn(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,gn(e,t,n),Ye=r):gn(e,t,n);break;default:gn(e,t,n)}}function Zc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new cy),t.forEach(function(r){var o=by.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var l=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:We=a.stateNode,Et=!1;break e;case 3:We=a.stateNode.containerInfo,Et=!0;break e;case 4:We=a.stateNode.containerInfo,Et=!0;break e}a=a.return}if(We===null)throw Error($(160));Vp(l,s,o),We=null,Et=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(c){Re(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Up(t,e),t=t.sibling}function Up(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),_t(e),r&4){try{Po(3,e,e.return),zs(3,e)}catch(b){Re(e,e.return,b)}try{Po(5,e,e.return)}catch(b){Re(e,e.return,b)}}break;case 1:Ct(t,e),_t(e),r&512&&n!==null&&_r(n,n.return);break;case 5:if(Ct(t,e),_t(e),r&512&&n!==null&&_r(n,n.return),e.flags&32){var o=e.stateNode;try{Lo(o,"")}catch(b){Re(e,e.return,b)}}if(r&4&&(o=e.stateNode,o!=null)){var l=e.memoizedProps,s=n!==null?n.memoizedProps:l,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&l.type==="radio"&&l.name!=null&&hf(o,l),na(a,s);var c=na(a,l);for(s=0;s<u.length;s+=2){var f=u[s],p=u[s+1];f==="style"?vf(o,p):f==="dangerouslySetInnerHTML"?yf(o,p):f==="children"?Lo(o,p):tu(o,f,p,c)}switch(a){case"input":Zi(o,l);break;case"textarea":mf(o,l);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!l.multiple;var m=l.value;m!=null?Lr(o,!!l.multiple,m,!1):d!==!!l.multiple&&(l.defaultValue!=null?Lr(o,!!l.multiple,l.defaultValue,!0):Lr(o,!!l.multiple,l.multiple?[]:"",!1))}o[Wo]=l}catch(b){Re(e,e.return,b)}}break;case 6:if(Ct(t,e),_t(e),r&4){if(e.stateNode===null)throw Error($(162));o=e.stateNode,l=e.memoizedProps;try{o.nodeValue=l}catch(b){Re(e,e.return,b)}}break;case 3:if(Ct(t,e),_t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Mo(t.containerInfo)}catch(b){Re(e,e.return,b)}break;case 4:Ct(t,e),_t(e);break;case 13:Ct(t,e),_t(e),o=e.child,o.flags&8192&&(l=o.memoizedState!==null,o.stateNode.isHidden=l,!l||o.alternate!==null&&o.alternate.memoizedState!==null||(Lu=_e())),r&4&&Zc(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ye=(c=Ye)||f,Ct(t,e),Ye=c):Ct(t,e),_t(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(B=e,f=e.child;f!==null;){for(p=B=f;B!==null;){switch(d=B,m=d.child,d.tag){case 0:case 11:case 14:case 15:Po(4,d,d.return);break;case 1:_r(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(b){Re(r,n,b)}}break;case 5:_r(d,d.return);break;case 22:if(d.memoizedState!==null){qc(p);continue}}m!==null?(m.return=d,B=m):qc(p)}f=f.sibling}e:for(f=null,p=e;;){if(p.tag===5){if(f===null){f=p;try{o=p.stateNode,c?(l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(a=p.stateNode,u=p.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=xf("display",s))}catch(b){Re(e,e.return,b)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=c?"":p.memoizedProps}catch(b){Re(e,e.return,b)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===e)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;p.sibling===null;){if(p.return===null||p.return===e)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Ct(t,e),_t(e),r&4&&Zc(e);break;case 21:break;default:Ct(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bp(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Lo(o,""),r.flags&=-33);var l=Xc(e);Ia(e,l,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Xc(e);_a(e,a,s);break;default:throw Error($(161))}}catch(u){Re(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fy(e,t,n){B=e,Gp(e)}function Gp(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var o=B,l=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||wl;if(!s){var a=o.alternate,u=a!==null&&a.memoizedState!==null||Ye;a=wl;var c=Ye;if(wl=s,(Ye=u)&&!c)for(B=o;B!==null;)s=B,u=s.child,s.tag===22&&s.memoizedState!==null?ed(o):u!==null?(u.return=s,B=u):ed(o);for(;l!==null;)B=l,Gp(l),l=l.sibling;B=o,wl=a,Ye=c}Jc(e)}else o.subtreeFlags&8772&&l!==null?(l.return=o,B=l):Jc(e)}}function Jc(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ye||zs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ye)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:jt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Dc(t,l,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Dc(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&Mo(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Ye||t.flags&512&&Pa(t)}catch(d){Re(t,t.return,d)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function qc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function ed(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zs(4,t)}catch(u){Re(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){Re(t,o,u)}}var l=t.return;try{Pa(t)}catch(u){Re(t,l,u)}break;case 5:var s=t.return;try{Pa(t)}catch(u){Re(t,s,u)}}}catch(u){Re(t,t.return,u)}if(t===e){B=null;break}var a=t.sibling;if(a!==null){a.return=t.return,B=a;break}B=t.return}}var py=Math.ceil,ps=mn.ReactCurrentDispatcher,Iu=mn.ReactCurrentOwner,vt=mn.ReactCurrentBatchConfig,fe=0,Fe=null,Oe=null,Be=0,it=0,Ir=zn(0),Me=0,Qo=null,or=0,Ks=0,Au=0,_o=null,nt=null,Lu=0,Yr=1/0,Vt=null,hs=!1,Aa=null,Pn=null,Sl=!1,Cn=null,ms=0,Io=0,La=null,Ml=-1,zl=0;function Ze(){return fe&6?_e():Ml!==-1?Ml:Ml=_e()}function _n(e){return e.mode&1?fe&2&&Be!==0?Be&-Be:Xg.transition!==null?(zl===0&&(zl=_f()),zl):(e=he,e!==0||(e=window.event,e=e===void 0?16:Mf(e.type)),e):1}function Rt(e,t,n,r){if(50<Io)throw Io=0,La=null,Error($(185));qo(e,n,r),(!(fe&2)||e!==Fe)&&(e===Fe&&(!(fe&2)&&(Ks|=n),Me===4&&wn(e,Be)),st(e,r),n===1&&fe===0&&!(t.mode&1)&&(Yr=_e()+500,Ds&&Kn()))}function st(e,t){var n=e.callbackNode;Xm(e,t);var r=Jl(e,e===Fe?Be:0);if(r===0)n!==null&&uc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&uc(n),t===1)e.tag===0?Qg(td.bind(null,e)):rp(td.bind(null,e)),Vg(function(){!(fe&6)&&Kn()}),n=null;else{switch(If(r)){case 1:n=su;break;case 4:n=Rf;break;case 16:n=Zl;break;case 536870912:n=Pf;break;default:n=Zl}n=th(n,Yp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yp(e,t){if(Ml=-1,zl=0,fe&6)throw Error($(327));var n=e.callbackNode;if(zr()&&e.callbackNode!==n)return null;var r=Jl(e,e===Fe?Be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gs(e,r);else{t=r;var o=fe;fe|=2;var l=Xp();(Fe!==e||Be!==t)&&(Vt=null,Yr=_e()+500,Jn(e,t));do try{gy();break}catch(a){Qp(e,a)}while(!0);vu(),ps.current=l,fe=o,Oe!==null?t=0:(Fe=null,Be=0,t=Me)}if(t!==0){if(t===2&&(o=ia(e),o!==0&&(r=o,t=Oa(e,o))),t===1)throw n=Qo,Jn(e,0),wn(e,r),st(e,_e()),n;if(t===6)wn(e,r);else{if(o=e.current.alternate,!(r&30)&&!hy(o)&&(t=gs(e,r),t===2&&(l=ia(e),l!==0&&(r=l,t=Oa(e,l))),t===1))throw n=Qo,Jn(e,0),wn(e,r),st(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:Gn(e,nt,Vt);break;case 3:if(wn(e,r),(r&130023424)===r&&(t=Lu+500-_e(),10<t)){if(Jl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ma(Gn.bind(null,e,nt,Vt),t);break}Gn(e,nt,Vt);break;case 4:if(wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);l=1<<s,s=t[s],s>o&&(o=s),r&=~l}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*py(r/1960))-r,10<r){e.timeoutHandle=ma(Gn.bind(null,e,nt,Vt),r);break}Gn(e,nt,Vt);break;case 5:Gn(e,nt,Vt);break;default:throw Error($(329))}}}return st(e,_e()),e.callbackNode===n?Yp.bind(null,e):null}function Oa(e,t){var n=_o;return e.current.memoizedState.isDehydrated&&(Jn(e,t).flags|=256),e=gs(e,t),e!==2&&(t=nt,nt=n,t!==null&&Da(t)),e}function Da(e){nt===null?nt=e:nt.push.apply(nt,e)}function hy(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],l=o.getSnapshot;o=o.value;try{if(!Pt(l(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wn(e,t){for(t&=~Au,t&=~Ks,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function td(e){if(fe&6)throw Error($(327));zr();var t=Jl(e,0);if(!(t&1))return st(e,_e()),null;var n=gs(e,t);if(e.tag!==0&&n===2){var r=ia(e);r!==0&&(t=r,n=Oa(e,r))}if(n===1)throw n=Qo,Jn(e,0),wn(e,t),st(e,_e()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gn(e,nt,Vt),st(e,_e()),null}function Ou(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(Yr=_e()+500,Ds&&Kn())}}function lr(e){Cn!==null&&Cn.tag===0&&!(fe&6)&&zr();var t=fe;fe|=1;var n=vt.transition,r=he;try{if(vt.transition=null,he=1,e)return e()}finally{he=r,vt.transition=n,fe=t,!(fe&6)&&Kn()}}function Du(){it=Ir.current,Se(Ir)}function Jn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Bg(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(gu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&rs();break;case 3:Ur(),Se(ot),Se(Qe),ju();break;case 5:Cu(r);break;case 4:Ur();break;case 13:Se(Ee);break;case 19:Se(Ee);break;case 10:bu(r.type._context);break;case 22:case 23:Du()}n=n.return}if(Fe=e,Oe=e=In(e.current,null),Be=it=t,Me=0,Qo=null,Au=Ks=or=0,nt=_o=null,Qn!==null){for(t=0;t<Qn.length;t++)if(n=Qn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,l=n.pending;if(l!==null){var s=l.next;l.next=o,r.next=s}n.pending=r}Qn=null}return e}function Qp(e,t){do{var n=Oe;try{if(vu(),Ol.current=fs,ds){for(var r=Te.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ds=!1}if(rr=0,Ke=$e=Te=null,Ro=!1,Uo=0,Iu.current=null,n===null||n.return===null){Me=1,Qo=t,Oe=null;break}e:{var l=e,s=n.return,a=n,u=t;if(t=Be,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=a,p=f.tag;if(!(f.mode&1)&&(p===0||p===11||p===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var m=Hc(s);if(m!==null){m.flags&=-257,Wc(m,s,a,l,t),m.mode&1&&Fc(l,c,t),t=m,u=c;var v=t.updateQueue;if(v===null){var b=new Set;b.add(u),t.updateQueue=b}else v.add(u);break e}else{if(!(t&1)){Fc(l,c,t),$u();break e}u=Error($(426))}}else if(ke&&a.mode&1){var S=Hc(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Wc(S,s,a,l,t),yu(Gr(u,a));break e}}l=u=Gr(u,a),Me!==4&&(Me=2),_o===null?_o=[l]:_o.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var h=Ip(l,u,t);Oc(l,h);break e;case 1:a=u;var g=l.type,x=l.stateNode;if(!(l.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Pn===null||!Pn.has(x)))){l.flags|=65536,t&=-t,l.lanes|=t;var y=Ap(l,a,t);Oc(l,y);break e}}l=l.return}while(l!==null)}Jp(n)}catch(C){t=C,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function Xp(){var e=ps.current;return ps.current=fs,e===null?fs:e}function $u(){(Me===0||Me===3||Me===2)&&(Me=4),Fe===null||!(or&268435455)&&!(Ks&268435455)||wn(Fe,Be)}function gs(e,t){var n=fe;fe|=2;var r=Xp();(Fe!==e||Be!==t)&&(Vt=null,Jn(e,t));do try{my();break}catch(o){Qp(e,o)}while(!0);if(vu(),fe=n,ps.current=r,Oe!==null)throw Error($(261));return Fe=null,Be=0,Me}function my(){for(;Oe!==null;)Zp(Oe)}function gy(){for(;Oe!==null&&!Fm();)Zp(Oe)}function Zp(e){var t=eh(e.alternate,e,it);e.memoizedProps=e.pendingProps,t===null?Jp(e):Oe=t,Iu.current=null}function Jp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=uy(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Oe=null;return}}else if(n=ay(n,t,it),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Me===0&&(Me=5)}function Gn(e,t,n){var r=he,o=vt.transition;try{vt.transition=null,he=1,yy(e,t,n,r)}finally{vt.transition=o,he=r}return null}function yy(e,t,n,r){do zr();while(Cn!==null);if(fe&6)throw Error($(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(Zm(e,l),e===Fe&&(Oe=Fe=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Sl||(Sl=!0,th(Zl,function(){return zr(),null})),l=(n.flags&15990)!==0,n.subtreeFlags&15990||l){l=vt.transition,vt.transition=null;var s=he;he=1;var a=fe;fe|=4,Iu.current=null,dy(e,n),Up(n,e),$g(pa),ql=!!fa,pa=fa=null,e.current=n,fy(n),Hm(),fe=a,he=s,vt.transition=l}else e.current=n;if(Sl&&(Sl=!1,Cn=e,ms=o),l=e.pendingLanes,l===0&&(Pn=null),Vm(n.stateNode),st(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(hs)throw hs=!1,e=Aa,Aa=null,e;return ms&1&&e.tag!==0&&zr(),l=e.pendingLanes,l&1?e===La?Io++:(Io=0,La=e):Io=0,Kn(),null}function zr(){if(Cn!==null){var e=If(ms),t=vt.transition,n=he;try{if(vt.transition=null,he=16>e?16:e,Cn===null)var r=!1;else{if(e=Cn,Cn=null,ms=0,fe&6)throw Error($(331));var o=fe;for(fe|=4,B=e.current;B!==null;){var l=B,s=l.child;if(B.flags&16){var a=l.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(B=c;B!==null;){var f=B;switch(f.tag){case 0:case 11:case 15:Po(8,f,l)}var p=f.child;if(p!==null)p.return=f,B=p;else for(;B!==null;){f=B;var d=f.sibling,m=f.return;if(Wp(f),f===c){B=null;break}if(d!==null){d.return=m,B=d;break}B=m}}}var v=l.alternate;if(v!==null){var b=v.child;if(b!==null){v.child=null;do{var S=b.sibling;b.sibling=null,b=S}while(b!==null)}}B=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,B=s;else e:for(;B!==null;){if(l=B,l.flags&2048)switch(l.tag){case 0:case 11:case 15:Po(9,l,l.return)}var h=l.sibling;if(h!==null){h.return=l.return,B=h;break e}B=l.return}}var g=e.current;for(B=g;B!==null;){s=B;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,B=x;else e:for(s=g;B!==null;){if(a=B,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:zs(9,a)}}catch(C){Re(a,a.return,C)}if(a===s){B=null;break e}var y=a.sibling;if(y!==null){y.return=a.return,B=y;break e}B=a.return}}if(fe=o,Kn(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(_s,e)}catch{}r=!0}return r}finally{he=n,vt.transition=t}}return!1}function nd(e,t,n){t=Gr(n,t),t=Ip(e,t,1),e=Rn(e,t,1),t=Ze(),e!==null&&(qo(e,1,t),st(e,t))}function Re(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pn===null||!Pn.has(r))){e=Gr(n,e),e=Ap(t,e,1),t=Rn(t,e,1),e=Ze(),t!==null&&(qo(t,1,e),st(t,e));break}}t=t.return}}function xy(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,Fe===e&&(Be&n)===n&&(Me===4||Me===3&&(Be&130023424)===Be&&500>_e()-Lu?Jn(e,0):Au|=n),st(e,t)}function qp(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=Ze();e=ln(e,t),e!==null&&(qo(e,t,n),st(e,n))}function vy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qp(e,n)}function by(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),qp(e,n)}var eh;eh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,iy(e,t,n);rt=!!(e.flags&131072)}else rt=!1,ke&&t.flags&1048576&&op(t,ss,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var o=Wr(t,Qe.current);Mr(t,n),o=Tu(null,t,r,e,o,n);var l=Nu();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(r)?(l=!0,os(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Su(t),o.updater=Ms,t.stateNode=o,o._reactInternals=t,Sa(t,r,e,n),t=ja(null,t,r,!0,l,n)):(t.tag=0,ke&&l&&mu(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Sy(r),e=jt(r,e),o){case 0:t=Ca(null,t,r,e,n);break e;case 1:t=Uc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Vc(null,t,r,jt(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Ca(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Uc(e,t,r,o,n);case 3:e:{if($p(t),e===null)throw Error($(387));r=t.pendingProps,l=t.memoizedState,o=l.element,cp(e,t),us(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Gr(Error($(423)),t),t=Gc(e,t,r,n,o);break e}else if(r!==o){o=Gr(Error($(424)),t),t=Gc(e,t,r,n,o);break e}else for(ut=Nn(t.stateNode.containerInfo.firstChild),ct=t,ke=!0,Tt=null,n=ap(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===o){t=sn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return dp(t),e===null&&va(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,s=o.children,ha(r,o)?s=null:l!==null&&ha(r,l)&&(t.flags|=32),Dp(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&va(t),null;case 13:return Mp(e,t,n);case 4:return ku(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vr(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),Bc(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,s=o.value,xe(is,r._currentValue),r._currentValue=s,l!==null)if(Pt(l.value,s)){if(l.children===o.children&&!ot.current){t=sn(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=en(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),ba(l.return,n,t),a.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error($(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ba(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mr(t,n),o=wt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=jt(r,t.pendingProps),o=jt(r.type,o),Vc(e,t,r,o,n);case 15:return Lp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:jt(r,o),$l(e,t),t.tag=1,lt(r)?(e=!0,os(t)):e=!1,Mr(t,n),_p(t,r,o),Sa(t,r,o,n),ja(null,t,r,!0,e,n);case 19:return zp(e,t,n);case 22:return Op(e,t,n)}throw Error($(156,t.tag))};function th(e,t){return Nf(e,t)}function wy(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 xt(e,t,n,r){return new wy(e,t,n,r)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sy(e){if(typeof e=="function")return Mu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ru)return 11;if(e===ou)return 14}return 2}function In(e,t){var n=e.alternate;return n===null?(n=xt(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 Kl(e,t,n,r,o,l){var s=2;if(r=e,typeof e=="function")Mu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Sr:return qn(n.children,o,l,t);case nu:s=8,o|=8;break;case Ui:return e=xt(12,n,t,o|2),e.elementType=Ui,e.lanes=l,e;case Gi:return e=xt(13,n,t,o),e.elementType=Gi,e.lanes=l,e;case Yi:return e=xt(19,n,t,o),e.elementType=Yi,e.lanes=l,e;case df:return Fs(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uf:s=10;break e;case cf:s=9;break e;case ru:s=11;break e;case ou:s=14;break e;case yn:s=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=xt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function qn(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Fs(e,t,n,r){return e=xt(22,e,r,t),e.elementType=df,e.lanes=n,e.stateNode={isHidden:!1},e}function ki(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function Ci(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ky(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oi(0),this.expirationTimes=oi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function zu(e,t,n,r,o,l,s,a,u){return e=new ky(e,t,n,a,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=xt(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Su(l),e}function Cy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nh(e){if(!e)return On;e=e._reactInternals;e:{if(fr(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(lt(n))return np(e,n,t)}return t}function rh(e,t,n,r,o,l,s,a,u){return e=zu(n,r,!0,e,o,l,s,a,u),e.context=nh(null),n=e.current,r=Ze(),o=_n(n),l=en(r,o),l.callback=t??null,Rn(n,l,o),e.current.lanes=o,qo(e,o,r),st(e,r),e}function Hs(e,t,n,r){var o=t.current,l=Ze(),s=_n(o);return n=nh(n),t.context===null?t.context=n:t.pendingContext=n,t=en(l,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rn(o,t,s),e!==null&&(Rt(e,o,s,l),Ll(e,o,s)),s}function ys(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 rd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ku(e,t){rd(e,t),(e=e.alternate)&&rd(e,t)}function jy(){return null}var oh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Fu(e){this._internalRoot=e}Ws.prototype.render=Fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Hs(e,t,null,null)};Ws.prototype.unmount=Fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lr(function(){Hs(null,e,null,null)}),t[on]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var t=Of();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bn.length&&t!==0&&t<bn[n].priority;n++);bn.splice(n,0,e),n===0&&$f(e)}};function Hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function od(){}function Ey(e,t,n,r,o){if(o){if(typeof r=="function"){var l=r;r=function(){var c=ys(s);l.call(c)}}var s=rh(t,r,e,0,null,!1,!1,"",od);return e._reactRootContainer=s,e[on]=s.current,Fo(e.nodeType===8?e.parentNode:e),lr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=ys(u);a.call(c)}}var u=zu(e,0,!1,null,null,!1,!1,"",od);return e._reactRootContainer=u,e[on]=u.current,Fo(e.nodeType===8?e.parentNode:e),lr(function(){Hs(t,u,n,r)}),u}function Vs(e,t,n,r,o){var l=n._reactRootContainer;if(l){var s=l;if(typeof o=="function"){var a=o;o=function(){var u=ys(s);a.call(u)}}Hs(t,s,e,o)}else s=Ey(n,t,e,o,r);return ys(s)}Af=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wo(t.pendingLanes);n!==0&&(iu(t,n|1),st(t,_e()),!(fe&6)&&(Yr=_e()+500,Kn()))}break;case 13:lr(function(){var r=ln(e,1);if(r!==null){var o=Ze();Rt(r,e,1,o)}}),Ku(e,1)}};au=function(e){if(e.tag===13){var t=ln(e,134217728);if(t!==null){var n=Ze();Rt(t,e,134217728,n)}Ku(e,134217728)}};Lf=function(e){if(e.tag===13){var t=_n(e),n=ln(e,t);if(n!==null){var r=Ze();Rt(n,e,t,r)}Ku(e,t)}};Of=function(){return he};Df=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};oa=function(e,t,n){switch(t){case"input":if(Zi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Os(r);if(!o)throw Error($(90));pf(r),Zi(r,o)}}}break;case"textarea":mf(e,n);break;case"select":t=n.value,t!=null&&Lr(e,!!n.multiple,t,!1)}};Sf=Ou;kf=lr;var Ty={usingClientEntryPoint:!1,Events:[tl,Er,Os,bf,wf,Ou]},go={findFiberByHostInstance:Yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ny={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:mn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ef(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||jy,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 kl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kl.isDisabled&&kl.supportsFiber)try{_s=kl.inject(Ny),Lt=kl}catch{}}pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ty;pt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hu(t))throw Error($(200));return Cy(e,t,null,n)};pt.createRoot=function(e,t){if(!Hu(e))throw Error($(299));var n=!1,r="",o=oh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=zu(e,1,!1,null,null,n,!1,r,o),e[on]=t.current,Fo(e.nodeType===8?e.parentNode:e),new Fu(t)};pt.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Ef(t),e=e===null?null:e.stateNode,e};pt.flushSync=function(e){return lr(e)};pt.hydrate=function(e,t,n){if(!Bs(t))throw Error($(200));return Vs(null,e,t,!0,n)};pt.hydrateRoot=function(e,t,n){if(!Hu(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,o=!1,l="",s=oh;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=rh(t,null,e,1,n??null,o,!1,l,s),e[on]=t.current,Fo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Ws(t)};pt.render=function(e,t,n){if(!Bs(t))throw Error($(200));return Vs(null,e,t,!1,n)};pt.unmountComponentAtNode=function(e){if(!Bs(e))throw Error($(40));return e._reactRootContainer?(lr(function(){Vs(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1};pt.unstable_batchedUpdates=Ou;pt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bs(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Vs(e,t,n,!1,r)};pt.version="18.3.1-next-f1338f8080-20240426";function lh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lh)}catch(e){console.error(e)}}lh(),of.exports=pt;var Wu=of.exports,ld=Wu;Bi.createRoot=ld.createRoot,Bi.hydrateRoot=ld.hydrateRoot;const Ry="modulepreload",Py=function(e){return"/panel/"+e},sd={},_y=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=Py(u),u in sd)return;sd[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":Ry,c||(p.as="script"),p.crossOrigin="",p.href=u,a&&p.setAttribute("nonce",a),document.head.appendChild(p),c)return new Promise((d,m)=>{p.addEventListener("load",d),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&l(a.reason);return t().catch(l)})},Bu=["none","2xs","xs","sm","md","lg","xl","2xl"],sh=["none","2xs","xs","sm"],$a=["0","1","2","4","8"],Vu=["none","2xs","xs","sm","md","lg"],xs=new Set(Bu),vs=new Set(sh),Qr=new Set($a),bs=new Set(Vu),Iy=["text-xs","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],Ay=["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black"],Ly=["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"],Oy=["tracking-tighter","tracking-tight","tracking-normal","tracking-wide","tracking-wider","tracking-widest"],Dy=Array.from({length:21},(e,t)=>`opacity-${t*5}`),ih=["none","sm","","md","lg","xl","2xl","3xl","full"],Ma=ih.map(e=>e?`rounded-${e}`:"rounded");function $y(e){return ih.map(t=>t?`${e}-${t}`:e)}const ah=["0","","2","3","4","5","6","8","10","12","16","20","24","32","40","48","56","64"],My=["solid","dashed","dotted","double","hidden","none"],za=["0","px","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],zy=["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],Ky=["50","100","200","300","400","500","600","700","800","900","950"];function ee(){return e=>e===""?{props:{}}:null}function Le(e,t){const n=new Set(t);return r=>n.has(r)?{props:{[e]:r}}:null}function mt(e="color"){return t=>t!==""?{props:{[e]:t}}:null}function X(e,t="scale"){return n=>n!==""?{props:{[t]:n,scaleName:e}}:null}const Fy=["t","r","b","l","x","y"],ji=["t","r","b","l","x","y","s","e","bs","be"];function Pe(...e){return t=>{for(const n of e){const r=n(t);if(r)return r}return null}}function F(e,t){return{prefix:e,segment:t}}function Wt(e,t){return t.map(n=>({...n,section:e}))}function Ei(e,t,n=Fy){return[...n.map(o=>({prefix:e+o,segment:t,canonical:e,extraProps:{side:o}})),{prefix:e,segment:t}]}function Hy(e,t){const n=["tl","tr","br","bl"],r=["t","r","b","l"],o=n.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{corner:s}})),l=r.map(s=>({prefix:e+"-"+s,segment:t,canonical:e,extraProps:{side:s}}));return[...o,...l,{prefix:e,segment:Pe(ee(),t)}]}function id(e,t){const n=new Set(t);return{prefix:e,segment:ee(),matches:r=>n.has(r)?{props:{value:r}}:null}}function Wy(e,t){for(const n of t){const{prefix:r,matches:o,segment:l,canonical:s,section:a,extraProps:u}=n;if(o){const p=o(e);if(!p)continue;const d={property:s??r,fullClass:e};if(a&&(d.section=a),u)for(const[m,v]of Object.entries(u))d[m]=v;for(const[m,v]of Object.entries(p.props))d[m]=v;return d}let c;if(e===r)c="";else if(e.startsWith(r+"-"))c=e.slice(r.length+1);else continue;const f=l(c);if(f){const p={property:s??r,fullClass:e};if(a&&(p.section=a),u)for(const[d,m]of Object.entries(u))p[d]=m;for(const[d,m]of Object.entries(f.props))p[d]=m;return p}return{property:s??r,fullClass:e,unknown:!0}}return null}function By(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=[];for(const o of n){const l=Wy(o,t);l&&r.push(l)}return r}const Vy=["solid","dashed","dotted","double","none","hidden"],Uy=["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],Gy=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl","9xl"],Yy=["tighter","tight","normal","wide","wider","widest"],Qy=["left","center","right","justify","start","end"],Xy=["inline-block","inline-grid","inline-flex","inline","flow-root","block","flex","grid","contents","hidden","table-header-group","table-footer-group","table-row-group","table-column-group","table-caption","table-column","table-row","table-cell","table"],Zy=["static","relative","absolute","fixed","sticky"],Jy=["t","tr","r","br","b","bl","l","tl"],qy=["start","end","end-safe","center","center-safe","between","around","evenly","stretch","baseline","normal"],ex=["start","end","end-safe","center","center-safe","baseline","baseline-last","stretch"],tx=["normal","start","end","center","between","around","evenly","baseline","stretch"],nx=["start","end","center","stretch"],rx=["auto","start","end","center","stretch","baseline"],ox=[...Wt("spacing",[...Ei("m",X("spacing"),ji),...Ei("-m",X("spacing"),ji),...Ei("p",X("spacing"),ji),F("gap-x",X("spacing")),F("gap-y",X("spacing")),F("gap",X("spacing")),F("space-x-reverse",ee()),F("space-y-reverse",ee()),F("space-x",X("spacing")),F("space-y",X("spacing"))]),...Wt("sizing",[F("min-w",X("spacing")),F("max-w",X("spacing")),F("min-h",X("spacing")),F("max-h",X("spacing")),F("size",X("spacing")),F("w",X("spacing")),F("h",X("spacing"))]),...Wt("typography",[F("font-sans",ee()),F("font-serif",ee()),F("font-mono",ee()),F("font",Le("scale",Uy)),F("text-shadow",Pe(Le("size",Vu),mt())),F("text",Pe(Le("align",Qy),e=>Gy.includes(e)?{props:{size:e,scaleName:"fontSize"}}:null,mt())),F("leading",Pe(Le("scale",["none"]),X("spacing"))),F("tracking",Le("scale",Yy)),F("italic",ee()),F("not-italic",ee()),F("underline",ee()),F("line-through",ee()),F("overline",ee()),F("no-underline",ee()),F("uppercase",ee()),F("lowercase",ee()),F("capitalize",ee()),F("normal-case",ee()),F("truncate",ee()),F("align-text-top",ee()),F("align-text-bottom",ee()),F("align-baseline",ee()),F("align-top",ee()),F("align-middle",ee()),F("align-bottom",ee()),F("align-sub",ee()),F("align-super",ee())]),...Wt("color",[F("bg-gradient-to",Le("direction",Jy)),F("bg",mt()),F("from",mt()),F("via",mt()),F("to",mt()),F("ring",mt()),F("outline",Pe(Le("style",["solid","dashed","dotted","double","none"]),mt())),F("fill",mt()),F("stroke",mt()),F("decoration",mt())]),...Wt("borders",[{prefix:"border-bs",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"bs"}},{prefix:"border-be",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"be"}},{prefix:"border-x",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"x"}},{prefix:"border-y",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"y"}},{prefix:"border-s",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"s"}},{prefix:"border-e",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"e"}},{prefix:"border-t",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"t"}},{prefix:"border-r",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"r"}},{prefix:"border-b",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"b"}},{prefix:"border-l",segment:Pe(ee(),X("borderWidth")),canonical:"border",extraProps:{side:"l"}},F("border",Pe(ee(),Le("style",Vy),e=>/^\d+$/.test(e)||e==="px"?{props:{scale:e,scaleName:"borderWidth"}}:null,mt())),...Hy("rounded",X("borderRadius"))]),...Wt("effects",[F("opacity",X("opacity")),F("shadow",Le("size",Bu))]),...Wt("layout",[id("display",Xy),id("position",Zy),{prefix:"inset-bs",segment:X("spacing"),canonical:"inset",extraProps:{side:"bs"}},{prefix:"inset-be",segment:X("spacing"),canonical:"inset",extraProps:{side:"be"}},{prefix:"inset-x",segment:X("spacing"),canonical:"inset",extraProps:{side:"x"}},{prefix:"inset-y",segment:X("spacing"),canonical:"inset",extraProps:{side:"y"}},{prefix:"inset-s",segment:X("spacing"),canonical:"inset",extraProps:{side:"s"}},{prefix:"inset-e",segment:X("spacing"),canonical:"inset",extraProps:{side:"e"}},{prefix:"top",segment:X("spacing"),canonical:"inset",extraProps:{side:"top"}},{prefix:"right",segment:X("spacing"),canonical:"inset",extraProps:{side:"right"}},{prefix:"bottom",segment:X("spacing"),canonical:"inset",extraProps:{side:"bottom"}},{prefix:"left",segment:X("spacing"),canonical:"inset",extraProps:{side:"left"}},{prefix:"start",segment:X("spacing"),canonical:"inset",extraProps:{side:"start"}},{prefix:"end",segment:X("spacing"),canonical:"inset",extraProps:{side:"end"}},F("inset",X("spacing")),F("z",X("zIndex"))]),...Wt("flexbox",[F("flex-row-reverse",ee()),F("flex-col-reverse",ee()),F("flex-wrap-reverse",ee()),F("flex-row",ee()),F("flex-col",ee()),F("flex-wrap",ee()),F("flex-nowrap",ee()),F("flex",Pe(ee(),Le("value",["auto","initial","none"]),X("number"))),F("grow",Pe(ee(),X("number"))),F("shrink",Pe(ee(),X("number"))),F("justify-items",Le("value",nx)),F("justify",Le("value",qy)),F("items",Le("value",ex)),F("content",Le("value",tx)),F("self",Le("value",rx)),F("basis",X("spacing")),F("grid-cols",Pe(Le("value",["none","subgrid"]),X("gridCols"))),F("grid-rows",Pe(Le("value",["none","subgrid"]),X("gridRows"))),F("col-span",X("colSpan")),F("row-span",X("rowSpan")),F("order",X("order"))]),...Wt("overflow",[F("overflow-x",Le("value",["auto","hidden","clip","visible","scroll"])),F("overflow-y",Le("value",["auto","hidden","clip","visible","scroll"])),F("overflow",Le("value",["auto","hidden","clip","visible","scroll"]))])];let Ut=null,ws=!1;const Fl=[],Hl=[],Wl=[];function lx(){return window.location.origin.replace(/^http/,"ws")}function uh(){if(Ut)return;const e=lx();Ut=new WebSocket(e),Ut.addEventListener("open",()=>{ws=!0,Sn({type:"REGISTER",role:"panel"});for(const t of Hl)t()}),Ut.addEventListener("close",()=>{ws=!1,Ut=null;for(const t of Wl)t();setTimeout(()=>uh(),3e3)}),Ut.addEventListener("message",t=>{try{const n=JSON.parse(t.data);for(const r of Fl)r(n)}catch(n){console.error("[tw-panel] Failed to parse message:",n)}}),Ut.addEventListener("error",t=>{console.error("[tw-panel] WebSocket error:",t)})}function Sn(e){ws&&Ut&&Ut.send(JSON.stringify(e))}function ue(e,t){Sn({...t,to:e})}function Ss(e){return Fl.push(e),()=>{const t=Fl.indexOf(e);t!==-1&&Fl.splice(t,1)}}function sx(e){return Hl.push(e),()=>{const t=Hl.indexOf(e);t!==-1&&Hl.splice(t,1)}}function ix(e){return Wl.push(e),()=>{const t=Wl.indexOf(e);t!==-1&&Wl.splice(t,1)}}function ax(){return ws}const ch=[{name:"popover",label:"Popover",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"4",y:"4",width:"8",height:"6",rx:"1",fill:"currentColor"})]})},{name:"sidebar",label:"Sidebar",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"9",y:"1",width:"6",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.85"})]})},{name:"modal",label:"Modal",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",fill:"currentColor",opacity:"0.12"}),i.jsx("rect",{x:"3",y:"4",width:"10",height:"8",rx:"1",fill:"currentColor",opacity:"0.9"})]})},{name:"popup",label:"Popup",icon:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("rect",{x:"1",y:"1",width:"14",height:"14",rx:"1.5",stroke:"currentColor",strokeWidth:"1.1",opacity:"0.3"}),i.jsx("rect",{x:"8",y:"8",width:"7",height:"7",rx:"1",fill:"currentColor",opacity:"0.85"})]})}],dh="tw-panel-container";function ux(){try{const e=localStorage.getItem(dh);if(e&&ch.some(t=>t.name===e))return e}catch{}return"popover"}function Cl(){const[e,t]=w.useState(ux),[n,r]=w.useState(!1),o=w.useRef(null);w.useEffect(()=>{function s(a){o.current&&!o.current.contains(a.target)&&r(!1)}return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[]);function l(s){if(s!==e){try{localStorage.setItem(dh,s)}catch{}t(s),ue("overlay",{type:"SWITCH_CONTAINER",container:s})}r(!1)}return i.jsxs("div",{ref:o,className:"relative",children:[i.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.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[i.jsx("rect",{x:".5",y:"1.5",width:"15",height:"13",rx:"1.5",ry:"1.5"}),i.jsx("line",{x1:"8.5",y1:"1.5",x2:"8.5",y2:"14.5"}),i.jsx("line",{x1:"11",y1:"5",x2:"13",y2:"5"}),i.jsx("line",{x1:"11",y1:"8",x2:"13",y2:"8"}),i.jsx("line",{x1:"11",y1:"11",x2:"13",y2:"11"})]})}),n&&i.jsxs("div",{className:"absolute top-[calc(100%+4px)] right-0 bg-bv-surface border border-[#4f4f4f] rounded-lg shadow-[0_4px_16px_rgba(0,0,0,0.25)] p-1.5 flex flex-col gap-px min-w-[148px] z-50",children:[i.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-muted px-2 pt-1 pb-1.5",children:"Container"}),ch.map(s=>i.jsxs("button",{onClick:()=>l(s.name),className:`flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors ${s.name===e?"bg-bv-teal/9 text-bv-teal":"bg-transparent text-bv-text-mid hover:bg-bv-surface hover:text-bv-text"}`,children:[s.icon,s.label]},s.name)),i.jsx("div",{className:"h-px bg-[#4f4f4f] mx-1 my-1"}),i.jsxs("button",{onClick:()=>{r(!1),ue("overlay",{type:"CLOSE_PANEL"})},className:"flex items-center gap-2 px-2 py-1.5 rounded text-[12px] cursor-pointer border-none w-full text-left transition-colors bg-transparent text-red-400 hover:bg-red-500/10 hover:text-red-300",children:[i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[i.jsx("line",{x1:"4",y1:"4",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),i.jsx("line",{x1:"12",y1:"4",x2:"4",y2:"12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"Close panel"]})]})]})}function cx(e){const t={};for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object")continue;const o=r,l=typeof o.control=="string"?o.control:typeof o.control=="object"&&o.control!==null?o.control.type??"text":"text";t[n]={control:l,options:Array.isArray(o.options)?o.options:void 0,description:typeof o.description=="string"?o.description:void 0,defaultValue:o.defaultValue}}return t}function dx(e,t=!0){const[n,r]=w.useState(null),[o,l]=w.useState(!0),[s,a]=w.useState({}),[u,c]=w.useState({}),f=w.useRef(0),p=w.useRef(null),d=w.useRef(!1);return w.useEffect(()=>{var g;if(!t)return;if(e.length===0){l(!1);return}d.current=!1,f.current=0;const m=document.createElement("iframe");Object.assign(m.style,{position:"fixed",left:"-99999px",top:"-99999px",width:"800px",height:"600px",visibility:"hidden",pointerEvents:"none",border:"none"}),p.current=m,document.body.appendChild(m);function v(x){if(x>=e.length){d.current||(d.current=!0,r(e[0]),a({}),c({}),l(!1));return}f.current=x,console.log(`[useStoryProbe] loading iframe: /storybook/iframe.html?id=${e[x].id}`),m.src=`/storybook/iframe.html?id=${e[x].id}&viewMode=story`}let b=null;function S(x){var k,T,E,O;if(d.current)return;let y=x.data;if(typeof y=="string")try{y=JSON.parse(y)}catch{return}const C=e[f.current];if((y==null?void 0:y.key)==="storybook-channel"&&((k=y==null?void 0:y.event)==null?void 0:k.type)==="storyPrepared"&&((O=(E=(T=y==null?void 0:y.event)==null?void 0:T.args)==null?void 0:E[0])==null?void 0:O.id)===(C==null?void 0:C.id)){const I=y.event.args[0].argTypes??{},_=y.event.args[0].initialArgs??y.event.args[0].args??{};if(Object.keys(I).length>0)d.current=!0,r(C),a(cx(I)),c(_),l(!1);else{b&&clearTimeout(b);const z=f.current+1;b=setTimeout(()=>v(z),50)}}}window.addEventListener("message",S);function h(){b&&clearTimeout(b),b=setTimeout(()=>{!d.current&&f.current<e.length&&(v(f.current+1),h())},5e3)}return m.addEventListener("load",()=>{h()}),console.log(`[useStoryProbe] starting probe for ${(g=e[0])==null?void 0:g.id} (${e.length} stories)`),v(0),()=>{d.current=!0,window.removeEventListener("message",S),b&&clearTimeout(b),m.remove(),p.current=null}},[e,t]),{bestStory:n,probing:o,argTypes:s,defaultArgs:u}}let fx=2,ks=0;const fh=[];function px(){return new Promise(e=>{const t=()=>{ks<fx?(ks++,e(hx)):fh.push(t)};t()})}function hx(){ks=Math.max(0,ks-1);const e=fh.shift();e==null||e()}function mx(e){const[t,n]=w.useState(!1),r=w.useRef(null),o=w.useRef(!1);w.useEffect(()=>{if(!e||o.current)return;o.current=!0;let s=!1;return px().then(a=>{if(s){a();return}r.current=a,n(!0)}),()=>{s=!0,r.current&&(r.current(),r.current=null)}},[e]);const l=w.useCallback(()=>{r.current&&(r.current(),r.current=null)},[]);return{canLoad:t,releaseSlot:l}}function gx(e,t={},n="/storybook"){const r=`${n}/iframe.html?id=${encodeURIComponent(e)}&viewMode=story`,o=Object.entries(t).filter(([,s])=>s!=null);if(o.length===0)return r;const l=o.map(([s,a])=>`${encodeURIComponent(s)}:${encodeURIComponent(String(a))}`).join(";");return`${r}&args=${l}`}function yx({argTypes:e,args:t,onArgsChange:n}){const r=Object.entries(e);if(r.length===0)return null;function o(l,s){n({...t,[l]:s})}return i.jsx("div",{className:"flex flex-col gap-1.5 px-1",children:r.map(([l,s])=>i.jsx(xx,{name:l,argType:s,value:t[l],onChange:a=>o(l,a)},l))})}function xx({name:e,argType:t,value:n,onChange:r}){const o=typeof t.control=="string"?t.control:typeof t.control=="object"&&t.control!==null?t.control.type??"text":"text";return i.jsxs("label",{className:"flex items-center gap-2 text-[10px]",children:[i.jsx("span",{className:"text-bv-text-mid font-mono min-w-[60px] shrink-0",children:e}),o==="select"&&t.options?i.jsx("select",{className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value),children:t.options.map(l=>i.jsx("option",{value:l,children:l},l))}):o==="boolean"?i.jsx("input",{type:"checkbox",checked:!!n,onChange:l=>r(l.target.checked),className:"accent-bv-teal"}):o==="number"?i.jsx("input",{type:"number",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:n!=null?String(n):"",onChange:l=>r(l.target.value===""?void 0:Number(l.target.value))}):i.jsx("input",{type:"text",className:"flex-1 bg-bv-surface border border-bv-border rounded px-1.5 py-0.5 text-[10px] text-bv-text",value:String(n??""),onChange:l=>r(l.target.value)})]})}const vx=["color","font-family","font-size","font-weight","font-style","line-height","background-color","background-image","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","padding-top","padding-right","padding-bottom","padding-left","margin-top","margin-right","margin-bottom","margin-left","display","flex-direction","flex-wrap","align-items","justify-content","align-content","gap","row-gap","column-gap","box-shadow","text-decoration","text-transform","letter-spacing","text-align","opacity","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color"],bx=new Set(["color","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-transform","text-decoration"]);function wx(e){const t=e.ownerDocument.defaultView??window,n=e.ownerDocument,r=t.getComputedStyle(e),o=n.createElement(e.tagName.toLowerCase());o.style.position="absolute",o.style.visibility="hidden",o.style.pointerEvents="none",(n.body??n.documentElement).appendChild(o);const l=t.getComputedStyle(o),s={};for(let a=0;a<r.length;a++){const u=r[a],c=r.getPropertyValue(u);(bx.has(u)||c!==l.getPropertyValue(u))&&(s[u]=c)}return o.remove(),s}function Sx(e,t,n){for(const[r,o]of Object.entries(t))if(!(r==="height"||r==="block-size")){if((r==="width"||r==="inline-size")&&n!=null){const l=parseFloat(o);if(!isNaN(l)&&Math.abs(l-n)<1)continue}r==="perspective-origin"||r==="transform-origin"||e.style.setProperty(r,o)}}const kx=new Set(["width","height","inline-size","block-size","perspective-origin","transform-origin"]);function Cx(e,t){if(!e||!t)return;const n=e.ownerDocument.defaultView??window,r=e.ownerDocument,o=r.body??r.documentElement,l=new Map;function s(u){let c=l.get(u);if(c)return c;const f=r.createElement(u);f.style.position="absolute",f.style.visibility="hidden",f.style.pointerEvents="none",o.appendChild(f);const p=n.getComputedStyle(f);c=new Map;for(let d=0;d<p.length;d++){const m=p[d];c.set(m,p.getPropertyValue(m))}return f.remove(),l.set(u,c),c}function a(u,c){const f=n.getComputedStyle(u),p=c;if(p.style){const b=s(u.tagName.toLowerCase());for(let S=0;S<f.length;S++){const h=f[S];if(kx.has(h))continue;const g=f.getPropertyValue(h);g!==(b.get(h)??"")&&p.style.setProperty(h,g)}}const d=u.children,m=c.children,v=Math.min(d.length,m.length);for(let b=0;b<v;b++)a(d[b],m[b])}a(e,t)}const ph=vx;function hh(e,t){const n=e.children,r=t.children,o=Math.min(n.length,r.length);for(let l=0;l<o;l++){const s=n[l],a=r[l],u=(s.ownerDocument.defaultView??window).getComputedStyle(s);if(a.style)for(const c of ph)a.style.setProperty(c,u.getPropertyValue(c));hh(s,a)}}const Yt=class Yt extends HTMLElement{constructor(){super();tt(this,"shadow");tt(this,"ghostEl");tt(this,"hiddenIframe");tt(this,"loadTimeoutId",null);tt(this,"hasLoaded",!1);tt(this,"_loadedDispatched",!1);tt(this,"_loggedOnce",new Set);tt(this,"observer",null);tt(this,"_error",null);this.shadow=this.attachShadow({mode:"open"}),this.ghostEl=document.createElement("div"),this.ghostEl.setAttribute("part","ghost"),this.ghostEl.style.display="contents";const n=document.createElement("style");n.textContent=`
41
- iframe {
42
- position: absolute; inset: 0;
43
- width: 100%; height: 100%;
44
- border: none;
45
- opacity: 0;
46
- transition: opacity 0.2s ease-in;
47
- pointer-events: none;
48
- }
49
- iframe.visible {
50
- opacity: 1;
51
- pointer-events: auto;
52
- }
53
- `,this.shadow.append(n,this.ghostEl),this.hiddenIframe=document.createElement("iframe"),Object.assign(this.hiddenIframe.style,{position:"fixed",left:"0",top:"0",width:"800px",height:"600px",opacity:"0",pointerEvents:"none",border:"none",zIndex:"-999999"}),this.hiddenIframe.addEventListener("load",()=>this.onIframeLoad()),this.hiddenIframe.addEventListener("error",()=>this.reportError("Failed to load iframe"))}connectedCallback(){document.body.appendChild(this.hiddenIframe),this.syncIframeWidth(),this.triggerLoad()}disconnectedCallback(){var n;(n=this.observer)==null||n.disconnect(),this.observer=null,this.hiddenIframe.remove()}attributeChangedCallback(){this.isConnected&&(this.syncIframeWidth(),this.triggerLoad())}syncIframeWidth(){const n=this.clientWidth;n>0&&(this.hiddenIframe.style.width=n+"px")}triggerLoad(){var o;(o=this.observer)==null||o.disconnect(),this.observer=null,this.loadTimeoutId&&clearTimeout(this.loadTimeoutId),this.hasLoaded=!1,this._loadedDispatched=!1,this._loggedOnce.clear();const n=this.getAttribute("src"),r=this.getAttribute("srcdoc");r!=null?this.hiddenIframe.srcdoc=r:n&&(this.hiddenIframe.src=n),this.loadTimeoutId=setTimeout(()=>{if(!this.hasLoaded){const l=this.getAttribute("src");this.reportError(`Story failed to load (${l||"unknown"}) — check that Storybook is running on port 6006+`)}},2e4)}onIframeLoad(){var s;this.loadTimeoutId&&(clearTimeout(this.loadTimeoutId),this.loadTimeoutId=null),this.hasLoaded=!0;const n=this.getAttribute("src");console.log(`[AdaptiveIframe] iframe loaded — src=${n}`);const r=this.hiddenIframe.contentDocument;if(!r){console.warn("[AdaptiveIframe] iframe loaded but contentDocument is null");return}const o=r.createElement("style");if(o.textContent="body,html{margin:0!important;padding:0!important}",r.head.appendChild(o),this.getAttribute("srcdoc")!=null){this.extractAndApply(r);return}console.log(`[AdaptiveIframe] waiting for story content — #storybook-root=${!!r.querySelector("#storybook-root")}, bodyChildren=${(s=r.body)==null?void 0:s.childElementCount}`),this.waitForStoryContent(r)}updateArgs(n,r){const o=this.hiddenIframe.contentWindow;o&&(o.postMessage(JSON.stringify({key:"storybook-channel",event:{type:"updateStoryArgs",args:[{storyId:n,updatedArgs:r}]}}),"*"),setTimeout(()=>{const l=this.hiddenIframe.contentDocument;l&&this.extractAndApply(l)},300))}waitForStoryContent(n){var f;(f=this.observer)==null||f.disconnect();let r=!1,o=0;const l=20,s=()=>this.findStoryRoot(n)?(r=!0,this.extractAndApply(n),this.observer&&(this.observer.disconnect(),this.observer=null),!0):!1;if(s())return;const a=n.querySelector("#storybook-root"),u=a??n.body;if(!u)return;const c=new MutationObserver(()=>{if(!r){if(o++,s())return;o>=l&&(c.disconnect(),this.observer=null,console.error(`[AdaptiveIframe] gave up after ${o} mutations — story never appeared. src=${this.getAttribute("src")}`),this.reportError("Story did not render — component may not exist or Storybook story file has an error"))}});this.observer=c,c.observe(u,{childList:!0,subtree:!0,characterData:!0}),a&&n.body&&a!==n.body&&c.observe(n.body,{childList:!0}),setTimeout(()=>{!r&&this.observer===c&&(this.observer.disconnect(),this.observer=null,console.error(`[AdaptiveIframe] 20s timeout — story never rendered. src=${this.getAttribute("src")}`),this.reportError("Story did not render — component may not exist or Storybook story file has an error"))},2e4)}findStoryRoot(n){const r=n.querySelector("#storybook-root");if(r){const o=Array.from(r.children).map((a,u)=>`[${u}] <${a.tagName.toLowerCase()} id="${a.id}" class="${(a.className||"").toString().slice(0,50)}">`).join(`
54
- `);this.logOnce("children",`[AdaptiveIframe] findStoryRoot — #storybook-root has ${r.children.length} children:
55
- ${o}`);for(const a of r.children)if(!a.classList.contains("sb-loader")&&!(a.id&&(a.id.startsWith("storybook-")||a.id.startsWith("sb-"))))return this.logOnce("root",`[AdaptiveIframe] SELECTED story root: <${a.tagName.toLowerCase()} id="${a.id}" class="${(a.className||"").toString().slice(0,80)}">`),a;this.logOnce("no-root-filtered",`[AdaptiveIframe] NO story root found after filtering ${r.children.length} children`);const l=this.findPortalContent(n);if(l)return this.logOnce("portal",`[AdaptiveIframe] found portal content: <${l.tagName.toLowerCase()} id="${l.id}">`),l;const s=Array.from(n.body.children).map(a=>`<${a.tagName.toLowerCase()} id="${a.id}" class="${a.className}">`);return this.logOnce("no-root",`[AdaptiveIframe] #storybook-root empty, no portals. body: ${s.join(", ")}`),null}return this.logOnce("no-sb-root","[AdaptiveIframe] no #storybook-root, falling back to body.firstElementChild"),n.body.firstElementChild}logOnce(n,r){this._loggedOnce.has(n)||(this._loggedOnce.add(n),console.log(r))}findPortalContent(n){var o;const r=n.defaultView??window;for(const l of n.body.children)if(!Yt.INFRA_TAGS.has(l.tagName)&&!(l.id&&Yt.INFRA_IDS.has(l.id))&&!(l.id&&(l.id.startsWith("storybook-")||l.id.startsWith("sb-")))&&!(l.className&&typeof l.className=="string"&&l.className.split(/\s+/).some(a=>Yt.INFRA_CLASS_PREFIXES.some(u=>a.startsWith(u))))){if(l instanceof HTMLElement){const s=r.getComputedStyle(l);if(s.display==="none"||s.visibility==="hidden")continue}if(!(!l.children.length&&!((o=l.textContent)!=null&&o.trim())))return l}return null}getComponentHtml(){const n=this.hiddenIframe.contentDocument;if(!n)return"";const r=this.findStoryRoot(n);if(!r)return this.ghostEl.innerHTML;const o=r.cloneNode(!0),l=getComputedStyle(r);for(const s of ph)o.style.setProperty(s,l.getPropertyValue(s));return hh(r,o),o.outerHTML}extractAndApply(n){const r=this.findStoryRoot(n);if(r&&r.ownerDocument.defaultView,!r)return;this.logOnce("extract",`[AdaptiveIframe] extractAndApply: root=<${r.tagName.toLowerCase()}>, src=${this.getAttribute("src")}`);const o=wx(r);if(o.position==="fixed"||o.position==="absolute"){const f=["position","left","right","top","bottom","inset","inset-block","inset-block-start","inset-block-end","inset-inline","inset-inline-start","inset-inline-end","transform","translate","z-index","opacity","animation","animation-name","animation-duration","animation-delay","animation-fill-mode","animation-timing-function","transition","transition-property","transition-duration","transition-delay","transition-timing-function"];for(const p of f)delete o[p]}Sx(this,o,parseInt(this.hiddenIframe.style.width)||800),this.ghostEl.innerHTML=r.innerHTML;const l=r.children,s=this.ghostEl.children,a=Math.min(l.length,s.length);for(let f=0;f<a;f++)Cx(l[f],s[f]);this._loadedDispatched||(this._loadedDispatched=!0,this.dispatchEvent(new CustomEvent("iframe-loaded")));const u=this.getComponentHtml(),c=getComputedStyle(n.body).backgroundColor;this.dispatchEvent(new CustomEvent("ghost-extracted",{detail:{ghostHtml:u,hostStyles:o,storyBackground:c}}))}reportError(n){this._error=n,console.error(`[AdaptiveIframe] ${n}`),this.dispatchEvent(new CustomEvent("iframe-error",{detail:{message:n}}))}getError(){return this._error}clearError(){this._error=null}};tt(Yt,"observedAttributes",["src","srcdoc"]),tt(Yt,"INFRA_TAGS",new Set(["SCRIPT","STYLE","LINK","META","NOSCRIPT"])),tt(Yt,"INFRA_IDS",new Set(["storybook-root","storybook-docs","sb-addons-root"])),tt(Yt,"INFRA_CLASS_PREFIXES",["sb-"]);let Ka=Yt;customElements.get("adaptive-iframe")||customElements.define("adaptive-iframe",Ka);function jx({phase:e,isArmed:t,error:n,cachedGhostHtml:r,liveReady:o,probing:l,bestStory:s,storyBackground:a,ghostRef:u}){const c=e!=="idle",f=c&&!n&&r&&!o,p=c&&!n&&!r&&!o&&(l||!!s),d=c&&!n&&!l&&s,m=c&&!n&&!l&&!s&&!r;return i.jsxs("div",{className:`flex items-center justify-center min-h-14 overflow-hidden ${t?"bg-[rgba(0,132,139,0.06)]":""}`,style:!t&&a?{backgroundColor:a}:void 0,children:[!c&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:" "}),c&&n&&i.jsx("span",{className:"text-[10px] text-bv-orange px-2 py-1 text-center leading-tight",children:n}),p&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:"Loading preview…"}),f&&i.jsx("div",{className:"pointer-events-none",dangerouslySetInnerHTML:{__html:r}}),d&&i.jsx("adaptive-iframe",{ref:u,style:{pointerEvents:"none"}}),m&&i.jsx("span",{className:"text-[10px] text-bv-muted",children:"No stories found."})]})}function Ex({isArmed:e,group:t,hasArgs:n,showProps:r,onToggleProps:o}){return i.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-t border-bv-border bg-bv-bg",children:[e?i.jsx("span",{className:"text-[11px] font-medium text-bv-teal",children:"Click the page to place"}):t.stories[0]?i.jsx("a",{href:`/storybook/?path=/story/${t.stories[0].id}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-bv-text hover:text-bv-orange hover:underline transition-colors",onClick:l=>{l.stopPropagation()},children:i.jsx(ad,{fullTitle:t.fullTitle})}):i.jsx("span",{className:"text-[11px] text-bv-text",children:i.jsx(ad,{fullTitle:t.fullTitle})}),n&&i.jsx("button",{className:`w-5.5 h-5.5 rounded flex items-center justify-center transition-colors opacity-0 group-hover:opacity-100 ${r?"opacity-100 bg-bv-surface-hi text-bv-text":"text-bv-muted hover:bg-bv-surface-hi hover:text-bv-text"}`,title:"Customize props",onClick:l=>{l.stopPropagation(),o()},children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[i.jsx("circle",{cx:"12",cy:"12",r:"3"}),i.jsx("path",{d:"M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.72 12.72 1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]})})]})}function ad({fullTitle:e}){const t=e.split("/");if(t.length===1)return i.jsx("span",{className:"font-semibold",children:t[0]});const n=t.slice(0,-1),r=t.at(-1);return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-bv-muted font-normal",children:n.join(" / ")}),i.jsx("span",{className:"text-bv-muted font-normal",children:" / "}),i.jsx("span",{className:"font-semibold",children:r})]})}const Tx={phase:"idle",bestStory:null,argTypes:{},defaultArgs:{},args:{},liveReady:!1,storyBackground:void 0,error:null,pendingArgs:null,loadLiveRequested:!1};function Nx(e,t){switch(t.type){case"BECOME_VISIBLE":return e.phase!=="idle"?e:{...e,phase:t.hasCachedGhost?"cached":"probing"};case"PROBE_COMPLETE":return e.phase!=="probing"&&e.phase!=="cached"?e:{...e,phase:"probe-done",bestStory:t.bestStory,argTypes:t.argTypes,defaultArgs:t.defaultArgs,args:t.defaultArgs};case"PROBE_FALLBACK":return e.phase!=="probing"&&e.phase!=="cached"?e:{...e,phase:"probe-done",bestStory:t.bestStory};case"SLOT_ACQUIRED":return e.phase!=="probe-done"?e:{...e,phase:"loading"};case"IFRAME_LOADED":return e.phase!=="loading"?e:{...e,phase:"ready",liveReady:!0};case"IFRAME_ERROR":return e.phase!=="loading"?e:{...e,phase:"error",error:t.message};case"GHOST_EXTRACTED":return e.phase!=="ready"&&e.phase!=="loading"?e:{...e,storyBackground:t.storyBackground??e.storyBackground};case"ARGS_CHANGED":return e.liveReady?{...e,args:t.args}:{...e,args:t.args,pendingArgs:t.args};case"CLEAR_PENDING_ARGS":return{...e,pendingArgs:null};case"REQUEST_LIVE_REFRESH":return e.phase==="cached"?{...e,phase:"probing",loadLiveRequested:!0}:e.phase==="error"?{...e,phase:"probing",error:null,loadLiveRequested:!0}:{...e,loadLiveRequested:!0}}return e}function Rx({group:e,isArmed:t,onArm:n,onDisarm:r,cachedGhostHtml:o,cachedHostStyles:l,cachedStoryBackground:s,onGhostExtracted:a}){const[u,c]=w.useReducer(Nx,{...Tx,storyBackground:s}),f=w.useRef(null),p=w.useRef(null),d=w.useRef(!1),[m,v]=w.useState(!1);w.useEffect(()=>{const _=f.current;if(!_)return;const z=new IntersectionObserver(([H])=>{H.isIntersecting&&(c({type:"BECOME_VISIBLE",hasCachedGhost:!!o}),z.disconnect())},{rootMargin:"200px"});return z.observe(_),()=>z.disconnect()},[o]);const b=u.phase!=="idle"&&(u.phase==="probing"||!o||m||u.loadLiveRequested),{bestStory:S,probing:h,argTypes:g,defaultArgs:x}=dx(e.stories,b);w.useEffect(()=>{!h&&S&&(u.phase==="probing"||u.phase==="cached")&&(Object.keys(g).length>0?c({type:"PROBE_COMPLETE",bestStory:S,argTypes:g,defaultArgs:x}):c({type:"PROBE_FALLBACK",bestStory:S}))},[h,S,g,x,u.phase]);const y=u.phase==="probe-done"&&!!u.bestStory&&(!o||u.loadLiveRequested),{canLoad:C,releaseSlot:k}=mx(y);w.useEffect(()=>{C&&u.phase==="probe-done"&&c({type:"SLOT_ACQUIRED"})},[C,u.phase]),w.useEffect(()=>{u.phase!=="loading"||!u.bestStory||!p.current||d.current||(d.current=!0,p.current.setAttribute("src",gx(u.bestStory.id,{})))},[u.phase,u.bestStory]),w.useEffect(()=>{const _=p.current;if(!(_!=null&&_.addEventListener))return;const z=()=>{c({type:"IFRAME_LOADED"}),k(),u.pendingArgs&&u.bestStory&&(typeof _.updateArgs=="function"&&_.updateArgs(u.bestStory.id,u.pendingArgs),c({type:"CLEAR_PENDING_ARGS"}))},H=U=>{const Q=U.detail.message;c({type:"IFRAME_ERROR",message:Q}),k()},L=U=>{const{ghostHtml:Q,hostStyles:J,storyBackground:j}=U.detail;j&&c({type:"GHOST_EXTRACTED",storyBackground:j}),u.bestStory&&(a==null||a({storyId:u.bestStory.id,args:{},ghostHtml:Q,hostStyles:J,storyBackground:j,componentName:e.name,componentPath:e.componentPath}))};return _.addEventListener("iframe-loaded",z),_.addEventListener("iframe-error",H),_.addEventListener("ghost-extracted",L),()=>{_.removeEventListener("iframe-loaded",z),_.removeEventListener("iframe-error",H),_.removeEventListener("ghost-extracted",L)}},[u.bestStory,u.pendingArgs,k,e.name,e.componentPath,a]);const T=w.useCallback(_=>{if(c({type:"ARGS_CHANGED",args:_}),!u.liveReady||!p.current||!u.bestStory){c({type:"REQUEST_LIVE_REFRESH"});return}const z=p.current;typeof z.updateArgs=="function"&&z.updateArgs(u.bestStory.id,_)},[u.bestStory,u.liveReady]),E=w.useCallback(_=>{var L;if(_.stopPropagation(),t){r();return}const z=p.current,H=((L=z==null?void 0:z.getComponentHtml)==null?void 0:L.call(z))??o??"";n(H,u.args),c({type:"REQUEST_LIVE_REFRESH"}),a&&H&&u.bestStory&&a({storyId:u.bestStory.id,args:u.args,ghostHtml:H,hostStyles:l??{},storyBackground:u.storyBackground,componentName:e.name,componentPath:e.componentPath})},[t,n,r,u.args,u.bestStory,u.storyBackground,o,l,e.name,e.componentPath,a]),O=Object.keys(u.argTypes).length>0?u.argTypes:e.argTypes??{},I=Object.keys(O).length>0||!!o;return i.jsxs("li",{ref:f,className:`group rounded border overflow-hidden cursor-pointer transition-[border-color,box-shadow] ${t?"border-bv-teal shadow-[0_0_0_2px_var(--color-bv-teal),0_0_12px_rgba(0,132,139,0.2)]":"border-bv-border hover:border-[#555]"}`,onClick:E,children:[i.jsx(jx,{phase:u.phase,isArmed:t,error:u.error,cachedGhostHtml:o,liveReady:u.liveReady,probing:h&&b,bestStory:u.bestStory??S,storyBackground:u.storyBackground,ghostRef:p}),i.jsx(Ex,{isArmed:t,group:e,hasArgs:I,showProps:m,onToggleProps:()=>v(_=>!_)}),m&&I&&i.jsxs("div",{className:"px-2.5 py-2 border-t border-bv-border bg-bv-surface",onClick:_=>_.stopPropagation(),children:[i.jsx("div",{className:"text-[9px] font-semibold uppercase tracking-wider text-bv-muted mb-1.5",children:"Props"}),i.jsx(yx,{argTypes:O,args:u.args,onArgsChange:T})]})]})}function mh(e){return!e||Object.keys(e).length===0?"":JSON.stringify(e,Object.keys(e).sort())}function ud(e,t){const n=mh(t);return n?`${e}::${n}`:e}function Px(){const[e,t]=w.useState(!1),n=w.useRef(new Map);w.useEffect(()=>{let l=!1;return fetch("/api/ghost-cache").then(s=>s.json()).then(s=>{if(l)return;const a=new Map;for(const u of s){const c=u.argsHash?`${u.storyId}::${u.argsHash}`:u.storyId;a.set(c,u)}n.current=a,t(!0)}).catch(()=>{l||t(!0)}),()=>{l=!0}},[]);const r=w.useCallback((l,s)=>{const a=ud(l,s),u=n.current.get(a);return u?{ghostHtml:u.ghostHtml,hostStyles:u.hostStyles,storyBackground:u.storyBackground}:null},[]),o=w.useCallback(l=>{const s=ud(l.storyId,l.args),a=n.current.has(s);n.current.set(s,{storyId:l.storyId,argsHash:mh(l.args),ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath,extractedAt:Date.now()}),!a&&fetch("/api/ghost-cache",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storyId:l.storyId,args:l.args,ghostHtml:l.ghostHtml,hostStyles:l.hostStyles,storyBackground:l.storyBackground,componentName:l.componentName,componentPath:l.componentPath})}).catch(()=>{})},[]);return{getCachedGhost:r,submitToCache:o,loaded:e}}function jl({insertMode:e}={}){const{groups:t,loading:n,error:r,refetch:o}=Ix(),[l,s]=w.useState(null),[a,u]=w.useState(!1),{getCachedGhost:c,submitToCache:f}=Px(),p=w.useCallback((m,v,b)=>{var S;s(m.name),ue("overlay",{type:"COMPONENT_ARM",componentName:m.name,storyId:((S=m.stories[0])==null?void 0:S.id)??"",ghostHtml:v,componentPath:m.componentPath,args:b,insertMode:e==="replace"?"replace":void 0})},[e]),d=w.useCallback(()=>{s(null),ue("overlay",{type:"COMPONENT_DISARM"})},[]);return w.useEffect(()=>Ss(m=>{m.type==="COMPONENT_DISARMED"&&(s(null),u(!1))}),[]),w.useEffect(()=>{if(!l&&!a)return;const m=()=>{s(null),u(!1),ue("overlay",{type:"COMPONENT_DISARM"})};return document.addEventListener("click",m),()=>document.removeEventListener("click",m)},[l,a]),i.jsxs("div",{className:"p-3 flex flex-col gap-3",children:[i.jsxs("button",{type:"button",onClick:m=>{if(m.stopPropagation(),a){u(!1),ue("overlay",{type:"COMPONENT_DISARM"});return}u(!0),ue("overlay",{type:"INSERT_DESIGN_CANVAS",insertMode:e==="replace"?"replace":"after"})},className:`flex items-center gap-2.5 px-3 py-2 rounded-md border transition-all cursor-pointer text-left ${a?"border-bv-teal bg-bv-teal/10 ring-1 ring-bv-teal":"border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5"}`,children:[i.jsx("div",{className:"w-8 h-8 rounded bg-bv-teal/10 text-bv-teal flex items-center justify-center shrink-0",children:i.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M15 1H1v14h14V1ZM0 0h16v16H0V0Z"}),i.jsx("path",{d:"M4 8h8M8 4v8",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]})}),i.jsxs("div",{className:"flex flex-col min-w-0",children:[i.jsx("span",{className:"text-[11px] font-medium text-bv-text",children:"Draw / Screenshot Canvas"}),i.jsx("span",{className:"text-[10px] text-bv-muted",children:"Freehand drawing or annotate a screenshot"})]})]}),i.jsxs("div",{className:"flex flex-col gap-1.5",children:[n&&i.jsx("div",{className:"text-[11px] text-bv-muted",children:"Loading components…"}),!n&&r&&i.jsx(_x,{onConnected:o}),!n&&!r&&t.length===0&&i.jsx("div",{className:"text-[11px] text-bv-muted",children:"No stories found."}),!n&&!r&&t.length>0&&i.jsx("ul",{className:"flex flex-col gap-2",children:t.map(m=>{var S;const v=(S=m.stories[0])==null?void 0:S.id,b=v?c(v):null;return i.jsx(Rx,{group:m,isArmed:l===m.name,onArm:(h,g)=>p(m,h,g),onDisarm:d,cachedGhostHtml:b==null?void 0:b.ghostHtml,cachedHostStyles:b==null?void 0:b.hostStyles,cachedStoryBackground:b==null?void 0:b.storyBackground,onGhostExtracted:f},m.name)})})]})]})}function _x({onConnected:e}){const[t,n]=w.useState(""),[r,o]=w.useState(!1),[l,s]=w.useState(!1),a=async u=>{o(!0),s(!1);try{const c=u!=null?{port:u}:{};(await(await fetch("/api/storybook-reconnect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})).json()).ok?e():s(!0)}catch{s(!0)}finally{o(!1)}};return i.jsxs("div",{className:"text-[11px] text-bv-text-mid leading-relaxed flex flex-col gap-2",children:[i.jsx("span",{children:"Storybook not detected."}),i.jsx("button",{onClick:()=>a(),disabled:r,className:"self-start px-2.5 py-1 rounded bg-bv-surface-hi text-bv-text text-[11px] border border-bv-border hover:border-bv-teal disabled:opacity-50 transition-colors",children:r?"Scanning…":"Scan for Storybook"}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"text-bv-muted",children:"or port:"}),i.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:"6006",value:t,onChange:u=>{n(u.target.value),s(!1)},onKeyDown:u=>{u.key==="Enter"&&t&&a(Number(t))},className:"w-16 px-1.5 py-0.5 rounded bg-bv-surface text-bv-text text-[11px] border border-bv-border focus:border-bv-teal outline-none"}),i.jsx("button",{onClick:()=>t&&a(Number(t)),disabled:!t||r,className:"px-2 py-0.5 rounded bg-bv-surface-hi text-bv-text text-[11px] border border-bv-border hover:border-bv-teal disabled:opacity-50 transition-colors",children:"Connect"})]}),l&&i.jsxs("span",{className:"text-bv-orange text-[10px]",children:["No Storybook found",t?` on port ${t}`:"",". Is it running?"]})]})}function Ix(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[o,l]=w.useState(!1),[s,a]=w.useState(0),u=w.useCallback(()=>{r(!0),l(!1),t([]),a(c=>c+1)},[]);return w.useEffect(()=>{let c=!1;return(async()=>{var f,p;try{const d=await fetch("/api/storybook-data").then(v=>v.json());if(!d.available){c||(l(!0),r(!1));return}const m=Object.values(((f=d.index)==null?void 0:f.entries)??((p=d.index)==null?void 0:p.stories)??{});c||t(Ax(m,d.argTypes??{}))}catch{c||l(!0)}finally{c||r(!1)}})(),()=>{c=!0}},[s]),{groups:e,loading:n,error:o,refetch:u}}function Ax(e,t={}){const n=new Map;for(const o of e){if(o.type==="docs"||o.id.endsWith("--docs"))continue;const l=o.title.split("/").at(-1)??o.title;n.has(l)||n.set(l,[]),n.get(l).push(o)}const r=Array.from(n.entries()).map(([o,l])=>{var a,u;const s=new Set;for(const c of l)for(const f of c.tags??[])s.add(f);return{name:o,fullTitle:((a=l[0])==null?void 0:a.title)??o,tags:Array.from(s),stories:l,argTypes:t[o]??Lx(l),componentPath:(u=l[0])==null?void 0:u.componentPath}});return r.sort((o,l)=>{const s=o.tags.includes("design-system")?0:1,a=l.tags.includes("design-system")?0:1;return s!==a?s-a:o.name.localeCompare(l.name)}),r}function Lx(e){const t={};for(const n of e)for(const[r,o]of Object.entries(n.argTypes??{}))r in t||(t[r]=o);return t}const Ti="w-[30px] h-7 rounded-[4px] border-none flex items-center justify-center cursor-pointer transition-all duration-[120ms] ease-out",Ni="bg-[#00464A] text-[#5fd4da] shadow-[0_1px_3px_rgba(0,0,0,0.3)]",Ri="bg-transparent text-[#999] hover:text-[#b3b3b3]";function El({mode:e,onModeChange:t}){return i.jsxs("div",{className:"inline-flex items-center rounded-[6px] bg-[#1a1a1a] p-[2px] gap-[1px]",children:[i.jsx("button",{type:"button",onClick:()=>t("select"),className:`${Ti} ${e==="select"?Ni:Ri}`,"aria-pressed":e==="select",title:"Select an element",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),i.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})}),i.jsx("button",{type:"button",onClick:()=>t("insert"),className:`${Ti} ${e==="insert"?Ni:Ri}`,"aria-pressed":e==="insert",title:"Insert to add content",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"miter",children:[i.jsx("rect",{x:"4",y:"2",width:"16",height:"8",rx:"2"}),i.jsx("path",{d:"m17,14h1c1.105,0,2,.895,2,2"}),i.jsx("path",{d:"m4,16c0-1.105.895-2,2-2h1"}),i.jsx("path",{d:"m7,22h-1c-1.105,0-2-.895-2-2"}),i.jsx("path",{d:"m20,20c0,1.105-.895,2-2,2h-1"}),i.jsx("line",{x1:"13",y1:"14",x2:"11",y2:"14"}),i.jsx("line",{x1:"13",y1:"22",x2:"11",y2:"22"})]})}),i.jsx("button",{type:"button",onClick:()=>t("bug-report"),className:`${Ti} ${e==="bug-report"?Ni:Ri}`,"aria-pressed":e==="bug-report",title:"Report a bug",children:i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,5.5h2.2C3.07,5.01,3,4.51,3,4h0V3.5H1c-.552,0-1,.448-1,1S.448,5.5,1,5.5Z"}),i.jsx("path",{d:"M15,3.5h-2c0,.51-.07,1.01-.2,1.5H15c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,11.5h2.05c.232,.89,.62,1.71,1.13,2.5H1c-.552,0-1-.448-1-1s.448-1,1-1h0Z"}),i.jsx("path",{d:"M15,10.5h-2.05c-.232,.89-.62,1.71-1.13,2.5h3.18c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]})})]})}function Ox(e){var c,f;const n=`<${((c=e.component)==null?void 0:c.name)??"component"}>`,r="insertMode"in e?e.insertMode:void 0,o="targetComponentName"in e&&e.targetComponentName||"parentComponent"in e&&((f=e.parentComponent)==null?void 0:f.name)||null,l=o||e.elementKey||null,s=o?`<${l}>`:l,a="targetPatchId"in e&&!!e.targetPatchId,u=s&&a?`new ${s}`:s;switch(r){case"after":return u?`Appended ${n} after ${u}`:`Appended ${n}`;case"before":return u?`Prepended ${n} before ${u}`:`Prepended ${n}`;case"last-child":return u?`Inserted ${n} bottom of ${u}`:`Inserted ${n}`;case"first-child":return u?`Inserted ${n} top of ${u}`:`Inserted ${n}`;default:return u?`Inserted ${n} in ${u}`:`Inserted ${n}`}}function cd(e,t){const n=e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();return n.length>t?n.slice(0,t)+"…":n}function Tl({label:e,count:t,items:n,activeColor:r,dotColor:o,onCommit:l,onDiscard:s,onCommitAll:a,onDiscardAll:u}){const[c,f]=w.useState(!1),p=w.useRef(null),d=w.useRef(null),[m,v]=w.useState(void 0);w.useEffect(()=>{if(!c||!d.current)return;const g=d.current.getBoundingClientRect(),x=220,y=window.innerWidth,C=4;let k=g.left+g.width/2-x/2;k=Math.max(C,Math.min(k,y-x-C)),v(k-g.left)},[c]),w.useEffect(()=>{if(!c)return;function h(g){p.current&&!p.current.contains(g.target)&&f(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[c]),w.useEffect(()=>{if(!c)return;function h(g){g.key==="Escape"&&f(!1)}return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[c]);const b=t>0,S=l||s||a||u;return i.jsxs("div",{ref:p,className:"relative",children:[i.jsxs("button",{ref:d,className:`flex items-center gap-1 text-[11px] tabular-nums border-none bg-transparent cursor-pointer px-0 py-0 ${b?`${r} font-medium`:"text-bv-muted"} ${b?"hover:underline":""}`,onClick:()=>b&&f(!c),disabled:!b,type:"button",children:[o&&i.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${o}`}),t," ",e]}),c&&i.jsxs("div",{className:"absolute bottom-full mb-1 min-w-[220px] max-w-[calc(100vw-24px)] w-max 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:[i.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,")"]}),i.jsx("div",{className:"flex-1 overflow-auto",children:n.length===0?i.jsx("div",{className:"px-3 py-2 text-[11px] text-bv-muted italic",children:"No patches"}):n.map(h=>{var T,E,O;const g="kind"in h&&h.kind==="message",x="kind"in h&&h.kind==="design",y="kind"in h&&h.kind==="component-drop",C="kind"in h&&h.kind==="text-change",k="kind"in h&&h.kind==="bug-report";return i.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:[i.jsxs("div",{className:"flex-1 min-w-0",children:[!g&&!x&&!y&&!C&&!k&&((T=h.component)==null?void 0:T.name)&&i.jsx("div",{className:"text-[10px] text-bv-muted truncate",children:h.component.name}),k?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{children:"🐛"}),i.jsx("span",{className:"font-semibold",children:"Bug Report"})]}),"bugDescription"in h&&h.bugDescription&&i.jsx("div",{className:"text-[10px] text-bv-muted mt-0.5 whitespace-pre-wrap break-words line-clamp-3",children:h.bugDescription.slice(0,200)})]}):y?i.jsx("div",{className:"text-[11px] text-bv-text truncate",children:Ox(h)}):x?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[i.jsx("span",{children:"✏️"}),i.jsxs("span",{className:"truncate",children:["Drawing",(E=h.component)!=null&&E.name?` in ${h.component.name}`:""]})]}),"image"in h&&h.image&&i.jsx("img",{src:h.image,alt:"Design drawing",className:"max-w-full max-h-16 object-contain rounded border border-bv-border bg-white"})]}):g?i.jsxs("div",{className:"text-[11px] text-bv-text truncate",children:[i.jsx("span",{className:"mr-1",children:"💬"}),'"',"message"in h&&h.message||"",'"']}):C?i.jsxs("div",{className:"text-[11px] text-bv-text",children:[i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{children:"✏️"}),i.jsxs("span",{className:"truncate",children:["Text edit",(O=h.component)!=null&&O.name?` in ${h.component.name}`:""]})]}),"originalHtml"in h&&h.originalHtml&&"newHtml"in h&&h.newHtml&&i.jsxs("div",{className:"mt-0.5 text-[10px] font-mono text-bv-muted break-words",children:[i.jsx("span",{className:"line-through",children:cd(h.originalHtml,30)})," → ",i.jsx("span",{className:"text-bv-teal",children:cd(h.newHtml,30)})]})]}):i.jsx("div",{className:"text-[11px] font-mono text-bv-text truncate",children:h.originalClass?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"line-through text-bv-muted",children:h.originalClass})," → ",i.jsx("span",{className:"text-bv-teal",children:h.newClass})]}):i.jsxs("span",{className:"text-bv-teal",children:["+",h.newClass]})})]}),(l||s)&&i.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[l&&i.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:I=>{I.stopPropagation(),l(h.id)},title:"Commit to Agent",type:"button",children:"✓"}),s&&i.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:I=>{I.stopPropagation(),s(h.id)},title:"Discard",type:"button",children:"✕"})]})]},h.id)})}),S&&n.length>0&&(a||u)&&i.jsxs("div",{className:"flex gap-2 px-3 py-1.5 border-t border-bv-border",children:[a&&i.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:()=>{a(),f(!1)},type:"button",children:"Commit All"}),u&&i.jsx("button",{className:"text-[10px] px-2 py-1 rounded cursor-pointer font-semibold bg-transparent border border-bv-border text-bv-text-mid hover:text-bv-orange hover:border-bv-orange transition-colors",onClick:()=>{u(),f(!1)},type:"button",children:"Discard All"})]})]})]})}function Dx(e){return e==="click"||e==="navigation"||e==="page-load"||e==="error"}function dd(e){const t=[];let n=null;for(const r of e)Dx(r.trigger)?(n={primary:r,secondaries:fd(r),checked:!1},t.push(n)):n?$x(n,r):(n={primary:{...r,trigger:r.trigger},secondaries:fd(r),checked:!1},t.push(n));return t}function fd(e){const t=[];return e.trigger==="mutation"&&t.push({type:"mutations",label:"1 mutation",checked:!0,count:1}),e.isKeyframe&&t.push({type:"screenshot",label:"screenshot",checked:!0}),e.networkErrorCount>0&&t.push({type:"network",label:`${e.networkErrorCount} network error${e.networkErrorCount>1?"s":""}`,checked:!0,count:e.networkErrorCount}),e.consoleErrorCount>0&&t.push({type:"logs",label:`${e.consoleErrorCount} log${e.consoleErrorCount>1?"s":""} (${e.consoleErrorCount} error${e.consoleErrorCount>1?"s":""})`,checked:!0,count:e.consoleErrorCount,errorCount:e.consoleErrorCount}),t}function $x(e,t){const n=e.secondaries.find(r=>r.type==="mutations");if(t.trigger==="mutation"&&(n?(n.count=(n.count??0)+1,n.label=`${n.count} mutation${n.count>1?"s":""}`):e.secondaries.push({type:"mutations",label:"1 mutation",checked:!0,count:1})),t.isKeyframe&&!e.secondaries.some(r=>r.type==="screenshot")&&e.secondaries.push({type:"screenshot",label:"screenshot",checked:!0}),t.networkErrorCount>0){const r=e.secondaries.find(o=>o.type==="network");r?(r.count=(r.count??0)+t.networkErrorCount,r.label=`${r.count} network error${r.count>1?"s":""}`):e.secondaries.push({type:"network",label:`${t.networkErrorCount} network error${t.networkErrorCount>1?"s":""}`,checked:!0,count:t.networkErrorCount})}if(t.consoleErrorCount>0){const r=e.secondaries.find(o=>o.type==="logs");r?(r.count=(r.count??0)+t.consoleErrorCount,r.errorCount=(r.errorCount??0)+t.consoleErrorCount,r.label=`${r.count} log${r.count>1?"s":""} (${r.errorCount} error${r.errorCount>1?"s":""})`):e.secondaries.push({type:"logs",label:`${t.consoleErrorCount} log${t.consoleErrorCount>1?"s":""} (${t.consoleErrorCount} error${t.consoleErrorCount>1?"s":""})`,checked:!0,count:t.consoleErrorCount,errorCount:t.consoleErrorCount})}}function Mx(e,t){const n=(new Date(t).getTime()-new Date(e).getTime())/1e3;if(Math.abs(n)<1)return"0s";const r=Math.round(Math.abs(n));return r>=120?`−${Math.round(r/60)}m`:`−${r}s`}function Pi(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}const pd={click:"bg-[rgba(0,132,139,0.15)] text-[#5fd4da]",navigation:"bg-[rgba(168,85,247,0.12)] text-[#c084fc]","page-load":"bg-[rgba(59,130,246,0.12)] text-[#60a5fa]",error:"bg-[rgba(239,68,68,0.12)] text-[#f87171]",mutation:"bg-[rgba(255,255,255,0.06)] text-[#999]"};function zx({trigger:e}){const t=pd[e]??pd.mutation;return i.jsx("span",{className:`text-[9px] px-1.5 rounded-[3px] font-semibold tracking-[0.2px] mr-1.5 shrink-0 leading-[1.4] ${t}`,children:e})}function Kx({checked:e,onChange:t}){return i.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),t()},className:`w-4 h-4 rounded-[3px] border-[1.5px] flex items-center justify-center shrink-0 cursor-pointer transition-all duration-[120ms] mr-2 ${e?"border-[#00848B] bg-[rgba(0,132,139,0.12)] text-[#00848B]":"border-[#666] bg-transparent text-transparent"}`,children:e&&i.jsx("span",{className:"text-[9px]",children:"✓"})})}function Fx({checked:e,visible:t,onChange:n}){return t?i.jsx("button",{type:"button",onClick:r=>{r.stopPropagation(),n()},className:`w-3.5 h-3.5 rounded-[3px] border-[1.5px] flex items-center justify-center shrink-0 cursor-pointer transition-all duration-[120ms] mr-1.5 ${e?"border-[#00848B] bg-[rgba(0,132,139,0.12)] text-[#00848B]":"border-[#666] bg-transparent text-transparent"}`,children:e&&i.jsx("span",{className:"text-[8px]",children:"✓"})}):i.jsx("div",{className:"w-3.5 h-3.5 mr-1.5 shrink-0"})}function Hx({onSubmit:e}){const[t,n]=w.useState([]),[r,o]=w.useState(""),[l,s]=w.useState(null),[a,u]=w.useState(!1),[c,f]=w.useState(!1),p=w.useRef(null),d=w.useRef(null);w.useEffect(()=>(ue("overlay",{type:"RECORDING_GET_HISTORY"}),Ss(C=>{if(C.type==="RECORDING_HISTORY"){const k=dd(C.snapshots),T=Math.max(0,k.length-3);for(let E=T;E<k.length;E++)k[E].checked=!0;n(k)}else C.type==="RECORDING_SNAPSHOT_META"?n(k=>{const T=Wx(k);return T.push(C.meta),dd(T)}):C.type==="BUG_REPORT_ELEMENT_PICKED"?(s(C.element),u(!1)):C.type==="BUG_REPORT_PICK_CANCELLED"&&u(!1)})),[]),w.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[t.length]);const m=w.useCallback((y,C)=>{n(k=>{const T=k.map(E=>({...E,secondaries:E.secondaries.map(O=>({...O}))}));if(C&&d.current!==null){const E=Math.min(d.current,y),O=Math.max(d.current,y);for(let I=E;I<=O;I++)T[I].checked=!0,T[I].secondaries.forEach(_=>{_.checked=!0})}else T[y].checked=!T[y].checked,T[y].checked&&T[y].secondaries.forEach(E=>{E.checked=!0});return d.current=y,T})},[]),v=w.useCallback((y,C)=>{n(k=>{const T=k.map(E=>({...E,secondaries:E.secondaries.map(O=>({...O}))}));return T[y].secondaries[C].checked=!T[y].secondaries[C].checked,T})},[]),b=()=>{a?(ue("overlay",{type:"BUG_REPORT_PICK_CANCELLED"}),u(!1)):(ue("overlay",{type:"BUG_REPORT_PICK_ELEMENT"}),u(!0))},S=t.filter(y=>y.checked).length,h=S>0&&r.trim().length>0&&!c,g=async()=>{var U,Q,J;if(!h)return;f(!0);const y=t.filter(j=>j.checked).map(j=>j.primary.id);ue("overlay",{type:"RECORDING_GET_RANGE",ids:y});const k=await new Promise(j=>{const R=Ss(P=>{P.type==="RECORDING_RANGE"&&(R(),j(P.snapshots))});setTimeout(()=>{R(),j([])},1e4)}),T=t.filter(j=>j.checked),E=T.some(j=>j.secondaries.some(R=>R.type==="screenshot"&&R.checked)),O=T.some(j=>j.secondaries.some(R=>R.type==="logs"&&R.checked)),I=T.some(j=>j.secondaries.some(R=>R.type==="network"&&R.checked)),_=[],z=[];for(const j of k){const R={timestamp:j.timestamp,trigger:j.trigger,url:j.url};O&&((U=j.consoleLogs)!=null&&U.length)&&(R.consoleLogs=j.consoleLogs),I&&((Q=j.networkErrors)!=null&&Q.length)&&(R.networkErrors=j.networkErrors),j.domSnapshot&&(R.domSnapshot=j.domSnapshot.slice(0,5e4)),j.domDiff&&(R.domDiff=j.domDiff.slice(0,1e4)),(J=j.domChanges)!=null&&J.length&&(R.domChanges=j.domChanges),E&&j.screenshot&&(z.push(j.screenshot),R.hasScreenshot=!0),j.elementInfo&&(R.elementInfo=j.elementInfo),j.navigationInfo&&(R.navigationInfo=j.navigationInfo),_.push(R)}const H=T.map(j=>j.primary.timestamp),L={start:H[0]??new Date().toISOString(),end:H[H.length-1]??new Date().toISOString()};e({bugDescription:r.trim(),bugScreenshots:E?z.slice(0,5):[],bugTimeline:_,bugTimeRange:L,bugElement:l}),o(""),s(null),n(j=>j.map(R=>({...R,checked:!1,secondaries:R.secondaries.map(P=>({...P,checked:!0}))}))),f(!1)},x=t.length>0?t[t.length-1].primary.timestamp:new Date().toISOString();return i.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[i.jsx("div",{ref:p,className:"flex-1 overflow-y-auto border-b border-bv-border",children:t.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 p-8 text-center",children:[i.jsx("div",{className:"text-[11px] text-bv-muted",children:"No recording events yet"}),i.jsx("div",{className:"text-[10px] text-bv-muted/60",children:"Interact with the page to start recording events."})]}):t.map((y,C)=>i.jsxs("div",{className:`border-b border-white/[0.03] ${y.checked?"bg-[rgba(0,132,139,0.12)] border-l-2 border-l-[#00848B]":""}`,children:[i.jsxs("div",{className:"flex items-center px-2.5 py-1.5 cursor-pointer hover:bg-white/[0.025] transition-colors duration-[120ms]",onClick:k=>m(C,k.shiftKey),children:[i.jsx("span",{className:"w-9 shrink-0 text-right pr-1.5 font-mono text-[10px] text-bv-muted font-medium",title:Pi(y.primary.timestamp),children:C===t.length-1?"0s":Mx(y.primary.timestamp,x)}),i.jsx(Kx,{checked:y.checked,onChange:()=>m(C,!1)}),i.jsx(zx,{trigger:y.primary.trigger}),i.jsxs("span",{className:"text-[11px] text-bv-text flex-1 min-w-0 truncate",children:[y.primary.trigger==="click"&&y.primary.elementInfo&&i.jsxs(i.Fragment,{children:["on ",i.jsxs("span",{className:"font-mono text-[10px] text-bv-text-mid",children:["<",y.primary.elementInfo.tag,">"]}),y.primary.elementInfo.componentName&&i.jsxs(i.Fragment,{children:[" ","in ",i.jsxs("span",{className:"font-mono text-[10px] text-bv-text-mid",children:["<",y.primary.elementInfo.componentName,">"]})]})]}),y.primary.trigger==="page-load"&&i.jsx("span",{className:"font-mono text-[10px] text-bv-text-mid",children:y.primary.url}),y.primary.trigger==="navigation"&&i.jsx("span",{className:"font-mono text-[10px] text-bv-text-mid",children:y.primary.url}),y.primary.trigger==="error"&&i.jsxs("span",{className:"text-[#f87171]",children:[y.primary.consoleErrorCount," error",y.primary.consoleErrorCount>1?"s":""]})]}),y.primary.isKeyframe&&i.jsx("span",{className:"text-[8px] text-[#00848B] font-bold ml-1 shrink-0",children:"◆"})]}),y.secondaries.map((k,T)=>i.jsxs("div",{className:`flex items-center px-2.5 py-0.5 transition-opacity duration-[120ms] ${y.checked&&!k.checked?"opacity-30":""} ${T===y.secondaries.length-1?"pb-[5px]":""}`,children:[i.jsx("span",{className:"w-9 shrink-0"}),i.jsx("span",{className:"w-3 shrink-0"}),i.jsx(Fx,{checked:k.checked,visible:y.checked,onChange:()=>v(C,T)}),i.jsxs("span",{className:`text-[10px] text-bv-text-mid flex-1 min-w-0 truncate ${y.checked&&!k.checked?"line-through decoration-white/25":""}`,children:[k.type==="network"&&k.networkStatus&&i.jsxs("span",{className:`font-bold ${k.networkStatus>=400?"text-[#ef4444]":"text-[#2E7229]"}`,children:[k.networkStatus," "]}),k.type==="logs"&&k.errorCount&&k.errorCount>0&&i.jsxs("span",{className:"text-[#f87171] font-semibold",children:[k.errorCount," error",k.errorCount>1?"s":""," "]}),k.label]})]},`${y.primary.id}-${k.type}-${T}`))]},y.primary.id))}),i.jsxs("div",{className:"px-3 py-2.5 flex flex-col gap-2",children:[i.jsxs("div",{className:"text-[10px] text-bv-text-mid",children:[i.jsx("span",{className:"font-bold text-[#00848B]",children:S})," event",S!==1?"s":""," selected",S>0&&(()=>{const y=t.filter(T=>T.checked),C=Pi(y[0].primary.timestamp),k=Pi(y[y.length-1].primary.timestamp);return i.jsxs("span",{className:"text-bv-muted font-mono text-[9px] ml-1.5",children:[C," – ",k]})})()]}),i.jsx("textarea",{value:r,onChange:y=>o(y.target.value),placeholder:"Describe the bug…",className:"w-full min-h-[48px] max-h-[140px] px-2.5 py-2 rounded-md border border-bv-border bg-bv-surface text-bv-text text-[11px] leading-[1.5] resize-none outline-none transition-colors duration-[120ms] focus:border-[#00848B] placeholder:text-[#666] overflow-y-auto",style:{fieldSizing:"content"}}),i.jsx("div",{className:"flex items-center gap-1.5",children:l?i.jsxs("div",{className:"flex items-center gap-1 flex-1 min-w-0 px-2 py-1 rounded bg-bv-surface border border-bv-border font-mono text-[10px] text-bv-text",children:[i.jsxs("span",{className:"text-[#00848B] font-semibold",children:["<",l.tag,">"]}),l.id&&i.jsxs("span",{className:"text-bv-muted",children:["#",l.id]}),l.componentName&&i.jsx("span",{className:"text-[9px] text-bv-text-mid bg-[rgba(0,132,139,0.1)] px-1 rounded-[2px] font-medium font-sans",children:l.componentName}),i.jsx("button",{type:"button",onClick:()=>s(null),className:"w-3.5 h-3.5 rounded-[3px] border-none bg-white/[0.08] text-bv-muted text-[9px] flex items-center justify-center cursor-pointer ml-auto hover:bg-white/15 hover:text-bv-text",children:"✕"})]}):i.jsxs("button",{type:"button",onClick:b,className:`flex items-center gap-[5px] px-2.5 py-[5px] rounded-md border border-dashed text-[10px] font-medium cursor-pointer transition-all duration-[120ms] whitespace-nowrap ${a?"border-[#00848B] text-[#00848B] bg-[rgba(0,132,139,0.12)]":"border-bv-border text-bv-text-mid bg-transparent hover:border-[#00848B] hover:text-[#00848B] hover:bg-[rgba(0,132,139,0.12)]"}`,children:[i.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:[i.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),i.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]}),a?"Click an element…":"Pick Element"]})}),i.jsxs("button",{type:"button",onClick:g,disabled:!h,className:`flex items-center justify-center gap-1.5 w-full py-2 rounded-md border-none text-[11px] font-semibold cursor-pointer transition-all duration-[120ms] ${h?"bg-[#F5532D] text-white hover:bg-[#e04420]":"bg-bv-surface text-[#555] cursor-not-allowed"}`,children:[i.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]}),"Commit Bug Report"]})]})]})}function Wx(e){return e.map(t=>t.primary)}function hd({tabs:e,activeTab:t,onTabChange:n}){const[r,o]=w.useState(null);return i.jsx("div",{className:"relative flex border-b border-bv-border px-3",children:e.map(l=>{const s=l.id===t,a=l.disabled===!0;return i.jsxs("div",{className:"relative",onMouseEnter:()=>a&&l.tooltip&&o(l.id),onMouseLeave:()=>o(null),children:[i.jsxs("button",{type:"button",className:`relative px-3 py-2 text-[11px] font-medium font-[family-name:var(--font-ui)] border-none bg-transparent cursor-pointer transition-colors ${a?"text-bv-muted cursor-not-allowed":s?"text-bv-text":"text-bv-text-mid hover:text-bv-text"}`,disabled:a,onClick:()=>!a&&n(l.id),"aria-selected":s,role:"tab",children:[l.label,s&&i.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-bv-teal"})]}),r===l.id&&l.tooltip&&i.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-1 px-2 py-1 text-[10px] text-white bg-bv-text rounded whitespace-nowrap z-[9999]",children:l.tooltip})]},l.id)})})}function Bx(){const[e,t]=w.useState([]),[n,r]=w.useState({draft:0,committed:0,implementing:0,implemented:0,partial:0,error:0}),[o,l]=w.useState({draft:[],commits:[]}),[s,a]=w.useState(!1),u=w.useRef(e);u.current=e;const c=w.useRef(o);c.current=o;const f=w.useCallback((E,O)=>{ue("overlay",{type:"PATCH_PREVIEW",oldClass:E,newClass:O})},[]),p=w.useCallback(E=>{ue("overlay",{type:"PATCH_PREVIEW_BATCH",pairs:E})},[]),d=w.useCallback(()=>{ue("overlay",{type:"PATCH_REVERT"})},[]),m=w.useCallback((E,O,I,_)=>{if(_===I){t(H=>{const L=H.find(U=>U.kind==="class-change"&&U.elementKey===E&&U.property===O);return L&&L.kind==="class-change"&&L.newClass!==I?ue("overlay",{type:"PATCH_REVERT_STAGED",oldClass:L.newClass,newClass:I}):ue("overlay",{type:"PATCH_REVERT"}),H.filter(U=>!(U.kind==="class-change"&&U.elementKey===E&&U.property===O))});return}const z=crypto.randomUUID();t(H=>{const L=H.filter(Q=>!(Q.kind==="class-change"&&Q.elementKey===E&&Q.property===O)),U={id:z,kind:"class-change",elementKey:E,status:"staged",originalClass:I,newClass:_,property:O,timestamp:new Date().toISOString()};return[...L,U]}),ue("overlay",{type:"PATCH_STAGE",id:z,oldClass:I,newClass:_,property:O})},[]),v=w.useCallback((E,O,I)=>{const _=crypto.randomUUID(),z=I?{name:I}:void 0;t(H=>{const L={id:_,kind:"message",elementKey:O,status:"staged",originalClass:"",newClass:"",property:"",timestamp:new Date().toISOString(),message:E,component:z};return[...H,L]}),Sn(z?{type:"MESSAGE_STAGE",id:_,message:E,elementKey:O,component:z}:{type:"MESSAGE_STAGE",id:_,message:E,elementKey:O})},[]),b=w.useCallback(()=>{const E=c.current.draft.map(_=>_.id),O=u.current.filter(_=>_.status==="staged").map(_=>_.id),I=Array.from(new Set([...E,...O]));I.length!==0&&(Sn({type:"PATCH_COMMIT",ids:I}),t([]))},[]),S=w.useCallback(E=>{t(O=>O.filter(I=>I.id!==E)),Sn({type:"DISCARD_DRAFTS",ids:[E]}),ue("overlay",{type:"PATCH_REVERT"})},[]),h=w.useCallback(()=>{const E=c.current.draft.map(_=>_.id),O=u.current.filter(_=>_.status==="staged").map(_=>_.id),I=Array.from(new Set([...E,...O]));t([]),I.length>0&&Sn({type:"DISCARD_DRAFTS",ids:I}),ue("overlay",{type:"PATCH_REVERT"})},[]),g=w.useCallback(E=>{const O=c.current.commits.find(I=>I.status==="committed"&&I.patches.some(_=>_.id===E));O&&Sn({type:"DISCARD_COMMIT",commitId:O.id})},[]),x=w.useCallback(()=>{},[]),y=w.useCallback(E=>{r({draft:E.draftCount,committed:E.committedCount,implementing:E.implementingCount,implemented:E.implementedCount,partial:E.partialCount,error:E.errorCount}),l({draft:E.draft,commits:E.commits}),a(!!E.agentWaiting)},[]),C=w.useCallback(E=>{r({draft:E.staged,committed:E.committed,implementing:E.implementing,implemented:E.implemented,partial:0,error:0})},[]),k=e.filter(E=>E.status==="staged").length,T={draft:Math.max(k,n.draft),committed:n.committed,implementing:n.implementing,implemented:n.implemented,partial:n.partial,error:n.error};return{patches:e,counts:T,queueState:o,agentWaiting:s,preview:f,previewBatch:p,revertPreview:d,stage:m,stageMessage:v,commitAll:b,discard:S,discardAll:h,discardCommit:g,reset:x,handleQueueUpdate:y,handlePatchUpdate:C}}function Us(){return typeof window<"u"}function eo(e){return Uu(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mt(e){var t;return(t=(Uu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Uu(e){return Us()?e instanceof Node||e instanceof dt(e).Node:!1}function Ie(e){return Us()?e instanceof Element||e instanceof dt(e).Element:!1}function zt(e){return Us()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function Fa(e){return!Us()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}function rl(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Vx(e){return/^(table|td|th)$/.test(eo(e))}function Gs(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ux=/transform|translate|scale|rotate|perspective|filter/,Gx=/paint|layout|strict|content/,Hn=e=>!!e&&e!=="none";let _i;function Gu(e){const t=Ie(e)?kt(e):e;return Hn(t.transform)||Hn(t.translate)||Hn(t.scale)||Hn(t.rotate)||Hn(t.perspective)||!Ys()&&(Hn(t.backdropFilter)||Hn(t.filter))||Ux.test(t.willChange||"")||Gx.test(t.contain||"")}function Yx(e){let t=an(e);for(;zt(t)&&!tn(t);){if(Gu(t))return t;if(Gs(t))return null;t=an(t)}return null}function Ys(){return _i==null&&(_i=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_i}function tn(e){return/^(html|body|#document)$/.test(eo(e))}function kt(e){return dt(e).getComputedStyle(e)}function Qs(e){return Ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function an(e){if(eo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fa(e)&&e.host||Mt(e);return Fa(t)?t.host:t}function gh(e){const t=an(e);return tn(t)?e.ownerDocument?e.ownerDocument.body:e.body:zt(t)&&rl(t)?t:gh(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gh(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),s=dt(o);if(l){const a=Ha(s);return t.concat(s,s.visualViewport||[],rl(o)?o:[],a&&n?An(a):[])}else return t.concat(o,An(o,[],n))}function Ha(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Xr=Math.min,at=Math.max,Cs=Math.round,Nl=Math.floor,Dt=e=>({x:e,y:e}),Qx={left:"right",right:"left",bottom:"top",top:"bottom"};function md(e,t,n){return at(e,Xr(t,n))}function ol(e,t){return typeof e=="function"?e(t):e}function Dn(e){return e.split("-")[0]}function ll(e){return e.split("-")[1]}function yh(e){return e==="x"?"y":"x"}function xh(e){return e==="y"?"height":"width"}function qt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vh(e){return yh(qt(e))}function Xx(e,t,n){n===void 0&&(n=!1);const r=ll(e),o=vh(e),l=xh(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=js(s)),[s,js(s)]}function Zx(e){const t=js(e);return[Wa(e),t,Wa(t)]}function Wa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gd=["left","right"],yd=["right","left"],Jx=["top","bottom"],qx=["bottom","top"];function ev(e,t,n){switch(e){case"top":case"bottom":return n?t?yd:gd:t?gd:yd;case"left":case"right":return t?Jx:qx;default:return[]}}function tv(e,t,n,r){const o=ll(e);let l=ev(Dn(e),n==="start",r);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(Wa)))),l}function js(e){const t=Dn(e);return Qx[t]+e.slice(t.length)}function nv(e){return{top:0,right:0,bottom:0,left:0,...e}}function rv(e){return typeof e!="number"?nv(e):{top:e,right:e,bottom:e,left:e}}function Es(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}/*!
56
- * tabbable 6.4.0
57
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
58
- */var ov=["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] *)"],Ba=ov.join(","),bh=typeof Element>"u",Xo=bh?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ts=!bh&&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},Ns=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=o===""||o==="true",s=l||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ns(t.parentNode));return s},lv=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},sv=function(t,n,r){if(Ns(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ba));return n&&Xo.call(t,Ba)&&o.unshift(t),o=o.filter(r),o},Va=function(t,n,r){for(var o=[],l=Array.from(t);l.length;){var s=l.shift();if(!Ns(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),u=a.length?a:s.children,c=Va(u,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=Xo.call(s,Ba);f&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var p=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Ns(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(p&&d){var m=Va(p===!0?s.children:p.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scopeParent:s,candidates:m})}else l.unshift.apply(l,s.children)}}return o},wh=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Sh=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||lv(t))&&!wh(t)?0:t.tabIndex},iv=function(t,n){var r=Sh(t);return r<0&&n&&!wh(t)?0:r},av=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},kh=function(t){return t.tagName==="INPUT"},uv=function(t){return kh(t)&&t.type==="hidden"},cv=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},dv=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},fv=function(t){if(!t.name)return!0;var n=t.form||Ts(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var l=dv(o,t.form);return!l||l===t},pv=function(t){return kh(t)&&t.type==="radio"},hv=function(t){return pv(t)&&!fv(t)},mv=function(t){var n,r=t&&Ts(t),o=(n=r)===null||n===void 0?void 0:n.host,l=!1;if(r&&r!==t){var s,a,u;for(l=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(u=t.ownerDocument)!==null&&u!==void 0&&u.contains(t));!l&&o;){var c,f,p;r=Ts(o),o=(c=r)===null||c===void 0?void 0:c.host,l=!!((f=o)!==null&&f!==void 0&&(p=f.ownerDocument)!==null&&p!==void 0&&p.contains(o))}}return l},xd=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},gv=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Xo.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Xo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=t;t;){var c=t.parentElement,f=Ts(t);if(c&&!c.shadowRoot&&o(c)===!0)return xd(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=u}if(mv(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return xd(t);return!1},yv=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Xo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},xv=function(t,n){return!(n.disabled||uv(n)||gv(n,t)||cv(n)||yv(n))},vd=function(t,n){return!(hv(n)||Sh(n)<0||!xv(t,n))},vv=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ch=function(t){var n=[],r=[];return t.forEach(function(o,l){var s=!!o.scopeParent,a=s?o.scopeParent:o,u=iv(a,s),c=s?Ch(o.candidates):a;u===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:l,tabIndex:u,item:o,isScope:s,content:c})}),r.sort(av).reduce(function(o,l){return l.isScope?o.push.apply(o,l.content):o.push(l.content),o},[]).concat(n)},jh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Va([t],n.includeContainer,{filter:vd.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:vv}):r=sv(t,n.includeContainer,vd.bind(null,n)),Ch(r)};function bv(){return/apple/i.test(navigator.vendor)}function wv(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 Ua(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Fa(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function yo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ii(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 Sv(e){return e.matches("html,body")}function Zo(e){return(e==null?void 0:e.ownerDocument)||document}function Bl(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var l;return o.parentId===t&&(!n||((l=o.context)==null?void 0:l.open))}).flatMap(o=>[o,...Bl(e,o.id,n)])}function kv(e){return"nativeEvent"in e}var Cv=typeof document<"u",jv=function(){},er=Cv?w.useLayoutEffect:jv;const Ev={...nf},Tv=Ev.useInsertionEffect,Nv=Tv||(e=>e());function br(e){const t=w.useRef(()=>{});return Nv(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Eh=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Th(e,t){const n=jh(e,Eh()),r=n.length;if(r===0)return;const o=wv(Zo(e)),l=n.indexOf(o),s=l===-1?t===1?0:r-1:l+t;return n[s]}function Rv(e){return Th(Zo(e).body,1)||e}function Pv(e){return Th(Zo(e).body,-1)||e}function Ai(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ua(n,r)}function _v(e){jh(e,Eh()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function bd(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 wd(e,t,n){let{reference:r,floating:o}=e;const l=qt(t),s=vh(t),a=xh(s),u=Dn(t),c=l==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:p};break;case"left":m={x:r.x-o.width,y:p};break;default:m={x:r.x,y:r.y}}switch(ll(t)){case"start":m[s]-=d*(n&&c?-1:1);break;case"end":m[s]+=d*(n&&c?-1:1);break}return m}async function Iv(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:d=!1,padding:m=0}=ol(t,e),v=rv(m),S=a[d?p==="floating"?"reference":"floating":p],h=Es(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(S)))==null||n?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:u})),g=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),y=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Es(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:u}):g);return{top:(h.top-C.top+v.top)/y.y,bottom:(C.bottom-h.bottom+v.bottom)/y.y,left:(h.left-C.left+v.left)/y.x,right:(C.right-h.right+v.right)/y.x}}const Av=50,Lv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Iv},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=wd(c,r,u),d=r,m=0;const v={};for(let b=0;b<l.length;b++){const S=l[b];if(!S)continue;const{name:h,fn:g}=S,{x,y,data:C,reset:k}=await g({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:v,rects:c,platform:a,elements:{reference:e,floating:t}});f=x??f,p=y??p,v[h]={...v[h],...C},k&&m<Av&&(m++,typeof k=="object"&&(k.placement&&(d=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:p}=wd(c,d,u)),b=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:v}},Ov=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:s,initialPlacement:a,platform:u,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...S}=ol(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const h=Dn(o),g=qt(a),x=Dn(a)===a,y=await(u.isRTL==null?void 0:u.isRTL(c.floating)),C=d||(x||!b?[js(a)]:Zx(a)),k=v!=="none";!d&&k&&C.push(...tv(a,b,v,y));const T=[a,...C],E=await u.detectOverflow(t,S),O=[];let I=((r=l.flip)==null?void 0:r.overflows)||[];if(f&&O.push(E[h]),p){const L=Xx(o,s,y);O.push(E[L[0]],E[L[1]])}if(I=[...I,{placement:o,overflows:O}],!O.every(L=>L<=0)){var _,z;const L=(((_=l.flip)==null?void 0:_.index)||0)+1,U=T[L];if(U&&(!(p==="alignment"?g!==qt(U):!1)||I.every(j=>qt(j.placement)===g?j.overflows[0]>0:!0)))return{data:{index:L,overflows:I},reset:{placement:U}};let Q=(z=I.filter(J=>J.overflows[0]<=0).sort((J,j)=>J.overflows[1]-j.overflows[1])[0])==null?void 0:z.placement;if(!Q)switch(m){case"bestFit":{var H;const J=(H=I.filter(j=>{if(k){const R=qt(j.placement);return R===g||R==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(R=>R>0).reduce((R,P)=>R+P,0)]).sort((j,R)=>j[1]-R[1])[0])==null?void 0:H[0];J&&(Q=J);break}case"initialPlacement":Q=a;break}if(o!==Q)return{reset:{placement:Q}}}return{}}}},Dv=new Set(["left","top"]);async function $v(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Dn(n),a=ll(n),u=qt(n)==="y",c=Dv.has(s)?-1:1,f=l&&u?-1:1,p=ol(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),u?{x:m*f,y:d*c}:{x:d*c,y:m*f}}const Mv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:s,middlewareData:a}=t,u=await $v(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:s}}}}},zv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:u={fn:h=>{let{x:g,y:x}=h;return{x:g,y:x}}},...c}=ol(e,t),f={x:n,y:r},p=await l.detectOverflow(t,c),d=qt(Dn(o)),m=yh(d);let v=f[m],b=f[d];if(s){const h=m==="y"?"top":"left",g=m==="y"?"bottom":"right",x=v+p[h],y=v-p[g];v=md(x,v,y)}if(a){const h=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=b+p[h],y=b-p[g];b=md(x,b,y)}const S=u.fn({...t,[m]:v,[d]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[m]:s,[d]:a}}}}}},Kv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:l,platform:s,elements:a}=t,{apply:u=()=>{},...c}=ol(e,t),f=await s.detectOverflow(t,c),p=Dn(o),d=ll(o),m=qt(o)==="y",{width:v,height:b}=l.floating;let S,h;p==="top"||p==="bottom"?(S=p,h=d===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,S=d==="end"?"top":"bottom");const g=b-f.top-f.bottom,x=v-f.left-f.right,y=Xr(b-f[S],g),C=Xr(v-f[h],x),k=!t.middlewareData.shift;let T=y,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=g),k&&!d){const I=at(f.left,0),_=at(f.right,0),z=at(f.top,0),H=at(f.bottom,0);m?E=v-2*(I!==0||_!==0?I+_:at(f.left,f.right)):T=b-2*(z!==0||H!==0?z+H:at(f.top,f.bottom))}await u({...t,availableWidth:E,availableHeight:T});const O=await s.getDimensions(a.floating);return v!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}};function Nh(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=zt(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Cs(n)!==l||Cs(r)!==s;return a&&(n=l,r=s),{width:n,height:r,$:a}}function Yu(e){return Ie(e)?e:e.contextElement}function Kr(e){const t=Yu(e);if(!zt(t))return Dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=Nh(t);let s=(l?Cs(n.width):n.width)/r,a=(l?Cs(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Fv=Dt(0);function Rh(e){const t=dt(e);return!Ys()||!t.visualViewport?Fv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==dt(e)?!1:t}function sr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=Yu(e);let s=Dt(1);t&&(r?Ie(r)&&(s=Kr(r)):s=Kr(e));const a=Hv(l,n,r)?Rh(l):Dt(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(l){const d=dt(l),m=r&&Ie(r)?dt(r):r;let v=d,b=Ha(v);for(;b&&r&&m!==v;){const S=Kr(b),h=b.getBoundingClientRect(),g=kt(b),x=h.left+(b.clientLeft+parseFloat(g.paddingLeft))*S.x,y=h.top+(b.clientTop+parseFloat(g.paddingTop))*S.y;u*=S.x,c*=S.y,f*=S.x,p*=S.y,u+=x,c+=y,v=dt(b),b=Ha(v)}}return Es({width:f,height:p,x:u,y:c})}function Xs(e,t){const n=Qs(e).scrollLeft;return t?t.left+n:sr(Mt(e)).left+n}function Ph(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xs(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Wv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",s=Mt(r),a=t?Gs(t.floating):!1;if(r===s||a&&l)return n;let u={scrollLeft:0,scrollTop:0},c=Dt(1);const f=Dt(0),p=zt(r);if((p||!p&&!l)&&((eo(r)!=="body"||rl(s))&&(u=Qs(r)),p)){const m=sr(r);c=Kr(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const d=s&&!p&&!l?Ph(s,u):Dt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-u.scrollTop*c.y+f.y+d.y}}function Bv(e){return Array.from(e.getClientRects())}function Vv(e){const t=Mt(e),n=Qs(e),r=e.ownerDocument.body,o=at(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=at(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Xs(e);const a=-n.scrollTop;return kt(r).direction==="rtl"&&(s+=at(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:s,y:a}}const Sd=25;function Uv(e,t){const n=dt(e),r=Mt(e),o=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){l=o.width,s=o.height;const f=Ys();(!f||f&&t==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const c=Xs(r);if(c<=0){const f=r.ownerDocument,p=f.body,d=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,v=Math.abs(r.clientWidth-p.clientWidth-m);v<=Sd&&(l-=v)}else c<=Sd&&(l+=c);return{width:l,height:s,x:a,y:u}}function Gv(e,t){const n=sr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=zt(e)?Kr(e):Dt(1),s=e.clientWidth*l.x,a=e.clientHeight*l.y,u=o*l.x,c=r*l.y;return{width:s,height:a,x:u,y:c}}function kd(e,t,n){let r;if(t==="viewport")r=Uv(e,n);else if(t==="document")r=Vv(Mt(e));else if(Ie(t))r=Gv(t,n);else{const o=Rh(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Es(r)}function _h(e,t){const n=an(e);return n===t||!Ie(n)||tn(n)?!1:kt(n).position==="fixed"||_h(n,t)}function Yv(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(a=>Ie(a)&&eo(a)!=="body"),o=null;const l=kt(e).position==="fixed";let s=l?an(e):e;for(;Ie(s)&&!tn(s);){const a=kt(s),u=Gu(s);!u&&a.position==="fixed"&&(o=null),(l?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||rl(s)&&!u&&_h(e,s))?r=r.filter(f=>f!==s):o=a,s=an(s)}return t.set(e,r),r}function Qv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Gs(t)?[]:Yv(t,this._c):[].concat(n),r],a=kd(t,s[0],o);let u=a.top,c=a.right,f=a.bottom,p=a.left;for(let d=1;d<s.length;d++){const m=kd(t,s[d],o);u=at(m.top,u),c=Xr(m.right,c),f=Xr(m.bottom,f),p=at(m.left,p)}return{width:c-p,height:f-u,x:p,y:u}}function Xv(e){const{width:t,height:n}=Nh(e);return{width:t,height:n}}function Zv(e,t,n){const r=zt(t),o=Mt(t),l=n==="fixed",s=sr(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const u=Dt(0);function c(){u.x=Xs(o)}if(r||!r&&!l)if((eo(t)!=="body"||rl(o))&&(a=Qs(t)),r){const m=sr(t,!0,l,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else o&&c();l&&!r&&o&&c();const f=o&&!r&&!l?Ph(o,a):Dt(0),p=s.left+a.scrollLeft-u.x-f.x,d=s.top+a.scrollTop-u.y-f.y;return{x:p,y:d,width:s.width,height:s.height}}function Li(e){return kt(e).position==="static"}function Cd(e,t){if(!zt(e)||kt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mt(e)===n&&(n=n.ownerDocument.body),n}function Ih(e,t){const n=dt(e);if(Gs(e))return n;if(!zt(e)){let o=an(e);for(;o&&!tn(o);){if(Ie(o)&&!Li(o))return o;o=an(o)}return n}let r=Cd(e,t);for(;r&&Vx(r)&&Li(r);)r=Cd(r,t);return r&&tn(r)&&Li(r)&&!Gu(r)?n:r||Yx(e)||n}const Jv=async function(e){const t=this.getOffsetParent||Ih,n=this.getDimensions,r=await n(e.floating);return{reference:Zv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qv(e){return kt(e).direction==="rtl"}const e0={convertOffsetParentRelativeRectToViewportRelativeRect:Wv,getDocumentElement:Mt,getClippingRect:Qv,getOffsetParent:Ih,getElementRects:Jv,getClientRects:Bv,getDimensions:Xv,getScale:Kr,isElement:Ie,isRTL:qv};function Ah(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t0(e,t){let n=null,r;const o=Mt(e);function l(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),l();const c=e.getBoundingClientRect(),{left:f,top:p,width:d,height:m}=c;if(a||t(),!d||!m)return;const v=Nl(p),b=Nl(o.clientWidth-(f+d)),S=Nl(o.clientHeight-(p+m)),h=Nl(f),x={rootMargin:-v+"px "+-b+"px "+-S+"px "+-h+"px",threshold:at(0,Xr(1,u))||1};let y=!0;function C(k){const T=k[0].intersectionRatio;if(T!==u){if(!y)return s();T?s(!1,T):r=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!Ah(c,e.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),l}function un(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=Yu(e),f=o||l?[...c?An(c):[],...t?An(t):[]]:[];f.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),l&&h.addEventListener("resize",n)});const p=c&&a?t0(c,n):null;let d=-1,m=null;s&&(m=new ResizeObserver(h=>{let[g]=h;g&&g.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),c&&!u&&m.observe(c),t&&m.observe(t));let v,b=u?sr(e):null;u&&S();function S(){const h=sr(e);b&&!Ah(b,h)&&n(),b=h,v=requestAnimationFrame(S)}return n(),()=>{var h;f.forEach(g=>{o&&g.removeEventListener("scroll",n),l&&g.removeEventListener("resize",n)}),p==null||p(),(h=m)==null||h.disconnect(),m=null,u&&cancelAnimationFrame(v)}}const n0=Mv,r0=zv,o0=Ov,l0=Kv,s0=(e,t,n)=>{const r=new Map,o={platform:e0,...n},l={...o.platform,_c:r};return Lv(e,t,{...o,platform:l})};var i0=typeof document<"u",a0=function(){},Vl=i0?w.useLayoutEffect:a0;function Rs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Rs(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!Rs(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Lh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jd(e,t){const n=Lh(e);return Math.round(t*n)/n}function Oi(e){const t=w.useRef(e);return Vl(()=>{t.current=e}),t}function u0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[f,p]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,m]=w.useState(r);Rs(d,r)||m(r);const[v,b]=w.useState(null),[S,h]=w.useState(null),g=w.useCallback(j=>{j!==k.current&&(k.current=j,b(j))},[]),x=w.useCallback(j=>{j!==T.current&&(T.current=j,h(j))},[]),y=l||v,C=s||S,k=w.useRef(null),T=w.useRef(null),E=w.useRef(f),O=u!=null,I=Oi(u),_=Oi(o),z=Oi(c),H=w.useCallback(()=>{if(!k.current||!T.current)return;const j={placement:t,strategy:n,middleware:d};_.current&&(j.platform=_.current),s0(k.current,T.current,j).then(R=>{const P={...R,isPositioned:z.current!==!1};L.current&&!Rs(E.current,P)&&(E.current=P,Wu.flushSync(()=>{p(P)}))})},[d,t,n,_,z]);Vl(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(j=>({...j,isPositioned:!1})))},[c]);const L=w.useRef(!1);Vl(()=>(L.current=!0,()=>{L.current=!1}),[]),Vl(()=>{if(y&&(k.current=y),C&&(T.current=C),y&&C){if(I.current)return I.current(y,C,H);H()}},[y,C,H,I,O]);const U=w.useMemo(()=>({reference:k,floating:T,setReference:g,setFloating:x}),[g,x]),Q=w.useMemo(()=>({reference:y,floating:C}),[y,C]),J=w.useMemo(()=>{const j={position:n,left:0,top:0};if(!Q.floating)return j;const R=jd(Q.floating,f.x),P=jd(Q.floating,f.y);return a?{...j,transform:"translate("+R+"px, "+P+"px)",...Lh(Q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:P}},[n,a,Q.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:H,refs:U,elements:Q,floatingStyles:J}),[f,H,U,Q,J])}const cn=(e,t)=>{const n=n0(e);return{name:n.name,fn:n.fn,options:[e,t]}},dn=(e,t)=>{const n=r0(e);return{name:n.name,fn:n.fn,options:[e,t]}},fn=(e,t)=>{const n=o0(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ga=(e,t)=>{const n=l0(e);return{name:n.name,fn:n.fn,options:[e,t]}},c0="data-floating-ui-focusable",Ed="active",Td="selected",d0={...nf};let Nd=!1,f0=0;const Rd=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+f0++;function p0(){const[e,t]=w.useState(()=>Nd?Rd():void 0);return er(()=>{e==null&&t(Rd())},[]),w.useEffect(()=>{Nd=!0},[]),e}const h0=d0.useId,Oh=h0||p0;function m0(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const g0=w.createContext(null),y0=w.createContext(null),x0=()=>{var e;return((e=w.useContext(g0))==null?void 0:e.id)||null},Dh=()=>w.useContext(y0);function Qu(e){return"data-floating-ui-"+e}const v0={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},Pd=w.forwardRef(function(t,n){const[r,o]=w.useState();er(()=>{bv()&&o("button")},[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Qu("focus-guard")]:"",style:v0};return i.jsx("span",{...t,...l})}),b0={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$h=w.createContext(null),_d=Qu("portal");function w0(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Oh(),o=S0(),[l,s]=w.useState(null),a=w.useRef(null);return er(()=>()=>{l==null||l.remove(),queueMicrotask(()=>{a.current=null})},[l]),er(()=>{if(!r||a.current)return;const u=t?document.getElementById(t):null;if(!u)return;const c=document.createElement("div");c.id=r,c.setAttribute(_d,""),u.appendChild(c),a.current=c,s(c)},[t,r]),er(()=>{if(n===null||!r||a.current)return;let u=n||(o==null?void 0:o.portalNode);u&&!Uu(u)&&(u=u.current),u=u||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,u.appendChild(c));const f=document.createElement("div");f.id=r,f.setAttribute(_d,""),u=c||u,u.appendChild(f),a.current=f,s(f)},[t,n,r,o]),l}function pn(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,l=w0({id:n,root:r}),[s,a]=w.useState(null),u=w.useRef(null),c=w.useRef(null),f=w.useRef(null),p=w.useRef(null),d=s==null?void 0:s.modal,m=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||l);return w.useEffect(()=>{if(!l||!o||d)return;function b(S){l&&Ai(S)&&(S.type==="focusin"?bd:_v)(l)}return l.addEventListener("focusin",b,!0),l.addEventListener("focusout",b,!0),()=>{l.removeEventListener("focusin",b,!0),l.removeEventListener("focusout",b,!0)}},[l,o,d]),w.useEffect(()=>{l&&(m||bd(l))},[m,l]),i.jsxs($h.Provider,{value:w.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:p,portalNode:l,setFocusManagerState:a}),[o,l]),children:[v&&l&&i.jsx(Pd,{"data-type":"outside",ref:u,onFocus:b=>{if(Ai(b,l)){var S;(S=f.current)==null||S.focus()}else{const h=s?s.domReference:null,g=Pv(h);g==null||g.focus()}}}),v&&l&&i.jsx("span",{"aria-owns":l.id,style:b0}),l&&Wu.createPortal(t,l),v&&l&&i.jsx(Pd,{"data-type":"outside",ref:c,onFocus:b=>{if(Ai(b,l)){var S;(S=p.current)==null||S.focus()}else{const h=s?s.domReference:null,g=Rv(h);g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,b.nativeEvent,"focus-out"))}}})]})}const S0=()=>w.useContext($h),k0={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},C0={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Id=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 ir(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:l}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:d=!1,bubbles:m,capture:v}=t,b=Dh(),S=br(typeof u=="function"?u:()=>!1),h=typeof u=="function"?S:u,g=w.useRef(!1),{escapeKey:x,outsidePress:y}=Id(m),{escapeKey:C,outsidePress:k}=Id(v),T=w.useRef(!1),E=br(L=>{var U;if(!n||!s||!a||L.key!=="Escape"||T.current)return;const Q=(U=l.current.floatingContext)==null?void 0:U.nodeId,J=b?Bl(b.nodesRef.current,Q):[];if(!x&&(L.stopPropagation(),J.length>0)){let j=!0;if(J.forEach(R=>{var P;if((P=R.context)!=null&&P.open&&!R.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}r(!1,kv(L)?L.nativeEvent:L,"escape-key")}),O=br(L=>{var U;const Q=()=>{var J;E(L),(J=yo(L))==null||J.removeEventListener("keydown",Q)};(U=yo(L))==null||U.addEventListener("keydown",Q)}),I=br(L=>{var U;const Q=l.current.insideReactTree;l.current.insideReactTree=!1;const J=g.current;if(g.current=!1,c==="click"&&J||Q||typeof h=="function"&&!h(L))return;const j=yo(L),R="["+Qu("inert")+"]",P=Zo(o.floating).querySelectorAll(R);let Y=Ie(j)?j:null;for(;Y&&!tn(Y);){const de=an(Y);if(tn(de)||!Ie(de))break;Y=de}if(P.length&&Ie(j)&&!Sv(j)&&!Ua(j,o.floating)&&Array.from(P).every(de=>!Ua(Y,de)))return;if(zt(j)&&H){const de=tn(j),W=kt(j),ye=/auto|scroll/,ve=de||ye.test(W.overflowX),to=de||ye.test(W.overflowY),no=ve&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,hr=to&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,ro=W.direction==="rtl",oo=hr&&(ro?L.offsetX<=j.offsetWidth-j.clientWidth:L.offsetX>j.clientWidth),Kt=no&&L.offsetY>j.clientHeight;if(oo||Kt)return}const Z=(U=l.current.floatingContext)==null?void 0:U.nodeId,M=b&&Bl(b.nodesRef.current,Z).some(de=>{var W;return Ii(L,(W=de.context)==null?void 0:W.elements.floating)});if(Ii(L,o.floating)||Ii(L,o.domReference)||M)return;const ce=b?Bl(b.nodesRef.current,Z):[];if(ce.length>0){let de=!0;if(ce.forEach(W=>{var ye;if((ye=W.context)!=null&&ye.open&&!W.context.dataRef.current.__outsidePressBubbles){de=!1;return}}),!de)return}r(!1,L,"outside-press")}),_=br(L=>{var U;const Q=()=>{var J;I(L),(J=yo(L))==null||J.removeEventListener(c,Q)};(U=yo(L))==null||U.addEventListener(c,Q)});w.useEffect(()=>{if(!n||!s)return;l.current.__escapeKeyBubbles=x,l.current.__outsidePressBubbles=y;let L=-1;function U(P){r(!1,P,"ancestor-scroll")}function Q(){window.clearTimeout(L),T.current=!0}function J(){L=window.setTimeout(()=>{T.current=!1},Ys()?5:0)}const j=Zo(o.floating);a&&(j.addEventListener("keydown",C?O:E,C),j.addEventListener("compositionstart",Q),j.addEventListener("compositionend",J)),h&&j.addEventListener(c,k?_:I,k);let R=[];return d&&(Ie(o.domReference)&&(R=An(o.domReference)),Ie(o.floating)&&(R=R.concat(An(o.floating))),!Ie(o.reference)&&o.reference&&o.reference.contextElement&&(R=R.concat(An(o.reference.contextElement)))),R=R.filter(P=>{var Y;return P!==((Y=j.defaultView)==null?void 0:Y.visualViewport)}),R.forEach(P=>{P.addEventListener("scroll",U,{passive:!0})}),()=>{a&&(j.removeEventListener("keydown",C?O:E,C),j.removeEventListener("compositionstart",Q),j.removeEventListener("compositionend",J)),h&&j.removeEventListener(c,k?_:I,k),R.forEach(P=>{P.removeEventListener("scroll",U)}),window.clearTimeout(L)}},[l,o,a,h,c,n,r,d,s,x,y,E,C,O,I,k,_]),w.useEffect(()=>{l.current.insideReactTree=!1},[l,h,c]);const z=w.useMemo(()=>({onKeyDown:E,...f&&{[k0[p]]:L=>{r(!1,L.nativeEvent,"reference-press")},...p!=="click"&&{onClick(L){r(!1,L.nativeEvent,"reference-press")}}}}),[E,r,f,p]),H=w.useMemo(()=>{function L(U){U.button===0&&(g.current=!0)}return{onKeyDown:E,onMouseDown:L,onMouseUp:L,[C0[c]]:()=>{l.current.insideReactTree=!0}}},[E,c,l]);return w.useMemo(()=>s?{reference:z,floating:H}:{},[s,z,H])}function j0(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Oh(),l=w.useRef({}),[s]=w.useState(()=>m0()),a=x0()!=null,[u,c]=w.useState(r.reference),f=br((m,v,b)=>{l.current.openEvent=m?v:void 0,s.emit("openchange",{open:m,event:v,reason:b,nested:a}),n==null||n(m,v,b)}),p=w.useMemo(()=>({setPositionReference:c}),[]),d=w.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return w.useMemo(()=>({dataRef:l,open:t,onOpenChange:f,elements:d,events:s,floatingId:o,refs:p}),[t,f,d,s,o,p])}function hn(e){e===void 0&&(e={});const{nodeId:t}=e,n=j0({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[l,s]=w.useState(null),[a,u]=w.useState(null),f=(o==null?void 0:o.domReference)||l,p=w.useRef(null),d=Dh();er(()=>{f&&(p.current=f)},[f]);const m=u0({...e,elements:{...o,...a&&{reference:a}}}),v=w.useCallback(x=>{const y=Ie(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;u(y),m.refs.setReference(y)},[m.refs]),b=w.useCallback(x=>{(Ie(x)||x===null)&&(p.current=x,s(x)),(Ie(m.refs.reference.current)||m.refs.reference.current===null||x!==null&&!Ie(x))&&m.refs.setReference(x)},[m.refs]),S=w.useMemo(()=>({...m.refs,setReference:b,setPositionReference:v,domReference:p}),[m.refs,b,v]),h=w.useMemo(()=>({...m.elements,domReference:f}),[m.elements,f]),g=w.useMemo(()=>({...m,...r,refs:S,elements:h,nodeId:t}),[m,S,h,t,r]);return er(()=>{r.dataRef.current.floatingContext=g;const x=d==null?void 0:d.nodesRef.current.find(y=>y.id===t);x&&(x.context=g)}),w.useMemo(()=>({...m,context:g,refs:S,elements:h}),[m,S,h,g])}function Di(e,t,n){const r=new Map,o=n==="item";let l=e;if(o&&e){const{[Ed]:s,[Td]:a,...u}=e;l=u}return{...n==="floating"&&{tabIndex:-1,[c0]:""},...l,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(u=>{let[c,f]=u;if(!(o&&[Ed,Td].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var p;(p=r.get(c))==null||p.push(f),s[c]=function(){for(var d,m=arguments.length,v=new Array(m),b=0;b<m;b++)v[b]=arguments[b];return(d=r.get(c))==null?void 0:d.map(S=>S(...v)).find(S=>S!==void 0)}}}else s[c]=f}),s),{})}}function ar(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=w.useCallback(a=>Di(a,e,"reference"),t),l=w.useCallback(a=>Di(a,e,"floating"),n),s=w.useCallback(a=>Di(a,e,"item"),r);return w.useMemo(()=>({getReferenceProps:o,getFloatingProps:l,getItemProps:s}),[o,l,s])}const ur={"m-":{category:"spacing",themeKey:"spacing",valueType:"scalar",renderMode:"boxmodel",isComposite:!0,compositeRelatedPrefixes:["m-","mx-","my-","mt-","mr-","mb-","ml-","ms-","me-","p-","px-","py-","pt-","pr-","pb-","pl-","ps-","pe-","space-x-","space-y-","border-","border-t-","border-r-","border-b-","border-l-","rounded-","rounded-t-","rounded-r-","rounded-b-","rounded-l-","rounded-tl-","rounded-tr-","rounded-br-","rounded-bl-"],compositeExactMatches:["border","rounded"]},"mx-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"my-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"mb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ml-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ms-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"me-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"p-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"px-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"py-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pt-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pr-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pb-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pl-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"ps-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"pe-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"gap-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",addable:!0,controlGroup:"flex-container",propertyKey:"gap"},"gap-x-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-x"},"gap-y-":{category:"flexbox",themeKey:"spacing",valueType:"scalar",controlGroup:"flex-container",propertyKey:"gap-y"},"space-x-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"space-y-":{category:"spacing",themeKey:"spacing",valueType:"scalar"},"w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"width"},"h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"height"},"min-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-width"},"max-w-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-width"},"min-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"min-height"},"max-h-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"max-height"},"size-":{category:"sizing",themeKey:"spacing",valueType:"scalar",addable:!0,propertyKey:"size"},"font-":{category:"typography",themeKey:"fontWeight",valueType:"scalar",addable:!0},"text-":{category:"typography",themeKey:null,valueType:"enum"},"leading-":{category:"typography",themeKey:"lineHeight",valueType:"scalar",addable:!0},"tracking-":{category:"typography",themeKey:"letterSpacing",valueType:"scalar",addable:!0},"text-left":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-center":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-right":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-justify":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-start":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},"text-end":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-align",enumAlts:["text-left","text-center","text-right","text-justify","text-start","text-end"]},italic:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-style",enumAlts:["italic","not-italic"]},"not-italic":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-style",enumAlts:["italic","not-italic"]},underline:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"line-through":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},overline:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},"no-underline":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-decoration",enumAlts:["underline","line-through","overline","no-underline"]},uppercase:{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},lowercase:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},capitalize:{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},"normal-case":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"text-transform",enumAlts:["uppercase","lowercase","capitalize","normal-case"]},truncate:{category:"typography",themeKey:null,valueType:"enum"},"font-sans":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-serif":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"font-mono":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"font-family",enumAlts:["font-sans","font-serif","font-mono"]},"align-baseline":{category:"typography",themeKey:null,valueType:"enum",addable:!0,propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-middle":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-top":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-text-bottom":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-sub":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"align-super":{category:"typography",themeKey:null,valueType:"enum",propertyKey:"vertical-align",enumAlts:["align-baseline","align-top","align-middle","align-bottom","align-text-top","align-text-bottom","align-sub","align-super"]},"bg-":{category:"color",themeKey:"colors",valueType:"color",renderMode:"gradient-editor",isComposite:!0,compositeRelatedPrefixes:["bg-","bg-gradient-to-","from-","via-","to-"]},"bg-gradient-to-":{category:"gradient",themeKey:null,valueType:"enum"},"from-":{category:"gradient",themeKey:"colors",valueType:"color"},"via-":{category:"gradient",themeKey:"colors",valueType:"color"},"to-":{category:"gradient",themeKey:"colors",valueType:"color"},"ring-":{category:"color",themeKey:"colors",valueType:"color"},"outline-":{category:"color",themeKey:"colors",valueType:"color"},"fill-":{category:"color",themeKey:"colors",valueType:"color"},"stroke-":{category:"color",themeKey:"colors",valueType:"color"},"decoration-":{category:"color",themeKey:"colors",valueType:"color"},border:{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-t-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-r-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-b-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},"border-l-":{category:"borders",themeKey:"borderWidth",valueType:"scalar"},rounded:{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-t-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-r-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-b-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-l-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-tr-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-br-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"rounded-bl-":{category:"borders",themeKey:"borderRadius",valueType:"scalar"},"opacity-":{category:"effects",themeKey:"opacity",valueType:"scalar",addable:!0},"shadow-":{category:"effects",themeKey:null,valueType:"enum"},block:{category:"layout",themeKey:null,valueType:"enum",addable:!0,propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-block":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},inline:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},grid:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-grid":{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},hidden:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},table:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},contents:{category:"layout",themeKey:null,valueType:"enum",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},static:{category:"layout",themeKey:null,valueType:"enum"},fixed:{category:"layout",themeKey:null,valueType:"enum"},absolute:{category:"layout",themeKey:null,valueType:"enum"},relative:{category:"layout",themeKey:null,valueType:"enum"},sticky:{category:"layout",themeKey:null,valueType:"enum"},"inset-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"top-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"right-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"bottom-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"left-":{category:"layout",themeKey:"spacing",valueType:"scalar"},"z-":{category:"layout",themeKey:null,valueType:"enum"},flex:{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"inline-flex":{category:"layout",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"display",enumAlts:["block","inline-block","inline","flex","inline-flex","grid","inline-grid","hidden","table","contents"]},"flex-row":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-row-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-col-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-direction",enumAlts:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"]},"flex-wrap":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-nowrap":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-wrap-reverse":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"flex-wrap",enumAlts:["flex-wrap","flex-nowrap","flex-wrap-reverse"]},"flex-1":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-initial":{category:"flexbox",themeKey:null,valueType:"enum"},"flex-none":{category:"flexbox",themeKey:null,valueType:"enum"},grow:{category:"flexbox",themeKey:null,valueType:"enum"},"grow-0":{category:"flexbox",themeKey:null,valueType:"enum"},shrink:{category:"flexbox",themeKey:null,valueType:"enum"},"shrink-0":{category:"flexbox",themeKey:null,valueType:"enum"},"justify-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-between":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-around":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-evenly":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"justify-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"justify-content",enumAlts:["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly","justify-stretch"]},"items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-end":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-center":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-baseline":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",controlGroup:"flex-container",propertyKey:"align-items",enumAlts:["items-start","items-end","items-center","items-baseline","items-stretch"]},"content-normal":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-start":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-between":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-around":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-evenly":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-baseline":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"content-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"align-content",enumAlts:["content-normal","content-start","content-end","content-center","content-between","content-around","content-evenly","content-baseline","content-stretch"]},"justify-items-start":{category:"flexbox",themeKey:null,valueType:"enum",addable:!0,propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-end":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-center":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"justify-items-stretch":{category:"flexbox",themeKey:null,valueType:"enum",propertyKey:"justify-items",enumAlts:["justify-items-start","justify-items-end","justify-items-center","justify-items-stretch"]},"self-auto":{category:"flexbox",themeKey:null,valueType:"enum"},"self-start":{category:"flexbox",themeKey:null,valueType:"enum"},"self-end":{category:"flexbox",themeKey:null,valueType:"enum"},"self-center":{category:"flexbox",themeKey:null,valueType:"enum"},"self-stretch":{category:"flexbox",themeKey:null,valueType:"enum"},"self-baseline":{category:"flexbox",themeKey:null,valueType:"enum"},"basis-":{category:"flexbox",themeKey:"spacing",valueType:"scalar"},"grid-cols-":{category:"flexbox",themeKey:null,valueType:"enum"},"grid-rows-":{category:"flexbox",themeKey:null,valueType:"enum"},"col-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"row-span-":{category:"flexbox",themeKey:null,valueType:"enum"},"order-":{category:"flexbox",themeKey:null,valueType:"enum"}},E0=(()=>{const e=new Map;for(const[t,n]of Object.entries(ur)){if(!n.controlGroup)continue;const r=n.propertyKey??t.replace(/-$/g,"");e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(r)}return e})(),T0=(()=>{const e=new Map;for(const[t,n]of Object.entries(ur))n.controlGroup&&(e.has(n.controlGroup)||e.set(n.controlGroup,new Set),e.get(n.controlGroup).add(t));return e})();function N0(){const e={};for(const[t,n]of Object.entries(ur))if(n.valueType==="enum"&&n.enumAlts){const r=n.propertyKey??t.replace(/-$/g,"");for(const o of n.enumAlts)e[o]||(e[o]={alternatives:n.enumAlts,propertyKey:r})}return e}function R0(){const e={spacing:[],sizing:[],typography:[],color:[],borders:[],effects:[],layout:[],flexbox:[],gradient:[]},t=new Set;for(const[n,r]of Object.entries(ur)){if(!r.addable)continue;const o=r.propertyKey??n.replace(/-$/g,"");if(t.has(o))continue;t.add(o);const l=o.replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase()),s=r.enumAlts?r.enumAlts.slice(0,2).join("/")+(r.enumAlts.length>2?"/…":""):`${n}*`;e[r.category].push({name:l,prefixHint:s,prefix:n})}return e}function Ul({prefix:e,currentValue:t,colors:n,locked:r,lockedValue:o,onHover:l,onLeave:s,onClick:a,onRemove:u,onRemoveHover:c}){return i.jsxs("div",{className:"p-2 bg-bv-surface border border-bv-border rounded-md my-2",onMouseLeave:()=>{r||s()},children:[i.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[i.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0"}),u&&i.jsx("div",{title:"Remove class",className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] flex items-center justify-center ${t===""?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":"border-transparent hover:border-bv-orange hover:scale-110"}`,onMouseEnter:()=>{!r&&c&&c()},onClick:u,children:i.jsxs("svg",{viewBox:"0 0 10 10",width:"14",height:"14",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.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?i.jsx(Ad,{prefix:e,colorName:f,colorValue:n[f],isCurrent:f===t,isLocked:o===`${e}${f}`,locked:r,onHover:l,onClick:a},f):null)]}),zy.map(f=>{const p=n[f];return!p||typeof p!="object"?null:i.jsxs("div",{className:"flex items-center gap-0.5 mb-0.5",children:[i.jsx("span",{className:"w-[52px] text-[10px] text-bv-muted text-right pr-1.5 shrink-0",children:f}),Ky.map(d=>p[d]!==void 0?i.jsx(Ad,{prefix:e,colorName:`${f}-${d}`,colorValue:p[d],isCurrent:`${f}-${d}`===t,isLocked:o===`${e}${f}-${d}`,locked:r,onHover:l,onClick:a},`${f}-${d}`):null)]},f)})]})}function Ad({prefix:e,colorName:t,colorValue:n,isCurrent:r,isLocked:o,locked:l,onHover:s,onClick:a}){const u=`${e}${t}`,c=o?"outline outline-2 outline-offset-2 outline-bv-teal border-transparent":r?"outline outline-2 outline-offset-2 outline-bv-orange border-transparent":l?"border-transparent":"border-transparent hover:border-bv-text hover:scale-110 hover:z-10",f=t==="transparent"?{background:"repeating-conic-gradient(#808080 0% 25%, transparent 0% 50%) 50% / 8px 8px"}:{backgroundColor:n};return i.jsx("div",{title:u,className:`w-5 h-5 rounded cursor-pointer border-2 shrink-0 transition-[border-color,transform] ${c}`,style:f,onMouseEnter:()=>{l||s(u)},onClick:p=>{p.stopPropagation(),a(u)}})}const pr=w.forwardRef(function({onClose:t,children:n,...r},o){const l=w.useRef(null);return w.useEffect(()=>{var s;(s=l.current)==null||s.focus({preventScroll:!0})},[]),i.jsx("div",{ref:s=>{l.current=s,typeof o=="function"?o(s):o&&(o.current=s)},tabIndex:-1,onBlur:s=>{var a;(a=l.current)!=null&&a.contains(s.relatedTarget)||t()},onKeyDown:s=>{s.code==="Escape"&&t()},...r,children:n})}),P0=4,_0=10;function vn({values:e,currentValue:t,lockedValue:n,locked:r,ghost:o,onStart:l,onHover:s,onLeave:a,onClick:u,onRemove:c,onRemoveHover:f}){const[p,d]=w.useState(!1),[m,v]=w.useState(null),b=w.useRef(null),S=w.useRef(null),h=w.useRef(null),g=w.useRef(null),{refs:x,floatingStyles:y}=hn({open:p,strategy:"fixed",placement:"bottom-start",middleware:[cn(2),fn(),dn({padding:4})],whileElementsMounted:un}),C=n!==null&&e.includes(n),k=m!==null?e[m]:C?n:t;w.useEffect(()=>{var H,L;p&&g.current&&((L=(H=g.current).scrollIntoView)==null||L.call(H,{block:"nearest"}))},[p]);const T=r&&!C;function E(H){if(T)return;l==null||l();const L=C?n:t,U=e.indexOf(L);S.current={startX:H.clientX,startIndex:U>=0?U:0,didScrub:!1},H.currentTarget.setPointerCapture(H.pointerId),H.preventDefault()}function O(H){const L=S.current;if(!L)return;const U=H.clientX-L.startX;if(!L.didScrub&&Math.abs(U)>P0&&(L.didScrub=!0,d(!1)),L.didScrub){const Q=Math.round(U/_0),J=Math.max(0,Math.min(e.length-1,L.startIndex+Q));b.current=J,v(J),s(e[J])}}function I(){const H=S.current;if(!H)return;const L=b.current;H.didScrub&&L!==null?u(e[L]):H.didScrub||d(U=>(U&&a(),!U)),b.current=null,v(null),S.current=null}const _=m!==null,z=_?"bg-bv-teal/9 text-bv-teal ring-1 ring-bv-teal":C?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border hover:bg-bv-teal/9 hover:text-bv-teal hover:ring-bv-teal":p?"bg-bv-surface-hi text-bv-text ring-1 ring-bv-border":T?"bg-bv-surface text-bv-text-mid":o?"border border-dashed border-bv-border text-bv-muted bg-transparent hover:border-bv-teal hover:text-bv-teal":"bg-bv-surface text-bv-text-mid hover:bg-bv-surface-hi hover:text-bv-text";return i.jsxs("div",{ref:h,className:"relative inline-block",children:[i.jsxs("div",{ref:x.setReference,className:`group select-none px-2 py-0.5 rounded-md text-[11px] font-mono transition-colors ${T?"cursor-default":"cursor-ew-resize"} ${z}`,onPointerDown:E,onPointerMove:O,onPointerUp:I,children:[!T&&i.jsx("span",{className:`inline-block mr-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"‹"}),k,!T&&i.jsx("span",{className:`inline-block ml-0.5 text-[9px] transition-opacity ${_?"opacity-100":"opacity-0 group-hover:opacity-50"}`,children:"›"})]}),p&&i.jsx(pn,{children:i.jsxs(pr,{ref:x.setFloating,style:y,className:"z-50 max-h-52 overflow-y-auto bg-bv-bg border border-bv-border rounded-md shadow-md min-w-[5rem]",onPointerDown:H=>H.stopPropagation(),onMouseLeave:a,onClose:()=>{d(!1),a()},children:[c&&i.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-[3px] text-[11px] font-mono cursor-pointer border-b border-bv-border text-bv-muted hover:text-red-400 ${t===""||n===""?"text-bv-orange":""}`,onMouseEnter:f,onClick:H=>{H.stopPropagation(),c(),d(!1)},children:[i.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",className:"shrink-0 opacity-70",children:[i.jsx("circle",{cx:"6",cy:"6",r:"5.5"}),i.jsx("line",{x1:"4",y1:"4",x2:"8",y2:"8"}),i.jsx("line",{x1:"8",y1:"4",x2:"4",y2:"8"})]}),"remove"]}),e.map(H=>{const L=H===(n??t),U=L?"bg-bv-teal/9 text-bv-teal":"text-bv-text-mid hover:bg-bv-surface hover:text-bv-text";return i.jsx("div",{ref:L?g:void 0,className:`px-2.5 py-[3px] text-[11px] font-mono cursor-pointer ${U}`,onMouseEnter:()=>s(H),onClick:Q=>{Q.stopPropagation(),u(H),d(!1)},children:H},H)})]})})]})}const I0={px:.0625};function Ar(e){return isNaN(Number(e))?I0[e]??1/0:Number(e)}function yr(e,t,n){return t==="spacing"&&(n!=null&&n.spacing)?Object.keys(n.spacing).sort((o,l)=>Ar(o)-Ar(l)).map(o=>`${e}${o}`):t==="fontSize"?[...Iy]:t==="fontWeight"?[...Ay]:t==="borderRadius"?Ma:t==="lineHeight"?[...Ly]:t==="letterSpacing"?[...Oy]:t==="opacity"?Dy:[]}const A0=4,L0=10;function Fr({placeholder:e,values:t,currentValue:n,displayValue:r,formatValue:o,axis:l="x",disabled:s,onHover:a,onLeave:u,onClick:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onRemove:v,onRemoveHover:b}){const[S,h]=w.useState(!1),[g,x]=w.useState(null),y=w.useRef(null),C=w.useRef(null),k=w.useRef(null),{refs:T,floatingStyles:E}=hn({open:S,strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:4})],whileElementsMounted:un}),O=n!=null,I=n?t.indexOf(n):-1,_=g!==null?t[g]:null,z=_?o?o(_):_:r??e;w.useEffect(()=>{var P,Y;S&&k.current&&((Y=(P=k.current).scrollIntoView)==null||Y.call(P,{block:"nearest"}))},[S]);function H(P){var Z,M;if(s)return;P.preventDefault(),P.stopPropagation();const Y=I>=0?I:0;y.current={startX:P.clientX,startY:P.clientY,startIndex:Y,didScrub:!1},(M=(Z=P.target).setPointerCapture)==null||M.call(Z,P.pointerId)}function L(P){const Y=y.current;if(!Y)return;const Z=l==="y"?-(P.clientY-Y.startY):P.clientX-Y.startX;if(!Y.didScrub&&Math.abs(Z)>A0&&(Y.didScrub=!0,h(!1),f==null||f()),Y.didScrub){const M=Math.round(Z/L0),ce=Math.max(0,Math.min(t.length-1,Y.startIndex+M));x(ce),a==null||a(t[ce])}}function U(){const P=y.current;P&&(P.didScrub&&g!==null?(c==null||c(t[g]),x(null),y.current=null,p==null||p()):P.didScrub||(x(null),y.current=null,h(Y=>Y?(m==null||m(),u==null||u(),!1):(d==null||d(),!0))))}const Q=g!==null,j=["bm-slot",O||Q?"bm-has-val":"",Q?"bm-scrubbing":""].filter(Boolean).join(" "),R=s?"default":l==="y"?"ns-resize":"ew-resize";return i.jsxs("span",{ref:P=>{C.current=P,T.setReference(P)},className:j,style:{position:"relative",cursor:R},onPointerDown:H,onPointerMove:L,onPointerUp:U,role:"button",tabIndex:s?-1:0,children:[z,S&&i.jsx(pn,{children:i.jsxs(pr,{ref:T.setFloating,style:E,className:"bm-mini-dropdown",onClick:P=>P.stopPropagation(),onMouseLeave:()=>u==null?void 0:u(),onPointerDown:P=>P.stopPropagation(),onMouseDown:P=>{P.stopPropagation(),P.preventDefault()},onClose:()=>{h(!1),m==null||m(),u==null||u()},children:[v&&i.jsxs("div",{className:"bm-mini-dropdown-item bm-mini-dropdown-remove",tabIndex:-1,onMouseEnter:b,onMouseDown:P=>{P.preventDefault(),v(),h(!1),m==null||m()},children:[i.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline-block",flexShrink:0},children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),t.map(P=>{const Y=P===n;return i.jsx("div",{ref:Y?k:void 0,tabIndex:-1,className:`bm-mini-dropdown-item${Y?" bm-active":""}`,onMouseEnter:()=>a==null?void 0:a(P),onMouseDown:Z=>{Z.preventDefault(),c==null||c(P),h(!1),m==null||m()},onClick:Z=>{Z.detail===0&&(Z.stopPropagation(),c==null||c(P),h(!1),m==null||m())},onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),c==null||c(P),h(!1),m==null||m())},children:P},P)})]})})]})}function Ld(e,t){const r={padding:"p",margin:"m",border:"border-",outline:"outline-"}[t];return e.startsWith(r)?e.slice(r.length):e}function O0({value:e,placeholder:t,layer:n,frozen:r,scaleValues:o,axis:l,onClick:s,onValueChange:a,onValueHover:u,onValueLeave:c,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onValueRemove:v,onValueRemoveHover:b}){const S=e!=null,h=S?Ld(e,n):null;if(o&&o.length>0)return i.jsx(Fr,{placeholder:t,values:o,currentValue:e,displayValue:h,formatValue:x=>Ld(x,n),axis:l,disabled:r,onHover:u,onLeave:c,onClick:a,onScrubStart:f,onScrubEnd:p,onOpen:d,onClose:m,onRemove:v,onRemoveHover:b});const g=`bm-slot${S?" bm-has-val":""}`;return i.jsx("span",{className:g,onClick:r?void 0:x=>s==null?void 0:s(x.currentTarget),role:"button",tabIndex:r?-1:0,children:h??t})}const D0={top:["y","t"],right:["r"],bottom:["b"],left:["x","l"],tr:["color"],bl:["style"],br:["offset"]},$0={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"]},M0={top:"y",bottom:"y",left:"x",right:"x",tr:"x",bl:"x",br:"x"};function z0({layer:e,classState:t,shorthandValue:n,shorthandScaleValues:r,slots:o,isHovered:l,frozen:s,onHoverChange:a,onSlotClick:u,onSlotChange:c,onSlotHover:f,onScrubStart:p,onScrubEnd:d,onSlotOpen:m,onSlotClose:v,onSlotRemove:b,onSlotRemoveHover:S,children:h}){const g=`bm-layer bm-${e}${l?" bm-hovered":""}`,[x,y]=w.useState(null),C=new Map(o.map(z=>[z.key,z])),k=(t==="shorthand"||t==="mixed")&&n,T=r&&r.length>0?i.jsx("span",{className:"bm-name bm-name-scrubber",children:i.jsx(Fr,{placeholder:e,values:r,currentValue:k?n:null,displayValue:k?n:null,formatValue:z=>z,axis:"x",disabled:s,onHover:z=>f==null?void 0:f("shorthand",z),onLeave:()=>f==null?void 0:f("shorthand",null),onClick:z=>c==null?void 0:c("shorthand",z),onScrubStart:()=>{p==null||p()},onScrubEnd:d,onOpen:()=>{y("__shorthand__"),m==null||m()},onClose:()=>{y(null),v==null||v()},onRemove:b?()=>b("shorthand"):void 0,onRemoveHover:S?()=>S("shorthand"):void 0})}):k?i.jsx("span",{className:"bm-name",children:i.jsx("span",{className:"bm-val",onClick:z=>u==null?void 0:u("shorthand",z.currentTarget),children:n})}):i.jsx("span",{className:"bm-name",children:e}),O=($0[e]??[]).map(z=>{const L=(D0[z]??[]).map(R=>C.get(R)).filter(R=>R!=null);if(L.length===0)return null;const U=L.some(R=>R.value!=null),J=`bm-slot-group bm-sg-${z}${U?" bm-has-values":""}${x===z?" bm-sg-active":""}`,j=M0[z];return i.jsx("div",{className:J,children:L.map(R=>i.jsx(O0,{slotKey:R.key,value:R.value,placeholder:R.placeholder,layer:e,isExpanded:l,frozen:s,scaleValues:R.scaleValues,axis:j,onClick:P=>u==null?void 0:u(R.key,P),onValueChange:c?P=>c(R.key,P):void 0,onValueHover:f?P=>f(R.key,P):void 0,onValueLeave:f?()=>f(R.key,null):void 0,onScrubStart:p,onScrubEnd:d,onOpen:()=>{y(z),m==null||m()},onClose:()=>{y(null),v==null||v()},onValueRemove:b?()=>b(R.key):void 0,onValueRemoveHover:S?()=>S(R.key):void 0},R.key))},z)}),I=z=>{z.stopPropagation(),s||a(!0)},_=z=>{const H=z.relatedTarget,L=z.currentTarget;H&&L.contains(H)||s||a(!1)};return i.jsxs("div",{className:g,onMouseOver:I,onMouseOut:_,"data-layer":e,children:[T,O,h]})}const Od=["margin","outline","border","padding"];function K0({layers:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:a}){const[u,c]=w.useState(null),[f,p]=w.useState(null),d=t||f!==null,m=new Map(e.map(x=>[x.layer,x])),v=(x,y)=>{d||c(y?x:null)},b=(x,y,C)=>{d||n==null||n(x,y,C)};let h=i.jsx("div",{className:"bm-content"});for(let x=Od.length-1;x>=0;x--){const y=Od[x],C=m.get(y);C&&(h=i.jsx(z0,{layer:C.layer,classState:C.classState,shorthandValue:C.shorthandValue,shorthandScaleValues:C.shorthandScaleValues,slots:C.slots,isHovered:u===y||f===y,frozen:d,onHoverChange:k=>v(y,k),onSlotClick:(k,T)=>b(y,k,T),onSlotChange:r?(k,T)=>r(y,k,T):void 0,onSlotHover:o?(k,T)=>o(y,k,T):void 0,onSlotRemove:l?k=>l(y,k):void 0,onSlotRemoveHover:s?k=>s(y,k):void 0,onScrubStart:()=>{p(y),a==null||a()},onScrubEnd:()=>p(null),onSlotOpen:()=>{p(y),a==null||a()},onSlotClose:()=>p(null),children:h}))}const g=`bm-root${d?" bm-frozen":""}`;return i.jsx("div",{className:g,children:h})}const F0={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"}},H0=["y","t","r","b","x","l"];function W0(e){const t=H0.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 B0(e,t){const n=F0[e],r=W0(e),o=t[n.shorthand]??null,l=o!=null?o===""?n.shorthand:`${n.shorthand}-${o}`:null,s=r.map(({key:d,placeholder:m})=>{let v;if(d==="color"){const h=e==="outline"?"outline-color":"border-color";v=h in t?h:void 0}else if(d==="style"){const h=e==="outline"?"outline-style":"border-style";v=h in t?h:void 0}else d==="offset"?v="outline-offset"in t?"outline-offset":void 0:v=n[d];const b=v?t[v]??null:null;let S;return(d==="color"||d==="style")&&b!=null?S=`${e==="outline"?"outline":"border"}-${b}`:S=b!=null&&v?`${v}-${b}`:null,{key:d,value:S,placeholder:m}}),a=l!=null,u=s.some(d=>(d.key==="x"||d.key==="y")&&d.value!=null),c=s.some(d=>(d.key==="t"||d.key==="r"||d.key==="b"||d.key==="l")&&d.value!=null),f=u||c;let p;return!a&&!f?p="none":a&&!f?p="shorthand":!a&&u&&!c?p="axis":a?p="mixed":p="individual",{layer:e,classState:p,shorthandValue:l,slots:s}}function V0(e,t,n){var s,a,u;if(t==="color")return[];if(t==="style"){const c=e==="outline"?"outline":"border";return My.map(f=>`${c}-${f}`)}let r;e==="border"||e==="outline"?t==="offset"?r=(s=n==null?void 0:n.theme)!=null&&s.spacing?Object.keys(n.theme.spacing).sort((c,f)=>Ar(c)-Ar(f)):za:r=(a=n==null?void 0:n.theme)!=null&&a.borderWidth?Object.keys(n.theme.borderWidth):ah:r=(u=n==null?void 0:n.theme)!=null&&u.spacing?Object.keys(n.theme.spacing).sort((c,f)=>Ar(c)-Ar(f)):za;const l={margin:{shorthand:"m",t:"mt",r:"mr",b:"mb",l:"ml",x:"mx",y:"my"},padding:{shorthand:"p",t:"pt",r:"pr",b:"pb",l:"pl",x:"px",y:"py"},border:{t:"border-t",r:"border-r",b:"border-b",l:"border-l",x:"border-x",y:"border-y",offset:"outline-offset"},outline:{t:"outline-t",r:"outline-r",b:"outline-b",l:"outline-l",x:"outline-x",y:"outline-y",offset:"outline-offset"}}[e][t];return l?r.map(c=>c===""?l:`${l}-${c}`):[]}function xr(e,t){const n={};for(const s of e){let a;s.color!==void 0?a=`${s.property}-color`:s.style!==void 0?a=`${s.property}-style`:s.side!==void 0?a=s.property.length<=2?s.property+s.side:`${s.property}-${s.side}`:a=s.property;const u=s.scale??s.color??s.style??s.align??s.size??s.value??"";n[a]=u}const r={margin:"m",padding:"p",border:"border",outline:"outline"},o={margin:!1,padding:!1,border:!0,outline:!1};return["margin","outline","border","padding"].map(s=>{var p,d;const a=B0(s,n),u=a.slots.map(m=>{const v=V0(s,m.key,t);return v.length>0?{...m,scaleValues:v}:m}),f=(o[s]?(p=t==null?void 0:t.theme)!=null&&p.borderWidth?Object.keys(t.theme.borderWidth):ah:(d=t==null?void 0:t.theme)!=null&&d.spacing?Object.keys(t.theme.spacing):za).map(m=>m===""?r[s]:`${r[s]}-${m}`);return{...a,slots:u,shorthandScaleValues:f}})}const U0={tl:[1,1],t:[1,2],tr:[1,3],l:[2,1],all:[2,2],r:[2,3],bl:[3,1],b:[3,2],br:[3,3]},G0={tl:"x",t:"x",tr:"x",l:"y",all:"x",r:"y",bl:"x",b:"x",br:"x"};function $i(e){return e==="rounded"?"—":e.replace(/^rounded-/,"").replace(/^(?:tl|tr|br|bl|[trbl])-/,"")}function Y0({slot:e,frozen:t,isActive:n,onSlotClick:r,onSlotChange:o,onSlotHover:l,onSlotRemove:s,onSlotRemoveHover:a,onScrubStart:u,onScrubEnd:c,onOpen:f,onClose:p}){const[d,m]=U0[e.key],v=e.value!=null,b=`cm-slot${v?" cm-has-val":""}`,S=e.key==="all"?"cm-cell cm-cell-all cm-content":`cm-cell cm-cell-${e.key}`,h={gridRow:d,gridColumn:m},g=G0[e.key];return e.scaleValues&&e.scaleValues.length>0?i.jsx("div",{className:S,style:h,children:i.jsx(Fr,{placeholder:e.placeholder,values:e.scaleValues,currentValue:e.value,displayValue:v?$i(e.value):null,formatValue:$i,axis:g,disabled:t,onHover:x=>l(e.key,x),onLeave:()=>l(e.key,null),onClick:x=>o(e.key,x),onScrubStart:()=>u(e.key),onScrubEnd:c,onOpen:()=>f(e.key),onClose:p,onRemove:s?()=>s(e.key):void 0,onRemoveHover:a?()=>a(e.key):void 0})}):i.jsx("div",{className:S,style:h,children:i.jsx("span",{className:b,role:"button",tabIndex:t?-1:0,onClick:t?void 0:x=>r(e.key,x.currentTarget),children:v?$i(e.value):e.placeholder})})}function Q0({state:e,frozen:t=!1,onSlotClick:n,onSlotChange:r,onSlotHover:o,onSlotRemove:l,onSlotRemoveHover:s,onEditStart:a}){const[u,c]=w.useState(null),f=t||u!==null,p=new Map(e.slots.map(b=>[b.key,b])),d=p.get("all")??{key:"all",value:e.shorthandValue,placeholder:"all",scaleValues:e.shorthandScaleValues},m=["tl","t","tr","l","all","r","bl","b","br"],v=`cm-root${f?" cm-frozen":""}${u?" cm-active":""}`;return i.jsx("div",{className:v,children:i.jsx("div",{className:"cm-grid",children:m.map(b=>{const S=b==="all"?d:p.get(b)??{key:b,value:null,placeholder:b,scaleValues:void 0};return i.jsx(Y0,{slot:S,frozen:f,isActive:u===b,onSlotClick:(h,g)=>n==null?void 0:n(h,g),onSlotChange:(h,g)=>r==null?void 0:r(h,g),onSlotHover:(h,g)=>o==null?void 0:o(h,g),onSlotRemove:l,onSlotRemoveHover:s,onScrubStart:h=>{c(h),a==null||a()},onScrubEnd:()=>c(null),onOpen:h=>{c(h),a==null||a()},onClose:()=>c(null)},b)})})})}function Dd({label:e,availableProperties:t=[],onAddProperty:n,isEmpty:r=!1,classCount:o=0,children:l}){const[s,a]=w.useState(!1),[u,c]=w.useState(r),f=w.useRef(r),p=w.useRef(null);w.useEffect(()=>{f.current&&!r&&c(!1),f.current=r},[r]),w.useEffect(()=>{if(!s)return;function m(v){p.current&&!p.current.contains(v.target)&&a(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[s]);function d(m){n==null||n(m),a(!1)}return i.jsxs("div",{className:"px-4 py-3",children:[i.jsxs("div",{className:"group/sec flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>c(m=>!m),children:[i.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${u?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),i.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:e}),u&&o>0&&i.jsx("span",{className:"ml-1 px-1.5 py-0.5 rounded-full text-[9px] font-semibold leading-none bg-bv-teal/20 text-bv-teal tabular-nums",children:o}),t.length>0&&i.jsxs("div",{ref:p,className:"relative ml-auto",children:[i.jsx("button",{type:"button","aria-label":`Add ${e} property`,className:`w-5 h-5 flex items-center justify-center rounded transition-all cursor-pointer border-none ${s?"text-bv-text bg-bv-surface-hi":"text-bv-muted bg-transparent opacity-75 group-hover/sec:opacity-100 hover:text-bv-text hover:bg-bv-surface-hi"}`,onClick:m=>{m.stopPropagation(),a(v=>!v)},children:i.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M12 5v14m-7-7h14"})})}),s&&i.jsx(pr,{className:"absolute z-50 top-[calc(100%+2px)] right-0 bg-bv-bg border border-bv-border rounded-md shadow-[0_4px_16px_rgba(0,0,0,0.10)] min-w-[180px] max-w-[calc(100vw-16px)] py-1",onClose:()=>a(!1),children:t.map(m=>i.jsxs("button",{type:"button",className:"w-full px-2.5 py-[5px] text-[11px] font-[family-name:var(--font-ui)] text-bv-text-mid flex items-center gap-1.5 transition-colors hover:bg-bv-teal/10 hover:text-bv-teal cursor-pointer border-none bg-transparent text-left whitespace-nowrap",onClick:()=>d(m.prefix),children:[m.name,i.jsx("span",{className:"font-mono text-[10px] text-bv-muted group-hover:text-bv-teal/60",children:m.prefixHint})]},m.prefix))})]})]}),i.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${u?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:r?i.jsxs("div",{className:"text-[10px] text-bv-muted italic mt-2",children:["No ",e.toLowerCase()," classes — click + to add"]}):i.jsx("div",{className:"flex flex-wrap gap-1 mt-2.5",children:l})})]})}const X0=[{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 Z0({direction:e,mode:t,onHover:n,onLeave:r,onDirectionClick:o,onSolidClick:l,solidColorName:s}){const a=t==="solid";return i.jsxs("div",{className:"flex flex-col items-center shrink-0",children:[i.jsx("div",{className:"grid grid-cols-3 gap-0.5",onMouseLeave:r,children:X0.map((u,c)=>{if(u==="center"){const p=a;return i.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-xs cursor-pointer transition-all duration-150
59
- ${p?"border-[1.5px] border-bv-teal bg-bv-teal text-white":"border-[1.5px] border-bv-border bg-bv-bg text-bv-muted hover:border-bv-teal hover:bg-bv-teal/9 hover:text-bv-teal"}`,title:"Solid color",onClick:l,children:"●"},"center")}const f=!a&&e===u.dir;return i.jsx("button",{type:"button",className:`w-5 h-5 rounded-[3px] flex items-center justify-center text-[10px] cursor-pointer transition-all duration-150
60
- ${a?"opacity-35 hover:opacity-100":""}
61
- ${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(u.dir),onClick:()=>o(u.dir),children:u.arrow},u.dir)})}),i.jsx("div",{className:"text-[10px] font-mono text-bv-text-mid mt-0.75 max-w-[68px] truncate text-center",children:a?s?i.jsx("span",{className:"text-bv-text font-bold",children:s}):i.jsx("span",{className:"text-bv-muted italic",children:"none"}):i.jsxs("span",{children:["to-",i.jsx("span",{className:"text-bv-teal font-bold",children:e})]})})]})}function J0(e,t){const r=[...e].sort((o,l)=>(o.position??0)-(l.position??0)).map(o=>o.position!=null?`${o.hex} ${o.position}%`:o.hex);return`linear-gradient(${t}, ${r.join(", ")})`}function Mi(e){return Math.round(Math.max(0,Math.min(100,e))/5)*5}function q0({stop:e,isEndpoint:t,isSelected:n,onDragStart:r,onClick:o,onRemove:l}){const s=w.useRef(!1),a=w.useCallback(p=>{p.preventDefault(),p.stopPropagation(),s.current=!1,r(e.id,p.clientX);const d=()=>{s.current=!0},m=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",m)},[e.id,r]),u=w.useCallback(p=>{p.stopPropagation(),s.current||o(e.id,p.currentTarget)},[e.id,o]),c=w.useCallback(p=>{p.stopPropagation(),l(e.id)},[e.id,l]),f=e.position??0;return i.jsxs("div",{className:`absolute top-0 cursor-grab select-none z-10
62
- hover:z-20
63
- ${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:a,onClick:u,title:`${e.role}-${e.colorName}${e.position!=null?` ${e.position}%`:""}`,children:[i.jsx("svg",{viewBox:"0 0 22 26",width:22,height:26,xmlns:"http://www.w3.org/2000/svg",children:i.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&&i.jsx("div",{className:"absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-bv-orange text-white text-[9px] leading-3.5 text-center cursor-pointer z-40 hidden group-hover/handle:block hover:block!",style:{display:void 0},onClick:c,onMouseDown:p=>p.stopPropagation(),children:"×"})]})}function e1({stops:e,direction:t,onStopDrag:n,onStopDragEnd:r,onStopClick:o,onBarClick:l,onStopRemove:s,selectedStopId:a}){const u=w.useRef(null),c=w.useRef(null),f=[...e].sort((v,b)=>(v.position??0)-(b.position??0)),p=w.useCallback((v,b)=>{const S=e.find(x=>x.id===v);if(!S)return;c.current={stopId:v,startX:b,startPos:S.position??0};const h=x=>{const y=c.current;if(!y||!u.current)return;const C=u.current.getBoundingClientRect(),T=(x.clientX-y.startX)/C.width*100,E=Mi(y.startPos+T);n(y.stopId,E)},g=x=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",g);const y=c.current;if(y&&u.current){const C=u.current.getBoundingClientRect(),T=(x.clientX-y.startX)/C.width*100,E=Mi(y.startPos+T);r(y.stopId,E)}c.current=null};document.addEventListener("mousemove",h),document.addEventListener("mouseup",g)},[e,n,r]),d=w.useCallback(v=>{if(!u.current)return;const b=u.current.getBoundingClientRect(),S=(v.clientX-b.left)/b.width*100;l(Mi(S))},[l]),m=J0(f,t);return i.jsxs("div",{className:"relative flex-1 min-w-0",style:{paddingTop:28},children:[f.map((v,b)=>i.jsx(q0,{stop:v,isEndpoint:b===0||b===f.length-1,isSelected:v.id===a,onDragStart:p,onClick:o,onRemove:s},v.id)),i.jsx("div",{ref:u,className:"h-9 rounded-md cursor-pointer relative",style:{background:m,border:"1px solid rgba(0,0,0,0.08)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)"},onClick:d,children:i.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 t1={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 n1(e){var Kt,Fn;const{direction:t,stops:n,mode:r,solidColorName:o,solidColorHex:l,onPreview:s,onPreviewBatch:a,onRevert:u,onStage:c}=e,[f,p]=w.useState(t),[d,m]=w.useState(n),[v,b]=w.useState(r),[S,h]=w.useState(o),[g,x]=w.useState(l),[y,C]=w.useState(null),[k,T]=w.useState(!1),[E,O]=w.useState(null),[I,_]=w.useState(null),z=w.useRef(n.length+1),H=w.useCallback(ne=>{if(v==="gradient")s(`bg-gradient-to-${f}`,`bg-gradient-to-${ne}`);else{const le=S??"slate-500",ie=S?`bg-${S}`:"";a([{oldClass:ie,newClass:`bg-gradient-to-${ne}`},{oldClass:"",newClass:`from-${le}`},{oldClass:"",newClass:`to-${le}`}])}},[f,v,S,s,a]),L=w.useCallback(()=>{u()},[u]),U=w.useCallback(ne=>{if(p(ne),b("gradient"),v==="gradient"&&d.length>=2){const le=`bg-gradient-to-${f}`,ie=`bg-gradient-to-${ne}`;c(le,ie)}else{const le=S??"slate-500",ie=g??Zn(le,e.colors),N={id:"1",role:"from",colorName:le,hex:ie,position:0},D={id:"2",role:"to",colorName:le,hex:ie,position:100};z.current=3,m([N,D]);const K=S?`bg-${S}`:"";c(K,`bg-gradient-to-${ne}`),c("",`from-${le}`),c("",`to-${le}`)}},[f,v,d,S,g,e.colors,c]),Q=w.useCallback(()=>{b("solid"),T(!1),C(null),O(null),d.length>0&&!S&&(h(d[0].colorName),x(d[0].hex))},[d,S]),J=w.useCallback((ne,le)=>{m(N=>N.map(D=>D.id===ne?{...D,position:le}:D));const ie=d.find(N=>N.id===ne);if(ie){const N=ie.position!=null?`${ie.role}-${ie.position}%`:"",D=`${ie.role}-${le}%`;s(N,D)}},[d,s]),j=w.useCallback((ne,le)=>{m(N=>N.map(D=>D.id===ne?{...D,position:le}:D));const ie=d.find(N=>N.id===ne);if(ie){const N=ie.position!=null?`${ie.role}-${ie.position}%`:"",D=`${ie.role}-${le}%`;c(N,D)}},[d,c]),R=w.useCallback((ne,le)=>{y===ne&&k?(C(null),T(!1),O(null),_(null)):(C(ne),T(!0),O("stop"),_(le))},[y,k]),P=w.useCallback(ne=>{const le=String(z.current++),ie=[...d].sort((K,q)=>(K.position??0)-(q.position??0));let N=ie[0];for(const K of ie)(K.position??0)<=ne&&(N=K);const D={id:le,role:"via",colorName:(N==null?void 0:N.colorName)??"gray-500",hex:(N==null?void 0:N.hex)??"#6B7280",position:ne};m(K=>[...K,D]),C(le),T(!0),O("stop")},[d]),Y=w.useCallback(ne=>{const le=d.find(N=>N.id===ne);if(!le)return;const ie=d.filter(N=>N.id!==ne);if(C(null),T(!1),O(null),_(null),ie.length>=2)m(ie),c(`${le.role}-${le.colorName}`,"");else if(ie.length===1){const N=ie[0];m([]),b("solid"),h(N.colorName),x(N.hex),c(`bg-gradient-to-${f}`,""),d.forEach(D=>c(`${D.role}-${D.colorName}`,"")),c("",`bg-${N.colorName}`)}else m([]),b("none"),h(null),x(null),c(`bg-gradient-to-${f}`,""),d.forEach(N=>c(`${N.role}-${N.colorName}`,""))},[d,f,c]),Z=w.useCallback(ne=>{T(!0),O("solid"),C(null),_(ne)},[]),M=w.useCallback(()=>{s(S?`bg-${S}`:"","")},[S,s]),ce=w.useCallback(()=>{S&&c(`bg-${S}`,""),h(null),x(null),T(!1),O(null),_(null)},[S,c]),de=w.useCallback(ne=>{if(E==="stop"&&y){const le=d.find(ie=>ie.id===y);le&&s(`${le.role}-${le.colorName}`,ne)}else E==="solid"&&s(`bg-${S}`,ne)},[E,y,d,S,s]),W=w.useCallback(()=>{u()},[u]),ye=w.useCallback(ne=>{if(E==="stop"&&y){const le=d.find(ie=>ie.id===y);if(le){const ie=le.role+"-",N=ne.startsWith(ie)?ne.slice(ie.length):ne;m(D=>D.map(K=>K.id===y?{...K,colorName:N,hex:Zn(N,e.colors)}:K)),c(`${le.role}-${le.colorName}`,`${le.role}-${N}`),T(!1),C(null),O(null),_(null)}}else if(E==="solid"){const le="bg-",ie=ne.startsWith(le)?ne.slice(le.length):ne,N=S?`bg-${S}`:"";h(ie),x(Zn(ie,e.colors)),c(N,`bg-${ie}`),T(!1),O(null),_(null)}},[E,y,d,S,c,e.colors]),ve=w.useCallback(()=>{T(!1),C(null),O(null),_(null),u()},[u]),to=E==="stop"&&y?(((Kt=d.find(ne=>ne.id===y))==null?void 0:Kt.role)??"from")+"-":"bg-",no=E==="stop"&&y?((Fn=d.find(ne=>ne.id===y))==null?void 0:Fn.colorName)??"":S??"",hr=t1[f],oo=!!(y?d.find(ne=>ne.id===y):null);return{direction:f,stops:d,mode:v,solidColorName:S,solidColorHex:g,selectedStopId:y,colorPickerOpen:k,editingTarget:E,anchorEl:I,colorPrefix:to,colorPickerCurrentValue:no,directionCSS:hr,selectedStopIsRemovable:oo,handleDirectionHover:H,handleDirectionLeave:L,handleDirectionClick:U,handleSolidToggle:Q,handleStopDrag:J,handleStopDragEnd:j,handleStopClick:R,handleBarClick:P,handleStopRemove:Y,handleSwatchClick:Z,handleHoverRemoveSolid:M,handleRemoveSolid:ce,handleColorHover:de,handleColorLeave:W,handleColorClick:ye,handleCloseColorPicker:ve}}function Zn(e,t){if(console.log(`[resolveColorHex] Looking up colorName="${e}", available top-level keys:`,Object.keys(t).join(", ")),typeof t[e]=="string")return console.log(`[resolveColorHex] Found direct match: colors["${e}"] = "${t[e]}"`),t[e];if(t[e]&&typeof t[e]=="object"&&typeof t[e].DEFAULT=="string")return console.log(`[resolveColorHex] Found DEFAULT match: colors["${e}"].DEFAULT = "${t[e].DEFAULT}"`),t[e].DEFAULT;const n=e.lastIndexOf("-");if(n>0){const r=e.slice(0,n),o=e.slice(n+1);if(console.log(`[resolveColorHex] Trying hue="${r}" shade="${o}", colors["${r}"] =`,typeof t[r],t[r]?Object.keys(t[r]).slice(0,5).join(", "):"undefined"),t[r]&&typeof t[r][o]=="string")return console.log(`[resolveColorHex] Found hue-shade match: colors["${r}"]["${o}"] = "${t[r][o]}"`),t[r][o]}return console.warn(`[resolveColorHex] FALLBACK #888888 for colorName="${e}" — color not found in config`),"#888888"}function r1(e){const t=n1(e),n=t.mode==="solid",{refs:r,floatingStyles:o,context:l}=hn({open:t.colorPickerOpen,onOpenChange:u=>{u||t.handleCloseColorPicker()},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ga({apply({availableHeight:u,elements:c}){Object.assign(c.floating.style,{maxHeight:`${u}px`})},padding:8})],whileElementsMounted:un}),s=ir(l),{getFloatingProps:a}=ar([s]);return w.useEffect(()=>{t.anchorEl&&r.setReference(t.anchorEl)},[t.anchorEl]),i.jsxs("div",{className:"group",children:[i.jsxs("div",{className:"flex items-start gap-2.5 mb-2",children:[i.jsx(Z0,{direction:t.direction,mode:t.mode,onHover:t.handleDirectionHover,onLeave:t.handleDirectionLeave,onDirectionClick:t.handleDirectionClick,onSolidClick:t.handleSolidToggle,solidColorName:t.solidColorName}),n?i.jsx("div",{className:"flex-1 min-w-0 self-stretch rounded-md cursor-pointer relative overflow-hidden",style:{background:t.solidColorHex??"transparent",border:"1px solid rgba(255,255,255,0.12)",boxShadow:"inset 0 1px 2px rgba(0,0,0,0.06)",minHeight:36},onClick:u=>t.handleSwatchClick(u.currentTarget),title:t.solidColorName?`bg-${t.solidColorName}`:"Click to pick color",children:!t.solidColorHex&&i.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:[i.jsx("line",{x1:"4",y1:"4",x2:"96",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"}),i.jsx("line",{x1:"96",y1:"4",x2:"4",y2:"96",stroke:"#F5532D",strokeWidth:"3",strokeLinecap:"round"})]})}):i.jsx(e1,{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&&i.jsx(pn,{children:i.jsxs("div",{ref:r.setFloating,style:{...o,zIndex:9999,overflowY:"auto"},...a(),children:[i.jsx(Ul,{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&&i.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"})]})}),i.jsx("div",{className:"min-h-[1rem] text-[10px] text-bv-muted italic opacity-0 invisible transition-opacity duration-150 group-hover:opacity-100 group-hover:visible group-focus-within:opacity-100 group-focus-within:visible",children:n?"Click the swatch to change color · Click a direction arrow for gradient":"Click handles to change color · Drag to reposition · Click bar to add stop"})]})}function o1(e,t,n){var x;const r=new Map;for(const y of e)r.set(y.fullClass,!0);if(n)for(const y of n)y.kind==="class-change"&&y.status==="staged"&&(y.originalClass&&r.delete(y.originalClass),y.newClass&&r.set(y.newClass,!0));const o=e.find(y=>y.property==="bg-gradient-to"),l=Array.from(r.keys()).find(y=>y.startsWith("bg-gradient-to-")),a=(l==null?void 0:l.replace("bg-gradient-to-",""))||(o==null?void 0:o.fullClass.slice(15))||"r",c=((x=Array.from(r.keys()).filter(y=>y.startsWith("bg-")&&!y.startsWith("bg-gradient-to-"))[0])==null?void 0:x.replace("bg-",""))??null,f=(c==null?void 0:c.split("/")[0])??null,p=f?Zn(f,t):null,d=Array.from(r.keys()),m=d.filter(y=>y.startsWith("from-")),v=d.filter(y=>y.startsWith("via-")),b=d.filter(y=>y.startsWith("to-")),S=!!(l||m.length>0&&b.length>0),h=S?"gradient":"solid",g=[];if(S){let y=1;for(const C of m){const k=C.replace("from-",""),T=k.split("/")[0];g.push({id:String(y++),role:"from",colorName:k,hex:Zn(T,t),position:null})}for(const C of v){const k=C.replace("via-",""),T=k.split("/")[0];g.push({id:String(y++),role:"via",colorName:k,hex:Zn(T,t),position:null})}for(const C of b){const k=C.replace("to-",""),T=k.split("/")[0];g.push({id:String(y++),role:"to",colorName:k,hex:Zn(T,t),position:null})}}return{direction:a,stops:g,mode:h,solidColorName:c,solidColorHex:p,colors:t}}const ze="#00848B",cr="rgba(0,132,139,0.18)",l1="#F5532D",bt="#4a4a4a",$n="#333333",De="#999999",Je="'Roboto Mono', 'Menlo', ui-monospace, monospace",$t={width:60,height:60,borderRadius:5,borderWidth:"1.5px",borderStyle:"solid",borderColor:bt,background:$n,display:"flex",padding:4,overflow:"hidden",transition:"border-color 150ms ease-in-out, background-color 150ms ease-in-out, box-shadow 150ms ease-in-out",boxSizing:"border-box"},Ya={background:ze,opacity:.65,borderRadius:2,flexShrink:0,transition:"opacity 150ms ease-in-out"},$d={...Ya,opacity:.9},Mh={flexShrink:0,background:l1,opacity:.18,borderRadius:1,transition:"opacity 150ms ease-in-out"},s1={...Mh,opacity:.38};function Gt({label:e,isActive:t,containerStyle:n,onClick:r,onHover:o,children:l}){const[s,a]=w.useState(!1),u=t||s,c={...$t,borderColor:u?ze:bt,background:u?cr:$n,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",...n};return i.jsxs("div",{className:"cursor-pointer",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onMouseEnter:()=>{a(!0),o==null||o()},onMouseLeave:()=>a(!1),onClick:r,children:[i.jsx("div",{style:c,children:l(u)}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:u?ze:De,fontWeight:u?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e})]})}const zi=[{value:"flex-row",label:"row",arrow:"→"},{value:"flex-col",label:"col",arrow:"↓"},{value:"flex-row-reverse",label:"row-reverse",arrow:"←"},{value:"flex-col-reverse",label:"col-reverse",arrow:"↑"}];function zh({direction:e,color:t}){const n={stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};switch(e){case"flex-row":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"5",y1:"15",x2:"25",y2:"15",...n}),i.jsx("polyline",{points:"19,9 25,15 19,21",...n})]});case"flex-col":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"15",y1:"5",x2:"15",y2:"25",...n}),i.jsx("polyline",{points:"9,19 15,25 21,19",...n})]});case"flex-row-reverse":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"25",y1:"15",x2:"5",y2:"15",...n}),i.jsx("polyline",{points:"11,9 5,15 11,21",...n})]});case"flex-col-reverse":return i.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30",children:[i.jsx("line",{x1:"15",y1:"25",x2:"15",y2:"5",...n}),i.jsx("polyline",{points:"9,11 15,5 21,11",...n})]})}}function i1({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,a]=w.useState(!1),{refs:u,floatingStyles:c,context:f}=hn({open:s,onOpenChange:k=>{k||(a(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),p=ir(f),{getReferenceProps:d,getFloatingProps:m}=ar([p]),v=t!==null&&zi.some(k=>k.value===t),b=n&&!v,S=v?t:e??"",h=zi.find(k=>k.value===S),g=!h;function x(){a(!1),o()}function y(){b||a(k=>(k&&o(),!k))}const C=g?{...$t,borderStyle:"dashed",borderColor:s?ze:bt,background:s?cr:"transparent",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer"}:{...$t,borderColor:s?ze:bt,background:s?cr:$n,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer"};return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Direction"}),i.jsxs("div",{ref:u.setReference,role:"button",tabIndex:b?-1:0,"aria-label":"Direction",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&y()},onClick:y,...d(),children:[i.jsx("div",{style:C,children:h?i.jsx(zh,{direction:h.value,color:s?ze:De}):i.jsx("span",{style:{fontSize:10,fontFamily:Je,color:De},children:"—"})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?ze:De,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:(h==null?void 0:h.label)??"—"})]}),s&&i.jsx(pn,{children:i.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...m(),children:i.jsx(pr,{style:{background:"#1e1e1e",border:`1px solid ${bt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:x,children:i.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:zi.map(k=>{const T=k.value===S;return i.jsx(a1,{option:k,isActive:T,onHover:()=>r(k.value),onClick:()=>{l(k.value),x()}},k.value)})})})})})]})}function a1({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=w.useState(!1),s=t||o,a={...$t,borderColor:s?ze:bt,background:s?cr:$n,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[i.jsx("div",{style:a,children:i.jsx(zh,{direction:e.value,color:s?ze:De})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?ze:De,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}const Ki=[{value:"flex-nowrap",label:"no-wrap"},{value:"flex-wrap",label:"wrap"},{value:"flex-wrap-reverse",label:"wrap-reverse"}],u1=e=>({stroke:e,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"});function Kh({mode:e,color:t}){const n=u1(t),r={...n,strokeDasharray:"2 3"};return e==="flex-nowrap"?i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("polyline",{points:"31,1 37,7 31,13",...n})]}):e==="flex-wrap"?i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("line",{x1:"37",y1:"7",x2:"3",y2:"33",...r}),i.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),i.jsx("polyline",{points:"31,27 37,33 31,39",...n})]}):i.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",children:[i.jsx("line",{x1:"3",y1:"33",x2:"37",y2:"33",...n}),i.jsx("line",{x1:"37",y1:"33",x2:"3",y2:"7",...r}),i.jsx("line",{x1:"3",y1:"7",x2:"37",y2:"7",...n}),i.jsx("polyline",{points:"31,1 37,7 31,13",...n})]})}function c1({option:e,isActive:t,onHover:n,onClick:r}){const[o,l]=w.useState(!1),s=t||o,a={...$t,borderColor:s?ze:bt,background:s?cr:$n,boxShadow:t?"0 0 0 2px rgba(0,132,139,0.35)":"none",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,cursor:"pointer"},onMouseEnter:()=>{l(!0),n()},onMouseLeave:()=>l(!1),onClick:r,children:[i.jsx("div",{style:a,children:i.jsx(Kh,{mode:e.value,color:s?ze:De})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?ze:De,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:e.label})]})}function d1({currentValue:e,lockedValue:t,locked:n,onHover:r,onLeave:o,onClick:l}){const[s,a]=w.useState(!1),{refs:u,floatingStyles:c,context:f}=hn({open:s,onOpenChange:k=>{k||(a(!1),o())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),p=ir(f),{getReferenceProps:d,getFloatingProps:m}=ar([p]),v=t!==null&&Ki.some(k=>k.value===t),b=n&&!v,S=!v&&e===null,h=v?t:e??"",g=Ki.find(k=>k.value===h),x=(g==null?void 0:g.label)??"Wrap";function y(){a(!1),o()}function C(){b||a(k=>(k&&o(),!k))}return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Wrap"}),i.jsxs("div",{ref:u.setReference,role:"button",tabIndex:b?-1:0,"aria-label":"Wrap",style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3},onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&C()},onClick:C,...d(),children:[S?i.jsx("div",{style:{...$t,borderStyle:"dashed",borderColor:s?ze:bt,background:s?cr:"transparent",alignItems:"center",justifyContent:"center"},children:i.jsx("span",{style:{fontSize:10,fontFamily:Je,color:De},children:"—"})}):i.jsx("div",{style:{...$t,borderColor:s?ze:bt,background:s?cr:$n,boxShadow:s?"0 0 0 2px rgba(0,132,139,0.18)":"none",alignItems:"center",justifyContent:"center"},children:i.jsx(Kh,{mode:h,color:s?ze:De})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:s?ze:De,fontWeight:s?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:x})]}),s&&i.jsx(pn,{children:i.jsx("div",{ref:u.setFloating,style:c,className:"z-[9999]",...m(),children:i.jsx(pr,{style:{background:"#1e1e1e",border:`1px solid ${bt}`,borderRadius:8,boxShadow:"0 4px 16px rgba(0,0,0,0.35)",padding:8},onMouseLeave:o,onClose:y,children:i.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:"repeat(3, 60px)"},children:Ki.map(k=>{const T=k.value===h;return i.jsx(c1,{option:k,isActive:T,onHover:()=>r(k.value),onClick:()=>{l(k.value),y()}},k.value)})})})})})]})}function f1({flexDirection:e="row",activeValue:t,onSelect:n,onHover:r}){const o=e.startsWith("column"),l=e;function s(d,m){const v=m?$d:Ya;return o?{...v,width:"100%",height:d}:{...v,width:d,height:"100%"}}function a(d){const m=d?$d:Ya;return o?{...m,flex:1,width:"100%"}:{...m,flex:1,height:"100%"}}function u(d,m){return{...m?s1:Mh,flex:d}}const c=d=>t===d,f=d=>()=>n==null?void 0:n(d),p=d=>()=>r==null?void 0:r(d);return i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 60px)",gap:4},children:[i.jsx(Gt,{label:"start",isActive:c("justify-start"),onClick:f("justify-start"),onHover:p("justify-start"),containerStyle:{flexDirection:l,justifyContent:"flex-start",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})}),i.jsx(Gt,{label:"center",isActive:c("justify-center"),onClick:f("justify-center"),onHover:p("justify-center"),containerStyle:{flexDirection:l,justifyContent:"center",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})}),i.jsx(Gt,{label:"stretch",isActive:c("justify-stretch"),onClick:f("justify-stretch"),onHover:p("justify-stretch"),containerStyle:{flexDirection:l,gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:a(d)}),i.jsx("div",{style:a(d)}),i.jsx("div",{style:a(d)})]})}),i.jsx(Gt,{label:"between",isActive:c("justify-between"),onClick:f("justify-between"),onHover:p("justify-between"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)})]})}),i.jsx(Gt,{label:"around",isActive:c("justify-around"),onClick:f("justify-around"),onHover:p("justify-around"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(2,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)})]})}),i.jsx(Gt,{label:"evenly",isActive:c("justify-evenly"),onClick:f("justify-evenly"),onHover:p("justify-evenly"),containerStyle:{flexDirection:l},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)}),i.jsx("div",{style:s(12,d)}),i.jsx("div",{style:u(1,d)})]})}),i.jsx(Gt,{label:"end",isActive:c("justify-end"),onClick:f("justify-end"),onHover:p("justify-end"),containerStyle:{flexDirection:l,justifyContent:"flex-end",gap:2},children:d=>i.jsxs(i.Fragment,{children:[i.jsx("div",{style:s(10,d)}),i.jsx("div",{style:s(14,d)}),i.jsx("div",{style:s(8,d)})]})})]})}const nn="bg-bv-teal/50 rounded-[2px] shrink-0 group-hover:bg-bv-teal/70 transition-colors duration-150",p1="bg-bv-orange/10 rounded-[2px]";function Xt({isCol:e,main:t}){return i.jsx("div",{className:nn,style:e?{height:t}:{width:t}})}function Wn({flex:e=1}){return i.jsx("div",{className:p1,style:{flex:e}})}function Bt({isCol:e,w:t,h:n}){return i.jsx("div",{className:nn,style:e?{width:n,height:t}:{width:t,height:n}})}function Fi({isCol:e,w:t,h:n,pt:r}){return i.jsx("div",{className:`${nn} text-[5px] text-white/80 leading-none overflow-hidden text-center`,style:e?{width:n,height:t,paddingLeft:r}:{width:t,height:n,paddingTop:r},children:"t"})}function Hi(e){return i.jsxs(i.Fragment,{children:[i.jsx(Xt,{isCol:e,main:10}),i.jsx(Xt,{isCol:e,main:14}),i.jsx(Xt,{isCol:e,main:8})]})}const Md=[{value:"justify-start",label:"start",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-start",gap:2}),renderItems:e=>Hi(e.startsWith("column"))},{value:"justify-center",label:"center",getContainerStyle:e=>({flexDirection:e,justifyContent:"center",gap:2}),renderItems:e=>Hi(e.startsWith("column"))},{value:"justify-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,gap:2}),renderItems:()=>i.jsxs(i.Fragment,{children:[i.jsx("div",{className:`${nn} flex-1`}),i.jsx("div",{className:`${nn} flex-1`}),i.jsx("div",{className:`${nn} flex-1`})]})},{value:"justify-between",label:"between",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Xt,{isCol:t,main:12}),i.jsx(Wn,{}),i.jsx(Xt,{isCol:t,main:12})]})}},{value:"justify-around",label:"around",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Wn,{flex:1}),i.jsx(Xt,{isCol:t,main:12}),i.jsx(Wn,{flex:2}),i.jsx(Xt,{isCol:t,main:12}),i.jsx(Wn,{flex:1})]})}},{value:"justify-evenly",label:"evenly",getContainerStyle:e=>({flexDirection:e}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Wn,{}),i.jsx(Xt,{isCol:t,main:12}),i.jsx(Wn,{}),i.jsx(Xt,{isCol:t,main:12}),i.jsx(Wn,{})]})}},{value:"justify-end",label:"end",getContainerStyle:e=>({flexDirection:e,justifyContent:"flex-end",gap:2}),renderItems:e=>Hi(e.startsWith("column"))}],Wi=[{value:"items-start",label:"start",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-start",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Bt,{isCol:t,w:13,h:22}),i.jsx(Bt,{isCol:t,w:15,h:42}),i.jsx(Bt,{isCol:t,w:11,h:14})]})}},{value:"items-center",label:"center",getContainerStyle:e=>({flexDirection:e,alignItems:"center",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Bt,{isCol:t,w:13,h:22}),i.jsx(Bt,{isCol:t,w:15,h:42}),i.jsx(Bt,{isCol:t,w:11,h:14})]})}},{value:"items-baseline",label:"baseline",getContainerStyle:e=>({flexDirection:e,alignItems:"baseline",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Fi,{isCol:t,w:13,h:38,pt:17}),i.jsx(Fi,{isCol:t,w:15,h:26,pt:3}),i.jsx(Fi,{isCol:t,w:11,h:32,pt:10})]})}},{value:"items-stretch",label:"stretch",getContainerStyle:e=>({flexDirection:e,alignItems:"stretch",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:nn,style:t?{height:13}:{width:13}}),i.jsx("div",{className:nn,style:t?{height:15}:{width:15}}),i.jsx("div",{className:nn,style:t?{height:11}:{width:11}})]})}},{value:"items-end",label:"end",getContainerStyle:e=>({flexDirection:e,alignItems:"flex-end",gap:3}),renderItems:e=>{const t=e.startsWith("column");return i.jsxs(i.Fragment,{children:[i.jsx(Bt,{isCol:t,w:13,h:22}),i.jsx(Bt,{isCol:t,w:15,h:42}),i.jsx(Bt,{isCol:t,w:11,h:14})]})}}];function h1({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:a,onRemoveHover:u}){const[c,f]=w.useState(!1),{refs:p,floatingStyles:d,context:m}=hn({open:c,onOpenChange:I=>{I||(f(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),v=ir(m),{getReferenceProps:b,getFloatingProps:S}=ar([v]),h=t!==null&&Md.some(I=>I.value===t),g=n&&!h,x=!h&&(e===null||e===""),y=h?t:e??"",C=Md.find(I=>I.value===y),k=(C==null?void 0:C.label)??"—";function T(){f(!1),l()}function E(){g||f(I=>(I&&l(),!I))}const O={...$t,borderStyle:"dashed",alignItems:"center",justifyContent:"center"};return i.jsxs("div",{className:"flex flex-col items-start gap-1",children:[i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De,fontWeight:500},children:"JUSTIFY →"}),i.jsx("div",{ref:p.setReference,className:"cursor-pointer",role:"button",tabIndex:g?-1:0,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&E()},onClick:E,...b(),children:x?i.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i.jsx("div",{style:O,children:i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De},children:"—"})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De},children:"none"})]}):i.jsx(Gt,{label:k,isActive:c,containerStyle:(C==null?void 0:C.getContainerStyle(r))??{flexDirection:r},children:I=>(C==null?void 0:C.renderItems(r))??null})}),c&&i.jsx(pn,{children:i.jsx("div",{ref:p.setFloating,style:d,className:"z-[9999]",...S(),children:i.jsxs(pr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:T,children:[a&&i.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{a(),T()},children:[i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),i.jsx(f1,{flexDirection:r,activeValue:y,onSelect:I=>{s(I),T()},onHover:o})]})})})]})}function m1({currentValue:e,lockedValue:t,locked:n,flexDirection:r="row",onHover:o,onLeave:l,onClick:s,onRemove:a,onRemoveHover:u}){const[c,f]=w.useState(!1),{refs:p,floatingStyles:d,context:m}=hn({open:c,onOpenChange:_=>{_||(f(!1),l())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8})],whileElementsMounted:un}),v=ir(m),{getReferenceProps:b,getFloatingProps:S}=ar([v]),h=t!==null&&Wi.some(_=>_.value===t),g=n&&!h,x=!h&&(e===null||e===""),y=h?t:e??"",C=Wi.find(_=>_.value===y),k=(C==null?void 0:C.label)??"—",T=r;function E(){f(!1),l()}function O(){g||f(_=>(_&&l(),!_))}const I=x?{...$t,borderStyle:"dashed",borderColor:bt,background:$n,cursor:g?"default":"pointer",alignItems:"center",justifyContent:"center"}:{...$t,borderColor:c?ze:bt,background:c?"rgba(0,132,139,0.09)":$n,cursor:g?"default":"pointer",...C?C.getContainerStyle(r):{}};return i.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:2},children:[i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Align ↓"}),i.jsx("div",{ref:p.setReference,role:"button",tabIndex:g?-1:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&O()},onClick:O,...b(),children:i.jsx("div",{style:I,children:x?i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:De},children:"—"}):C==null?void 0:C.renderItems(r)})}),i.jsx("span",{style:{fontSize:9,fontFamily:Je,color:c?ze:De,fontWeight:c?600:400,textAlign:"center",transition:"color 150ms ease-in-out"},children:x?"—":k}),c&&i.jsx(pn,{children:i.jsx("div",{ref:p.setFloating,style:d,className:"z-[9999]",...S(),children:i.jsxs(pr,{className:"bg-bv-bg border border-bv-border rounded-lg shadow-lg p-2 flex flex-col gap-1",onMouseLeave:l,onClose:E,children:[a&&i.jsxs("div",{className:"flex items-center gap-1.5 px-1.5 py-1 text-[10px] font-mono text-bv-muted border-b border-bv-border mb-1 pb-1.5 cursor-pointer transition-colors duration-150 hover:text-bv-orange",onMouseEnter:u,onMouseLeave:l,onClick:()=>{a(),E()},children:[i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",className:"shrink-0",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),"remove"]}),i.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 60px)",gap:4},children:Wi.map(_=>i.jsx(Gt,{label:_.label,isActive:_.value===y,containerStyle:{flexDirection:T,..._.getContainerStyle(r)},onHover:()=>o(_.value),onClick:()=>{s(_.value),E()},children:z=>_.renderItems(r)},_.value))})]})})})]})}function zd(e){return e.replace(/^gap-x-/,"x-")}function Kd(e){return e.replace(/^gap-y-/,"y-")}function g1({slots:e,onSlotChange:t,onSlotHover:n,onSlotRemove:r,onSlotRemoveHover:o}){const[l,s]=w.useState(null),[a,u]=w.useState(null),c=e.find(S=>S.key==="gap"),f=e.find(S=>S.key==="gap-x"),p=e.find(S=>S.key==="gap-y");function d(S,h){u(h!=null?S:null),n==null||n(S,h)}function m(S){u(S)}function v(){u(null)}const b=a==="gap-x"?"gm-active-x":a==="gap-y"?"gm-active-y":a==="gap"?"gm-active-gap":"";return i.jsx("div",{className:"gm-root",children:i.jsxs("div",{className:`gm-grid${b?` ${b}`:""}`,children:[i.jsx("div",{className:"gm-col-highlight",style:{gridArea:"1 / 2 / 4 / 3"}}),i.jsx("div",{className:"gm-row-highlight",style:{gridArea:"2 / 1 / 3 / 4"}}),i.jsx("div",{className:"gm-box gm-box-tl",style:{gridArea:"1 / 1"}}),i.jsx("div",{className:"gm-cell",style:{gridArea:"1 / 2"},onMouseEnter:()=>m("gap-x"),onMouseLeave:v,children:(f==null?void 0:f.scaleValues)&&i.jsx(Fr,{placeholder:"x",values:f.scaleValues,currentValue:f.value,displayValue:f.value?zd(f.value):null,formatValue:zd,axis:"x",disabled:l!==null&&l!=="gap-x",onHover:S=>d("gap-x",S),onLeave:()=>d("gap-x",null),onClick:S=>t==null?void 0:t("gap-x",S),onOpen:()=>s("gap-x"),onClose:()=>s(null),onScrubStart:()=>s("gap-x"),onScrubEnd:()=>s(null),onRemove:f.value?()=>r==null?void 0:r("gap-x"):void 0,onRemoveHover:f.value?()=>{u(null),o==null||o("gap-x")}:void 0})}),i.jsx("div",{className:"gm-box gm-box-tr",style:{gridArea:"1 / 3"}}),i.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 1"},onMouseEnter:()=>m("gap-y"),onMouseLeave:v,children:(p==null?void 0:p.scaleValues)&&i.jsx(Fr,{placeholder:"y",values:p.scaleValues,currentValue:p.value,displayValue:p.value?Kd(p.value):null,formatValue:Kd,axis:"y",disabled:l!==null&&l!=="gap-y",onHover:S=>d("gap-y",S),onLeave:()=>d("gap-y",null),onClick:S=>t==null?void 0:t("gap-y",S),onOpen:()=>s("gap-y"),onClose:()=>s(null),onScrubStart:()=>s("gap-y"),onScrubEnd:()=>s(null),onRemove:p.value?()=>r==null?void 0:r("gap-y"):void 0,onRemoveHover:p.value?()=>{u(null),o==null||o("gap-y")}:void 0})}),i.jsx("div",{className:"gm-cell",style:{gridArea:"2 / 2"},onMouseEnter:()=>m("gap"),onMouseLeave:v,children:(c==null?void 0:c.scaleValues)&&i.jsx(Fr,{placeholder:"gap",values:c.scaleValues,currentValue:c.value,displayValue:c.value??null,axis:"x",disabled:l!==null&&l!=="gap",onHover:S=>d("gap",S),onLeave:()=>d("gap",null),onClick:S=>t==null?void 0:t("gap",S),onOpen:()=>s("gap"),onClose:()=>s(null),onScrubStart:()=>s("gap"),onScrubEnd:()=>s(null),onRemove:c.value?()=>r==null?void 0:r("gap"):void 0,onRemoveHover:c.value?()=>{u(null),o==null||o("gap")}:void 0})}),i.jsx("div",{className:"gm-box gm-box-bl",style:{gridArea:"3 / 1"}})]})})}const Fh={shadow:"Shadow","inset-shadow":"Inset Shadow",ring:"Ring","inset-ring":"Inset Ring","text-shadow":"Text Shadow"},Fd={shadow:"shadow-md","inset-shadow":"inset-shadow-sm",ring:"ring-2","inset-ring":"inset-ring-2","text-shadow":"text-shadow-md"};function y1(e){switch(e){case"shadow":return[...Bu];case"inset-shadow":return[...sh];case"ring":return[...$a];case"inset-ring":return[...$a];case"text-shadow":return[...Vu]}}function Hd(e,t){return`${e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-"}${t}`}function x1(e,t){const n=e==="shadow"?"shadow-":e==="inset-shadow"?"inset-shadow-":e==="ring"?"ring-":e==="inset-ring"?"inset-ring-":"text-shadow-";return t.startsWith(n)?t.slice(n.length):t}function v1(e){if(e.isNone||!e.sizeClass)return"none";const t=r=>{if(!e.colorHex)return r;if(e.opacity!==null&&e.opacity<100){const o=(e.opacity/100).toFixed(2),l=parseInt(e.colorHex.slice(1,3),16),s=parseInt(e.colorHex.slice(3,5),16),a=parseInt(e.colorHex.slice(5,7),16);return`rgba(${l},${s},${a},${o})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0;switch(e.type){case"shadow":{const r=ko(e.sizeClass,"shadow-");return S1(r,n)}case"inset-shadow":{const r=ko(e.sizeClass,"inset-shadow-");return k1(r,n)}case"ring":{const r=ko(e.sizeClass,"ring-");return`0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"inset-ring":{const r=ko(e.sizeClass,"inset-ring-");return`inset 0 0 0 ${r==="0"?0:Number(r)||1}px ${n??"rgba(99,102,241,0.5)"}`}case"text-shadow":return"none"}}function b1(e){if(e.isNone||!e.sizeClass)return"none";const t=o=>{if(!e.colorHex)return o;if(e.opacity!==null&&e.opacity<100){const l=(e.opacity/100).toFixed(2),s=parseInt(e.colorHex.slice(1,3),16),a=parseInt(e.colorHex.slice(3,5),16),u=parseInt(e.colorHex.slice(5,7),16);return`rgba(${s},${a},${u},${l})`}return e.colorHex},n=e.colorHex?t(e.colorHex):void 0,r=ko(e.sizeClass,"text-shadow-");return w1(r,n)}function w1(e,t){const n=t??"rgba(0,0,0,0.25)";return{"2xs":`0 1px 0 ${n}`,xs:`0 1px 1px ${n}`,sm:`0 1px 2px ${n}`,md:`0 2px 4px ${n}`,lg:`0 4px 6px ${n}`}[e]??"none"}function ko(e,t){return e.startsWith(t)?e.slice(t.length):e}function S1(e,t){const n=t??"rgba(0,0,0,0.15)";return{"2xs":`0 1px ${n}`,xs:`0 1px 2px 0 ${n}`,sm:`0 1px 3px 0 ${n}, 0 1px 2px -1px ${n}`,md:`0 4px 6px -1px ${n}, 0 2px 4px -2px ${n}`,lg:`0 10px 15px -3px ${n}, 0 4px 6px -4px ${n}`,xl:`0 20px 25px -5px ${n}, 0 8px 10px -6px ${n}`,"2xl":`0 25px 50px -12px ${n}`}[e]??"none"}function k1(e,t){const n=t??"rgba(0,0,0,0.05)";return{"2xs":`inset 0 0.5px ${n}`,xs:`inset 0 1px 1px ${n}`,sm:`inset 0 2px 4px ${n}`}[e]??"none"}const C1=Array.from({length:21},(e,t)=>`${t*5}%`);function j1({layer:e,onSizeHover:t,onSizeLeave:n,onSizeClick:r,onColorClick:o,onOpacityHover:l,onOpacityLeave:s,onOpacityClick:a,onRemove:u,onRemoveHover:c}){const[f,p]=w.useState(!1),d=w.useRef(),m={onMouseEnter:()=>{clearTimeout(d.current),p(!0)},onMouseLeave:()=>{d.current=setTimeout(()=>p(!1),60)}},v=y1(e.type),b=v1(e),S=e.type==="text-shadow"?b1(e):"none",h=e.isNone,g=e.sizeClass?x1(e.type,e.sizeClass):v[0],x=!!e.colorHex,y=e.opacity!==null?`${e.opacity}%`:"100%",C=e.colorHex??void 0;function k(E){t(Hd(e.type,E))}function T(E){r(Hd(e.type,E))}return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"flex items-center justify-center",...m,children:i.jsx("span",{className:"w-1 h-1 rounded-full bg-bv-orange"})}),i.jsx("span",{className:"flex items-center text-[9px] font-semibold uppercase tracking-[0.8px] text-bv-text-mid font-mono whitespace-nowrap",...m,children:Fh[e.type]}),i.jsx("span",{className:"flex items-center",...m,children:i.jsx(vn,{values:v,currentValue:g,lockedValue:null,locked:!1,onHover:k,onLeave:n,onClick:T})}),i.jsx("button",{type:"button",className:`w-[26px] h-[26px] rounded-[5px] border shrink-0 cursor-pointer transition-[border-color] ${e.colorHex?"border-bv-border hover:border-bv-teal":"border-dashed border-bv-border hover:border-bv-teal"} ${h?"opacity-30 pointer-events-none":""}`,onClick:E=>o(E.currentTarget),title:e.colorClass?e.colorClass:"Default color — click to override",...m,children:e.colorHex?i.jsx("div",{className:"w-full h-full rounded-[4px]",style:{background:C,opacity:e.opacity!==null?e.opacity/100:1}}):i.jsx("div",{className:"w-full h-full rounded-[4px] flex items-center justify-center",children:i.jsx("span",{className:"w-2 h-2 rounded-full bg-bv-text-mid opacity-40"})})}),i.jsx("span",{className:`flex items-center ${h||!x?"opacity-30 pointer-events-none":""}`,...m,children:x&&!h?i.jsx(vn,{values:C1,currentValue:y,lockedValue:null,locked:!1,onHover:l,onLeave:s,onClick:a}):i.jsx("span",{className:"flex items-center justify-center w-full h-[26px] bg-bv-surface border border-bv-border rounded-[5px]",children:i.jsx("span",{className:"font-mono text-[11px] text-bv-muted select-none",children:"—"})})}),i.jsx("span",{className:"ml-4 flex w-[26px] h-[26px] rounded-[5px] bg-bv-surface-hi border border-bv-border transition-[box-shadow] duration-200 items-center justify-center overflow-hidden",style:e.type==="text-shadow"?{}:{boxShadow:b},title:`Preview: ${e.sizeClass??""} ${e.colorClass??""}`.trim(),...m,children:e.type==="text-shadow"&&i.jsx("span",{className:"text-[11px] font-semibold text-bv-text select-none transition-[text-shadow] duration-200",style:{textShadow:S},children:"Aa"})}),i.jsx("button",{type:"button",className:`ml-4 w-[18px] h-[18px] rounded-[3px] border-none bg-transparent text-bv-muted text-xs cursor-pointer flex items-center justify-center transition-all hover:text-bv-orange hover:bg-bv-orange/10 ${f?"opacity-100":"opacity-0"}`,onClick:u,onMouseEnter:()=>{clearTimeout(d.current),p(!0),c()},onMouseLeave:()=>{d.current=setTimeout(()=>p(!1),60)},title:"Remove layer",children:"×"})]})}const E1=["shadow","inset-shadow","ring","inset-ring","text-shadow"];function T1({layers:e,onPreview:t,onRevert:n,onStage:r,onAdd:o,onRemove:l,onRemoveHover:s,onColorClick:a}){function u(f){const p=[];return f.sizeClass&&p.push(f.sizeClass),f.colorClass&&p.push(f.opacity!==null?`${f.colorClass}/${f.opacity}`:f.colorClass),p}const c=E1.map(f=>({type:f,layer:e.find(p=>p.type===f)}));return i.jsx("div",{className:"grid items-center gap-x-1.5 gap-y-1",style:{gridTemplateColumns:"16px auto 1fr 26px 1fr 26px 18px"},children:c.map(({type:f,layer:p},d)=>i.jsxs(w.Fragment,{children:[d>0&&i.jsx("div",{className:"h-px bg-bv-border opacity-50",style:{gridColumn:"1 / -1"}}),p?i.jsx(j1,{layer:p,onSizeHover:m=>t(p.sizeClass??"",m),onSizeLeave:n,onSizeClick:m=>r(p.sizeClass??"",m),onColorClick:m=>a==null?void 0:a(p,m),onOpacityHover:m=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],b=parseInt(m),S=b===100?v:`${v}/${b}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;t(h,S)},onOpacityLeave:n,onOpacityClick:m=>{if(!p.colorClass)return;const v=p.colorClass.split("/")[0],b=parseInt(m),S=b===100?v:`${v}/${b}`,h=p.opacity!==null?`${v}/${p.opacity}`:v;r(h,S)},onRemove:()=>l(u(p)),onRemoveHover:()=>s(u(p))}):i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"w-4 h-4 rounded-[3px] border border-dashed border-bv-border bg-transparent text-bv-muted text-[11px] cursor-pointer flex items-center justify-center transition-all hover:border-bv-teal hover:border-solid hover:text-bv-teal hover:bg-bv-teal/10",onClick:()=>o(Fd[f]),title:`Add ${Fd[f]}`,children:"+"}),i.jsx("div",{className:"flex items-center leading-none text-[9px] font-mono uppercase tracking-[0.6px] text-bv-muted whitespace-nowrap",children:Fh[f]})]})]},f))})}const Wd=[{prop:"shadow",prefix:"shadow-",sizeSet:xs},{prop:"inset-shadow",prefix:"inset-shadow-",sizeSet:vs},{prop:"ring",prefix:"ring-",sizeSet:Qr},{prop:"inset-ring",prefix:"inset-ring-",sizeSet:Qr},{prop:"text-shadow",prefix:"text-shadow-",sizeSet:bs}];function vr(e,t,n,r,o){if(!t)return n?[...e,n]:e;if(e.includes(t))return n?e.map(c=>c===t?n:c):e.filter(c=>c!==t);if(e.length===0)return n?[n]:[];const l=t.startsWith(r)?t.slice(r.length).split("/")[0]:"",s=o.has(l);let a=!1;const u=e.flatMap(c=>{const f=c.startsWith(r)?c.slice(r.length).split("/")[0]:"";return o.has(f)===s&&!a?(a=!0,n?[n]:[]):[c]});return a?u:n?[...e,n]:e}function N1(e,t){if(!t)return null;const n=e.lastIndexOf("-");if(n===-1){const a=t[e];return typeof a=="string"?a:null}const r=e.slice(0,n),o=e.slice(n+1),l=t[r];if(!l)return null;if(typeof l=="string")return l;const s=l[o];return typeof s=="string"?s:null}function R1(e,t){const n=e.trim().split(/\s+/).filter(Boolean),r=t==null?void 0:t.colors,o=[{type:"shadow",prefix:"shadow-",sizeSet:xs},{type:"inset-shadow",prefix:"inset-shadow-",sizeSet:vs},{type:"ring",prefix:"ring-",sizeSet:Qr},{type:"inset-ring",prefix:"inset-ring-",sizeSet:Qr},{type:"text-shadow",prefix:"text-shadow-",sizeSet:bs}],l=[];for(const{type:s,prefix:a,sizeSet:u}of o){const c=n.filter(v=>v===a.slice(0,-1)||v.startsWith(a));if(c.length===0)continue;let f=null,p=null,d=null,m=null;for(const v of c){const S=v.slice(a.length).split("/")[0];if(u.has(S))f=v;else{p=v;const h=v.split("/");h.length===2&&(m=parseInt(h[1])),d=N1(S,r??null)}}l.push({type:s,sizeClass:f,colorClass:p,colorHex:d,opacity:m,isNone:f!==null&&(f.endsWith("-none")||f.endsWith("-0"))})}return l}function P1(e,t){const n=new Set(["shadow","inset-shadow","ring","inset-ring","text-shadow","shadow-size","shadow-color","inset-shadow-size","inset-shadow-color","ring-size","ring-color","inset-ring-size","inset-ring-color","text-shadow-size","text-shadow-color"]),r=t.filter(s=>n.has(s.property)),o=e.trim().split(/\s+/).filter(Boolean),l=o.filter(s=>!Wd.some(({prefix:a})=>s===a.slice(0,-1)||s.startsWith(a)));for(const{prop:s,prefix:a,sizeSet:u}of Wd){const c=r.find(v=>v.property===s),f=r.find(v=>v.property===`${s}-size`),p=r.find(v=>v.property===`${s}-color`),d=o.filter(v=>v===a.slice(0,-1)||v.startsWith(a));if(c){if(c.newClass)l.push(...vr(d,c.originalClass,c.newClass,a,u));else{const v=c.originalClass.startsWith(a)?c.originalClass.slice(a.length).split("/")[0]:"";u.has(v)||!c.originalClass||l.push(...vr(d,c.originalClass,c.newClass,a,u))}continue}let m=[...d];f&&(f.newClass?m=vr(m,f.originalClass,f.newClass,a,u):f.originalClass&&(m=vr(m,f.originalClass,"",a,u))),p&&(p.newClass?m=vr(m,p.originalClass,p.newClass,a,u):p.originalClass&&(m=vr(m,p.originalClass,"",a,u))),l.push(...m)}return l.join(" ")}const _1={spacing:"Spacing",sizing:"Sizing",typography:"Typography",color:"Backgrounds",borders:"Radius",effects:"Effects",layout:"Layout",flexbox:"Flexbox & Grid",overflow:"Overflow"},I1=["layout","borders","sizing","typography","color","flexbox","shadows","effects"];function Bd(e){const t=e.scale??e.color??e.style??e.align??e.size??e.value;return t?e.fullClass.slice(0,e.fullClass.length-t.length):e.property+"-"}function A1(e){return e.section==="spacing"||e.property==="border"||e.property==="rounded"||e.property==="bg"||e.property==="bg-gradient-to"||e.property==="from"||e.property==="via"||e.property==="to"||e.property==="shadow"||e.property==="text-shadow"}function Bn(e){const t=e.filter(s=>s.property==="rounded"),n=[{prefix:/^rounded-tl(-|$)/,key:"tl"},{prefix:/^rounded-tr(-|$)/,key:"tr"},{prefix:/^rounded-br(-|$)/,key:"br"},{prefix:/^rounded-bl(-|$)/,key:"bl"},{prefix:/^rounded-t(-|$)/,key:"t"},{prefix:/^rounded-r(-|$)/,key:"r"},{prefix:/^rounded-b(-|$)/,key:"b"},{prefix:/^rounded-l(-|$)/,key:"l"}],r=new Map;let o=null;for(const s of t){const a=s.fullClass,u=n.find(c=>c.prefix.test(a));u?r.set(u.key,a):o=a}return{shorthandValue:o,shorthandScaleValues:Ma,slots:["all","t","r","b","l","tl","tr","br","bl"].map(s=>({key:s,value:s==="all"?o:r.get(s)??null,placeholder:s,scaleValues:s==="all"?Ma:$y(`rounded-${s}`)}))}}const Vn=N0(),Hh=R0(),L1={"text-size":{scaleName:"fontSize",valueType:"scalar"},"text-color":{scaleName:null,valueType:"color"}};Hh.typography.unshift({name:"Font size",prefixHint:"text-sm/base/lg/…",prefix:"text-size"},{name:"Text color",prefixHint:"text-{color}",prefix:"text-color"});function Gl(e){const t=L1[e];if(t)return{...t,stagingKey:e};const n=Object.entries(ur).find(([o,l])=>(l.propertyKey??o.replace(/-$/g,""))===e&&l.addable);if(n){const[o,l]=n;return{scaleName:l.themeKey,valueType:l.valueType,enumAlts:l.enumAlts,stagingKey:e}}const r=ur[e];return r?{scaleName:r.themeKey,valueType:r.valueType,enumAlts:r.enumAlts,stagingKey:e.replace(/-$/g,"")}:null}function O1(e,t,n,r){const o=new Set(t.map(s=>s.fullClass)),l=new Set(t.map(s=>s.property));return e.filter(s=>{if(n.has(s.prefix)||r!=null&&r.has(s.prefix))return!1;const a=Gl(s.prefix);if((a==null?void 0:a.valueType)==="enum"&&a.enumAlts)return!a.enumAlts.some(u=>o.has(u));if(a&&a.valueType!=="enum"){if(s.prefix==="text-size")return!t.some(u=>u.property==="text"&&u.scaleName==="fontSize");if(s.prefix==="text-color")return!t.some(u=>u.property==="text"&&u.color!==void 0)}return!l.has(s.prefix.replace(/-$/g,""))})}function D1(e){const t=new Map;for(const n of e){const r=n.section??"unknown",o=t.get(r)||[];o.push(n),t.set(r,o)}return t}function $1({componentName:e,instanceCount:t,rawClasses:n,parsedClasses:r,tailwindConfig:o,patchManager:l}){var le,ie;const[s,a]=w.useState(null),[u,c]=w.useState(new Map),[f,p]=w.useState(new Map),[d,m]=w.useState(null),[v,b]=w.useState(null),[S,h]=w.useState(null),g=w.useRef(null),{refs:x,floatingStyles:y,context:C}=hn({open:d!==null,onOpenChange:N=>{N||(m(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ga({apply({availableHeight:N,elements:D}){Object.assign(D.floating.style,{maxHeight:`${N}px`})},padding:8})],whileElementsMounted:un}),k=ir(C),{getFloatingProps:T}=ar([k]);w.useEffect(()=>{d!=null&&d.anchorEl&&x.setReference(d.anchorEl)},[d==null?void 0:d.anchorEl]);const{refs:E,floatingStyles:O,context:I}=hn({open:v!==null||S!==null,onOpenChange:N=>{N||(b(null),h(null),l.revertPreview())},strategy:"fixed",placement:"bottom-start",middleware:[cn(4),fn(),dn({padding:8}),Ga({apply({availableHeight:N,elements:D}){Object.assign(D.floating.style,{maxHeight:`${N}px`})},padding:8})],whileElementsMounted:un}),_=ir(I),{getFloatingProps:z}=ar([_]);w.useEffect(()=>{const N=(v==null?void 0:v.anchorEl)??(S==null?void 0:S.anchorEl);N&&E.setReference(N)},[v==null?void 0:v.anchorEl,S==null?void 0:S.anchorEl]);const[H,L]=w.useState(new Set),[U,Q]=w.useState(!1),J=w.useRef(r.map(N=>N.fullClass).join(" ")),j=r.map(N=>N.fullClass).join(" ");w.useEffect(()=>{J.current!==j&&(J.current=j,l.revertPreview(),c(new Map),p(new Map),m(null),b(null),L(new Set))});const R=e,P=l.patches.filter(N=>N.status==="staged"&&N.elementKey===R),Y=new Set(P.filter(N=>N.originalClass==="").map(N=>N.property));function Z(N,D){const K=P.find(be=>be.property===N),q=(D==null?void 0:D.fullClass)??(K==null?void 0:K.originalClass)??"",re=(K==null?void 0:K.newClass)??(D==null?void 0:D.fullClass)??"";return{originalClass:q,effectiveClass:re,hasValue:re!==""}}function M(N){return u.size===0?N:N.map(D=>{const K=u.get(`${D.layer}-shorthand`),q=D.slots.map(be=>{const Ce=u.get(`${D.layer}-${be.key}`);return Ce!==void 0?{...be,value:Ce}:be}),re=K??D.shorthandValue;let me=D.classState;return K!==void 0&&(me=q.some(Ce=>Ce.value!=null)?"mixed":"shorthand"),{...D,shorthandValue:re,classState:me,slots:q}})}function ce(N){if(f.size===0)return N;const D=f.get("all");return{...N,shorthandValue:D===void 0?N.shorthandValue:D,slots:N.slots.map(K=>{const q=f.get(K.key);return q===void 0?K:{...K,value:q}})}}const de=D1(r);function W(N,D){l.preview(N,D)}function ye(){l.revertPreview()}function ve(N,D,K){l.stage(R,N,D,K)}function to(N,D){const K=N||D,q=K.startsWith("bg-gradient-to-")?"bg-gradient-to-":K.startsWith("from-")?"from-":K.startsWith("via-")?"via-":K.startsWith("to-")?"to-":"bg-";ve(q,N,D)}function no(N,D){l.revertPreview(),ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),N.color!==void 0&&D?(b(K=>(K==null?void 0:K.cls.fullClass)===N.fullClass?null:{cls:N,anchorEl:D}),a(null)):(b(null),a(N))}function hr(N,D){l.preview(N.fullClass,D)}function ro(N){l.revertPreview()}function oo(N){const D=ur[N];if(!((D==null?void 0:D.controlGroup)==="flex-container"&&(D==null?void 0:D.propertyKey)==="display")){if((D==null?void 0:D.controlGroup)==="flex-container"){const K=r.some(re=>re.fullClass==="flex"||re.fullClass==="inline-flex"),q=P.some(re=>re.property==="display"&&re.originalClass===""&&(re.newClass==="flex"||re.newClass==="inline-flex"));!K&&!q&&l.stage(R,"display","","flex")}}L(K=>new Set(K).add(N))}function Kt(N,D){l.preview("",D)}function Fn(N){l.revertPreview()}function ne(N,D){const K=Gl(N);l.stage(R,(K==null?void 0:K.stagingKey)??N,"",D),L(q=>{const re=new Set(q);return re.delete(N),re})}return i.jsxs("div",{className:"divide-y divide-bv-border",children:[i.jsxs("div",{className:"px-4 py-3",children:[i.jsxs("div",{className:"flex items-center gap-1.5 cursor-pointer select-none",onClick:()=>Q(N=>!N),children:[i.jsx("svg",{className:`w-3 h-3 text-bv-muted transition-transform ${U?"":"rotate-90"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})}),i.jsx("span",{className:"text-[10px] font-semibold text-bv-text",children:"Box model"})]}),i.jsx("div",{className:`overflow-hidden transition-[max-height,opacity] duration-200 ease-in-out ${U?"max-h-0 opacity-0":"max-h-[600px] opacity-100"}`,children:i.jsxs("div",{className:"mt-3",children:[i.jsx(K0,{layers:M(xr(r,o)),onEditStart:()=>{ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),m(null)},onSlotClick:(N,D,K)=>{var Ce;if(D!=="color"||!K){m(null);return}const q=xr(r,o).find(Ft=>Ft.layer===N),re=`${N}-color`,me=u.get(re)??((Ce=q==null?void 0:q.slots.find(Ft=>Ft.key==="color"))==null?void 0:Ce.value)??"",be=N==="outline"?"outline-":"border-";m(Ft=>(Ft==null?void 0:Ft.layer)===N?null:{layer:N,prefix:be,currentClass:me,staged:!1,anchorEl:K})},onSlotHover:(N,D,K)=>{var q;if(K===null)l.revertPreview();else{const re=`${N}-${D}`,me=xr(r,o).find(Ce=>Ce.layer===N),be=D==="shorthand"?u.get(re)??(me==null?void 0:me.shorthandValue):u.get(re)??((q=me==null?void 0:me.slots.find(Ce=>Ce.key===D))==null?void 0:q.value);l.preview(be??"",K)}},onSlotChange:(N,D,K)=>{var be;const q=`${N}-${D}`,re=xr(r,o).find(Ce=>Ce.layer===N),me=D==="shorthand"?u.get(q)??(re==null?void 0:re.shorthandValue):u.get(q)??((be=re==null?void 0:re.slots.find(Ce=>Ce.key===D))==null?void 0:be.value);ve(`${N}-${D}`,me??"",K),c(Ce=>new Map(Ce).set(q,K))},onSlotRemoveHover:(N,D)=>{var me;const K=`${N}-${D}`,q=xr(r,o).find(be=>be.layer===N),re=D==="shorthand"?u.get(K)??(q==null?void 0:q.shorthandValue):u.get(K)??((me=q==null?void 0:q.slots.find(be=>be.key===D))==null?void 0:me.value);re&&l.preview(re,"")},onSlotRemove:(N,D)=>{var me;const K=`${N}-${D}`,q=xr(r,o).find(be=>be.layer===N),re=D==="shorthand"?u.get(K)??(q==null?void 0:q.shorthandValue):u.get(K)??((me=q==null?void 0:q.slots.find(be=>be.key===D))==null?void 0:me.value);re&&(ve(`${N}-${D}`,re,""),c(be=>{const Ce=new Map(be);return Ce.delete(K),Ce}))}}),d&&i.jsx(pn,{children:i.jsx("div",{ref:x.setFloating,style:{...y,zIndex:9999,overflowY:"auto"},...T(),children:i.jsx(Ul,{prefix:d.prefix,currentValue:d.currentClass.startsWith(d.prefix)?d.currentClass.slice(d.prefix.length):"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((le=P.find(N=>N.property===d.prefix))==null?void 0:le.newClass)??null,onHover:N=>{g.current=N,l.preview(d.currentClass,N)},onLeave:()=>{d.staged&&g.current?(l.preview(g.current,d.currentClass),g.current=null):l.revertPreview()},onClick:N=>{const D=`${d.layer}-color`;ve(d.prefix,d.currentClass,N),c(K=>new Map(K).set(D,N)),m(K=>K?{...K,currentClass:N,staged:!0}:null)}})})})]})})]}),(v||S)&&i.jsx(pn,{children:i.jsxs("div",{ref:E.setFloating,style:{...O,zIndex:9999,overflowY:"auto"},...z(),children:[v&&i.jsx(Ul,{prefix:Bd(v.cls),currentValue:v.cls.color??"",colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:((ie=P.find(N=>N.property===v.cls.property))==null?void 0:ie.newClass)??null,onHover:N=>W(v.cls.fullClass,N),onLeave:ye,onClick:N=>ve(v.cls.property,v.cls.fullClass,N),onRemoveHover:()=>W(v.cls.fullClass,""),onRemove:()=>{ve(v.cls.property,v.cls.fullClass,""),b(null)}}),S&&(()=>{const{layer:N}=S,D=N.type==="shadow"?"shadow-":N.type==="inset-shadow"?"inset-shadow-":N.type==="ring"?"ring-":N.type==="text-shadow"?"text-shadow-":"inset-ring-",K=N.colorClass??"",q=K?K.slice(D.length).split("/")[0]:"";return i.jsx(Ul,{prefix:D,currentValue:q,colors:(o==null?void 0:o.colors)||{},locked:!1,lockedValue:null,onHover:re=>W(K,re),onLeave:ye,onClick:re=>{const me=N.type==="shadow"?"shadow-color":N.type==="inset-shadow"?"inset-shadow-color":N.type==="ring"?"ring-color":N.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(R,me,K,re),h(null)},onRemoveHover:()=>{K&&W(K,"")},onRemove:()=>{if(K){const re=N.type==="shadow"?"shadow-color":N.type==="inset-shadow"?"inset-shadow-color":N.type==="ring"?"ring-color":N.type==="text-shadow"?"text-shadow-color":"inset-ring-color";l.stage(R,re,K,"")}h(null)}})})()]})}),I1.map(N=>{if(N==="shadows"){const A=P1(n,P),te=R1(A,o);return i.jsx(Dd,{label:"Shadows & Rings",onAddProperty:()=>{},isEmpty:!1,classCount:te.length,children:i.jsx(T1,{layers:te,onPreview:(V,G)=>l.preview(V,G),onRevert:()=>l.revertPreview(),onStage:(V,G)=>{const pe=V||G,se=Ae=>{if(Ae.startsWith("shadow-")){const He=Ae.slice(7).split("/")[0];return xs.has(He)}if(Ae.startsWith("inset-shadow-")){const He=Ae.slice(13).split("/")[0];return vs.has(He)}if(Ae.startsWith("ring-")||Ae.startsWith("inset-ring-")){const He=Ae.slice(Ae.startsWith("ring-")?5:11).split("/")[0];return Qr.has(He)}if(Ae.startsWith("text-shadow-")){const He=Ae.slice(12).split("/")[0];return bs.has(He)}return!1},je=pe.startsWith("text-shadow")?"text-shadow":pe.startsWith("inset-shadow")?"inset-shadow":pe.startsWith("inset-ring")?"inset-ring":pe.startsWith("ring")?"ring":"shadow",Ht=se(V)||V===""&&se(G)?`${je}-size`:`${je}-color`;l.stage(R,Ht,V,G)},onAdd:V=>{const G=V.startsWith("text-shadow")?"text-shadow-size":V.startsWith("inset-shadow")?"inset-shadow-size":V.startsWith("inset-ring")?"inset-ring-size":V.startsWith("ring")?"ring-size":"shadow-size";l.stage(R,G,"",V)},onRemove:V=>{const G=se=>{if(se.startsWith("shadow-")){const je=se.slice(7).split("/")[0];return xs.has(je)}if(se.startsWith("inset-shadow-")){const je=se.slice(13).split("/")[0];return vs.has(je)}if(se.startsWith("ring-")||se.startsWith("inset-ring-")){const je=se.slice(se.startsWith("ring-")?5:11).split("/")[0];return Qr.has(je)}if(se.startsWith("text-shadow-")){const je=se.slice(12).split("/")[0];return bs.has(je)}return!1},pe=[...V].reverse();for(const se of pe){const je=se.startsWith("text-shadow")?"text-shadow":se.startsWith("inset-shadow")?"inset-shadow":se.startsWith("inset-ring")?"inset-ring":se.startsWith("ring")?"ring":"shadow",Ht=G(se)?`${je}-size`:`${je}-color`;l.stage(R,Ht,se,"")}},onRemoveHover:V=>{V.length===1?l.preview(V[0],""):V.length>1&&l.preview(V.join(" "),"")},onColorClick:(V,G)=>{b(null),h(pe=>(pe==null?void 0:pe.layer.type)===V.type?null:{layer:V,anchorEl:G})}})},"shadows")}const K=(de.get(N)||[]).filter(A=>!A1(A)),q=Hh[N]||[],re=E0.get("flex-container")??new Set,me=T0.get("flex-container")??new Set,be=r.find(A=>A.fullClass==="flex"||A.fullClass==="inline-flex"),Ce=Z("display",be),Ft=Ce.effectiveClass==="flex"||Ce.effectiveClass==="inline-flex",Bh=r.some(A=>{if(A.fullClass==="flex"||A.fullClass==="inline-flex")return!1;const te=Vn[A.fullClass];return!!(te&&te.propertyKey!=="display"&&re.has(te.propertyKey)||re.has(A.property))}),Vh=[...me].some(A=>H.has(A)||Y.has(A.replace(/-$/,""))),mr=N==="flexbox"&&(Ft||Bh||Vh),Uh=mr?q.filter(A=>!me.has(A.prefix)):q,Gh=O1(Uh,K,H,Y),Zs=q.filter(A=>H.has(A.prefix)).map(A=>A.prefix),Js=q.filter(A=>Y.has(A.prefix.replace(/-$/g,""))).map(A=>A.prefix),Yh=N==="color"||N==="flexbox"&&mr||N==="borders"?!1:K.length===0&&Zs.length===0&&Js.length===0,Qh=N==="borders"?Bn(r).slots.filter(A=>A.value!=null).length+(Bn(r).shorthandValue?1:0):K.length+Zs.length+Js.length;return i.jsxs(Dd,{label:_1[N]??N,availableProperties:Gh,onAddProperty:oo,isEmpty:Yh,classCount:Qh,children:[N==="borders"&&i.jsx(Q0,{state:ce(Bn(r)),onSlotHover:(A,te)=>{var se;const V=Bn(r),pe=(A==="all"?f.get("all")??V.shorthandValue:f.get(A)??((se=V.slots.find(je=>je.key===A))==null?void 0:se.value)??null)??"";te===null?l.revertPreview():l.preview(pe,te)},onSlotChange:(A,te)=>{var pe;const V=Bn(r),G=f.get(A)??(A==="all"?V.shorthandValue:(pe=V.slots.find(se=>se.key===A))==null?void 0:pe.value)??"";ve(`rounded-${A}`,G,te),p(se=>new Map(se).set(A,te))},onSlotRemove:A=>{var V;const te=f.get(A)??((V=Bn(r).slots.find(G=>G.key===A))==null?void 0:V.value)??"";te&&(ve(`rounded-${A}`,te,""),p(G=>new Map(G).set(A,null)))},onSlotRemoveHover:A=>{var V;const te=f.get(A)??((V=Bn(r).slots.find(G=>G.key===A))==null?void 0:V.value)??"";te&&l.preview(te,"")},onEditStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"})}),N==="color"&&i.jsx(r1,{...o1(r,(o==null?void 0:o.colors)||{},P.filter(A=>A.elementKey===R)),onPreview:W,onPreviewBatch:A=>l.previewBatch(A),onRevert:ye,onStage:to}),N==="flexbox"&&mr&&(()=>{const A=r,te=A.find(oe=>{const ge=Vn[oe.fullClass];return(ge==null?void 0:ge.propertyKey)==="flex-direction"}),V=A.find(oe=>{const ge=Vn[oe.fullClass];return(ge==null?void 0:ge.propertyKey)==="justify-content"}),G=A.find(oe=>{const ge=Vn[oe.fullClass];return(ge==null?void 0:ge.propertyKey)==="align-items"}),pe=A.find(oe=>{const ge=Vn[oe.fullClass];return(ge==null?void 0:ge.propertyKey)==="flex-wrap"}),se={"flex-row":"row","flex-col":"column","flex-row-reverse":"row-reverse","flex-col-reverse":"column-reverse"},je=Z("flex-direction",te),sl=je.effectiveClass?se[je.effectiveClass]??"row":"row",Ht=Z("flex-wrap",pe),Ae=Z("justify-content",V),He=Z("align-items",G),Xh=r.find(oe=>oe.property==="gap"),Zh=r.find(oe=>oe.property==="gap-x"),Jh=r.find(oe=>oe.property==="gap-y"),lo=Z("gap",Xh),so=Z("gap-x",Zh),io=Z("gap-y",Jh),qh=[{key:"gap",value:lo.effectiveClass||null,scaleValues:yr("gap-","spacing",o)},{key:"gap-x",value:so.effectiveClass||null,scaleValues:yr("gap-x-","spacing",o)},{key:"gap-y",value:io.effectiveClass||null,scaleValues:yr("gap-y-","spacing",o)}];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between items-start w-full",children:[i.jsx(i1,{currentValue:(te==null?void 0:te.fullClass)??null,lockedValue:je.effectiveClass!==je.originalClass?je.effectiveClass:null,locked:!1,onHover:oe=>W(je.effectiveClass,oe),onLeave:ye,onClick:oe=>ve("flex-direction",je.originalClass,oe)}),i.jsx(d1,{currentValue:(pe==null?void 0:pe.fullClass)??null,lockedValue:Ht.effectiveClass!==Ht.originalClass?Ht.effectiveClass:null,locked:!1,onHover:oe=>W(Ht.effectiveClass,oe),onLeave:ye,onClick:oe=>ve("flex-wrap",Ht.originalClass,oe)}),i.jsx(h1,{currentValue:(V==null?void 0:V.fullClass)??null,lockedValue:Ae.effectiveClass!==Ae.originalClass?Ae.effectiveClass:null,locked:!1,flexDirection:sl,onHover:oe=>W(Ae.effectiveClass,oe),onLeave:ye,onClick:oe=>ve("justify-content",Ae.originalClass,oe),onRemove:Ae.hasValue?()=>ve("justify-content",Ae.originalClass,""):void 0,onRemoveHover:Ae.hasValue?()=>W(Ae.effectiveClass,""):void 0}),i.jsx(m1,{currentValue:(G==null?void 0:G.fullClass)??null,lockedValue:He.effectiveClass!==He.originalClass?He.effectiveClass:null,locked:!1,flexDirection:sl,onHover:oe=>W(He.effectiveClass,oe),onLeave:ye,onClick:oe=>ve("align-items",He.originalClass,oe),onRemove:He.hasValue?()=>ve("align-items",He.originalClass,""):void 0,onRemoveHover:He.hasValue?()=>W(He.effectiveClass,""):void 0})]}),i.jsx("div",{className:"h-px w-full bg-bv-border opacity-50 my-2"}),i.jsx(g1,{slots:qh,onSlotHover:(oe,ge)=>{const Xu=oe==="gap"?lo:oe==="gap-x"?so:io;ge===null?l.revertPreview():l.preview(Xu.effectiveClass,ge)},onSlotRemoveHover:oe=>{const ge=oe==="gap"?lo:oe==="gap-x"?so:io;ge.hasValue&&l.preview(ge.effectiveClass,"")},onSlotChange:(oe,ge)=>{ve(oe,(oe==="gap"?lo:oe==="gap-x"?so:io).originalClass,ge)},onSlotRemove:oe=>{const ge=oe==="gap"?lo:oe==="gap-x"?so:io;ge.hasValue&&(l.preview(ge.effectiveClass,""),ve(oe,ge.originalClass,""))}})]})})(),K.map(A=>{var te,V;if(mr){const G=Vn[A.fullClass];if(G&&re.has(G.propertyKey)||re.has(A.property))return null}if(A.scaleName!==void 0){const G=yr(Bd(A),A.scaleName,o);if(G.length>0){const pe=((te=P.find(se=>se.property===A.property))==null?void 0:te.newClass)??null;return i.jsx(vn,{values:G,currentValue:A.fullClass,lockedValue:pe,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:se=>hr(A,se),onLeave:()=>ro(),onClick:se=>ve(A.property,A.fullClass,se),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>ve(A.property,A.fullClass,"")},A.fullClass)}}if(A.scaleName===void 0&&A.color===void 0){const G=Vn[A.fullClass];if(G){const pe=((V=P.find(se=>se.property===G.propertyKey))==null?void 0:V.newClass)??null;return i.jsx(vn,{values:G.alternatives,currentValue:A.fullClass,lockedValue:pe,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:se=>hr(A,se),onLeave:()=>ro(),onClick:se=>ve(G.propertyKey,A.fullClass,se),onRemoveHover:()=>l.preview(A.fullClass,""),onRemove:()=>ve(G.propertyKey,A.fullClass,"")},A.fullClass)}}return i.jsxs("div",{className:`group flex items-center gap-1 px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border transition-colors ${(s==null?void 0:s.fullClass)===A.fullClass||(v==null?void 0:v.cls.fullClass)===A.fullClass?"border-bv-border bg-bv-surface-hi text-bv-text":"bg-bv-surface text-bv-text-mid border-transparent hover:border-bv-teal hover:text-bv-teal"}`,onClick:G=>no(A,G.currentTarget),children:[A.fullClass,i.jsx("span",{className:"opacity-0 group-hover:opacity-60 hover:!opacity-100 ml-0.5 shrink-0",title:"Remove class",onClick:G=>{G.stopPropagation(),ve(A.property,A.fullClass,"")},onMouseEnter:G=>{G.stopPropagation(),l.preview(A.fullClass,"")},onMouseLeave:G=>{G.stopPropagation(),l.revertPreview()},children:i.jsxs("svg",{viewBox:"0 0 10 10",width:"8",height:"8",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("line",{x1:"1",y1:"1",x2:"9",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"}),i.jsx("line",{x1:"9",y1:"1",x2:"1",y2:"9",stroke:"#F5532D",strokeWidth:"1.8",strokeLinecap:"round"})]})})]},A.fullClass)}),Js.filter(A=>!(mr&&me.has(A))).map(A=>{const te=Gl(A);if(!te)return null;if(te.valueType==="scalar"){const V=yr(A,te.scaleName,o);if(V.length===0)return null;const G=P.find(pe=>pe.property===te.stagingKey);return i.jsx(vn,{values:V,currentValue:(G==null?void 0:G.newClass)??V[Math.floor(V.length/2)],lockedValue:(G==null?void 0:G.newClass)??null,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:pe=>Kt(A,pe),onLeave:()=>Fn(),onClick:pe=>ne(A,pe)},`staged-${A}`)}if(te.valueType==="enum"&&te.enumAlts){const V=P.find(G=>G.property===te.stagingKey);return i.jsx(vn,{values:te.enumAlts,currentValue:(V==null?void 0:V.newClass)??te.enumAlts[0],lockedValue:(V==null?void 0:V.newClass)??null,locked:!1,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:G=>Kt(A,G),onLeave:()=>Fn(),onClick:G=>ne(A,G)},`staged-${A}`)}return null}),Zs.filter(A=>!(mr&&me.has(A))).map(A=>{const te=Gl(A);if(!te)return null;if(te.valueType==="scalar"){const V=yr(A,te.scaleName,o);if(V.length>0)return i.jsx(vn,{values:V,currentValue:V[Math.floor(V.length/2)],lockedValue:null,locked:!1,ghost:!0,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:G=>Kt(A,G),onLeave:()=>Fn(),onClick:G=>ne(A,G)},`pending-${A}`)}return te.valueType==="enum"&&te.enumAlts?i.jsx(vn,{values:te.enumAlts,currentValue:te.enumAlts[0],lockedValue:null,locked:!1,ghost:!0,onStart:()=>ue("overlay",{type:"CLEAR_HIGHLIGHTS"}),onHover:V=>Kt(A,V),onLeave:()=>Fn(),onClick:V=>ne(A,V)},`pending-${A}`):te.valueType==="color"?i.jsxs("div",{"data-testid":`pending-ghost-${A}`,className:"px-2 py-0.5 rounded cursor-pointer text-[11px] font-mono border border-dashed border-bv-border text-bv-muted hover:border-bv-teal hover:text-bv-teal transition-colors",onClick:V=>{b({cls:{property:"text",fullClass:"",section:"typography",color:""},anchorEl:V.currentTarget}),a(null)},children:[A==="text-color"?"text-":A,"color"]},`pending-${A}`):null})]},N)})]})}const M1=w.lazy(()=>_y(()=>import("./DesignMode-MoLVGcFD.js"),[]).then(e=>({default:e.DesignMode}))),Wh=new URLSearchParams(window.location.search),z1=Wh.get("mode"),xo=Wh.get("embedded")==="storybook",K1=[{id:"design",label:"Design"},{id:"replace",label:"Replace"}],F1=[{id:"place",label:"Place"}];function H1(e,t){const n=`<${t}>`;switch(e){case"before":return`Before ${n}`;case"after":return`After ${n}`;case"first-child":return`First in ${n}`;case"last-child":return`Last in ${n}`;default:return`${e} ${n}`}}function W1(){return z1==="design"?i.jsx(w.Suspense,{fallback:null,children:i.jsx(M1,{})}):i.jsx(B1,{})}function B1(){const[e,t]=w.useState(!1),[n,r]=w.useState(null),[o,l]=w.useState(0),[s,a]=w.useState(null),[u,c]=w.useState("design"),[f,p]=w.useState(!1),[d,m]=w.useState(!1),[v,b]=w.useState(null),S=Bx(),h=w.useMemo(()=>s==="insert"?F1:K1,[s]),g=w.useMemo(()=>s==="insert"?"place":u==="component"?"replace":"design",[s,u]);function x(M,ce=!1){r(null),l(de=>de+1),m(!1),b(null),a(M),M==="insert"&&c(de=>de==="design"?"component":de),ce||ue("overlay",{type:"MODE_CHANGED",mode:M}),p(M==="select")}function y(M,ce=!1){M==="replace"||M==="place"?c("component"):M==="design"&&c("design"),ce||ue("overlay",{type:"TAB_CHANGED",tab:M})}w.useEffect(()=>{const M=sx(()=>{if(t(!0),!xo)try{const W=localStorage.getItem("tw-panel-container");W&&W!=="popover"&&ue("overlay",{type:"SWITCH_CONTAINER",container:W})}catch{}}),ce=ix(()=>t(!1)),de=Ss(W=>{W.type==="RESET_SELECTION"?(r(null),l(ye=>ye+1)):W.type==="ELEMENT_SELECTED"?(r({componentName:W.componentName,instanceCount:W.instanceCount,classes:W.classes,parsedClasses:By(W.classes,ox),tailwindConfig:W.tailwindConfig}),l(ye=>ye+1),p(!1),a(ye=>ye??"select")):W.type==="SELECT_MODE_CHANGED"?p(!!W.active):W.type==="MODE_CHANGED"?x(W.mode,!0):W.type==="TAB_CHANGED"?y(W.tab,!0):W.type==="TEXT_EDIT_ACTIVE"?m(!0):W.type==="TEXT_EDIT_DONE"?m(!1):W.type==="INSERT_POINT_LOCKED"?b({position:W.position,targetName:W.targetName}):W.type==="QUEUE_UPDATE"?S.handleQueueUpdate({draftCount:W.draftCount,committedCount:W.committedCount,implementingCount:W.implementingCount,implementedCount:W.implementedCount,partialCount:W.partialCount,errorCount:W.errorCount,draft:W.draft,commits:W.commits,agentWaiting:W.agentWaiting}):W.type==="PATCH_UPDATE"&&S.handlePatchUpdate({staged:W.staged,committed:W.committed,implementing:W.implementing,implemented:W.implemented,patches:W.patches})});return uh(),t(ax()),()=>{M(),ce(),de()}},[]),w.useEffect(()=>{const M=ce=>{ce.key==="Escape"&&(n?(r(null),l(de=>de+1),ue("overlay",{type:"CLEAR_HIGHLIGHTS",deselect:!0}),s==="select"?(p(!0),ue("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})):s==="insert"&&(b(null),ue("overlay",{type:"MODE_CHANGED",mode:"insert"}))):s!==null&&(a(null),p(!1),b(null),ue("overlay",{type:"CANCEL_MODE"})))};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[n,s]);const{draft:C,committed:k,implementing:T,implemented:E,partial:O,error:I}=S.counts,_=(C>0||k>0)&&!S.agentWaiting&&T===0,z=new Map(S.patches.filter(M=>M.status==="staged").map(M=>[M.id,{id:M.id,kind:M.kind??"class-change",elementKey:M.elementKey,status:M.status,originalClass:M.originalClass,newClass:M.newClass,property:M.property,timestamp:M.timestamp,component:M.component,message:M.message,image:M.image}])),H=new Set(S.queueState.draft.map(M=>M.id)),L=[...S.queueState.draft.map(M=>z.get(M.id)??M),...S.patches.filter(M=>M.status==="staged"&&!H.has(M.id)).map(M=>z.get(M.id))],U=S.queueState.commits.filter(M=>M.status==="committed"),Q=S.queueState.commits.filter(M=>M.status==="implementing"),J=S.queueState.commits.filter(M=>M.status==="implemented"),j="Please implement the next change and continue implementing changes with VyBit.";async function R(M){if(navigator.clipboard){try{if((await navigator.permissions.query({name:"clipboard-write"})).state==="denied"){P(M);return}}catch{}navigator.clipboard.writeText(M).catch(()=>P(M))}else P(M)}function P(M){const ce=document.createElement("textarea");ce.value=M,ce.style.position="fixed",ce.style.opacity="0",document.body.appendChild(ce),ce.select(),document.execCommand("copy"),document.body.removeChild(ce)}const Y=i.jsxs("div",{className:"shrink-0",children:[!e&&i.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-bv-orange animate-pulse shrink-0"}),i.jsxs("span",{className:"flex-1 leading-tight",children:["No agent listening —"," ",i.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start!"]}),i.jsx("button",{onClick:()=>R(j),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${j}"`,children:"Copy prompt"})]}),_&&i.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-amber-950/40 border-t border-amber-800/40 text-amber-300 text-[10px] font-medium",children:[i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 20 20",fill:"currentColor",className:"shrink-0 text-amber-400",children:i.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"})}),i.jsxs("span",{className:"flex-1 leading-tight",children:["No agent watching —"," ",i.jsx("a",{href:"https://github.com/bitovi/vybit?tab=readme-ov-file#telling-your-agent-to-start-making-features",target:"_blank",rel:"noreferrer",className:"underline hover:text-amber-100",children:"ask your agent"})," ","to start"]}),i.jsx("button",{onClick:()=>R(j),className:"shrink-0 px-1.5 py-0.5 rounded border border-amber-700/50 bg-amber-900/40 hover:bg-amber-800/40 text-amber-300 font-semibold text-[9px] transition-colors",title:`Copy: "${j}"`,children:"Copy prompt"})]}),i.jsxs("div",{className:"flex items-center justify-center px-3 py-1.5 border-t border-bv-border gap-3 text-[10px]",children:[i.jsx(Tl,{label:"draft",count:C,items:L,activeColor:"text-amber-400",onDiscard:M=>S.discard(M),onCommitAll:()=>S.commitAll(),onDiscardAll:()=>S.discardAll()}),i.jsx(Tl,{label:"committed",count:k,items:U.flatMap(M=>M.patches),activeColor:"text-bv-orange",onDiscard:M=>S.discardCommit(M)}),i.jsx(Tl,{label:"implementing",count:T,items:Q.flatMap(M=>M.patches),activeColor:"text-blue-400"}),i.jsx(Tl,{label:"implemented",count:E,items:J.flatMap(M=>M.patches),activeColor:"text-bv-teal"})]})]});if(!n)return s===null?i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(El,{mode:s,onModeChange:x}),!xo&&i.jsx(Cl,{})]})}),i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-6",children:[i.jsxs("button",{onClick:()=>x("select"),className:"w-full flex flex-col items-center gap-3 px-6 py-5 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[i.jsx("path",{d:"M2,9C1.447,9,1,8.552,1,8V2c0-0.552,0.447-1,1-1h6c0.553,0,1,0.448,1,1S8.553,3,8,3H3v5C3,8.552,2.553,9,2,9z"}),i.jsx("path",{d:"M8,48H2c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v5h5c0.553,0,1,0.448,1,1S8.553,48,8,48z"}),i.jsx("path",{d:"M47,9c-0.553,0-1-0.448-1-1V3h-5c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1v6C48,8.552,47.553,9,47,9z"}),i.jsx("path",{d:"M21,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,3,21,3z"}),i.jsx("path",{d:"M2,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,21.552,2.553,22,2,22z"}),i.jsx("path",{d:"M2,35c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,34.552,2.553,35,2,35z"}),i.jsx("path",{d:"M47,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C48,21.552,47.553,22,47,22z"}),i.jsx("path",{d:"M47,31c-0.553,0-1-0.448-1-1v-2c0-0.552,0.447-1,1-1s1,0.448,1,1v2C48,30.552,47.553,31,47,31z"}),i.jsx("path",{d:"M34,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S34.553,3,34,3z"}),i.jsx("path",{d:"M21,48h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,48,21,48z"}),i.jsx("path",{d:"M30,48h-2c-0.553,0-1-0.448-1-1s0.447-1,1-1h2c0.553,0,1,0.448,1,1S30.553,48,30,48z"}),i.jsx("path",{d:"M62.707,57.293L51.688,46.274l10.759-5.379c0.368-0.184,0.586-0.575,0.549-0.985c-0.037-0.41-0.322-0.755-0.717-0.87l-31-9c-0.355-0.1-0.729-0.005-0.986,0.253c-0.258,0.258-0.355,0.636-0.253,0.986l9,31c0.114,0.396,0.46,0.68,0.869,0.717C39.94,62.999,39.971,63,40,63c0.376,0,0.724-0.212,0.895-0.553l5.38-10.759l11.019,11.019c0.391,0.391,1.023,0.391,1.414,0l4-4C63.098,58.316,63.098,57.684,62.707,57.293z"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Select an element"}),i.jsx("span",{className:"text-[11px] text-bv-text-mid text-center leading-relaxed",children:"to change its design, its text, or to replace it with something else"})]}),i.jsxs("button",{onClick:()=>x("insert"),className:"w-full flex flex-col items-center gap-3 px-6 py-4 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"square",strokeLinejoin:"miter",children:[i.jsx("rect",{x:"4",y:"2",width:"16",height:"8",rx:"2"}),i.jsx("path",{d:"m17,14h1c1.105,0,2,.895,2,2"}),i.jsx("path",{d:"m4,16c0-1.105.895-2,2-2h1"}),i.jsx("path",{d:"m7,22h-1c-1.105,0-2-.895-2-2"}),i.jsx("path",{d:"m20,20c0,1.105-.895,2-2,2h-1"}),i.jsx("line",{x1:"13",y1:"14",x2:"11",y2:"14"}),i.jsx("line",{x1:"13",y1:"22",x2:"11",y2:"22"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Insert to add new content"})]}),i.jsxs("button",{onClick:()=>x("bug-report"),className:"w-full flex flex-col items-center gap-3 px-6 py-4 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M11.5,6C11.5,4.067,9.933,2.5,8,2.5S4.5,4.067,4.5,6v1h7V6Z"}),i.jsx("rect",{x:"3",y:"8",width:"10",height:"6",rx:"2"}),i.jsx("path",{d:"M1,5.5h2.2C3.07,5.01,3,4.51,3,4h0V3.5H1c-.552,0-1,.448-1,1S.448,5.5,1,5.5Z"}),i.jsx("path",{d:"M15,3.5h-2c0,.51-.07,1.01-.2,1.5H15c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,11.5h2.05c.232,.89,.62,1.71,1.13,2.5H1c-.552,0-1-.448-1-1s.448-1,1-1h0Z"}),i.jsx("path",{d:"M15,10.5h-2.05c-.232,.89-.62,1.71-1.13,2.5h3.18c.552,0,1-.448,1-1s-.448-1-1-1Z"}),i.jsx("path",{d:"M1,7.5h2v2H1c-.552,0-1-.448-1-1s.448-1,1-1Z"}),i.jsx("path",{d:"M13,7.5h2c.552,0,1,.448,1,1s-.448,1-1,1h-2v-2Z"}),i.jsx("rect",{x:"7",y:"9",width:"2",height:"4",rx:".5"})]})}),i.jsx("span",{className:"text-[13px] text-bv-text font-medium",children:"Report a bug"}),i.jsx("span",{className:"text-[11px] text-bv-text-mid text-center leading-relaxed",children:"Select events from recording history and describe the issue"})]})]}),Y]}):s==="bug-report"?i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(El,{mode:s,onModeChange:x}),i.jsx("div",{className:"flex-1 min-w-0",children:i.jsx("span",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight",children:"Bug Report"})}),!xo&&i.jsx(Cl,{})]})}),i.jsx(Hx,{onSubmit:M=>{var de;const ce={id:crypto.randomUUID(),kind:"bug-report",elementKey:((de=M.bugElement)==null?void 0:de.selectorPath)??"bug-report",status:"staged",originalClass:"",newClass:"",property:"bug-report",timestamp:new Date().toISOString(),bugDescription:M.bugDescription,bugScreenshots:M.bugScreenshots,bugTimeline:M.bugTimeline,bugTimeRange:M.bugTimeRange,bugElement:M.bugElement};Sn({type:"BUG_REPORT_STAGE",patch:ce})}}),Y]}):i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsx(El,{mode:s,onModeChange:x}),i.jsx("div",{className:"flex-1 min-w-0",children:s==="insert"?i.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:v?H1(v.position,v.targetName):"Pick a placement on the page"}):f?i.jsx("span",{className:"text-[11px] text-bv-teal font-medium",children:"Click an element on the page"}):i.jsx("span",{className:"text-[12px] text-bv-muted",children:"No element selected"})}),!xo&&i.jsx(Cl,{})]})}),i.jsx(hd,{tabs:h,activeTab:g,onTabChange:y}),i.jsx("div",{className:"flex-1 overflow-auto",children:g==="replace"?i.jsx(jl,{insertMode:"replace"}):g==="place"?i.jsx(jl,{insertMode:"place"}):f?i.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-8",children:[i.jsx("div",{className:"w-10 h-10 rounded-full bg-bv-teal text-white flex items-center justify-center",children:i.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"currentColor",children:[i.jsx("path",{d:"M14,0H2C.895,0,0,.895,0,2V14c0,1.105,.895,2,2,2H6c.552,0,1-.448,1-1h0c0-.552-.448-1-1-1H2V2H14V6c0,.552,.448,1,1,1h0c.552,0,1-.448,1-1V2c0-1.105-.895-2-2-2Z"}),i.jsx("path",{d:"M12.043,10.629l2.578-.644c.268-.068,.43-.339,.362-.607-.043-.172-.175-.308-.345-.358l-7-2c-.175-.051-.363-.002-.492,.126-.128,.129-.177,.317-.126,.492l2,7c.061,.214,.257,.362,.48,.362h.009c.226-.004,.421-.16,.476-.379l.644-2.578,3.664,3.664c.397,.384,1.03,.373,1.414-.025,.374-.388,.374-1.002,0-1.389l-3.664-3.664Z"})]})}),i.jsx("span",{className:"text-[12px] text-bv-teal font-medium",children:"Selection mode active"}),i.jsxs("span",{className:"text-[12px] text-bv-muted text-center leading-relaxed",children:["Hover over elements on the page to preview, then click to select.",i.jsx("br",{}),"Press"," ",i.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded bg-white/6 border border-white/8 font-mono text-[10px] text-bv-text-mid leading-none",children:"Esc"})," ","to cancel."]})]}):i.jsx("div",{className:"flex flex-1 flex-col justify-center p-4",children:i.jsxs("button",{onClick:()=>{p(!0),ue("overlay",{type:"TOGGLE_SELECT_MODE",active:!0})},className:"w-full flex flex-col items-center gap-3 px-6 py-5 rounded-lg border border-bv-border bg-bv-surface hover:border-bv-teal hover:bg-bv-teal/5 transition-all cursor-pointer",children:[i.jsx("div",{className:"w-14 h-14 rounded-full bg-bv-teal/10 text-bv-teal flex items-center justify-center",children:i.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 64 64",fill:"currentColor",children:[i.jsx("path",{d:"M2,9C1.447,9,1,8.552,1,8V2c0-0.552,0.447-1,1-1h6c0.553,0,1,0.448,1,1S8.553,3,8,3H3v5C3,8.552,2.553,9,2,9z"}),i.jsx("path",{d:"M8,48H2c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v5h5c0.553,0,1,0.448,1,1S8.553,48,8,48z"}),i.jsx("path",{d:"M47,9c-0.553,0-1-0.448-1-1V3h-5c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1v6C48,8.552,47.553,9,47,9z"}),i.jsx("path",{d:"M21,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,3,21,3z"}),i.jsx("path",{d:"M2,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,21.552,2.553,22,2,22z"}),i.jsx("path",{d:"M2,35c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C3,34.552,2.553,35,2,35z"}),i.jsx("path",{d:"M47,22c-0.553,0-1-0.448-1-1v-6c0-0.552,0.447-1,1-1s1,0.448,1,1v6C48,21.552,47.553,22,47,22z"}),i.jsx("path",{d:"M47,31c-0.553,0-1-0.448-1-1v-2c0-0.552,0.447-1,1-1s1,0.448,1,1v2C48,30.552,47.553,31,47,31z"}),i.jsx("path",{d:"M34,3h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S34.553,3,34,3z"}),i.jsx("path",{d:"M21,48h-6c-0.553,0-1-0.448-1-1s0.447-1,1-1h6c0.553,0,1,0.448,1,1S21.553,48,21,48z"}),i.jsx("path",{d:"M30,48h-2c-0.553,0-1-0.448-1-1s0.447-1,1-1h2c0.553,0,1,0.448,1,1S30.553,48,30,48z"}),i.jsx("path",{d:"M62.707,57.293L51.688,46.274l10.759-5.379c0.368-0.184,0.586-0.575,0.549-0.985c-0.037-0.41-0.322-0.755-0.717-0.87l-31-9c-0.355-0.1-0.729-0.005-0.986,0.253c-0.258,0.258-0.355,0.636-0.253,0.986l9,31c0.114,0.396,0.46,0.68,0.869,0.717C39.94,62.999,39.971,63,40,63c0.376,0,0.724-0.212,0.895-0.553l5.38-10.759l11.019,11.019c0.391,0.391,1.023,0.391,1.414,0l4-4C63.098,58.316,63.098,57.684,62.707,57.293z"})]})}),i.jsx("span",{className:"text-[12px] text-bv-text font-medium",children:"Select an element to inspect"}),i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⌘"}),i.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"⇧"}),i.jsx("span",{className:"w-5 h-5 rounded flex items-center justify-center bg-white/6 border border-white/8 font-mono text-[10px] font-semibold text-bv-text-mid leading-none",children:"C"})]})]})})}),Y]});const Z=n.parsedClasses;return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsx("div",{className:"px-3 pt-3 pb-2 border-b border-bv-border",children:i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[i.jsx(El,{mode:s,onModeChange:x}),i.jsxs("div",{className:"font-[family-name:var(--font-display)] font-bold text-[13px] text-bv-text leading-tight truncate",children:[n.componentName," ",i.jsxs("span",{className:"font-[family-name:var(--font-ui)] font-normal text-bv-text-mid",children:["— ",n.instanceCount," instance",n.instanceCount!==1?"s":""]})]})]}),!xo&&i.jsx(Cl,{})]})}),i.jsx(hd,{tabs:h,activeTab:g,onTabChange:y}),d&&i.jsx("div",{className:"px-3 py-2 bg-bv-teal/10 border-b border-bv-teal/30 text-xs text-bv-teal font-medium",children:"Editing text in the page…"}),i.jsxs("div",{className:`flex-1 overflow-auto ${d?"opacity-40 pointer-events-none":""}`,children:[g==="design"&&i.jsx($1,{componentName:n.componentName,instanceCount:n.instanceCount,rawClasses:n.classes,parsedClasses:Z,tailwindConfig:n.tailwindConfig,patchManager:S},o),g==="replace"&&i.jsx(jl,{insertMode:"replace"}),g==="place"&&i.jsx(jl,{insertMode:"place"})]}),Y]})}Bi.createRoot(document.getElementById("root")).render(i.jsx(tf.StrictMode,{children:i.jsx(W1,{})}));export{Ss as a,uh as c,i as j,sx as o,w as r,Sn as s};