diff --git a/assets/index-g2WPwO_q.js b/assets/index-4w0VaPVa.js similarity index 83% rename from assets/index-g2WPwO_q.js rename to assets/index-4w0VaPVa.js index a2ff276..03ba0ce 100644 --- a/assets/index-g2WPwO_q.js +++ b/assets/index-4w0VaPVa.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var qt=Symbol.for("react.element"),lc=Symbol.for("react.portal"),oc=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),uc=Symbol.for("react.profiler"),sc=Symbol.for("react.provider"),ac=Symbol.for("react.context"),cc=Symbol.for("react.forward_ref"),fc=Symbol.for("react.suspense"),dc=Symbol.for("react.memo"),pc=Symbol.for("react.lazy"),Fi=Symbol.iterator;function vc(e){return e===null||typeof e!="object"?null:(e=Fi&&e[Fi]||e["@@iterator"],typeof e=="function"?e:null)}var Ku={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yu=Object.assign,Xu={};function at(e,n,t){this.props=e,this.context=n,this.refs=Xu,this.updater=t||Ku}at.prototype.isReactComponent={};at.prototype.setState=function(e,n){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,n,"setState")};at.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gu(){}Gu.prototype=at.prototype;function Ao(e,n,t){this.props=e,this.context=n,this.refs=Xu,this.updater=t||Ku}var Bo=Ao.prototype=new Gu;Bo.constructor=Ao;Yu(Bo,at.prototype);Bo.isPureReactComponent=!0;var Di=Array.isArray,Zu=Object.prototype.hasOwnProperty,Ho={current:null},Ju={key:!0,ref:!0,__self:!0,__source:!0};function qu(e,n,t){var r,l={},o=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(o=""+n.key),n)Zu.call(n,r)&&!Ju.hasOwnProperty(r)&&(l[r]=n[r]);var u=arguments.length-2;if(u===1)l.children=t;else if(1>>1,R=C[N];if(0>>1;Nl(kn,h))Enl(or,kn)?(C[N]=or,C[En]=h,N=En):(C[N]=kn,C[q]=h,N=q);else if(Enl(or,h))C[N]=or,C[En]=h,N=En;else break e}}return L}function l(C,L){var h=C.sortIndex-L.sortIndex;return h!==0?h:C.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],m=1,p=null,v=3,S=!1,k=!1,E=!1,D=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var L=t(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=C)r(c),L.sortIndex=L.expirationTime,n(s,L);else break;L=t(c)}}function y(C){if(E=!1,d(C),!k)if(t(s)!==null)k=!0,dt(x);else{var L=t(c);L!==null&&pt(y,L.startTime-C)}}function x(C,L){k=!1,E&&(E=!1,f(j),j=-1),S=!0;var h=v;try{for(d(L),p=t(s);p!==null&&(!(p.expirationTime>L)||C&&!me());){var N=p.callback;if(typeof N=="function"){p.callback=null,v=p.priorityLevel;var R=N(p.expirationTime<=L);L=e.unstable_now(),typeof R=="function"?p.callback=R:p===t(s)&&r(s),d(L)}else r(s);p=t(s)}if(p!==null)var he=!0;else{var q=t(c);q!==null&&pt(y,q.startTime-L),he=!1}return he}finally{p=null,v=h,S=!1}}var P=!1,z=null,j=-1,A=5,T=-1;function me(){return!(e.unstable_now()-TC||125N?(C.sortIndex=h,n(c,C),t(s)===null&&C===t(c)&&(E?(f(j),j=-1):E=!0,pt(y,h-N))):(C.sortIndex=R,n(s,C),k||S||(k=!0,dt(x))),C},e.unstable_shouldYield=me,e.unstable_wrapCallback=function(C){var L=v;return function(){var h=v;v=L;try{return C.apply(this,arguments)}finally{v=h}}}})(ts);ns.exports=ts;var Nc=ns.exports;/** + */(function(e){function n(_,L){var h=_.length;_.push(L);e:for(;0>>1,R=_[N];if(0>>1;Nl(kn,h))Enl(or,kn)?(_[N]=or,_[En]=h,N=En):(_[N]=kn,_[q]=h,N=q);else if(Enl(or,h))_[N]=or,_[En]=h,N=En;else break e}}return L}function l(_,L){var h=_.sortIndex-L.sortIndex;return h!==0?h:_.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],m=1,p=null,v=3,S=!1,k=!1,E=!1,D=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(_){for(var L=t(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=_)r(c),L.sortIndex=L.expirationTime,n(s,L);else break;L=t(c)}}function y(_){if(E=!1,d(_),!k)if(t(s)!==null)k=!0,dt(x);else{var L=t(c);L!==null&&pt(y,L.startTime-_)}}function x(_,L){k=!1,E&&(E=!1,f(j),j=-1),S=!0;var h=v;try{for(d(L),p=t(s);p!==null&&(!(p.expirationTime>L)||_&&!me());){var N=p.callback;if(typeof N=="function"){p.callback=null,v=p.priorityLevel;var R=N(p.expirationTime<=L);L=e.unstable_now(),typeof R=="function"?p.callback=R:p===t(s)&&r(s),d(L)}else r(s);p=t(s)}if(p!==null)var he=!0;else{var q=t(c);q!==null&&pt(y,q.startTime-L),he=!1}return he}finally{p=null,v=h,S=!1}}var P=!1,z=null,j=-1,B=5,T=-1;function me(){return!(e.unstable_now()-T_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return t(s)},e.unstable_next=function(_){switch(v){case 1:case 2:case 3:var L=3;break;default:L=v}var h=v;v=L;try{return _()}finally{v=h}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,L){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var h=v;v=_;try{return L()}finally{v=h}},e.unstable_scheduleCallback=function(_,L,h){var N=e.unstable_now();switch(typeof h=="object"&&h!==null?(h=h.delay,h=typeof h=="number"&&0N?(_.sortIndex=h,n(c,_),t(s)===null&&_===t(c)&&(E?(f(j),j=-1):E=!0,pt(y,h-N))):(_.sortIndex=R,n(s,_),k||S||(k=!0,dt(x))),_},e.unstable_shouldYield=me,e.unstable_wrapCallback=function(_){var L=v;return function(){var h=v;v=L;try{return _.apply(this,arguments)}finally{v=h}}}})(ts);ns.exports=ts;var Nc=ns.exports;/** * @license React * react-dom.production.min.js * @@ -31,10 +31,10 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var rs=xe,Se=Nc;function g(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xl=Object.prototype.hasOwnProperty,Pc=/^[: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]*$/,Vi={},Ui={};function zc(e){return Xl.call(Ui,e)?!0:Xl.call(Vi,e)?!1:Pc.test(e)?Ui[e]=!0:(Vi[e]=!0,!1)}function jc(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Lc(e,n,t,r){if(n===null||typeof n>"u"||jc(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ae(e,n,t,r,l,o,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=i}var ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ne[e]=new ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];ne[n]=new ae(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ne[e]=new ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ne[e]=new ae(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){ne[e]=new ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ne[e]=new ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ne[e]=new ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ne[e]=new ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ne[e]=new ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qo=/[\-:]([a-z])/g;function Ko(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 n=e.replace(Qo,Ko);ne[n]=new ae(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Qo,Ko);ne[n]=new ae(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Qo,Ko);ne[n]=new ae(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ne[e]=new ae(e,1,!1,e.toLowerCase(),null,!1,!1)});ne.xlinkHref=new ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ne[e]=new ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yo(e,n,t,r){var l=ne.hasOwnProperty(n)?ne[n]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{xl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?Et(e):""}function Tc(e){switch(e.tag){case 5:return Et(e.type);case 16:return Et("Lazy");case 13:return Et("Suspense");case 19:return Et("SuspenseList");case 0:case 2:case 15:return e=Cl(e.type,!1),e;case 11:return e=Cl(e.type.render,!1),e;case 1:return e=Cl(e.type,!0),e;default:return""}}function ql(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 Un:return"Fragment";case Vn:return"Portal";case Gl:return"Profiler";case Xo:return"StrictMode";case Zl:return"Suspense";case Jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case is:return(e.displayName||"Context")+".Consumer";case os:return(e._context.displayName||"Context")+".Provider";case Go:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zo:return n=e.displayName||null,n!==null?n:ql(e.type)||"Memo";case be:n=e._payload,e=e._init;try{return ql(e(n))}catch{}}return null}function Rc(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ql(n);case 8:return n===Xo?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ss(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Oc(e){var n=ss(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=Oc(e))}function as(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ss(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Fr(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 bl(e,n){var t=n.checked;return W({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Ai(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=vn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function cs(e,n){n=n.checked,n!=null&&Yo(e,"checked",n,!1)}function eo(e,n){cs(e,n);var t=vn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?no(e,n.type,t):n.hasOwnProperty("defaultValue")&&no(e,n.type,vn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Bi(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function no(e,n,t){(n!=="number"||Fr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var xt=Array.isArray;function Zn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=ar.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Dt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Nt={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},Mc=["Webkit","ms","Moz","O"];Object.keys(Nt).forEach(function(e){Mc.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Nt[n]=Nt[e]})});function vs(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Nt.hasOwnProperty(e)&&Nt[e]?(""+n).trim():n+"px"}function ms(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=vs(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Fc=W({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 lo(e,n){if(n){if(Fc[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(g(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(g(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(g(61))}if(n.style!=null&&typeof n.style!="object")throw Error(g(62))}}function oo(e,n){if(e.indexOf("-")===-1)return typeof n.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 io=null;function Jo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uo=null,Jn=null,qn=null;function Qi(e){if(e=nr(e)){if(typeof uo!="function")throw Error(g(280));var n=e.stateNode;n&&(n=cl(n),uo(e.stateNode,e.type,n))}}function hs(e){Jn?qn?qn.push(e):qn=[e]:Jn=e}function ys(){if(Jn){var e=Jn,n=qn;if(qn=Jn=null,Qi(e),n)for(e=0;e>>=0,e===0?32:31-(Kc(e)/Yc|0)|0}var cr=64,fr=4194304;function Ct(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 Ur(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=t&268435455;if(i!==0){var u=i&~l;u!==0?r=Ct(u):(o&=i,o!==0&&(r=Ct(o)))}else i=t&~l,i!==0?r=Ct(i):o!==0&&(r=Ct(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function bt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Me(n),e[n]=t}function Jc(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=zt),eu=" ",nu=!1;function Is(e,n){switch(e){case"keyup":return Nf.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $n=!1;function zf(e,n){switch(e){case"compositionend":return Vs(n);case"keypress":return n.which!==32?null:(nu=!0,eu);case"textInput":return e=n.data,e===eu&&nu?null:e;default:return null}}function jf(e,n){if($n)return e==="compositionend"||!oi&&Is(e,n)?(e=Fs(),Nr=ti=rn=null,$n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ou(t)}}function Bs(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Bs(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Hs(){for(var e=window,n=Fr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Fr(e.document)}return n}function ii(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Vf(e){var n=Hs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Bs(t.ownerDocument.documentElement,t)){if(r!==null&&ii(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=iu(t,o);var i=iu(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,An=null,vo=null,Lt=null,mo=!1;function uu(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;mo||An==null||An!==Fr(r)||(r=An,"selectionStart"in r&&ii(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}),Lt&&Bt(Lt,r)||(Lt=r,r=Br(vo,"onSelect"),0Wn||(e.current=ko[Wn],ko[Wn]=null,Wn--)}function I(e,n){Wn++,ko[Wn]=e.current,e.current=n}var mn={},oe=yn(mn),de=yn(!1),Ln=mn;function rt(e,n){var t=e.type.contextTypes;if(!t)return mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function Wr(){U(de),U(oe)}function vu(e,n,t){if(oe.current!==mn)throw Error(g(168));I(oe,n),I(de,t)}function qs(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(g(108,Rc(e)||"Unknown",l));return W({},t,r)}function Qr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,Ln=oe.current,I(oe,e),I(de,de.current),!0}function mu(e,n,t){var r=e.stateNode;if(!r)throw Error(g(169));t?(e=qs(e,n,Ln),r.__reactInternalMemoizedMergedChildContext=e,U(de),U(oe),I(oe,e)):U(de),I(de,t)}var He=null,fl=!1,Vl=!1;function bs(e){He===null?He=[e]:He.push(e)}function Zf(e){fl=!0,bs(e)}function gn(){if(!Vl&&He!==null){Vl=!0;var e=0,n=F;try{var t=He;for(F=1;e>=i,l-=i,We=1<<32-Me(n)+l|t<j?(A=z,z=null):A=z.sibling;var T=v(f,z,d[j],y);if(T===null){z===null&&(z=A);break}e&&z&&T.alternate===null&&n(f,z),a=o(T,a,j),P===null?x=T:P.sibling=T,P=T,z=A}if(j===d.length)return t(f,z),$&&xn(f,j),x;if(z===null){for(;jj?(A=z,z=null):A=z.sibling;var me=v(f,z,T.value,y);if(me===null){z===null&&(z=A);break}e&&z&&me.alternate===null&&n(f,z),a=o(me,a,j),P===null?x=me:P.sibling=me,P=me,z=A}if(T.done)return t(f,z),$&&xn(f,j),x;if(z===null){for(;!T.done;j++,T=d.next())T=p(f,T.value,y),T!==null&&(a=o(T,a,j),P===null?x=T:P.sibling=T,P=T);return $&&xn(f,j),x}for(z=r(f,z);!T.done;j++,T=d.next())T=S(z,f,j,T.value,y),T!==null&&(e&&T.alternate!==null&&z.delete(T.key===null?j:T.key),a=o(T,a,j),P===null?x=T:P.sibling=T,P=T);return e&&z.forEach(function(wn){return n(f,wn)}),$&&xn(f,j),x}function D(f,a,d,y){if(typeof d=="object"&&d!==null&&d.type===Un&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case ur:e:{for(var x=d.key,P=a;P!==null;){if(P.key===x){if(x=d.type,x===Un){if(P.tag===7){t(f,P.sibling),a=l(P,d.props.children),a.return=f,f=a;break e}}else if(P.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===be&&Eu(x)===P.type){t(f,P.sibling),a=l(P,d.props),a.ref=wt(f,P,d),a.return=f,f=a;break e}t(f,P);break}else n(f,P);P=P.sibling}d.type===Un?(a=jn(d.props.children,f.mode,y,d.key),a.return=f,f=a):(y=Mr(d.type,d.key,d.props,null,f.mode,y),y.ref=wt(f,a,d),y.return=f,f=y)}return i(f);case Vn:e:{for(P=d.key;a!==null;){if(a.key===P)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=Kl(d,f.mode,y),a.return=f,f=a}return i(f);case be:return P=d._init,D(f,a,P(d._payload),y)}if(xt(d))return k(f,a,d,y);if(vt(d))return E(f,a,d,y);gr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=Ql(d,f.mode,y),a.return=f,f=a),i(f)):t(f,a)}return D}var ot=ua(!0),sa=ua(!1),tr={},Ae=yn(tr),Kt=yn(tr),Yt=yn(tr);function Pn(e){if(e===tr)throw Error(g(174));return e}function mi(e,n){switch(I(Yt,n),I(Kt,e),I(Ae,tr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ro(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ro(n,e)}U(Ae),I(Ae,n)}function it(){U(Ae),U(Kt),U(Yt)}function aa(e){Pn(Yt.current);var n=Pn(Ae.current),t=ro(n,e.type);n!==t&&(I(Kt,e),I(Ae,t))}function hi(e){Kt.current===e&&(U(Ae),U(Kt))}var B=yn(0);function Jr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ul=[];function yi(){for(var e=0;et?t:4,e(!0);var r=$l.transition;$l.transition={};try{e(!1),n()}finally{F=t,$l.transition=r}}function _a(){return je().memoizedState}function ed(e,n,t){var r=dn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Na(e))Pa(n,t);else if(t=ra(e,n,t,r),t!==null){var l=ue();Fe(t,e,r,l),za(t,n,r)}}function nd(e,n,t){var r=dn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Na(e))Pa(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var i=n.lastRenderedState,u=o(i,t);if(l.hasEagerState=!0,l.eagerState=u,De(u,i)){var s=n.interleaved;s===null?(l.next=l,pi(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ra(e,n,l,r),t!==null&&(l=ue(),Fe(t,e,r,l),za(t,n,r))}}function Na(e){var n=e.alternate;return e===H||n!==null&&n===H}function Pa(e,n){Tt=qr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function za(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,bo(e,t)}}var br={readContext:ze,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},td={readContext:ze,useCallback:function(e,n){return Ve().memoizedState=[e,n===void 0?null:n],e},useContext:ze,useEffect:Cu,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Lr(4194308,4,Sa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Lr(4194308,4,e,n)},useInsertionEffect:function(e,n){return Lr(4,2,e,n)},useMemo:function(e,n){var t=Ve();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Ve();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=ed.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var n=Ve();return e={current:e},n.memoizedState=e},useState:xu,useDebugValue:Ei,useDeferredValue:function(e){return Ve().memoizedState=e},useTransition:function(){var e=xu(!1),n=e[0];return e=bf.bind(null,e[1]),Ve().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=H,l=Ve();if($){if(t===void 0)throw Error(g(407));t=t()}else{if(t=n(),J===null)throw Error(g(349));Rn&30||da(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,Cu(va.bind(null,r,o,e),[e]),r.flags|=2048,Zt(9,pa.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Ve(),n=J.identifierPrefix;if($){var t=Qe,r=We;t=(r&~(1<<32-Me(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Xt++,0")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{xl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?Et(e):""}function Tc(e){switch(e.tag){case 5:return Et(e.type);case 16:return Et("Lazy");case 13:return Et("Suspense");case 19:return Et("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function ql(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 Un:return"Fragment";case Vn:return"Portal";case Gl:return"Profiler";case Xo:return"StrictMode";case Zl:return"Suspense";case Jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case is:return(e.displayName||"Context")+".Consumer";case os:return(e._context.displayName||"Context")+".Provider";case Go:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zo:return n=e.displayName||null,n!==null?n:ql(e.type)||"Memo";case be:n=e._payload,e=e._init;try{return ql(e(n))}catch{}}return null}function Rc(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ql(n);case 8:return n===Xo?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ss(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Oc(e){var n=ss(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sr(e){e._valueTracker||(e._valueTracker=Oc(e))}function as(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ss(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Fr(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 bl(e,n){var t=n.checked;return W({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Bi(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=vn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function cs(e,n){n=n.checked,n!=null&&Yo(e,"checked",n,!1)}function eo(e,n){cs(e,n);var t=vn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?no(e,n.type,t):n.hasOwnProperty("defaultValue")&&no(e,n.type,vn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Ai(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function no(e,n,t){(n!=="number"||Fr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var xt=Array.isArray;function Zn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=ar.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Dt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var Nt={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},Mc=["Webkit","ms","Moz","O"];Object.keys(Nt).forEach(function(e){Mc.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Nt[n]=Nt[e]})});function vs(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||Nt.hasOwnProperty(e)&&Nt[e]?(""+n).trim():n+"px"}function ms(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=vs(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Fc=W({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 lo(e,n){if(n){if(Fc[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(g(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(g(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(g(61))}if(n.style!=null&&typeof n.style!="object")throw Error(g(62))}}function oo(e,n){if(e.indexOf("-")===-1)return typeof n.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 io=null;function Jo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uo=null,Jn=null,qn=null;function Qi(e){if(e=nr(e)){if(typeof uo!="function")throw Error(g(280));var n=e.stateNode;n&&(n=cl(n),uo(e.stateNode,e.type,n))}}function hs(e){Jn?qn?qn.push(e):qn=[e]:Jn=e}function ys(){if(Jn){var e=Jn,n=qn;if(qn=Jn=null,Qi(e),n)for(e=0;e>>=0,e===0?32:31-(Kc(e)/Yc|0)|0}var cr=64,fr=4194304;function _t(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 Ur(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=t&268435455;if(i!==0){var u=i&~l;u!==0?r=_t(u):(o&=i,o!==0&&(r=_t(o)))}else i=t&~l,i!==0?r=_t(i):o!==0&&(r=_t(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function bt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Me(n),e[n]=t}function Jc(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=zt),eu=" ",nu=!1;function Is(e,n){switch(e){case"keyup":return Nf.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $n=!1;function zf(e,n){switch(e){case"compositionend":return Vs(n);case"keypress":return n.which!==32?null:(nu=!0,eu);case"textInput":return e=n.data,e===eu&&nu?null:e;default:return null}}function jf(e,n){if($n)return e==="compositionend"||!oi&&Is(e,n)?(e=Fs(),Nr=ti=rn=null,$n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ou(t)}}function As(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?As(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Hs(){for(var e=window,n=Fr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Fr(e.document)}return n}function ii(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Vf(e){var n=Hs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&As(t.ownerDocument.documentElement,t)){if(r!==null&&ii(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=iu(t,o);var i=iu(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Bn=null,vo=null,Lt=null,mo=!1;function uu(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;mo||Bn==null||Bn!==Fr(r)||(r=Bn,"selectionStart"in r&&ii(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}),Lt&&At(Lt,r)||(Lt=r,r=Ar(vo,"onSelect"),0Wn||(e.current=ko[Wn],ko[Wn]=null,Wn--)}function I(e,n){Wn++,ko[Wn]=e.current,e.current=n}var mn={},oe=yn(mn),de=yn(!1),Ln=mn;function rt(e,n){var t=e.type.contextTypes;if(!t)return mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function Wr(){U(de),U(oe)}function vu(e,n,t){if(oe.current!==mn)throw Error(g(168));I(oe,n),I(de,t)}function qs(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(g(108,Rc(e)||"Unknown",l));return W({},t,r)}function Qr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mn,Ln=oe.current,I(oe,e),I(de,de.current),!0}function mu(e,n,t){var r=e.stateNode;if(!r)throw Error(g(169));t?(e=qs(e,n,Ln),r.__reactInternalMemoizedMergedChildContext=e,U(de),U(oe),I(oe,e)):U(de),I(de,t)}var He=null,fl=!1,Vl=!1;function bs(e){He===null?He=[e]:He.push(e)}function Zf(e){fl=!0,bs(e)}function gn(){if(!Vl&&He!==null){Vl=!0;var e=0,n=F;try{var t=He;for(F=1;e>=i,l-=i,We=1<<32-Me(n)+l|t<j?(B=z,z=null):B=z.sibling;var T=v(f,z,d[j],y);if(T===null){z===null&&(z=B);break}e&&z&&T.alternate===null&&n(f,z),a=o(T,a,j),P===null?x=T:P.sibling=T,P=T,z=B}if(j===d.length)return t(f,z),$&&xn(f,j),x;if(z===null){for(;jj?(B=z,z=null):B=z.sibling;var me=v(f,z,T.value,y);if(me===null){z===null&&(z=B);break}e&&z&&me.alternate===null&&n(f,z),a=o(me,a,j),P===null?x=me:P.sibling=me,P=me,z=B}if(T.done)return t(f,z),$&&xn(f,j),x;if(z===null){for(;!T.done;j++,T=d.next())T=p(f,T.value,y),T!==null&&(a=o(T,a,j),P===null?x=T:P.sibling=T,P=T);return $&&xn(f,j),x}for(z=r(f,z);!T.done;j++,T=d.next())T=S(z,f,j,T.value,y),T!==null&&(e&&T.alternate!==null&&z.delete(T.key===null?j:T.key),a=o(T,a,j),P===null?x=T:P.sibling=T,P=T);return e&&z.forEach(function(wn){return n(f,wn)}),$&&xn(f,j),x}function D(f,a,d,y){if(typeof d=="object"&&d!==null&&d.type===Un&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case ur:e:{for(var x=d.key,P=a;P!==null;){if(P.key===x){if(x=d.type,x===Un){if(P.tag===7){t(f,P.sibling),a=l(P,d.props.children),a.return=f,f=a;break e}}else if(P.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===be&&Eu(x)===P.type){t(f,P.sibling),a=l(P,d.props),a.ref=wt(f,P,d),a.return=f,f=a;break e}t(f,P);break}else n(f,P);P=P.sibling}d.type===Un?(a=jn(d.props.children,f.mode,y,d.key),a.return=f,f=a):(y=Mr(d.type,d.key,d.props,null,f.mode,y),y.ref=wt(f,a,d),y.return=f,f=y)}return i(f);case Vn:e:{for(P=d.key;a!==null;){if(a.key===P)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=Kl(d,f.mode,y),a.return=f,f=a}return i(f);case be:return P=d._init,D(f,a,P(d._payload),y)}if(xt(d))return k(f,a,d,y);if(vt(d))return E(f,a,d,y);gr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=Ql(d,f.mode,y),a.return=f,f=a),i(f)):t(f,a)}return D}var ot=ua(!0),sa=ua(!1),tr={},Be=yn(tr),Kt=yn(tr),Yt=yn(tr);function Pn(e){if(e===tr)throw Error(g(174));return e}function mi(e,n){switch(I(Yt,n),I(Kt,e),I(Be,tr),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ro(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ro(n,e)}U(Be),I(Be,n)}function it(){U(Be),U(Kt),U(Yt)}function aa(e){Pn(Yt.current);var n=Pn(Be.current),t=ro(n,e.type);n!==t&&(I(Kt,e),I(Be,t))}function hi(e){Kt.current===e&&(U(Be),U(Kt))}var A=yn(0);function Jr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ul=[];function yi(){for(var e=0;et?t:4,e(!0);var r=$l.transition;$l.transition={};try{e(!1),n()}finally{F=t,$l.transition=r}}function Ca(){return je().memoizedState}function ed(e,n,t){var r=dn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Na(e))Pa(n,t);else if(t=ra(e,n,t,r),t!==null){var l=ue();Fe(t,e,r,l),za(t,n,r)}}function nd(e,n,t){var r=dn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Na(e))Pa(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var i=n.lastRenderedState,u=o(i,t);if(l.hasEagerState=!0,l.eagerState=u,De(u,i)){var s=n.interleaved;s===null?(l.next=l,pi(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ra(e,n,l,r),t!==null&&(l=ue(),Fe(t,e,r,l),za(t,n,r))}}function Na(e){var n=e.alternate;return e===H||n!==null&&n===H}function Pa(e,n){Tt=qr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function za(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,bo(e,t)}}var br={readContext:ze,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},td={readContext:ze,useCallback:function(e,n){return Ve().memoizedState=[e,n===void 0?null:n],e},useContext:ze,useEffect:_u,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Lr(4194308,4,Sa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Lr(4194308,4,e,n)},useInsertionEffect:function(e,n){return Lr(4,2,e,n)},useMemo:function(e,n){var t=Ve();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Ve();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=ed.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var n=Ve();return e={current:e},n.memoizedState=e},useState:xu,useDebugValue:Ei,useDeferredValue:function(e){return Ve().memoizedState=e},useTransition:function(){var e=xu(!1),n=e[0];return e=bf.bind(null,e[1]),Ve().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=H,l=Ve();if($){if(t===void 0)throw Error(g(407));t=t()}else{if(t=n(),J===null)throw Error(g(349));Rn&30||da(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,_u(va.bind(null,r,o,e),[e]),r.flags|=2048,Zt(9,pa.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Ve(),n=J.identifierPrefix;if($){var t=Qe,r=We;t=(r&~(1<<32-Me(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Xt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Ue]=n,e[Qt]=r,Ia(e,n,!1,!1),n.stateNode=e;e:{switch(i=oo(t,r),t){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;l<_t.length;l++)V(_t[l],e);l=r;break;case"source":V("error",e),l=r;break;case"img":case"image":case"link":V("error",e),V("load",e),l=r;break;case"details":V("toggle",e),l=r;break;case"input":Ai(e,r),l=bl(e,r),V("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=W({},r,{value:void 0}),V("invalid",e);break;case"textarea":Hi(e,r),l=to(e,r),V("invalid",e);break;default:l=r}lo(t,l),u=l;for(o in u)if(u.hasOwnProperty(o)){var s=u[o];o==="style"?ms(e,s):o==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&ps(e,s)):o==="children"?typeof s=="string"?(t!=="textarea"||s!=="")&&Dt(e,s):typeof s=="number"&&Dt(e,""+s):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ft.hasOwnProperty(o)?s!=null&&o==="onScroll"&&V("scroll",e):s!=null&&Yo(e,o,s,i))}switch(t){case"input":sr(e),Bi(e,r,!1);break;case"textarea":sr(e),Wi(e);break;case"option":r.value!=null&&e.setAttribute("value",""+vn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Zn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Zn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Hr)}switch(t){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return re(n),null;case 6:if(e&&n.stateNode!=null)Ua(e,n,e.memoizedProps,r);else{if(typeof r!="string"&&n.stateNode===null)throw Error(g(166));if(t=Pn(Yt.current),Pn(Ae.current),yr(n)){if(r=n.stateNode,t=n.memoizedProps,r[Ue]=n,(o=r.nodeValue!==t)&&(e=we,e!==null))switch(e.tag){case 3:hr(r.nodeValue,t,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hr(r.nodeValue,t,(e.mode&1)!==0)}o&&(n.flags|=4)}else r=(t.nodeType===9?t:t.ownerDocument).createTextNode(r),r[Ue]=n,n.stateNode=r}return re(n),null;case 13:if(U(B),r=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($&&ge!==null&&n.mode&1&&!(n.flags&128))ta(),lt(),n.flags|=98560,o=!1;else if(o=yr(n),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(g(318));if(o=n.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(g(317));o[Ue]=n}else lt(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;re(n),o=!1}else Oe!==null&&($o(Oe),Oe=null),o=!0;if(!o)return n.flags&65536?n:null}return n.flags&128?(n.lanes=t,n):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(n.child.flags|=8192,n.mode&1&&(e===null||B.current&1?G===0&&(G=3):ji())),n.updateQueue!==null&&(n.flags|=4),re(n),null);case 4:return it(),Ro(e,n),e===null&&Ht(n.stateNode.containerInfo),re(n),null;case 10:return di(n.type._context),re(n),null;case 17:return pe(n.type)&&Wr(),re(n),null;case 19:if(U(B),o=n.memoizedState,o===null)return re(n),null;if(r=(n.flags&128)!==0,i=o.rendering,i===null)if(r)St(o,!1);else{if(G!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(i=Jr(e),i!==null){for(n.flags|=128,St(o,!1),r=i.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),n.subtreeFlags=0,r=t,t=n.child;t!==null;)o=t,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t=t.sibling;return I(B,B.current&1|2),n.child}e=e.sibling}o.tail!==null&&K()>st&&(n.flags|=128,r=!0,St(o,!1),n.lanes=4194304)}else{if(!r)if(e=Jr(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),St(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!$)return re(n),null}else 2*K()-o.renderingStartTime>st&&t!==1073741824&&(n.flags|=128,r=!0,St(o,!1),n.lanes=4194304);o.isBackwards?(i.sibling=n.child,n.child=i):(t=o.last,t!==null?t.sibling=i:n.child=i,o.last=i)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=K(),n.sibling=null,t=B.current,I(B,r?t&1|2:t&1),n):(re(n),null);case 22:case 23:return zi(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?ye&1073741824&&(re(n),n.subtreeFlags&6&&(n.flags|=8192)):re(n),null;case 24:return null;case 25:return null}throw Error(g(156,n.tag))}function cd(e,n){switch(si(n),n.tag){case 1:return pe(n.type)&&Wr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return it(),U(de),U(oe),yi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return hi(n),null;case 13:if(U(B),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(g(340));lt()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(B),null;case 4:return it(),null;case 10:return di(n.type._context),null;case 22:case 23:return zi(),null;case 24:return null;default:return null}}var Sr=!1,le=!1,fd=typeof WeakSet=="function"?WeakSet:Set,_=null;function Xn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){Q(e,n,r)}else t.current=null}function Oo(e,n,t){try{t()}catch(r){Q(e,n,r)}}var Ou=!1;function dd(e,n){if(ho=$r,e=Hs(),ii(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var i=0,u=-1,s=-1,c=0,m=0,p=e,v=null;n:for(;;){for(var S;p!==t||l!==0&&p.nodeType!==3||(u=i+l),p!==o||r!==0&&p.nodeType!==3||(s=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(S=p.firstChild)!==null;)v=p,p=S;for(;;){if(p===e)break n;if(v===t&&++c===l&&(u=i),v===o&&++m===r&&(s=i),(S=p.nextSibling)!==null)break;p=v,v=p.parentNode}p=S}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(yo={focusedElem:e,selectionRange:t},$r=!1,_=n;_!==null;)if(n=_,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,_=e;else for(;_!==null;){n=_;try{var k=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var E=k.memoizedProps,D=k.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?E:Te(n.type,E),D);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(y){Q(n,n.return,y)}if(e=n.sibling,e!==null){e.return=n.return,_=e;break}_=n.return}return k=Ou,Ou=!1,k}function Rt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Oo(n,t,o)}l=l.next}while(l!==r)}}function vl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Mo(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function $a(e){var n=e.alternate;n!==null&&(e.alternate=null,$a(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ue],delete n[Qt],delete n[So],delete n[Xf],delete n[Gf])),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 Aa(e){return e.tag===5||e.tag===3||e.tag===4}function Mu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aa(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 Fo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Hr));else if(r!==4&&(e=e.child,e!==null))for(Fo(e,n,t),e=e.sibling;e!==null;)Fo(e,n,t),e=e.sibling}function Do(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Do(e,n,t),e=e.sibling;e!==null;)Do(e,n,t),e=e.sibling}var b=null,Re=!1;function qe(e,n,t){for(t=t.child;t!==null;)Ba(e,n,t),t=t.sibling}function Ba(e,n,t){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(il,t)}catch{}switch(t.tag){case 5:le||Xn(t,n);case 6:var r=b,l=Re;b=null,qe(e,n,t),b=r,Re=l,b!==null&&(Re?(e=b,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):b.removeChild(t.stateNode));break;case 18:b!==null&&(Re?(e=b,t=t.stateNode,e.nodeType===8?Il(e.parentNode,t):e.nodeType===1&&Il(e,t),$t(e)):Il(b,t.stateNode));break;case 4:r=b,l=Re,b=t.stateNode.containerInfo,Re=!0,qe(e,n,t),b=r,Re=l;break;case 0:case 11:case 14:case 15:if(!le&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Oo(t,n,i),l=l.next}while(l!==r)}qe(e,n,t);break;case 1:if(!le&&(Xn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){Q(t,n,u)}qe(e,n,t);break;case 21:qe(e,n,t);break;case 22:t.mode&1?(le=(r=le)||t.memoizedState!==null,qe(e,n,t),le=r):qe(e,n,t);break;default:qe(e,n,t)}}function Fu(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new fd),n.forEach(function(r){var l=kd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Le(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,ln===null)var r=!1;else{if(e=ln,ln=null,tl=0,M&6)throw Error(g(331));var l=M;for(M|=4,_=e.current;_!==null;){var o=_,i=o.child;if(_.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sK()-Ni?zn(e,0):_i|=t),ve(e,n)}function Za(e,n){n===0&&(e.mode&1?(n=fr,fr<<=1,!(fr&130023424)&&(fr=4194304)):n=1);var t=ue();e=Ge(e,n),e!==null&&(bt(e,n,t),ve(e,t))}function Sd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Za(e,t)}function kd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(n),Za(e,t)}var Ja;Ja=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||de.current)fe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return fe=!1,sd(e,n,t);fe=!!(e.flags&131072)}else fe=!1,$&&n.flags&1048576&&ea(n,Yr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Tr(e,n),e=n.pendingProps;var l=rt(n,oe.current);et(n,t),l=wi(null,n,r,e,l,t);var o=Si();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,pe(r)?(o=!0,Qr(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vi(n),l.updater=dl,n.stateNode=l,l._reactInternals=n,No(n,r,e,t),n=jo(null,n,r,!0,o,t)):(n.tag=0,$&&o&&ui(n),ie(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Tr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=xd(r),e=Te(r,e),l){case 0:n=zo(null,n,r,e,t);break e;case 1:n=Lu(null,n,r,e,t);break e;case 11:n=zu(null,n,r,e,t);break e;case 14:n=ju(null,n,r,Te(r.type,e),t);break e}throw Error(g(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),zo(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),Lu(e,n,r,l,t);case 3:e:{if(Ma(n),e===null)throw Error(g(387));r=n.pendingProps,o=n.memoizedState,l=o.element,la(e,n),Zr(n,r,null,t);var i=n.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=ut(Error(g(423)),n),n=Tu(e,n,r,t,l);break e}else if(r!==l){l=ut(Error(g(424)),n),n=Tu(e,n,r,t,l);break e}else for(ge=an(n.stateNode.containerInfo.firstChild),we=n,$=!0,Oe=null,t=sa(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(lt(),r===l){n=Ze(e,n,t);break e}ie(e,n,r,t)}n=n.child}return n;case 5:return aa(n),e===null&&xo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,go(r,l)?i=null:o!==null&&go(r,o)&&(n.flags|=32),Oa(e,n),ie(e,n,i,t),n.child;case 6:return e===null&&xo(n),null;case 13:return Fa(e,n,t);case 4:return mi(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=ot(n,null,r,t):ie(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),zu(e,n,r,l,t);case 7:return ie(e,n,n.pendingProps,t),n.child;case 8:return ie(e,n,n.pendingProps.children,t),n.child;case 12:return ie(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,i=l.value,I(Xr,r._currentValue),r._currentValue=i,o!==null)if(De(o.value,i)){if(o.children===l.children&&!de.current){n=Ze(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Ke(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?s.next=s:(s.next=m.next,m.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),Co(o.return,t,n),u.lanes|=t;break}s=s.next}}else if(o.tag===10)i=o.type===n.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(g(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),Co(i,t,n),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===n){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ie(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,et(n,t),l=ze(l),r=r(l),n.flags|=1,ie(e,n,r,t),n.child;case 14:return r=n.type,l=Te(r,n.pendingProps),l=Te(r.type,l),ju(e,n,r,l,t);case 15:return Ta(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),Tr(e,n),n.tag=1,pe(r)?(e=!0,Qr(n)):e=!1,et(n,t),ia(n,r,l),No(n,r,l,t),jo(null,n,r,!0,e,t);case 19:return Da(e,n,t);case 22:return Ra(e,n,t)}throw Error(g(156,n.tag))};function qa(e,n){return Cs(e,n)}function Ed(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 Ne(e,n,t,r){return new Ed(e,n,t,r)}function Li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xd(e){if(typeof e=="function")return Li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Go)return 11;if(e===Zo)return 14}return 2}function pn(e,n){var t=e.alternate;return t===null?(t=Ne(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Mr(e,n,t,r,l,o){var i=2;if(r=e,typeof e=="function")Li(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Un:return jn(t.children,l,o,n);case Xo:i=8,l|=8;break;case Gl:return e=Ne(12,t,n,l|2),e.elementType=Gl,e.lanes=o,e;case Zl:return e=Ne(13,t,n,l),e.elementType=Zl,e.lanes=o,e;case Jl:return e=Ne(19,t,n,l),e.elementType=Jl,e.lanes=o,e;case us:return hl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case os:i=10;break e;case is:i=9;break e;case Go:i=11;break e;case Zo:i=14;break e;case be:i=16,r=null;break e}throw Error(g(130,e==null?e:typeof e,""))}return n=Ne(i,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function jn(e,n,t,r){return e=Ne(7,e,r,n),e.lanes=t,e}function hl(e,n,t,r){return e=Ne(22,e,r,n),e.elementType=us,e.lanes=t,e.stateNode={isHidden:!1},e}function Ql(e,n,t){return e=Ne(6,e,null,n),e.lanes=t,e}function Kl(e,n,t){return n=Ne(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Cd(e,n,t,r,l){this.tag=n,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=Nl(0),this.expirationTimes=Nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,n,t,r,l,o,i,u,s){return e=new Cd(e,n,t,u,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=Ne(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},vi(o),e}function _d(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tc)}catch(e){console.error(e)}}tc(),es.exports=ke;var Ld=es.exports,Hu=Ld;Yl.createRoot=Hu.createRoot,Yl.hydrateRoot=Hu.hydrateRoot;function Td(e){var c,m;if(!e.flagKey)return{};const n=e.state?"ENABLED":"DISABLED",t=(c=e.variants)==null?void 0:c.reduce((p,v)=>{if(e.type==="object")try{p[v.name]=JSON.parse(v.value)}catch{p[v.name]=""}else p[v.name]=v.value;return p},{}),r=e.defaultVariant,l=p=>({[p.operator]:[{var:p.name},p.subOperator,p.value]}),o=p=>{const S={[p.operator==="not_in"||p.operator==="in_string"||p.operator==="not_in_string"?"in":p.operator]:[{var:p.name},p.operator==="in"||p.operator==="not_in"?i(p.value):p.value]};return p.operator==="not_in"||p.operator==="not_in_string"?{"!":S}:S},i=p=>p==null?void 0:p.split(",").map(v=>v.trim()),u=(m=e.rules)==null?void 0:m.flatMap(p=>[p.condition.operator==="sem_ver"?l(p.condition):o(p.condition),p.targetVariant]);e.hasDefaultRule&&u.push(e.defaultRule);const s=e.hasTargeting?{if:u}:{};return{[e.flagKey]:{state:n,variants:t,defaultVariant:r,targeting:s}}}const Rd=({index:e,variants:n,rule:t,handleRuleChange:r,removeRule:l})=>{const o=e===0?"If":"Else If",i=t.condition.operator==="sem_ver"&&w.jsxs("select",{id:`subOperator${e}`,value:t.condition.subOperator,onChange:s=>r(e,"subOperator",s.target.value),children:[w.jsx("option",{value:">=",children:">="}),w.jsx("option",{value:"<=",children:"<="}),w.jsx("option",{value:"~",children:"~(minor)"}),w.jsx("option",{value:"^",children:"^(major)"}),w.jsx("option",{value:"=",children:"="}),w.jsx("option",{value:"!=",children:"!="}),w.jsx("option",{value:">",children:">"}),w.jsx("option",{value:"<",children:"<"})]}),u=n.filter(s=>s.name).map((s,c)=>w.jsx("option",{value:s.name,children:s.name},`targetVariant-${c}`));return w.jsxs("div",{children:[w.jsxs("label",{children:[o,w.jsx("input",{id:`condition${e}Name`,placeholder:"Name",value:t.condition.name,onChange:s=>r(e,"name",s.target.value)}),w.jsxs("select",{id:`operator${e}`,value:t.condition.operator,onChange:s=>r(e,"operator",s.target.value),children:[w.jsx("option",{value:"ends_with",children:"Ends with"}),w.jsx("option",{value:"in",children:"In a list"}),w.jsx("option",{value:"not_in",children:"Not in a list"}),w.jsx("option",{value:"sem_ver",children:"Semantic version"}),w.jsx("option",{value:"==",children:"Equals"}),w.jsx("option",{value:"===",children:"Strict equals"}),w.jsx("option",{value:"!=",children:"Not equals"}),w.jsx("option",{value:"!==",children:"Not strict equals"}),w.jsx("option",{value:"!!",children:"Exists"}),w.jsx("option",{value:"!",children:"Not exists"}),w.jsx("option",{value:">",children:"Greater than"}),w.jsx("option",{value:">=",children:"Greater than or equals"}),w.jsx("option",{value:"<",children:"Less than"}),w.jsx("option",{value:"<=",children:"Less than or equals"}),w.jsx("option",{value:"in_string",children:"Contains in string"}),w.jsx("option",{value:"not_in_string",children:"Not contains in string"})]}),i,w.jsx("input",{id:`condition${e}Value`,placeholder:"Value",value:t.condition.value,onChange:s=>r(e,"value",s.target.value)})]}),w.jsx("br",{}),w.jsxs("label",{children:["Then",w.jsx("select",{id:`targetVariant${e}`,value:t.targetVariant,onChange:s=>r(e,"",s.target.value),children:u})]}),w.jsx("button",{id:`removeRule${e}`,onClick:()=>l(e),children:"Remove"})]})};function Od(){const[e,n]=xe.useState("test-feature"),[t,r]=xe.useState(!0),[l,o]=xe.useState("boolean"),[i,u]=xe.useState([{name:"true",value:!0},{name:"false",value:!1}]),[s,c]=xe.useState("false"),[m,p]=xe.useState(!1),[v,S]=xe.useState([{condition:{name:"",operator:"ends_with",subOperator:">=",value:""},targetVariant:"true"}]),[k,E]=xe.useState(!1),[D,f]=xe.useState("false"),a=h=>{o(h),h==="boolean"?(u([{name:"true",value:!0},{name:"false",value:!1}]),c("false")):h==="string"?(u([{name:"foo",value:"foo"},{name:"bar",value:"bar"}]),c("foo")):h==="number"?(u([{name:"1",value:1},{name:"2",value:2}]),c("1")):h==="object"&&(u([{name:"foo",value:JSON.stringify({foo:"foo"})},{name:"bar",value:JSON.stringify({bar:"bar"})}]),c("foo"))},d=(h,N,R)=>{const he=i.map((q,kn)=>kn===h?{...q,[N]:R}:q);u(he),he.length===1&&c(he[0].name)},y=()=>{const h={name:""};l==="boolean"?h.value=!1:l==="string"?h.value="":l==="number"?h.value=0:l==="object"&&(h.value=JSON.stringify({})),u([...i,h])},x=h=>{var R;const N=i.filter((he,q)=>q!==h);u(N),s===i[h].name&&c(((R=N[0])==null?void 0:R.name)||"")},P=(h,N,R)=>{const he=v.map((q,kn)=>kn===h?N!==""?{condition:{...q.condition,[N]:R},targetVariant:q.targetVariant}:{condition:q.condition,targetVariant:R}:q);S(he)},z=()=>{const h={condition:{name:"",operator:"ends_with",subOperator:">=",value:""},targetVariant:"true"};S([...v,h])},j=h=>{const N=v.filter((R,he)=>he!==h);S(N)},A=()=>{const N=Td({flagKey:e,state:t,type:l,variants:i,defaultVariant:s,hasTargeting:m,rules:v,hasDefaultRule:k,defaultRule:D});return JSON.stringify(N,null,2)},T=(h,N)=>l==="boolean"?w.jsxs("select",{id:`variant${N}Value`,value:h.value.toString(),onChange:R=>d(N,"value",R.target.value==="true"),children:[w.jsx("option",{value:"true",children:"true"}),w.jsx("option",{value:"false",children:"false"})]}):null,me=(h,N)=>l==="string"?w.jsx("input",{id:`variant${N}Value`,placeholder:"Value",value:h.value,onChange:R=>d(N,"value",R.target.value)}):null,wn=(h,N)=>l==="number"?w.jsx("input",{id:`variant${N}Value`,type:"number",value:h.value,onChange:R=>d(N,"value",Number(R.target.value))}):null,Sn=(h,N)=>l==="object"?w.jsx("input",{id:`variant${N}Value`,value:h.value,onChange:R=>d(N,"value",R.target.value)}):null,rr=i.map((h,N)=>w.jsxs("div",{children:[w.jsx("input",{id:`variant${N}Name`,placeholder:"Name",value:h.name,onChange:R=>d(N,"name",R.target.value)}),T(h,N),me(h,N),wn(h,N),Sn(h,N),w.jsx("button",{id:"removeVariant",onClick:()=>x(N),children:"Remove"})]},`variant${N}`)),lr=i.filter(h=>h.name).map((h,N)=>w.jsx("option",{value:h.name,children:h.name},`variant-${N}`)),dt=m&&v.map((h,N)=>w.jsx(Rd,{index:N,variants:i,rule:h,handleRuleChange:P,removeRule:()=>j(N)},N)),pt=m&&k&&w.jsxs(w.Fragment,{children:[w.jsxs("label",{children:["Else",w.jsx("select",{id:"defaultRule",value:D,onChange:h=>f(h.target.value),children:lr})]}),w.jsx("br",{})]}),C=m&&w.jsx("button",{id:"addRule",onClick:()=>z(),children:"Add Rule"}),L=m&&w.jsxs(w.Fragment,{children:[w.jsx("input",{id:"defaultRule",type:"checkbox",checked:k,onClick:h=>E(h.target.checked)}),w.jsx("label",{htmlFor:"defaultRule",children:"Default Rule"})]});return w.jsxs(w.Fragment,{children:[w.jsx("h1",{children:"flagd ui"}),w.jsxs("div",{className:"container",children:[w.jsxs("div",{className:"left",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"flagKey",children:"Flag Key"}),w.jsx("input",{id:"flagKey",value:e,onChange:h=>n(h.target.value)})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"state",children:"State"}),w.jsx("input",{id:"state",type:"checkbox",checked:t,onChange:h=>r(h.target.checked)})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"type",children:"Type"}),w.jsxs("select",{id:"type",value:l,onChange:h=>a(h.target.value),children:[w.jsx("option",{value:"boolean",children:"boolean"}),w.jsx("option",{value:"string",children:"string"}),w.jsx("option",{value:"number",children:"number"}),w.jsx("option",{value:"object",children:"object"})]})]}),w.jsx("div",{children:w.jsxs("label",{children:["Variants",w.jsxs("div",{children:[rr,w.jsx("button",{id:"addVariant",onClick:y,children:"Add Variant"})]})]})}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"defaultVariant",children:"Default Variant"}),w.jsx("select",{id:"defaultVariant",value:s,onChange:h=>c(h.target.value),children:lr})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"hasTargeting",children:"Targeting"}),w.jsx("input",{id:"hasTargeting",type:"checkbox",checked:m,onChange:h=>p(h.target.checked)}),w.jsx("br",{}),dt,pt,C,L]})]}),w.jsx("div",{children:w.jsx("textarea",{id:"json",readOnly:!0,value:A(),rows:30,cols:50})})]})]})}Yl.createRoot(document.getElementById("root")).render(w.jsx(wc.StrictMode,{children:w.jsx(Od,{})})); +`+o.stack}return{value:e,source:n,stack:l,digest:null}}function Hl(e,n,t){return{value:e,source:null,stack:t??null,digest:n??null}}function Po(e,n){try{console.error(n.value)}catch(t){setTimeout(function(){throw t})}}var od=typeof WeakMap=="function"?WeakMap:Map;function ja(e,n,t){t=Ke(-1,t),t.tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){nl||(nl=!0,Io=r),Po(e,n)},t}function La(e,n,t){t=Ke(-1,t),t.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){Po(e,n)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){Po(e,n),typeof r!="function"&&(fn===null?fn=new Set([this]):fn.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})}),t}function Cu(e,n,t){var r=e.pingCache;if(r===null){r=e.pingCache=new od;var l=new Set;r.set(n,l)}else l=r.get(n),l===void 0&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=wd.bind(null,e,n,t),n.then(e,e))}function Nu(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function Pu(e,n,t,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(n=Ke(-1,1),n.tag=2,cn(t,n,1))),t.lanes|=1),e)}var id=Je.ReactCurrentOwner,fe=!1;function ie(e,n,t,r){n.child=e===null?sa(n,null,t,r):ot(n,e.child,t,r)}function zu(e,n,t,r,l){t=t.render;var o=n.ref;return et(n,l),r=wi(e,n,t,r,o,l),t=Si(),e!==null&&!fe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ze(e,n,l)):($&&t&&ui(n),n.flags|=1,ie(e,n,r,l),n.child)}function ju(e,n,t,r,l){if(e===null){var o=t.type;return typeof o=="function"&&!Li(o)&&o.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(n.tag=15,n.type=o,Ta(e,n,o,r,l)):(e=Mr(t.type,null,r,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(t=t.compare,t=t!==null?t:At,t(i,r)&&e.ref===n.ref)return Ze(e,n,l)}return n.flags|=1,e=pn(o,r),e.ref=n.ref,e.return=n,n.child=e}function Ta(e,n,t,r,l){if(e!==null){var o=e.memoizedProps;if(At(o,r)&&e.ref===n.ref)if(fe=!1,n.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(fe=!0);else return n.lanes=e.lanes,Ze(e,n,l)}return zo(e,n,t,r,l)}function Ra(e,n,t){var r=n.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},I(Gn,ye),ye|=t;else{if(!(t&1073741824))return e=o!==null?o.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,I(Gn,ye),ye|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:t,I(Gn,ye),ye|=r}else o!==null?(r=o.baseLanes|t,n.memoizedState=null):r=t,I(Gn,ye),ye|=r;return ie(e,n,l,t),n.child}function Oa(e,n){var t=n.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function zo(e,n,t,r,l){var o=pe(t)?Ln:oe.current;return o=rt(n,o),et(n,l),t=wi(e,n,t,r,o,l),r=Si(),e!==null&&!fe?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ze(e,n,l)):($&&r&&ui(n),n.flags|=1,ie(e,n,t,l),n.child)}function Lu(e,n,t,r,l){if(pe(t)){var o=!0;Qr(n)}else o=!1;if(et(n,l),n.stateNode===null)Tr(e,n),ia(n,t,r),No(n,t,r,l),r=!0;else if(e===null){var i=n.stateNode,u=n.memoizedProps;i.props=u;var s=i.context,c=t.contextType;typeof c=="object"&&c!==null?c=ze(c):(c=pe(t)?Ln:oe.current,c=rt(n,c));var m=t.getDerivedStateFromProps,p=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";p||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||s!==c)&&ku(n,i,r,c),en=!1;var v=n.memoizedState;i.state=v,Zr(n,r,i,l),s=n.memoizedState,u!==r||v!==s||de.current||en?(typeof m=="function"&&(Co(n,t,m,r),s=n.memoizedState),(u=en||Su(n,t,u,r,v,s,c))?(p||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(n.flags|=4194308)):(typeof i.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=s),i.props=r,i.state=s,i.context=c,r=u):(typeof i.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{i=n.stateNode,la(e,n),u=n.memoizedProps,c=n.type===n.elementType?u:Te(n.type,u),i.props=c,p=n.pendingProps,v=i.context,s=t.contextType,typeof s=="object"&&s!==null?s=ze(s):(s=pe(t)?Ln:oe.current,s=rt(n,s));var S=t.getDerivedStateFromProps;(m=typeof S=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==p||v!==s)&&ku(n,i,r,s),en=!1,v=n.memoizedState,i.state=v,Zr(n,r,i,l);var k=n.memoizedState;u!==p||v!==k||de.current||en?(typeof S=="function"&&(Co(n,t,S,r),k=n.memoizedState),(c=en||Su(n,t,c,r,v,k,s)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,k,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,k,s)),typeof i.componentDidUpdate=="function"&&(n.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(n.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=k),i.props=r,i.state=k,i.context=s,r=c):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(n.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&v===e.memoizedState||(n.flags|=1024),r=!1)}return jo(e,n,t,r,o,l)}function jo(e,n,t,r,l,o){Oa(e,n);var i=(n.flags&128)!==0;if(!r&&!i)return l&&mu(n,t,!1),Ze(e,n,o);r=n.stateNode,id.current=n;var u=i&&typeof t.getDerivedStateFromError!="function"?null:r.render();return n.flags|=1,e!==null&&i?(n.child=ot(n,e.child,null,o),n.child=ot(n,null,u,o)):ie(e,n,u,o),n.memoizedState=r.state,l&&mu(n,t,!0),n.child}function Ma(e){var n=e.stateNode;n.pendingContext?vu(e,n.pendingContext,n.pendingContext!==n.context):n.context&&vu(e,n.context,!1),mi(e,n.containerInfo)}function Tu(e,n,t,r,l){return lt(),ai(l),n.flags|=256,ie(e,n,t,r),n.child}var Lo={dehydrated:null,treeContext:null,retryLane:0};function To(e){return{baseLanes:e,cachePool:null,transitions:null}}function Fa(e,n,t){var r=n.pendingProps,l=A.current,o=!1,i=(n.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(o=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),I(A,l&1),e===null)return xo(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(i=r.children,e=r.fallback,o?(r=n.mode,o=n.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=hl(i,r,0,null),e=jn(e,r,t,null),o.return=n,e.return=n,o.sibling=e,n.child=o,n.child.memoizedState=To(t),n.memoizedState=Lo,e):xi(n,i));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return ud(e,n,i,r,u,l,t);if(o){o=r.fallback,i=n.mode,l=e.child,u=l.sibling;var s={mode:"hidden",children:r.children};return!(i&1)&&n.child!==l?(r=n.child,r.childLanes=0,r.pendingProps=s,n.deletions=null):(r=pn(l,s),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?o=pn(u,o):(o=jn(o,i,t,null),o.flags|=2),o.return=n,r.return=n,r.sibling=o,n.child=r,r=o,o=n.child,i=e.child.memoizedState,i=i===null?To(t):{baseLanes:i.baseLanes|t,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~t,n.memoizedState=Lo,r}return o=e.child,e=o.sibling,r=pn(o,{mode:"visible",children:r.children}),!(n.mode&1)&&(r.lanes=t),r.return=n,r.sibling=null,e!==null&&(t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=r,n.memoizedState=null,r}function xi(e,n){return n=hl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function wr(e,n,t,r){return r!==null&&ai(r),ot(n,e.child,null,t),e=xi(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ud(e,n,t,r,l,o,i){if(t)return n.flags&256?(n.flags&=-257,r=Hl(Error(g(422))),wr(e,n,i,r)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(o=r.fallback,l=n.mode,r=hl({mode:"visible",children:r.children},l,0,null),o=jn(o,l,i,null),o.flags|=2,r.return=n,o.return=n,r.sibling=o,n.child=r,n.mode&1&&ot(n,e.child,null,i),n.child.memoizedState=To(i),n.memoizedState=Lo,o);if(!(n.mode&1))return wr(e,n,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(g(419)),r=Hl(o,r,void 0),wr(e,n,i,r)}if(u=(i&e.childLanes)!==0,fe||u){if(r=J,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ge(e,l),Fe(r,e,l,-1))}return ji(),r=Hl(Error(g(421))),wr(e,n,i,r)}return l.data==="$?"?(n.flags|=128,n.child=e.child,n=Sd.bind(null,e),l._reactRetry=n,null):(e=o.treeContext,ge=an(l.nextSibling),we=n,$=!0,Oe=null,e!==null&&(_e[Ce++]=We,_e[Ce++]=Qe,_e[Ce++]=Tn,We=e.id,Qe=e.overflow,Tn=n),n=xi(n,r.children),n.flags|=4096,n)}function Ru(e,n,t){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),_o(e.return,n,t)}function Wl(e,n,t,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(o.isBackwards=n,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=t,o.tailMode=l)}function Da(e,n,t){var r=n.pendingProps,l=r.revealOrder,o=r.tail;if(ie(e,n,r.children,t),r=A.current,r&2)r=r&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ru(e,t,n);else if(e.tag===19)Ru(e,t,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(I(A,r),!(n.mode&1))n.memoizedState=null;else switch(l){case"forwards":for(t=n.child,l=null;t!==null;)e=t.alternate,e!==null&&Jr(e)===null&&(l=t),t=t.sibling;t=l,t===null?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),Wl(n,!1,l,t,o);break;case"backwards":for(t=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Jr(e)===null){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}Wl(n,!0,t,null,o);break;case"together":Wl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Tr(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Ze(e,n,t){if(e!==null&&(n.dependencies=e.dependencies),On|=n.lanes,!(t&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(g(153));if(n.child!==null){for(e=n.child,t=pn(e,e.pendingProps),n.child=t,t.return=n;e.sibling!==null;)e=e.sibling,t=t.sibling=pn(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}function sd(e,n,t){switch(n.tag){case 3:Ma(n),lt();break;case 5:aa(n);break;case 1:pe(n.type)&&Qr(n);break;case 4:mi(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;I(Xr,r._currentValue),r._currentValue=l;break;case 13:if(r=n.memoizedState,r!==null)return r.dehydrated!==null?(I(A,A.current&1),n.flags|=128,null):t&n.child.childLanes?Fa(e,n,t):(I(A,A.current&1),e=Ze(e,n,t),e!==null?e.sibling:null);I(A,A.current&1);break;case 19:if(r=(t&n.childLanes)!==0,e.flags&128){if(r)return Da(e,n,t);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),I(A,A.current),r)break;return null;case 22:case 23:return n.lanes=0,Ra(e,n,t)}return Ze(e,n,t)}var Ia,Ro,Va,Ua;Ia=function(e,n){for(var t=n.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};Ro=function(){};Va=function(e,n,t,r){var l=e.memoizedProps;if(l!==r){e=n.stateNode,Pn(Be.current);var o=null;switch(t){case"input":l=bl(e,l),r=bl(e,r),o=[];break;case"select":l=W({},l,{value:void 0}),r=W({},r,{value:void 0}),o=[];break;case"textarea":l=to(e,l),r=to(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Hr)}lo(t,r);var i;t=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var u=l[c];for(i in u)u.hasOwnProperty(i)&&(t||(t={}),t[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ft.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var s=r[c];if(u=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(i in u)!u.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(t||(t={}),t[i]="");for(i in s)s.hasOwnProperty(i)&&u[i]!==s[i]&&(t||(t={}),t[i]=s[i])}else t||(o||(o=[]),o.push(c,t)),t=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(o=o||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ft.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&V("scroll",e),o||u===s||(o=[])):(o=o||[]).push(c,s))}t&&(o=o||[]).push("style",t);var c=o;(n.updateQueue=c)&&(n.flags|=4)}};Ua=function(e,n,t,r){t!==r&&(n.flags|=4)};function St(e,n){if(!$)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;n!==null;)n.alternate!==null&&(t=n),n=n.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function re(e){var n=e.alternate!==null&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function ad(e,n,t){var r=n.pendingProps;switch(si(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return re(n),null;case 1:return pe(n.type)&&Wr(),re(n),null;case 3:return r=n.stateNode,it(),U(de),U(oe),yi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yr(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Oe!==null&&($o(Oe),Oe=null))),Ro(e,n),re(n),null;case 5:hi(n);var l=Pn(Yt.current);if(t=n.type,e!==null&&n.stateNode!=null)Va(e,n,t,r,l),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(n.stateNode===null)throw Error(g(166));return re(n),null}if(e=Pn(Be.current),yr(n)){r=n.stateNode,t=n.type;var o=n.memoizedProps;switch(r[Ue]=n,r[Qt]=o,e=(n.mode&1)!==0,t){case"dialog":V("cancel",r),V("close",r);break;case"iframe":case"object":case"embed":V("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Ue]=n,e[Qt]=r,Ia(e,n,!1,!1),n.stateNode=e;e:{switch(i=oo(t,r),t){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;lst&&(n.flags|=128,r=!0,St(o,!1),n.lanes=4194304)}else{if(!r)if(e=Jr(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),St(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!$)return re(n),null}else 2*K()-o.renderingStartTime>st&&t!==1073741824&&(n.flags|=128,r=!0,St(o,!1),n.lanes=4194304);o.isBackwards?(i.sibling=n.child,n.child=i):(t=o.last,t!==null?t.sibling=i:n.child=i,o.last=i)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=K(),n.sibling=null,t=A.current,I(A,r?t&1|2:t&1),n):(re(n),null);case 22:case 23:return zi(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?ye&1073741824&&(re(n),n.subtreeFlags&6&&(n.flags|=8192)):re(n),null;case 24:return null;case 25:return null}throw Error(g(156,n.tag))}function cd(e,n){switch(si(n),n.tag){case 1:return pe(n.type)&&Wr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return it(),U(de),U(oe),yi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return hi(n),null;case 13:if(U(A),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(g(340));lt()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(A),null;case 4:return it(),null;case 10:return di(n.type._context),null;case 22:case 23:return zi(),null;case 24:return null;default:return null}}var Sr=!1,le=!1,fd=typeof WeakSet=="function"?WeakSet:Set,C=null;function Xn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){Q(e,n,r)}else t.current=null}function Oo(e,n,t){try{t()}catch(r){Q(e,n,r)}}var Ou=!1;function dd(e,n){if(ho=$r,e=Hs(),ii(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var i=0,u=-1,s=-1,c=0,m=0,p=e,v=null;n:for(;;){for(var S;p!==t||l!==0&&p.nodeType!==3||(u=i+l),p!==o||r!==0&&p.nodeType!==3||(s=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(S=p.firstChild)!==null;)v=p,p=S;for(;;){if(p===e)break n;if(v===t&&++c===l&&(u=i),v===o&&++m===r&&(s=i),(S=p.nextSibling)!==null)break;p=v,v=p.parentNode}p=S}t=u===-1||s===-1?null:{start:u,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(yo={focusedElem:e,selectionRange:t},$r=!1,C=n;C!==null;)if(n=C,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,C=e;else for(;C!==null;){n=C;try{var k=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var E=k.memoizedProps,D=k.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?E:Te(n.type,E),D);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(y){Q(n,n.return,y)}if(e=n.sibling,e!==null){e.return=n.return,C=e;break}C=n.return}return k=Ou,Ou=!1,k}function Rt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Oo(n,t,o)}l=l.next}while(l!==r)}}function vl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Mo(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function $a(e){var n=e.alternate;n!==null&&(e.alternate=null,$a(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ue],delete n[Qt],delete n[So],delete n[Xf],delete n[Gf])),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 Ba(e){return e.tag===5||e.tag===3||e.tag===4}function Mu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ba(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 Fo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Hr));else if(r!==4&&(e=e.child,e!==null))for(Fo(e,n,t),e=e.sibling;e!==null;)Fo(e,n,t),e=e.sibling}function Do(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Do(e,n,t),e=e.sibling;e!==null;)Do(e,n,t),e=e.sibling}var b=null,Re=!1;function qe(e,n,t){for(t=t.child;t!==null;)Aa(e,n,t),t=t.sibling}function Aa(e,n,t){if($e&&typeof $e.onCommitFiberUnmount=="function")try{$e.onCommitFiberUnmount(il,t)}catch{}switch(t.tag){case 5:le||Xn(t,n);case 6:var r=b,l=Re;b=null,qe(e,n,t),b=r,Re=l,b!==null&&(Re?(e=b,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):b.removeChild(t.stateNode));break;case 18:b!==null&&(Re?(e=b,t=t.stateNode,e.nodeType===8?Il(e.parentNode,t):e.nodeType===1&&Il(e,t),$t(e)):Il(b,t.stateNode));break;case 4:r=b,l=Re,b=t.stateNode.containerInfo,Re=!0,qe(e,n,t),b=r,Re=l;break;case 0:case 11:case 14:case 15:if(!le&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Oo(t,n,i),l=l.next}while(l!==r)}qe(e,n,t);break;case 1:if(!le&&(Xn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(u){Q(t,n,u)}qe(e,n,t);break;case 21:qe(e,n,t);break;case 22:t.mode&1?(le=(r=le)||t.memoizedState!==null,qe(e,n,t),le=r):qe(e,n,t);break;default:qe(e,n,t)}}function Fu(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new fd),n.forEach(function(r){var l=kd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Le(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,ln===null)var r=!1;else{if(e=ln,ln=null,tl=0,M&6)throw Error(g(331));var l=M;for(M|=4,C=e.current;C!==null;){var o=C,i=o.child;if(C.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sK()-Ni?zn(e,0):Ci|=t),ve(e,n)}function Za(e,n){n===0&&(e.mode&1?(n=fr,fr<<=1,!(fr&130023424)&&(fr=4194304)):n=1);var t=ue();e=Ge(e,n),e!==null&&(bt(e,n,t),ve(e,t))}function Sd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Za(e,t)}function kd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(n),Za(e,t)}var Ja;Ja=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||de.current)fe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return fe=!1,sd(e,n,t);fe=!!(e.flags&131072)}else fe=!1,$&&n.flags&1048576&&ea(n,Yr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;Tr(e,n),e=n.pendingProps;var l=rt(n,oe.current);et(n,t),l=wi(null,n,r,e,l,t);var o=Si();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,pe(r)?(o=!0,Qr(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vi(n),l.updater=dl,n.stateNode=l,l._reactInternals=n,No(n,r,e,t),n=jo(null,n,r,!0,o,t)):(n.tag=0,$&&o&&ui(n),ie(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(Tr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=xd(r),e=Te(r,e),l){case 0:n=zo(null,n,r,e,t);break e;case 1:n=Lu(null,n,r,e,t);break e;case 11:n=zu(null,n,r,e,t);break e;case 14:n=ju(null,n,r,Te(r.type,e),t);break e}throw Error(g(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),zo(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),Lu(e,n,r,l,t);case 3:e:{if(Ma(n),e===null)throw Error(g(387));r=n.pendingProps,o=n.memoizedState,l=o.element,la(e,n),Zr(n,r,null,t);var i=n.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=ut(Error(g(423)),n),n=Tu(e,n,r,t,l);break e}else if(r!==l){l=ut(Error(g(424)),n),n=Tu(e,n,r,t,l);break e}else for(ge=an(n.stateNode.containerInfo.firstChild),we=n,$=!0,Oe=null,t=sa(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(lt(),r===l){n=Ze(e,n,t);break e}ie(e,n,r,t)}n=n.child}return n;case 5:return aa(n),e===null&&xo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,go(r,l)?i=null:o!==null&&go(r,o)&&(n.flags|=32),Oa(e,n),ie(e,n,i,t),n.child;case 6:return e===null&&xo(n),null;case 13:return Fa(e,n,t);case 4:return mi(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=ot(n,null,r,t):ie(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),zu(e,n,r,l,t);case 7:return ie(e,n,n.pendingProps,t),n.child;case 8:return ie(e,n,n.pendingProps.children,t),n.child;case 12:return ie(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,i=l.value,I(Xr,r._currentValue),r._currentValue=i,o!==null)if(De(o.value,i)){if(o.children===l.children&&!de.current){n=Ze(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Ke(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?s.next=s:(s.next=m.next,m.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),_o(o.return,t,n),u.lanes|=t;break}s=s.next}}else if(o.tag===10)i=o.type===n.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(g(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),_o(i,t,n),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===n){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ie(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,et(n,t),l=ze(l),r=r(l),n.flags|=1,ie(e,n,r,t),n.child;case 14:return r=n.type,l=Te(r,n.pendingProps),l=Te(r.type,l),ju(e,n,r,l,t);case 15:return Ta(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Te(r,l),Tr(e,n),n.tag=1,pe(r)?(e=!0,Qr(n)):e=!1,et(n,t),ia(n,r,l),No(n,r,l,t),jo(null,n,r,!0,e,t);case 19:return Da(e,n,t);case 22:return Ra(e,n,t)}throw Error(g(156,n.tag))};function qa(e,n){return _s(e,n)}function Ed(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 Ne(e,n,t,r){return new Ed(e,n,t,r)}function Li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xd(e){if(typeof e=="function")return Li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Go)return 11;if(e===Zo)return 14}return 2}function pn(e,n){var t=e.alternate;return t===null?(t=Ne(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Mr(e,n,t,r,l,o){var i=2;if(r=e,typeof e=="function")Li(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Un:return jn(t.children,l,o,n);case Xo:i=8,l|=8;break;case Gl:return e=Ne(12,t,n,l|2),e.elementType=Gl,e.lanes=o,e;case Zl:return e=Ne(13,t,n,l),e.elementType=Zl,e.lanes=o,e;case Jl:return e=Ne(19,t,n,l),e.elementType=Jl,e.lanes=o,e;case us:return hl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case os:i=10;break e;case is:i=9;break e;case Go:i=11;break e;case Zo:i=14;break e;case be:i=16,r=null;break e}throw Error(g(130,e==null?e:typeof e,""))}return n=Ne(i,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function jn(e,n,t,r){return e=Ne(7,e,r,n),e.lanes=t,e}function hl(e,n,t,r){return e=Ne(22,e,r,n),e.elementType=us,e.lanes=t,e.stateNode={isHidden:!1},e}function Ql(e,n,t){return e=Ne(6,e,null,n),e.lanes=t,e}function Kl(e,n,t){return n=Ne(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function _d(e,n,t,r,l){this.tag=n,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=Nl(0),this.expirationTimes=Nl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ti(e,n,t,r,l,o,i,u,s){return e=new _d(e,n,t,u,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=Ne(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},vi(o),e}function Cd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tc)}catch(e){console.error(e)}}tc(),es.exports=ke;var Ld=es.exports,Hu=Ld;Yl.createRoot=Hu.createRoot,Yl.hydrateRoot=Hu.hydrateRoot;function Td(e){var c,m;if(!e.flagKey)return{};const n=e.state?"ENABLED":"DISABLED",t=(c=e.variants)==null?void 0:c.reduce((p,v)=>{if(e.type==="object")try{p[v.name]=JSON.parse(v.value)}catch{p[v.name]=""}else p[v.name]=v.value;return p},{}),r=e.defaultVariant,l=p=>({[p.operator]:[{var:p.name},p.subOperator,p.value]}),o=p=>{const S={[p.operator==="in_list"||p.operator==="not_in_list"||p.operator==="in_string"||p.operator==="not_in_string"?"in":p.operator]:[{var:p.name},p.operator==="in_list"||p.operator==="not_in_list"?i(p.value):p.value]};return p.operator==="not_in_list"||p.operator==="not_in_string"?{"!":S}:S},i=p=>p==null?void 0:p.split(",").map(v=>v.trim()),u=(m=e.rules)==null?void 0:m.flatMap(p=>[p.condition.operator==="sem_ver"?l(p.condition):o(p.condition),p.targetVariant]);e.hasDefaultRule&&u.push(e.defaultRule);const s=e.hasTargeting?{if:u}:{};return{[e.flagKey]:{state:n,variants:t,defaultVariant:r,targeting:s}}}const Rd=({index:e,variants:n,rule:t,handleRuleChange:r,removeRule:l})=>{const o=e===0?"If":"Else If",i=t.condition.operator==="sem_ver"&&w.jsxs("select",{id:`subOperator${e}`,value:t.condition.subOperator,onChange:s=>r(e,"subOperator",s.target.value),children:[w.jsx("option",{value:">=",children:">="}),w.jsx("option",{value:"<=",children:"<="}),w.jsx("option",{value:"~",children:"~(minor)"}),w.jsx("option",{value:"^",children:"^(major)"}),w.jsx("option",{value:"=",children:"="}),w.jsx("option",{value:"!=",children:"!="}),w.jsx("option",{value:">",children:">"}),w.jsx("option",{value:"<",children:"<"})]}),u=n.filter(s=>s.name).map((s,c)=>w.jsx("option",{value:s.name,children:s.name},`targetVariant-${c}`));return w.jsxs("div",{children:[w.jsxs("label",{children:[o,w.jsx("input",{id:`condition${e}Name`,placeholder:"Name",value:t.condition.name,onChange:s=>r(e,"name",s.target.value)}),w.jsxs("select",{id:`operator${e}`,value:t.condition.operator,onChange:s=>r(e,"operator",s.target.value),children:[w.jsx("option",{value:"ends_with",children:"Ends with"}),w.jsx("option",{value:"in_list",children:"In a list"}),w.jsx("option",{value:"not_in_list",children:"Not in a list"}),w.jsx("option",{value:"sem_ver",children:"Semantic version"}),w.jsx("option",{value:"==",children:"Equals"}),w.jsx("option",{value:"===",children:"Strict equals"}),w.jsx("option",{value:"!=",children:"Not equals"}),w.jsx("option",{value:"!==",children:"Not strict equals"}),w.jsx("option",{value:"!!",children:"Exists"}),w.jsx("option",{value:"!",children:"Not exists"}),w.jsx("option",{value:">",children:"Greater than"}),w.jsx("option",{value:">=",children:"Greater than or equals"}),w.jsx("option",{value:"<",children:"Less than"}),w.jsx("option",{value:"<=",children:"Less than or equals"}),w.jsx("option",{value:"in_string",children:"Contains in string"}),w.jsx("option",{value:"not_in_string",children:"Not contains in string"})]}),i,w.jsx("input",{id:`condition${e}Value`,placeholder:"Value",value:t.condition.value,onChange:s=>r(e,"value",s.target.value)})]}),w.jsx("br",{}),w.jsxs("label",{children:["Then",w.jsx("select",{id:`targetVariant${e}`,value:t.targetVariant,onChange:s=>r(e,"",s.target.value),children:u})]}),w.jsx("button",{id:`removeRule${e}`,onClick:()=>l(e),children:"Remove"})]})};function Od(){const[e,n]=xe.useState("test-feature"),[t,r]=xe.useState(!0),[l,o]=xe.useState("boolean"),[i,u]=xe.useState([{name:"true",value:!0},{name:"false",value:!1}]),[s,c]=xe.useState("false"),[m,p]=xe.useState(!1),[v,S]=xe.useState([{condition:{name:"",operator:"ends_with",subOperator:">=",value:""},targetVariant:"true"}]),[k,E]=xe.useState(!1),[D,f]=xe.useState("false"),a=h=>{o(h),h==="boolean"?(u([{name:"true",value:!0},{name:"false",value:!1}]),c("false")):h==="string"?(u([{name:"foo",value:"foo"},{name:"bar",value:"bar"}]),c("foo")):h==="number"?(u([{name:"1",value:1},{name:"2",value:2}]),c("1")):h==="object"&&(u([{name:"foo",value:JSON.stringify({foo:"foo"})},{name:"bar",value:JSON.stringify({bar:"bar"})}]),c("foo"))},d=(h,N,R)=>{const he=i.map((q,kn)=>kn===h?{...q,[N]:R}:q);u(he),he.length===1&&c(he[0].name)},y=()=>{const h={name:""};l==="boolean"?h.value=!1:l==="string"?h.value="":l==="number"?h.value=0:l==="object"&&(h.value=JSON.stringify({})),u([...i,h])},x=h=>{var R;const N=i.filter((he,q)=>q!==h);u(N),s===i[h].name&&c(((R=N[0])==null?void 0:R.name)||"")},P=(h,N,R)=>{const he=v.map((q,kn)=>kn===h?N!==""?{condition:{...q.condition,[N]:R},targetVariant:q.targetVariant}:{condition:q.condition,targetVariant:R}:q);S(he)},z=()=>{const h={condition:{name:"",operator:"ends_with",subOperator:">=",value:""},targetVariant:"true"};S([...v,h])},j=h=>{const N=v.filter((R,he)=>he!==h);S(N)},B=()=>{const N=Td({flagKey:e,state:t,type:l,variants:i,defaultVariant:s,hasTargeting:m,rules:v,hasDefaultRule:k,defaultRule:D});return JSON.stringify(N,null,2)},T=(h,N)=>l==="boolean"?w.jsxs("select",{id:`variant${N}Value`,value:h.value.toString(),onChange:R=>d(N,"value",R.target.value==="true"),children:[w.jsx("option",{value:"true",children:"true"}),w.jsx("option",{value:"false",children:"false"})]}):null,me=(h,N)=>l==="string"?w.jsx("input",{id:`variant${N}Value`,placeholder:"Value",value:h.value,onChange:R=>d(N,"value",R.target.value)}):null,wn=(h,N)=>l==="number"?w.jsx("input",{id:`variant${N}Value`,type:"number",value:h.value,onChange:R=>d(N,"value",Number(R.target.value))}):null,Sn=(h,N)=>l==="object"?w.jsx("input",{id:`variant${N}Value`,value:h.value,onChange:R=>d(N,"value",R.target.value)}):null,rr=i.map((h,N)=>w.jsxs("div",{children:[w.jsx("input",{id:`variant${N}Name`,placeholder:"Name",value:h.name,onChange:R=>d(N,"name",R.target.value)}),T(h,N),me(h,N),wn(h,N),Sn(h,N),w.jsx("button",{id:"removeVariant",onClick:()=>x(N),children:"Remove"})]},`variant${N}`)),lr=i.filter(h=>h.name).map((h,N)=>w.jsx("option",{value:h.name,children:h.name},`variant-${N}`)),dt=m&&v.map((h,N)=>w.jsx(Rd,{index:N,variants:i,rule:h,handleRuleChange:P,removeRule:()=>j(N)},N)),pt=m&&k&&w.jsxs(w.Fragment,{children:[w.jsxs("label",{children:["Else",w.jsx("select",{id:"defaultRule",value:D,onChange:h=>f(h.target.value),children:lr})]}),w.jsx("br",{})]}),_=m&&w.jsx("button",{id:"addRule",onClick:()=>z(),children:"Add Rule"}),L=m&&w.jsxs(w.Fragment,{children:[w.jsx("input",{id:"defaultRule",type:"checkbox",checked:k,onClick:h=>E(h.target.checked)}),w.jsx("label",{htmlFor:"defaultRule",children:"Default Rule"})]});return w.jsxs(w.Fragment,{children:[w.jsx("h1",{children:"flagd ui"}),w.jsxs("div",{className:"container",children:[w.jsxs("div",{className:"left",children:[w.jsxs("div",{children:[w.jsx("label",{htmlFor:"flagKey",children:"Flag Key"}),w.jsx("input",{id:"flagKey",value:e,onChange:h=>n(h.target.value)})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"state",children:"State"}),w.jsx("input",{id:"state",type:"checkbox",checked:t,onChange:h=>r(h.target.checked)})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"type",children:"Type"}),w.jsxs("select",{id:"type",value:l,onChange:h=>a(h.target.value),children:[w.jsx("option",{value:"boolean",children:"boolean"}),w.jsx("option",{value:"string",children:"string"}),w.jsx("option",{value:"number",children:"number"}),w.jsx("option",{value:"object",children:"object"})]})]}),w.jsx("div",{children:w.jsxs("label",{children:["Variants",w.jsxs("div",{children:[rr,w.jsx("button",{id:"addVariant",onClick:y,children:"Add Variant"})]})]})}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"defaultVariant",children:"Default Variant"}),w.jsx("select",{id:"defaultVariant",value:s,onChange:h=>c(h.target.value),children:lr})]}),w.jsxs("div",{children:[w.jsx("label",{htmlFor:"hasTargeting",children:"Targeting"}),w.jsx("input",{id:"hasTargeting",type:"checkbox",checked:m,onChange:h=>p(h.target.checked)}),w.jsx("br",{}),dt,pt,_,L]})]}),w.jsx("div",{children:w.jsx("textarea",{id:"json",readOnly:!0,value:B(),rows:30,cols:50})})]})]})}Yl.createRoot(document.getElementById("root")).render(w.jsx(wc.StrictMode,{children:w.jsx(Od,{})})); diff --git a/index.html b/index.html index 8754568..01c9586 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ flagd ui - +