@valbuild/ui 0.40.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,201 @@
1
+ var qC=Object.defineProperty;var e$=(e,t,n)=>t in e?qC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ue=(e,t,n)=>(e$(e,typeof t!="symbol"?t+"":t,n),n),t$=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Jd=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var eu=(e,t,n)=>(t$(e,t,"access private method"),n);function g1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function La(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m1={exports:{}},Ce={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Da=Symbol.for("react.element"),n$=Symbol.for("react.portal"),r$=Symbol.for("react.fragment"),o$=Symbol.for("react.strict_mode"),i$=Symbol.for("react.profiler"),l$=Symbol.for("react.provider"),s$=Symbol.for("react.context"),a$=Symbol.for("react.forward_ref"),u$=Symbol.for("react.suspense"),c$=Symbol.for("react.memo"),d$=Symbol.for("react.lazy"),nv=Symbol.iterator;function f$(e){return e===null||typeof e!="object"?null:(e=nv&&e[nv]||e["@@iterator"],typeof e=="function"?e:null)}var v1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y1=Object.assign,x1={};function jl(e,t,n){this.props=e,this.context=t,this.refs=x1,this.updater=n||v1}jl.prototype.isReactComponent={};jl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};jl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function w1(){}w1.prototype=jl.prototype;function Hp(e,t,n){this.props=e,this.context=t,this.refs=x1,this.updater=n||v1}var Vp=Hp.prototype=new w1;Vp.constructor=Hp;y1(Vp,jl.prototype);Vp.isPureReactComponent=!0;var rv=Array.isArray,_1=Object.prototype.hasOwnProperty,Kp={current:null},S1={key:!0,ref:!0,__self:!0,__source:!0};function E1(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)_1.call(t,r)&&!S1.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:Da,type:e,key:i,ref:l,props:o,_owner:Kp.current}}function h$(e,t){return{$$typeof:Da,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Da}function p$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ov=/\/+/g;function Zd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p$(""+e.key):t.toString(36)}function Du(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Da:case n$:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+Zd(l,0):r,rv(o)?(n="",e!=null&&(n=e.replace(ov,"$&/")+"/"),Du(o,t,n,"",function(u){return u})):o!=null&&(Gp(o)&&(o=h$(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(ov,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",rv(e))for(var s=0;s<e.length;s++){i=e[s];var a=r+Zd(i,s);l+=Du(i,t,n,a,o)}else if(a=f$(e),typeof a=="function")for(e=a.call(e),s=0;!(i=e.next()).done;)i=i.value,a=r+Zd(i,s++),l+=Du(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function tu(e,t,n){if(e==null)return e;var r=[],o=0;return Du(e,r,"","",function(i){return t.call(n,i,o++)}),r}function g$(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var sn={current:null},Iu={transition:null},m$={ReactCurrentDispatcher:sn,ReactCurrentBatchConfig:Iu,ReactCurrentOwner:Kp};Ce.Children={map:tu,forEach:function(e,t,n){tu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return tu(e,function(){t++}),t},toArray:function(e){return tu(e,function(t){return t})||[]},only:function(e){if(!Gp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ce.Component=jl;Ce.Fragment=r$;Ce.Profiler=i$;Ce.PureComponent=Hp;Ce.StrictMode=o$;Ce.Suspense=u$;Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=m$;Ce.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=y1({},e.props),o=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=Kp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)_1.call(t,a)&&!S1.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Da,type:e.type,key:o,ref:i,props:r,_owner:l}};Ce.createContext=function(e){return e={$$typeof:s$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:l$,_context:e},e.Consumer=e};Ce.createElement=E1;Ce.createFactory=function(e){var t=E1.bind(null,e);return t.type=e,t};Ce.createRef=function(){return{current:null}};Ce.forwardRef=function(e){return{$$typeof:a$,render:e}};Ce.isValidElement=Gp;Ce.lazy=function(e){return{$$typeof:d$,_payload:{_status:-1,_result:e},_init:g$}};Ce.memo=function(e,t){return{$$typeof:c$,type:e,compare:t===void 0?null:t}};Ce.startTransition=function(e){var t=Iu.transition;Iu.transition={};try{e()}finally{Iu.transition=t}};Ce.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ce.useCallback=function(e,t){return sn.current.useCallback(e,t)};Ce.useContext=function(e){return sn.current.useContext(e)};Ce.useDebugValue=function(){};Ce.useDeferredValue=function(e){return sn.current.useDeferredValue(e)};Ce.useEffect=function(e,t){return sn.current.useEffect(e,t)};Ce.useId=function(){return sn.current.useId()};Ce.useImperativeHandle=function(e,t,n){return sn.current.useImperativeHandle(e,t,n)};Ce.useInsertionEffect=function(e,t){return sn.current.useInsertionEffect(e,t)};Ce.useLayoutEffect=function(e,t){return sn.current.useLayoutEffect(e,t)};Ce.useMemo=function(e,t){return sn.current.useMemo(e,t)};Ce.useReducer=function(e,t,n){return sn.current.useReducer(e,t,n)};Ce.useRef=function(e){return sn.current.useRef(e)};Ce.useState=function(e){return sn.current.useState(e)};Ce.useSyncExternalStore=function(e,t,n){return sn.current.useSyncExternalStore(e,t,n)};Ce.useTransition=function(){return sn.current.useTransition()};Ce.version="18.2.0";m1.exports=Ce;var p=m1.exports;const ee=La(p),C1=g1({__proto__:null,default:ee},[p]);var Kf={},$1={exports:{}},Pn={},k1={exports:{}},b1={};/**
10
+ * @license React
11
+ * scheduler.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */(function(e){function t(E,O){var R=E.length;E.push(O);e:for(;0<R;){var F=R-1>>>1,H=E[F];if(0<o(H,O))E[F]=O,E[R]=H,R=F;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var O=E[0],R=E.pop();if(R!==O){E[0]=R;e:for(var F=0,H=E.length,ae=H>>>1;F<ae;){var oe=2*(F+1)-1,$e=E[oe],_e=oe+1,Q=E[_e];if(0>o($e,R))_e<H&&0>o(Q,$e)?(E[F]=Q,E[_e]=R,F=_e):(E[F]=$e,E[oe]=R,F=oe);else if(_e<H&&0>o(Q,R))E[F]=Q,E[_e]=R,F=_e;else break e}}return O}function o(E,O){var R=E.sortIndex-O.sortIndex;return R!==0?R:E.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,d=null,f=3,h=!1,m=!1,g=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(E){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=E)r(u),O.sortIndex=O.expirationTime,t(a,O);else break;O=n(u)}}function S(E){if(g=!1,x(E),!m)if(n(a)!==null)m=!0,C(k);else{var O=n(u);O!==null&&$(S,O.startTime-E)}}function k(E,O){m=!1,g&&(g=!1,v(N),N=-1),h=!0;var R=f;try{for(x(O),d=n(a);d!==null&&(!(d.expirationTime>O)||E&&!j());){var F=d.callback;if(typeof F=="function"){d.callback=null,f=d.priorityLevel;var H=F(d.expirationTime<=O);O=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(a)&&r(a),x(O)}else r(a);d=n(a)}if(d!==null)var ae=!0;else{var oe=n(u);oe!==null&&$(S,oe.startTime-O),ae=!1}return ae}finally{d=null,f=R,h=!1}}var T=!1,b=null,N=-1,D=5,M=-1;function j(){return!(e.unstable_now()-M<D)}function B(){if(b!==null){var E=e.unstable_now();M=E;var O=!0;try{O=b(!0,E)}finally{O?re():(T=!1,b=null)}}else T=!1}var re;if(typeof y=="function")re=function(){y(B)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,Y=V.port2;V.port1.onmessage=B,re=function(){Y.postMessage(null)}}else re=function(){_(B,0)};function C(E){b=E,T||(T=!0,re())}function $(E,O){N=_(function(){E(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,C(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(E){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var R=f;f=O;try{return E()}finally{f=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,O){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var R=f;f=E;try{return O()}finally{f=R}},e.unstable_scheduleCallback=function(E,O,R){var F=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?F+R:F):R=F,E){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=R+H,E={id:c++,callback:O,priorityLevel:E,startTime:R,expirationTime:H,sortIndex:-1},R>F?(E.sortIndex=R,t(u,E),n(a)===null&&E===n(u)&&(g?(v(N),N=-1):g=!0,$(S,R-F))):(E.sortIndex=H,t(a,E),m||h||(m=!0,C(k))),E},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(E){var O=f;return function(){var R=f;f=O;try{return E.apply(this,arguments)}finally{f=R}}}})(b1);k1.exports=b1;var v$=k1.exports;/**
18
+ * @license React
19
+ * react-dom.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var T1=p,Tn=v$;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var N1=new Set,ta={};function Ci(e,t){Sl(e,t),Sl(e+"Capture",t)}function Sl(e,t){for(ta[e]=t,e=0;e<t.length;e++)N1.add(t[e])}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gf=Object.prototype.hasOwnProperty,y$=/^[: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]*$/,iv={},lv={};function x$(e){return Gf.call(lv,e)?!0:Gf.call(iv,e)?!1:y$.test(e)?lv[e]=!0:(iv[e]=!0,!1)}function w$(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _$(e,t,n,r){if(t===null||typeof t>"u"||w$(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function an(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){jt[e]=new an(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];jt[t]=new an(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){jt[e]=new an(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){jt[e]=new an(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){jt[e]=new an(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){jt[e]=new an(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){jt[e]=new an(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){jt[e]=new an(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){jt[e]=new an(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yp=/[\-:]([a-z])/g;function Xp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Yp,Xp);jt[t]=new an(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Yp,Xp);jt[t]=new an(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Yp,Xp);jt[t]=new an(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){jt[e]=new an(e,1,!1,e.toLowerCase(),null,!1,!1)});jt.xlinkHref=new an("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){jt[e]=new an(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qp(e,t,n,r){var o=jt.hasOwnProperty(t)?jt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_$(t,n,o,r)&&(n=null),r||o===null?x$(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zr=T1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,nu=Symbol.for("react.element"),Xi=Symbol.for("react.portal"),Qi=Symbol.for("react.fragment"),Jp=Symbol.for("react.strict_mode"),Yf=Symbol.for("react.profiler"),R1=Symbol.for("react.provider"),P1=Symbol.for("react.context"),Zp=Symbol.for("react.forward_ref"),Xf=Symbol.for("react.suspense"),Qf=Symbol.for("react.suspense_list"),qp=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),O1=Symbol.for("react.offscreen"),sv=Symbol.iterator;function ls(e){return e===null||typeof e!="object"?null:(e=sv&&e[sv]||e["@@iterator"],typeof e=="function"?e:null)}var it=Object.assign,qd;function Es(e){if(qd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qd=t&&t[1]||""}return`
26
+ `+qd+e}var ef=!1;function tf(e,t){if(!e||ef)return"";ef=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
27
+ `),i=r.stack.split(`
28
+ `),l=o.length-1,s=i.length-1;1<=l&&0<=s&&o[l]!==i[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==i[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==i[s]){var a=`
29
+ `+o[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{ef=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Es(e):""}function S$(e){switch(e.tag){case 5:return Es(e.type);case 16:return Es("Lazy");case 13:return Es("Suspense");case 19:return Es("SuspenseList");case 0:case 2:case 15:return e=tf(e.type,!1),e;case 11:return e=tf(e.type.render,!1),e;case 1:return e=tf(e.type,!0),e;default:return""}}function Jf(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 Qi:return"Fragment";case Xi:return"Portal";case Yf:return"Profiler";case Jp:return"StrictMode";case Xf:return"Suspense";case Qf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case P1:return(e.displayName||"Context")+".Consumer";case R1:return(e._context.displayName||"Context")+".Provider";case Zp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qp:return t=e.displayName||null,t!==null?t:Jf(e.type)||"Memo";case ho:t=e._payload,e=e._init;try{return Jf(e(t))}catch{}}return null}function E$(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jf(t);case 8:return t===Jp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function A1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C$(e){var t=A1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ru(e){e._valueTracker||(e._valueTracker=C$(e))}function M1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=A1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nc(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 Zf(e,t){var n=t.checked;return it({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function av(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function L1(e,t){t=t.checked,t!=null&&Qp(e,"checked",t,!1)}function qf(e,t){L1(e,t);var n=Mo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?eh(e,t.type,n):t.hasOwnProperty("defaultValue")&&eh(e,t.type,Mo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uv(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function eh(e,t,n){(t!=="number"||nc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cs=Array.isArray;function dl(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Mo(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function th(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return it({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function cv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(Cs(n)){if(1<n.length)throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mo(n)}}function D1(e,t){var n=Mo(t.value),r=Mo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function dv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function I1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function nh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?I1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ou,j1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ou=ou||document.createElement("div"),ou.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ou.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function na(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ps={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},$$=["Webkit","ms","Moz","O"];Object.keys(Ps).forEach(function(e){$$.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ps[t]=Ps[e]})});function z1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ps.hasOwnProperty(e)&&Ps[e]?(""+t).trim():t+"px"}function F1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=z1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var k$=it({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 rh(e,t){if(t){if(k$[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function oh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ih=null;function eg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lh=null,fl=null,hl=null;function fv(e){if(e=za(e)){if(typeof lh!="function")throw Error(U(280));var t=e.stateNode;t&&(t=id(t),lh(e.stateNode,e.type,t))}}function B1(e){fl?hl?hl.push(e):hl=[e]:fl=e}function W1(){if(fl){var e=fl,t=hl;if(hl=fl=null,fv(e),t)for(e=0;e<t.length;e++)fv(t[e])}}function U1(e,t){return e(t)}function H1(){}var nf=!1;function V1(e,t,n){if(nf)return e(t,n);nf=!0;try{return U1(e,t,n)}finally{nf=!1,(fl!==null||hl!==null)&&(H1(),W1())}}function ra(e,t){var n=e.stateNode;if(n===null)return null;var r=id(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var sh=!1;if(Vr)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){sh=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{sh=!1}function b$(e,t,n,r,o,i,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Os=!1,rc=null,oc=!1,ah=null,T$={onError:function(e){Os=!0,rc=e}};function N$(e,t,n,r,o,i,l,s,a){Os=!1,rc=null,b$.apply(T$,arguments)}function R$(e,t,n,r,o,i,l,s,a){if(N$.apply(this,arguments),Os){if(Os){var u=rc;Os=!1,rc=null}else throw Error(U(198));oc||(oc=!0,ah=u)}}function $i(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function K1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function hv(e){if($i(e)!==e)throw Error(U(188))}function P$(e){var t=e.alternate;if(!t){if(t=$i(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return hv(o),e;if(i===r)return hv(o),t;i=i.sibling}throw Error(U(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function G1(e){return e=P$(e),e!==null?Y1(e):null}function Y1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Y1(e);if(t!==null)return t;e=e.sibling}return null}var X1=Tn.unstable_scheduleCallback,pv=Tn.unstable_cancelCallback,O$=Tn.unstable_shouldYield,A$=Tn.unstable_requestPaint,pt=Tn.unstable_now,M$=Tn.unstable_getCurrentPriorityLevel,tg=Tn.unstable_ImmediatePriority,Q1=Tn.unstable_UserBlockingPriority,ic=Tn.unstable_NormalPriority,L$=Tn.unstable_LowPriority,J1=Tn.unstable_IdlePriority,td=null,Sr=null;function D$(e){if(Sr&&typeof Sr.onCommitFiberRoot=="function")try{Sr.onCommitFiberRoot(td,e,void 0,(e.current.flags&128)===128)}catch{}}var ir=Math.clz32?Math.clz32:z$,I$=Math.log,j$=Math.LN2;function z$(e){return e>>>=0,e===0?32:31-(I$(e)/j$|0)|0}var iu=64,lu=4194304;function $s(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 lc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=$s(s):(i&=l,i!==0&&(r=$s(i)))}else l=n&~o,l!==0?r=$s(l):i!==0&&(r=$s(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ir(t),o=1<<n,r|=e[n],t&=~o;return r}function F$(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-ir(i),s=1<<l,a=o[l];a===-1?(!(s&n)||s&r)&&(o[l]=F$(s,t)):a<=t&&(e.expiredLanes|=s),i&=~s}}function uh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Z1(){var e=iu;return iu<<=1,!(iu&4194240)&&(iu=64),e}function rf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ia(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ir(t),e[t]=n}function W$(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-ir(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function ng(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ir(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Me=0;function q1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ex,rg,tx,nx,rx,ch=!1,su=[],Eo=null,Co=null,$o=null,oa=new Map,ia=new Map,mo=[],U$="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gv(e,t){switch(e){case"focusin":case"focusout":Eo=null;break;case"dragenter":case"dragleave":Co=null;break;case"mouseover":case"mouseout":$o=null;break;case"pointerover":case"pointerout":oa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ia.delete(t.pointerId)}}function as(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=za(t),t!==null&&rg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function H$(e,t,n,r,o){switch(t){case"focusin":return Eo=as(Eo,e,t,n,r,o),!0;case"dragenter":return Co=as(Co,e,t,n,r,o),!0;case"mouseover":return $o=as($o,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return oa.set(i,as(oa.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ia.set(i,as(ia.get(i)||null,e,t,n,r,o)),!0}return!1}function ox(e){var t=ri(e.target);if(t!==null){var n=$i(t);if(n!==null){if(t=n.tag,t===13){if(t=K1(n),t!==null){e.blockedOn=t,rx(e.priority,function(){tx(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ju(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ih=r,n.target.dispatchEvent(r),ih=null}else return t=za(n),t!==null&&rg(t),e.blockedOn=n,!1;t.shift()}return!0}function mv(e,t,n){ju(e)&&n.delete(t)}function V$(){ch=!1,Eo!==null&&ju(Eo)&&(Eo=null),Co!==null&&ju(Co)&&(Co=null),$o!==null&&ju($o)&&($o=null),oa.forEach(mv),ia.forEach(mv)}function us(e,t){e.blockedOn===t&&(e.blockedOn=null,ch||(ch=!0,Tn.unstable_scheduleCallback(Tn.unstable_NormalPriority,V$)))}function la(e){function t(o){return us(o,e)}if(0<su.length){us(su[0],e);for(var n=1;n<su.length;n++){var r=su[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Eo!==null&&us(Eo,e),Co!==null&&us(Co,e),$o!==null&&us($o,e),oa.forEach(t),ia.forEach(t),n=0;n<mo.length;n++)r=mo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mo.length&&(n=mo[0],n.blockedOn===null);)ox(n),n.blockedOn===null&&mo.shift()}var pl=Zr.ReactCurrentBatchConfig,sc=!0;function K$(e,t,n,r){var o=Me,i=pl.transition;pl.transition=null;try{Me=1,og(e,t,n,r)}finally{Me=o,pl.transition=i}}function G$(e,t,n,r){var o=Me,i=pl.transition;pl.transition=null;try{Me=4,og(e,t,n,r)}finally{Me=o,pl.transition=i}}function og(e,t,n,r){if(sc){var o=dh(e,t,n,r);if(o===null)pf(e,t,r,ac,n),gv(e,r);else if(H$(o,e,t,n,r))r.stopPropagation();else if(gv(e,r),t&4&&-1<U$.indexOf(e)){for(;o!==null;){var i=za(o);if(i!==null&&ex(i),i=dh(e,t,n,r),i===null&&pf(e,t,r,ac,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else pf(e,t,r,null,n)}}var ac=null;function dh(e,t,n,r){if(ac=null,e=eg(r),e=ri(e),e!==null)if(t=$i(e),t===null)e=null;else if(n=t.tag,n===13){if(e=K1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ac=e,null}function ix(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(M$()){case tg:return 1;case Q1:return 4;case ic:case L$:return 16;case J1:return 536870912;default:return 16}default:return 16}}var xo=null,ig=null,zu=null;function lx(){if(zu)return zu;var e,t=ig,n=t.length,r,o="value"in xo?xo.value:xo.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===o[i-r];r++);return zu=o.slice(e,1<r?1-r:void 0)}function Fu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function au(){return!0}function vv(){return!1}function On(e){function t(n,r,o,i,l){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?au:vv,this.isPropagationStopped=vv,this}return it(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=au)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=au)},persist:function(){},isPersistent:au}),t}var zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lg=On(zl),ja=it({},zl,{view:0,detail:0}),Y$=On(ja),of,lf,cs,nd=it({},ja,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cs&&(cs&&e.type==="mousemove"?(of=e.screenX-cs.screenX,lf=e.screenY-cs.screenY):lf=of=0,cs=e),of)},movementY:function(e){return"movementY"in e?e.movementY:lf}}),yv=On(nd),X$=it({},nd,{dataTransfer:0}),Q$=On(X$),J$=it({},ja,{relatedTarget:0}),sf=On(J$),Z$=it({},zl,{animationName:0,elapsedTime:0,pseudoElement:0}),q$=On(Z$),ek=it({},zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tk=On(ek),nk=it({},zl,{data:0}),xv=On(nk),rk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ok={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ik={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ik[e])?!!t[e]:!1}function sg(){return lk}var sk=it({},ja,{key:function(e){if(e.key){var t=rk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ok[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sg,charCode:function(e){return e.type==="keypress"?Fu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ak=On(sk),uk=it({},nd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wv=On(uk),ck=it({},ja,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sg}),dk=On(ck),fk=it({},zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),hk=On(fk),pk=it({},nd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gk=On(pk),mk=[9,13,27,32],ag=Vr&&"CompositionEvent"in window,As=null;Vr&&"documentMode"in document&&(As=document.documentMode);var vk=Vr&&"TextEvent"in window&&!As,sx=Vr&&(!ag||As&&8<As&&11>=As),_v=" ",Sv=!1;function ax(e,t){switch(e){case"keyup":return mk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ux(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ji=!1;function yk(e,t){switch(e){case"compositionend":return ux(t);case"keypress":return t.which!==32?null:(Sv=!0,_v);case"textInput":return e=t.data,e===_v&&Sv?null:e;default:return null}}function xk(e,t){if(Ji)return e==="compositionend"||!ag&&ax(e,t)?(e=lx(),zu=ig=xo=null,Ji=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sx&&t.locale!=="ko"?null:t.data;default:return null}}var wk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ev(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wk[e.type]:t==="textarea"}function cx(e,t,n,r){B1(r),t=uc(t,"onChange"),0<t.length&&(n=new lg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ms=null,sa=null;function _k(e){_x(e,0)}function rd(e){var t=el(e);if(M1(t))return e}function Sk(e,t){if(e==="change")return t}var dx=!1;if(Vr){var af;if(Vr){var uf="oninput"in document;if(!uf){var Cv=document.createElement("div");Cv.setAttribute("oninput","return;"),uf=typeof Cv.oninput=="function"}af=uf}else af=!1;dx=af&&(!document.documentMode||9<document.documentMode)}function $v(){Ms&&(Ms.detachEvent("onpropertychange",fx),sa=Ms=null)}function fx(e){if(e.propertyName==="value"&&rd(sa)){var t=[];cx(t,sa,e,eg(e)),V1(_k,t)}}function Ek(e,t,n){e==="focusin"?($v(),Ms=t,sa=n,Ms.attachEvent("onpropertychange",fx)):e==="focusout"&&$v()}function Ck(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rd(sa)}function $k(e,t){if(e==="click")return rd(t)}function kk(e,t){if(e==="input"||e==="change")return rd(t)}function bk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sr=typeof Object.is=="function"?Object.is:bk;function aa(e,t){if(sr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Gf.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function kv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bv(e,t){var n=kv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kv(n)}}function hx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function px(){for(var e=window,t=nc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nc(e.document)}return t}function ug(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Tk(e){var t=px(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hx(n.ownerDocument.documentElement,n)){if(r!==null&&ug(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=bv(n,i);var l=bv(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Nk=Vr&&"documentMode"in document&&11>=document.documentMode,Zi=null,fh=null,Ls=null,hh=!1;function Tv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hh||Zi==null||Zi!==nc(r)||(r=Zi,"selectionStart"in r&&ug(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}),Ls&&aa(Ls,r)||(Ls=r,r=uc(fh,"onSelect"),0<r.length&&(t=new lg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zi)))}function uu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qi={animationend:uu("Animation","AnimationEnd"),animationiteration:uu("Animation","AnimationIteration"),animationstart:uu("Animation","AnimationStart"),transitionend:uu("Transition","TransitionEnd")},cf={},gx={};Vr&&(gx=document.createElement("div").style,"AnimationEvent"in window||(delete qi.animationend.animation,delete qi.animationiteration.animation,delete qi.animationstart.animation),"TransitionEvent"in window||delete qi.transitionend.transition);function od(e){if(cf[e])return cf[e];if(!qi[e])return e;var t=qi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gx)return cf[e]=t[n];return e}var mx=od("animationend"),vx=od("animationiteration"),yx=od("animationstart"),xx=od("transitionend"),wx=new Map,Nv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ho(e,t){wx.set(e,t),Ci(t,[e])}for(var df=0;df<Nv.length;df++){var ff=Nv[df],Rk=ff.toLowerCase(),Pk=ff[0].toUpperCase()+ff.slice(1);Ho(Rk,"on"+Pk)}Ho(mx,"onAnimationEnd");Ho(vx,"onAnimationIteration");Ho(yx,"onAnimationStart");Ho("dblclick","onDoubleClick");Ho("focusin","onFocus");Ho("focusout","onBlur");Ho(xx,"onTransitionEnd");Sl("onMouseEnter",["mouseout","mouseover"]);Sl("onMouseLeave",["mouseout","mouseover"]);Sl("onPointerEnter",["pointerout","pointerover"]);Sl("onPointerLeave",["pointerout","pointerover"]);Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ok=new Set("cancel close invalid load scroll toggle".split(" ").concat(ks));function Rv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,R$(r,t,void 0,e),e.currentTarget=null}function _x(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==i&&o.isPropagationStopped())break e;Rv(o,s,u),i=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==i&&o.isPropagationStopped())break e;Rv(o,s,u),i=a}}}if(oc)throw e=ah,oc=!1,ah=null,e}function Ve(e,t){var n=t[yh];n===void 0&&(n=t[yh]=new Set);var r=e+"__bubble";n.has(r)||(Sx(t,e,2,!1),n.add(r))}function hf(e,t,n){var r=0;t&&(r|=4),Sx(n,e,r,t)}var cu="_reactListening"+Math.random().toString(36).slice(2);function ua(e){if(!e[cu]){e[cu]=!0,N1.forEach(function(n){n!=="selectionchange"&&(Ok.has(n)||hf(n,!1,e),hf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cu]||(t[cu]=!0,hf("selectionchange",!1,t))}}function Sx(e,t,n,r){switch(ix(t)){case 1:var o=K$;break;case 4:o=G$;break;default:o=og}n=o.bind(null,t,n,e),o=void 0,!sh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function pf(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;l=l.return}for(;s!==null;){if(l=ri(s),l===null)return;if(a=l.tag,a===5||a===6){r=i=l;continue e}s=s.parentNode}}r=r.return}V1(function(){var u=i,c=eg(n),d=[];e:{var f=wx.get(e);if(f!==void 0){var h=lg,m=e;switch(e){case"keypress":if(Fu(n)===0)break e;case"keydown":case"keyup":h=ak;break;case"focusin":m="focus",h=sf;break;case"focusout":m="blur",h=sf;break;case"beforeblur":case"afterblur":h=sf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=yv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Q$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=dk;break;case mx:case vx:case yx:h=q$;break;case xx:h=hk;break;case"scroll":h=Y$;break;case"wheel":h=gk;break;case"copy":case"cut":case"paste":h=tk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=wv}var g=(t&4)!==0,_=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,x;y!==null;){x=y;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,v!==null&&(S=ra(y,v),S!=null&&g.push(ca(y,S,x)))),_)break;y=y.return}0<g.length&&(f=new h(f,m,null,n,c),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==ih&&(m=n.relatedTarget||n.fromElement)&&(ri(m)||m[Kr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?ri(m):null,m!==null&&(_=$i(m),m!==_||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(g=yv,S="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=wv,S="onPointerLeave",v="onPointerEnter",y="pointer"),_=h==null?f:el(h),x=m==null?f:el(m),f=new g(S,y+"leave",h,n,c),f.target=_,f.relatedTarget=x,S=null,ri(c)===u&&(g=new g(v,y+"enter",m,n,c),g.target=x,g.relatedTarget=_,S=g),_=S,h&&m)t:{for(g=h,v=m,y=0,x=g;x;x=ji(x))y++;for(x=0,S=v;S;S=ji(S))x++;for(;0<y-x;)g=ji(g),y--;for(;0<x-y;)v=ji(v),x--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=ji(g),v=ji(v)}g=null}else g=null;h!==null&&Pv(d,f,h,g,!1),m!==null&&_!==null&&Pv(d,_,m,g,!0)}}e:{if(f=u?el(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var k=Sk;else if(Ev(f))if(dx)k=kk;else{k=Ck;var T=Ek}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(k=$k);if(k&&(k=k(e,u))){cx(d,k,n,c);break e}T&&T(e,f,u),e==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&eh(f,"number",f.value)}switch(T=u?el(u):window,e){case"focusin":(Ev(T)||T.contentEditable==="true")&&(Zi=T,fh=u,Ls=null);break;case"focusout":Ls=fh=Zi=null;break;case"mousedown":hh=!0;break;case"contextmenu":case"mouseup":case"dragend":hh=!1,Tv(d,n,c);break;case"selectionchange":if(Nk)break;case"keydown":case"keyup":Tv(d,n,c)}var b;if(ag)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Ji?ax(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(sx&&n.locale!=="ko"&&(Ji||N!=="onCompositionStart"?N==="onCompositionEnd"&&Ji&&(b=lx()):(xo=c,ig="value"in xo?xo.value:xo.textContent,Ji=!0)),T=uc(u,N),0<T.length&&(N=new xv(N,e,null,n,c),d.push({event:N,listeners:T}),b?N.data=b:(b=ux(n),b!==null&&(N.data=b)))),(b=vk?yk(e,n):xk(e,n))&&(u=uc(u,"onBeforeInput"),0<u.length&&(c=new xv("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=b))}_x(d,t)})}function ca(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uc(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ra(e,n),i!=null&&r.unshift(ca(e,i,o)),i=ra(e,t),i!=null&&r.push(ca(e,i,o))),e=e.return}return r}function ji(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Pv(e,t,n,r,o){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,o?(a=ra(n,i),a!=null&&l.unshift(ca(n,a,s))):o||(a=ra(n,i),a!=null&&l.push(ca(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Ak=/\r\n?/g,Mk=/\u0000|\uFFFD/g;function Ov(e){return(typeof e=="string"?e:""+e).replace(Ak,`
30
+ `).replace(Mk,"")}function du(e,t,n){if(t=Ov(t),Ov(e)!==t&&n)throw Error(U(425))}function cc(){}var ph=null,gh=null;function mh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vh=typeof setTimeout=="function"?setTimeout:void 0,Lk=typeof clearTimeout=="function"?clearTimeout:void 0,Av=typeof Promise=="function"?Promise:void 0,Dk=typeof queueMicrotask=="function"?queueMicrotask:typeof Av<"u"?function(e){return Av.resolve(null).then(e).catch(Ik)}:vh;function Ik(e){setTimeout(function(){throw e})}function gf(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),la(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);la(t)}function ko(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Mv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fl=Math.random().toString(36).slice(2),vr="__reactFiber$"+Fl,da="__reactProps$"+Fl,Kr="__reactContainer$"+Fl,yh="__reactEvents$"+Fl,jk="__reactListeners$"+Fl,zk="__reactHandles$"+Fl;function ri(e){var t=e[vr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Kr]||n[vr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Mv(e);e!==null;){if(n=e[vr])return n;e=Mv(e)}return t}e=n,n=e.parentNode}return null}function za(e){return e=e[vr]||e[Kr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function el(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function id(e){return e[da]||null}var xh=[],tl=-1;function Vo(e){return{current:e}}function Xe(e){0>tl||(e.current=xh[tl],xh[tl]=null,tl--)}function Be(e,t){tl++,xh[tl]=e.current,e.current=t}var Lo={},Gt=Vo(Lo),pn=Vo(!1),hi=Lo;function El(e,t){var n=e.type.contextTypes;if(!n)return Lo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gn(e){return e=e.childContextTypes,e!=null}function dc(){Xe(pn),Xe(Gt)}function Lv(e,t,n){if(Gt.current!==Lo)throw Error(U(168));Be(Gt,t),Be(pn,n)}function Ex(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(U(108,E$(e)||"Unknown",o));return it({},n,r)}function fc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,hi=Gt.current,Be(Gt,e),Be(pn,pn.current),!0}function Dv(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=Ex(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,Xe(pn),Xe(Gt),Be(Gt,e)):Xe(pn),Be(pn,n)}var zr=null,ld=!1,mf=!1;function Cx(e){zr===null?zr=[e]:zr.push(e)}function Fk(e){ld=!0,Cx(e)}function Ko(){if(!mf&&zr!==null){mf=!0;var e=0,t=Me;try{var n=zr;for(Me=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zr=null,ld=!1}catch(o){throw zr!==null&&(zr=zr.slice(e+1)),X1(tg,Ko),o}finally{Me=t,mf=!1}}return null}var nl=[],rl=0,hc=null,pc=0,Dn=[],In=0,pi=null,Wr=1,Ur="";function qo(e,t){nl[rl++]=pc,nl[rl++]=hc,hc=e,pc=t}function $x(e,t,n){Dn[In++]=Wr,Dn[In++]=Ur,Dn[In++]=pi,pi=e;var r=Wr;e=Ur;var o=32-ir(r)-1;r&=~(1<<o),n+=1;var i=32-ir(t)+o;if(30<i){var l=o-o%5;i=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Wr=1<<32-ir(t)+o|n<<o|r,Ur=i+e}else Wr=1<<i|n<<o|r,Ur=e}function cg(e){e.return!==null&&(qo(e,1),$x(e,1,0))}function dg(e){for(;e===hc;)hc=nl[--rl],nl[rl]=null,pc=nl[--rl],nl[rl]=null;for(;e===pi;)pi=Dn[--In],Dn[In]=null,Ur=Dn[--In],Dn[In]=null,Wr=Dn[--In],Dn[In]=null}var Cn=null,En=null,Qe=!1,nr=null;function kx(e,t){var n=Fn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Iv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Cn=e,En=ko(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Cn=e,En=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=pi!==null?{id:Wr,overflow:Ur}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Fn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Cn=e,En=null,!0):!1;default:return!1}}function wh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _h(e){if(Qe){var t=En;if(t){var n=t;if(!Iv(e,t)){if(wh(e))throw Error(U(418));t=ko(n.nextSibling);var r=Cn;t&&Iv(e,t)?kx(r,n):(e.flags=e.flags&-4097|2,Qe=!1,Cn=e)}}else{if(wh(e))throw Error(U(418));e.flags=e.flags&-4097|2,Qe=!1,Cn=e}}}function jv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Cn=e}function fu(e){if(e!==Cn)return!1;if(!Qe)return jv(e),Qe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mh(e.type,e.memoizedProps)),t&&(t=En)){if(wh(e))throw bx(),Error(U(418));for(;t;)kx(e,t),t=ko(t.nextSibling)}if(jv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){En=ko(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}En=null}}else En=Cn?ko(e.stateNode.nextSibling):null;return!0}function bx(){for(var e=En;e;)e=ko(e.nextSibling)}function Cl(){En=Cn=null,Qe=!1}function fg(e){nr===null?nr=[e]:nr.push(e)}var Bk=Zr.ReactCurrentBatchConfig;function qn(e,t){if(e&&e.defaultProps){t=it({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var gc=Vo(null),mc=null,ol=null,hg=null;function pg(){hg=ol=mc=null}function gg(e){var t=gc.current;Xe(gc),e._currentValue=t}function Sh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function gl(e,t){mc=e,hg=ol=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(hn=!0),e.firstContext=null)}function Un(e){var t=e._currentValue;if(hg!==e)if(e={context:e,memoizedValue:t,next:null},ol===null){if(mc===null)throw Error(U(308));ol=e,mc.dependencies={lanes:0,firstContext:e}}else ol=ol.next=e;return t}var oi=null;function mg(e){oi===null?oi=[e]:oi.push(e)}function Tx(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,mg(t)):(n.next=o.next,o.next=n),t.interleaved=n,Gr(e,r)}function Gr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var po=!1;function vg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Hr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,be&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Gr(e,n)}return o=r.interleaved,o===null?(t.next=t,mg(r)):(t.next=o.next,o.next=t),r.interleaved=t,Gr(e,n)}function Bu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ng(e,n)}}function zv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vc(e,t,n,r){var o=e.updateQueue;po=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;l=0,c=u=a=null,s=i;do{var f=s.lane,h=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,h=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=it({},d,f);break e;case 2:po=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,l|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);mi|=l,e.lanes=l,e.memoizedState=d}}function Fv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(U(191,o));o.call(r)}}}var Rx=new T1.Component().refs;function Eh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:it({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var sd={isMounted:function(e){return(e=e._reactInternals)?$i(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ln(),o=No(e),i=Hr(r,o);i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,o),t!==null&&(lr(t,e,o,r),Bu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ln(),o=No(e),i=Hr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=bo(e,i,o),t!==null&&(lr(t,e,o,r),Bu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ln(),r=No(e),o=Hr(n,r);o.tag=2,t!=null&&(o.callback=t),t=bo(e,o,r),t!==null&&(lr(t,e,r,n),Bu(t,e,r))}};function Bv(e,t,n,r,o,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!aa(n,r)||!aa(o,i):!0}function Px(e,t,n){var r=!1,o=Lo,i=t.contextType;return typeof i=="object"&&i!==null?i=Un(i):(o=gn(t)?hi:Gt.current,r=t.contextTypes,i=(r=r!=null)?El(e,o):Lo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=sd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Wv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&sd.enqueueReplaceState(t,t.state,null)}function Ch(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Rx,vg(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Un(i):(i=gn(t)?hi:Gt.current,o.context=El(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Eh(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&sd.enqueueReplaceState(o,o.state,null),vc(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ds(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var s=o.refs;s===Rx&&(s=o.refs={}),l===null?delete s[i]:s[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function hu(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uv(e){var t=e._init;return t(e._payload)}function Ox(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function n(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function r(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function o(v,y){return v=Ro(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,x,S){return y===null||y.tag!==6?(y=Ef(x,v.mode,S),y.return=v,y):(y=o(y,x),y.return=v,y)}function a(v,y,x,S){var k=x.type;return k===Qi?c(v,y,x.props.children,S,x.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ho&&Uv(k)===y.type)?(S=o(y,x.props),S.ref=ds(v,y,x),S.return=v,S):(S=Gu(x.type,x.key,x.props,null,v.mode,S),S.ref=ds(v,y,x),S.return=v,S)}function u(v,y,x,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Cf(x,v.mode,S),y.return=v,y):(y=o(y,x.children||[]),y.return=v,y)}function c(v,y,x,S,k){return y===null||y.tag!==7?(y=ui(x,v.mode,S,k),y.return=v,y):(y=o(y,x),y.return=v,y)}function d(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Ef(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case nu:return x=Gu(y.type,y.key,y.props,null,v.mode,x),x.ref=ds(v,null,y),x.return=v,x;case Xi:return y=Cf(y,v.mode,x),y.return=v,y;case ho:var S=y._init;return d(v,S(y._payload),x)}if(Cs(y)||ls(y))return y=ui(y,v.mode,x,null),y.return=v,y;hu(v,y)}return null}function f(v,y,x,S){var k=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:s(v,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case nu:return x.key===k?a(v,y,x,S):null;case Xi:return x.key===k?u(v,y,x,S):null;case ho:return k=x._init,f(v,y,k(x._payload),S)}if(Cs(x)||ls(x))return k!==null?null:c(v,y,x,S,null);hu(v,x)}return null}function h(v,y,x,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(x)||null,s(y,v,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case nu:return v=v.get(S.key===null?x:S.key)||null,a(y,v,S,k);case Xi:return v=v.get(S.key===null?x:S.key)||null,u(y,v,S,k);case ho:var T=S._init;return h(v,y,x,T(S._payload),k)}if(Cs(S)||ls(S))return v=v.get(x)||null,c(y,v,S,k,null);hu(y,S)}return null}function m(v,y,x,S){for(var k=null,T=null,b=y,N=y=0,D=null;b!==null&&N<x.length;N++){b.index>N?(D=b,b=null):D=b.sibling;var M=f(v,b,x[N],S);if(M===null){b===null&&(b=D);break}e&&b&&M.alternate===null&&t(v,b),y=i(M,y,N),T===null?k=M:T.sibling=M,T=M,b=D}if(N===x.length)return n(v,b),Qe&&qo(v,N),k;if(b===null){for(;N<x.length;N++)b=d(v,x[N],S),b!==null&&(y=i(b,y,N),T===null?k=b:T.sibling=b,T=b);return Qe&&qo(v,N),k}for(b=r(v,b);N<x.length;N++)D=h(b,v,N,x[N],S),D!==null&&(e&&D.alternate!==null&&b.delete(D.key===null?N:D.key),y=i(D,y,N),T===null?k=D:T.sibling=D,T=D);return e&&b.forEach(function(j){return t(v,j)}),Qe&&qo(v,N),k}function g(v,y,x,S){var k=ls(x);if(typeof k!="function")throw Error(U(150));if(x=k.call(x),x==null)throw Error(U(151));for(var T=k=null,b=y,N=y=0,D=null,M=x.next();b!==null&&!M.done;N++,M=x.next()){b.index>N?(D=b,b=null):D=b.sibling;var j=f(v,b,M.value,S);if(j===null){b===null&&(b=D);break}e&&b&&j.alternate===null&&t(v,b),y=i(j,y,N),T===null?k=j:T.sibling=j,T=j,b=D}if(M.done)return n(v,b),Qe&&qo(v,N),k;if(b===null){for(;!M.done;N++,M=x.next())M=d(v,M.value,S),M!==null&&(y=i(M,y,N),T===null?k=M:T.sibling=M,T=M);return Qe&&qo(v,N),k}for(b=r(v,b);!M.done;N++,M=x.next())M=h(b,v,N,M.value,S),M!==null&&(e&&M.alternate!==null&&b.delete(M.key===null?N:M.key),y=i(M,y,N),T===null?k=M:T.sibling=M,T=M);return e&&b.forEach(function(B){return t(v,B)}),Qe&&qo(v,N),k}function _(v,y,x,S){if(typeof x=="object"&&x!==null&&x.type===Qi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case nu:e:{for(var k=x.key,T=y;T!==null;){if(T.key===k){if(k=x.type,k===Qi){if(T.tag===7){n(v,T.sibling),y=o(T,x.props.children),y.return=v,v=y;break e}}else if(T.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ho&&Uv(k)===T.type){n(v,T.sibling),y=o(T,x.props),y.ref=ds(v,T,x),y.return=v,v=y;break e}n(v,T);break}else t(v,T);T=T.sibling}x.type===Qi?(y=ui(x.props.children,v.mode,S,x.key),y.return=v,v=y):(S=Gu(x.type,x.key,x.props,null,v.mode,S),S.ref=ds(v,y,x),S.return=v,v=S)}return l(v);case Xi:e:{for(T=x.key;y!==null;){if(y.key===T)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=o(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=Cf(x,v.mode,S),y.return=v,v=y}return l(v);case ho:return T=x._init,_(v,y,T(x._payload),S)}if(Cs(x))return m(v,y,x,S);if(ls(x))return g(v,y,x,S);hu(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,x),y.return=v,v=y):(n(v,y),y=Ef(x,v.mode,S),y.return=v,v=y),l(v)):n(v,y)}return _}var $l=Ox(!0),Ax=Ox(!1),Fa={},Er=Vo(Fa),fa=Vo(Fa),ha=Vo(Fa);function ii(e){if(e===Fa)throw Error(U(174));return e}function yg(e,t){switch(Be(ha,t),Be(fa,e),Be(Er,Fa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:nh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=nh(t,e)}Xe(Er),Be(Er,t)}function kl(){Xe(Er),Xe(fa),Xe(ha)}function Mx(e){ii(ha.current);var t=ii(Er.current),n=nh(t,e.type);t!==n&&(Be(fa,e),Be(Er,n))}function xg(e){fa.current===e&&(Xe(Er),Xe(fa))}var tt=Vo(0);function yc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vf=[];function wg(){for(var e=0;e<vf.length;e++)vf[e]._workInProgressVersionPrimary=null;vf.length=0}var Wu=Zr.ReactCurrentDispatcher,yf=Zr.ReactCurrentBatchConfig,gi=0,rt=null,wt=null,kt=null,xc=!1,Ds=!1,pa=0,Wk=0;function zt(){throw Error(U(321))}function _g(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function Sg(e,t,n,r,o,i){if(gi=i,rt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wu.current=e===null||e.memoizedState===null?Kk:Gk,e=n(r,o),Ds){i=0;do{if(Ds=!1,pa=0,25<=i)throw Error(U(301));i+=1,kt=wt=null,t.updateQueue=null,Wu.current=Yk,e=n(r,o)}while(Ds)}if(Wu.current=wc,t=wt!==null&&wt.next!==null,gi=0,kt=wt=rt=null,xc=!1,t)throw Error(U(300));return e}function Eg(){var e=pa!==0;return pa=0,e}function gr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?rt.memoizedState=kt=e:kt=kt.next=e,kt}function Hn(){if(wt===null){var e=rt.alternate;e=e!==null?e.memoizedState:null}else e=wt.next;var t=kt===null?rt.memoizedState:kt.next;if(t!==null)kt=t,wt=e;else{if(e===null)throw Error(U(310));wt=e,e={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},kt===null?rt.memoizedState=kt=e:kt=kt.next=e}return kt}function ga(e,t){return typeof t=="function"?t(e):t}function xf(e){var t=Hn(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=wt,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=l=null,a=null,u=i;do{var c=u.lane;if((gi&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=d,l=r):a=a.next=d,rt.lanes|=c,mi|=c}u=u.next}while(u!==null&&u!==i);a===null?l=r:a.next=s,sr(r,t.memoizedState)||(hn=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,rt.lanes|=i,mi|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wf(e){var t=Hn(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var l=o=o.next;do i=e(i,l.action),l=l.next;while(l!==o);sr(i,t.memoizedState)||(hn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Lx(){}function Dx(e,t){var n=rt,r=Hn(),o=t(),i=!sr(r.memoizedState,o);if(i&&(r.memoizedState=o,hn=!0),r=r.queue,Cg(zx.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||kt!==null&&kt.memoizedState.tag&1){if(n.flags|=2048,ma(9,jx.bind(null,n,r,o,t),void 0,null),Pt===null)throw Error(U(349));gi&30||Ix(n,t,o)}return o}function Ix(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=rt.updateQueue,t===null?(t={lastEffect:null,stores:null},rt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function jx(e,t,n,r){t.value=n,t.getSnapshot=r,Fx(t)&&Bx(e)}function zx(e,t,n){return n(function(){Fx(t)&&Bx(e)})}function Fx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch{return!0}}function Bx(e){var t=Gr(e,1);t!==null&&lr(t,e,1,-1)}function Hv(e){var t=gr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t.queue=e,e=e.dispatch=Vk.bind(null,rt,e),[t.memoizedState,e]}function ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=rt.updateQueue,t===null?(t={lastEffect:null,stores:null},rt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Wx(){return Hn().memoizedState}function Uu(e,t,n,r){var o=gr();rt.flags|=e,o.memoizedState=ma(1|t,n,void 0,r===void 0?null:r)}function ad(e,t,n,r){var o=Hn();r=r===void 0?null:r;var i=void 0;if(wt!==null){var l=wt.memoizedState;if(i=l.destroy,r!==null&&_g(r,l.deps)){o.memoizedState=ma(t,n,i,r);return}}rt.flags|=e,o.memoizedState=ma(1|t,n,i,r)}function Vv(e,t){return Uu(8390656,8,e,t)}function Cg(e,t){return ad(2048,8,e,t)}function Ux(e,t){return ad(4,2,e,t)}function Hx(e,t){return ad(4,4,e,t)}function Vx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kx(e,t,n){return n=n!=null?n.concat([e]):null,ad(4,4,Vx.bind(null,t,e),n)}function $g(){}function Gx(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_g(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Yx(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_g(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xx(e,t,n){return gi&21?(sr(n,t)||(n=Z1(),rt.lanes|=n,mi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,hn=!0),e.memoizedState=n)}function Uk(e,t){var n=Me;Me=n!==0&&4>n?n:4,e(!0);var r=yf.transition;yf.transition={};try{e(!1),t()}finally{Me=n,yf.transition=r}}function Qx(){return Hn().memoizedState}function Hk(e,t,n){var r=No(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Jx(e))Zx(t,n);else if(n=Tx(e,t,n,r),n!==null){var o=ln();lr(n,e,r,o),qx(n,t,r)}}function Vk(e,t,n){var r=No(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Jx(e))Zx(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,l)){var a=t.interleaved;a===null?(o.next=o,mg(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Tx(e,t,o,r),n!==null&&(o=ln(),lr(n,e,r,o),qx(n,t,r))}}function Jx(e){var t=e.alternate;return e===rt||t!==null&&t===rt}function Zx(e,t){Ds=xc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ng(e,n)}}var wc={readContext:Un,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},Kk={readContext:Un,useCallback:function(e,t){return gr().memoizedState=[e,t===void 0?null:t],e},useContext:Un,useEffect:Vv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Uu(4194308,4,Vx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Uu(4,2,e,t)},useMemo:function(e,t){var n=gr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Hk.bind(null,rt,e),[r.memoizedState,e]},useRef:function(e){var t=gr();return e={current:e},t.memoizedState=e},useState:Hv,useDebugValue:$g,useDeferredValue:function(e){return gr().memoizedState=e},useTransition:function(){var e=Hv(!1),t=e[0];return e=Uk.bind(null,e[1]),gr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rt,o=gr();if(Qe){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Pt===null)throw Error(U(349));gi&30||Ix(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Vv(zx.bind(null,r,i,e),[e]),r.flags|=2048,ma(9,jx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gr(),t=Pt.identifierPrefix;if(Qe){var n=Ur,r=Wr;n=(r&~(1<<32-ir(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Wk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gk={readContext:Un,useCallback:Gx,useContext:Un,useEffect:Cg,useImperativeHandle:Kx,useInsertionEffect:Ux,useLayoutEffect:Hx,useMemo:Yx,useReducer:xf,useRef:Wx,useState:function(){return xf(ga)},useDebugValue:$g,useDeferredValue:function(e){var t=Hn();return Xx(t,wt.memoizedState,e)},useTransition:function(){var e=xf(ga)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1},Yk={readContext:Un,useCallback:Gx,useContext:Un,useEffect:Cg,useImperativeHandle:Kx,useInsertionEffect:Ux,useLayoutEffect:Hx,useMemo:Yx,useReducer:wf,useRef:Wx,useState:function(){return wf(ga)},useDebugValue:$g,useDeferredValue:function(e){var t=Hn();return wt===null?t.memoizedState=e:Xx(t,wt.memoizedState,e)},useTransition:function(){var e=wf(ga)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:Lx,useSyncExternalStore:Dx,useId:Qx,unstable_isNewReconciler:!1};function bl(e,t){try{var n="",r=t;do n+=S$(r),r=r.return;while(r);var o=n}catch(i){o=`
31
+ Error generating stack: `+i.message+`
32
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function _f(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $h(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Xk=typeof WeakMap=="function"?WeakMap:Map;function ew(e,t,n){n=Hr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Sc||(Sc=!0,Lh=r),$h(e,t)},n}function tw(e,t,n){n=Hr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){$h(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$h(e,t),typeof r!="function"&&(To===null?To=new Set([this]):To.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Kv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Xk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=ub.bind(null,e,t,n),t.then(e,e))}function Gv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Yv(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Hr(-1,1),t.tag=2,bo(n,t,1))),n.lanes|=1),e)}var Qk=Zr.ReactCurrentOwner,hn=!1;function Jt(e,t,n,r){t.child=e===null?Ax(t,null,n,r):$l(t,e.child,n,r)}function Xv(e,t,n,r,o){n=n.render;var i=t.ref;return gl(t,o),r=Sg(e,t,n,r,i,o),n=Eg(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Yr(e,t,o)):(Qe&&n&&cg(t),t.flags|=1,Jt(e,t,r,o),t.child)}function Qv(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Ag(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,nw(e,t,i,r,o)):(e=Gu(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:aa,n(l,r)&&e.ref===t.ref)return Yr(e,t,o)}return t.flags|=1,e=Ro(i,r),e.ref=t.ref,e.return=t,t.child=e}function nw(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(aa(i,r)&&e.ref===t.ref)if(hn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(hn=!0);else return t.lanes=e.lanes,Yr(e,t,o)}return kh(e,t,n,r,o)}function rw(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(ll,wn),wn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(ll,wn),wn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Be(ll,wn),wn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Be(ll,wn),wn|=r;return Jt(e,t,o,n),t.child}function ow(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function kh(e,t,n,r,o){var i=gn(n)?hi:Gt.current;return i=El(t,i),gl(t,o),n=Sg(e,t,n,r,i,o),r=Eg(),e!==null&&!hn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Yr(e,t,o)):(Qe&&r&&cg(t),t.flags|=1,Jt(e,t,n,o),t.child)}function Jv(e,t,n,r,o){if(gn(n)){var i=!0;fc(t)}else i=!1;if(gl(t,o),t.stateNode===null)Hu(e,t),Px(t,n,r),Ch(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Un(u):(u=gn(n)?hi:Gt.current,u=El(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Wv(t,l,r,u),po=!1;var f=t.memoizedState;l.state=f,vc(t,r,l,o),a=t.memoizedState,s!==r||f!==a||pn.current||po?(typeof c=="function"&&(Eh(t,n,c,r),a=t.memoizedState),(s=po||Bv(t,n,s,r,f,a,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Nx(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:qn(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=Un(a):(a=gn(n)?hi:Gt.current,a=El(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||f!==a)&&Wv(t,l,r,a),po=!1,f=t.memoizedState,l.state=f,vc(t,r,l,o);var m=t.memoizedState;s!==d||f!==m||pn.current||po?(typeof h=="function"&&(Eh(t,n,h,r),m=t.memoizedState),(u=po||Bv(t,n,u,r,f,m,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,m,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,m,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),l.props=r,l.state=m,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return bh(e,t,n,r,i,o)}function bh(e,t,n,r,o,i){ow(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&Dv(t,n,!1),Yr(e,t,i);r=t.stateNode,Qk.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=$l(t,e.child,null,i),t.child=$l(t,null,s,i)):Jt(e,t,s,i),t.memoizedState=r.state,o&&Dv(t,n,!0),t.child}function iw(e){var t=e.stateNode;t.pendingContext?Lv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lv(e,t.context,!1),yg(e,t.containerInfo)}function Zv(e,t,n,r,o){return Cl(),fg(o),t.flags|=256,Jt(e,t,n,r),t.child}var Th={dehydrated:null,treeContext:null,retryLane:0};function Nh(e){return{baseLanes:e,cachePool:null,transitions:null}}function lw(e,t,n){var r=t.pendingProps,o=tt.current,i=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Be(tt,o&1),e===null)return _h(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=dd(l,r,0,null),e=ui(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Nh(n),t.memoizedState=Th,e):kg(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Jk(e,t,l,r,s,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,s=o.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ro(o,a),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Ro(s,i):(i=ui(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?Nh(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=Th,r}return i=e.child,e=i.sibling,r=Ro(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function kg(e,t){return t=dd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pu(e,t,n,r){return r!==null&&fg(r),$l(t,e.child,null,n),e=kg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Jk(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=_f(Error(U(422))),pu(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=dd({mode:"visible",children:r.children},o,0,null),i=ui(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&$l(t,e.child,null,l),t.child.memoizedState=Nh(l),t.memoizedState=Th,i);if(!(t.mode&1))return pu(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(U(419)),r=_f(i,r,void 0),pu(e,t,l,r)}if(s=(l&e.childLanes)!==0,hn||s){if(r=Pt,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|l)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Gr(e,o),lr(r,e,o,-1))}return Og(),r=_f(Error(U(421))),pu(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=cb.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,En=ko(o.nextSibling),Cn=t,Qe=!0,nr=null,e!==null&&(Dn[In++]=Wr,Dn[In++]=Ur,Dn[In++]=pi,Wr=e.id,Ur=e.overflow,pi=t),t=kg(t,r.children),t.flags|=4096,t)}function qv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sh(e.return,t,n)}function Sf(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function sw(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Jt(e,t,r.children,n),r=tt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&qv(e,n,t);else if(e.tag===19)qv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Be(tt,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&yc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Sf(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&yc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Sf(t,!0,n,null,i);break;case"together":Sf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Ro(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ro(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zk(e,t,n){switch(t.tag){case 3:iw(t),Cl();break;case 5:Mx(t);break;case 1:gn(t.type)&&fc(t);break;case 4:yg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Be(gc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(tt,tt.current&1),t.flags|=128,null):n&t.child.childLanes?lw(e,t,n):(Be(tt,tt.current&1),e=Yr(e,t,n),e!==null?e.sibling:null);Be(tt,tt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return sw(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Be(tt,tt.current),r)break;return null;case 22:case 23:return t.lanes=0,rw(e,t,n)}return Yr(e,t,n)}var aw,Rh,uw,cw;aw=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Rh=function(){};uw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ii(Er.current);var i=null;switch(n){case"input":o=Zf(e,o),r=Zf(e,r),i=[];break;case"select":o=it({},o,{value:void 0}),r=it({},r,{value:void 0}),i=[];break;case"textarea":o=th(e,o),r=th(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cc)}rh(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ta.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(s=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ta.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ve("scroll",e),i||s===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};cw=function(e,t,n,r){n!==r&&(t.flags|=4)};function fs(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qk(e,t,n){var r=t.pendingProps;switch(dg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(t),null;case 1:return gn(t.type)&&dc(),Ft(t),null;case 3:return r=t.stateNode,kl(),Xe(pn),Xe(Gt),wg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,nr!==null&&(jh(nr),nr=null))),Rh(e,t),Ft(t),null;case 5:xg(t);var o=ii(ha.current);if(n=t.type,e!==null&&t.stateNode!=null)uw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(U(166));return Ft(t),null}if(e=ii(Er.current),fu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[vr]=t,r[da]=i,e=(t.mode&1)!==0,n){case"dialog":Ve("cancel",r),Ve("close",r);break;case"iframe":case"object":case"embed":Ve("load",r);break;case"video":case"audio":for(o=0;o<ks.length;o++)Ve(ks[o],r);break;case"source":Ve("error",r);break;case"img":case"image":case"link":Ve("error",r),Ve("load",r);break;case"details":Ve("toggle",r);break;case"input":av(r,i),Ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ve("invalid",r);break;case"textarea":cv(r,i),Ve("invalid",r)}rh(n,i),o=null;for(var l in i)if(i.hasOwnProperty(l)){var s=i[l];l==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&du(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&du(r.textContent,s,e),o=["children",""+s]):ta.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ve("scroll",r)}switch(n){case"input":ru(r),uv(r,i,!0);break;case"textarea":ru(r),dv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=cc)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=I1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[vr]=t,e[da]=r,aw(e,t,!1,!1),t.stateNode=e;e:{switch(l=oh(n,r),n){case"dialog":Ve("cancel",e),Ve("close",e),o=r;break;case"iframe":case"object":case"embed":Ve("load",e),o=r;break;case"video":case"audio":for(o=0;o<ks.length;o++)Ve(ks[o],e);o=r;break;case"source":Ve("error",e),o=r;break;case"img":case"image":case"link":Ve("error",e),Ve("load",e),o=r;break;case"details":Ve("toggle",e),o=r;break;case"input":av(e,r),o=Zf(e,r),Ve("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=it({},r,{value:void 0}),Ve("invalid",e);break;case"textarea":cv(e,r),o=th(e,r),Ve("invalid",e);break;default:o=r}rh(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="style"?F1(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&j1(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&na(e,a):typeof a=="number"&&na(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ta.hasOwnProperty(i)?a!=null&&i==="onScroll"&&Ve("scroll",e):a!=null&&Qp(e,i,a,l))}switch(n){case"input":ru(e),uv(e,r,!1);break;case"textarea":ru(e),dv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mo(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?dl(e,!!r.multiple,i,!1):r.defaultValue!=null&&dl(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=cc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ft(t),null;case 6:if(e&&t.stateNode!=null)cw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));if(n=ii(ha.current),ii(Er.current),fu(t)){if(r=t.stateNode,n=t.memoizedProps,r[vr]=t,(i=r.nodeValue!==n)&&(e=Cn,e!==null))switch(e.tag){case 3:du(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&du(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[vr]=t,t.stateNode=r}return Ft(t),null;case 13:if(Xe(tt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qe&&En!==null&&t.mode&1&&!(t.flags&128))bx(),Cl(),t.flags|=98560,i=!1;else if(i=fu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[vr]=t}else Cl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ft(t),i=!1}else nr!==null&&(jh(nr),nr=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||tt.current&1?St===0&&(St=3):Og())),t.updateQueue!==null&&(t.flags|=4),Ft(t),null);case 4:return kl(),Rh(e,t),e===null&&ua(t.stateNode.containerInfo),Ft(t),null;case 10:return gg(t.type._context),Ft(t),null;case 17:return gn(t.type)&&dc(),Ft(t),null;case 19:if(Xe(tt),i=t.memoizedState,i===null)return Ft(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)fs(i,!1);else{if(St!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=yc(e),l!==null){for(t.flags|=128,fs(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Be(tt,tt.current&1|2),t.child}e=e.sibling}i.tail!==null&&pt()>Tl&&(t.flags|=128,r=!0,fs(i,!1),t.lanes=4194304)}else{if(!r)if(e=yc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Qe)return Ft(t),null}else 2*pt()-i.renderingStartTime>Tl&&n!==1073741824&&(t.flags|=128,r=!0,fs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=pt(),t.sibling=null,n=tt.current,Be(tt,r?n&1|2:n&1),t):(Ft(t),null);case 22:case 23:return Pg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wn&1073741824&&(Ft(t),t.subtreeFlags&6&&(t.flags|=8192)):Ft(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function eb(e,t){switch(dg(t),t.tag){case 1:return gn(t.type)&&dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kl(),Xe(pn),Xe(Gt),wg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xg(t),null;case 13:if(Xe(tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xe(tt),null;case 4:return kl(),null;case 10:return gg(t.type._context),null;case 22:case 23:return Pg(),null;case 24:return null;default:return null}}var gu=!1,Wt=!1,tb=typeof WeakSet=="function"?WeakSet:Set,q=null;function il(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){st(e,t,r)}else n.current=null}function Ph(e,t,n){try{n()}catch(r){st(e,t,r)}}var ey=!1;function nb(e,t){if(ph=sc,e=px(),ug(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(s=l+o),d!==i||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=l),f===i&&++c===r&&(a=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(gh={focusedElem:e,selectionRange:n},sc=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,_=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:qn(t.type,g),_);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){st(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return m=ey,ey=!1,m}function Is(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ph(t,n,i)}o=o.next}while(o!==r)}}function ud(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dw(e){var t=e.alternate;t!==null&&(e.alternate=null,dw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vr],delete t[da],delete t[yh],delete t[jk],delete t[zk])),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 fw(e){return e.tag===5||e.tag===3||e.tag===4}function ty(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fw(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 Ah(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cc));else if(r!==4&&(e=e.child,e!==null))for(Ah(e,t,n),e=e.sibling;e!==null;)Ah(e,t,n),e=e.sibling}function Mh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Mh(e,t,n),e=e.sibling;e!==null;)Mh(e,t,n),e=e.sibling}var Lt=null,er=!1;function io(e,t,n){for(n=n.child;n!==null;)hw(e,t,n),n=n.sibling}function hw(e,t,n){if(Sr&&typeof Sr.onCommitFiberUnmount=="function")try{Sr.onCommitFiberUnmount(td,n)}catch{}switch(n.tag){case 5:Wt||il(n,t);case 6:var r=Lt,o=er;Lt=null,io(e,t,n),Lt=r,er=o,Lt!==null&&(er?(e=Lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lt.removeChild(n.stateNode));break;case 18:Lt!==null&&(er?(e=Lt,n=n.stateNode,e.nodeType===8?gf(e.parentNode,n):e.nodeType===1&&gf(e,n),la(e)):gf(Lt,n.stateNode));break;case 4:r=Lt,o=er,Lt=n.stateNode.containerInfo,er=!0,io(e,t,n),Lt=r,er=o;break;case 0:case 11:case 14:case 15:if(!Wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Ph(n,t,l),o=o.next}while(o!==r)}io(e,t,n);break;case 1:if(!Wt&&(il(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){st(n,t,s)}io(e,t,n);break;case 21:io(e,t,n);break;case 22:n.mode&1?(Wt=(r=Wt)||n.memoizedState!==null,io(e,t,n),Wt=r):io(e,t,n);break;default:io(e,t,n)}}function ny(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tb),t.forEach(function(r){var o=db.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:Lt=s.stateNode,er=!1;break e;case 3:Lt=s.stateNode.containerInfo,er=!0;break e;case 4:Lt=s.stateNode.containerInfo,er=!0;break e}s=s.return}if(Lt===null)throw Error(U(160));hw(i,l,o),Lt=null,er=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){st(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pw(t,e),t=t.sibling}function pw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xn(t,e),pr(e),r&4){try{Is(3,e,e.return),ud(3,e)}catch(g){st(e,e.return,g)}try{Is(5,e,e.return)}catch(g){st(e,e.return,g)}}break;case 1:Xn(t,e),pr(e),r&512&&n!==null&&il(n,n.return);break;case 5:if(Xn(t,e),pr(e),r&512&&n!==null&&il(n,n.return),e.flags&32){var o=e.stateNode;try{na(o,"")}catch(g){st(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&L1(o,i),oh(s,l);var u=oh(s,i);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?F1(o,d):c==="dangerouslySetInnerHTML"?j1(o,d):c==="children"?na(o,d):Qp(o,c,d,u)}switch(s){case"input":qf(o,i);break;case"textarea":D1(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?dl(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?dl(o,!!i.multiple,i.defaultValue,!0):dl(o,!!i.multiple,i.multiple?[]:"",!1))}o[da]=i}catch(g){st(e,e.return,g)}}break;case 6:if(Xn(t,e),pr(e),r&4){if(e.stateNode===null)throw Error(U(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){st(e,e.return,g)}}break;case 3:if(Xn(t,e),pr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{la(t.containerInfo)}catch(g){st(e,e.return,g)}break;case 4:Xn(t,e),pr(e);break;case 13:Xn(t,e),pr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Ng=pt())),r&4&&ny(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Wt=(u=Wt)||c,Xn(t,e),Wt=u):Xn(t,e),pr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(q=e,c=e.child;c!==null;){for(d=q=c;q!==null;){switch(f=q,h=f.child,f.tag){case 0:case 11:case 14:case 15:Is(4,f,f.return);break;case 1:il(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){st(r,n,g)}}break;case 5:il(f,f.return);break;case 22:if(f.memoizedState!==null){oy(d);continue}}h!==null?(h.return=f,q=h):oy(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=z1("display",l))}catch(g){st(e,e.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){st(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Xn(t,e),pr(e),r&4&&ny(e);break;case 21:break;default:Xn(t,e),pr(e)}}function pr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(fw(n)){var r=n;break e}n=n.return}throw Error(U(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(na(o,""),r.flags&=-33);var i=ty(e);Mh(e,i,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=ty(e);Ah(e,s,l);break;default:throw Error(U(161))}}catch(a){st(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rb(e,t,n){q=e,gw(e)}function gw(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||gu;if(!l){var s=o.alternate,a=s!==null&&s.memoizedState!==null||Wt;s=gu;var u=Wt;if(gu=l,(Wt=a)&&!u)for(q=o;q!==null;)l=q,a=l.child,l.tag===22&&l.memoizedState!==null?iy(o):a!==null?(a.return=l,q=a):iy(o);for(;i!==null;)q=i,gw(i),i=i.sibling;q=o,gu=s,Wt=u}ry(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):ry(e)}}function ry(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Wt||ud(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Wt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:qn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Fv(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Fv(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&la(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Wt||t.flags&512&&Oh(t)}catch(f){st(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function oy(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function iy(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ud(4,t)}catch(a){st(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){st(t,o,a)}}var i=t.return;try{Oh(t)}catch(a){st(t,i,a)}break;case 5:var l=t.return;try{Oh(t)}catch(a){st(t,l,a)}}}catch(a){st(t,t.return,a)}if(t===e){q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,q=s;break}q=t.return}}var ob=Math.ceil,_c=Zr.ReactCurrentDispatcher,bg=Zr.ReactCurrentOwner,Wn=Zr.ReactCurrentBatchConfig,be=0,Pt=null,mt=null,It=0,wn=0,ll=Vo(0),St=0,va=null,mi=0,cd=0,Tg=0,js=null,fn=null,Ng=0,Tl=1/0,Dr=null,Sc=!1,Lh=null,To=null,mu=!1,wo=null,Ec=0,zs=0,Dh=null,Vu=-1,Ku=0;function ln(){return be&6?pt():Vu!==-1?Vu:Vu=pt()}function No(e){return e.mode&1?be&2&&It!==0?It&-It:Bk.transition!==null?(Ku===0&&(Ku=Z1()),Ku):(e=Me,e!==0||(e=window.event,e=e===void 0?16:ix(e.type)),e):1}function lr(e,t,n,r){if(50<zs)throw zs=0,Dh=null,Error(U(185));Ia(e,n,r),(!(be&2)||e!==Pt)&&(e===Pt&&(!(be&2)&&(cd|=n),St===4&&vo(e,It)),mn(e,r),n===1&&be===0&&!(t.mode&1)&&(Tl=pt()+500,ld&&Ko()))}function mn(e,t){var n=e.callbackNode;B$(e,t);var r=lc(e,e===Pt?It:0);if(r===0)n!==null&&pv(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pv(n),t===1)e.tag===0?Fk(ly.bind(null,e)):Cx(ly.bind(null,e)),Dk(function(){!(be&6)&&Ko()}),n=null;else{switch(q1(r)){case 1:n=tg;break;case 4:n=Q1;break;case 16:n=ic;break;case 536870912:n=J1;break;default:n=ic}n=Ew(n,mw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function mw(e,t){if(Vu=-1,Ku=0,be&6)throw Error(U(327));var n=e.callbackNode;if(ml()&&e.callbackNode!==n)return null;var r=lc(e,e===Pt?It:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Cc(e,r);else{t=r;var o=be;be|=2;var i=yw();(Pt!==e||It!==t)&&(Dr=null,Tl=pt()+500,ai(e,t));do try{sb();break}catch(s){vw(e,s)}while(!0);pg(),_c.current=i,be=o,mt!==null?t=0:(Pt=null,It=0,t=St)}if(t!==0){if(t===2&&(o=uh(e),o!==0&&(r=o,t=Ih(e,o))),t===1)throw n=va,ai(e,0),vo(e,r),mn(e,pt()),n;if(t===6)vo(e,r);else{if(o=e.current.alternate,!(r&30)&&!ib(o)&&(t=Cc(e,r),t===2&&(i=uh(e),i!==0&&(r=i,t=Ih(e,i))),t===1))throw n=va,ai(e,0),vo(e,r),mn(e,pt()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(U(345));case 2:ei(e,fn,Dr);break;case 3:if(vo(e,r),(r&130023424)===r&&(t=Ng+500-pt(),10<t)){if(lc(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){ln(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=vh(ei.bind(null,e,fn,Dr),t);break}ei(e,fn,Dr);break;case 4:if(vo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-ir(r);i=1<<l,l=t[l],l>o&&(o=l),r&=~i}if(r=o,r=pt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ob(r/1960))-r,10<r){e.timeoutHandle=vh(ei.bind(null,e,fn,Dr),r);break}ei(e,fn,Dr);break;case 5:ei(e,fn,Dr);break;default:throw Error(U(329))}}}return mn(e,pt()),e.callbackNode===n?mw.bind(null,e):null}function Ih(e,t){var n=js;return e.current.memoizedState.isDehydrated&&(ai(e,t).flags|=256),e=Cc(e,t),e!==2&&(t=fn,fn=n,t!==null&&jh(t)),e}function jh(e){fn===null?fn=e:fn.push.apply(fn,e)}function ib(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vo(e,t){for(t&=~Tg,t&=~cd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ir(t),r=1<<n;e[n]=-1,t&=~r}}function ly(e){if(be&6)throw Error(U(327));ml();var t=lc(e,0);if(!(t&1))return mn(e,pt()),null;var n=Cc(e,t);if(e.tag!==0&&n===2){var r=uh(e);r!==0&&(t=r,n=Ih(e,r))}if(n===1)throw n=va,ai(e,0),vo(e,t),mn(e,pt()),n;if(n===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ei(e,fn,Dr),mn(e,pt()),null}function Rg(e,t){var n=be;be|=1;try{return e(t)}finally{be=n,be===0&&(Tl=pt()+500,ld&&Ko())}}function vi(e){wo!==null&&wo.tag===0&&!(be&6)&&ml();var t=be;be|=1;var n=Wn.transition,r=Me;try{if(Wn.transition=null,Me=1,e)return e()}finally{Me=r,Wn.transition=n,be=t,!(be&6)&&Ko()}}function Pg(){wn=ll.current,Xe(ll)}function ai(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Lk(n)),mt!==null)for(n=mt.return;n!==null;){var r=n;switch(dg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&dc();break;case 3:kl(),Xe(pn),Xe(Gt),wg();break;case 5:xg(r);break;case 4:kl();break;case 13:Xe(tt);break;case 19:Xe(tt);break;case 10:gg(r.type._context);break;case 22:case 23:Pg()}n=n.return}if(Pt=e,mt=e=Ro(e.current,null),It=wn=t,St=0,va=null,Tg=cd=mi=0,fn=js=null,oi!==null){for(t=0;t<oi.length;t++)if(n=oi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=o,r.next=l}n.pending=r}oi=null}return e}function vw(e,t){do{var n=mt;try{if(pg(),Wu.current=wc,xc){for(var r=rt.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}xc=!1}if(gi=0,kt=wt=rt=null,Ds=!1,pa=0,bg.current=null,n===null||n.return===null){St=1,va=t,mt=null;break}e:{var i=e,l=n.return,s=n,a=t;if(t=It,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Gv(l);if(h!==null){h.flags&=-257,Yv(h,l,s,i,t),h.mode&1&&Kv(i,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(a),t.updateQueue=g}else m.add(a);break e}else{if(!(t&1)){Kv(i,u,t),Og();break e}a=Error(U(426))}}else if(Qe&&s.mode&1){var _=Gv(l);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Yv(_,l,s,i,t),fg(bl(a,s));break e}}i=a=bl(a,s),St!==4&&(St=2),js===null?js=[i]:js.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=ew(i,a,t);zv(i,v);break e;case 1:s=a;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(To===null||!To.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=tw(i,s,t);zv(i,S);break e}}i=i.return}while(i!==null)}ww(n)}catch(k){t=k,mt===n&&n!==null&&(mt=n=n.return);continue}break}while(!0)}function yw(){var e=_c.current;return _c.current=wc,e===null?wc:e}function Og(){(St===0||St===3||St===2)&&(St=4),Pt===null||!(mi&268435455)&&!(cd&268435455)||vo(Pt,It)}function Cc(e,t){var n=be;be|=2;var r=yw();(Pt!==e||It!==t)&&(Dr=null,ai(e,t));do try{lb();break}catch(o){vw(e,o)}while(!0);if(pg(),be=n,_c.current=r,mt!==null)throw Error(U(261));return Pt=null,It=0,St}function lb(){for(;mt!==null;)xw(mt)}function sb(){for(;mt!==null&&!O$();)xw(mt)}function xw(e){var t=Sw(e.alternate,e,wn);e.memoizedProps=e.pendingProps,t===null?ww(e):mt=t,bg.current=null}function ww(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=eb(n,t),n!==null){n.flags&=32767,mt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{St=6,mt=null;return}}else if(n=qk(n,t,wn),n!==null){mt=n;return}if(t=t.sibling,t!==null){mt=t;return}mt=t=e}while(t!==null);St===0&&(St=5)}function ei(e,t,n){var r=Me,o=Wn.transition;try{Wn.transition=null,Me=1,ab(e,t,n,r)}finally{Wn.transition=o,Me=r}return null}function ab(e,t,n,r){do ml();while(wo!==null);if(be&6)throw Error(U(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(W$(e,i),e===Pt&&(mt=Pt=null,It=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||mu||(mu=!0,Ew(ic,function(){return ml(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Wn.transition,Wn.transition=null;var l=Me;Me=1;var s=be;be|=4,bg.current=null,nb(e,n),pw(n,e),Tk(gh),sc=!!ph,gh=ph=null,e.current=n,rb(n),A$(),be=s,Me=l,Wn.transition=i}else e.current=n;if(mu&&(mu=!1,wo=e,Ec=o),i=e.pendingLanes,i===0&&(To=null),D$(n.stateNode),mn(e,pt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Sc)throw Sc=!1,e=Lh,Lh=null,e;return Ec&1&&e.tag!==0&&ml(),i=e.pendingLanes,i&1?e===Dh?zs++:(zs=0,Dh=e):zs=0,Ko(),null}function ml(){if(wo!==null){var e=q1(Ec),t=Wn.transition,n=Me;try{if(Wn.transition=null,Me=16>e?16:e,wo===null)var r=!1;else{if(e=wo,wo=null,Ec=0,be&6)throw Error(U(331));var o=be;for(be|=4,q=e.current;q!==null;){var i=q,l=i.child;if(q.flags&16){var s=i.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(q=u;q!==null;){var c=q;switch(c.tag){case 0:case 11:case 15:Is(8,c,i)}var d=c.child;if(d!==null)d.return=c,q=d;else for(;q!==null;){c=q;var f=c.sibling,h=c.return;if(dw(c),c===u){q=null;break}if(f!==null){f.return=h,q=f;break}q=h}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}q=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,q=l;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Is(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,q=v;break e}q=i.return}}var y=e.current;for(q=y;q!==null;){l=q;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,q=x;else e:for(l=y;q!==null;){if(s=q,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ud(9,s)}}catch(k){st(s,s.return,k)}if(s===l){q=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,q=S;break e}q=s.return}}if(be=o,Ko(),Sr&&typeof Sr.onPostCommitFiberRoot=="function")try{Sr.onPostCommitFiberRoot(td,e)}catch{}r=!0}return r}finally{Me=n,Wn.transition=t}}return!1}function sy(e,t,n){t=bl(n,t),t=ew(e,t,1),e=bo(e,t,1),t=ln(),e!==null&&(Ia(e,1,t),mn(e,t))}function st(e,t,n){if(e.tag===3)sy(e,e,n);else for(;t!==null;){if(t.tag===3){sy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(To===null||!To.has(r))){e=bl(n,e),e=tw(t,e,1),t=bo(t,e,1),e=ln(),t!==null&&(Ia(t,1,e),mn(t,e));break}}t=t.return}}function ub(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ln(),e.pingedLanes|=e.suspendedLanes&n,Pt===e&&(It&n)===n&&(St===4||St===3&&(It&130023424)===It&&500>pt()-Ng?ai(e,0):Tg|=n),mn(e,t)}function _w(e,t){t===0&&(e.mode&1?(t=lu,lu<<=1,!(lu&130023424)&&(lu=4194304)):t=1);var n=ln();e=Gr(e,t),e!==null&&(Ia(e,t,n),mn(e,n))}function cb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_w(e,n)}function db(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),_w(e,n)}var Sw;Sw=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pn.current)hn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return hn=!1,Zk(e,t,n);hn=!!(e.flags&131072)}else hn=!1,Qe&&t.flags&1048576&&$x(t,pc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hu(e,t),e=t.pendingProps;var o=El(t,Gt.current);gl(t,n),o=Sg(null,t,r,e,o,n);var i=Eg();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gn(r)?(i=!0,fc(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,vg(t),o.updater=sd,t.stateNode=o,o._reactInternals=t,Ch(t,r,e,n),t=bh(null,t,r,!0,i,n)):(t.tag=0,Qe&&i&&cg(t),Jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hu(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hb(r),e=qn(r,e),o){case 0:t=kh(null,t,r,e,n);break e;case 1:t=Jv(null,t,r,e,n);break e;case 11:t=Xv(null,t,r,e,n);break e;case 14:t=Qv(null,t,r,qn(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qn(r,o),kh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qn(r,o),Jv(e,t,r,o,n);case 3:e:{if(iw(t),e===null)throw Error(U(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Nx(e,t),vc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=bl(Error(U(423)),t),t=Zv(e,t,r,n,o);break e}else if(r!==o){o=bl(Error(U(424)),t),t=Zv(e,t,r,n,o);break e}else for(En=ko(t.stateNode.containerInfo.firstChild),Cn=t,Qe=!0,nr=null,n=Ax(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cl(),r===o){t=Yr(e,t,n);break e}Jt(e,t,r,n)}t=t.child}return t;case 5:return Mx(t),e===null&&_h(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,mh(r,o)?l=null:i!==null&&mh(r,i)&&(t.flags|=32),ow(e,t),Jt(e,t,l,n),t.child;case 6:return e===null&&_h(t),null;case 13:return lw(e,t,n);case 4:return yg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$l(t,null,r,n):Jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qn(r,o),Xv(e,t,r,o,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Be(gc,r._currentValue),r._currentValue=l,i!==null)if(sr(i.value,l)){if(i.children===o.children&&!pn.current){t=Yr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Hr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Sh(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Sh(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,gl(t,n),o=Un(o),r=r(o),t.flags|=1,Jt(e,t,r,n),t.child;case 14:return r=t.type,o=qn(r,t.pendingProps),o=qn(r.type,o),Qv(e,t,r,o,n);case 15:return nw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qn(r,o),Hu(e,t),t.tag=1,gn(r)?(e=!0,fc(t)):e=!1,gl(t,n),Px(t,r,o),Ch(t,r,o,n),bh(null,t,r,!0,e,n);case 19:return sw(e,t,n);case 22:return rw(e,t,n)}throw Error(U(156,t.tag))};function Ew(e,t){return X1(e,t)}function fb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fn(e,t,n,r){return new fb(e,t,n,r)}function Ag(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hb(e){if(typeof e=="function")return Ag(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zp)return 11;if(e===qp)return 14}return 2}function Ro(e,t){var n=e.alternate;return n===null?(n=Fn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gu(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Ag(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Qi:return ui(n.children,o,i,t);case Jp:l=8,o|=8;break;case Yf:return e=Fn(12,n,t,o|2),e.elementType=Yf,e.lanes=i,e;case Xf:return e=Fn(13,n,t,o),e.elementType=Xf,e.lanes=i,e;case Qf:return e=Fn(19,n,t,o),e.elementType=Qf,e.lanes=i,e;case O1:return dd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R1:l=10;break e;case P1:l=9;break e;case Zp:l=11;break e;case qp:l=14;break e;case ho:l=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Fn(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ui(e,t,n,r){return e=Fn(7,e,r,t),e.lanes=n,e}function dd(e,t,n,r){return e=Fn(22,e,r,t),e.elementType=O1,e.lanes=n,e.stateNode={isHidden:!1},e}function Ef(e,t,n){return e=Fn(6,e,null,t),e.lanes=n,e}function Cf(e,t,n){return t=Fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pb(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rf(0),this.expirationTimes=rf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rf(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Mg(e,t,n,r,o,i,l,s,a){return e=new pb(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Fn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vg(i),e}function gb(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cw(e){if(!e)return Lo;e=e._reactInternals;e:{if($i(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var n=e.type;if(gn(n))return Ex(e,n,t)}return t}function $w(e,t,n,r,o,i,l,s,a){return e=Mg(n,r,!0,e,o,i,l,s,a),e.context=Cw(null),n=e.current,r=ln(),o=No(n),i=Hr(r,o),i.callback=t??null,bo(n,i,o),e.current.lanes=o,Ia(e,o,r),mn(e,r),e}function fd(e,t,n,r){var o=t.current,i=ln(),l=No(o);return n=Cw(n),t.context===null?t.context=n:t.pendingContext=n,t=Hr(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bo(o,t,l),e!==null&&(lr(e,o,l,i),Bu(e,o,l)),l}function $c(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ay(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Lg(e,t){ay(e,t),(e=e.alternate)&&ay(e,t)}function mb(){return null}var kw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Dg(e){this._internalRoot=e}hd.prototype.render=Dg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));fd(e,t,null,null)};hd.prototype.unmount=Dg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;vi(function(){fd(null,e,null,null)}),t[Kr]=null}};function hd(e){this._internalRoot=e}hd.prototype.unstable_scheduleHydration=function(e){if(e){var t=nx();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mo.length&&t!==0&&t<mo[n].priority;n++);mo.splice(n,0,e),n===0&&ox(e)}};function Ig(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function uy(){}function vb(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=$c(l);i.call(u)}}var l=$w(t,r,e,0,null,!1,!1,"",uy);return e._reactRootContainer=l,e[Kr]=l.current,ua(e.nodeType===8?e.parentNode:e),vi(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=$c(a);s.call(u)}}var a=Mg(e,0,!1,null,null,!1,!1,"",uy);return e._reactRootContainer=a,e[Kr]=a.current,ua(e.nodeType===8?e.parentNode:e),vi(function(){fd(t,a,n,r)}),a}function gd(e,t,n,r,o){var i=n._reactRootContainer;if(i){var l=i;if(typeof o=="function"){var s=o;o=function(){var a=$c(l);s.call(a)}}fd(t,l,e,o)}else l=vb(n,t,e,o,r);return $c(l)}ex=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=$s(t.pendingLanes);n!==0&&(ng(t,n|1),mn(t,pt()),!(be&6)&&(Tl=pt()+500,Ko()))}break;case 13:vi(function(){var r=Gr(e,1);if(r!==null){var o=ln();lr(r,e,1,o)}}),Lg(e,1)}};rg=function(e){if(e.tag===13){var t=Gr(e,134217728);if(t!==null){var n=ln();lr(t,e,134217728,n)}Lg(e,134217728)}};tx=function(e){if(e.tag===13){var t=No(e),n=Gr(e,t);if(n!==null){var r=ln();lr(n,e,t,r)}Lg(e,t)}};nx=function(){return Me};rx=function(e,t){var n=Me;try{return Me=e,t()}finally{Me=n}};lh=function(e,t,n){switch(t){case"input":if(qf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=id(r);if(!o)throw Error(U(90));M1(r),qf(r,o)}}}break;case"textarea":D1(e,n);break;case"select":t=n.value,t!=null&&dl(e,!!n.multiple,t,!1)}};U1=Rg;H1=vi;var yb={usingClientEntryPoint:!1,Events:[za,el,id,B1,W1,Rg]},hs={findFiberByHostInstance:ri,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},xb={bundleType:hs.bundleType,version:hs.version,rendererPackageName:hs.rendererPackageName,rendererConfig:hs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=G1(e),e===null?null:e.stateNode},findFiberByHostInstance:hs.findFiberByHostInstance||mb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{td=vu.inject(xb),Sr=vu}catch{}}Pn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yb;Pn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ig(t))throw Error(U(200));return gb(e,t,null,n)};Pn.createRoot=function(e,t){if(!Ig(e))throw Error(U(299));var n=!1,r="",o=kw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Mg(e,1,!1,null,null,n,!1,r,o),e[Kr]=t.current,ua(e.nodeType===8?e.parentNode:e),new Dg(t)};Pn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=G1(t),e=e===null?null:e.stateNode,e};Pn.flushSync=function(e){return vi(e)};Pn.hydrate=function(e,t,n){if(!pd(t))throw Error(U(200));return gd(null,e,t,!0,n)};Pn.hydrateRoot=function(e,t,n){if(!Ig(e))throw Error(U(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",l=kw;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=$w(t,null,e,1,n??null,o,!1,i,l),e[Kr]=t.current,ua(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new hd(t)};Pn.render=function(e,t,n){if(!pd(t))throw Error(U(200));return gd(null,e,t,!1,n)};Pn.unmountComponentAtNode=function(e){if(!pd(e))throw Error(U(40));return e._reactRootContainer?(vi(function(){gd(null,null,e,!1,function(){e._reactRootContainer=null,e[Kr]=null})}),!0):!1};Pn.unstable_batchedUpdates=Rg;Pn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!pd(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return gd(e,t,n,!1,r)};Pn.version="18.2.0-next-9e3b772b8-20220608";function bw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bw)}catch(e){console.error(e)}}bw(),$1.exports=Pn;var Nr=$1.exports;const Tw=La(Nr),wb=g1({__proto__:null,default:Tw},[Nr]);var cy=Nr;Kf.createRoot=cy.createRoot,Kf.hydrateRoot=cy.hydrateRoot;var Nw={exports:{}},md={};/**
33
+ * @license React
34
+ * react-jsx-runtime.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */var _b=p,Sb=Symbol.for("react.element"),Eb=Symbol.for("react.fragment"),Cb=Object.prototype.hasOwnProperty,$b=_b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kb={key:!0,ref:!0,__self:!0,__source:!0};function Rw(e,t,n){var r,o={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Cb.call(t,r)&&!kb.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Sb,type:e,key:i,ref:l,props:o,_owner:$b.current}}md.Fragment=Eb;md.jsx=Rw;md.jsxs=Rw;Nw.exports=md;var w=Nw.exports;function zh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jg(e,t){if(e){if(typeof e=="string")return zh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zh(e,t)}}function zg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=jg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function Pw(e){return e.length>0}var Ba=Object.freeze({kind:"ok",value:void 0});function Wa(e){return e===void 0?Ba:{kind:"ok",value:e}}function Cr(e){return{kind:"err",error:e}}function Bl(e){return e===Ba||e.kind==="ok"}function Fg(e){return e!==Ba&&e.kind==="err"}function Ow(e){var t=[],n=[],r=zg(e),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;Bl(i)?t.push(i.value):n.push(i.error)}}catch(l){r.e(l)}finally{r.f()}return Pw(n)?Cr(n):Wa(t)}function bb(e){return Ow(e)}function Tb(e){var t=[],n=zg(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;Fg(o)&&t.push(o.error)}}catch(i){n.e(i)}finally{n.f()}return Pw(t)?Cr(t):Ba}function Nb(e,t){return function(n){for(var r=Wa(t),o=0;o<n.length&&Bl(r);++o)r=e(r.value,n[o],o);return r}}function Rb(e){return function(t){return Bl(t)?Wa(e(t.value)):t}}function Pb(e){return function(t){return Bl(t)?e(t.value):t}}function Ob(e){return function(t){return Fg(t)?Cr(e(t.error)):t}}function Ab(e,t){return function(n){return e(n)?Wa(n):Cr(t(n))}}var Mb=function(t,n){return function(r){return Bl(r)?t(r.value)?r:Cr(n(r.value)):r}},Fs=Object.freeze({__proto__:null,voidOk:Ba,ok:Wa,err:Cr,isOk:Bl,isErr:Fg,allT:Ow,all:bb,allV:Tb,flatMapReduce:Nb,map:Rb,flatMap:Pb,mapErr:Ob,fromPredicate:Ab,filterOrElse:Mb});function Lb(e){if(Array.isArray(e))return zh(e)}function Db(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ib(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jb(e){return Lb(e)||Db(e)||jg(e)||Ib()}function me(e){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(e)}function zb(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aw(e){var t=zb(e,"string");return typeof t=="symbol"?t:String(t)}function Ae(e,t,n){return t=Aw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dy(Object(n),!0).forEach(function(r){Ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fb(e){if(Array.isArray(e))return e}function Bb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function Wb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Po(e,t){return Fb(e)||Bb(e,t)||jg(e,t)||Wb()}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Aw(r.key),r)}}function cr(e,t,n){return t&&fy(e.prototype,t),n&&fy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fh(e,t){return Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Fh(e,t)}function ki(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fh(e,t)}function kc(e){return kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kc(e)}function Ub(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hb(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mw(e)}function bi(e){var t=Ub();return function(){var r=kc(e),o;if(t){var i=kc(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Hb(this,o)}}var Ti=function(){function e(){ur(this,e)}return cr(e,[{key:"appendValidationError",value:function(n,r,o,i){return n?(n[r]?n[r].push({message:o,value:i}):n[r]=[{message:o,value:i}],n):Ae({},r,[{message:o,value:i}])}}]),e}(),Yu=Symbol("GetSchema"),nn=Symbol("Path"),_t=Symbol("GetSource");function Vb(e){return e[Yu]}var Bg=cr(function e(t){ur(this,e),this.span=t}),Kb=function(e){ki(n,e);var t=bi(n);function n(r,o){var i;return ur(this,n),i=t.call(this,o),Ae(Mw(i),"type","Sym"),i.value=r,i}return cr(n,[{key:"transpile",value:function(){return this.value}}]),n}(Bg);new Kb("()");var Kt="_type",vn="_ref",Gb=function(e){ki(n,e);var t=bi(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ur(this,n),o=t.call(this),o.options=r,o.opt=i,o}return cr(n,[{key:"validate",value:function(o,i){return this.opt&&i==null?!1:i==null?Ae({},o,[{message:"Non-optional image was null or undefined.",value:i}]):typeof i[vn]!="string"?Ae({},o,[{message:"Image did not have a file reference string. Got: ".concat(me(i[vn])),value:i}]):i[Kt]!=="file"?Ae({},o,[{message:"Image did not have the valid file extension type. Got: ".concat(i[Kt]),value:i}]):i.metadata?Ae({},o,[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and sha256 (string of length 64 of the base16 hash).",value:i,fixes:["image:replace-metadata"]}]):Ae({},o,[{message:"Could not validate Image metadata.",value:i,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(o){return this.opt&&o==null?!0:(o==null?void 0:o[vn])==="image"&&(o==null?void 0:o[Kt])==="file"}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"image",options:this.options,opt:this.opt}}}]),n}(Ti),Lw=function(t){var n;if(!t[vn].startsWith("/public")){var r;return{url:t[vn]+"?sha256=".concat((r=t.metadata)===null||r===void 0?void 0:r.sha256),metadata:t.metadata}}return{url:t[vn].slice(7)+"?sha256=".concat((n=t.metadata)===null||n===void 0?void 0:n.sha256),metadata:t.metadata}};function Dw(e){return me(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function Yb(e){return me(e)==="object"&&e!==null&&e!==void 0&&nn in e&&"val"in e}function Xb(e){return e[nn]}function Qb(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function hy(e,t,n){return t?Ct(e(Ct(t,n))):Ct(t,n)}function Oo(e){return me(e)==="object"&&e!==null&&(_t in e||nn in e)}function Ct(e,t,n){if(me(e)==="object"){if(Oo(e))return e;if(Dw(e))return Ct(e.val,e.valPath)}if(e&&e[vn]&&e[Kt]==="file"){var r=e[vn];if(typeof r!="string")throw Error("Invalid file ref: "+r);return Ct(Lw(e),t,n)}switch(me(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(me(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(i,l){return l===_t||l===nn||l==="andThen"||l===Yu?!0:l in i},get:function(i,l){if(l===_t)return e;if(l===nn)return t;if(l===Yu)return n;if(l==="andThen")return function(a){return hy(a,e,t)};if(Array.isArray(i)){if(l==="filter")return function(a){var u=i.map(function(c,d){return Ct(c,rr(t,d),n==null?void 0:n.item)}).filter(function(c){return a&&a instanceof Ti?a.assert(py(c)):py(a(c))});return Ct(u,t,n)};if(l==="map")return function(a){var u=i.map(function(c,d){var f=a(Ct(c,rr(t,d),n==null?void 0:n.item),Ct(d));return Oo(f)?f:Ct(f)});return Ct(u,t,n)}}if(Array.isArray(i)&&l==="length")return Ct(i.length);var s=Reflect.get(i,l);return Qb(e,l)?Number.isNaN(Number(l))?Ct(s,rr(t,l),n==null?void 0:n.items[l]):Ct(s,rr(t,Number(l)),n==null?void 0:n.item):s}});default:return Ae(Ae(Ae({eq:function(i){var l=i;if(Oo(i)&&(l=i[_t],l instanceof Bg))throw Error("TODO: Cannot evaluate equality with an Expr");return Ct(e===l,void 0)},andThen:function(i){return hy(i,e===void 0?null:e,t)}},_t,e===void 0?null:e),nn,t),Yu,n)}}function rr(e,t){if(me(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));return e&&"".concat(e,".").concat(JSON.stringify(t))}function py(e){if(me(e)==="object"&&(_t in e||nn in e)){var t=e[_t];return t}return e}var Jb=function(e){ki(n,e);var t=bi(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ur(this,n),o=t.call(this),o.items=r,o.opt=i,o}return cr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"?Ae({},o,[{message:"Expected 'object', got '".concat(me(i),"'")}]):Array.isArray(i)?Ae({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=Po(a,2),c=u[0],d=u[1],f=rr(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(c),i);else{var h=d.validate(f,i[c]);h&&s?s=Nl(Nl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(this.items);i<l.length;i++){var s=Po(l[i],2),a=s[0],u=s[1];if(!u.assert(o[a]))return!1}return me(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.items,!0)}},{key:"serialize",value:function(){return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=Po(o,2),l=i[0],s=i[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(Ti),Zb=function(e){ki(n,e);var t=bi(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ur(this,n),o=t.call(this),o.item=r,o.opt=i,o}return cr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"||!Array.isArray(i)?Ae({},o,[{message:"Expected 'array', got '".concat(me(i),"'")}]):(i.forEach(function(a,u){var c=rr(o,u);if(!c)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at index ").concat(u),i);else{var d=l.item.validate(c,a);d&&s?s=Nl(Nl({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;var i=zg(o),l;try{for(i.s();!(l=i.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){i.e(a)}finally{i.f()}return me(o)==="object"&&Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"array",item:this.item.serialize(),opt:this.opt}}}]),n}(Ti),qb=function(e){ki(n,e);var t=bi(n);function n(r,o){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return ur(this,n),i=t.call(this),i.key=r,i.items=o,i.opt=l,i}return cr(n,[{key:"validate",value:function(o,i){return!1}},{key:"assert",value:function(o){return!0}},{key:"optional",value:function(){return new n(this.key,this.items,!0)}},{key:"serialize",value:function(){return typeof this.key=="string"?{type:"union",key:this.key,items:this.items.map(function(o){return o.serialize()}),opt:this.opt}:{type:"union",items:this.items.map(function(o){return o.serialize()}),opt:this.opt}}}]),n}(Ti),eT=function(e){ki(n,e);var t=bi(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ur(this,n),o=t.call(this),o.options=r,o.opt=i,o}return cr(n,[{key:"validate",value:function(o,i){return!1}},{key:"assert",value:function(o){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(Ti),tT=function(e){ki(n,e);var t=bi(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ur(this,n),o=t.call(this),o.item=r,o.opt=i,o}return cr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:me(i)!=="object"?Ae({},o,[{message:"Expected 'object', got '".concat(me(i),"'")}]):Array.isArray(i)?Ae({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(i).forEach(function(a){var u=Po(a,2),c=u[0],d=u[1],f=rr(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(d),i);else{var h=l.item.validate(f,d);h&&s?s=Nl(Nl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(o);i<l.length;i++){var s=Po(l[i],2),a=s[1];if(!this.item.assert(a))return!1}return me(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"record",item:this.item.serialize(),opt:this.opt}}}]),n}(Ti);function nT(e){var t=e[_t];if(t instanceof Bg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function rT(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function oT(e){return e instanceof Jb||me(e)==="object"&&"type"in e&&e.type==="object"}function iT(e){return e instanceof tT||me(e)==="object"&&"type"in e&&e.type==="record"}function lT(e){return e instanceof Zb||me(e)==="object"&&"type"in e&&e.type==="array"}function sT(e){return e instanceof qb||me(e)==="object"&&"type"in e&&e.type==="union"}function aT(e){return e instanceof eT||me(e)==="object"&&"type"in e&&e.type==="richtext"}function uT(e){return e instanceof Gb||me(e)==="object"&&"type"in e&&e.type==="image"}function cT(e,t,n){for(var r=dT(e),o=jb(r),i=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(lT(i)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(me(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(me(l)));if(!l[c]){var d;throw Error("Invalid path: array source (length: ".concat((d=l)===null||d===void 0?void 0:d.length,") did not have index ").concat(c," from path: ").concat(e))}l=l[c],i=i.item}else if(iT(i)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(c," as string"));if(me(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(me(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.item}else if(oT(i)){if(me(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(me(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.items[c]}else{if(uT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:i,source:l}};if(sT(i)){var f=i.key;if(!f)return{v:{path:o.map(function(g){return Number.isNaN(Number(g))?JSON.stringify(g):g}).join("."),schema:i,source:l}};var h=l[f];if(!h)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(f," in path: ").concat(e));var m=i.items.find(function(g){var _;return(g==null||(_=g.items)===null||_===void 0||(_=_[f])===null||_===void 0?void 0:_.value)===h});if(!m)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));i=m.items[c],l=l[c]}else{if(aT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:i,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(i)))}}},a;r.length>0;)if(a=s(),a)return a.v;if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:o.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:i,source:l}}function dT(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function fT(e){return Iw(gT(e))}function hT(e){return Oo(e)?me(e[_t])==="object"&&e[_t]!==null&&Array.isArray(e[_t]):Array.isArray(e)}function pT(e){return Oo(e)?me(e[_t])==="object"&&e[_t]!==null&&!Array.isArray(e[_t]):me(e)==="object"}function gT(e){var t=Ct(e);function n(r){var o=hT(r),i=pT(r);if(o){var l=_t in r?r[_t]:r,s=nn in r?r[nn]:void 0;return{val:l.map(function(c,d){return n(Oo(c)?c:Ct(c,rr(s,d)))}),valPath:s}}else if(i){var a=_t in r?r[_t]:r,u=nn in r?r[nn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=Po(c,2),f=d[0],h=d[1];return[f,n(Oo(h)?h:Ct(h,rr(u,f)))]})),valPath:u}}else return Oo(r)?{val:n(r[_t]),valPath:r[nn]}:r}return n(t)}function Bh(e){var t=Dw(e)?e.val:e;switch(me(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(me(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Bh):Object.fromEntries(Object.entries(t).map(function(n){var r=Po(n,2),o=r[0],i=r[1];return[o,i&&Bh(i)]}));default:return t}}function Iw(e){var t=e.val;switch(me(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(me(t)));case"object":if(t!==null)return new Proxy(t,{has:function(r,o){return o==="val"||o===nn?!0:gy(r,o)},get:function(r,o){if(o===nn)return e.valPath;if(o==="val")return Bh(e);if(Array.isArray(r)&&o==="length")return r.length;if(gy(t,o)){var i,l;return Iw({val:Reflect.get(r,o).val,valPath:(i=(l=Reflect.get(r,o))===null||l===void 0?void 0:l.valPath)!==null&&i!==void 0?i:rr(e.valPath,Array.isArray(r)?Number(o):o)})}return Reflect.get(r,o)}});default:return Ae(Ae({},nn,e.valPath),"val",e.val)}}function gy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var mT=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Le=function(e){return e[e.inputBytes=64]="inputBytes",e[e.inputWords=16]="inputWords",e[e.highIndex=14]="highIndex",e[e.lowIndex=15]="lowIndex",e[e.workWords=64]="workWords",e[e.allocBytes=80]="allocBytes",e[e.allocWords=20]="allocWords",e[e.allocTotal=8e3]="allocTotal",e}(Le||{}),my={sha256:1};function vT(e){if(e&&!my[e]&&!my[e.toLowerCase()])throw new Error("Digest method not supported");return new yT}var yT=function(){function e(){ur(this,e),Ae(this,"A",1779033703),Ae(this,"B",-1150833019),Ae(this,"C",1013904242),Ae(this,"D",-1521486534),Ae(this,"E",1359893119),Ae(this,"F",-1694144372),Ae(this,"G",528734635),Ae(this,"H",1541459225),Ae(this,"_size",0),Ae(this,"_sp",0),(!yu||ps>=Le.allocTotal)&&(yu=new ArrayBuffer(Le.allocTotal),ps=0),this._byte=new Uint8Array(yu,ps,Le.allocBytes),this._word=new Int32Array(yu,ps,Le.allocWords),ps+=Le.allocBytes}return cr(e,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+me(n));var r=n.byteOffset,o=n.byteLength,i=o/Le.inputBytes|0,l=0;if(i&&!(r&3)&&!(this._size%Le.inputBytes)){for(var s=new Int32Array(n.buffer,r,i*Le.inputWords);i--;)this._int32(s,l>>2),l+=Le.inputBytes;this._size+=l}var a=n.BYTES_PER_ELEMENT;if(a!==1&&n.buffer){var u=new Uint8Array(n.buffer,r+l,o-l);return this._uint8(u)}return l===o?this:this._uint8(n,l)}},{key:"_uint8",value:function(n,r){var o=this._byte,i=this._word,l=n.length;for(r=r|0;r<l;){for(var s=this._size%Le.inputBytes,a=s;r<l&&a<Le.inputBytes;)o[a++]=n[r++];a>=Le.inputBytes&&this._int32(i),this._size+=a-s}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,o=this._word,i=n.length,l=this._sp,s=0;s<i;){for(var a=this._size%Le.inputBytes,u=a;s<i&&u<Le.inputBytes;){var c=n.charCodeAt(s++)|0;c<128?r[u++]=c:c<2048?(r[u++]=192|c>>>6,r[u++]=128|c&63):c<55296||c>57343?(r[u++]=224|c>>>12,r[u++]=128|c>>>6&63,r[u++]=128|c&63):l?(c=((l&1023)<<10)+(c&1023)+65536,r[u++]=240|c>>>18,r[u++]=128|c>>>12&63,r[u++]=128|c>>>6&63,r[u++]=128|c&63,l=0):l=c}u>=Le.inputBytes&&(this._int32(o),o[0]=o[Le.inputWords]),this._size+=u-a}return this._sp=l,this}},{key:"_int32",value:function(n,r){var o=this.A,i=this.B,l=this.C,s=this.D,a=this.E,u=this.F,c=this.G,d=this.H,f=0;for(r=r|0;f<Le.inputWords;)Jo[f++]=Qn(n[r++]);for(f=Le.inputWords;f<Le.workWords;f++)Jo[f]=kT(Jo[f-2])+Jo[f-7]+$T(Jo[f-15])+Jo[f-16]|0;for(f=0;f<Le.workWords;f++){var h=d+CT(a)+_T(a,u,c)+mT[f]+Jo[f]|0,m=ET(o)+ST(o,i,l)|0;d=c,c=u,u=a,a=s+h|0,s=l,l=i,i=o,o=h+m|0}this.A=o+this.A|0,this.B=i+this.B|0,this.C=l+this.C|0,this.D=s+this.D|0,this.E=a+this.E|0,this.F=u+this.F|0,this.G=c+this.G|0,this.H=d+this.H|0}},{key:"digest",value:function(n){var r=this._byte,o=this._word,i=this._size%Le.inputBytes|0;for(r[i++]=128;i&3;)r[i++]=0;if(i>>=2,i>Le.highIndex){for(;i<Le.inputWords;)o[i++]=0;i=0,this._int32(o)}for(;i<Le.inputWords;)o[i++]=0;var l=this._size*8,s=(l&4294967295)>>>0,a=(l-s)/4294967296;return a&&(o[Le.highIndex]=Qn(a)),s&&(o[Le.lowIndex]=Qn(s)),this._int32(o),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,l=this.E,s=this.F,a=this.G,u=this.H;return lo(n)+lo(r)+lo(o)+lo(i)+lo(l)+lo(s)+lo(a)+lo(u)}},{key:"_bin",value:function(){var n=this.A,r=this.B,o=this.C,i=this.D,l=this.E,s=this.F,a=this.G,u=this.H,c=this._byte,d=this._word;return d[0]=Qn(n),d[1]=Qn(r),d[2]=Qn(o),d[3]=Qn(i),d[4]=Qn(l),d[5]=Qn(s),d[6]=Qn(a),d[7]=Qn(u),c.slice(0,32)}}]),e}(),Jo=new Int32Array(Le.workWords),yu,ps=0,lo=function(t){return(t+4294967296).toString(16).substr(-8)},xT=function(t){return t<<24&4278190080|t<<8&16711680|t>>8&65280|t>>24&255},wT=function(t){return t},Qn=bT()?wT:xT,_T=function(t,n,r){return r^t&(n^r)},ST=function(t,n,r){return t&n|r&(t|n)},ET=function(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)},CT=function(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)},$T=function(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3},kT=function(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10};function bT(){var e=new Uint8Array(new Uint16Array([65279]).buffer);return e[0]===254}var TT=function(t){return vT().update(t).digest("hex")};function ya(){ya=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,O){return $[E]=O}}function c(C,$,E,O){var R=$&&$.prototype instanceof v?$:v,F=Object.create(R.prototype),H=new V(O||[]);return o(F,"_invoke",{value:M(C,E,H)}),F}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",_={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var k=Object.getPrototypeOf,T=k&&k(k(Y([])));T&&T!==n&&r.call(T,l)&&(S=T);var b=x.prototype=v.prototype=Object.create(S);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,F,H,ae){var oe=d(C[R],C,F);if(oe.type!=="throw"){var $e=oe.arg,_e=$e.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?$.resolve(_e.__await).then(function(Q){E("next",Q,H,ae)},function(Q){E("throw",Q,H,ae)}):$.resolve(_e).then(function(Q){$e.value=Q,H($e)},function(Q){return E("throw",Q,H,ae)})}ae(oe.arg)}var O;o(this,"_invoke",{value:function(R,F){function H(){return new $(function(ae,oe){E(R,F,ae,oe)})}return O=O?O.then(H,H):H()}})}function M(C,$,E){var O=f;return function(R,F){if(O===m)throw new Error("Generator is already running");if(O===g){if(R==="throw")throw F;return{value:e,done:!0}}for(E.method=R,E.arg=F;;){var H=E.delegate;if(H){var ae=j(H,E);if(ae){if(ae===_)continue;return ae}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(O===f)throw O=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);O=m;var oe=d(C,$,E);if(oe.type==="normal"){if(O=E.done?g:h,oe.arg===_)continue;return{value:oe.arg,done:E.done}}oe.type==="throw"&&(O=g,E.method="throw",E.arg=oe.arg)}}}function j(C,$){var E=$.method,O=C.iterator[E];if(O===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),_;var R=d(O,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,_;var F=R.arg;return F?F.done?($[C.resultName]=F.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,_):F:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,_)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function re(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function V(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Y(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,O=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return O.next=O}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(b,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(b),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,O,R){R===void 0&&(R=Promise);var F=new D(c(C,$,E,O),R);return t.isGeneratorFunction($)?F:F.next().then(function(H){return H.done?H.value:F.next()})},N(b),u(b,a,"Generator"),u(b,l,function(){return this}),u(b,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var O in $)E.push(O);return E.reverse(),function R(){for(;E.length;){var F=E.pop();if(F in $)return R.value=F,R.done=!1,R}return R.done=!0,R}},t.values=Y,V.prototype={constructor:V,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(re),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(oe,$e){return F.type="throw",F.arg=C,$.next=oe,$e&&($.method="next",$.arg=e),!!$e}for(var O=this.tryEntries.length-1;O>=0;--O){var R=this.tryEntries[O],F=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var H=r.call(R,"catchLoc"),ae=r.call(R,"finallyLoc");if(H&&ae){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(H){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ae)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var O=this.tryEntries[E];if(O.tryLoc<=this.prev&&r.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var R=O;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var F=R?R.completion:{};return F.type=C,F.arg=$,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(F)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),_},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),re(E),_}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var O=E.completion;if(O.type==="throw"){var R=O.arg;re(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:Y(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),_}},t}function vy(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function jw(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){vy(i,r,o,l,s,"next",a)}function s(a){vy(i,r,o,l,s,"throw",a)}l(void 0)})}}var NT=function(){function e(t){ur(this,e),this.host=t}return cr(e,[{key:"getDisableUrl",value:function(n){return"".concat(this.host,"/disable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getLoginUrl",value:function(n){return"".concat(this.host,"/authorize?redirect_to=").concat(encodeURIComponent(n))}},{key:"getEnableUrl",value:function(n){return"".concat(this.host,"/enable?redirect_to=").concat(encodeURIComponent(n))}},{key:"getPatches",value:function(){var t=jw(ya().mark(function r(o){var i,l,s;return ya().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.patchIds,l=o.headers,s=i?"?".concat(i.map(function(c){return"".concat(c,"=").concat(encodeURIComponent(c))}).join("&")):"",u.abrupt("return",fetch("".concat(this.host,"/patches/~").concat(s),{headers:l||{"Content-Type":"application/json"}}).then(function(c){return wu(c)}).catch(xu));case 3:case"end":return u.stop()}},r,this)}));function n(r){return t.apply(this,arguments)}return n}()},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"postPatches",value:function(n,r,o){return fetch("".concat(this.host,"/patches/~"),{headers:o||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(Ae({},n,r))}).then(function(i){return wu(i)}).catch(xu)}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return wu(n).catch(xu)})}},{key:"getTree",value:function(n){var r=n.patch,o=r===void 0?!1:r,i=n.includeSchema,l=i===void 0?!1:i,s=n.includeSource,a=s===void 0?!1:s,u=n.treePath,c=u===void 0?"/":u,d=n.headers,f=new URLSearchParams;return f.set("patch",o.toString()),f.set("schema",l.toString()),f.set("source",a.toString()),fetch("".concat(this.host,"/tree/~").concat(c,"?").concat(f.toString()),{headers:d}).then(function(h){return wu(h)}).catch(xu)}}]),e}();function xu(e){return Cr({statusCode:500,message:e instanceof Error?e.message:"Unknown error"})}function wu(e){return Wh.apply(this,arguments)}function Wh(){return Wh=jw(ya().mark(function e(t){var n;return ya().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!t.ok){o.next=9;break}return o.t0=Fs,o.next=5,t.json();case 5:return o.t1=o.sent,o.abrupt("return",o.t0.ok.call(o.t0,o.t1));case 9:return o.prev=9,o.next=12,t.json();case 12:return n=o.sent,o.abrupt("return",Cr({statusCode:t.status,message:n.message||t.statusText,details:n.details||Object.fromEntries(Object.entries(n).filter(function(i){var l=Po(i,1),s=l[0];return s!=="message"}))}));case 16:return o.prev=16,o.t2=o.catch(9),o.abrupt("return",Cr({statusCode:t.status,message:t.statusText}));case 19:o.next=24;break;case 21:return o.prev=21,o.t3=o.catch(0),o.abrupt("return",Cr({message:o.t3 instanceof Error?o.t3.message:"Unknown error"}));case 24:case"end":return o.stop()}},e,null,[[0,21],[9,16]])})),Wh.apply(this,arguments)}var $n={convertFileSource:Lw,getSchema:Vb,getValPath:Xb,getVal:fT,getSource:nT,resolvePath:cT,splitModuleIdAndModulePath:rT,isVal:Yb,createValPathOfItem:rr,getSHA256Hash:TT,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return n&&RT(n)}).join("/"))},VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"};function RT(e){try{return JSON.parse(e)}catch{return e}}var zw={exports:{}};/*!
44
+ Copyright (c) 2018 Jed Watson.
45
+ Licensed under the MIT License (MIT), see
46
+ http://jedwatson.github.io/classnames
47
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var l=typeof i;if(l==="string"||l==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var a in i)t.call(i,a)&&i[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(zw);var PT=zw.exports;const vd=La(PT);function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(this,arguments)}function OT(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Fw(...e){return t=>e.forEach(n=>OT(n,t))}function Ze(...e){return p.useCallback(Fw(...e),e)}const Rl=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(MT);if(i){const l=i.props.children,s=o.map(a=>a===i?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Uh,te({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Uh,te({},r,{ref:t}),n)});Rl.displayName="Slot";const Uh=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...LT(r,n.props),ref:t?Fw(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Uh.displayName="SlotClone";const AT=({children:e})=>p.createElement(p.Fragment,null,e);function MT(e){return p.isValidElement(e)&&e.type===AT}function LT(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const DT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ie=DT.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...l}=r,s=i?Rl:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,te({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IT(e,t){e&&Nr.flushSync(()=>e.dispatchEvent(t))}const Nn=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function jT(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Wl=e=>{const{present:t,children:n}=e,r=zT(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Ze(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Wl.displayName="Presence";function zT(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=jT(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=_u(r.current);i.current=s==="mounted"?u:"none"},[s]),Nn(()=>{const u=r.current,c=o.current;if(c!==e){const f=i.current,h=_u(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),Nn(()=>{if(t){const u=d=>{const h=_u(r.current).includes(d.animationName);d.target===t&&h&&Nr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=_u(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function _u(e){return(e==null?void 0:e.animationName)||"none"}function Ni(e,t=[]){let n=[];function r(i,l){const s=p.createContext(l),a=n.length;n=[...n,l];function u(d){const{scope:f,children:h,...m}=d,g=(f==null?void 0:f[e][a])||s,_=p.useMemo(()=>m,Object.values(m));return p.createElement(g.Provider,{value:_},h)}function c(d,f){const h=(f==null?void 0:f[e][a])||s,m=p.useContext(h);if(m)return m;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,FT(o,...t)]}function FT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Ht(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const BT=p.createContext(void 0);function Wg(e){const t=p.useContext(BT);return e||t||"ltr"}function Hh(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function WT(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Bw="ScrollArea",[Ww,cL]=Ni(Bw),[UT,Kn]=Ww(Bw),HT=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,m]=p.useState(null),[g,_]=p.useState(null),[v,y]=p.useState(0),[x,S]=p.useState(0),[k,T]=p.useState(!1),[b,N]=p.useState(!1),D=Ze(t,j=>a(j)),M=Wg(o);return p.createElement(UT,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:m,scrollbarXEnabled:k,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:_,scrollbarYEnabled:b,onScrollbarYEnabledChange:N,onCornerWidthChange:y,onCornerHeightChange:S},p.createElement(Ie.div,te({dir:M},l,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),VT="ScrollAreaViewport",KT=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Kn(VT,n),l=p.useRef(null),s=Ze(t,l,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Ie.div,te({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),qr="ScrollAreaScrollbar",Uw=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(qr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return p.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?p.createElement(GT,te({},r,{ref:t,forceMount:n})):o.type==="scroll"?p.createElement(YT,te({},r,{ref:t,forceMount:n})):o.type==="auto"?p.createElement(Hw,te({},r,{ref:t,forceMount:n})):o.type==="always"?p.createElement(Ug,te({},r,{ref:t})):null}),GT=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(qr,e.__scopeScrollArea),[i,l]=p.useState(!1);return p.useEffect(()=>{const s=o.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[o.scrollArea,o.scrollHideDelay]),p.createElement(Wl,{present:n||i},p.createElement(Hw,te({"data-state":i?"visible":"hidden"},r,{ref:t})))}),YT=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Kn(qr,e.__scopeScrollArea),i=e.orientation==="horizontal",l=xd(()=>a("SCROLL_END"),100),[s,a]=WT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,a]),p.useEffect(()=>{const u=o.viewport,c=i?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(a("SCROLL"),l()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,i,a,l]),p.createElement(Wl,{present:n||s!=="hidden"},p.createElement(Ug,te({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:Ge(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:Ge(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),Hw=p.forwardRef((e,t)=>{const n=Kn(qr,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,l]=p.useState(!1),s=e.orientation==="horizontal",a=xd(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return Pl(n.viewport,a),Pl(n.content,a),p.createElement(Wl,{present:r||i},p.createElement(Ug,te({"data-state":i?"visible":"hidden"},o,{ref:t})))}),Ug=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Kn(qr,e.__scopeScrollArea),i=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Yw(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return nN(f,l.current,s,h)}return n==="horizontal"?p.createElement(XT,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=yy(f,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}})):n==="vertical"?p.createElement(QT,te({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=yy(f,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}})):null}),XT=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Kn(qr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Ze(t,a,i.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Kw,te({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":yd(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),Qw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:bc(l.paddingLeft),paddingEnd:bc(l.paddingRight)}})}}))}),QT=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Kn(qr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Ze(t,a,i.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(Kw,te({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":yd(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),Qw(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:bc(l.paddingTop),paddingEnd:bc(l.paddingBottom)}})}}))}),[JT,Vw]=Ww(qr),Kw=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Kn(qr,n),[m,g]=p.useState(null),_=Ze(t,D=>g(D)),v=p.useRef(null),y=p.useRef(""),x=h.viewport,S=r.content-r.viewport,k=Ht(c),T=Ht(a),b=xd(d,10);function N(D){if(v.current){const M=D.clientX-v.current.left,j=D.clientY-v.current.top;u({x:M,y:j})}}return p.useEffect(()=>{const D=M=>{const j=M.target;(m==null?void 0:m.contains(j))&&k(M,S)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[x,m,S,k]),p.useEffect(T,[r,T]),Pl(m,b),Pl(h.content,b),p.createElement(JT,{scope:n,scrollbar:m,hasThumb:o,onThumbChange:Ht(i),onThumbPointerUp:Ht(l),onThumbPositionChange:T,onThumbPointerDown:Ht(s)},p.createElement(Ie.div,te({},f,{ref:_,style:{position:"absolute",...f.style},onPointerDown:Ge(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),N(D))}),onPointerMove:Ge(e.onPointerMove,N),onPointerUp:Ge(e.onPointerUp,D=>{const M=D.target;M.hasPointerCapture(D.pointerId)&&M.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Vh="ScrollAreaThumb",ZT=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vw(Vh,e.__scopeScrollArea);return p.createElement(Wl,{present:n||o.hasThumb},p.createElement(qT,te({ref:t},r)))}),qT=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Kn(Vh,n),l=Vw(Vh,n),{onThumbPositionChange:s}=l,a=Ze(t,d=>l.onThumbChange(d)),u=p.useRef(),c=xd(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(c(),!u.current){const h=rN(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,c,s]),p.createElement(Ie.div,te({"data-state":l.hasThumb?"visible":"hidden"},o,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ge(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),m=d.clientX-h.left,g=d.clientY-h.top;l.onThumbPointerDown({x:m,y:g})}),onPointerUp:Ge(e.onPointerUp,l.onThumbPointerUp)}))}),Gw="ScrollAreaCorner",eN=p.forwardRef((e,t)=>{const n=Kn(Gw,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(tN,te({},e,{ref:t})):null}),tN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Kn(Gw,n),[i,l]=p.useState(0),[s,a]=p.useState(0),u=!!(i&&s);return Pl(o.scrollbarX,()=>{var c;const d=((c=o.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;o.onCornerHeightChange(d),a(d)}),Pl(o.scrollbarY,()=>{var c;const d=((c=o.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;o.onCornerWidthChange(d),l(d)}),u?p.createElement(Ie.div,te({},r,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function bc(e){return e?parseInt(e,10):0}function Yw(e,t){const n=e/t;return isNaN(n)?0:n}function yd(e){const t=Yw(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function nN(e,t,n,r="ltr"){const o=yd(n),i=o/2,l=t||i,s=o-l,a=n.scrollbar.paddingStart+l,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return Xw([a,u],d)(e)}function yy(e,t,n="ltr"){const r=yd(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Hh(e,a);return Xw([0,l],[0,s])(u)}function Xw(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Qw(e,t){return e>0&&e<t}const rN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=n.left!==i.left,s=n.top!==i.top;(l||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function xd(e,t){const n=Ht(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Pl(e,t){const n=Ht(t);Nn(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const Jw=HT,oN=KT,iN=eN;function Zw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Zw(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qw(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Zw(e))&&(r&&(r+=" "),r+=t);return r}const Hg="-";function lN(e){const t=aN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(l){const s=l.split(Hg);return s[0]===""&&s.length!==1&&s.shift(),e_(s,t)||sN(l)}function i(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function e_(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?e_(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Hg);return(l=t.validators.find(({validator:s})=>s(i)))==null?void 0:l.classGroupId}const xy=/^\[(.+)\]$/;function sN(e){if(xy.test(e)){const t=xy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function aN(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return cN(Object.entries(e.classGroups),n).forEach(([i,l])=>{Kh(l,r,i,t)}),r}function Kh(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:wy(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(uN(o)){Kh(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Kh(l,wy(t,i),n,r)})})}function wy(e,t){let n=e;return t.split(Hg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function uN(e){return e.isThemeGetter}function cN(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function dN(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const t_="!";function fN(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let a=0,u=0,c;for(let g=0;g<l.length;g++){let _=l[g];if(a===0){if(_===r&&(n||l.slice(g,g+o)===t)){s.push(l.slice(u,g)),u=g+o;continue}if(_==="/"){c=g;continue}}_==="["?a++:_==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(t_),h=f?d.substring(1):d,m=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}}}function hN(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function pN(e){return{cache:dN(e.cacheSize),splitModifiers:fN(e),...lN(e)}}const gN=/\s+/;function mN(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(gN).map(l=>{const{modifiers:s,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:c}=n(l);let d=r(c?u.substring(0,c):u),f=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:l};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}const h=hN(s).join(":");return{isTailwindClass:!0,modifierId:a?h+t_:h,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:a,hasPostfixModifier:u}=l,c=s+a;return i.has(c)?!1:(i.add(c),o(a,u).forEach(d=>i.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function vN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=n_(t))&&(r&&(r+=" "),r+=n);return r}function n_(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=n_(e[r]))&&(n&&(n+=" "),n+=t);return n}function yN(e,...t){let n,r,o,i=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=pN(u),r=n.cache.get,o=n.cache.set,i=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=mN(a,n);return o(a,c),c}return function(){return i(vN.apply(null,arguments))}}function He(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const r_=/^\[(?:([a-z-]+):)?(.+)\]$/i,xN=/^\d+\/\d+$/,wN=new Set(["px","full","screen"]),_N=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,EN=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Jn(e){return li(e)||wN.has(e)||xN.test(e)}function so(e){return Ul(e,"length",ON)}function li(e){return!!e&&!Number.isNaN(Number(e))}function Su(e){return Ul(e,"number",li)}function gs(e){return!!e&&Number.isInteger(Number(e))}function $N(e){return e.endsWith("%")&&li(e.slice(0,-1))}function ge(e){return r_.test(e)}function ao(e){return _N.test(e)}const kN=new Set(["length","size","percentage"]);function bN(e){return Ul(e,kN,o_)}function TN(e){return Ul(e,"position",o_)}const NN=new Set(["image","url"]);function RN(e){return Ul(e,NN,MN)}function PN(e){return Ul(e,"",AN)}function ms(){return!0}function Ul(e,t,n){const r=r_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function ON(e){return SN.test(e)}function o_(){return!1}function AN(e){return EN.test(e)}function MN(e){return CN.test(e)}function LN(){const e=He("colors"),t=He("spacing"),n=He("blur"),r=He("brightness"),o=He("borderColor"),i=He("borderRadius"),l=He("borderSpacing"),s=He("borderWidth"),a=He("contrast"),u=He("grayscale"),c=He("hueRotate"),d=He("invert"),f=He("gap"),h=He("gradientColorStops"),m=He("gradientColorStopPositions"),g=He("inset"),_=He("margin"),v=He("opacity"),y=He("padding"),x=He("saturate"),S=He("scale"),k=He("sepia"),T=He("skew"),b=He("space"),N=He("translate"),D=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ge,t],B=()=>[ge,t],re=()=>["",Jn,so],V=()=>["auto",li,ge],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ge],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[li,Su],H=()=>[li,ge];return{cacheSize:500,separator:":",theme:{colors:[ms],spacing:[Jn,so],blur:["none","",ao,ge],brightness:F(),borderColor:[e],borderRadius:["none","","full",ao,ge],borderSpacing:B(),borderWidth:re(),contrast:F(),grayscale:O(),hueRotate:H(),invert:O(),gap:B(),gradientColorStops:[e],gradientColorStopPositions:[$N,so],inset:j(),margin:j(),opacity:F(),padding:B(),saturate:F(),scale:F(),sepia:O(),skew:H(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[ao]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Y(),ge]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",gs,ge]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",gs,ge]}],"grid-cols":[{"grid-cols":[ms]}],"col-start-end":[{col:["auto",{span:["full",gs,ge]},ge]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[ms]}],"row-start-end":[{row:["auto",{span:[gs,ge]},ge]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ge,t]}],"min-w":[{"min-w":["min","max","fit",ge,Jn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[ao]},ao,ge]}],h:[{h:[ge,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Jn,ge]}],"max-h":[{"max-h":[ge,t,"min","max","fit"]}],"font-size":[{text:["base",ao,so]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Su]}],"font-family":[{font:[ms]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",li,Su]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Jn,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Jn,so]}],"underline-offset":[{"underline-offset":["auto",Jn,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),TN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:C()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[Jn,ge]}],"outline-w":[{outline:[Jn,so]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Jn,so]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ao,PN]}],"shadow-color":[{shadow:[ms]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":$()}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",ao,ge]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[gs,ge]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jn,so,Su]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const DN=yN(LN);function ut(...e){return DN(qw(e))}const Bs=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(Jw,{ref:r,className:ut("relative overflow-hidden",e),...n,children:[w.jsx(oN,{className:"h-full w-full rounded-[inherit]",children:t}),w.jsx(i_,{}),w.jsx(iN,{})]}));Bs.displayName=Jw.displayName;const i_=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>w.jsx(Uw,{ref:r,orientation:t,className:ut("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:w.jsx(ZT,{className:ut("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));i_.displayName=Uw.displayName;function Ws({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,i.current=null,o.current=0,l.current=0},a=_=>{_.preventDefault();const v=i.current==="left"?t:n;if(v.current&&r.current){const y=i.current==="left"?_.screenX-o.current:o.current-_.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=_=>v=>{if(v.target){const x=_==="left"?t:_==="right"?n:null;r.current=!0,x&&x.current&&(o.current=v.screenX,i.current=_,x.current&&(l.current=x.current.offsetWidth))}},[c,d,f,h,m,g]=p.Children.toArray(e);return p.useEffect(()=>(document.addEventListener("mouseup",s),document.addEventListener("mousemove",a),()=>{document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",a)}),[]),w.jsxs("div",{className:"flex h-screen",children:[w.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[w.jsxs(Ws.Column,{children:[c,w.jsx(Bs,{style:{height:"calc(100vh - 50px)"},children:d})]}),w.jsx("div",{className:"absolute inset-y-0 right-0 cursor-col-resize w-[1px] hover:w-[3px] h-full hover:bg-border",onMouseDown:u("left")})]}),w.jsx("div",{className:vd("",{"w-full":!m&&!g}),children:w.jsxs(Ws.Column,{children:[f,w.jsx(Bs,{style:{height:"calc(100vh - 50px)"},children:h})]})}),m||g&&w.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[w.jsxs(Ws.Column,{children:[m,w.jsx(Bs,{style:{height:"calc(100vh - 50px)"},children:g})]}),w.jsx("div",{onMouseDown:u("right"),className:"absolute inset-y-0 left-0 cursor-col-resize w-[1px] bg-border hover:w-[3px] hover:bg-border"})]})]})}Ws.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return w.jsxs("div",{className:"flex flex-col",children:[w.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const IN=({className:e})=>w.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[w.jsx("rect",{y:"0.5",width:"9",height:"9"}),w.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),w.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),w.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1225_1638",children:w.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),l_=IN,jN=({className:e})=>w.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[w.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1222_1618",children:w.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),zN=jN,FN=({className:e})=>w.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:w.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:w.jsx("path",{d:"M0.0145513 0.5H8.98545L9 3.18569H8.57074C8.43007 2.2276 8.02749 1.57948 7.36298 1.24133C6.98949 1.05491 6.43169 0.953035 5.68957 0.935694V7.94581C5.68957 8.43569 5.78416 8.76084 5.97332 8.92124C6.16734 9.08165 6.5675 9.16185 7.17381 9.16185V9.5H1.86257V9.16185C2.44462 9.16185 2.83023 9.08165 3.0194 8.92124C3.21342 8.7565 3.31043 8.43136 3.31043 7.94581V0.935694C2.58286 0.953035 2.02506 1.05491 1.63703 1.24133C0.92401 1.58815 0.521423 2.23627 0.429264 3.18569H0L0.0145513 0.5Z"})})}),BN=FN;function s_({children:e,rootPath:t}){return w.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}s_.Node=({children:e,paths:t=[],path:n,level:r=1,type:o,setActivePath:i})=>{const l=r*30,s=o==="string"?w.jsx(BN,{}):o==="image"?w.jsx(l_,{className:"h-[9px] w-[9px]"}):w.jsx(zN,{});return w.jsxs("div",{className:"w-full",children:[w.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{i&&i(n)},style:{paddingLeft:l},children:w.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,w.jsx("p",{children:n})]})}),e&&w.jsx(w.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};function Vg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ri=Vg();function a_(e){Ri=e}const u_=/[&<>"']/,WN=new RegExp(u_.source,"g"),c_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,UN=new RegExp(c_.source,"g"),HN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_y=e=>HN[e];function _n(e,t){if(t){if(u_.test(e))return e.replace(WN,_y)}else if(c_.test(e))return e.replace(UN,_y);return e}const VN=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function KN(e){return e.replace(VN,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const GN=/(^|[^\[])\^/g;function Oe(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(GN,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function Sy(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Tc={exec:()=>null};function Ey(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function Eu(e,t,n){const r=e.length;if(r===0)return"";let o=0;for(;o<r;){const i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function YN(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function Cy(e,t,n,r){const o=t.href,i=t.title?_n(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:o,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:i,text:_n(l)}}function XN(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
48
+ `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
49
+ `)}class Nc{constructor(t){Ue(this,"options");Ue(this,"rules");Ue(this,"lexer");this.options=t||Ri}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Eu(r,`
50
+ `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=XN(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=Eu(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=Eu(n[0].replace(/^ *>[ \t]?/gm,""),`
51
+ `),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",a="",u=!1;for(;t;){let c=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let d=n[2].split(`
52
+ `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(`
53
+ `,1)[0],h=0;this.options.pedantic?(h=2,a=d.trimStart()):(h=n[2].search(/[^ ]/),h=h>4?1:h,a=d.slice(h),h+=n[1].length);let m=!1;if(!d&&/^ *$/.test(f)&&(s+=f+`
54
+ `,t=t.substring(f.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),S=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const k=t.split(`
55
+ `,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(f)||S.test(f)||v.test(f)||y.test(t))break;if(f.search(/[^ ]/)>=h||!f.trim())a+=`
56
+ `+f.slice(h);else{if(m||d.search(/[^ ]/)>=4||x.test(d)||S.test(d)||y.test(d))break;a+=`
57
+ `+f}!m&&!f.trim()&&(m=!0),s+=k+`
58
+ `,t=t.substring(k.length+1),d=f.slice(h)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let g=null,_;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(_=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!g,checked:_,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const d=i.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));i.loose=f}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Ey(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
59
+ `):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,a;for(i=0;i<o;i++){const u=r.align[i];u&&(/^ *-+: *$/.test(u)?r.align[i]="right":/^ *:-+: *$/.test(u)?r.align[i]="center":/^ *:-+ *$/.test(u)?r.align[i]="left":r.align[i]=null)}for(o=r.rows.length,i=0;i<o;i++)r.rows[i]=Ey(r.rows[i],r.header.length).map(u=>({text:u,tokens:[]}));for(o=r.header.length,l=0;l<o;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(o=r.rows.length,l=0;l<o;l++)for(a=r.rows[l],s=0;s<a.length;s++)a[s].tokens=this.lexer.inline(a[s].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
60
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:_n(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=Eu(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=YN(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),Cy(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Cy(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,a,u=l,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+l);(o=d.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...o[0]][0].length,h=t.slice(0,l+o.index+f+a);if(Math.min(l,a)%2){const g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}const m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=_n(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=_n(n[1]),o="mailto:"+r):(r=_n(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=_n(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=_n(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=_n(n[0]),{type:"text",raw:n[0],text:r}}}}const se={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Tc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};se._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;se.def=Oe(se.def).replace("label",se._label).replace("title",se._title).getRegex();se.bullet=/(?:[*+-]|\d{1,9}[.)])/;se.listItemStart=Oe(/^( *)(bull) */).replace("bull",se.bullet).getRegex();se.list=Oe(se.list).replace(/bull/g,se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+se.def.source+")").getRegex();se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";se._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;se.html=Oe(se.html,"i").replace("comment",se._comment).replace("tag",se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();se.lheading=Oe(se.lheading).replace(/bull/g,se.bullet).getRegex();se.paragraph=Oe(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.blockquote=Oe(se.blockquote).replace("paragraph",se.paragraph).getRegex();se.normal={...se};se.gfm={...se.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};se.gfm.table=Oe(se.gfm.table).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.gfm.paragraph=Oe(se._paragraph).replace("hr",se.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",se.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",se._tag).getRegex();se.pedantic={...se.normal,html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Oe(se.normal._paragraph).replace("hr",se.hr).replace("heading",` *#{1,6} *[^
61
+ ]`).replace("lheading",se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Tc,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Tc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};X._punctuation="\\p{P}$+<=>`^|~";X.punctuation=Oe(X.punctuation,"u").replace(/punctuation/g,X._punctuation).getRegex();X.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;X.anyPunctuation=/\\[punct]/g;X._escapes=/\\([punct])/g;X._comment=Oe(se._comment).replace("(?:-->|$)","-->").getRegex();X.emStrong.lDelim=Oe(X.emStrong.lDelim,"u").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimAst=Oe(X.emStrong.rDelimAst,"gu").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimUnd=Oe(X.emStrong.rDelimUnd,"gu").replace(/punct/g,X._punctuation).getRegex();X.anyPunctuation=Oe(X.anyPunctuation,"gu").replace(/punct/g,X._punctuation).getRegex();X._escapes=Oe(X._escapes,"gu").replace(/punct/g,X._punctuation).getRegex();X._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;X._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;X.autolink=Oe(X.autolink).replace("scheme",X._scheme).replace("email",X._email).getRegex();X._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;X.tag=Oe(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex();X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;X.link=Oe(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex();X.reflink=Oe(X.reflink).replace("label",X._label).replace("ref",se._label).getRegex();X.nolink=Oe(X.nolink).replace("ref",se._label).getRegex();X.reflinkSearch=Oe(X.reflinkSearch,"g").replace("reflink",X.reflink).replace("nolink",X.nolink).getRegex();X.normal={...X};X.pedantic={...X.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()};X.gfm={...X.normal,escape:Oe(X.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};X.gfm.url=Oe(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex();X.breaks={...X.gfm,br:Oe(X.br).replace("{2,}","*").getRegex(),text:Oe(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class xr{constructor(t){Ue(this,"tokens");Ue(this,"options");Ue(this,"state");Ue(this,"tokenizer");Ue(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ri,this.options.tokenizer=this.options.tokenizer||new Nc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:se.normal,inline:X.normal};this.options.pedantic?(n.block=se.pedantic,n.inline=X.pedantic):this.options.gfm&&(n.block=se.gfm,this.options.breaks?n.inline=X.breaks:n.inline=X.gfm),this.tokenizer.rules=n}static get rules(){return{block:se,inline:X}}static lex(t,n){return new xr(n).lex(t)}static lexInline(t,n){return new xr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
62
+ `),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,a,u)=>a+" ".repeat(u.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
63
+ `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
64
+ `+r.raw,o.text+=`
65
+ `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
66
+ `+r.raw,o.text+=`
67
+ `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=`
68
+ `+r.raw,o.text+=`
69
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=`
70
+ `+r.raw,o.text+=`
71
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Rc{constructor(t){Ue(this,"options");this.options=t||Ri}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+`
72
+ `,o?'<pre><code class="language-'+_n(o)+'">'+(r?t:_n(t,!0))+`</code></pre>
73
+ `:"<pre><code>"+(r?t:_n(t,!0))+`</code></pre>
74
+ `}blockquote(t){return`<blockquote>
75
+ ${t}</blockquote>
76
+ `}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
77
+ `}hr(){return`<hr>
78
+ `}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
79
+ `+t+"</"+o+`>
80
+ `}listitem(t,n,r){return`<li>${t}</li>
81
+ `}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
82
+ `}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
83
+ <thead>
84
+ `+t+`</thead>
85
+ `+n+`</table>
86
+ `}tablerow(t){return`<tr>
87
+ ${t}</tr>
88
+ `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
89
+ `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){const o=Sy(t);if(o===null)return r;t=o;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){const o=Sy(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return t}}class Kg{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class wr{constructor(t){Ue(this,"options");Ue(this,"renderer");Ue(this,"textRenderer");this.options=t||Ri,this.options.renderer=this.options.renderer||new Rc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Kg}static parse(t,n){return new wr(n).parse(t)}static parseInline(t,n){return new wr(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=i;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,KN(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=i;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=i;let s="",a="";for(let c=0;c<l.header.length;c++)a+=this.renderer.tablecell(this.parseInline(l.header[c].tokens),{header:!0,align:l.align[c]});s+=this.renderer.tablerow(a);let u="";for(let c=0;c<l.rows.length;c++){const d=l.rows[c];a="";for(let f=0;f<d.length;f++)a+=this.renderer.tablecell(this.parseInline(d[f].tokens),{header:!1,align:l.align[f]});u+=this.renderer.tablerow(a)}r+=this.renderer.table(s,u);continue}case"blockquote":{const l=i,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=i,s=l.ordered,a=l.start,u=l.loose;let c="";for(let d=0;d<l.items.length;d++){const f=l.items[d],h=f.checked,m=f.task;let g="";if(f.task){const _=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=_+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=_+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:_+" "}):g+=_+" "}g+=this.parse(f.tokens,u),c+=this.renderer.listitem(g,m,!!h)}r+=this.renderer.list(c,s,a);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],s+=`
90
+ `+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}switch(i.type){case"escape":{const l=i;r+=n.text(l.text);break}case"html":{const l=i;r+=n.html(l.text);break}case"link":{const l=i;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=i;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=i;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=i;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=i;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=i;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=i;r+=n.text(l.text);break}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class Us{constructor(t){Ue(this,"options");this.options=t||Ri}preprocess(t){return t}postprocess(t){return t}}Ue(Us,"passThroughHooks",new Set(["preprocess","postprocess"]));var Ma,Gh,ed,d_;class QN{constructor(...t){Jd(this,Ma);Jd(this,ed);Ue(this,"defaults",Vg());Ue(this,"options",this.setOptions);Ue(this,"parse",eu(this,Ma,Gh).call(this,xr.lex,wr.parse));Ue(this,"parseInline",eu(this,Ma,Gh).call(this,xr.lexInline,wr.parseInline));Ue(this,"Parser",wr);Ue(this,"Renderer",Rc);Ue(this,"TextRenderer",Kg);Ue(this,"Lexer",xr);Ue(this,"Tokenizer",Nc);Ue(this,"Hooks",Us);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(const l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{const s=l;for(const a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of s.rows)for(const u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{const s=l;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=l;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{r=r.concat(this.walkTokens(s[a],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Rc(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Nc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Us;for(const l in r.hooks){const s=r.hooks[l],a=l,u=i[a];Us.passThroughHooks.has(l)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(f=>u.call(i,f));const d=s.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return xr.lex(t,n??this.defaults)}parser(t,n){return wr.parse(t,n??this.defaults)}}Ma=new WeakSet,Gh=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=eu(this,ed,d_).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(a=>t(a,l)).then(a=>l.walkTokens?Promise.all(this.walkTokens(a,l.walkTokens)).then(()=>a):a).then(a=>n(a,l)).then(a=>l.hooks?l.hooks.postprocess(a):a).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const a=t(r,l);l.walkTokens&&this.walkTokens(a,l.walkTokens);let u=n(a,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(a){return s(a)}}},ed=new WeakSet,d_=function(t,n){return r=>{if(r.message+=`
91
+ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+_n(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const yi=new QN;function De(e,t){return yi.parse(e,t)}De.options=De.setOptions=function(e){return yi.setOptions(e),De.defaults=yi.defaults,a_(De.defaults),De};De.getDefaults=Vg;De.defaults=Ri;De.use=function(...e){return yi.use(...e),De.defaults=yi.defaults,a_(De.defaults),De};De.walkTokens=function(e,t){return yi.walkTokens(e,t)};De.parseInline=yi.parseInline;De.Parser=wr;De.parser=wr.parse;De.Renderer=Rc;De.TextRenderer=Kg;De.Lexer=xr;De.lexer=xr.lex;De.Tokenizer=Nc;De.Hooks=Us;De.parse=De;De.options;De.setOptions;De.use;De.walkTokens;De.parseInline;wr.parse;const JN=xr.lex;function xa(){xa=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(C,$,E){C[$]=E.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(C,$,E){return Object.defineProperty(C,$,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[$]}try{u({},"")}catch{u=function($,E,O){return $[E]=O}}function c(C,$,E,O){var R=$&&$.prototype instanceof v?$:v,F=Object.create(R.prototype),H=new V(O||[]);return o(F,"_invoke",{value:M(C,E,H)}),F}function d(C,$,E){try{return{type:"normal",arg:C.call($,E)}}catch(O){return{type:"throw",arg:O}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",_={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var k=Object.getPrototypeOf,T=k&&k(k(Y([])));T&&T!==n&&r.call(T,l)&&(S=T);var b=x.prototype=v.prototype=Object.create(S);function N(C){["next","throw","return"].forEach(function($){u(C,$,function(E){return this._invoke($,E)})})}function D(C,$){function E(R,F,H,ae){var oe=d(C[R],C,F);if(oe.type!=="throw"){var $e=oe.arg,_e=$e.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?$.resolve(_e.__await).then(function(Q){E("next",Q,H,ae)},function(Q){E("throw",Q,H,ae)}):$.resolve(_e).then(function(Q){$e.value=Q,H($e)},function(Q){return E("throw",Q,H,ae)})}ae(oe.arg)}var O;o(this,"_invoke",{value:function(R,F){function H(){return new $(function(ae,oe){E(R,F,ae,oe)})}return O=O?O.then(H,H):H()}})}function M(C,$,E){var O=f;return function(R,F){if(O===m)throw new Error("Generator is already running");if(O===g){if(R==="throw")throw F;return{value:e,done:!0}}for(E.method=R,E.arg=F;;){var H=E.delegate;if(H){var ae=j(H,E);if(ae){if(ae===_)continue;return ae}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(O===f)throw O=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);O=m;var oe=d(C,$,E);if(oe.type==="normal"){if(O=E.done?g:h,oe.arg===_)continue;return{value:oe.arg,done:E.done}}oe.type==="throw"&&(O=g,E.method="throw",E.arg=oe.arg)}}}function j(C,$){var E=$.method,O=C.iterator[E];if(O===e)return $.delegate=null,E==="throw"&&C.iterator.return&&($.method="return",$.arg=e,j(C,$),$.method==="throw")||E!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+E+"' method")),_;var R=d(O,C.iterator,$.arg);if(R.type==="throw")return $.method="throw",$.arg=R.arg,$.delegate=null,_;var F=R.arg;return F?F.done?($[C.resultName]=F.value,$.next=C.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,_):F:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,_)}function B(C){var $={tryLoc:C[0]};1 in C&&($.catchLoc=C[1]),2 in C&&($.finallyLoc=C[2],$.afterLoc=C[3]),this.tryEntries.push($)}function re(C){var $=C.completion||{};$.type="normal",delete $.arg,C.completion=$}function V(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Y(C){if(C||C===""){var $=C[l];if($)return $.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,O=function R(){for(;++E<C.length;)if(r.call(C,E))return R.value=C[E],R.done=!1,R;return R.value=e,R.done=!0,R};return O.next=O}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,o(b,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(C){var $=typeof C=="function"&&C.constructor;return!!$&&($===y||($.displayName||$.name)==="GeneratorFunction")},t.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create(b),C},t.awrap=function(C){return{__await:C}},N(D.prototype),u(D.prototype,s,function(){return this}),t.AsyncIterator=D,t.async=function(C,$,E,O,R){R===void 0&&(R=Promise);var F=new D(c(C,$,E,O),R);return t.isGeneratorFunction($)?F:F.next().then(function(H){return H.done?H.value:F.next()})},N(b),u(b,a,"Generator"),u(b,l,function(){return this}),u(b,"toString",function(){return"[object Generator]"}),t.keys=function(C){var $=Object(C),E=[];for(var O in $)E.push(O);return E.reverse(),function R(){for(;E.length;){var F=E.pop();if(F in $)return R.value=F,R.done=!1,R}return R.done=!0,R}},t.values=Y,V.prototype={constructor:V,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(re),!C)for(var $ in this)$.charAt(0)==="t"&&r.call(this,$)&&!isNaN(+$.slice(1))&&(this[$]=e)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var $=this;function E(oe,$e){return F.type="throw",F.arg=C,$.next=oe,$e&&($.method="next",$.arg=e),!!$e}for(var O=this.tryEntries.length-1;O>=0;--O){var R=this.tryEntries[O],F=R.completion;if(R.tryLoc==="root")return E("end");if(R.tryLoc<=this.prev){var H=r.call(R,"catchLoc"),ae=r.call(R,"finallyLoc");if(H&&ae){if(this.prev<R.catchLoc)return E(R.catchLoc,!0);if(this.prev<R.finallyLoc)return E(R.finallyLoc)}else if(H){if(this.prev<R.catchLoc)return E(R.catchLoc,!0)}else{if(!ae)throw new Error("try statement without catch or finally");if(this.prev<R.finallyLoc)return E(R.finallyLoc)}}}},abrupt:function(C,$){for(var E=this.tryEntries.length-1;E>=0;--E){var O=this.tryEntries[E];if(O.tryLoc<=this.prev&&r.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var R=O;break}}R&&(C==="break"||C==="continue")&&R.tryLoc<=$&&$<=R.finallyLoc&&(R=null);var F=R?R.completion:{};return F.type=C,F.arg=$,R?(this.method="next",this.next=R.finallyLoc,_):this.complete(F)},complete:function(C,$){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&$&&(this.next=$),_},finish:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),re(E),_}},catch:function(C){for(var $=this.tryEntries.length-1;$>=0;--$){var E=this.tryEntries[$];if(E.tryLoc===C){var O=E.completion;if(O.type==="throw"){var R=O.arg;re(E)}return R}}throw new Error("illegal catch attempt")},delegateYield:function(C,$,E){return this.delegate={iterator:Y(C),resultName:$,nextLoc:E},this.method==="next"&&(this.arg=e),_}},t}function Yh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gg(e,t){if(e){if(typeof e=="string")return Yh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yh(e,t)}}function ZN(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Gg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
92
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function qN(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e2(e){var t=qN(e,"string");return typeof t=="symbol"?t:String(t)}function Ut(e,t,n){return t=e2(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t2(e){if(Array.isArray(e))return e}function n2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function r2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
93
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o2(e,t){return t2(e)||n2(e,t)||Gg(e,t)||r2()}function $y(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function f_(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){$y(i,r,o,l,s,"next",a)}function s(a){$y(i,r,o,l,s,"throw",a)}l(void 0)})}}function i2(e){if(Array.isArray(e))return Yh(e)}function l2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
94
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xh(e){return i2(e)||l2(e)||Gg(e)||s2()}var a2=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function Yg(e){var t=a2.exec(e);if(t&&t[1])return t[1]}function Xg(e){return e==="image/svg+xml"?"svg":e==="image/vnd.microsoft.icon"?"ico":e.startsWith("image/")?e.slice(6):e}var u2=/^h([\d+])$/;function c2(e){var t=e.children.map(d2);return f2(t)}function d2(e){if(e.type==="heading"){var t,n="",r=Number((t=e.tag.match(u2))===null||t===void 0?void 0:t[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(var o=0;o<Number(r);o++)n+="#";var i=["".concat(n," ")];return{type:"block",children:i.concat.apply(i,Xh(e.children.map(Jh)))}}else{if(e.type==="paragraph")return e.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:e.children.map(function(s){return Jh(s)})};if(e.type==="list")return{type:"block",children:e.children.flatMap(function(s,a){return p_(g_(e),s,0,a===0)})};var l=e;throw new Error("Unhandled node type: ".concat("type"in l?"exhaustiveCheck.type":"unknown"))}}function f2(e){return Qh.apply(this,arguments)}function Qh(){return Qh=f_(xa().mark(function e(t){var n,r,o,i,l,s,a,u,c;return xa().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:n=[`
95
+ `],r=[],o={},i=0;case 4:if(!(i<t.length)){f.next=44;break}l=t[i],s=ZN(l.children),f.prev=7,s.s();case 9:if((a=s.n()).done){f.next=32;break}if(u=a.value,typeof u!="string"){f.next=15;break}n[n.length-1]+=u,f.next=30;break;case 15:if(u.type!=="image"){f.next=23;break}return f.t0=r,f.next=19,m2(u,o);case 19:f.t1=f.sent,f.t0.push.call(f.t0,f.t1),f.next=29;break;case 23:if(u.type!=="link"){f.next=27;break}r.push(y2(u)),f.next=29;break;case 27:throw c=u,new Error("Unexpected node type: ".concat(JSON.stringify(c,null,2)));case 29:n.push("");case 30:f.next=9;break;case 32:f.next=37;break;case 34:f.prev=34,f.t2=f.catch(7),s.e(f.t2);case 37:return f.prev=37,s.f(),f.finish(37);case 40:i===t.length-1?n[n.length-1]+=`
96
+ `:n[n.length-1]+=`
97
+
98
+ `;case 41:i++,f.next=4;break;case 44:return f.abrupt("return",Ut(Ut(Ut(Ut({},Kt,"richtext"),"templateStrings",n),"exprs",r),"files",o));case 45:case"end":return f.stop()}},e,null,[[7,34,37,40]])})),Qh.apply(this,arguments)}function h_(e){var t=typeof e.format=="number"?p2(e.format):[],n=e.text.trimStart(),r=e.text.length-n.length;n=n.trimEnd();var o=e.text.length-n.length-r;return t.includes("bold")&&t.includes("italic")?n="***".concat(n,"***"):t.includes("bold")?n="**".concat(n,"**"):t.includes("italic")&&(n="_".concat(n,"_")),t.includes("line-through")&&(n="~~".concat(n,"~~")),"".concat(" ".repeat(r)).concat(n).concat(" ".repeat(o))}function Jh(e){return e.type==="text"?h_(e):e.type==="linebreak"?`
99
+ `:e}function p_(e,t,n){var r,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=o?"":`
100
+ `,l=["".concat(i).concat(" ".repeat(n)).concat(e)];return((r=t.children)===null||r===void 0||(r=r[0])===null||r===void 0?void 0:r.type)!=="list"&&l.push(" "),l.concat(t.children.flatMap(function(s){return s.type==="list"?s.children.flatMap(function(a){return p_(g_(s),a,n+4)}):[Jh(s)]}))}function g_(e){if(e.listType==="bullet")return"-";if(e.listType==="number")return"1.";throw new Error("Unhandled list type: ".concat(e.listType))}var h2={bold:1,italic:2,"line-through":4};function p2(e){return Object.entries(h2).flatMap(function(t){var n=o2(t,2),r=n[0],o=n[1];return(o&e)===o?[r]:[]})}var g2=new TextEncoder;function m2(e,t){return Zh.apply(this,arguments)}function Zh(){return Zh=f_(xa().mark(function e(t,n){var r,o,i,l,s;return xa().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!t.src.startsWith("data:")){u.next=13;break}return u.next=3,$n.getSHA256Hash(g2.encode(t.src));case 3:if(r=u.sent,o=Yg(t.src),o!==void 0){u.next=7;break}throw new Error("Could not detect Mime Type for image: ".concat(t.src));case 7:return i=Xg(o),l="/public/".concat(r,".").concat(i),n[l]=t.src,u.abrupt("return",Ut(Ut(Ut({},Kt,"file"),vn,l),"metadata",{width:t.width||0,height:t.height||0,sha256:r||""}));case 13:return s=v2("sha256",t.src),u.abrupt("return",Ut(Ut(Ut({},Kt,"file"),vn,"/public".concat(t.src.split("?")[0])),"metadata",{width:t.width||0,height:t.height||0,sha256:s||""}));case 15:case"end":return u.stop()}},e)})),Zh.apply(this,arguments)}function v2(e,t){var n=t.split("?");if(!(n.length<2)){var r=n[1],o=new URLSearchParams(r);if(o.has(e))return o.get(e)}}function y2(e){return Ut(Ut(Ut({},Kt,"link"),"href",e.url),"children",e.children.map(h_))}function ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ky(Object(n),!0).forEach(function(r){Ut(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ar={version:1,format:"",indent:0,direction:null};function Hl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof e=="string")return Je(Je({},ar),{},{type:"text",format:"",text:e});if("tag"in e)switch(e.tag){case"h1":return zi(e);case"h2":return zi(e);case"h3":return zi(e);case"h4":return zi(e);case"h5":return zi(e);case"h6":return zi(e);case"li":return C2(e);case"p":return S2(e);case"ul":return by(e);case"ol":return by(e);case"span":return m_(e);case"a":return w2(e);case"img":return x2(e);case"br":return t?Je(Je({},ar),{},{type:"linebreak"}):E2();default:throw Error("Unexpected node tag: "+JSON.stringify(e,null,2))}else throw Error("Unexpected node: "+JSON.stringify(e,null,2))}function x2(e){var t=e.src;return Je(Je({},ar),{},{type:"image",src:t,width:e.width,height:e.height})}function w2(e){return Je(Je({},ar),{},{type:"link",url:e.href,children:e.children.map(function(t){return Hl(t)})})}function _2(e){return Je(Je({},ar),{},{format:"",type:"root",children:e.children.map(function(t){return Hl(t)})})}function zi(e){return Je(Je({},ar),{},{type:"heading",tag:e.tag,children:e.children.map(function(t){return Hl(t)})})}function S2(e){return Je(Je({},ar),{},{type:"paragraph",children:e.children.map(function(t){return Hl(t,!0)})})}function E2(){return Je(Je({},ar),{},{type:"paragraph",children:[]})}function C2(e){return Je(Je({},ar),{},{type:"listitem",children:e.children.map(function(t){return Hl(t,!0)})})}function by(e){return Je(Je({},ar),{},{type:"list",listType:e.tag==="ol"?"number":"bullet",children:e.children.map(function(t){return Hl(t)})},e.dir?{direction:e.dir}:{direction:null})}var $2={bold:1,italic:2,"line-through":4};function k2(e){return e.reduce(function(t,n){return t|$2[n]},0)}function m_(e){var t=e.children[0];return typeof t=="string"?Je(Je({},ar),{},{type:"text",text:t,format:k2(e.classes)}):m_(Je(Je({},t),{},{classes:e.classes.concat(t.classes)}))}var Pc='<val value="',qh='">',ep="</val>";function Zn(e,t,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=[],i=function(){var a=e[n];if(a.type==="heading")o.push({tag:"h".concat(a.depth),children:Zn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="paragraph")o.push({tag:"p",children:Zn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="strong")o.push({tag:"span",classes:["bold"],children:Zn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="em")o.push({tag:"span",classes:["italic"],children:Zn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="del")o.push({tag:"span",classes:["line-through"],children:Zn(a.tokens?a.tokens:[],t,0).children});else if(a.type==="text")if("tokens"in a&&Array.isArray(a.tokens))o.push.apply(o,Xh(Zn(a.tokens,t,n,r).children));else if(r&&typeof a.raw=="string"){var u=a.raw.split(`
101
+ `),c=u.flatMap(function(S,k){return k===u.length-1?[S]:[S,{tag:"br",children:[]}]});o.push.apply(o,Xh(c))}else o.push(a.raw);else if(a.type==="list")o.push({tag:a.ordered?"ol":"ul",children:Zn(a.items,t,0).children});else if(a.type==="list_item")o.push({tag:"li",children:Zn(a.tokens?a.tokens:[],t,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===ep)return{v:{children:o,cursor:n}};var d=a.text.indexOf(qh);if(a.text.startsWith(Pc)&&d>-1){var f=Number(a.text.slice(Pc.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=Zn(e.map(function(S){return S.type==="link"||S.type==="list"?{type:"text",raw:S.raw,text:S.raw}:S}),t,n+1),m=h.children,g=h.cursor,_=t[f];if(_._type==="link")o.push({tag:"a",href:_.href,children:m});else if(_._type==="file"){var v,y;o.push({tag:"img",src:$n.convertFileSource(_).url,width:(v=_.metadata)===null||v===void 0?void 0:v.width,height:(y=_.metadata)===null||y===void 0?void 0:y.height,children:[]})}n=g}var x=/<br\s*\/?>/gi;a.text.trim().match(x)&&o.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?o.push(a.raw):o.push({tag:"a",href:a.href,children:Zn(a.tokens?a.tokens:[],t,0).children}):a.type==="br"?o.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++},l;n<e.length;)if(l=i(),l)return l.v;return{children:o,cursor:n}}function v_(e){var t=e.templateStrings,n=e.exprs,r=t.flatMap(function(a,u){var c=n[u];return c?c[Kt]==="link"?a.concat("".concat(Pc).concat(u).concat(qh).concat(c.children[0]).concat(ep)):a.concat("".concat(Pc).concat(u).concat(qh).concat(ep)):a}).join(""),o=JN(r,{gfm:!0}),i=Zn(o,n,0),l=i.children,s=i.cursor;if(s!==o.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return Ut(Ut({},Kt,"richtext"),"children",l)}var un={},I={};let wd={},y_={},wa={},Hs={},tp={},vl={},Qg={},np={},_a={},Sa={},_o={},Jg={},Zg={},x_={},w_={},__={},S_={},E_={},C_={},$_={},Oc={},k_={},b_={},T_={},N_={},R_={},P_={},O_={},A_={},M_={},qg={},em={},rp={},L_={},D_={},I_={};function K(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let eo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b2=eo&&"documentMode"in document?document.documentMode:null,Bt=eo&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Do=eo&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ac=eo&&"InputEvent"in window&&!b2?"getTargetRanges"in new window.InputEvent("input"):!1,tm=eo&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),_d=eo&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,T2=eo&&/^(?=.*Chrome).*/i.test(navigator.userAgent),nm=eo&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!T2,Sd=tm||_d||nm?" ":"​",N2=Do?" ":Sd,R2=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,P2=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,ci={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},O2={directionless:1,unmergeable:2},Ty={center:2,end:6,justify:4,left:1,right:3,start:5},A2={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},M2={normal:0,segmented:2,token:1},L2={0:"normal",2:"segmented",1:"token"},op=!1,rm=0;function D2(e){rm=e.timeStamp}function $f(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function I2(e){return e.getEditorState().read(()=>{let t=Ye();return t!==null?t.clone():null})}function j_(e,t,n){op=!0;let r=100<performance.now()-rm;try{Rn(e,()=>{let o=Ye()||I2(e);var i=new Map,l=e.getRootElement(),s=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var f=t[d],h=f.type,m=f.target,g=Ha(m,s);if(!(g===null&&m!==l||Ke(g))){if(h==="characterData"){if(f=r&&Z(g))e:{f=o,h=m;var _=g;if(fe(f)){var v=f.anchor.getNode();if(v.is(_)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&_.isAttached()}f&&(_=Pr(e._window),h=f=null,_!==null&&_.anchorNode===m&&(f=_.anchorOffset,h=_.focusOffset),m=m.nodeValue,m!==null&&um(g,m,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,_=0;_<h.length;_++){v=h[_];var y=V_(v),x=v.parentNode;x==null||v===a||y!==null||v.nodeName==="BR"&&$f(v,x,e)||(Do&&(y=v.innerText||v.nodeValue)&&(c+=y),x.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(_=0,v=0;v<h;v++)x=f[v],(x.nodeName==="BR"&&$f(x,m,e)||a===x)&&(m.appendChild(x),_++);h!==_&&(m===l&&(g=s._nodeMap.get("root")),i.set(m,g))}}}}if(0<i.size)for(let[S,k]of i)if(W(k))for(i=k.getChildrenKeys(),l=S.firstChild,s=0;s<i.length;s++)a=e.getElementByKey(i[s]),a!==null&&(l==null?(S.appendChild(a),l=a):l!==a&&S.replaceChild(a,l),l=l.nextSibling);else Z(k)&&k.markDirty();if(i=n.takeRecords(),0<i.length){for(l=0;l<i.length;l++)for(a=i[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)g=s[d],m=g.parentNode,m==null||g.nodeName!=="BR"||$f(g,a,e)||m.removeChild(g);n.takeRecords()}o!==null&&(u&&(o.dirty=!0,kr(o)),Do&&X_(e)&&o.insertRawText(c))})}finally{op=!1}}function z_(e){let t=e._observer;if(t!==null){let n=t.takeRecords();j_(e,n,t)}}function F_(e){rm===0&&Cd(e).addEventListener("textInput",D2,!0),e._observer=new MutationObserver((t,n)=>{j_(e,t,n)})}function Ny(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,(n===null||n===o)&&(r===null||r===i)&&(e===null||e===t)}function Ry(e,t){let n=e.mergeWithSibling(t),r=ot()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function B_(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&Z(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{Ny(t,e)&&(e=Ry(t,e));break}for(var n;(n=e.getNextSibling())!==null&&Z(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{Ny(e,n)&&Ry(e,n);break}}}function om(e){return Py(e.anchor),Py(e.focus),e}function Py(e){for(;e.type==="element";){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Z(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!W(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let j2=1,z2=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function im(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return Ke(Ha(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function Ua(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!im(t)&&lm(t)===e}catch{return!1}}function lm(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=Ed(e)}return null}function ip(e){return e.isToken()||e.isSegmented()}function Mc(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function W_(e,t,n){return t=ci[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function U_(e){return Z(e)||ka(e)||Ke(e)}function H_(e,t){if(t!=null)e.__key=t;else{tn(),99<ba&&K(14),t=ot();var n=Or(),r=""+j2++;n._nodeMap.set(r,e),W(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function di(e){var t=e.getParent();if(t!==null){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),n===null)if(e!==null){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),e!==null){let i=e.getWritable();i.__prev=r.__key,r.__next=i.__key}else r.__next=null;o.__prev=null}e===null?n!==null?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),n!==null?(n=n.getWritable(),n.__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function Lc(e){99<ba&&K(14);var t=e.getLatest(),n=t.__parent,r=Or();let o=ot(),i=r._nodeMap;if(r=o._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=i.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,o._dirtyType=1,W(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Dt(e){tn();var t=ot();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=bt(n),t!==null&&t.getWritable()),e!==null&&(e=bt(e),e!==null&&e.getWritable()))}function So(){return Xl()?null:ot()._compositionKey}function bt(e,t){return e=(t||Or())._nodeMap.get(e),e===void 0?null:e}function V_(e,t){let n=ot();return e=e[`__lexicalKey_${n._key}`],e!==void 0?bt(e,t):null}function Ha(e,t){for(;e!=null;){let n=V_(e,t);if(n!==null)return n;e=Ed(e)}return null}function K_(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function Oy(e){return e.read(()=>Rr().getTextContent())}function F2(e,t){Rn(e,()=>{var n=Or();if(!n.isEmpty())if(t==="root")Rr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Rr(){return Or()._nodeMap.get("root")}function kr(e){tn();let t=Or();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function sl(e){var t=ot(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=Ed(n)}n=null}return n===null?(t=t.getRootElement(),e===t?bt("root"):null):bt(n)}function G_(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function sm(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function Y_(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function am(e,t,n){if(t=Pr(t._window),t!==null){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=Ha(r),t!==null&&Z(r))){if(t===Sd&&n){let l=n.length;t=n,i=o=l}t!==null&&um(r,t,o,i,e)}}}function um(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===Sd&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(c==="")if(Dt(null),tm||_d||nm)i.remove();else{let d=ot();setTimeout(()=>{d.update(()=>{i.isAttached()&&i.remove()})},20)}else{o=i.getParent(),t=Yl();var l=i.getTextContentSize(),s=So(),a=i.getKey();i.isToken()||s!==null&&a===s&&!u||fe(t)&&(o!==null&&!o.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(e=Ye(),fe(e)&&n!==null&&r!==null&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=i.getTextContent(),n=$t(n),i.replace(n),i=n)),i.setTextContent(c))}}}function B2(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return e===0?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(t=t.getPreviousSibling(),e=(Z(t)||W(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function Vs(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return r!==void 0?r:(e=e[t],typeof e=="string"?(e=e.split(" "),n[t]=e):e)}function cm(e,t,n,r,o){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&K(33,n),n=t.klass,t=e.get(n),t===void 0&&(t=new Map,e.set(n,t)),e=t.get(r),n=e==="destroyed"&&o==="created",(e===void 0||n)&&t.set(r,n?"updated":o))}function Ay(e,t,n){let r=e.getParent(),o=n;return r!==null&&(t&&n===0?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function lp(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),Ay(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?Ay(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function X_(e){return e=(e=Cd(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function Dc(e){return!rn(e)&&!e.isLastChild()&&!e.isInline()}function Ic(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&K(75,t),e}function Ed(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function jc(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function Cd(e){return e=e._window,e===null&&K(78),e}function Q_(e){for(e=e.getParentOrThrow();e!==null&&!or(e);)e=e.getParentOrThrow();return e}function or(e){return rn(e)||W(e)&&e.isShadowRoot()}function J_(e){return e=e.constructor.clone(e),H_(e,null),e}function Va(e){var t=ot();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&K(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||K(98),t):e}function kf(e,t){e=e.getParent(),!rn(e)||W(t)||Ke(t)||K(99)}function bf(e){return(Ke(e)||W(e)&&!e.canBeEmpty())&&!e.isInline()}function sp(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function Pr(e){return eo?(e||window).getSelection():null}function Z_(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),or(e)&&K(102);let r=l=>{const s=l.getParentOrThrow(),a=or(s),u=l!==n||a?J_(l):l;if(a)return l.insertAfter(u),[l,u,u];const[c,d,f]=r(s);return l=l.getNextSiblings(),f.append(u,...l),[c,d,u]},[o,i]=r(n);return[o,i]}function zc(e,t){for(;e!==Rr()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function W2(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&K(112),W(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function $d(e){return e.nodeType===1}function q_(e,t,n,r,o,i){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(W(e)&&q_(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}function U2(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[i]of r){let l=t.get(i);l===void 0||l.isAttached()||(W(l)&&q_(l,i,e,t,o,r),e.has(i)||r.delete(i),o.push(i))}for(let i of o)t.delete(i);for(let i of n)r=t.get(i),r===void 0||r.isAttached()||(e.has(i)||n.delete(i),t.delete(i))}let xt="",en="",Fr="",Io,Vt,Ea,eS=!1,dm=!1,kd,Xu=null,ap,up,xi,jo,cp,Ca;function Qu(e,t){let n=xi.get(e);if(t!==null){let r=hp(e);r.parentNode===t&&t.removeChild(r)}jo.has(e)||Vt._keyToDOMMap.delete(e),W(n)&&(e=Fc(n,xi),dp(e,0,e.length-1,null)),n!==void 0&&cm(Ca,Ea,kd,n,"destroyed")}function dp(e,t,n,r){for(;t<=n;++t){let o=e[t];o!==void 0&&Qu(o,r)}}function Zo(e,t){e.setProperty("text-align",t)}function tS(e,t){var n=Io.theme.indent;if(typeof n=="string"){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${n})`)}function nS(e,t){e=e.style,t===0?Zo(e,""):t===1?Zo(e,"left"):t===2?Zo(e,"center"):t===3?Zo(e,"right"):t===4?Zo(e,"justify"):t===5?Zo(e,"start"):t===6&&Zo(e,"end")}function Ju(e,t,n){let r=jo.get(e);r===void 0&&K(60);let o=r.createDOM(Io,Vt);var i=Vt._keyToDOMMap;if(o["__lexicalKey_"+Vt._key]=e,i.set(e,o),Z(r)?o.setAttribute("data-lexical-text","true"):Ke(r)&&o.setAttribute("data-lexical-decorator","true"),W(r)){if(e=r.__indent,i=r.__size,e!==0&&tS(o,e),i!==0){--i,e=Fc(r,jo);var l=en;en="",fp(e,r,0,i,o,null),oS(r,o),en=l}e=r.__format,e!==0&&nS(o,e),r.isInline()||rS(null,r,o),Dc(r)&&(xt+=`
102
+
103
+ `,Fr+=`
104
+
105
+ `)}else i=r.getTextContent(),Ke(r)?(l=r.decorate(Vt,Io),l!==null&&iS(e,l),o.contentEditable="false"):Z(r)&&(r.isDirectionless()||(en+=i)),xt+=i,Fr+=i;return t!==null&&(n!=null?t.insertBefore(o,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(o,n):t.appendChild(o))),cm(Ca,Ea,kd,r,"created"),o}function fp(e,t,n,r,o,i){let l=xt;for(xt="";n<=r;++n)Ju(e[n],o,i);Dc(t)&&(xt+=`
106
+
107
+ `),o.__lexicalTextContent=xt,xt=l+xt}function My(e,t){return e=t.get(e),ka(e)||Ke(e)&&e.isInline()}function rS(e,t,n){e=e!==null&&(e.__size===0||My(e.__last,xi)),t=t.__size===0||My(t.__last,jo),e?t||(t=n.__lexicalLineBreak,t!=null&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function oS(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==en||n!==Xu){let i=en==="";if(i)var r=Xu;else r=en,r=R2.test(r)?"rtl":P2.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=Io.theme;var o=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;o!==void 0&&(typeof o=="string"&&(o=o.split(" "),o=s[n]=o),l.remove(...o)),r===null||i&&r==="ltr"?t.removeAttribute("dir"):(a!==void 0&&(typeof a=="string"&&(n=a.split(" "),a=s[r]=n),a!==void 0&&l.add(...a)),t.dir=r),dm||(e.getWritable().__dir=r)}Xu=r,t.__lexicalDirTextContent=en,t.__lexicalDir=r}}function Fc(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&K(101),n.push(e),e=r.__next}return n}function bs(e,t){var n=xi.get(e),r=jo.get(e);n!==void 0&&r!==void 0||K(61);var o=eS||up.has(e)||ap.has(e);let i=Ic(Vt,e);if(n===r&&!o)return W(n)?(r=i.__lexicalTextContent,r!==void 0&&(xt+=r,Fr+=r),r=i.__lexicalDirTextContent,r!==void 0&&(en+=r)):(r=n.getTextContent(),Z(n)&&!n.isDirectionless()&&(en+=r),Fr+=r,xt+=r),i;if(n!==r&&o&&cm(Ca,Ea,kd,r,"updated"),r.updateDOM(n,i,Io))return r=Ju(e,null,null),t===null&&K(62),t.replaceChild(r,i),Qu(e,null),r;if(W(n)&&W(r)){if(e=r.__indent,e!==n.__indent&&tS(i,e),e=r.__format,e!==n.__format&&nS(i,e),o){e=r,o=en,en="",t=xt;var l=n.__size,s=e.__size;if(xt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)bs(a,i);else{var c=hp(a);u=Ju(u,null,null),i.replaceChild(u,c),Qu(a,null)}}else{u=Fc(n,xi);var d=Fc(e,jo);if(l===0)s!==0&&fp(d,e,0,s-1,i,null);else if(s===0)l!==0&&(a=i.__lexicalLineBreak==null,dp(u,0,l-1,a?null:i),a&&(i.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let m=i.firstChild,g=0;for(s=0;g<=d&&s<=l;){var h=f[g];let _=u[s];if(h===_)m=Tf(bs(_,i)),g++,s++;else{a===void 0&&(a=new Set(f)),c===void 0&&(c=new Set(u));let v=c.has(h),y=a.has(_);v?(y?(h=Ic(Vt,_),h===m?m=Tf(bs(_,i)):(m!=null?i.insertBefore(h,m):i.appendChild(h),bs(_,i)),g++):Ju(_,i,m),s++):(m=Tf(hp(h)),Qu(h,i),g++)}}a=g>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:Vt.getElementByKey(a),fp(u,e,s,l,i,a)):c&&!a&&dp(f,g,d,i)}}Dc(e)&&(xt+=`
108
+
109
+ `),i.__lexicalTextContent=xt,xt=t+xt,oS(e,i),en=o,rn(r)||r.isInline()||rS(n,r,i)}Dc(r)&&(xt+=`
110
+
111
+ `,Fr+=`
112
+
113
+ `)}else n=r.getTextContent(),Ke(r)?(o=r.decorate(Vt,Io),o!==null&&iS(e,o)):Z(r)&&!r.isDirectionless()&&(en+=n),xt+=n,Fr+=n;return!dm&&rn(r)&&r.__cachedText!==Fr&&(r=r.getWritable(),r.__cachedText=Fr),i}function iS(e,t){let n=Vt._pendingDecorators,r=Vt._decorators;if(n===null){if(r[e]===t)return;n=K_(Vt)}n[e]=t}function Tf(e){return e=e.nextSibling,e!==null&&e===Vt._blockCursorElement&&(e=e.nextSibling),e}function hp(e){let t=cp.get(e);return t===void 0&&K(75,e),t}let Lr=Object.freeze({}),pp=[["keydown",J2],["pointerdown",V2],["compositionstart",X2],["compositionend",Q2],["input",Y2],["click",H2],["cut",Lr],["copy",Lr],["dragstart",Lr],["dragover",Lr],["dragend",Lr],["paste",Lr],["focus",Lr],["blur",Lr],["drop",Lr]];Ac&&pp.push(["beforeinput",(e,t)=>G2(e,t)]);let $a=0,lS=0,sS=0,Yi=null,Ks=0,gp=!1,mp=!1,Gs=!1,Ts=!1,aS=[0,"",0,"root",0];function uS(e,t,n,r,o){let i=e.anchor,l=e.focus,s=i.getNode();var a=ot();let u=Pr(a._window),c=u!==null?u.anchorNode:null,d=i.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!Z(s)||(!o&&(!Ac||sS<r+50)||s.isDirty()&&2>f||G_(n))&&i.offset!==l.offset&&!s.isComposing()||ip(s)||s.isDirty()&&1<f||(o||!Ac)&&a!==null&&!s.isComposing()&&c!==Mc(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||B2(e,s)}function Ly(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function Dy(e,t,n){let{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:l}=e;gp&&(gp=!1,Ly(r,o)&&Ly(i,l))||Rn(t,()=>{if(!n)kr(null);else if(Ua(t,r,i)){var s=Ye();if(fe(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=Cd(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,m,g]=aS;c<g+200&&a.offset===h&&a.key===m?(s.format=d,s.style=f):a.type==="text"?(s.format=u.getFormat(),s.style=u.getStyle()):a.type==="element"&&(s.format=0,s.style="")}else{a=255,u=!1,c=s.getNodes();let d=c.length;for(let f=0;f<d;f++){let h=c[f];if(Z(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}J(t,wd,void 0)}})}function H2(e,t){Rn(t,()=>{let n=Ye();var r=Pr(t._window);let o=Yl();if(r)if(fe(n)){let l=n.anchor;var i=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!rn(i)&&Rr().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&o!==null&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),i!==r&&(W(i)?i.select(0):i.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(i=r.anchorNode,i!==null&&(i=i.nodeType,i===1||i===3))&&(r=hm(o,r,t),kr(r));J(t,y_,e)})}function V2(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&Rn(t,()=>{Ke(Ha(n))||(mp=!0)})}function cS(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function K2(e,t){return e!==t||W(e)||W(t)||!e.isToken()||!t.isToken()}function G2(e,t){let n=e.inputType,r=cS(e);n==="deleteCompositionText"||Do&&X_(t)||n!=="insertCompositionText"&&Rn(t,()=>{let o=Ye();if(n==="deleteContentBackward"){if(o===null){var i=Yl();if(!fe(i))return;kr(i.clone())}if(fe(o)){lS===229&&e.timeStamp<$a+30&&t.isComposing()&&o.anchor.key===o.focus.key?(Dt(null),$a=0,setTimeout(()=>{Rn(t,()=>{Dt(null)})},30),fe(o)&&(i=o.anchor.getNode(),i.markDirty(),o.format=i.getFormat(),o.style=i.getStyle())):(e.preventDefault(),J(t,wa,!0));return}}if(fe(o)){i=e.data,Yi!==null&&am(!1,t,Yi),o.dirty&&Yi===null||!o.isCollapsed()||rn(o.anchor.getNode())||r===null||o.applyDOMRange(r),Yi=null;var l=o.focus,s=o.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")i===`
114
+ `?(e.preventDefault(),J(t,Hs,!1)):i===`
115
+
116
+ `?(e.preventDefault(),J(t,tp,void 0)):i==null&&e.dataTransfer?(i=e.dataTransfer.getData("text/plain"),e.preventDefault(),o.insertRawText(i)):i!=null&&uS(o,r,i,e.timeStamp,!0)?(e.preventDefault(),J(t,vl,i)):Yi=i,sS=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":J(t,vl,e);break;case"insertFromComposition":Dt(null),J(t,vl,e);break;case"insertLineBreak":Dt(null),J(t,Hs,!1);break;case"insertParagraph":Dt(null),Gs&&!_d?(Gs=!1,J(t,Hs,!1)):J(t,tp,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":J(t,Qg,e);break;case"deleteByComposition":K2(s,l)&&J(t,np,e);break;case"deleteByDrag":case"deleteByCut":J(t,np,e);break;case"deleteContent":J(t,wa,!1);break;case"deleteWordBackward":J(t,_a,!0);break;case"deleteWordForward":J(t,_a,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":J(t,Sa,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":J(t,Sa,!1);break;case"formatStrikeThrough":J(t,_o,"strikethrough");break;case"formatBold":J(t,_o,"bold");break;case"formatItalic":J(t,_o,"italic");break;case"formatUnderline":J(t,_o,"underline");break;case"historyUndo":J(t,Jg,void 0);break;case"historyRedo":J(t,Zg,void 0)}}})}function Y2(e,t){e.stopPropagation(),Rn(t,()=>{var n=Ye(),r=e.data,o=cS(e);if(r!=null&&fe(n)&&uS(n,o,r,e.timeStamp,!1)){Ts&&(vp(t,r),Ts=!1);var i=n.anchor,l=i.getNode();if(o=Pr(t._window),o===null)return;let s=i.offset;(i=Ac&&!n.isCollapsed()&&Z(l)&&o.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),o=o.anchorNode,i=l===(o.nodeType===3?o.nodeValue:null)),i||J(t,vl,r),r=r.length,Do&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),tm||_d||nm||!t.isComposing()||($a=0,Dt(null))}else am(!1,t,r!==null?r:void 0),Ts&&(vp(t,r||void 0),Ts=!1);tn(),n=ot(),z_(n)}),Yi=null}function X2(e,t){Rn(t,()=>{let n=Ye();if(fe(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Dt(r.key),(e.timeStamp<$a+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&J(t,vl,N2)}})}function vp(e,t){var n=e._compositionKey;if(Dt(null),n!==null&&t!=null){if(t===""){t=bt(n),e=Mc(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&Z(t)&&um(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
117
+ `&&(n=Ye(),fe(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),J(e,Oc,null);return}}am(!0,e,t)}function Q2(e,t){Do?Ts=!0:Rn(t,()=>{vp(t,e.data)})}function J2(e,t){if($a=e.timeStamp,lS=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:l}=e;if(!J(t,x_,e)){if(n!==39||o||i||l)if(n!==39||l||r||!o&&!i)if(n!==37||o||i||l)if(n!==37||l||r||!o&&!i)if(n!==38||o||i)if(n!==40||o||i)if(n===13&&r)Gs=!0,J(t,Oc,e);else if(n===32)J(t,k_,e);else if(Bt&&o&&n===79)e.preventDefault(),Gs=!0,J(t,Hs,!0);else if(n!==13||r){var s=Bt?l||i?!1:n===8||n===72&&o:o||l||i?!1:n===8;s?n===8?J(t,b_,e):(e.preventDefault(),J(t,wa,!0)):n===27?J(t,T_,e):(s=Bt?r||l||i?!1:n===46||n===68&&o:o||l||i?!1:n===46,s?n===46?J(t,N_,e):(e.preventDefault(),J(t,wa,!1)):n===8&&(Bt?l:o)?(e.preventDefault(),J(t,_a,!0)):n===46&&(Bt?l:o)?(e.preventDefault(),J(t,_a,!1)):Bt&&i&&n===8?(e.preventDefault(),J(t,Sa,!0)):Bt&&i&&n===46?(e.preventDefault(),J(t,Sa,!1)):n===66&&!l&&(Bt?i:o)?(e.preventDefault(),J(t,_o,"bold")):n===85&&!l&&(Bt?i:o)?(e.preventDefault(),J(t,_o,"underline")):n===73&&!l&&(Bt?i:o)?(e.preventDefault(),J(t,_o,"italic")):n!==9||l||o||i?n===90&&!r&&(Bt?i:o)?(e.preventDefault(),J(t,Jg,void 0)):(s=Bt?n===90&&i&&r:n===89&&o||n===90&&o&&r,s?(e.preventDefault(),J(t,Zg,void 0)):Gl(t._editorState._selection)?(s=r?!1:n===67?Bt?i:o:!1,s?(e.preventDefault(),J(t,qg,e)):(s=r?!1:n===88?Bt?i:o:!1,s?(e.preventDefault(),J(t,em,e)):n===65&&(Bt?i:o)&&(e.preventDefault(),J(t,rp,e)))):!Do&&n===65&&(Bt?i:o)&&(e.preventDefault(),J(t,rp,e))):J(t,R_,e))}else Gs=!1,J(t,Oc,e);else J(t,$_,e);else J(t,C_,e);else J(t,E_,e);else J(t,S_,e);else J(t,__,e);else J(t,w_,e);(o||r||l||i)&&J(t,I_,e)}}}function dS(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let yl=new Map;function fS(e){e=e.target;let t=Pr(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=lm(t.anchorNode);if(n!==null){mp&&(mp=!1,Rn(n,()=>{var l=Yl(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=hm(l,t,n),kr(l))})),e=sm(n),e=e[e.length-1];var r=e._key,o=yl.get(r),i=o||e;i!==n&&Dy(t,i,!1),Dy(t,n,!0),n!==e?yl.set(r,n):o&&yl.delete(r)}}}function Z2(e,t){Ks===0&&e.ownerDocument.addEventListener("selectionchange",fS),Ks++,e.__lexicalEditor=t;let n=dS(e);for(let r=0;r<pp.length;r++){let[o,i]=pp[r],l=typeof i=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&i(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return J(t,em,s);case"copy":return J(t,qg,s);case"paste":return J(t,Qg,s);case"dragstart":return J(t,O_,s);case"dragover":return J(t,A_,s);case"dragend":return J(t,M_,s);case"focus":return J(t,L_,s);case"blur":return J(t,D_,s);case"drop":return J(t,P_,s)}};e.addEventListener(o,l),n.push(()=>{e.removeEventListener(o,l)})}}function yp(e,t,n){tn();var r=e.__key;let o=e.getParent();if(o!==null){var i=Ye();if(fe(i)&&W(e)){var{anchor:l,focus:s}=i,a=l.getNode(),u=s.getNode();jc(a,e)&&l.set(e.__key,0,"element"),jc(u,e)&&s.set(e.__key,0,"element")}if(a=i,u=!1,fe(a)&&t){i=a.anchor;let c=a.focus;i.key===r&&(Wc(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Wc(c,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Gl(a)&&t&&e.isSelected()&&e.selectPrevious();fe(a)&&t&&!u?(r=e.getIndexWithinParent(),di(e),Bc(a,o,r,-1)):di(e),n||or(o)||o.canBeEmpty()||!o.isEmpty()||yp(o,t),t&&rn(o)&&o.isEmpty()&&o.selectEnd()}}class Ka{static getType(){K(64,this.name)}static clone(){K(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,H_(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=bt(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||Ye(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return Z(this)?n:fe(t)&&t.anchor.type==="element"&&t.focus.type==="element"&&t.anchor.key===t.focus.key&&t.anchor.offset===t.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var t=this.getParent();if(t===null)return-1;t=t.getFirstChild();let n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:bt(t)}getParentOrThrow(){let t=this.getParent();return t===null&&K(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(or(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&K(67,this.__key),t}getParents(){let t=[],n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){let t=[],n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){let t=this.getLatest().__prev;return t===null?null:bt(t)}getPreviousSiblings(){let t=[];var n=this.getParent();if(n===null)return t;for(n=n.getFirstChild();n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let t=this.getLatest().__next;return t===null?null:bt(t)}getNextSiblings(){let t=[],n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){let n=this.getParents();var r=t.getParents();W(this)&&n.unshift(this),W(t)&&r.unshift(t),t=n.length;var o=r.length;if(t===0||o===0||n[t-1]!==r[o-1])return null;for(r=new Set(r),o=0;o<t;o++){let i=n[o];if(r.has(i))return i}return null}is(t){return t==null?!1:this.__key===t.__key}isBefore(t){if(this===t)return!1;if(t.isParentOf(this))return!0;if(this.isParentOf(t))return!1;var n=this.getCommonAncestor(t);let r=this;for(;;){var o=r.getParentOrThrow();if(o===n){o=r.getIndexWithinParent();break}r=o}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return o<n}isParentOf(t){let n=this.__key;if(n===t.__key)return!1;for(;t!==null;){if(t.__key===n)return!0;t=t.getParent()}return!1}getNodesBetween(t){let n=this.isBefore(t),r=[],o=new Set;for(var i=this;;){var l=i.__key;if(o.has(l)||(o.add(l),r.push(i)),i===t)break;if(l=W(i)?n?i.getFirstChild():i.getLastChild():null,l!==null)i=l;else if(l=n?i.getNextSibling():i.getPreviousSibling(),l!==null)i=l;else{if(i=i.getParentOrThrow(),o.has(i.__key)||r.push(i),i===t)break;l=i;do l===null&&K(68),i=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(i!==null||o.has(l.__key)||r.push(l));while(i===null)}}return n||r.reverse(),r}isDirty(){let t=ot()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=bt(this.__key);return t===null&&K(113),t}getWritable(){tn();var t=Or(),n=ot();t=t._nodeMap;let r=this.__key,o=this.getLatest(),i=o.__parent;n=n._cloneNotNeeded;var l=Ye();return l!==null&&(l._cachedNodes=null),n.has(r)?(Lc(o),o):(l=o.constructor.clone(o),l.__parent=i,l.__next=o.__next,l.__prev=o.__prev,W(o)&&W(l)?(l.__first=o.__first,l.__last=o.__last,l.__size=o.__size,l.__indent=o.__indent,l.__format=o.__format,l.__dir=o.__dir):Z(o)&&Z(l)&&(l.__format=o.__format,l.__style=o.__style,l.__mode=o.__mode,l.__detail=o.__detail),n.add(r),l.__key=r,Lc(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){K(70)}updateDOM(){K(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){K(72)}static importJSON(){K(18,this.name)}static transform(){return null}remove(t){yp(this,!0,t)}replace(t,n){tn();var r=Ye();r!==null&&(r=r.clone()),kf(this,t);let o=this.getLatest(),i=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;di(s);let u=o.getPreviousSibling(),c=o.getNextSibling(),d=o.__prev,f=o.__next,h=o.__parent;return yp(o,!1,!0),u===null?t.__first=l:u.getWritable().__next=l,s.__prev=d,c===null?t.__last=l:c.getWritable().__prev=l,s.__next=f,s.__parent=h,t.__size=a,n&&this.getChildren().forEach(m=>{s.append(m)}),fe(r)&&(kr(r),n=r.anchor,r=r.focus,n.key===i&&zy(n,s),r.key===i&&zy(r,s)),So()===i&&Dt(l),s}insertAfter(t,n=!0){tn(),kf(this,t);var r=this.getWritable();let o=t.getWritable();var i=o.getParent();let l=Ye();var s=!1,a=!1;if(i!==null){var u=t.getIndexWithinParent();di(o),fe(l)&&(a=i.__key,s=l.anchor,i=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=i.type==="element"&&i.key===a&&i.offset===u+1)}i=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=o.__key,d=r.__next;return i===null?u.__last=c:i.getWritable().__prev=c,u.__size++,r.__next=c,o.__next=d,o.__prev=r.__key,o.__parent=r.__parent,n&&fe(l)&&(n=this.getIndexWithinParent(),Bc(l,u,n+1),r=u.__key,s&&l.anchor.set(r,n+2,"element"),a&&l.focus.set(r,n+2,"element")),t}insertBefore(t,n=!0){tn(),kf(this,t);var r=this.getWritable();let o=t.getWritable(),i=o.__key;di(o);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=i:l.getWritable().__next=i,s.__size++,r.__prev=i,o.__prev=a,o.__next=r.__key,o.__parent=r.__parent,r=Ye(),n&&fe(r)&&(n=this.getParentOrThrow(),Bc(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return wi()}selectPrevious(t,n){tn();let r=this.getPreviousSibling(),o=this.getParentOrThrow();return r===null?o.select(0,0):W(r)?r.select():Z(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,o.select(t,t))}selectNext(t,n){tn();let r=this.getNextSibling(),o=this.getParentOrThrow();return r===null?o.select():W(r)?r.select(0,0):Z(r)?r.select(t,n):(t=r.getIndexWithinParent(),o.select(t,t))}markDirty(){this.getWritable()}}class Vl extends Ka{static getType(){return"linebreak"}static clone(t){return new Vl(t.__key)}constructor(t){super(t)}getTextContent(){return`
118
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>{let n=t.parentElement,r,o;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((o=n.lastChild)===t||o.previousSibling===t&&o.nodeType===3&&(o.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:q2,priority:0}}}}static importJSON(){return Ol()}exportJSON(){return{type:"linebreak",version:1}}}function q2(){return{node:Ol()}}function Ol(){return Va(new Vl)}function ka(e){return e instanceof Vl}function Nf(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function Rf(e,t){return t&1?"strong":t&2?"em":"span"}function Pf(e,t,n,r,o){e=r.classList,r=Vs(o,"base"),r!==void 0&&e.add(...r),r=Vs(o,"underlineStrikethrough");let i=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in ci)s=ci[a],r=Vs(o,a),r!==void 0&&(n&s?!i||a!=="underline"&&a!=="strikethrough"?(!(t&s)||l&&a==="underline"||a==="strikethrough")&&e.add(...r):t&s&&e.remove(...r):t&s&&e.remove(...r))}function Of(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?Sd:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||Do){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function Cu(e,t){return t=document.createElement(t),t.appendChild(e),t}class Pi extends Ka{static getType(){return"text"}static clone(t){return new Pi(t.__text,t.__key)}constructor(t,n){super(n),this.__text=t,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let t=this.getLatest();return L2[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===So()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=ci[t],(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){let r=this.getLatest().__format;return W_(r,t,n)}createDOM(t){var n=this.__format,r=Nf(this,n);let o=Rf(this,n),i=document.createElement(r===null?o:r),l=i;return this.hasFormat("code")&&i.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),i.appendChild(l)),r=l,Of(this.__text,r,this),t=t.theme.text,t!==void 0&&Pf(o,0,n,r,t),n=this.__style,n!==""&&(i.style.cssText=n),i}updateDOM(t,n,r){let o=this.__text;var i=t.__format,l=this.__format,s=Nf(this,i);let a=Nf(this,l);var u=Rf(this,i);let c=Rf(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(i=n.firstChild,i==null&&K(48),t=s=document.createElement(c),Of(o,t,this),r=r.theme.text,r!==void 0&&Pf(c,0,l,t,r),n.replaceChild(s,i),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&K(49)),Of(o,u,this),r=r.theme.text,r!==void 0&&i!==l&&Pf(c,i,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:nR,priority:0}),b:()=>({conversion:tR,priority:0}),code:()=>({conversion:uo,priority:0}),em:()=>({conversion:uo,priority:0}),i:()=>({conversion:uo,priority:0}),s:()=>({conversion:uo,priority:0}),span:()=>({conversion:eR,priority:0}),strong:()=>({conversion:uo,priority:0}),sub:()=>({conversion:uo,priority:0}),sup:()=>({conversion:uo,priority:0}),u:()=>({conversion:uo,priority:0})}}static importJSON(t){let n=$t(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){return{element:t}=super.exportDOM(t),t!==null&&$d(t)||K(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=Cu(t,"b")),this.hasFormat("italic")&&(t=Cu(t,"i")),this.hasFormat("strikethrough")&&(t=Cu(t,"s")),this.hasFormat("underline")&&(t=Cu(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(t){let n=this.getWritable();return n.__format=typeof t=="string"?ci[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?O2[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=ci[t],this.setFormat(this.getFormat()^t)}toggleDirectionless(){let t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){let t=this.getWritable();return t.__detail^=2,t}setMode(t){if(t=M2[t],this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(t){if(this.__text===t)return this;let n=this.getWritable();return n.__text=t,n}select(t,n){tn();let r=Ye();var o=this.getTextContent();let i=this.__key;if(typeof o=="string"?(o=o.length,t===void 0&&(t=o),n===void 0&&(n=o)):n=t=0,fe(r))o=So(),o!==r.anchor.key&&o!==r.focus.key||Dt(i),r.setTextNodeRange(this,t,this,n);else return gS(i,t,i,n,"text","text");return r}spliceText(t,n,r,o){let i=this.getWritable(),l=i.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=Ye();return o&&fe(u)&&(t+=s,u.setTextNodeRange(i,t,i,t)),n=l.slice(0,a)+r+l.slice(a+n),i.__text=n,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){tn();var n=this.getLatest(),r=n.getTextContent(),o=n.__key,i=So(),l=new Set(t);t=[];for(var s=r.length,a="",u=0;u<s;u++)a!==""&&l.has(u)&&(t.push(a),a=""),a+=r[u];if(a!==""&&t.push(a),l=t.length,l===0)return[];if(t[0]===r)return[n];var c=t[0];r=n.getParentOrThrow(),u=n.getFormat();let d=n.getStyle(),f=n.__detail;s=!1,n.isSegmented()?(a=$t(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=Ye(),a=[a],c=c.length;for(let g=1;g<l;g++){var h=t[g],m=h.length;h=$t(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let _=h.__key;if(m=c+m,fe(n)){let v=n.anchor,y=n.focus;v.key===o&&v.type==="text"&&v.offset>c&&v.offset<=m&&(v.key=_,v.offset-=c,n.dirty=!0),y.key===o&&y.type==="text"&&y.offset>c&&y.offset<=m&&(y.key=_,y.offset-=c,n.dirty=!0)}i===o&&Dt(_),c=m,a.push(h)}return o=this.getPreviousSibling(),i=this.getNextSibling(),o!==null&&Lc(o),i!==null&&Lc(i),o=r.getWritable(),i=this.getIndexWithinParent(),s?(o.splice(i,0,a),this.remove()):o.splice(i,1,a),fe(n)&&Bc(n,r,i,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||K(50);var r=this.__key;let o=t.__key,i=this.__text,l=i.length;So()===o&&Dt(r);let s=Ye();if(fe(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===o&&(Ky(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===o&&(Ky(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+i:i+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function eR(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",o=e.style.textDecoration==="underline",i=e.style.verticalAlign;return{forChild:l=>(Z(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),o&&l.toggleFormat("underline"),i==="sub"&&l.toggleFormat("subscript"),i==="super"&&l.toggleFormat("superscript")),l),node:null}}function tR(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(Z(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let Iy=new WeakMap;function nR(e){e.parentElement===null&&K(129);for(var t=e.textContent||"",n,r=e.parentNode,o=[e];r!==null&&(n=Iy.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<o.length;r++)Iy.set(o[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],o=t.length,n=0;n<o;n++)r=t[n],r===`
119
+ `||r===`\r
120
+ `?e.push(Ol()):r===" "?e.push(bd()):r!==""&&e.push($t(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(o=e,n=!0;o!==null&&(o=jy(o,!1))!==null;)if(r=o.textContent||"",0<r.length){/[ \t\n]$/.test(r)&&(t=t.slice(1)),n=!1;break}n&&(t=t.slice(1))}if(t[t.length-1]===" "){for(o=!0;e!==null&&(e=jy(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:$t(t)}}let rR=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function jy(e,t){for(;;){for(var n=void 0;(n=t?e.nextSibling:e.previousSibling)===null;)if(e=e.parentElement,e===null)return null;if(e=n,e.nodeType===1&&(n=e.style.display,n===""&&e.nodeName.match(rR)===null||n!==""&&!n.startsWith("inline")))return null;for(;(n=t?e.firstChild:e.lastChild)!==null;)e=n;if(e.nodeType===3)return e;if(e.nodeName==="BR")return null}}let oR={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function uo(e){let t=oR[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(Z(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function $t(e=""){return Va(new Pi(e))}function Z(e){return e instanceof Pi}class Kl extends Pi{static getType(){return"tab"}static clone(t){let n=new Kl(t.__key);return n.__text=t.__text,n.__format=t.__format,n.__style=t.__style,n}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){let n=bd();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){K(126)}setDetail(){K(127)}setMode(){K(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function bd(){return Va(new Kl)}class br{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode(),o=this.offset;if(t=t.offset,W(n)){var i=n.getDescendantByIndex(o);n=i??n}return W(r)&&(i=r.getDescendantByIndex(t),r=i??r),n===r?o<t:n.isBefore(r)}getNode(){let t=bt(this.key);return t===null&&K(20),t}set(t,n,r){let o=this._selection,i=this.key;this.key=t,this.offset=n,this.type=r,Xl()||(So()===i&&Dt(t),o!==null&&(o._cachedNodes=null,o.dirty=!0))}}function Af(e,t){let n=t.__key,r=e.offset,o="element";if(Z(t))o="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!W(t)){var i=t.getNextSibling();Z(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function zy(e,t){if(W(t)){let n=t.getLastDescendant();W(n)||Z(n)?Af(e,n):Af(e,t)}else Af(e,t)}function Fy(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=$t(),s=rn(o)?wi().append(l):l;l.setFormat(n),l.setStyle(r),i===null?o.append(s):(i.insertBefore(s),t.type==="element"&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function go(e,t,n,r){e.key=t,e.offset=n,e.type=r}class Td{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!Gl(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(o=>r.has(o))}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new Td(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),o=r.length;var i=r[o-1];if(Z(i))i=i.select();else{let l=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(l,l)}for(i.insertNodes(t,n),t=0;t<o;t++)r[t].remove();return!0}getNodes(){var t=this._cachedNodes;if(t!==null)return t;var n=this._nodes;t=[];for(let r of n)n=bt(r),n!==null&&t.push(n);return Xl()||(this._cachedNodes=t),t}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function fe(e){return e instanceof Oi}function xp(e){let[t,,n]=vS(e);e=n.getChildren();let r=e.length;var o=e[0].getChildren().length;let i=Array(r);for(var l=0;l<r;l++)i[l]=Array(o);for(o=0;o<r;o++){l=e[o].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;i[o][s];)s++;let u=l[a],c=u.__rowSpan||1,d=u.__colSpan||1;for(let f=0;f<c;f++)for(let h=0;h<d;h++)i[o+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:o,rowSpan:c};s+=d}}return null}class Nd{constructor(t,n,r){this.gridKey=t,this.anchor=n,this.focus=r,this.dirty=!1,this._cachedNodes=null,n._selection=this,r._selection=this}is(t){return fm(t)?this.gridKey===t.gridKey&&this.anchor.is(t.anchor)&&this.focus.is(t.focus):!1}set(t,n,r){this.dirty=!0,this.gridKey=t,this.anchor.key=n,this.focus.key=r,this._cachedNodes=null}clone(){return new Nd(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Zu(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return om(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=bt(this.anchor.key);if(jn(t)||K(103),t=xp(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=bt(this.focus.key);jn(n)||K(104);let r=xp(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let o=Math.max(t.columnIndex,r.columnIndex),i=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,o),fromY:Math.min(i,t),toX:Math.max(n,o),toY:Math.max(i,t)}}getNodes(){function t(_){let{cell:v,startColumn:y,startRow:x}=_;a=Math.min(a,y),u=Math.min(u,x),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,x+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=zc(r,jn);var o=zc(n,jn);jn(r)||K(103),jn(o)||K(104),n=r.getParent(),Ta(n)||K(105),n=n.getParent(),vm(n)||K(106);let[i,l,s]=mS(n,r,o),a=Math.min(l.startColumn,s.startColumn),u=Math.min(l.startRow,s.startRow),c=Math.max(l.startColumn+l.cell.__colSpan-1,s.startColumn+s.cell.__colSpan-1),d=Math.max(l.startRow+l.cell.__rowSpan-1,s.startRow+s.cell.__rowSpan-1);r=a,o=u;for(var f=a,h=u;a<r||u<o||c>f||d>h;){if(a<r){var m=h-o;--r;for(var g=0;g<=m;g++)t(i[o+g][r])}if(u<o)for(m=f-r,--o,g=0;g<=m;g++)t(i[o][r+g]);if(c>f)for(m=h-o,f+=1,g=0;g<=m;g++)t(i[o+g][f]);if(d>h)for(m=f-r,h+=1,g=0;g<=m;g++)t(i[h][r+g])}for(n=[n],r=null,o=u;o<=d;o++)for(f=a;f<=c;f++)({cell:h}=i[o][f]),m=h.getParent(),Ta(m)||K(107),m!==r&&n.push(m),n.push(h,...W2(h)),r=m;return Xl()||(this._cachedNodes=n),n}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function fm(e){return e instanceof Nd}class Oi{constructor(t,n,r,o){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=o,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return fe(t)?this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style:!1}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var t=this._cachedNodes;if(t!==null)return t;t=this.anchor;var n=this.focus,r=t.isBefore(n),o=r?t:n;r=r?n:t,t=o.getNode(),n=r.getNode();let i=o.offset;return o=r.offset,W(t)&&(r=t.getDescendantByIndex(i),t=r??t),W(n)&&(r=n.getDescendantByIndex(o),r!==null&&r!==t&&n.getChildAtIndex(o)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?W(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Xl()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,o){go(this.anchor,t.__key,n,"text"),go(this.focus,r.__key,o,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let n=t[0],r=t[t.length-1],o=this.anchor,i=this.focus,l=o.isBefore(i),[s,a]=Zu(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(W(f)&&!f.isInline())c||(u+=`
121
+ `),c=!f.isEmpty();else if(c=!1,Z(f)){let h=f.getTextContent();f===n?f===r?(o.type!=="element"||i.type!=="element"||i.offset===o.offset)&&(h=s<a?h.slice(s,a):h.slice(a,s)):h=l?h.slice(s):h.slice(a):f===r&&(h=l?h.slice(0,a):h.slice(0,s)),u+=h}else!Ke(f)&&!ka(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=ot(),r=n.getEditorState()._selection;if(t=pS(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[o,i]=t;go(this.anchor,o.key,o.offset,o.type),go(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new Oi(new br(t.key,t.offset,t.type),new br(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=W_(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&ci[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let o=0;o<r;o++){let i=t[o];i===`
122
+ `||i===`\r
123
+ `?n.push(Ol()):i===" "?n.push(bd()):n.push($t(i))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,o=this.isCollapsed()||n.isBefore(r),i=this.format,l=this.style;o&&n.type==="element"?Fy(n,r,i,l):o||r.type!=="element"||Fy(r,n,i,l);var s=this.getNodes(),a=s.length,u=o?r:n;r=(o?n:r).offset;var c=u.offset;n=s[0],Z(n)||K(26),o=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===o&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(Z(h)&&h.canInsertTextBefore()&&!ip(h)||(h=$t(),h.setFormat(i),d.canInsertTextAfter()?n.insertAfter(h):d.insertAfter(h)),h.select(0,0),n=h,t!==""){this.insertText(t);return}}else if(this.isCollapsed()&&r===0&&(n.isSegmented()||n.isToken()||!n.canInsertTextBefore()||!d.canInsertTextBefore()&&n.getPreviousSibling()===null)){if(h=n.getPreviousSibling(),(!Z(h)||ip(h))&&(h=$t(),h.setFormat(i),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==o)d=$t(n.getTextContent()),d.setFormat(i),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!W(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),hS(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=$t(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==i||a!==l))if(n.getTextContent()==="")n.setFormat(i),n.setStyle(l);else{s=$t(t),s.setFormat(i),s.setStyle(l),s.select(),r===0?n.insertBefore(s,!1):([a]=n.splitText(r),a.insertAfter(s,!1)),s.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);return}n=n.spliceText(r,c-r,t,!0),n.getTextContent()===""?n.remove():this.anchor.type==="text"&&(n.isComposing()?this.anchor.offset-=t.length:(this.format=s,this.style=a))}else{if(i=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=W(n)?n:n.getParentOrThrow(),l=W(f)?f:f.getParentOrThrow(),d=f,!h.is(l)&&l.isInline())do d=l,l=l.getParentOrThrow();while(l.isInline());if(u.type==="text"&&(c!==0||f.getTextContent()==="")||u.type==="element"&&f.getIndexWithinParent()<c)if(Z(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var m=$t(f.getTextContent());f.replace(m),f=m}rn(u.getNode())||(f=f.spliceText(0,c,"")),i.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else i.add(f.__key);for(u=l.getChildren(),c=new Set(s),f=h.is(l),h=h.isInline()&&n.getNextSibling()===null?h:n,m=u.length-1;0<=m;m--){let g=u[m];if(g.is(n)||W(g)&&g.isParentOf(n))break;g.isAttached()&&(!c.has(g)||g.is(d)?f||h.insertAfter(g,!1):g.remove())}if(!f)for(u=l,c=null;u!==null;)l=u.getChildren(),f=l.length,(f===0||l[f-1].is(c))&&(i.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===o?n.select():(t=$t(t),t.select(),n.replace(t)):(n=n.spliceText(r,o-r,t,!0),n.getTextContent()===""?n.remove():n.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length)),t=1;t<a;t++)n=s[t],i.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Dt(null);else{var n=this.getNodes(),r=[];for(var o of n)Z(o)&&r.push(o);var i=r.length;if(i===0)this.toggleFormat(t),Dt(null);else{o=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:o,o=s?o:l;var a=0,u=r[0];if(l=n.type==="element"?0:n.offset,n.type==="text"&&l===u.getTextContentSize()&&(a=1,u=r[1],l=0),u!=null){s=u.getFormatFlags(t,null);var c=i-1,d=r[c];if(i=o.type==="text"?o.offset:d.getTextContentSize(),u.is(d))l!==i&&(l===0&&i===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,i),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),o.type==="text"&&o.set(t.__key,i-l,"text")),this.format=s);else{l!==0&&([,u]=u.splitText(l),l=0),u.setFormat(s);var f=d.getFormatFlags(t,s);for(0<i&&(i!==d.getTextContentSize()&&([d]=d.splitText(i)),d.setFormat(f)),a+=1;a<c;a++){let h=r[a];if(!h.isToken()){let m=h.getFormatFlags(t,f);h.setFormat(m)}}n.type==="text"&&n.set(u.__key,l,"text"),o.type==="text"&&o.set(d.__key,i,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,o=r.getNode().getNextSibling();if(o=o?o.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===o&&this.focus.offset===0){var i=$t();this.focus.getNode().insertBefore(i)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(i=$t(),this.focus.getNode().insertAfter(i));i&&(this.focus.set(i.__key,0,"text"),this.anchor.set(i.__key,0,"text"))}}i=this.anchor,r=i.offset;var l=i.getNode();o=l,i.type==="element"&&(i=i.getNode(),o=i.getChildAtIndex(r-1),o=o===null?i:o),i=[];var s=l.getNextSiblings(),a=or(l)?null:l.getTopLevelElementOrThrow();if(Z(l))if(o=l.getTextContent().length,r===0&&o!==0)o=l.getPreviousSibling(),o=o!==null?o:l.getParentOrThrow(),i.push(l);else if(r===o)o=l;else{if(l.isToken())return!1;[o,l]=l.splitText(r),i.push(l)}l=o,i.push(...s),s=t[0];var u=!1,c=null;for(let m=0;m<t.length;m++){var d=t[m];if(or(o)||Ke(o)||!W(d)||d.isInline())u&&!W(d)&&!Ke(d)&&or(o.getParent())&&K(28);else{if(d.is(s)){if(W(o)&&o.isEmpty()&&o.canReplaceWith(d)){o.replace(d),o=d,u=!0;continue}if(u=d.getFirstDescendant(),U_(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,W(o)){var h=o.getFirstChild();for(let g=0;g<u;g++){let _=c[g];h===null?o.append(_):h.insertAfter(_),h=_}}else{for(h=u-1;0<=h;h--)o.insertAfter(c[h]);o=o.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}Z(o)&&(a===null&&K(27),o=a)}u=!1,W(o)&&!o.isInline()?(c=d,Ke(d)&&!d.isInline()?o=t.length===1&&o.canBeEmpty()&&o.isEmpty()?o.insertBefore(d,!1):o.insertAfter(d,!1):W(d)?(d.canBeEmpty()||!d.isEmpty())&&(rn(o)?(f=o.getChildAtIndex(r),f!==null?f.insertBefore(d):o.append(d),o=d):d.isInline()?(o.append(d),o=d):o=o.insertAfter(d,!1)):(f=o.getFirstChild(),f!==null?f.insertBefore(d):o.append(d),o=d)):!W(d)||W(d)&&d.isInline()||Ke(o)&&!o.isInline()?(c=d,fe(this)&&Ke(d)&&(W(o)||Z(o))&&!d.isInline()?(Z(o)?(f=o.getParentOrThrow(),[o]=o.splitText(r),o=o.getIndexWithinParent()+1):(f=o,o=r),[,o]=Z_(f,o),o=o.insertBefore(d)):o=o.insertAfter(d,!1)):(d=o.getParentOrThrow(),ka(o)&&o.remove(),o=d,m--)}if(n&&(Z(l)?l.select():(t=o.getPreviousSibling(),Z(t)?t.select():(t=o.getIndexWithinParent(),o.getParentOrThrow().select(t,t)))),W(o)){if(t=Z(c)?c:W(c)&&c.isInline()?c.getLastDescendant():o.getLastDescendant(),n||(t===null?o.select():Z(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),i.length!==0)for(n=o,t=i.length-1;0<=t;t--)r=i[t],a=r.getParentOrThrow(),!W(o)||wp(r)||Ke(r)&&(!r.isInline()||r.isIsolated())?W(o)||wp(r)?W(r)&&!r.canInsertAfter(o)?(l=a.constructor.clone(a),W(l)||K(29),l.append(r),o.insertAfter(l)):o.insertAfter(r):(o.insertBefore(r),o=r):(n===o?o.append(r):o.insertBefore(r),o=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(Z(o)?o.select():(n=o.getParentOrThrow(),t=o.getIndexWithinParent()+1,n.select(t,t)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var t=this.anchor,n=t.offset,r=[];if(t.type==="text"){var o=t.getNode(),i=o.getNextSiblings().reverse(),l=o.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():o.getTextContentSize();n===0?i.push(o):(s&&(r=l.getNextSiblings()),n===a||s&&n===o.getTextContentSize()||([,o]=o.splitText(n),i.push(o)))}else{if(l=t.getNode(),or(l)){i=wi(),r=l.getChildAtIndex(n),i.select(),r!==null?r.insertBefore(i,!1):l.append(i);return}i=l.getChildren().slice(n).reverse()}if(o=i.length,n===0&&0<o&&l.isInline()){if(r=l.getParentOrThrow(),i=r.insertNewAfter(this,!1),W(i))for(r=r.getChildren(),l=0;l<r.length;l++)i.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(W(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<o)l.insertBefore(s);else{if(l=null,n=r.length,t=s.getParentOrThrow(),0<n)for(a=0;a<n;a++)t.append(r[a]);if(o!==0)for(r=0;r<o;r++)n=i[r],l===null?s.append(n):l.insertBefore(n),l=n;s.canBeEmpty()||s.getChildrenSize()!==0?s.selectStart():(s.selectPrevious(),s.remove())}}insertLineBreak(t){let n=Ol();var r=this.anchor;r.type==="element"&&(r=r.getNode(),rn(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Zu(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,o=this.anchor;let i=this.focus;var l=t[0];let s=t[r],[a,u]=Zu(this);return n===0?[]:n===1?Z(l)&&!this.isCollapsed()?(t=a>u?u:a,r=l.splitText(t,a>u?a:u),t=t===0?r[0]:r[1],t!=null?[t]:[]):[l]:(n=o.isBefore(i),Z(l)&&(o=n?a:u,o===l.getTextContentSize()?t.shift():o!==0&&([,l]=l.splitText(o),t[0]=l)),Z(s)&&(l=s.getTextContent().length,n=n?u:a,n===0?t.pop():n!==l&&([s]=s.splitText(n),t[r]=s)),t)}modify(t,n,r){var o=this.focus,i=this.anchor,l=t==="move",s=lp(o,n);if(Ke(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=_p(),n.add(s.__key),kr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),Z(t)?(s=t.__key,n=n?t.getTextContent().length:0,o.set(s,n,"text"),l&&i.set(s,n,"text")):(r=s.getParentOrThrow(),W(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),o.set(r,s,"element"),l&&i.set(r,s,"element")));else if(i=ot(),o=Pr(i._window)){var a=i._blockCursorElement,u=i._rootElement;if(u===null||a===null||!W(s)||s.isInline()||s.canBeEmpty()||sp(a,i,u),o.modify(t,n?"backward":"forward",r),0<o.rangeCount&&(s=o.getRangeAt(0),i=this.anchor.getNode(),i=rn(i)?i:Q_(i),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],jc(u,i)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],W(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],W(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(o.anchorNode!==s.startContainer||o.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,o=l.key,s=l.offset,i=l.type,go(l,n.key,n.offset,n.type),go(n,o,s,i),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&(r.type==="element"&&W(i)&&r.offset===i.getChildrenSize()||r.type==="text"&&r.offset===i.getTextContentSize())){var l=i.getParent();if(l=i.getNextSibling()||(l===null?null:l.getNextSibling()),W(l)&&l.isShadowRoot())return}if(l=lp(o,t),Ke(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&W(i)&&i.getChildrenSize()===0?(i.remove(),t=_p(),t.add(l.__key),kr(t)):(l.remove(),ot().dispatchCommand(wd,void 0));return}if(!t&&W(l)&&W(i)&&i.isEmpty()){i.remove(),l.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l=o.type==="text"?o.getNode():null,i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&r!==0){Wy(l,t,r);return}}else if(i!==null&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&r!==0||!t&&r!==o)){Wy(i,t,r);return}if(i=this.anchor,l=this.focus,r=i.getNode(),o=l.getNode(),r===o&&i.type==="text"&&l.type==="text"){var s=i.offset,a=l.offset;let u=s<a;o=u?s:a,a=u?a:s,s=a-1,o!==s&&(r=r.getTextContent().slice(o,a),G_(r)||(t?l.offset=s:i.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&rn(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this))}deleteLine(t){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character")),this.removeText()}deleteWord(t){this.isCollapsed()&&this.modify("extend",t,"word"),this.removeText()}}function Gl(e){return e instanceof Td}function By(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function Zu(e){let t=e.anchor;return e=e.focus,t.type==="element"&&e.type==="element"&&t.key===e.key&&t.offset===e.offset?[0,0]:[By(t),By(e)]}function Wy(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let s=0;s<o;s++){let a=r[s],u=s===o-1;if(l=i,i+=a.length,t&&i===n||i>n||u){r.splice(s,1),u&&(l=void 0);break}}t=r.join("").trim(),t===""?e.remove():(e.setTextContent(t),e.select(l,l))}function Uy(e,t,n,r){var o=t;if(e.nodeType===1){let s=!1;var i=e.childNodes,l=i.length;o===l&&(s=!0,o=l-1);let a=i[o];if(l=!1,a===r._blockCursorElement?(a=i[o+1],l=!0):r._blockCursorElement!==null&&o--,r=sl(a),Z(r))o=s?r.getTextContentSize():0;else{if(i=sl(e),i===null)return null;if(W(i)?(e=i.getChildAtIndex(o),(t=W(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(i=e,o=0):(e=n,i=W(e)?e:e.getParentOrThrow())),Z(e)?(r=e,i=null,o=s?e.getTextContentSize():0):e!==i&&s&&!l&&o++):(o=i.getIndexWithinParent(),o=t===0&&Ke(i)&&sl(e)===i?o:o+1,i=i.getParentOrThrow()),W(i))return new br(i.__key,o,"element")}}else r=sl(e);return Z(r)?new br(r.__key,o,"text"):null}function Hy(e,t,n){var r=e.offset,o=e.getNode();r===0?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&r===null&&W(o)&&o.isInline()&&(t=o.getPreviousSibling(),Z(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):W(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Z(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&W(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&W(o)&&o.isInline()&&!o.canInsertTextAfter()&&(t=o.getNextSibling(),Z(t)&&(e.key=t.__key,e.offset=0)))}function hS(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let o=e.is(t);Hy(e,r,o),Hy(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=ot(),r.isComposing()&&r._compositionKey!==e.key&&fe(n)&&(r=n.anchor,n=n.focus,go(e,r.key,r.offset,r.type),go(t,n.key,n.offset,n.type))}}function pS(e,t,n,r,o,i){return e===null||n===null||!Ua(o,e,n)||(t=Uy(e,t,fe(i)?i.anchor:null,o),t===null)||(r=Uy(n,r,fe(i)?i.focus:null,o),r===null||t.type==="element"&&r.type==="element"&&(e=sl(e),n=sl(n),Ke(e)&&Ke(n)))?null:(hS(t,r,i),[t,r])}function wp(e){return W(e)&&!e.isInline()}function gS(e,t,n,r,o,i){let l=Or();return e=new Oi(new br(e,t,o),new br(n,r,i),0,""),e.dirty=!0,l._selection=e}function _p(){return new Td(new Set)}function iR(e){let t=e.getEditorState()._selection,n=Pr(e._window);return Gl(t)||fm(t)?t.clone():hm(t,n,e)}function hm(e,t,n){var r=n._window;if(r===null)return null;var o=r.event,i=o?o.type:void 0;r=i==="selectionchange",o=!op&&(r||i==="beforeinput"||i==="compositionstart"||i==="compositionend"||i==="click"&&o&&o.detail===3||i==="drop"||i===void 0);let l;if(!fe(e)||o){if(t===null)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&fe(e)&&!Ua(n,o,i))return e.clone()}else return e.clone();if(n=pS(o,l,i,t,n,e),n===null)return null;let[s,a]=n;return new Oi(s,a,fe(e)?e.format:0,fe(e)?e.style:"")}function Ye(){return Or()._selection}function Yl(){return ot()._editorState._selection}function Bc(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),s=i.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=o.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),Vy(e));else{let u=e.isBackward();s=u?i:o;var a=s.getNode();o=u?o:i,i=o.getNode(),t.is(a)&&(a=s.offset,(n<=a&&0<r||n<a&&0>r)&&s.set(l,Math.max(0,a+r),"element")),t.is(i)&&(t=o.offset,(n<=t&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}Vy(e)}}function Vy(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())W(i)&&(l=i.getChildrenSize(),l=(o=n>=l)?i.getChildAtIndex(l-1):i.getChildAtIndex(n),Z(l)&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(W(i)){let s=i.getChildrenSize();n=(e=n>=s)?i.getChildAtIndex(s-1):i.getChildAtIndex(n),Z(n)&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}W(l)&&(n=l.getChildrenSize(),o=(t=o>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(o),Z(o)&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function lR(e,t){if(t=t.getEditorState()._selection,e=e._selection,fe(e)){var n=e.anchor;let r=e.focus,o;n.type==="text"&&(o=n.getNode(),o.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),o!==n&&n.selectionTransform(t,e))}}function Wc(e,t,n,r,o){let i=null,l=0,s=null;r!==null?(i=r.__key,Z(r)?(l=r.getTextContentSize(),s="text"):W(r)&&(l=r.getChildrenSize(),s="element")):o!==null&&(i=o.__key,Z(o)?s="text":W(o)&&(s="element")),i!==null&&s!==null?e.set(i,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function Ky(e,t,n,r,o){e.type==="text"?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function mS(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];Ta(l)||K(108);var s=l.getChildren();l=0;for(let d of s){for(jn(d)||K(109);r[c]!==void 0&&r[c][l]!==void 0;)l++;s=c;var a=l,u=d;let f={cell:u,startColumn:a,startRow:s},h=u.__rowSpan,m=u.__colSpan;for(let g=0;g<h;g++){r[s+g]===void 0&&(r[s+g]=[]);for(let _=0;_<m;_++)r[s+g][a+_]=f}t.is(u)&&(o=f),n.is(u)&&(i=f),l+=d.__colSpan}}return o===null&&K(110),i===null&&K(111),[r,o,i]}function vS(e){e instanceof mm||(e instanceof Ka?(e=zc(e,jn),jn(e)||K(114)):(e=zc(e.getNode(),jn),jn(e)||K(114)));let t=e.getParent();Ta(t)||K(115);let n=t.getParent();return vm(n)||K(116),[e,t,n]}let Tt=null,Nt=null,yn=!1,Mf=!1,ba=0,Gy={characterData:!0,childList:!0,subtree:!0};function Xl(){return yn||Tt!==null&&Tt._readOnly}function tn(){yn&&K(13)}function Or(){return Tt===null&&K(15),Tt}function ot(){return Nt===null&&K(16),Nt}function Yy(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(o===void 0&&K(30,r),e=n.get(r),e===void 0&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function sR(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),Z(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&B_(t)}function aR(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=So(),i=new Map;var l=n;let s=l.size;for(var a=r,u=a.size;0<s||0<u;){if(0<s){t._dirtyLeaves=new Set;for(let c of l)l=e.get(c),Z(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&B_(l),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Yy(t,l,i),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){ba++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let c of a)a=c[0],u=c[1],(a==="root"||u)&&(l=e.get(a),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Yy(t,l,i),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,ba++}t._dirtyLeaves=n,t._dirtyElements=r}function pm(e,t){var n=e.type,r=t.get(n);if(r===void 0&&K(17,n),n=r.klass,e.type!==n.getType()&&K(18,n.name),n=n.importJSON(e),e=e.children,W(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=pm(e[r],t);n.append(o)}return n}function Xy(e,t){let n=Tt,r=yn,o=Nt;Tt=e,yn=!0,Nt=null;try{return t()}finally{Tt=n,yn=r,Nt=o}}function fi(e,t){let n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n!==null){var i=e._editorState,l=i._selection,s=n._selection,a=e._dirtyType!==0,u=Tt,c=yn,d=Nt,f=e._updating,h=e._observer,m=null;if(e._pendingEditorState=null,e._editorState=n,!o&&a&&h!==null){Nt=e,Tt=n,yn=!1,e._updating=!0;try{let Re=e._dirtyType,yt=e._dirtyElements,qe=e._dirtyLeaves;h.disconnect();var g=Re,_=yt,v=qe;en=Fr=xt="",eS=g===2,Xu=null,Vt=e,Io=e._config,Ea=e._nodes,kd=Vt._listeners.mutation,ap=_,up=v,xi=i._nodeMap,jo=n._nodeMap,dm=n._readOnly,cp=new Map(e._keyToDOMMap);let Yt=new Map;Ca=Yt,bs("root",null),Ca=cp=Io=jo=xi=up=ap=Ea=Vt=void 0,m=Yt}catch(Re){if(Re instanceof Error&&e._onError(Re),Mf)throw Re;_S(e,null,r,n),F_(e),e._dirtyType=2,Mf=!0,fi(e,i),Mf=!1;return}finally{h.observe(r,Gy),e._updating=f,Tt=u,yn=c,Nt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,x=e._dirtyElements,S=e._normalizedNodes,k=e._updateTags,T=e._deferred;a&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set);var b=e._decorators,N=e._pendingDecorators||b,D=n._nodeMap,M;for(M in N)D.has(M)||(N===b&&(N=K_(e)),delete N[M]);var j=o?null:Pr(e._window);if(e._editable&&j!==null&&(a||s===null||s.dirty)){Nt=e,Tt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let Re=e._blockCursorElement;Re!==null&&sp(Re,e,r);e:{let yt=j.anchorNode,qe=j.focusNode,Yt=j.anchorOffset,dn=j.focusOffset,ct=document.activeElement;if(!(k.has("collaboration")&&ct!==r||ct!==null&&im(ct)))if(fe(s)){var B=s.anchor,re=s.focus,V=B.key,Y=re.key,C=Ic(e,V),$=Ic(e,Y),E=B.offset,O=re.offset,R=s.format,F=s.style,H=s.isCollapsed(),ae=C,oe=$,$e=!1;if(B.type==="text"){ae=Mc(C);let Et=B.getNode();$e=Et.getFormat()!==R||Et.getStyle()!==F}else fe(l)&&l.anchor.type==="text"&&($e=!0);if(re.type==="text"&&(oe=Mc($)),ae!==null&&oe!==null){if(H&&(l===null||$e||fe(l)&&(l.format!==R||l.style!==F))){var _e=performance.now();aS=[R,F,E,V,_e]}if(Yt===E&&dn===O&&yt===ae&&qe===oe&&(j.type!=="Range"||!H)&&(ct!==null&&r.contains(ct)||r.focus({preventScroll:!0}),B.type!=="element"))break e;try{j.setBaseAndExtent(ae,E,oe,O)}catch{}if(!k.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let Et=s instanceof Oi&&s.anchor.type==="element"?ae.childNodes[E]||null:0<j.rangeCount?j.getRangeAt(0):null;if(Et!==null){let Xt;if(Et instanceof Text){let lt=document.createRange();lt.selectNode(Et),Xt=lt.getBoundingClientRect()}else Xt=Et.getBoundingClientRect();let xn=r.ownerDocument,Mr=xn.defaultView;if(Mr!==null)for(var{top:Q,bottom:Ne}=Xt,ye,Se,pe=r;pe!==null;){let lt=pe===xn.body;if(lt)ye=0,Se=Cd(e).innerHeight;else{let Xo=pe.getBoundingClientRect();ye=Xo.top,Se=Xo.bottom}let fr=0;if(Q<ye?fr=-(ye-Q):Ne>Se&&(fr=Ne-Se),fr!==0)if(lt)Mr.scrollBy(0,fr);else{let Xo=pe.scrollTop;pe.scrollTop+=fr;let os=pe.scrollTop-Xo;Q-=os,Ne-=os}if(lt)break;pe=Ed(pe)}}}gp=!0}}else l!==null&&Ua(e,yt,qe)&&j.removeAllRanges()}}e:{let Re=e._blockCursorElement;if(fe(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let yt=s.anchor,qe=yt.getNode(),Yt=yt.offset,dn=qe.getChildrenSize(),ct=!1,Et=null;if(Yt===dn){let Xt=qe.getChildAtIndex(Yt-1);bf(Xt)&&(ct=!0)}else{let Xt=qe.getChildAtIndex(Yt);if(bf(Xt)){let xn=Xt.getPreviousSibling();(xn===null||bf(xn))&&(ct=!0,Et=e.getElementByKey(Xt.__key))}}if(ct){let Xt=e.getElementByKey(qe.__key);if(Re===null){let xn=e._config.theme,Mr=document.createElement("div");Mr.contentEditable="false",Mr.setAttribute("data-lexical-cursor","true");let lt=xn.blockCursor;if(lt!==void 0){if(typeof lt=="string"){let fr=lt.split(" ");lt=xn.blockCursor=fr}lt!==void 0&&Mr.classList.add(...lt)}e._blockCursorElement=Re=Mr}r.style.caretColor="transparent",Et===null?Xt.appendChild(Re):Xt.insertBefore(Re,Et);break e}}Re!==null&&sp(Re,e,r)}h!==null&&h.observe(r,Gy)}finally{Nt=d,Tt=u}}if(m!==null){var Te=m;let Re=Array.from(e._listeners.mutation),yt=Re.length;for(let qe=0;qe<yt;qe++){let[Yt,dn]=Re[qe],ct=Te.get(dn);ct!==void 0&&Yt(ct,{dirtyLeaves:y,prevEditorState:i,updateTags:k})}}fe(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(wd,void 0);var We=e._pendingDecorators;We!==null&&(e._decorators=We,e._pendingDecorators=null,Ys("decorator",e,!0,We));var At=Oy(t||i),cn=Oy(n);if(At!==cn&&Ys("textcontent",e,!0,cn),Ys("update",e,!0,{dirtyElements:x,dirtyLeaves:y,editorState:n,normalizedNodes:S,prevEditorState:t||i,tags:k}),e._deferred=[],T.length!==0){let Re=e._updating;e._updating=!0;try{for(let yt=0;yt<T.length;yt++)T[yt]()}finally{e._updating=Re}}var Gn=e._updates;if(Gn.length!==0){let Re=Gn.shift();if(Re){let[yt,qe]=Re;yS(e,yt,qe)}}}}function Ys(e,t,n,...r){let o=t._updating;t._updating=n;try{let i=Array.from(t._listeners[e]);for(e=0;e<i.length;e++)i[e].apply(null,r)}finally{t._updating=o}}function J(e,t,n){if(e._updating===!1||Nt!==e){let i=!1;return e.update(()=>{i=J(e,t,n)}),i}let r=sm(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(o!==void 0&&(o=o[i],o!==void 0)){o=Array.from(o);let s=o.length;for(let a=0;a<s;a++)if(o[a](n,e)===!0)return!0}}return!1}function Qy(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[o,i]=r,l;i!==void 0&&(r=i.onUpdate,l=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),o()}}return t}function yS(e,t,n){let r=e._updateTags;var o,i=o=!1;if(n!==void 0){var l=n.onUpdate;o=n.tag,o!=null&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState,l=e._pendingEditorState;let s=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=new Rd(new Map((l||n)._nodeMap)),s=!0),l._flushSync=i,i=Tt;let a=yn,u=Nt,c=e._updating;Tt=l,yn=!1,e._updating=!0,Nt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=iR(e));let d=e._compositionKey;t(),o=Qy(e,o),lR(l,e),e._dirtyType!==0&&(o?sR(l,e):aR(l,e),Qy(e),U2(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(fe(f)){let h=l._nodeMap,m=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(m)!==void 0||K(19)}else Gl(f)&&f._nodes.size===0&&(l._selection=null)}catch(d){d instanceof Error&&e._onError(d),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),fi(e);return}finally{Tt=i,yn=a,Nt=u,e._updating=c,ba=0}e._dirtyType!==0||uR(l,e)?l._flushSync?(l._flushSync=!1,fi(e)):s&&z2(()=>{fi(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Rn(e,t,n){e._updating?e._updates.push([t,n]):yS(e,t,n)}class xS extends Ka{constructor(t){super(t)}decorate(){K(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ke(e){return e instanceof xS}class Ai extends Ka{constructor(t){super(t),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let t=this.getFormat();return A2[t]||""}getIndent(){return this.getLatest().__indent}getChildren(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let t=ot()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){let t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){let t=[],n=this.getFirstChild();for(;n!==null;){if(Z(n)&&t.push(n),W(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(W(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(W(t)){let n=t.getLastChild();if(n!==null){t=n;continue}}break}return t}getDescendantByIndex(t){let n=this.getChildren(),r=n.length;return t>=r?(t=n[r-1],W(t)&&t.getLastDescendant()||t||null):(t=n[t],W(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:bt(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&K(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:bt(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&K(96,this.__key),t}getChildAtIndex(t){var n=this.getChildrenSize();let r;if(t<n/2){for(r=this.getFirstChild(),n=0;r!==null&&n<=t;){if(n===t)return r;r=r.getNextSibling(),n++}return null}for(r=this.getLastChild(),--n;r!==null&&n>=t;){if(n===t)return r;r=r.getPreviousSibling(),n--}return null}getTextContent(){let t="",n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContent(),W(i)&&o!==r-1&&!i.isInline()&&(t+=`
124
+
125
+ `)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContentSize(),W(i)&&o!==r-1&&!i.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=Ty[t],(this.getFormat()&t)!==0):!1}select(t,n){tn();let r=Ye(),o=t,i=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),Z(t)||W(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),Z(t)||W(t)))return t.select()}if(o===void 0&&(o=l),i===void 0&&(i=l),l=this.__key,fe(r))r.anchor.set(l,o,"element"),r.focus.set(l,i,"element"),r.dirty=!0;else return gS(l,o,l,i,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return W(t)||Z(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return W(t)||Z(t)?t.select():t!==null?t.selectNext():this.select()}clear(){let t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){let n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?Ty[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let o=r.length,i=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=i-n+o;if(t!==0)if(t===i)d=this.getLastChild();else{var h=this.getChildAtIndex(t);h!==null&&(d=h.getPreviousSibling())}if(0<n){var m=d===null?this.getFirstChild():d.getNextSibling();for(h=0;h<n;h++){m===null&&K(100);var g=m.getNextSibling(),_=m.__key;m=m.getWritable(),di(m),u.push(_),m=g}}for(h=d,g=0;g<o;g++){_=r[g],h!==null&&_.is(h)&&(d=h=h.getPreviousSibling()),m=_.getWritable(),m.__parent===s&&f--,di(m);let v=_.__key;h===null?(l.__first=v,m.__prev=null):(h=h.getWritable(),h.__next=v,m.__prev=h.__key),_.__key===s&&K(76),m.__parent=s,a.push(v),h=_}if(t+n===i?h!==null&&(h.getWritable().__next=null,l.__last=h.__key):c!==null&&(t=c.getWritable(),h!==null?(n=h.getWritable(),t.__prev=h.__key,n.__next=c.__key):t.__prev=null),l.__size=f,u.length&&(t=Ye(),fe(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;Jy(v,u,a)&&Wc(v,v.getNode(),this,d,c),Jy(y,u,a)&&Wc(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||or(this)||this.remove()}return l}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function W(e){return e instanceof Ai}function Jy(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Ql extends Ai{static getType(){return"root"}static clone(){return new Ql}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){K(51)}getTextContent(){let t=this.__cachedText;return!Xl()&&ot()._dirtyType!==0||t===null?super.getTextContent():t}remove(){K(52)}replace(){K(53)}insertBefore(){K(54)}insertAfter(){K(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];W(r)||Ke(r)||K(56)}return super.append(...t)}static importJSON(t){let n=Rr();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function rn(e){return e instanceof Ql}function uR(e,t){if(t=t.getEditorState()._selection,e=e._selection,e!==null){if(e.dirty||!e.is(t))return!0}else if(t!==null)return!0;return!1}function gm(){return new Rd(new Map([["root",new Ql]]))}function wS(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&K(130,n.name);let r=t.children;if(W(e))for(Array.isArray(r)||K(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let o=wS(e[n]);r.push(o)}return t}class Rd{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t){return Xy(this,t)}clone(t){return t=new Rd(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return Xy(this,()=>({root:wS(Rr())}))}}class Jl extends Ai{static getType(){return"paragraph"}static clone(t){return new Jl(t.__key)}createDOM(t){let n=document.createElement("p");return t=Vs(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:cR,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&$d(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n),n=this.getIndent(),0<n&&(t.style.textIndent=`${20*n}px`)}return{element:t}}static importJSON(t){let n=wi();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(t,n){t=wi();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||Z(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function cR(e){let t=wi();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function wi(){return Va(new Jl)}function _S(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=gm(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,r=e._observer,r!==null&&(r.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function dR(e){let t=new Map,n=new Set;return e.forEach(r=>{if(r=r.klass.importDOM!=null?r.klass.importDOM.bind(r.klass):null,r!=null&&!n.has(r)){n.add(r);var o=r();o!==null&&Object.keys(o).forEach(i=>{let l=t.get(i);l===void 0&&(l=[],t.set(i,l)),l.push(o[i])})}}),t}class fR{constructor(t,n,r,o,i,l,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Y_(),this._onError=i,this._htmlConversions=l,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){let n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){let n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){let n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){let n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&K(35);let o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=o.get(t);i===void 0&&K(36,String(t));let l=i[r];return l.add(n),()=>{l.delete(n),i.every(s=>s.size===0)&&o.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&K(37,t.name);let r=this._listeners.mutation;return r.set(n,t),()=>{r.delete(n)}}registerNodeTransformToKlass(t,n){var r=t.getType();return r=this._nodes.get(r),r===void 0&&K(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let o=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),o.push(r)),F2(this,t.getType()),()=>{o.forEach(i=>i.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return J(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let n=this._rootElement;if(t!==n){let l=Vs(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,_S(this,n,t,r),n!==null){if(!this._config.disableEvents){Ks!==0&&(Ks--,Ks===0&&n.ownerDocument.removeEventListener("selectionchange",fS));var o=n.__lexicalEditor;if(o!=null){if(o._parentEditor!==null){var i=sm(o);i=i[i.length-1]._key,yl.get(i)===o&&yl.delete(i)}else yl.delete(o._key);n.__lexicalEditor=null}for(o=dS(n),i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,o=t.style,o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,F_(this),this._updateTags.add("history-merge"),fi(this),this._config.disableEvents||Z2(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Ys("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&K(38),z_(this);let r=this._pendingEditorState,o=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&o.add(n),fi(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&o.add(n),fi(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=gm(),o=Tt,i=yn,l=Nt,s=this._dirtyElements,a=this._dirtyLeaves,u=this._cloneNotNeeded,c=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,Tt=r,yn=!1,Nt=this;try{pm(t.root,this._nodes),n&&n(),r._readOnly=!0}catch(d){d instanceof Error&&this._onError(d)}finally{this._dirtyElements=s,this._dirtyLeaves=a,this._cloneNotNeeded=u,this._dirtyType=c,Tt=o,yn=i,Nt=l}return r}update(t,n){Rn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Rn(this,()=>{let o=Ye(),i=Rr();o!==null?o.dirty=!0:i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){var t=this._rootElement;t!==null&&t.blur(),t=Pr(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ys("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class mm extends Ai{constructor(t,n){super(n),this.__colSpan=t,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(t){return this.getWritable().__colSpan=t,this}getRowSpan(){return this.__rowSpan}setRowSpan(t){return this.getWritable().__rowSpan=t,this}}function jn(e){return e instanceof mm}class SS extends Ai{}function vm(e){return e instanceof SS}class ES extends Ai{}function Ta(e){return e instanceof ES}I.$addUpdateTag=function(e){tn(),ot()._updateTags.add(e)};I.$applyNodeReplacement=Va;I.$copyNode=J_;I.$createLineBreakNode=Ol;I.$createNodeSelection=_p;I.$createParagraphNode=wi;I.$createRangeSelection=function(){let e=new br("root",0,"element"),t=new br("root",0,"element");return new Oi(e,t,0,"")};I.$createTabNode=bd;I.$createTextNode=$t;I.$getAdjacentNode=lp;I.$getNearestNodeFromDOMNode=Ha;I.$getNearestRootOrShadowRoot=Q_;I.$getNodeByKey=bt;I.$getPreviousSelection=Yl;I.$getRoot=Rr;I.$getSelection=Ye;I.$getTextContent=function(){let e=Ye();return e===null?"":e.getTextContent()};I.$hasAncestor=jc;I.$hasUpdateTag=function(e){return ot()._updateTags.has(e)};I.$insertNodes=function(e,t){let n=Ye()||Yl();return n===null&&(n=Rr().selectEnd()),n.insertNodes(e,t)};I.$isBlockElementNode=wp;I.$isDecoratorNode=Ke;I.$isElementNode=W;I.$isInlineElementOrDecoratorNode=function(e){return W(e)&&e.isInline()||Ke(e)&&e.isInline()};I.$isLeafNode=U_;I.$isLineBreakNode=ka;I.$isNodeSelection=Gl;I.$isParagraphNode=function(e){return e instanceof Jl};I.$isRangeSelection=fe;I.$isRootNode=rn;I.$isRootOrShadowRoot=or;I.$isTabNode=function(e){return e instanceof Kl};I.$isTextNode=Z;I.$nodesOfType=function(e){var t=Or();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o};I.$normalizeSelection__EXPERIMENTAL=om;I.$parseSerializedNode=function(e){return pm(e,ot()._nodes)};I.$selectAll=function(){var e=Rr();e=e.select(0,e.getChildrenSize()),kr(om(e))};I.$setCompositionKey=Dt;I.$setSelection=kr;I.$splitNode=Z_;I.BLUR_COMMAND=D_;I.CAN_REDO_COMMAND={};I.CAN_UNDO_COMMAND={};I.CLEAR_EDITOR_COMMAND={};I.CLEAR_HISTORY_COMMAND={};I.CLICK_COMMAND=y_;I.COMMAND_PRIORITY_CRITICAL=4;I.COMMAND_PRIORITY_EDITOR=0;I.COMMAND_PRIORITY_HIGH=3;I.COMMAND_PRIORITY_LOW=1;I.COMMAND_PRIORITY_NORMAL=2;I.CONTROLLED_TEXT_INSERTION_COMMAND=vl;I.COPY_COMMAND=qg;I.CUT_COMMAND=em;I.DELETE_CHARACTER_COMMAND=wa;I.DELETE_LINE_COMMAND=Sa;I.DELETE_WORD_COMMAND=_a;I.DEPRECATED_$computeGridMap=mS;I.DEPRECATED_$createGridSelection=function(){let e=new br("root",0,"element"),t=new br("root",0,"element");return new Nd("root",e,t)};I.DEPRECATED_$getGridCellNodeRect=xp;I.DEPRECATED_$getNodeTriplet=vS;I.DEPRECATED_$isGridCellNode=jn;I.DEPRECATED_$isGridNode=vm;I.DEPRECATED_$isGridRowNode=Ta;I.DEPRECATED_$isGridSelection=fm;I.DEPRECATED_GridCellNode=mm;I.DEPRECATED_GridNode=SS;I.DEPRECATED_GridRowNode=ES;I.DRAGEND_COMMAND=M_;I.DRAGOVER_COMMAND=A_;I.DRAGSTART_COMMAND=O_;I.DROP_COMMAND=P_;I.DecoratorNode=xS;I.ElementNode=Ai;I.FOCUS_COMMAND=L_;I.FORMAT_ELEMENT_COMMAND={};I.FORMAT_TEXT_COMMAND=_o;I.INDENT_CONTENT_COMMAND={};I.INSERT_LINE_BREAK_COMMAND=Hs;I.INSERT_PARAGRAPH_COMMAND=tp;I.INSERT_TAB_COMMAND={};I.KEY_ARROW_DOWN_COMMAND=$_;I.KEY_ARROW_LEFT_COMMAND=S_;I.KEY_ARROW_RIGHT_COMMAND=w_;I.KEY_ARROW_UP_COMMAND=C_;I.KEY_BACKSPACE_COMMAND=b_;I.KEY_DELETE_COMMAND=N_;I.KEY_DOWN_COMMAND=x_;I.KEY_ENTER_COMMAND=Oc;I.KEY_ESCAPE_COMMAND=T_;I.KEY_MODIFIER_COMMAND=I_;I.KEY_SPACE_COMMAND=k_;I.KEY_TAB_COMMAND=R_;I.LineBreakNode=Vl;I.MOVE_TO_END=__;I.MOVE_TO_START=E_;I.OUTDENT_CONTENT_COMMAND={};I.PASTE_COMMAND=Qg;I.ParagraphNode=Jl;I.REDO_COMMAND=Zg;I.REMOVE_TEXT_COMMAND=np;I.RootNode=Ql;I.SELECTION_CHANGE_COMMAND=wd;I.SELECT_ALL_COMMAND=rp;I.TabNode=Kl;I.TextNode=Pi;I.UNDO_COMMAND=Jg;I.createCommand=function(){return{}};I.createEditor=function(e){var t=e||{},n=Nt,r=t.theme||{};let o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,l=gm(),s=t.namespace||(o!==null?o._config.namespace:Y_()),a=t.editorState,u=[Ql,Pi,Vl,Kl,Jl,...t.nodes||[]],c=t.onError;if(t=t.editable!==void 0?t.editable:!0,e===void 0&&n!==null)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let f=u[n],h=null;var d=null;typeof f!="function"&&(d=f,f=d.replace,h=d.with,d=d.withKlass?d.withKlass:null);let m=f.getType(),g=f.transform(),_=new Set;g!==null&&_.add(g),e.set(m,{klass:f,replace:h,replaceWithKlass:d,transforms:_})}return r=new fR(l,o,e,{disableEvents:i,namespace:s,theme:r},c||console.error,dR(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};I.getNearestEditorFromDOMNode=lm;I.isHTMLAnchorElement=function(e){return $d(e)&&e.tagName==="A"};I.isHTMLElement=$d;I.isSelectionCapturedInDecoratorInput=im;I.isSelectionWithinEditor=Ua;const hR=I;var he=hR,vt={},Ot={},ie=he;let Uc=new Map;function Zy(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function qy(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function CS(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,o]=n.split(/:([^]+)/);t[r.trim()]=o.trim()}return t}function Hc(e){let t=Uc.get(e);return t===void 0&&(t=CS(e),Uc.set(e,t)),t}function pR(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function Fi(e,t){var n=Hc("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[o,i])=>(i===null?delete r[o]:r[o]=i,r),{...n}),n=pR(t),e.setStyle(n),Uc.set(n,t)}function $S(e,t){var n=e.getNodes(),r=n.length;if(ie.DEPRECATED_$isGridSelection(e)){for(var o=ie.$createRangeSelection(),i=o.anchor,l=o.focus,s=0;s<r;s++){var a=n[s];ie.DEPRECATED_$isGridCellNode(a)&&(i.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),$S(ie.$normalizeSelection__EXPERIMENTAL(o),t))}ie.$setSelection(e)}else if(--r,o=n[0],i=n[r],e.isCollapsed())Fi(e,t);else{var u=e.anchor,c=e.focus;s=o.getTextContent().length,a=c.offset;var d=u.offset,f=u.isBefore(c);l=f?d:a,e=f?a:d;var h=f?u.type:c.type,m=f?c.type:u.type;if(u=f?c.key:u.key,ie.$isTextNode(o)&&l===s&&(c=o.getNextSibling(),ie.$isTextNode(c)&&(l=d=0,o=c)),n.length===1)ie.$isTextNode(o)&&(l=h==="element"?0:d>a?a:d,e=m==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(Fi(o,t),o.select(l,e)):(n=o.splitText(l,e),n=l===0?n[0]:n[1],Fi(n,t),n.select(0,e-l))));else for(ie.$isTextNode(o)&&l<o.getTextContentSize()&&(l!==0&&(o=o.splitText(l)[1]),Fi(o,t)),ie.$isTextNode(i)&&(l=i.getTextContent().length,i.__key!==u&&e!==0&&(e=l),e!==l&&([i]=i.splitText(e)),e!==0&&Fi(i,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),ie.$isTextNode(l)&&s!==o.getKey()&&s!==i.getKey()&&!l.isToken()&&Fi(l,t)}}function gR(e){for(;e!==null&&!ie.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function Lf(e,t,n,r,o=null){if(t.length!==0){var i=t[0],l=new Map,s=[];i=ie.$isElementNode(i)?i:i.getParentOrThrow(),i.isInline()&&(i=i.getParentOrThrow());for(var a=!1;i!==null;){var u=i.getPreviousSibling();if(u!==null){i=u,a=!0;break}if(i=i.getParentOrThrow(),ie.$isRootOrShadowRoot(i))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];ie.$isElementNode(d)&&d.getChildrenSize()===0&&u.add(d.getKey())}var f=new Set;for(c=0;c<n;c++){d=t[c];var h=d.getParent();if(h!==null&&h.isInline()&&(h=h.getParent()),h!==null&&ie.$isLeafNode(d)&&!f.has(d.getKey())){if(d=h.getKey(),l.get(d)===void 0){let m=r();m.setFormat(h.getFormatType()),m.setIndent(h.getIndent()),s.push(m),l.set(d,m),h.getChildren().forEach(g=>{m.append(g),f.add(g.getKey()),ie.$isElementNode(g)&&g.getChildrenKeys().forEach(_=>f.add(_))}),gR(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(o!==null)for(t=0;t<s.length;t++)o.append(s[t]);if(t=null,ie.$isRootOrShadowRoot(i))if(a)if(o!==null)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)i.insertAfter(s[o]);else if(a=i.getFirstChild(),ie.$isElementNode(a)&&(i=a),a===null)if(o)i.append(o);else for(o=0;o<s.length;o++)a=s[o],i.append(a),t=a;else if(o!==null)a.insertBefore(o);else for(i=0;i<s.length;i++)o=s[i],a.insertBefore(o),t=o;else if(o)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)a=s[o],i.insertAfter(a),t=a;s=ie.$getPreviousSelection(),ie.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?ie.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function kS(e,t,n,r){e.modify(t?"extend":"move",n,r)}function bS(e){return e=e.anchor.getNode(),(ie.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Ot.$addNodeStyle=function(e){e=e.getStyle();let t=CS(e);Uc.set(e,t)};Ot.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,ie.$isElementNode(e)&&ie.$isElementNode(t)?(t.__first=e.__first,t.__last=e.__last,t.__size=e.__size,t.__format=e.__format,t.__indent=e.__indent,t.__dir=e.__dir,t):(ie.$isTextNode(e)&&ie.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Ot.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,o=e.getNodes();var i=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:i.offset;if(i=s?l.getNode():i.getNode(),e.style!==""&&(e=Hc(e.style),e!==null&&t in e))return e[t];for(e=0;e<o.length;e++){var u=o[e];if((e===0||a!==0||!u.is(i))&&ie.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=Hc(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Ot.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Ot.$isParentElementRTL=bS;Ot.$moveCaretSelection=kS;Ot.$moveCharacter=function(e,t,n){let r=bS(e);kS(e,t,n?!r:r,"character")};Ot.$patchStyleText=$S;Ot.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let o="element",i="element",l=0;ie.$isTextNode(r)?o="text":ie.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),ie.$isTextNode(n)?(i="text",l=n.getTextContentSize()):ie.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,o),e.set(n.getKey(),l,i))};Ot.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=ie.$getRoot();(e=n.getFirstChild())?e.replace(t,!0):n.append(t)}else for(n=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),n.indexOf(e)===-1&&n.push(e),e.isInline()&&(e=e.getParentOrThrow(),n.indexOf(e)===-1&&n.push(e)),e=0;e<n.length;e++){let i=n[e];var r=i;if(!ie.$isElementNode(r)||ie.$isRootOrShadowRoot(r))r=!1;else{var o=r.getFirstChild();o=o===null||ie.$isLineBreakNode(o)||ie.$isTextNode(o)||o.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&o}r&&(r=t(),r.setFormat(i.getFormatType()),r.setIndent(i.getIndent()),i.replace(r,!0))}};Ot.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=ie.$getAdjacentNode(e.focus,t),ie.$isDecoratorNode(e)&&!e.isIsolated()||ie.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Ot.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(ie.$isRangeSelection(e)||ie.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),o=t.is(n),i=t.is(r);if(o||i){o=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),i=t.is(o?r:n),r=t.is(o?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):i?(n=o?s:l,a=void 0):r&&(o=o?l:s,n=0,a=o),t.__text=t.__text.slice(n,a)}}return t};Ot.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let o=r.length;var i=e.anchor;if(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0){e=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren();let s=t();s.setFormat(e.getFormatType()),s.setIndent(e.getIndent()),r.forEach(a=>s.append(a)),n&&(s=n.append(s)),e.replace(s)}else{i=null;var l=[];for(let s=0;s<o;s++){let a=r[s];ie.$isRootOrShadowRoot(a)?(Lf(e,l,l.length,t,n),l=[],i=a):i===null||i!==null&&ie.$hasAncestor(a,i)?l.push(a):(Lf(e,l,l.length,t,n),l=[a])}Lf(e,l,l.length,t,n)}};Ot.createDOMRange=function(e,t,n,r,o){let i=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(i);if(e=e.getElementByKey(l),ie.$isTextNode(t)&&(a=Zy(a)),ie.$isTextNode(r)&&(e=Zy(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=qy(a)),e.nodeName==="BR"&&([e,o]=qy(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&o===0&&(o=1);try{s.setStart(a,n),s.setEnd(e,o)}catch{return null}return!s.collapsed||n===o&&i===l||(s.setStart(e,o),s.setEnd(a,n)),s};Ot.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(n===null)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t=Array.from(t.getClientRects());let r=t.length;t.sort((i,l)=>{let s=i.top-l.top;return 3>=Math.abs(s)?i.left-l.left:s});let o;for(let i=0;i<r;i++){let l=t[i],s=l.width+n===e.width;o&&o.top<=l.top&&o.top+o.height>l.top&&o.left+o.width>l.left||s?(t.splice(i--,1),r--):o=l}return t};Ot.getStyleObjectFromCSS=Hc;Ot.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(ie.$isElementNode(r)){var o=r.getDescendantByIndex(t.offset);o!==null&&(r=o)}for(;0<n&&r!==null;){var i=r.getPreviousSibling(),l=0;if(i===null){o=r.getParentOrThrow();for(var s=o.getPreviousSibling();s===null;){if(o=o.getParent(),o===null){i=null;break}s=o.getPreviousSibling()}o!==null&&(l=o.isInline()?0:2,i=ie.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&ie.$isElementNode(r)&&!r.isInline()&&(s=`
126
+
127
+ `),o=s.length,!ie.$isTextNode(r)||n>=o)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||ie.$isRootNode(s)||s.remove(),n-=o+l,r=i;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=ie.$getNodeByKey(a);return ie.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),i=o-n;let u=s.slice(0,i);l!==null&&l!==s?(n=ie.$getPreviousSelection(),o=r,r.isSimpleText()?r.setTextContent(l):(o=ie.$createTextNode(l),r.replace(o)),ie.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,o.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=o),n=l?s-n:0,o=l?s:i,l&&n===0?([n]=r.splitText(n,o),n.remove()):([,n]=r.splitText(n,o),n.remove())):(n=ie.$createTextNode(u),r.replace(n)),n=0}}};const mR=Ot;var zo=mR,vR=zo,ht=he;function yR(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function TS(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function NS(e,t){for(;e!==ht.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}vt.$splitNode=ht.$splitNode;vt.isHTMLAnchorElement=ht.isHTMLAnchorElement;vt.isHTMLElement=ht.isHTMLElement;vt.$dfs=function(e,t){let n=[];e=(e||ht.$getRoot()).getLatest(),t=t||(ht.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,o=0;(r=r.getParent())!==null;)o++;for(r=o;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),ht.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(o=null;o===null&&e!==null;)o=e.getNextSibling(),o===null?(e=e.getParent(),r--):e=o;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};vt.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);o!==null&&n.push(o)}return n};vt.$findMatchingParent=NS;vt.$getNearestBlockElementAncestorOrThrow=function(e){let t=NS(e,n=>ht.$isElementNode(n)&&!n.isInline());return ht.$isElementNode(t)||yR(4,e.__key),t};vt.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};vt.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};vt.$insertNodeToNearestRoot=function(e){var t=ht.$getSelection()||ht.$getPreviousSelection();if(ht.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,ht.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,o;ht.$isTextNode(t)?(r=t.getParentOrThrow(),o=t.getIndexWithinParent(),0<n&&(o+=1,t.splitText(n))):(r=t,o=n),[,t]=ht.$splitNode(r,o),t.insertBefore(e),t.selectStart()}}else ht.$isNodeSelection(t)||ht.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):ht.$getRoot().append(e),t=ht.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};vt.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[o,i]of t._nodeMap){let l=vR.$cloneWithProperties(i);ht.$isTextNode(l)&&(l.__text=i.__text),n.set(o,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,ht.$setSelection(e===null?null:e.clone())};vt.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};vt.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};vt.isMimeType=TS;vt.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,o)=>{let i=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&i.push({file:a,result:c}),l()}),TS(a,t)?u.readAsDataURL(a):l()};l()})};vt.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};vt.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};vt.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,o=>{e:{for(var i=o.getChildren(),l=0;l<i.length;l++)if(i[l]instanceof t){i=null;break e}for(i=o;i!==null;)if(l=i,i=i.getParent(),i instanceof t){i={child:l,parent:i};break e}i=null}if(i!==null){const{child:s,parent:a}=i;if(s.is(o)){if(r(a,o),o=s.getNextSiblings(),i=o.length,a.insertAfter(s),i!==0){l=n(a),s.insertAfter(l);for(let u=0;u<i;u++)l.append(o[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};vt.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const xR=vt;var Rt=xR,Pe=he,Fo=Rt;function Al(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function RS(e){let t=1;for(e=e.getParent();e!=null;){if(nt(e)){if(e=e.getParent(),we(e)){t++,e=e.getParent();continue}Al(40)}break}return t}function Sp(e){e=e.getParent(),we(e)||Al(40);let t=e;for(;t!==null;)t=t.getParent(),we(t)&&(e=t);return e}function PS(e){let t=[];e=e.getChildren().filter(nt);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();we(o)?t=t.concat(PS(o)):t.push(r)}return t}function mr(e){return nt(e)&&we(e.getFirstChild())}function wR(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!nt(e)&&!we(e))break;e=t}e.remove()}function e0(e){return kn().append(e)}function OS(e,t){return nt(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function _i(e,t){e.splice(e.getChildrenSize(),0,t)}function t0(e,t){if(we(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=kn();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),_i(o,e.getChildren()),we(n)&&t===n.getListType()?(n.append(o),e.remove(),we(r)&&t===r.getListType()&&(_i(n,r.getChildren()),r.remove()),n):we(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):(t=on(t),t.append(o),e.replace(t),Zt(t),t)}function AS(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&mr(n)&&mr(r)&&(AS(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),Zt(e)),t.remove()}function Zt(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let i=e[t];if(nt(i)){let l=i.getValue();var n=i,r=n.getParent(),o=1;for(r!=null&&(we(r)?o=r.getStart():Al(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];nt(s)&&!we(s.getFirstChild())&&o++}l!==o&&i.setValue(o)}}}function _R(e){if(!mr(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(we(r)&&nt(n)&&we(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=kn();let s=on(l);o.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),i=kn(),l=on(l),i.append(l),_i(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}Zt(t),Zt(r)}}}let Pd=class MS extends Pe.ElementNode{static getType(){return"listitem"}static clone(t){return new MS(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){let n=document.createElement("li"),r=this.getParent();return we(r)&&r.getListType()==="check"&&r0(n,this,null),n.value=this.__value,n0(n,t.theme,this),n}updateDOM(t,n,r){let o=this.getParent();return we(o)&&o.getListType()==="check"&&r0(n,this,t),n.value=this.__value,n0(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();we(n)&&(Zt(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:SR,priority:0})}}static importJSON(t){let n=kn();return n.setChecked(t.checked),n.setValue(t.value),n.setFormat(t.format),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(Pe.$isElementNode(r)&&this.canMergeWith(r)){let o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(t,n){if(nt(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!we(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let o=on(r.getListType()),i=this.getNextSibling();for(;i;){let l=i;i=i.getNextSibling(),o.append(l)}r.insertAfter(t),t.insertAfter(o)}return n&&this.getChildren().forEach(o=>{t.append(o)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();we(r)||Al(39);var o=this.getNextSiblings();if(nt(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),we(t)&&Zt(t),n;if(we(t)){for(r=t,t=t.getChildren(),o=t.length-1;0<=o;o--)r=t[o],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),o.length!==0){let i=on(r.getListType());o.forEach(l=>i.append(l)),t.insertAfter(i,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&mr(n)&&mr(r)?(AS(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),we(t)&&Zt(t))}insertNewAfter(t,n=!0){return t=kn(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=Pe.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=nt(o);return r.getChildrenSize()===1?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(o,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(t){this.getWritable().__value=t}getChecked(){return this.getLatest().__checked}setChecked(t){this.getWritable().__checked=t}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var t=this.getParent();if(t===null)return this.getLatest().__indent;t=t.getParentOrThrow();let n=0;for(;nt(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||Al(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(mr(this)||r.has(this.getKey()))break e;let s=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(mr(o)&&mr(i)){if(i=i.getFirstChild(),we(i)){i.append(this);var l=o.getFirstChild();we(l)&&(l=l.getChildren(),_i(i,l),o.remove(),r.add(o.getKey())),Zt(i)}}else mr(o)?(o=o.getFirstChild(),we(o)&&(r=o.getFirstChild(),r!==null&&r.insertBefore(this),Zt(o))):mr(i)?(o=i.getFirstChild(),we(o)&&(o.append(this),Zt(o))):we(s)&&(r=kn(),l=on(s.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):s.append(r),Zt(l));we(s)&&Zt(s)}n++}else _R(this),n--;return this}insertBefore(t){if(nt(t)){let n=this.getParentOrThrow();if(we(n)){let r=this.getNextSiblings();Zt(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return nt(t)}canReplaceWith(t){return nt(t)}canMergeWith(t){return Pe.$isParagraphNode(t)||nt(t)}extractWithChild(t,n){if(!Pe.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return on("bullet")}};function n0(e,t,n){let r=[],o=[];var i=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(i!==void 0&&(i=i.split(" "),r.push(...i)),t){i=n.getParent(),i=we(i)&&i.getListType()==="check";let s=n.getChecked();i&&!s||o.push(t.listitemUnchecked),i&&s||o.push(t.listitemChecked),i&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>we(s))?r.push(...l):o.push(...l)),0<o.length&&Fo.removeClassNamesFromElement(e,...o),0<r.length&&Fo.addClassNamesToElement(e,...r)}function r0(e,t,n){we(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function SR(e){return e=Fo.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:kn(e)}}function kn(e){return Pe.$applyNodeReplacement(new Pd(void 0,e))}function nt(e){return e instanceof Pd}let ym=class LS extends Pe.ElementNode{static getType(){return"list"}static clone(t){return new LS(t.__listType||l0[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=l0[t]||t,this.__tag=t==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){let n=this.getWritable();n.__listType=t,n.__tag=t==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(t){let n=document.createElement(this.__tag);return this.__start!==1&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,o0(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(o0(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:i0,priority:0}),ul:()=>({conversion:i0,priority:0})}}static importJSON(t){let n=on(t.listType,t.start);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportDOM(t){return{element:t}=super.exportDOM(t),t&&Fo.isHTMLElement(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(nt(n))super.append(n);else{let o=kn();we(n)||Pe.$isElementNode(n)&&(n=Pe.$createTextNode(n.getTextContent())),o.append(n),super.append(o)}}return Zt(this),this}extractWithChild(t){return nt(t)}};function o0(e,t,n){let r=[],o=[];var i=t.list;if(i!==void 0){let s=i[`${n.__tag}Depth`]||[];t=RS(n)-1;let a=t%s.length;var l=s[a];let u=i[n.__tag],c;if(i=i.nested,i!==void 0&&i.list&&(c=i.list),u!==void 0&&r.push(u),l!==void 0)for(l=l.split(" "),r.push(...l),l=0;l<s.length;l++)l!==a&&o.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):o.push(...n))}0<o.length&&Fo.removeClassNamesFromElement(e,...o),0<r.length&&Fo.addClassNamesToElement(e,...r)}function ER(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];nt(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(o=>{we(o)&&t.push(e0(o))})):t.push(e0(n))}return t}function i0(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=on("number",e.start):t==="ul"&&(n=Fo.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?on("check"):on("bullet")),{after:ER,node:n}}let l0={ol:"number",ul:"bullet"};function on(e,t=1){return Pe.$applyNodeReplacement(new ym(e,t))}function we(e){return e instanceof ym}let CR=Pe.createCommand("INSERT_UNORDERED_LIST_COMMAND"),$R=Pe.createCommand("INSERT_ORDERED_LIST_COMMAND"),kR=Pe.createCommand("INSERT_CHECK_LIST_COMMAND"),bR=Pe.createCommand("REMOVE_LIST_COMMAND");un.$createListItemNode=kn;un.$createListNode=on;un.$getListDepth=RS;un.$handleListInsertParagraph=function(){var e=Pe.$getSelection();if(!Pe.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!nt(e)||e.getChildrenSize()!==0))return!1;var t=Sp(e),n=e.getParent();we(n)||Al(40);let r=n.getParent(),o;if(Pe.$isRootOrShadowRoot(r))o=Pe.$createParagraphNode(),t.insertAfter(o);else if(nt(r))o=kn(),r.insertAfter(o);else return!1;if(o.select(),t=e.getNextSiblings(),0<t.length){let i=on(n.getListType());Pe.$isParagraphNode(o)?o.insertAfter(i):(n=kn(),n.append(i),o.insertAfter(n)),t.forEach(l=>{l.remove(),i.append(l)})}return wR(e),!0};un.$isListItemNode=nt;un.$isListNode=we;un.INSERT_CHECK_LIST_COMMAND=kR;un.INSERT_ORDERED_LIST_COMMAND=$R;un.INSERT_UNORDERED_LIST_COMMAND=CR;un.ListItemNode=Pd;un.ListNode=ym;un.REMOVE_LIST_COMMAND=bR;un.insertList=function(e,t){e.update(()=>{var n=Pe.$getSelection();if(Pe.$isRangeSelection(n)||Pe.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var o=n.getParent();if(OS(n,r))r=on(t),Pe.$isRootOrShadowRoot(o)?(n.replace(r),o=kn(),Pe.$isElementNode(n)&&(o.setFormat(n.getFormatType()),o.setIndent(n.getIndent())),r.append(o)):nt(n)&&(n=n.getParentOrThrow(),_i(r,n.getChildren()),n.replace(r));else for(n=new Set,o=0;o<r.length;o++){var i=r[o];if(Pe.$isElementNode(i)&&i.isEmpty()&&!n.has(i.getKey()))t0(i,t);else if(Pe.$isLeafNode(i))for(i=i.getParent();i!=null;){let s=i.getKey();if(we(i)){if(!n.has(s)){var l=on(t);_i(l,i.getChildren()),i.replace(l),Zt(l),n.add(s)}break}else{if(l=i.getParent(),Pe.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),t0(i,t);break}i=l}}}}})};un.removeList=function(e){e.update(()=>{let t=Pe.$getSelection();if(Pe.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),o=t.anchor.getNode();if(OS(o,r))n.add(Sp(o));else for(o=0;o<r.length;o++){var i=r[o];Pe.$isLeafNode(i)&&(i=Fo.$getNearestNodeOfType(i,Pd),i!=null&&n.add(Sp(i)))}for(let l of n){n=l,r=PS(l);for(let s of r)r=Pe.$createParagraphNode(),_i(r,s.getChildren()),n.insertAfter(r),n=r,s.__key===t.anchor.key&&t.anchor.set(r.getKey(),0,"element"),s.__key===t.focus.key&&t.focus.set(r.getKey(),0,"element"),s.remove();l.remove()}}})};const TR=un;var yo=TR,DS={},Od={},IS=p;function NR(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let jS=IS.createContext(null);Od.LexicalComposerContext=jS;Od.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};Od.useLexicalComposerContext=function(){let e=IS.useContext(jS);return e==null&&NR(8),e};const RR=Od;var dr=RR,s0=dr,Ns=he,Vc=p;let zS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var PR=zS?Vc.useLayoutEffect:Vc.useEffect;let $u={tag:"history-merge"};function OR(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=Ns.$getRoot();if(n.isEmpty()){let r=Ns.$createParagraphNode();n.append(r),n=zS?document.activeElement:null,(Ns.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},$u);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,$u);break;case"object":e.setEditorState(t,$u);break;case"function":e.update(()=>{Ns.$getRoot().isEmpty()&&t(e)},$u)}}}DS.LexicalComposer=function({initialConfig:e,children:t}){let n=Vc.useMemo(()=>{const{theme:r,namespace:o,editor__DEPRECATED:i,nodes:l,onError:s,editorState:a}=e,u=s0.createLexicalComposerContext(null,r);let c=i||null;if(c===null){const d=Ns.createEditor({editable:e.editable,namespace:o,nodes:l,onError:f=>s(f,d),theme:r});OR(d,a),c=d}return[c,u]},[]);return PR(()=>{let r=e.editable,[o]=n;o.setEditable(r!==void 0?r:!0)},[]),Vc.createElement(s0.LexicalComposerContext.Provider,{value:n},t)};const AR=DS;var MR=AR,Xs=p;function Ep(e,t){return Ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ep(e,t)}function LR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ep(e,t)}function DR(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,r){return!Object.is(n,t[r])})}var a0={error:null},IR=function(e){function t(){for(var r,o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return r=e.call.apply(e,[this].concat(i))||this,r.state=a0,r.resetErrorBoundary=function(){for(var s,a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];r.props.onReset==null||(s=r.props).onReset.apply(s,u),r.reset()},r}LR(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(a0)},n.componentDidCatch=function(r,o){var i,l;(i=(l=this.props).onError)==null||i.call(l,r,o)},n.componentDidUpdate=function(r,o){var i=this.props.resetKeys;if(this.state.error!==null&&o.error!==null&&DR(r.resetKeys,i)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,i),this.reset()}},n.render=function(){var r=this.state.error,o=this.props,i=o.fallbackRender,l=o.FallbackComponent;if(o=o.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Xs.isValidElement(o))return o;if(typeof i=="function")return i(r);if(l)return Xs.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(Xs.Component),jR=function({children:e,onError:t}){return Xs.createElement(IR,{fallback:Xs.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const zR=jR;var FR=zR;const BR=La(FR);var xm={},wm={},WR=Rt,Fe=he;function UR(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;var i=t._selection,l=e._selection;if(o)return 1;if(!(Fe.$isRangeSelection(i)&&Fe.$isRangeSelection(l)&&l.isCollapsed()&&i.isCollapsed()))return 0;o=t._nodeMap;let s=[];for(let a of n)n=o.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=o.get(a),r===void 0||Fe.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(i.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&Fe.$isTextNode(t)&&t.__text.length===1&&i.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!Fe.$isTextNode(e)||!Fe.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(i=i.anchor,l=l.anchor,i.key!==l.key||i.type!=="text")?0:(i=i.offset,l=l.offset,e=t.length-e.length,e===1&&l===i-1?2:e===-1&&l===i+1?3:e===-1&&l===i?4:0))}function HR(e,t){let n=Date.now(),r=0;return(o,i,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=UR(o,i,s,a,e.isComposing()),f=(()=>{var h=l===null||l.editor===e,m=u.has("history-push");if(!m&&h&&u.has("history-merge"))return 0;if(o===null)return 1;var g=i._selection;if(!(0<s.size||0<a.size))return g!==null?0:2;if(m===!1&&d!==0&&d===r&&c<n+t&&h)return 0;if(s.size===1){{m=Array.from(s)[0],h=o._nodeMap.get(m),m=i._nodeMap.get(m),g=o._selection;let _=i._selection,v=!1;Fe.$isRangeSelection(g)&&Fe.$isRangeSelection(_)&&(v=g.anchor.type==="element"&&g.focus.type==="element"&&_.anchor.type==="text"&&_.focus.type==="text"),h=!v&&Fe.$isTextNode(h)&&Fe.$isTextNode(m)?h.__type===m.__type&&h.__text===m.__text&&h.__mode===m.__mode&&h.__detail===m.__detail&&h.__style===m.__style&&h.__format===m.__format&&h.__parent===m.__parent:!1}if(h)return 0}return 1})();return n=c,r=d,f}}wm.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};wm.registerHistory=function(e,t,n){let r=HR(e,n);n=({editorState:l,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:c})=>{const d=t.current,f=t.redoStack,h=t.undoStack,m=d===null?null:d.editorState;if(d===null||l!==m){if(s=r(s,l,d,a,u,c),s===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(Fe.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(Fe.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let o=WR.mergeRegister(e.registerCommand(Fe.UNDO_COMMAND,()=>{let l=t.redoStack,s=t.undoStack;if(s.length!==0){let a=t.current,u=s.pop();a!==null&&(l.push(a),e.dispatchCommand(Fe.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(Fe.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},Fe.COMMAND_PRIORITY_EDITOR),e.registerCommand(Fe.REDO_COMMAND,()=>{let l=t.redoStack;var s=t.undoStack;if(l.length!==0){let a=t.current;a!==null&&(s.push(a),e.dispatchCommand(Fe.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(Fe.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},Fe.COMMAND_PRIORITY_EDITOR),e.registerCommand(Fe.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),Fe.COMMAND_PRIORITY_EDITOR),e.registerCommand(Fe.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(Fe.CAN_REDO_COMMAND,!1),e.dispatchCommand(Fe.CAN_UNDO_COMMAND,!1),!0),Fe.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),i=e.registerUpdateListener(n);return()=>{o(),i()}};const VR=wm;var KR=VR,GR=dr,Cp=KR,u0=p;function YR(e,t,n=1e3){let r=u0.useMemo(()=>t||Cp.createEmptyHistoryState(),[t]);u0.useEffect(()=>Cp.registerHistory(e,r,n),[n,e,r])}xm.createEmptyHistoryState=Cp.createEmptyHistoryState;xm.HistoryPlugin=function({externalHistoryState:e}){let[t]=GR.useLexicalComposerContext();return YR(t,e),null};const XR=xm;var QR=XR,FS={},JR=dr,Qs=p,ZR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Qs.useLayoutEffect:Qs.useEffect;function qR(e){let[t]=JR.useLexicalComposerContext(),n=Qs.useMemo(()=>e(t),[t,e]),r=Qs.useRef(n.initialValueFn()),[o,i]=Qs.useState(r.current);return ZR(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,i(a)),s(u=>{r.current=u,i(u)})},[n,e]),o}function eP(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var tP=function(){return qR(eP)};const nP=tP;var rP=nP,Go={},qt=he;function _m(e,t=!0){return e?!1:(e=BS(),t&&(e=e.trim()),e==="")}function BS(){return qt.$getRoot().getTextContent()}function WS(e){if(!_m(e,!1))return!1;e=qt.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(qt.$isDecoratorNode(n))return!1;if(qt.$isElementNode(n)){if(!qt.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let o=n.length;for(let i=0;i<o;i++)if(!qt.$isTextNode(n[r]))return!1}}return!0}Go.$canShowPlaceholder=WS;Go.$canShowPlaceholderCurry=function(e){return()=>WS(e)};Go.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(qt.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(qt.$isTextNode(n)){if(r=n.getTextContentSize(),e+r>t)return{node:n,offset:t-e};e+=r}if(r=n.getNextSibling(),r!==null)n=r;else{for(n=n.getParent();n!==null;){if(r=n.getNextSibling(),r!==null){n=r;continue e}n=n.getParent()}break}}return null};Go.$isRootTextContentEmpty=_m;Go.$isRootTextContentEmptyCurry=function(e,t){return()=>_m(e,t)};Go.$rootTextContent=BS;Go.registerLexicalTextEntity=function(e,t,n,r){let o=l=>{const s=qt.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},i=e.registerNodeTransform(qt.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(qt.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){o(s);return}if(d=d.end-c.length,0<d){u=a.slice(0,d),u=c+u,s.select(),s.setTextContent(u),d===a.length?l.remove():(s=a.slice(d),l.setTextContent(s));return}}else if(d===null||d.start<c.length)return}for(;;){if(l=t(a),a=d=l===null?"":a.slice(l.end),d===""){if(c=u.getNextSibling(),qt.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?o(c):c.markDirty();break}else if(d.start!==0)break}}else if(c=t(d),c!==null&&c.start===0)break;if(l===null)break;if(l.start===0&&qt.$isTextNode(s)&&s.isTextEntity())continue;let f;if(l.start===0?[f,u]=u.splitText(l.end):[,f,u]=u.splitText(l.start,l.end),l=r(f),l.setFormat(f.getFormat()),f.replace(l),u==null)break}}});return e=e.registerNodeTransform(n,l=>{var s=l.getTextContent();const a=t(s);a===null||a.start!==0?o(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),qt.$isTextNode(s)&&s.isTextEntity()&&(o(s),o(l)),s=l.getNextSibling(),qt.$isTextNode(s)&&s.isTextEntity()&&(o(s),l instanceof n&&o(l)))}),[i,e]};const oP=Go;var iP=oP,US={},ku=he;US.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var o=e.getRootElement();if(document.activeElement===o&&(o=r.data,typeof o=="string")){try{var i=JSON.parse(o)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"&&(i=i.payload)&&i.functionId==="makeChanges"&&(i=i.args)){const[l,s,a,u,c]=i;e.update(()=>{const d=ku.$getSelection();if(ku.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),m=0,g=0;ku.$isTextNode(h)&&0<=l&&0<=s&&(m=l,g=l+s,d.setTextNodeRange(h,m,h,g)),(m!==g||a!=="")&&(d.insertRawText(a),h=f.getNode()),ku.$isTextNode(h)&&(m=u,g=u+c,f=h.getTextContentSize(),m=m>f?f:m,g=g>f?f:g,d.setTextNodeRange(h,m,h,g)),r.stopImmediatePropagation()}})}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}};const lP=US;var sP=lP,Ar={},to={},Sm={},c0=zo,aP=Rt,al=he;function HS(e,t,n,r=null){let o=r!=null?t.isSelected(r):!0,i=al.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=c0.$cloneWithProperties(t),l=al.$isTextNode(l)&&r!=null?c0.$sliceSelectedTextNodeContent(r,l):l);let s=al.$isElementNode(l)?l.getChildren():[],{element:a,after:u}=l.exportDOM(e);if(!a)return!1;let c=document.createDocumentFragment();for(let d=0;d<s.length;d++){let f=s[d],h=HS(e,f,c,r);!o&&al.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(o=!0)}return o&&!i?(aP.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),o}let VS=new Set(["STYLE","SCRIPT"]);function KS(e,t,n=new Map,r){let o=[];if(VS.has(e.nodeName))return o;let i=null;var l,{nodeName:s}=e,a=t._htmlConversions.get(s.toLowerCase());if(s=null,a!==void 0)for(l of a)a=l(e),a!==null&&(s===null||s.priority<a.priority)&&(s=a);if(s=(l=s!==null?s.conversion:null)?l(e):null,l=null,s!==null){if(l=s.after,a=s.node,i=Array.isArray(a)?a[a.length-1]:a,i!==null){for(var[,u]of n)if(i=u(i,r),!i)break;i&&o.push(...Array.isArray(a)?a:[i])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...KS(e[u],t,new Map(n),i));return l!=null&&(r=l(r)),i==null?o=o.concat(r):al.$isElementNode(i)&&i.append(...r),o}Sm.$generateHtmlFromNodes=function(e,t){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),r=al.$getRoot().getChildren();for(let o=0;o<r.length;o++)HS(e,r[o],n,t);return n.innerHTML};Sm.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let o=0;o<t.length;o++){var r=t[o];VS.has(r.nodeName)||(r=KS(r,e),r!==null&&(n=n.concat(r)))}return n};const uP=Sm;var cP=uP,GS=cP,$p=zo,xl=Rt,de=he;function Br(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let YS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function XS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":GS.$generateHtmlFromNodes(e,t)}function QS(e){let t=de.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return de.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(ZS(e,t))}function kp(e,t,n){(de.DEPRECATED_$isGridSelection(n)||xl.$findMatchingParent(n.anchor.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null&&xl.$findMatchingParent(n.focus.getNode(),r=>de.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&de.DEPRECATED_$isGridNode(t[0])?fP(t,n,!1,e):dP(t,n)}function dP(e,t){let n=[],r=null;for(let o=0;o<e.length;o++){let i=e[o],l=de.$isLineBreakNode(i);if(l||de.$isDecoratorNode(i)&&i.isInline()||de.$isElementNode(i)&&i.isInline()||de.$isTextNode(i)||i.isParentRequired()){if(r===null&&(r=i.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(i)}else n.push(i),r=null}de.$isRangeSelection(t)?t.insertNodes(n):de.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),de.DEPRECATED_$isGridCellNode(e)||Br(41),e.append(...n))}function fP(e,t,n,r){e.length===1&&de.DEPRECATED_$isGridNode(e[0])||Br(42);var o=e[0];e=o.getChildren(),n=o.getFirstChildOrThrow().getChildrenSize();var i=o.getChildrenSize(),l=xl.$findMatchingParent(t.anchor.getNode(),h=>de.DEPRECATED_$isGridCellNode(h));t=(o=l&&xl.$findMatchingParent(l,h=>de.DEPRECATED_$isGridRowNode(h)))&&xl.$findMatchingParent(o,h=>de.DEPRECATED_$isGridNode(h)),de.DEPRECATED_$isGridCellNode(l)&&de.DEPRECATED_$isGridRowNode(o)&&de.DEPRECATED_$isGridNode(t)||Br(43);var s=o.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+i-1);i=l.getIndexWithinParent(),l=Math.min(o.getChildrenSize()-1,i+n-1),n=Math.min(i,l),o=Math.min(s,a),i=Math.max(i,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=o;h<=s;h++){var d=a[h];de.DEPRECATED_$isGridRowNode(d)||Br(24);var f=e[l];de.DEPRECATED_$isGridRowNode(f)||Br(24),d=d.getChildren(),f=f.getChildren();let m=0;for(let g=n;g<=i;g++){let _=d[g];de.DEPRECATED_$isGridCellNode(_)||Br(25);let v=f[m];de.DEPRECATED_$isGridCellNode(v)||Br(25),h===o&&g===n?u=_.getKey():h===s&&g===i&&(c=_.getKey());let y=_.getChildren();v.getChildren().forEach(x=>{de.$isTextNode(x)&&de.$createParagraphNode().append(x),_.append(x)}),y.forEach(x=>x.remove()),m++}l++}u&&c&&(e=de.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),de.$setSelection(e),r.dispatchCommand(de.SELECTION_CHANGE_COMMAND,void 0))}function JS(e,t,n,r=[]){let o=t!=null?n.isSelected(t):!0,i=de.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=$p.$cloneWithProperties(n);l=s=de.$isTextNode(s)&&t!=null?$p.$sliceSelectedTextNodeContent(t,s):s}let a=de.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&Br(58,c.name);let d=s.children;for(de.$isElementNode(u)&&(Array.isArray(d)||Br(59,c.name)),de.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:o=!1),l=0;l<a.length;l++)u=a[l],c=JS(e,t,u,s.children),!o&&de.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(o=!0);if(o&&!i)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return o}function ZS(e,t){let n=[],r=de.$getRoot().getChildren();for(let o=0;o<r.length;o++)JS(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function qS(e){let t=[];for(let n=0;n<e.length;n++){let r=de.$parseSerializedNode(e[n]);de.$isTextNode(r)&&$p.$addNodeStyle(r),t.push(r)}return t}let Bi=null;function d0(e,t){var n=YS?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!de.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=de.$getSelection(),t===null||r===null))return!1;n=XS(e),e=QS(e);let o="";return r!==null&&(o=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",o),!0}to.$generateJSONFromSelectedNodes=ZS;to.$generateNodesFromSerializedNodes=qS;to.$getHtmlContent=XS;to.$getLexicalContent=QS;to.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};to.$insertDataTransferForRichText=function(e,t,n){var r=e.getData("application/x-lexical-editor");if(r)try{let l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes)){let s=qS(l.nodes);return kp(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var o=new DOMParser().parseFromString(r,"text/html"),i=GS.$generateNodesFromDOM(n,o);return kp(n,i,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(de.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,o=0;o<n;o++)i=e[o],i===`
128
+ `||i===`\r
129
+ `?t.insertParagraph():i===" "?t.insertNodes([de.$createTabNode()]):t.insertText(i);else t.insertRawText(e)};to.$insertGeneratedNodes=kp;to.copyToClipboard=async function(e,t){if(Bi!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(d0(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,o=YS?(e._window||window).getSelection():null;if(n===null||o===null)return!1;let i=r.createElement("span");return i.style.cssText="position: fixed; top: -1000px;",i.append(r.createTextNode("#")),n.append(i),n=new Range,n.setStart(i,0),n.setEnd(i,1),o.removeAllRanges(),o.addRange(n),new Promise(l=>{let s=e.registerCommand(de.COPY_COMMAND,a=>(xl.objectKlassEquals(a,ClipboardEvent)&&(s(),Bi!==null&&(window.clearTimeout(Bi),Bi=null),l(d0(e,a))),!0),de.COMMAND_PRIORITY_CRITICAL);Bi=window.setTimeout(()=>{s(),Bi=null,l(!1)},50),r.execCommand("copy"),i.remove()})};const hP=to;var pP=hP,Kc=pP,bu=zo,_r=Rt,A=he;function f0(e,t){return typeof document.caretRangeFromPoint<"u"?(e=document.caretRangeFromPoint(e,t),e===null?null:{node:e.startContainer,offset:e.startOffset}):document.caretPositionFromPoint!=="undefined"?(e=document.caretPositionFromPoint(e,t),e===null?null:{node:e.offsetNode,offset:e.offset}):null}let Zl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gP=Zl&&"documentMode"in document?document.documentMode:null,mP=Zl&&"InputEvent"in window&&!gP?"getTargetRanges"in new window.InputEvent("input"):!1,vP=Zl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),yP=Zl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,xP=Zl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),wP=Zl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!xP,bp=A.createCommand("DRAG_DROP_PASTE_FILE"),Em=class eE extends A.ElementNode{static getType(){return"quote"}static clone(t){return new eE(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return _r.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:_P,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&_r.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=Cm();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=A.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=A.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function Cm(){return A.$applyNodeReplacement(new Em)}let $m=class tE extends A.ElementNode{static getType(){return"heading"}static clone(t){return new tE(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}createDOM(t){let n=this.__tag,r=document.createElement(n);return t=t.theme.heading,t!==void 0&&_r.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:Wi,priority:0}),h2:()=>({conversion:Wi,priority:0}),h3:()=>({conversion:Wi,priority:0}),h4:()=>({conversion:Wi,priority:0}),h5:()=>({conversion:Wi,priority:0}),h6:()=>({conversion:Wi,priority:0}),p:t=>(t=t.firstChild,t!==null&&h0(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>h0(t)?{conversion:()=>({node:ul("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&_r.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=ul(t.tag);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(t,n=!0){t=t?t.anchor.offset:0,t=0<t&&t<this.getTextContentSize()?ul(this.getTag()):A.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?A.$createParagraphNode():ul(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function h0(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function Wi(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=ul(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function _P(e){let t=Cm();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function ul(e){return A.$applyNodeReplacement(new $m(e))}function SP(e,t){e.preventDefault(),t.update(()=>{let n=A.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(A.$isRangeSelection(n)||A.DEPRECATED_$isGridSelection(n))&&Kc.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function EP(e,t){await Kc.copyToClipboard(t,_r.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=A.$getSelection();A.$isRangeSelection(n)?n.removeText():A.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function Rs(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),t===null)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function p0(e){var t=A.$getSelection();if(!A.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let i=0;i<t.length;i++){var r=t[i],o=r.getKey();n.has(o)||(r=_r.$getNearestBlockElementAncestorOrThrow(r),o=r.getKey(),r.canIndent()&&!n.has(o)&&(n.add(o),e(r)))}return 0<n.size}function Tu(e){return e=A.$getNearestNodeFromDOMNode(e),A.$isDecoratorNode(e)}Ar.$createHeadingNode=ul;Ar.$createQuoteNode=Cm;Ar.$isHeadingNode=function(e){return e instanceof $m};Ar.$isQuoteNode=function(e){return e instanceof Em};Ar.DRAG_DROP_PASTE=bp;Ar.HeadingNode=$m;Ar.QuoteNode=Em;Ar.eventFiles=Rs;Ar.registerRichText=function(e){return _r.mergeRegister(e.registerCommand(A.CLICK_COMMAND,()=>{const t=A.$getSelection();return A.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(A.DELETE_CHARACTER_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DELETE_WORD_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DELETE_LINE_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=A.$getSelection();if(typeof t=="string")A.$isRangeSelection(n)?n.insertText(t):A.DEPRECATED_$isGridSelection(n);else{if(!A.$isRangeSelection(n)&&!A.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?Kc.$insertDataTransferForRichText(r,n,e):A.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.REMOVE_TEXT_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(t.removeText(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.FORMAT_TEXT_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.formatText(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.FORMAT_ELEMENT_COMMAND,t=>{var n=A.$getSelection();if(!A.$isRangeSelection(n)&&!A.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=_r.$findMatchingParent(r,o=>A.$isElementNode(o)&&!o.isInline()),n!==null&&n.setFormat(t);return!0},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_LINE_BREAK_COMMAND,t=>{const n=A.$getSelection();return A.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_PARAGRAPH_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INSERT_TAB_COMMAND,()=>(A.$insertNodes([A.$createTabNode()]),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.INDENT_CONTENT_COMMAND,()=>p0(t=>{const n=t.getIndent();t.setIndent(n+1)}),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.OUTDENT_CONTENT_COMMAND,()=>p0(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_UP_COMMAND,t=>{var n=A.$getSelection();if(A.$isNodeSelection(n)&&!Tu(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(A.$isRangeSelection(n)&&(n=A.$getAdjacentNode(n.focus,!0),!t.shiftKey&&A.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_DOWN_COMMAND,t=>{var n=A.$getSelection();if(A.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(A.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===A.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=A.$getAdjacentNode(n.focus,!1),!t.shiftKey&&A.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_LEFT_COMMAND,t=>{const n=A.$getSelection();if(A.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return A.$isRangeSelection(n)&&bu.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),bu.$moveCharacter(n,r,!0),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ARROW_RIGHT_COMMAND,t=>{const n=A.$getSelection();if(A.$isNodeSelection(n)&&!Tu(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return A.$isRangeSelection(n)?(r=t.shiftKey,bu.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),bu.$moveCharacter(n,r,!1),!0):!1):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_BACKSPACE_COMMAND,t=>{if(Tu(t.target))return!1;const n=A.$getSelection();if(!A.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!A.$isRootNode(r)&&0<_r.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(A.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(A.DELETE_CHARACTER_COMMAND,!0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_DELETE_COMMAND,t=>{if(Tu(t.target))return!1;const n=A.$getSelection();return A.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(A.DELETE_CHARACTER_COMMAND,!1)):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ENTER_COMMAND,t=>{const n=A.$getSelection();if(!A.$isRangeSelection(n))return!1;if(t!==null){if((yP||vP||wP)&&mP)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(A.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(A.INSERT_PARAGRAPH_COMMAND,void 0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.KEY_ESCAPE_COMMAND,()=>{const t=A.$getSelection();return A.$isRangeSelection(t)?(e.blur(),!0):!1},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DROP_COMMAND,t=>{const[,n]=Rs(t);if(0<n.length){var r=f0(t.clientX,t.clientY);if(r!==null){const{offset:i,node:l}=r;var o=A.$getNearestNodeFromDOMNode(l);if(o!==null){if(r=A.$createRangeSelection(),A.$isTextNode(o))r.anchor.set(o.getKey(),i,"text"),r.focus.set(o.getKey(),i,"text");else{const s=o.getParentOrThrow().getKey();o=o.getIndexWithinParent()+1,r.anchor.set(s,o,"element"),r.focus.set(s,o,"element")}r=A.$normalizeSelection__EXPERIMENTAL(r),A.$setSelection(r)}e.dispatchCommand(bp,n)}return t.preventDefault(),!0}return t=A.$getSelection(),!!A.$isRangeSelection(t)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DRAGSTART_COMMAND,t=>{[t]=Rs(t);const n=A.$getSelection();return!(t&&!A.$isRangeSelection(n))},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.DRAGOVER_COMMAND,t=>{var[n]=Rs(t);const r=A.$getSelection();return n&&!A.$isRangeSelection(r)?!1:(n=f0(t.clientX,t.clientY),n!==null&&(n=A.$getNearestNodeFromDOMNode(n.node),A.$isDecoratorNode(n)&&t.preventDefault()),!0)},A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.SELECT_ALL_COMMAND,()=>(A.$selectAll(),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.COPY_COMMAND,t=>(Kc.copyToClipboard(e,_r.objectKlassEquals(t,ClipboardEvent)?t:null),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.CUT_COMMAND,t=>(EP(t,e),!0),A.COMMAND_PRIORITY_EDITOR),e.registerCommand(A.PASTE_COMMAND,t=>{const[,n,r]=Rs(t);if(0<n.length&&!r)return e.dispatchCommand(bp,n),!0;if(A.isSelectionCapturedInDecoratorInput(t.target))return!1;const o=A.$getSelection();return A.$isRangeSelection(o)||A.DEPRECATED_$isGridSelection(o)?(SP(t,e),!0):!1},A.COMMAND_PRIORITY_EDITOR))};const CP=Ar;var Js=CP,nE=dr,$P=rP,zn=p,kP=iP,rE=Rt,g0=Nr,bP=sP,TP=Js,km=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?zn.useLayoutEffect:zn.useEffect;function m0(e){return e.getEditorState().read(kP.$canShowPlaceholderCurry(e.isComposing()))}function NP(e){let[t,n]=zn.useState(()=>m0(e));return km(()=>{function r(){let o=m0(e);n(o)}return r(),rE.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function RP(e,t){let[n,r]=zn.useState(()=>e.getDecorators());return km(()=>e.registerDecoratorListener(o=>{g0.flushSync(()=>{r(o)})}),[e]),zn.useEffect(()=>{r(e.getDecorators())},[e]),zn.useMemo(()=>{let o=[],i=Object.keys(n);for(let l=0;l<i.length;l++){let s=i[l],a=zn.createElement(t,{onError:c=>e._onError(c)},zn.createElement(zn.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&o.push(g0.createPortal(a,u,s))}return o},[t,n,e])}function PP(e){km(()=>rE.mergeRegister(TP.registerRichText(e),bP.registerDragonSupport(e)),[e])}function OP({content:e}){var[t]=nE.useLexicalComposerContext();t=NP(t);let n=$P();return t?typeof e=="function"?e(n):e:null}FS.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=nE.useLexicalComposerContext();return n=RP(r,n),PP(r),zn.createElement(zn.Fragment,null,e,zn.createElement(OP,{content:t}),n)};const AP=FS;var MP=AP,oE={},Ir=yo,LP=dr,iE=p,DP=Rt,vs=he;function IP(e){iE.useEffect(()=>DP.mergeRegister(e.registerCommand(Ir.INSERT_ORDERED_LIST_COMMAND,()=>(Ir.insertList(e,"number"),!0),vs.COMMAND_PRIORITY_LOW),e.registerCommand(Ir.INSERT_UNORDERED_LIST_COMMAND,()=>(Ir.insertList(e,"bullet"),!0),vs.COMMAND_PRIORITY_LOW),e.registerCommand(Ir.REMOVE_LIST_COMMAND,()=>(Ir.removeList(e),!0),vs.COMMAND_PRIORITY_LOW),e.registerCommand(vs.INSERT_PARAGRAPH_COMMAND,()=>!!Ir.$handleListInsertParagraph(),vs.COMMAND_PRIORITY_LOW)),[e])}oE.ListPlugin=function(){let[e]=LP.useLexicalComposerContext();return iE.useEffect(()=>{if(!e.hasNodes([Ir.ListNode,Ir.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),IP(e),null};const jP=oE;var zP=jP,lE={},no={},sE=Rt,$r=he;let FP=new Set(["http:","https:","mailto:","sms:","tel:"]);class ql extends $r.ElementNode{static getType(){return"link"}static clone(t){return new ql(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:o=null,rel:i=null,title:l=null}=n;this.__url=t,this.__target=o,this.__rel=i,this.__title=l}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),sE.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,o=this.__target,i=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),i!==t.__rel&&(i?n.rel=i:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:BP,priority:1})}}static importJSON(t){let n=Na(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}sanitizeUrl(t){try{let n=new URL(t);if(!FP.has(n.protocol))return"about:blank"}catch{}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(t){this.getWritable().__url=t}getTarget(){return this.getLatest().__target}setTarget(t){this.getWritable().__target=t}getRel(){return this.getLatest().__rel}setRel(t){this.getWritable().__rel=t}getTitle(){return this.getLatest().__title}setTitle(t){this.getWritable().__title=t}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),$r.$isElementNode(t)?(n=Na(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),t.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n){if(!$r.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&0<n.getTextContent().length}}function BP(e){let t=null;if(sE.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=Na(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function Na(e,t){return $r.$applyNodeReplacement(new ql(e,t))}function ti(e){return e instanceof ql}class Ga extends ql{static getType(){return"autolink"}static clone(t){return new Ga(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=Tp(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),$r.$isElementNode(t)?(n=Tp(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function Tp(e,t){return $r.$applyNodeReplacement(new Ga(e,t))}let WP=$r.createCommand("TOGGLE_LINK_COMMAND");function UP(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}no.$createAutoLinkNode=Tp;no.$createLinkNode=Na;no.$isAutoLinkNode=function(e){return e instanceof Ga};no.$isLinkNode=ti;no.AutoLinkNode=Ga;no.LinkNode=ql;no.TOGGLE_LINK_COMMAND=WP;no.toggleLink=function(e,t={}){let{target:n,title:r}=t,o=t.rel===void 0?"noreferrer":t.rel;if(t=$r.$getSelection(),$r.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),ti(l)){let s=l.getChildren();for(let a=0;a<s.length;a++)l.insertBefore(s[a]);l.remove()}});else{if(t.length===1){var i=t[0];if(i=ti(i)?i:UP(i,ti),i!==null){i.setURL(e),n!==void 0&&i.setTarget(n),o!==null&&i.setRel(o),r!==void 0&&i.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!$r.$isElementNode(a)||a.isInline()))if(ti(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),o!==null&&s.setRel(o),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=Na(e,{rel:o,target:n}),ti(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),ti(a)){if(!a.is(s)){if(s!==null){u=a.getChildren();for(let c=0;c<u.length;c++)s.append(u[c])}a.remove()}}else s!==null&&s.append(a)})}};const HP=no;var Ml=HP,Ui=Ml,VP=dr,KP=Rt,Hi=he,GP=p;lE.LinkPlugin=function({validateUrl:e}){let[t]=VP.useLexicalComposerContext();return GP.useEffect(()=>{if(!t.hasNodes([Ui.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return KP.mergeRegister(t.registerCommand(Ui.TOGGLE_LINK_COMMAND,n=>{if(n===null)return Ui.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(Ui.toggleLink(n),!0):!1;let{url:r,target:o,rel:i,title:l}=n;return Ui.toggleLink(r,{rel:i,target:o,title:l}),!0},Hi.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(Hi.PASTE_COMMAND,n=>{let r=Hi.$getSelection();if(!Hi.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let o=n.clipboardData.getData("text");return e(o)?r.getNodes().some(i=>Hi.$isElementNode(i))?!1:(t.dispatchCommand(Ui.TOGGLE_LINK_COMMAND,o),n.preventDefault(),!0):!1},Hi.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const YP=lE;var XP=YP;function QP({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:o,ariaLabel:i,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:m=!0,style:g,tabIndex:_,"data-testid":v,...y}){const[x]=dr.useLexicalComposerContext(),[S,k]=p.useState(!1),T=p.useCallback(b=>{var D;x.setRootElement(b);const N=(D=document.getElementById("val-ui"))==null?void 0:D.shadowRoot;if(N&&"getSelection"in N){x._window=N;return}},[x]);return p.useLayoutEffect(()=>(k(x.isEditable()),x.registerEditableListener(b=>{k(b)})),[x]),w.jsx("div",{...y,"aria-activedescendant":S?e:void 0,"aria-autocomplete":S?t:"none","aria-controls":S?n:void 0,"aria-describedby":r,"aria-expanded":S&&h==="combobox"?!!o:void 0,"aria-label":i,"aria-labelledby":l,"aria-multiline":s,"aria-owns":S?a:void 0,"aria-readonly":S?void 0:!0,"aria-required":u,autoCapitalize:c,className:d,contentEditable:S,"data-testid":v,id:f,ref:T,role:h,spellCheck:m,style:g,tabIndex:_})}function JP({className:e}){return w.jsx(QP,{className:e})}class Ya extends he.DecoratorNode{constructor(t,n){super(n),this.__src=t.src,this.__altText=t.altText,this.__width=t.width,this.__height=t.height}static getType(){return"image"}static clone(t){return new Ya({src:t.__src,altText:t.__altText,width:t.__width,height:t.__height})}exportJSON(){return{altText:this.__altText,height:this.__width,src:this.__src,type:"image",version:1,width:this.__width}}static importJSON(t){return aE(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return w.jsx(ZP,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function ZP(e){return w.jsx("img",{src:e.src})}function aE(e){return new Ya(e)}function qP(){const[e]=dr.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const uE=he.createCommand("INSERT_IMAGE_COMMAND");function eO(){const[e]=dr.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([Ya]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Rt.mergeRegister(e.registerCommand(uE,t=>{const n=aE(t);return he.$insertNodes([n]),he.$isRootOrShadowRoot(n.getParentOrThrow())&&Rt.$wrapNodeInElement(n,he.$createParagraphNode).selectEnd(),!0},he.COMMAND_PRIORITY_EDITOR))},[e]),null}const tO=({className:e})=>w.jsxs("svg",{height:12,width:12,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[w.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),w.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),nO=tO,rO=({className:e})=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,width:12,height:12,children:[w.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),w.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),w.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),oO=rO,iO=({className:e})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",className:e,width:12,height:12,children:w.jsx("path",{fillRule:"evenodd",d:"M13,15 L13,21 C13,21.5522847 12.5522847,22 12,22 C11.4477153,22 11,21.5522847 11,21 L11,15 L13,15 Z M3,13 C2.44771525,13 2,12.5522847 2,12 C2,11.4477153 2.44771525,11 3,11 L21,11 C21.5522847,11 22,11.4477153 22,12 C22,12.5522847 21.5522847,13 21,13 L3,13 Z M19,2 C19.5522847,2 20,2.44771525 20,3 C20,3.55228475 19.5522847,4 19,4 L13,4 L13,9 L11,9 L11,4 L5,4 C4.44771525,4 4,3.55228475 4,3 C4,2.44771525 4.44771525,2 5,2 L19,2 Z"})}),lO=iO,sO=({variant:e="primary",onClick:t,children:n,icon:r,disabled:o=!1})=>w.jsx("button",{disabled:o,className:vd("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","bg-background hover:bg-background text-fill disabled:bg-fill disabled:text-background":e==="primary","bg-transparent border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:w.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),ni=sO,aO=({className:e})=>w.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.70733 1.00015L8.7784 6.07121L8.07129 6.77832L3.00022 1.70725L3.70733 1.00015Z",fill:"currentColor"}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.00015 10.4709L8.07121 5.39983L8.77832 6.10693L3.70725 11.178L3.00015 10.4709Z",fill:"currentColor"})]}),uO=aO,cE=ee.createContext({get api(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get session(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get theme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setTheme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get editMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setEditMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get highlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setHighlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setWindowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get windowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")}});function bm(){return ee.useContext(cE)}const cO=({options:e,onChange:t,label:n,icon:r})=>{const[o,i]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=bm(),c=()=>{i(!o)},d=(f,h)=>{a(h),t(f),i(!1)};return p.useEffect(()=>{const f=h=>{o&&l.current&&!l.current.contains(h.target)&&i(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),w.jsx("div",{className:"text-[12px]",ref:l,children:w.jsx(ni,{onClick:f=>{f.preventDefault(),c()},icon:w.jsx(uO,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${o?"":"rotate-[90deg]"}`}),children:w.jsxs("div",{className:"relative",children:[w.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),o&&w.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary bg-border w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:w.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>w.jsx("button",{onClick:m=>{m.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:bg-background hover:text-highlight ${h===s&&"font-bold bg-background hover:bg-background truncate"}`,children:f},f))})})]})})})},dO=cO,fO=new TextEncoder;function dE(e){return new Promise((t,n)=>{var i;const r=(i=e.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const l=o.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",async()=>{const a=await $n.getSHA256Hash(fO.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=Yg(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&Xg(u)})}else t({src:l,filename:r==null?void 0:r.name,sha256:a})}),s.src=l}else n(l?{message:"Unexpected image result type",result:l}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function fE(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?zo.$isAtNodeEnd(n)?r:o:zo.$isAtNodeEnd(t)?r:o}function hO(){const[e]=dr.useLexicalComposerContext();return p.useEffect(()=>Rt.mergeRegister(e.registerCommand(he.CLICK_COMMAND,t=>{const n=he.$getSelection();if(he.$isRangeSelection(n)){const r=fE(n),o=Rt.$findMatchingParent(r,Ml.$isLinkNode);if(Ml.$isLinkNode(o)&&(t.metaKey||t.ctrlKey))return window.open(o.getURL(),"_blank"),!0}return!1},he.COMMAND_PRIORITY_LOW)),[]),null}var hE={exports:{}},pO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",gO=pO,mO=gO;function pE(){}function gE(){}gE.resetWarningCache=pE;var vO=function(){function e(r,o,i,l,s,a){if(a!==mO){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:gE,resetWarningCache:pE};return n.PropTypes=n,n};hE.exports=vO();var yO=hE.exports;const Bn=La(yO);function Np(){return Np=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Np.apply(this,arguments)}function xO(e,t){if(e==null)return{};var n=wO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Tm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=xO(e,["color","size"]);return ee.createElement("svg",Np({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("polyline",{points:"20 6 9 17 4 12"}))});Tm.propTypes={color:Bn.string,size:Bn.oneOfType([Bn.string,Bn.number])};Tm.displayName="Check";const _O=Tm;function Rp(){return Rp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rp.apply(this,arguments)}function SO(e,t){if(e==null)return{};var n=EO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Nm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=SO(e,["color","size"]);return ee.createElement("svg",Rp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),ee.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}))});Nm.propTypes={color:Bn.string,size:Bn.oneOfType([Bn.string,Bn.number])};Nm.displayName="Link";const CO=Nm;function Pp(){return Pp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(this,arguments)}function $O(e,t){if(e==null)return{};var n=kO(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kO(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Rm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=$O(e,["color","size"]);return ee.createElement("svg",Pp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});Rm.propTypes={color:Bn.string,size:Bn.oneOfType([Bn.string,Bn.number])};Rm.displayName="X";const bO=Rm,TO=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[o]=dr.useLexicalComposerContext();p.useEffect(()=>{n&&n(o)},[o]);const[i,l]=p.useState(o),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(!1),[g,_]=p.useState(!1);p.useState("15px"),p.useState("#000"),p.useState("Sans");const[v,y]=p.useState("paragraph");p.useState(!1),p.useState(!1),p.useState("url"),p.useState(null);const[x,S]=p.useState(null),k=M=>{o.dispatchCommand(Ml.TOGGLE_LINK_COMMAND,M)},T={paragraph:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",bullet:"Bulleted List"},b={};for(const M in T)b[T[M]]=M;const N=p.useCallback(()=>{const M=he.$getSelection();if(he.$isRangeSelection(M)){const j=M.anchor.getNode();let B=j.getKey()==="root"?j:Rt.$findMatchingParent(j,$=>{const E=$.getParent();return E!==null&&he.$isRootOrShadowRoot(E)});B===null&&(B=j.getTopLevelElementOrThrow());const re=fE(M),V=Rt.$findMatchingParent(re,Ml.$isLinkNode);if(V!==null){const $=V.getURL();S($)}else S(null);const Y=B.getKey(),C=i.getElementByKey(Y);if(c(M.hasFormat("bold")),f(M.hasFormat("italic")),m(M.hasFormat("strikethrough")),_(M.hasFormat("underline")),C!==null)if(a(Y),yo.$isListNode(B)){const $=Rt.$getNearestNodeOfType(j,yo.ListNode),E=$?$.getListType():B.getListType();y(E)}else{const $=Js.$isHeadingNode(B)?B.getTag():B.getType();$ in T&&y($)}}},[i]);p.useEffect(()=>Rt.mergeRegister(o.registerUpdateListener(({editorState:M})=>{M.read(()=>{N()})})),[N,i,o]),p.useEffect(()=>o.registerCommand(he.SELECTION_CHANGE_COMMAND,(M,j)=>(N(),l(j),!1),he.COMMAND_PRIORITY_CRITICAL),[o,N]);const D=M=>{["h1","h2","h3","h4","h5","h6"].includes(M)?v!==M&&o.update(()=>{const j=he.$getSelection();he.$isRangeSelection(j)&&zo.$setBlocksType(j,()=>Js.$createHeadingNode(M))}):M==="paragraph"&&v!=="paragraph"?o.update(()=>{const j=he.$getSelection();(he.$isRangeSelection(j)||he.DEPRECATED_$isGridSelection(j))&&zo.$setBlocksType(j,()=>he.$createParagraphNode())}):M==="number"&&v!=="number"?o.dispatchCommand(yo.INSERT_ORDERED_LIST_COMMAND,void 0):M==="bullet"&&v!=="bullet"?o.dispatchCommand(yo.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(yo.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{o.update(()=>{const M=he.$getSelection();if(he.$isRangeSelection(M)){const j=M.anchor,B=M.focus,re=M.getNodes();if(j.key===B.key&&j.offset===B.offset)return;re.forEach((V,Y)=>{he.$isTextNode(V)?(Y===0&&j.offset!==0&&(V=V.splitText(j.offset)[1]||V),Y===re.length-1&&(V=V.splitText(B.offset)[0]||V),V.__style!==""&&V.setStyle(""),V.__format!==0&&(V.setFormat(0),Rt.$getNearestBlockElementAncestorOrThrow(V).setFormat(""))):Js.$isHeadingNode(V)&&V.replace(he.$createParagraphNode(),!0)})}})},[i]),w.jsxs("div",{className:"sticky top-0 border-b bg-background border-highlight flex flex-col",children:[w.jsxs("div",{className:"flex flex-row gap-1",children:[w.jsx(dO,{options:Object.values(T),label:T[v]??v+" (not supported)",onChange:M=>{D(b[M])}}),w.jsx(ni,{variant:"primary",onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:w.jsx(nO,{className:`${u&&"stroke-[3px]"}`})}),w.jsx(ni,{active:h,onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"strikethrough")},icon:w.jsx(lO,{className:`${h&&"stroke-[2px]"}`})}),w.jsx(ni,{active:d,onClick:M=>{M.preventDefault(),o.dispatchCommand(he.FORMAT_TEXT_COMMAND,"italic")},icon:w.jsx(oO,{className:`${d&&"stroke-[3px]"}`})}),w.jsx(ni,{active:x!==null,onClick:M=>{M.preventDefault(),S(""),k("")},icon:w.jsx(CO,{width:12,height:12,className:`${x!==null&&"stroke-[3px]"}`})}),w.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[w.jsx(l_,{}),w.jsx("input",{type:"file",hidden:!0,onChange:M=>{M.preventDefault(),dE(M).then(j=>{o.dispatchCommand(uE,{...j})}).catch(j=>{console.error("Error reading image",j)})}})]})]}),x!==null&&w.jsxs("div",{className:"flex flex-row p-2",children:[w.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 text-primary bg-background px-2",value:x,onChange:M=>{M.preventDefault(),S(M.target.value)}}),w.jsx(ni,{variant:"primary",onClick:M=>{M.preventDefault(),k(x||null)},icon:w.jsx(_O,{size:14})}),w.jsx(ni,{variant:"primary",onClick:M=>{M.preventDefault(),k(null)},icon:w.jsx(bO,{size:14})})]})]})},NO=TO;function RO(e){console.error(e)}const PO=28,OO=({richtext:e,onEditor:t})=>{const{windowSize:n}=bm(),o={namespace:"val",editorState:i=>{i.setEditorState(i.parseEditorState({root:_2(v_(e))}))},nodes:[Js.HeadingNode,Ya,yo.ListNode,yo.ListItemNode,Ml.LinkNode],theme:{text:{bold:"font-semibold",underline:"underline",italic:"italic",strikethrough:"line-through",underlineStrikethrough:"underline line-through"},list:{listitem:"ml-[20px]",ol:"list-decimal",ul:"list-disc"},heading:{h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-bold",h4:"text-xl font-bold",h5:"text-lg font-bold",h6:"text-md font-bold"},link:"text-highlight underline"},onError:RO};return w.jsxs(MR.LexicalComposer,{initialConfig:o,children:[w.jsx(qP,{}),w.jsx(NO,{onEditor:t}),w.jsx(MP.RichTextPlugin,{contentEditable:w.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-PO:void 0},children:w.jsx(JP,{className:"p-4 outline-none bg-fill"})}),placeholder:w.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:BR}),w.jsx(XP.LinkPlugin,{}),w.jsx(hO,{}),w.jsx(zP.ListPlugin,{}),w.jsx(eO,{}),w.jsx(QR.HistoryPlugin,{})]})};var AO={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const MO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),An=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...AO,width:o,height:o,stroke:r,strokeWidth:l?Number(i)*24/Number(o):i,className:`lucide lucide-${MO(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},LO=An("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),mE=An("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),DO=An("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),v0=An("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),IO=An("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),jO=An("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),zO=An("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),FO=An("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),BO=An("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),WO=An("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),UO=An("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),HO=An("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),VO=An("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Pm="p-1 border rounded-full shadow border-accent",y0="valbuild:urlBeforeNavigation";function KO({api:e}){const{theme:t,setTheme:n,editMode:r,setEditMode:o,session:i}=bm();if(i.status==="success"&&i.data.mode==="unauthorized")return w.jsxs(x0,{href:e.getLoginUrl(window.location.href),children:[w.jsx("span",{children:"Login"}),w.jsx(v0,{size:18})]});if(i.status==="success"&&!i.data.enabled)return w.jsxs(x0,{href:e.getEnableUrl(window.location.href),children:[w.jsx("span",{children:"Enable"}),w.jsx(v0,{size:18})]});const[l,s]=p.useState();return p.useEffect(()=>{i.status==="success"&&i.data.mode==="proxy"&&e.getPatches({}).then(a=>{if(Fs.isOk(a)){let u=0;for(const c in a.value)u+=a.value[c].length;s(u)}else console.error("Could not load patches",a.error)})},[i]),w.jsxs(GO,{children:[w.jsx(Nu,{active:r==="hover",onClick:()=>{o(a=>a==="hover"?"off":"hover")},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="hover"?w.jsx(FO,{size:18}):w.jsx(BO,{size:18})})}),w.jsx(Nu,{onClick:()=>{n(t==="dark"?"light":"dark")},children:w.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[t==="dark"&&w.jsx(HO,{size:15}),t==="light"&&w.jsx(zO,{size:15})]})}),w.jsx(Nu,{active:r==="full",onClick:()=>{if(r!=="full")localStorage.setItem(y0,window.location.href),window.location.href=e.getEditUrl();else if(r==="full"){const a=localStorage.getItem(y0);window.location.href=a||"/"}},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="full"?w.jsx(jO,{size:15}):w.jsx(IO,{size:15})})}),l&&w.jsx(Nu,{onClick:()=>{},children:w.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[w.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:l}),w.jsx(UO,{size:18})]})}),w.jsx("a",{className:Pm,href:e.getDisableUrl(window.location.href),children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:w.jsx(WO,{size:18})})})]})}function x0({href:e,children:t}){return w.jsx("div",{className:"flex flex-row items-center justify-center w-full h-full font-sans border-2 rounded-full gap-x-3 text-primary bg-background border-fill",children:w.jsx("a",{className:Pm,href:e,children:w.jsx("div",{className:"flex items-center justify-center px-2 gap-x-2",children:t})})})}function GO({children:e}){return w.jsx("div",{className:"flex flex-row items-center justify-center w-full h-full px-2 py-2 font-sans border-2 rounded-full gap-x-3 text-primary bg-background border-fill",children:e})}function Nu({active:e,onClick:t,children:n}){return w.jsx("button",{className:vd(Pm,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}const w0=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,_0=qw,YO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=w0(c)||w0(d);return o[u][f]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(m=>{let[g,_]=m;return Array.isArray(_)?_.includes({...i,...s}[g]):{...i,...s}[g]===_})?[...u,d,f]:u},[]);return _0(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},XO=YO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),es=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?Rl:"button";return w.jsx(l,{className:ut(XO({variant:t,size:n,className:e})),ref:i,...o})});es.displayName="Button";function QO(e="dark"){const[t,n]=p.useState(e);return p.useEffect(()=>{localStorage.getItem("val-theme")==="light"?n("light"):localStorage.getItem("val-theme")==="dark"||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?n("dark"):window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&n("light");const r=o=>{localStorage.getItem("val-theme")||n(o.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",r)}},[]),[t,r=>{localStorage.setItem("val-theme",r),n(r)}]}const Om=p.forwardRef(({className:e,type:t,...n},r)=>w.jsx("input",{type:t,className:ut("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Om.displayName="Input";function vE(e){const t=e+"CollectionProvider",[n,r]=Ni(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:m,children:g}=h,_=ee.useRef(null),v=ee.useRef(new Map).current;return ee.createElement(o,{scope:m,itemMap:v,collectionRef:_},g)},s=e+"CollectionSlot",a=ee.forwardRef((h,m)=>{const{scope:g,children:_}=h,v=i(s,g),y=Ze(m,v.collectionRef);return ee.createElement(Rl,{ref:y},_)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=ee.forwardRef((h,m)=>{const{scope:g,children:_,...v}=h,y=ee.useRef(null),x=Ze(m,y),S=i(u,g);return ee.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),ee.createElement(Rl,{[c]:"",ref:x},_)});function f(h){const m=i(e+"CollectionConsumer",h);return ee.useCallback(()=>{const _=m.collectionRef.current;if(!_)return[];const v=Array.from(_.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((S,k)=>v.indexOf(S.ref.current)-v.indexOf(k.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function JO(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Op="dismissableLayer.update",ZO="dismissableLayer.pointerDownOutside",qO="dismissableLayer.focusOutside";let S0;const e5=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),t5=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(e5),[d,f]=p.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,m]=p.useState({}),g=Ze(t,N=>f(N)),_=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=_.indexOf(v),x=d?_.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,k=x>=y,T=n5(N=>{const D=N.target,M=[...c.branches].some(j=>j.contains(D));!k||M||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},h),b=r5(N=>{const D=N.target;[...c.branches].some(j=>j.contains(D))||(l==null||l(N),s==null||s(N),N.defaultPrevented||a==null||a())},h);return JO(N=>{x===c.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(S0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),E0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=S0)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),E0())},[d,c]),p.useEffect(()=>{const N=()=>m({});return document.addEventListener(Op,N),()=>document.removeEventListener(Op,N)},[]),p.createElement(Ie.div,te({},u,{ref:g,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,b.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,T.onPointerDownCapture)}))});function n5(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){yE(ZO,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function r5(e,t=globalThis==null?void 0:globalThis.document){const n=Ht(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&yE(qO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function E0(){const e=new CustomEvent(Op);document.dispatchEvent(e)}function yE(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?IT(o,i):o.dispatchEvent(i)}let Df=0;function o5(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:C0()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:C0()),Df++,()=>{Df===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Df--}},[])}function C0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const If="focusScope.autoFocusOnMount",jf="focusScope.autoFocusOnUnmount",$0={bubbles:!1,cancelable:!0},i5=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[s,a]=p.useState(null),u=Ht(o),c=Ht(i),d=p.useRef(null),f=Ze(t,g=>a(g)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let y=function(T){if(h.paused||!s)return;const b=T.target;s.contains(b)?d.current=b:co(d.current,{select:!0})},x=function(T){if(h.paused||!s)return;const b=T.relatedTarget;b!==null&&(s.contains(b)||co(d.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&co(s)};var g=y,_=x,v=S;document.addEventListener("focusin",y),document.addEventListener("focusout",x);const k=new MutationObserver(S);return s&&k.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),k.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){b0.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(If,$0);s.addEventListener(If,u),s.dispatchEvent(v),v.defaultPrevented||(l5(d5(xE(s)),{select:!0}),document.activeElement===g&&co(s))}return()=>{s.removeEventListener(If,u),setTimeout(()=>{const v=new CustomEvent(jf,$0);s.addEventListener(jf,c),s.dispatchEvent(v),v.defaultPrevented||co(g??document.body,{select:!0}),s.removeEventListener(jf,c),b0.remove(h)},0)}}},[s,u,c,h]);const m=p.useCallback(g=>{if(!n&&!r||h.paused)return;const _=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(_&&v){const y=g.currentTarget,[x,S]=s5(y);x&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&co(x,{select:!0})):g.shiftKey&&v===x&&(g.preventDefault(),n&&co(S,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return p.createElement(Ie.div,te({tabIndex:-1},l,{ref:f,onKeyDown:m}))});function l5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(co(r,{select:t}),document.activeElement!==n)return}function s5(e){const t=xE(e),n=k0(t,e),r=k0(t.reverse(),e);return[n,r]}function xE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function k0(e,t){for(const n of e)if(!a5(n,{upTo:t}))return n}function a5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function u5(e){return e instanceof HTMLInputElement&&"select"in e}function co(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&u5(e)&&t&&e.select()}}const b0=c5();function c5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=T0(e,t),e.unshift(t)},remove(t){var n;e=T0(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function T0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function d5(e){return e.filter(t=>t.tagName!=="A")}const f5=C1.useId||(()=>{});let h5=0;function Ad(e){const[t,n]=p.useState(f5());return Nn(()=>{e||n(r=>r??String(h5++))},[e]),e||(t?`radix-${t}`:"")}const p5=["top","right","bottom","left"],Bo=Math.min,Sn=Math.max,Gc=Math.round,Ru=Math.floor,Wo=e=>({x:e,y:e}),g5={left:"right",right:"left",bottom:"top",top:"bottom"},m5={start:"end",end:"start"};function Ap(e,t,n){return Sn(e,Bo(t,n))}function Xr(e,t){return typeof e=="function"?e(t):e}function Qr(e){return e.split("-")[0]}function ts(e){return e.split("-")[1]}function Am(e){return e==="x"?"y":"x"}function Mm(e){return e==="y"?"height":"width"}function ns(e){return["top","bottom"].includes(Qr(e))?"y":"x"}function Lm(e){return Am(ns(e))}function v5(e,t,n){n===void 0&&(n=!1);const r=ts(e),o=Lm(e),i=Mm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Yc(l)),[l,Yc(l)]}function y5(e){const t=Yc(e);return[Mp(e),t,Mp(t)]}function Mp(e){return e.replace(/start|end/g,t=>m5[t])}function x5(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function w5(e,t,n,r){const o=ts(e);let i=x5(Qr(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Mp)))),i}function Yc(e){return e.replace(/left|right|bottom|top/g,t=>g5[t])}function _5(e){return{top:0,right:0,bottom:0,left:0,...e}}function wE(e){return typeof e!="number"?_5(e):{top:e,right:e,bottom:e,left:e}}function Xc(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function N0(e,t,n){let{reference:r,floating:o}=e;const i=ns(t),l=Lm(t),s=Mm(l),a=Qr(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(ts(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const S5=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=N0(u,r,a),f=r,h={},m=0;for(let g=0;g<s.length;g++){const{name:_,fn:v}=s[g],{x:y,y:x,data:S,reset:k}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=x??d,h={...h,[_]:{...h[_],...S}},k&&m<=50){m++,typeof k=="object"&&(k.placement&&(f=k.placement),k.rects&&(u=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:c,y:d}=N0(u,f,a)),g=-1;continue}}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};async function Ra(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Xr(t,e),m=wE(h),_=s[f?d==="floating"?"reference":"floating":d],v=Xc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:o}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},k=Xc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:x,strategy:a}):y);return{top:(v.top-k.top+m.top)/S.y,bottom:(k.bottom-v.bottom+m.bottom)/S.y,left:(v.left-k.left+m.left)/S.x,right:(k.right-v.right+m.right)/S.x}}const R0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=Xr(e,t)||{};if(u==null)return{};const d=wE(c),f={x:n,y:r},h=Lm(o),m=Mm(h),g=await l.getDimensions(u),_=h==="y",v=_?"top":"left",y=_?"bottom":"right",x=_?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[h]-f[h]-i.floating[m],k=f[h]-i.reference[h],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let b=T?T[x]:0;(!b||!await(l.isElement==null?void 0:l.isElement(T)))&&(b=s.floating[x]||i.floating[m]);const N=S/2-k/2,D=b/2-g[m]/2-1,M=Bo(d[v],D),j=Bo(d[y],D),B=M,re=b-g[m]-j,V=b/2-g[m]/2+N,Y=Ap(B,V,re),C=!a.arrow&&ts(o)!=null&&V!=Y&&i.reference[m]/2-(V<B?M:j)-g[m]/2<0,$=C?V<B?V-B:V-re:0;return{[h]:f[h]+$,data:{[h]:Y,centerOffset:V-Y-$,...C&&{alignmentOffset:$}},reset:C}}}),E5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,..._}=Xr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Qr(o),y=Qr(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=f||(y||!g?[Yc(s)]:y5(s));!f&&m!=="none"&&S.push(...w5(s,g,m,x));const k=[s,...S],T=await Ra(t,_),b=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&b.push(T[v]),d){const B=v5(o,l,x);b.push(T[B[0]],T[B[1]])}if(N=[...N,{placement:o,overflows:b}],!b.every(B=>B<=0)){var D,M;const B=(((D=i.flip)==null?void 0:D.index)||0)+1,re=k[B];if(re)return{data:{index:B,overflows:N},reset:{placement:re}};let V=(M=N.filter(Y=>Y.overflows[0]<=0).sort((Y,C)=>Y.overflows[1]-C.overflows[1])[0])==null?void 0:M.placement;if(!V)switch(h){case"bestFit":{var j;const Y=(j=N.map(C=>[C.placement,C.overflows.filter($=>$>0).reduce(($,E)=>$+E,0)]).sort((C,$)=>C[1]-$[1])[0])==null?void 0:j[0];Y&&(V=Y);break}case"initialPlacement":V=s;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function P0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O0(e){return p5.some(t=>e[t]>=0)}const C5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Xr(e,t);switch(r){case"referenceHidden":{const i=await Ra(t,{...o,elementContext:"reference"}),l=P0(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:O0(l)}}}case"escaped":{const i=await Ra(t,{...o,altBoundary:!0}),l=P0(i,n.floating);return{data:{escapedOffsets:l,escaped:O0(l)}}}default:return{}}}}};async function $5(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Qr(n),s=ts(n),a=ns(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&a?-1:1,d=Xr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof m=="number"&&(h=s==="end"?m*-1:m),a?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const k5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await $5(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},b5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:_=>{let{x:v,y}=_;return{x:v,y}}},...a}=Xr(e,t),u={x:n,y:r},c=await Ra(t,a),d=ns(Qr(o)),f=Am(d);let h=u[f],m=u[d];if(i){const _=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[_],x=h-c[v];h=Ap(y,h,x)}if(l){const _=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+c[_],x=m-c[v];m=Ap(y,m,x)}const g=s.fn({...t,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},T5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=Xr(e,t),c={x:n,y:r},d=ns(o),f=Am(d);let h=c[f],m=c[d];const g=Xr(s,t),_=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const x=f==="y"?"height":"width",S=i.reference[f]-i.floating[x]+_.mainAxis,k=i.reference[f]+i.reference[x]-_.mainAxis;h<S?h=S:h>k&&(h=k)}if(u){var v,y;const x=f==="y"?"width":"height",S=["top","left"].includes(Qr(o)),k=i.reference[d]-i.floating[x]+(S&&((v=l.offset)==null?void 0:v[d])||0)+(S?0:_.crossAxis),T=i.reference[d]+i.reference[x]+(S?0:((y=l.offset)==null?void 0:y[d])||0)-(S?_.crossAxis:0);m<k?m=k:m>T&&(m=T)}return{[f]:h,[d]:m}}}},N5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...s}=Xr(e,t),a=await Ra(t,s),u=Qr(n),c=ts(n),d=ns(n)==="y",{width:f,height:h}=r.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,m=c==="end"?"top":"bottom");const _=h-a[m],v=f-a[g],y=!t.middlewareData.shift;let x=_,S=v;if(d){const T=f-a.left-a.right;S=c||y?Bo(v,T):T}else{const T=h-a.top-a.bottom;x=c||y?Bo(_,T):T}if(y&&!c){const T=Sn(a.left,0),b=Sn(a.right,0),N=Sn(a.top,0),D=Sn(a.bottom,0);d?S=f-2*(T!==0||b!==0?T+b:Sn(a.left,a.right)):x=h-2*(N!==0||D!==0?N+D:Sn(a.top,a.bottom))}await l({...t,availableWidth:S,availableHeight:x});const k=await o.getDimensions(i.floating);return f!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Uo(e){return _E(e)?(e.nodeName||"").toLowerCase():"#document"}function bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ro(e){var t;return(t=(_E(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _E(e){return e instanceof Node||e instanceof bn(e).Node}function Jr(e){return e instanceof Element||e instanceof bn(e).Element}function Tr(e){return e instanceof HTMLElement||e instanceof bn(e).HTMLElement}function A0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bn(e).ShadowRoot}function Xa(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function R5(e){return["table","td","th"].includes(Uo(e))}function Dm(e){const t=Im(),n=Vn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function P5(e){let t=Ll(e);for(;Tr(t)&&!Md(t);){if(Dm(t))return t;t=Ll(t)}return null}function Im(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Md(e){return["html","body","#document"].includes(Uo(e))}function Vn(e){return bn(e).getComputedStyle(e)}function Ld(e){return Jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ll(e){if(Uo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||A0(e)&&e.host||ro(e);return A0(t)?t.host:t}function SE(e){const t=Ll(e);return Md(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tr(t)&&Xa(t)?t:SE(t)}function Pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=SE(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=bn(o);return i?t.concat(l,l.visualViewport||[],Xa(o)?o:[],l.frameElement&&n?Pa(l.frameElement):[]):t.concat(o,Pa(o,[],n))}function EE(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tr(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Gc(n)!==i||Gc(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function jm(e){return Jr(e)?e:e.contextElement}function wl(e){const t=jm(e);if(!Tr(t))return Wo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=EE(t);let l=(i?Gc(n.width):n.width)/r,s=(i?Gc(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const O5=Wo(0);function CE(e){const t=bn(e);return!Im()||!t.visualViewport?O5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==bn(e)?!1:t}function Si(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jm(e);let l=Wo(1);t&&(r?Jr(r)&&(l=wl(r)):l=wl(e));const s=A5(i,n,r)?CE(i):Wo(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,d=o.height/l.y;if(i){const f=bn(i),h=r&&Jr(r)?bn(r):r;let m=f.frameElement;for(;m&&r&&h!==f;){const g=wl(m),_=m.getBoundingClientRect(),v=Vn(m),y=_.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,x=_.top+(m.clientTop+parseFloat(v.paddingTop))*g.y;a*=g.x,u*=g.y,c*=g.x,d*=g.y,a+=y,u+=x,m=bn(m).frameElement}}return Xc({width:c,height:d,x:a,y:u})}function M5(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Tr(n),i=ro(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},s=Wo(1);const a=Wo(0);if((o||!o&&r!=="fixed")&&((Uo(n)!=="body"||Xa(i))&&(l=Ld(n)),Tr(n))){const u=Si(n);s=wl(n),a.x=u.x+n.clientLeft,a.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+a.x,y:t.y*s.y-l.scrollTop*s.y+a.y}}function L5(e){return Array.from(e.getClientRects())}function $E(e){return Si(ro(e)).left+Ld(e).scrollLeft}function D5(e){const t=ro(e),n=Ld(e),r=e.ownerDocument.body,o=Sn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Sn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+$E(e);const s=-n.scrollTop;return Vn(r).direction==="rtl"&&(l+=Sn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}function I5(e,t){const n=bn(e),r=ro(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=Im();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}function j5(e,t){const n=Si(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tr(e)?wl(e):Wo(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:l,height:s,x:a,y:u}}function M0(e,t,n){let r;if(t==="viewport")r=I5(e,n);else if(t==="document")r=D5(ro(e));else if(Jr(t))r=j5(t,n);else{const o=CE(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Xc(r)}function kE(e,t){const n=Ll(e);return n===t||!Jr(n)||Md(n)?!1:Vn(n).position==="fixed"||kE(n,t)}function z5(e,t){const n=t.get(e);if(n)return n;let r=Pa(e,[],!1).filter(s=>Jr(s)&&Uo(s)!=="body"),o=null;const i=Vn(e).position==="fixed";let l=i?Ll(e):e;for(;Jr(l)&&!Md(l);){const s=Vn(l),a=Dm(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Xa(l)&&!a&&kE(e,l))?r=r.filter(c=>c!==l):o=s,l=Ll(l)}return t.set(e,r),r}function F5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?z5(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=M0(t,c,o);return u.top=Sn(d.top,u.top),u.right=Bo(d.right,u.right),u.bottom=Bo(d.bottom,u.bottom),u.left=Sn(d.left,u.left),u},M0(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function B5(e){return EE(e)}function W5(e,t,n){const r=Tr(t),o=ro(t),i=n==="fixed",l=Si(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=Wo(0);if(r||!r&&!i)if((Uo(t)!=="body"||Xa(o))&&(s=Ld(t)),r){const u=Si(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else o&&(a.x=$E(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function L0(e,t){return!Tr(e)||Vn(e).position==="fixed"?null:t?t(e):e.offsetParent}function bE(e,t){const n=bn(e);if(!Tr(e))return n;let r=L0(e,t);for(;r&&R5(r)&&Vn(r).position==="static";)r=L0(r,t);return r&&(Uo(r)==="html"||Uo(r)==="body"&&Vn(r).position==="static"&&!Dm(r))?n:r||P5(e)||n}const U5=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||bE,i=this.getDimensions;return{reference:W5(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function H5(e){return Vn(e).direction==="rtl"}const V5={convertOffsetParentRelativeRectToViewportRelativeRect:M5,getDocumentElement:ro,getClippingRect:F5,getOffsetParent:bE,getElementRects:U5,getClientRects:L5,getDimensions:B5,getScale:wl,isElement:Jr,isRTL:H5};function K5(e,t){let n=null,r;const o=ro(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=Ru(c),m=Ru(o.clientWidth-(u+d)),g=Ru(o.clientHeight-(c+f)),_=Ru(u),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-_+"px",threshold:Sn(0,Bo(1,a))||1};let x=!0;function S(k){const T=k[0].intersectionRatio;if(T!==a){if(!x)return l();T?l(!1,T):r=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return l(!0),i}function G5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=jm(e),c=o||i?[...u?Pa(u):[],...Pa(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&s?K5(u,n):null;let f=-1,h=null;l&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!a&&h.observe(u),h.observe(t));let m,g=a?Si(e):null;a&&_();function _(){const v=Si(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(_)}return n(),()=>{c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(m)}}const Y5=(e,t,n)=>{const r=new Map,o={platform:V5,...n},i={...o.platform,_c:r};return S5(e,t,{...o,platform:i})},X5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?R0({element:r.current,padding:o}).fn(n):{}:r?R0({element:r,padding:o}).fn(n):{}}}};var qu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Qc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function TE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D0(e,t){const n=TE(e);return Math.round(t*n)/n}function I0(e){const t=p.useRef(e);return qu(()=>{t.current=e}),t}function Q5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Qc(f,r)||h(r);const[m,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(C=>{C!=T.current&&(T.current=C,g(C))},[g]),x=p.useCallback(C=>{C!==b.current&&(b.current=C,v(C))},[v]),S=i||m,k=l||_,T=p.useRef(null),b=p.useRef(null),N=p.useRef(c),D=I0(a),M=I0(o),j=p.useCallback(()=>{if(!T.current||!b.current)return;const C={placement:t,strategy:n,middleware:f};M.current&&(C.platform=M.current),Y5(T.current,b.current,C).then($=>{const E={...$,isPositioned:!0};B.current&&!Qc(N.current,E)&&(N.current=E,Nr.flushSync(()=>{d(E)}))})},[f,t,n,M]);qu(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const B=p.useRef(!1);qu(()=>(B.current=!0,()=>{B.current=!1}),[]),qu(()=>{if(S&&(T.current=S),k&&(b.current=k),S&&k){if(D.current)return D.current(S,k,j);j()}},[S,k,j,D]);const re=p.useMemo(()=>({reference:T,floating:b,setReference:y,setFloating:x}),[y,x]),V=p.useMemo(()=>({reference:S,floating:k}),[S,k]),Y=p.useMemo(()=>{const C={position:n,left:0,top:0};if(!V.floating)return C;const $=D0(V.floating,c.x),E=D0(V.floating,c.y);return s?{...C,transform:"translate("+$+"px, "+E+"px)",...TE(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:E}},[n,s,V.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:j,refs:re,elements:V,floatingStyles:Y}),[c,j,re,V,Y])}function NE(e){const[t,n]=p.useState(void 0);return Nn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,s;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;n({width:l,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const RE="Popper",[PE,OE]=Ni(RE),[J5,AE]=PE(RE),Z5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(J5,{scope:t,anchor:r,onAnchorChange:o},n)},q5="PopperAnchor",e3=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=AE(q5,n),l=p.useRef(null),s=Ze(t,l);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Ie.div,te({},o,{ref:s}))}),ME="PopperContent",[t3,dL]=PE(ME),n3=p.forwardRef((e,t)=>{var n,r,o,i,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:_=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:k="optimized",onPlaced:T,...b}=e,N=AE(ME,c),[D,M]=p.useState(null),j=Ze(t,cn=>M(cn)),[B,re]=p.useState(null),V=NE(B),Y=(n=V==null?void 0:V.width)!==null&&n!==void 0?n:0,C=(r=V==null?void 0:V.height)!==null&&r!==void 0?r:0,$=d+(h!=="center"?"-"+h:""),E=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},O=Array.isArray(v)?v:[v],R=O.length>0,F={padding:E,boundary:O.filter(r3),altBoundary:R},{refs:H,floatingStyles:ae,placement:oe,isPositioned:$e,middlewareData:_e}=Q5({strategy:"fixed",placement:$,whileElementsMounted:(...cn)=>G5(...cn,{animationFrame:k==="always"}),elements:{reference:N.anchor},middleware:[k5({mainAxis:f+C,alignmentAxis:m}),_&&b5({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?T5():void 0,...F}),_&&E5({...F}),N5({...F,apply:({elements:cn,rects:Gn,availableWidth:Re,availableHeight:yt})=>{const{width:qe,height:Yt}=Gn.reference,dn=cn.floating.style;dn.setProperty("--radix-popper-available-width",`${Re}px`),dn.setProperty("--radix-popper-available-height",`${yt}px`),dn.setProperty("--radix-popper-anchor-width",`${qe}px`),dn.setProperty("--radix-popper-anchor-height",`${Yt}px`)}}),B&&X5({element:B,padding:g}),o3({arrowWidth:Y,arrowHeight:C}),S&&C5({strategy:"referenceHidden",...F})]}),[Q,Ne]=LE(oe),ye=Ht(T);Nn(()=>{$e&&(ye==null||ye())},[$e,ye]);const Se=(o=_e.arrow)===null||o===void 0?void 0:o.x,pe=(i=_e.arrow)===null||i===void 0?void 0:i.y,Te=((l=_e.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[We,At]=p.useState();return Nn(()=>{D&&At(window.getComputedStyle(D).zIndex)},[D]),p.createElement("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:$e?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:We,"--radix-popper-transform-origin":[(s=_e.transformOrigin)===null||s===void 0?void 0:s.x,(a=_e.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(t3,{scope:c,placedSide:Q,onArrowChange:re,arrowX:Se,arrowY:pe,shouldHideArrow:Te},p.createElement(Ie.div,te({"data-side":Q,"data-align":Ne},b,{ref:j,style:{...b.style,animation:$e?void 0:"none",opacity:(u=_e.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function r3(e){return e!==null}const o3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:s,rects:a,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[m,g]=LE(s),_={start:"0%",center:"50%",end:"100%"}[g],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+f/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+h/2;let x="",S="";return m==="bottom"?(x=d?_:`${v}px`,S=`${-h}px`):m==="top"?(x=d?_:`${v}px`,S=`${a.floating.height+h}px`):m==="right"?(x=`${-h}px`,S=d?_:`${y}px`):m==="left"&&(x=`${a.floating.width+h}px`,S=d?_:`${y}px`),{data:{x,y:S}}}});function LE(e){const[t,n="center"]=e.split("-");return[t,n]}const i3=Z5,l3=e3,s3=n3,a3=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Tw.createPortal(p.createElement(Ie.div,te({},o,{ref:t})),r):null});function Dl({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=u3({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,s=Ht(n),a=p.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[l,a]}function u3({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Ht(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function DE(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const c3=p.forwardRef((e,t)=>p.createElement(Ie.span,te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var d3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vi=new WeakMap,Pu=new WeakMap,Ou={},zf=0,IE=function(e){return e&&(e.host||IE(e.parentNode))},f3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=IE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},h3=function(e,t,n,r){var o=f3(t,Array.isArray(e)?e:[e]);Ou[n]||(Ou[n]=new WeakMap);var i=Ou[n],l=[],s=new Set,a=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else{var h=f.getAttribute(r),m=h!==null&&h!=="false",g=(Vi.get(f)||0)+1,_=(i.get(f)||0)+1;Vi.set(f,g),i.set(f,_),l.push(f),g===1&&m&&Pu.set(f,!0),_===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return c(t),s.clear(),zf++,function(){l.forEach(function(d){var f=Vi.get(d)-1,h=i.get(d)-1;Vi.set(d,f),i.set(d,h),f||(Pu.has(d)||d.removeAttribute(r),Pu.delete(d)),h||d.removeAttribute(n)}),zf--,zf||(Vi=new WeakMap,Vi=new WeakMap,Pu=new WeakMap,Ou={})}},p3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||d3(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),h3(r,o,n,"aria-hidden")):function(){return null}},yr=function(){return yr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yr.apply(this,arguments)};function jE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function g3(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var ec="right-scroll-bar-position",tc="width-before-scroll-bar",m3="with-scroll-bars-hidden",v3="--removed-body-scroll-bar-size";function y3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function x3(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function w3(e,t){return x3(t||null,function(n){return e.forEach(function(r){return y3(r,n)})})}function _3(e){return e}function S3(e,t){t===void 0&&(t=_3);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(i),l=n}var a=function(){var c=l;l=[],c.forEach(i)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(c){l.push(c),u()},filter:function(c){return l=l.filter(c),n}}}};return o}function E3(e){e===void 0&&(e={});var t=S3(null);return t.options=yr({async:!0,ssr:!1},e),t}var zE=function(e){var t=e.sideCar,n=jE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,yr({},n))};zE.isSideCarExport=!0;function C3(e,t){return e.useMedium(t),zE}var FE=E3(),Ff=function(){},Dd=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Ff,onWheelCapture:Ff,onTouchMoveCapture:Ff}),o=r[0],i=r[1],l=e.forwardProps,s=e.children,a=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?"div":_,y=jE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,S=w3([n,t]),k=yr(yr({},y),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:FE,removeScrollBar:u,shards:d,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n}),l?p.cloneElement(p.Children.only(s),yr(yr({},k),{ref:S})):p.createElement(v,yr({},k,{className:a,ref:S}),s))});Dd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Dd.classNames={fullWidth:tc,zeroRight:ec};var j0,$3=function(){if(j0)return j0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function k3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$3();return t&&e.setAttribute("nonce",t),e}function b3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function T3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var N3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=k3())&&(b3(t,n),T3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},R3=function(){var e=N3();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},BE=function(){var e=R3(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},P3={left:0,top:0,right:0,gap:0},Bf=function(e){return parseInt(e||"",10)||0},O3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Bf(n),Bf(r),Bf(o)]},A3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return P3;var t=O3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},M3=BE(),L3=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
130
+ .`.concat(m3,` {
131
+ overflow: hidden `).concat(r,`;
132
+ padding-right: `).concat(s,"px ").concat(r,`;
133
+ }
134
+ body {
135
+ overflow: hidden `).concat(r,`;
136
+ overscroll-behavior: contain;
137
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
138
+ padding-left: `.concat(o,`px;
139
+ padding-top: `).concat(i,`px;
140
+ padding-right: `).concat(l,`px;
141
+ margin-left:0;
142
+ margin-top:0;
143
+ margin-right: `).concat(s,"px ").concat(r,`;
144
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
145
+ }
146
+
147
+ .`).concat(ec,` {
148
+ right: `).concat(s,"px ").concat(r,`;
149
+ }
150
+
151
+ .`).concat(tc,` {
152
+ margin-right: `).concat(s,"px ").concat(r,`;
153
+ }
154
+
155
+ .`).concat(ec," .").concat(ec,` {
156
+ right: 0 `).concat(r,`;
157
+ }
158
+
159
+ .`).concat(tc," .").concat(tc,` {
160
+ margin-right: 0 `).concat(r,`;
161
+ }
162
+
163
+ body {
164
+ `).concat(v3,": ").concat(s,`px;
165
+ }
166
+ `)},D3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=p.useMemo(function(){return A3(o)},[o]);return p.createElement(M3,{styles:L3(i,!t,o,n?"":"!important")})},Lp=!1;if(typeof window<"u")try{var Au=Object.defineProperty({},"passive",{get:function(){return Lp=!0,!0}});window.addEventListener("test",Au,Au),window.removeEventListener("test",Au,Au)}catch{Lp=!1}var Ki=Lp?{passive:!1}:!1,I3=function(e){return e.tagName==="TEXTAREA"},WE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!I3(e)&&n[t]==="visible")},j3=function(e){return WE(e,"overflowY")},z3=function(e){return WE(e,"overflowX")},z0=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=UE(e,n);if(r){var o=HE(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},F3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},UE=function(e,t){return e==="v"?j3(t):z3(t)},HE=function(e,t){return e==="v"?F3(t):B3(t)},W3=function(e,t){return e==="h"&&t==="rtl"?-1:1},U3=function(e,t,n,r,o){var i=W3(e,window.getComputedStyle(t).direction),l=i*r,s=n.target,a=t.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=HE(e,s),m=h[0],g=h[1],_=h[2],v=g-_-i*m;(m||v)&&UE(e,s)&&(d+=v,f+=m),s=s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&(o&&d===0||!o&&l>d)||!c&&(o&&f===0||!o&&-l>f))&&(u=!0),u},Mu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F0=function(e){return[e.deltaX,e.deltaY]},B0=function(e){return e&&"current"in e?e.current:e},H3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},V3=function(e){return`
167
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
168
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
169
+ `)},K3=0,Gi=[];function G3(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(K3++)[0],i=p.useState(function(){return BE()})[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=g3([e.lockRef.current],(e.shards||[]).map(B0),!0).filter(Boolean);return g.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(g,_){if("touches"in g&&g.touches.length===2)return!l.current.allowPinchZoom;var v=Mu(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-v[0],S="deltaY"in g?g.deltaY:y[1]-v[1],k,T=g.target,b=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&b==="h"&&T.type==="range")return!1;var N=z0(b,T);if(!N)return!0;if(N?k=b:(k=b==="v"?"h":"v",N=z0(b,T)),!N)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=k),!k)return!0;var D=r.current||k;return U3(D,_,g,D==="h"?x:S,!0)},[]),a=p.useCallback(function(g){var _=g;if(!(!Gi.length||Gi[Gi.length-1]!==i)){var v="deltaY"in _?F0(_):Mu(_),y=t.current.filter(function(k){return k.name===_.type&&k.target===_.target&&H3(k.delta,v)})[0];if(y&&y.should){_.cancelable&&_.preventDefault();return}if(!y){var x=(l.current.shards||[]).map(B0).filter(Boolean).filter(function(k){return k.contains(_.target)}),S=x.length>0?s(_,x[0]):!l.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=p.useCallback(function(g,_,v,y){var x={name:g,delta:_,target:v,should:y};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),c=p.useCallback(function(g){n.current=Mu(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,F0(g),g.target,s(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,Mu(g),g.target,s(g,e.lockRef.current))},[]);p.useEffect(function(){return Gi.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Ki),document.addEventListener("touchmove",a,Ki),document.addEventListener("touchstart",c,Ki),function(){Gi=Gi.filter(function(g){return g!==i}),document.removeEventListener("wheel",a,Ki),document.removeEventListener("touchmove",a,Ki),document.removeEventListener("touchstart",c,Ki)}},[]);var h=e.removeScrollBar,m=e.inert;return p.createElement(p.Fragment,null,m?p.createElement(i,{styles:V3(o)}):null,h?p.createElement(D3,{gapMode:"margin"}):null)}const Y3=C3(FE,G3);var VE=p.forwardRef(function(e,t){return p.createElement(Dd,yr({},e,{ref:t,sideCar:Y3}))});VE.classNames=Dd.classNames;const X3=VE,Q3=[" ","Enter","ArrowUp","ArrowDown"],J3=[" ","Enter"],Id="Select",[jd,zm,Z3]=vE(Id),[rs,fL]=Ni(Id,[Z3,OE]),Fm=OE(),[q3,Mi]=rs(Id),[eA,tA]=rs(Id),nA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,m=Fm(t),[g,_]=p.useState(null),[v,y]=p.useState(null),[x,S]=p.useState(!1),k=Wg(u),[T=!1,b]=Dl({prop:r,defaultProp:o,onChange:i}),[N,D]=Dl({prop:l,defaultProp:s,onChange:a}),M=p.useRef(null),j=g?!!g.closest("form"):!0,[B,re]=p.useState(new Set),V=Array.from(B).map(Y=>Y.props.value).join(";");return p.createElement(i3,m,p.createElement(q3,{required:h,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Ad(),value:N,onValueChange:D,open:T,onOpenChange:b,dir:k,triggerPointerDownPosRef:M,disabled:f},p.createElement(jd.Provider,{scope:t},p.createElement(eA,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(Y=>{re(C=>new Set(C).add(Y))},[]),onNativeOptionRemove:p.useCallback(Y=>{re(C=>{const $=new Set(C);return $.delete(Y),$})},[])},n)),j?p.createElement(XE,{key:V,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:N,onChange:Y=>D(Y.target.value),disabled:f},N===void 0?p.createElement("option",{value:""}):null,Array.from(B)):null))},rA="SelectTrigger",oA=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Fm(n),l=Mi(rA,n),s=l.disabled||r,a=Ze(t,l.onTriggerChange),u=zm(n),[c,d,f]=QE(m=>{const g=u().filter(y=>!y.disabled),_=g.find(y=>y.value===l.value),v=JE(g,m,_);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(l3,te({asChild:!0},i),p.createElement(Ie.button,te({type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":YE(l.value)?"":void 0},o,{ref:a,onClick:Ge(o.onClick,m=>{m.currentTarget.focus()}),onPointerDown:Ge(o.onPointerDown,m=>{const g=m.target;g.hasPointerCapture(m.pointerId)&&g.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(h(),l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)},m.preventDefault())}),onKeyDown:Ge(o.onKeyDown,m=>{const g=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&Q3.includes(m.key)&&(h(),m.preventDefault())})})))}),iA="SelectValue",lA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...s}=e,a=Mi(iA,n),{onValueNodeHasChildrenChange:u}=a,c=i!==void 0,d=Ze(t,a.onValueNodeChange);return Nn(()=>{u(c)},[u,c]),p.createElement(Ie.span,te({},s,{ref:d,style:{pointerEvents:"none"}}),YE(a.value)?p.createElement(p.Fragment,null,l):i)}),sA=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(Ie.span,te({"aria-hidden":!0},o,{ref:t}),r||"▼")}),aA=e=>p.createElement(a3,te({asChild:!0},e)),Il="SelectContent",uA=p.forwardRef((e,t)=>{const n=Mi(Il,e.__scopeSelect),[r,o]=p.useState();if(Nn(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Nr.createPortal(p.createElement(KE,{scope:e.__scopeSelect},p.createElement(jd.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),i):null}return p.createElement(cA,te({},e,{ref:t}))}),jr=10,[KE,zd]=rs(Il),cA=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Mi(Il,n),[x,S]=p.useState(null),[k,T]=p.useState(null),b=Ze(t,Q=>S(Q)),[N,D]=p.useState(null),[M,j]=p.useState(null),B=zm(n),[re,V]=p.useState(!1),Y=p.useRef(!1);p.useEffect(()=>{if(x)return p3(x)},[x]),o5();const C=p.useCallback(Q=>{const[Ne,...ye]=B().map(Te=>Te.ref.current),[Se]=ye.slice(-1),pe=document.activeElement;for(const Te of Q)if(Te===pe||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===Ne&&k&&(k.scrollTop=0),Te===Se&&k&&(k.scrollTop=k.scrollHeight),Te==null||Te.focus(),document.activeElement!==pe))return},[B,k]),$=p.useCallback(()=>C([N,x]),[C,N,x]);p.useEffect(()=>{re&&$()},[re,$]);const{onOpenChange:E,triggerPointerDownPosRef:O}=y;p.useEffect(()=>{if(x){let Q={x:0,y:0};const Ne=Se=>{var pe,Te,We,At;Q={x:Math.abs(Math.round(Se.pageX)-((pe=(Te=O.current)===null||Te===void 0?void 0:Te.x)!==null&&pe!==void 0?pe:0)),y:Math.abs(Math.round(Se.pageY)-((We=(At=O.current)===null||At===void 0?void 0:At.y)!==null&&We!==void 0?We:0))}},ye=Se=>{Q.x<=10&&Q.y<=10?Se.preventDefault():x.contains(Se.target)||E(!1),document.removeEventListener("pointermove",Ne),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",ye,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",ye,{capture:!0})}}},[x,E,O]),p.useEffect(()=>{const Q=()=>E(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[E]);const[R,F]=QE(Q=>{const Ne=B().filter(pe=>!pe.disabled),ye=Ne.find(pe=>pe.ref.current===document.activeElement),Se=JE(Ne,Q,ye);Se&&setTimeout(()=>Se.ref.current.focus())}),H=p.useCallback((Q,Ne,ye)=>{const Se=!Y.current&&!ye;(y.value!==void 0&&y.value===Ne||Se)&&(D(Q),Se&&(Y.current=!0))},[y.value]),ae=p.useCallback(()=>x==null?void 0:x.focus(),[x]),oe=p.useCallback((Q,Ne,ye)=>{const Se=!Y.current&&!ye;(y.value!==void 0&&y.value===Ne||Se)&&j(Q)},[y.value]),$e=r==="popper"?W0:dA,_e=$e===W0?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:_}:{};return p.createElement(KE,{scope:n,content:x,viewport:k,onViewportChange:T,itemRefCallback:H,selectedItem:N,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:$,selectedItemText:M,position:r,isPositioned:re,searchRef:R},p.createElement(X3,{as:Rl,allowPinchZoom:!0},p.createElement(i5,{asChild:!0,trapped:y.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Ge(o,Q=>{var Ne;(Ne=y.trigger)===null||Ne===void 0||Ne.focus({preventScroll:!0}),Q.preventDefault()})},p.createElement(t5,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement($e,te({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Q=>Q.preventDefault()},v,_e,{onPlaced:()=>V(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:Ge(v.onKeyDown,Q=>{const Ne=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!Ne&&Q.key.length===1&&F(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let Se=B().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(Se=Se.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const pe=Q.target,Te=Se.indexOf(pe);Se=Se.slice(Te+1)}setTimeout(()=>C(Se)),Q.preventDefault()}})}))))))}),dA=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Mi(Il,n),l=zd(Il,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=Ze(t,b=>c(b)),f=zm(n),h=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=l,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&g&&_&&v){const b=i.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),M=v.getBoundingClientRect();if(i.dir!=="rtl"){const pe=M.left-N.left,Te=D.left-pe,We=b.left-Te,At=b.width+We,cn=Math.max(At,N.width),Gn=window.innerWidth-jr,Re=Hh(Te,[jr,Gn-cn]);s.style.minWidth=At+"px",s.style.left=Re+"px"}else{const pe=N.right-M.right,Te=window.innerWidth-D.right-pe,We=window.innerWidth-b.right-Te,At=b.width+We,cn=Math.max(At,N.width),Gn=window.innerWidth-jr,Re=Hh(Te,[jr,Gn-cn]);s.style.minWidth=At+"px",s.style.right=Re+"px"}const j=f(),B=window.innerHeight-jr*2,re=g.scrollHeight,V=window.getComputedStyle(u),Y=parseInt(V.borderTopWidth,10),C=parseInt(V.paddingTop,10),$=parseInt(V.borderBottomWidth,10),E=parseInt(V.paddingBottom,10),O=Y+C+re+E+$,R=Math.min(_.offsetHeight*5,O),F=window.getComputedStyle(g),H=parseInt(F.paddingTop,10),ae=parseInt(F.paddingBottom,10),oe=b.top+b.height/2-jr,$e=B-oe,_e=_.offsetHeight/2,Q=_.offsetTop+_e,Ne=Y+C+Q,ye=O-Ne;if(Ne<=oe){const pe=_===j[j.length-1].ref.current;s.style.bottom="0px";const Te=u.clientHeight-g.offsetTop-g.offsetHeight,We=Math.max($e,_e+(pe?ae:0)+Te+$),At=Ne+We;s.style.height=At+"px"}else{const pe=_===j[0].ref.current;s.style.top="0px";const We=Math.max(oe,Y+g.offsetTop+(pe?H:0)+_e)+ye;s.style.height=We+"px",g.scrollTop=Ne-oe+g.offsetTop}s.style.margin=`${jr}px 0`,s.style.minHeight=R+"px",s.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,u,g,_,v,i.dir,r]);Nn(()=>x(),[x]);const[S,k]=p.useState();Nn(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const T=p.useCallback(b=>{b&&m.current===!0&&(x(),y==null||y(),m.current=!1)},[x,y]);return p.createElement(fA,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:T},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},p.createElement(Ie.div,te({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),W0=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=jr,...i}=e,l=Fm(n);return p.createElement(s3,te({},l,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[fA,hA]=rs(Il,{}),U0="SelectViewport",pA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=zd(U0,n),i=hA(U0,n),l=Ze(t,o.onViewportChange),s=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(jd.Slot,{scope:n},p.createElement(Ie.div,te({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Ge(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-jr*2,m=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),_=Math.max(m,g);if(_<h){const v=_+f,y=Math.min(h,v),x=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),gA="SelectGroup",[hL,mA]=rs(gA),vA="SelectLabel",yA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=mA(vA,n);return p.createElement(Ie.div,te({id:o.id},r,{ref:t}))}),Dp="SelectItem",[xA,GE]=rs(Dp),wA=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,s=Mi(Dp,n),a=zd(Dp,n),u=s.value===r,[c,d]=p.useState(i??""),[f,h]=p.useState(!1),m=Ze(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,o)}),g=Ad(),_=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.createElement(xA,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var x;return y||((x=v==null?void 0:v.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(jd.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(Ie.div,te({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},l,{ref:m,onFocus:Ge(l.onFocus,()=>h(!0)),onBlur:Ge(l.onBlur,()=>h(!1)),onPointerUp:Ge(l.onPointerUp,_),onPointerMove:Ge(l.onPointerMove,v=>{if(o){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:Ge(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(J3.includes(v.key)&&_(),v.key===" "&&v.preventDefault())})}))))}),Lu="SelectItemText",_A=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Mi(Lu,n),s=zd(Lu,n),a=GE(Lu,n),u=tA(Lu,n),[c,d]=p.useState(null),f=Ze(t,v=>d(v),a.onItemTextChange,v=>{var y;return(y=s.itemTextRefCallback)===null||y===void 0?void 0:y.call(s,v,a.value,a.disabled)}),h=c==null?void 0:c.textContent,m=p.useMemo(()=>p.createElement("option",{key:a.value,value:a.value,disabled:a.disabled},h),[a.disabled,a.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=u;return Nn(()=>(g(m),()=>_(m)),[g,_,m]),p.createElement(p.Fragment,null,p.createElement(Ie.span,te({id:a.textId},i,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Nr.createPortal(i.children,l.valueNode):null)}),SA="SelectItemIndicator",EA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return GE(SA,n).isSelected?p.createElement(Ie.span,te({"aria-hidden":!0},r,{ref:t})):null}),CA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(Ie.div,te({"aria-hidden":!0},r,{ref:t}))});function YE(e){return e===""||e===void 0}const XE=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),i=Ze(t,o),l=DE(n);return p.useEffect(()=>{const s=o.current,a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==n&&c){const d=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(d)}},[l,n]),p.createElement(c3,{asChild:!0},p.createElement("select",te({},r,{ref:i,defaultValue:n})))});XE.displayName="BubbleSelect";function QE(e){const t=Ht(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(l=>{const s=n.current+l;t(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function JE(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=$A(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function $A(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const kA=nA,ZE=oA,bA=lA,TA=sA,NA=aA,qE=uA,RA=pA,eC=yA,tC=wA,PA=_A,OA=EA,nC=CA,AA=kA,MA=bA,rC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(ZE,{ref:r,className:ut("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,w.jsx(TA,{asChild:!0,children:w.jsx(mE,{className:"w-4 h-4 opacity-50"})})]}));rC.displayName=ZE.displayName;const oC=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>w.jsx(NA,{children:w.jsx(qE,{ref:o,className:ut("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:w.jsx(RA,{className:ut("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));oC.displayName=qE.displayName;const LA=p.forwardRef(({className:e,...t},n)=>w.jsx(eC,{ref:n,className:ut("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));LA.displayName=eC.displayName;const iC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(tC,{ref:r,className:ut("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(OA,{children:w.jsx(LO,{className:"w-4 h-4"})})}),w.jsx(PA,{children:t})]}));iC.displayName=tC.displayName;const DA=p.forwardRef(({className:e,...t},n)=>w.jsx(nC,{ref:n,className:ut("-mx-1 my-1 h-px bg-muted",e),...t}));DA.displayName=nC.displayName;function lC({path:e,disabled:t,source:n,schema:r,registerPatchCallback:o,onSubmit:i}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?w.jsx(zA,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?w.jsx(G0,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?w.jsx(K0,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i,selector:r.selector}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?w.jsx(G0,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?w.jsx(K0,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?w.jsx(jA,{registerPatchCallback:o,onSubmit:i,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?w.jsx(IA,{path:e,registerPatchCallback:o,onSubmit:i,defaultValue:n}):w.jsxs("div",{children:["Unsupported schema: ",r.type]})}function H0(e,t,n,r){if(!t||!r)return[];const o=r.sha256.slice(0,5),i=function(){const l=Yg(t)??"unknown",s=Xg(l);return n?`/public/${n.split(".").slice(0,-1).join(".")||n}_${o}.${s}`:`/public/${r.sha256}.${s}`}();return[{value:{[vn]:i,[Kt]:"file",metadata:r},op:"replace",path:e},{value:t,op:"file",path:e,filePath:i}]}function IA({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[o,i]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(t&&$n.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async f=>H0(f,(o==null?void 0:o.src)??null,(o==null?void 0:o.filename)??null,a))},[o,t]),w.jsxs("div",{className:"max-w-4xl p-4",children:[w.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[o||c?w.jsx("img",{src:(o==null?void 0:o.src)||c}):w.jsx("div",{children:"Empty"}),w.jsx("input",{id:`img_input:${e}`,type:"file",hidden:!0,onChange:f=>{dE(f).then(h=>{i({src:h.src,filename:h.filename}),h.width&&h.height?u({sha256:h.sha256,width:h.width,height:h.height}):u(void 0)}).catch(h=>{console.error(h.message),i(null),u(void 0)})}})]}),n&&w.jsx("div",{children:o&&w.jsx(es,{disabled:l,onClick:()=>{s(!0),n(f=>Promise.resolve(H0(f,o.src,o.filename??null,a))).finally(()=>{s(!1),i(null),u(void 0)})},children:l?"Saving...":"Submit"})})]},e)}async function V0(e,t){const{templateStrings:n,exprs:r,files:o}=t?await c2(t.getEditorState().toJSON().root):{[Kt]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[Kt]:"richtext"}},...Object.entries(o).map(([i,l])=>({op:"file",path:e,filePath:i,value:l}))]}function jA({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,o]=p.useState(null),[i,l]=p.useState(!1),[s,a]=p.useState(!1);return p.useEffect(()=>{r&&(l(!1),r.registerTextContentListener(()=>{l(!0)}),r.registerDecoratorListener(()=>{l(!0)}))},[r]),p.useEffect(()=>{r&&n&&n(u=>V0(u,r))},[r]),w.jsxs("div",{className:"p-4 border rounded border-card",children:[w.jsx(OO,{onEditor:u=>{o(u)},richtext:e||{children:[],[Kt]:"root"}}),t&&w.jsx("div",{children:i&&w.jsx(es,{disabled:s||!r,onClick:()=>{r&&(a(!0),t(u=>V0(u,r)).finally(()=>{a(!1),l(!1)}))},children:s?"Saving...":"Submit"})})]})}function K0({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:o}){const i=lM(o),s=(h=>Array.isArray(h.moduleSource)?{type:"number",values:Object.keys(h.moduleSource).map(m=>parseInt(m))}:{type:"string",values:Object.keys(h.moduleSource??["ERROR fetching source"])})(i),[a,u]=p.useState(t||s.values[0]),[c,d]=p.useState(!1);p.useEffect(()=>{d(e)},[e]);const f=h=>{if(s.type==="number"){if(h==="")throw new Error("Value cannot be empty");if(Number.isNaN(Number(h)))throw new Error("Value was not a number: "+JSON.stringify(h));return Number(h)}return h};return p.useEffect(()=>{n&&n(async h=>[{op:"replace",path:h,value:a}])},[a]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsxs(AA,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[w.jsx(rC,{children:w.jsx(MA,{placeholder:"Select a value"})}),w.jsx(oC,{children:s.values.map(h=>w.jsx(iC,{value:h.toString(),children:h.toString()},h))})]}),r&&w.jsx("div",{children:t!==a&&w.jsx(es,{disabled:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})},children:c?"Saving...":"Submit"})})]})}function G0({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||0),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(Om,{ref:a,disabled:l,defaultValue:o??0,onChange:u=>i(Number(u.target.value)),type:"number"}),r&&w.jsx("div",{children:t!==o&&w.jsx(es,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}function zA({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||""),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(Om,{ref:a,disabled:l,defaultValue:o??"",onChange:u=>i(u.target.value)}),r&&w.jsx("div",{children:t!==o&&w.jsx(es,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}const FA=({className:e})=>w.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsx("g",{filter:"url(#filter0_d_21_1677)",children:w.jsx("path",{d:"M5 5.36426C5 5.16309 5.16309 5 5.36426 5H17.6581C17.8593 5 18.0223 5.16309 18.0223 5.36426V28.4949C18.0223 28.696 17.8593 28.8591 17.6581 28.8591H5.36426C5.16309 28.8591 5 28.696 5 28.4949V5.36426Z",fill:"#38CD98"})}),w.jsx("g",{filter:"url(#filter1_i_21_1677)",children:w.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.8588 23.839H48.7257H48.537H48.1128C47.6715 23.839 47.4508 23.5942 47.4508 23.1044V13.7293C47.4508 13.5784 47.3285 13.4561 47.1777 13.4561H45.8118C45.6609 13.4561 45.5386 13.5784 45.5386 13.7293V15.1836C45.5386 15.2844 45.4569 15.3661 45.3561 15.3661C45.2876 15.3661 45.225 15.3275 45.1924 15.2672C44.805 14.5503 44.283 14.02 43.6264 13.6765C42.9563 13.301 42.2045 13.1132 41.3709 13.1132C40.6028 13.1132 39.8755 13.252 39.189 13.5295C38.5026 13.8071 37.8979 14.2152 37.3748 14.7539C36.8682 15.2764 36.4678 15.9212 36.1736 16.6885C35.8794 17.4558 35.7323 18.3374 35.7323 19.3332V19.725C35.7323 20.7372 35.8794 21.627 36.1736 22.3942C36.4678 23.1615 36.8682 23.8146 37.3748 24.3533C37.8979 24.8757 38.5026 25.2757 39.189 25.5532C39.8755 25.8144 40.6191 25.945 41.42 25.945C42.1881 25.945 42.9154 25.7491 43.6019 25.3573C44.2751 24.982 44.8058 24.4119 45.1941 23.6471C45.2255 23.5852 45.2886 23.5452 45.358 23.5452H45.3917C45.4728 23.5452 45.5386 23.611 45.5386 23.6921C45.5386 23.7904 45.544 23.8856 45.5547 23.9777V25.1392C45.5547 25.3904 45.7584 25.5941 46.0096 25.5941H47.2261C47.2914 25.5995 47.3581 25.6022 47.4263 25.6022H48.537H48.7257H57.7268C57.8777 25.6022 58 25.4799 58 25.329V24.1122C58 23.9614 57.8777 23.839 57.7268 23.839H55.3174C55.1665 23.839 55.0442 23.7167 55.0442 23.5659V8.73368C55.0442 8.58279 54.9219 8.46048 54.771 8.46048H50.5054C50.3545 8.46048 50.2322 8.58279 50.2322 8.73368V9.95043C50.2322 10.1013 50.3545 10.2236 50.5054 10.2236H52.8588C53.0097 10.2236 53.132 10.3459 53.132 10.4968V23.5659C53.132 23.7167 53.0097 23.839 52.8588 23.839ZM41.6161 24.1329C42.1881 24.1329 42.7111 24.0268 43.1851 23.8146C43.6754 23.6023 44.0922 23.3003 44.4354 22.9085C44.7786 22.5167 45.0483 22.0514 45.2444 21.5127C45.4406 20.9576 45.5386 20.3454 45.5386 19.6761V19.3822C45.5386 18.7292 45.4406 18.1333 45.2444 17.5946C45.0483 17.0395 44.7705 16.5661 44.4109 16.1743C44.0677 15.7824 43.6509 15.4804 43.1606 15.2682C42.6866 15.0396 42.1718 14.9254 41.6161 14.9254C41.044 14.9254 40.521 15.0315 40.0471 15.2437C39.5731 15.4559 39.1563 15.758 38.7968 16.1498C38.4535 16.5252 38.1839 16.9905 37.9877 17.5456C37.7916 18.0843 37.6936 18.6802 37.6936 19.3332V19.725C37.6936 21.1127 38.0531 22.1983 38.7722 22.982C39.5077 23.7493 40.4557 24.1329 41.6161 24.1329ZM31.1115 25.4191C31.0732 25.5287 30.9698 25.6022 30.8536 25.6022H27.4661C27.35 25.6022 27.2465 25.5287 27.2082 25.4191L23.1578 13.8193C23.0958 13.6417 23.2276 13.4561 23.4157 13.4561H25.089C25.2068 13.4561 25.3114 13.5316 25.3484 13.6435L28.9666 24.581C28.9942 24.6643 29.0721 24.7206 29.1599 24.7206C29.2477 24.7206 29.3256 24.6643 29.3532 24.581L32.9714 13.6435C33.0084 13.5316 33.1129 13.4561 33.2308 13.4561H34.9041C35.0922 13.4561 35.224 13.6417 35.162 13.8193L31.1115 25.4191Z",fill:"currentColor"}),w.jsxs("defs",{children:[w.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),w.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),w.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),w.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),w.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),w.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),w.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),sC=FA,aC="Switch",[BA,pL]=Ni(aC),[WA,UA]=BA(aC),HA=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=Ze(t,y=>f(y)),m=p.useRef(!1),g=d?!!d.closest("form"):!0,[_=!1,v]=Dl({prop:o,defaultProp:i,onChange:u});return p.createElement(WA,{scope:n,checked:_,disabled:s},p.createElement(Ie.button,te({type:"button",role:"switch","aria-checked":_,"aria-required":l,"data-state":uC(_),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:Ge(e.onClick,y=>{v(x=>!x),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&p.createElement(GA,{control:d,bubbles:!m.current,name:r,value:a,checked:_,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),VA="SwitchThumb",KA=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=UA(VA,n);return p.createElement(Ie.span,te({"data-state":uC(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),GA=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=p.useRef(null),l=DE(n),s=NE(t);return p.useEffect(()=>{const a=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==n&&d){const f=new Event("click",{bubbles:r});d.call(a,n),a.dispatchEvent(f)}},[l,n,r]),p.createElement("input",te({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uC(e){return e?"checked":"unchecked"}const cC=HA,YA=KA,Ip=p.forwardRef(({className:e,...t},n)=>w.jsx(cC,{className:ut("peer inline-flex h-[22px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=unchecked]:bg-primary",e),...t,ref:n,children:w.jsx(YA,{className:ut("pointer-events-none block h-[18px] w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Ip.displayName=cC.displayName;const Bm=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ut("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Bm.displayName="Card";const XA=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ut("flex flex-col space-y-1.5 p-6",e),...t}));XA.displayName="CardHeader";const QA=p.forwardRef(({className:e,...t},n)=>w.jsx("h3",{ref:n,className:ut("text-2xl font-semibold leading-none tracking-tight",e),...t}));QA.displayName="CardTitle";const JA=p.forwardRef(({className:e,...t},n)=>w.jsx("p",{ref:n,className:ut("text-sm text-muted-foreground",e),...t}));JA.displayName="CardDescription";const ZA=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ut("p-6 pt-0",e),...t}));ZA.displayName="CardContent";const qA=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ut("flex items-center p-6 pt-0",e),...t}));qA.displayName="CardFooter";/**
170
+ * @remix-run/router v1.13.0
171
+ *
172
+ * Copyright (c) Remix Software Inc.
173
+ *
174
+ * This source code is licensed under the MIT license found in the
175
+ * LICENSE.md file in the root directory of this source tree.
176
+ *
177
+ * @license MIT
178
+ */function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at.apply(this,arguments)}var dt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(dt||(dt={}));const Y0="popstate";function e4(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return Oa("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Qa(o)}return n4(t,n,null,e)}function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function t4(){return Math.random().toString(36).substr(2,8)}function X0(e,t){return{usr:e.state,key:e.key,idx:t}}function Oa(e,t,n,r){return n===void 0&&(n=null),at({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?oo(t):t,{state:n,key:t&&t.key||r||t4()})}function Qa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function oo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function n4(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s=dt.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(at({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=dt.Pop;let _=c(),v=_==null?null:_-u;u=_,a&&a({action:s,location:g.location,delta:v})}function f(_,v){s=dt.Push;let y=Oa(g.location,_,v);n&&n(y,_),u=c()+1;let x=X0(y,u),S=g.createHref(y);try{l.pushState(x,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(S)}i&&a&&a({action:s,location:g.location,delta:1})}function h(_,v){s=dt.Replace;let y=Oa(g.location,_,v);n&&n(y,_),u=c();let x=X0(y,u),S=g.createHref(y);l.replaceState(x,"",S),i&&a&&a({action:s,location:g.location,delta:0})}function m(_){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof _=="string"?_:Qa(_);return Ee(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return s},get location(){return e(o,l)},listen(_){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Y0,d),a=_,()=>{o.removeEventListener(Y0,d),a=null}},createHref(_){return t(o,_)},createURL:m,encodeLocation(_){let v=m(_);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(_){return l.go(_)}};return g}var ft;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ft||(ft={}));const r4=new Set(["lazy","caseSensitive","path","id","index","children"]);function o4(e){return e.index===!0}function jp(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let l=[...n,i],s=typeof o.id=="string"?o.id:l.join("-");if(Ee(o.index!==!0||!o.children,"Cannot specify children on an index route"),Ee(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),o4(o)){let a=at({},o,t(o),{id:s});return r[s]=a,a}else{let a=at({},o,t(o),{id:s,children:void 0});return r[s]=a,o.children&&(a.children=jp(o.children,t,l,r)),a}})}function cl(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?oo(t):t,o=Ja(r.pathname||"/",n);if(o==null)return null;let i=dC(e);l4(i);let l=null;for(let s=0;l==null&&s<i.length;++s)l=g4(i[s],y4(o));return l}function i4(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function dC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,l,s)=>{let a={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};a.relativePath.startsWith("/")&&(Ee(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Ao([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(Ee(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),dC(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:h4(u,i.index),routesMeta:c})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let a of fC(i.path))o(i,l,a)}),t}function fC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=fC(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function l4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:p4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const s4=/^:\w+$/,a4=3,u4=2,c4=1,d4=10,f4=-2,Q0=e=>e==="*";function h4(e,t){let n=e.split("/"),r=n.length;return n.some(Q0)&&(r+=f4),t&&(r+=u4),n.filter(o=>!Q0(o)).reduce((o,i)=>o+(s4.test(i)?a4:i===""?c4:d4),r)}function p4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function g4(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",c=m4({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;i.push({params:r,pathname:Ao([o,c.pathname]),pathnameBase:S4(Ao([o,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(o=Ao([o,c.pathnameBase]))}return i}function m4(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=v4(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=s[d]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=x4(m||"",f),u},{}),pathname:i,pathnameBase:l,pattern:e}}function v4(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function y4(e){try{return decodeURI(e)}catch(t){return Ei(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function x4(e,t){try{return decodeURIComponent(e)}catch(n){return Ei(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Ja(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function w4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?oo(e):e;return{pathname:n?n.startsWith("/")?n:_4(n,t):t,search:E4(r),hash:C4(o)}}function _4(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Wf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function pC(e){return hC(e).map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function gC(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=oo(e):(o=at({},e),Ee(!o.pathname||!o.pathname.includes("?"),Wf("?","pathname","search",o)),Ee(!o.pathname||!o.pathname.includes("#"),Wf("#","pathname","hash",o)),Ee(!o.search||!o.search.includes("#"),Wf("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(l==null)s=n;else if(r){let d=t[t.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d.pop();o.pathname=f.join("/")}s="/"+d.join("/")}else{let d=t.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=w4(o,s),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Ao=e=>e.join("/").replace(/\/\/+/g,"/"),S4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,C4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Wm{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function mC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vC=["post","put","patch","delete"],$4=new Set(vC),k4=["get",...vC],b4=new Set(k4),T4=new Set([301,302,303,307,308]),N4=new Set([307,308]),Uf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},R4={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ys={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},yC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,P4=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),xC="remix-router-transitions";function O4(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Ee(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let P=e.detectErrorBoundary;o=L=>({hasErrorBoundary:P(L)})}else o=P4;let i={},l=jp(e.routes,o,void 0,i),s,a=e.basename||"/",u=at({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,d=new Set,f=null,h=null,m=null,g=e.hydrationData!=null,_=cl(l,e.history.location,a),v=null;if(_==null){let P=Ln(404,{pathname:e.history.location.pathname}),{matches:L,route:z}=o1(l);_=L,v={[z.id]:P}}let y=!_.some(P=>P.route.lazy)&&(!_.some(P=>P.route.loader)||e.hydrationData!=null),x,S={historyAction:e.history.action,location:e.history.location,matches:_,initialized:y,navigation:Uf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},k=dt.Pop,T=!1,b,N=!1,D=new Map,M=null,j=!1,B=!1,re=[],V=[],Y=new Map,C=0,$=-1,E=new Map,O=new Set,R=new Map,F=new Map,H=new Set,ae=new Map,oe=new Map,$e=!1;function _e(){if(c=e.history.listen(P=>{let{action:L,location:z,delta:G}=P;if($e){$e=!1;return}Ei(oe.size===0||G!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ne=Zm({currentLocation:S.location,nextLocation:z,historyAction:L});if(ne&&G!=null){$e=!0,e.history.go(G*-1),Za(ne,{state:"blocked",location:z,proceed(){Za(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),e.history.go(G)},reset(){let ve=new Map(S.blockers);ve.set(ne,ys),ye({blockers:ve})}});return}return We(L,z)}),n){U4(t,D);let P=()=>H4(t,D);t.addEventListener("pagehide",P),M=()=>t.removeEventListener("pagehide",P)}return S.initialized||We(dt.Pop,S.location),x}function Q(){c&&c(),M&&M(),d.clear(),b&&b.abort(),S.fetchers.forEach((P,L)=>xn(L)),S.blockers.forEach((P,L)=>Jm(L))}function Ne(P){return d.add(P),()=>d.delete(P)}function ye(P,L){L===void 0&&(L={}),S=at({},S,P);let z=[],G=[];u.v7_fetcherPersist&&S.fetchers.forEach((ne,ve)=>{ne.state==="idle"&&(H.has(ve)?G.push(ve):z.push(ve))}),[...d].forEach(ne=>ne(S,{deletedFetchers:G,unstable_viewTransitionOpts:L.viewTransitionOpts,unstable_flushSync:L.flushSync===!0})),u.v7_fetcherPersist&&(z.forEach(ne=>S.fetchers.delete(ne)),G.forEach(ne=>xn(ne)))}function Se(P,L,z){var G,ne;let{flushSync:ve}=z===void 0?{}:z,ce=S.actionData!=null&&S.navigation.formMethod!=null&&tr(S.navigation.formMethod)&&S.navigation.state==="loading"&&((G=P.state)==null?void 0:G._isRedirect)!==!0,ue;L.actionData?Object.keys(L.actionData).length>0?ue=L.actionData:ue=null:ce?ue=S.actionData:ue=null;let le=L.loaderData?r1(S.loaderData,L.loaderData,L.matches||[],L.errors):S.loaderData,ke=S.blockers;ke.size>0&&(ke=new Map(ke),ke.forEach((je,et)=>ke.set(et,ys)));let Mt=T===!0||S.navigation.formMethod!=null&&tr(S.navigation.formMethod)&&((ne=P.state)==null?void 0:ne._isRedirect)!==!0;s&&(l=s,s=void 0),j||k===dt.Pop||(k===dt.Push?e.history.push(P,P.state):k===dt.Replace&&e.history.replace(P,P.state));let xe;if(k===dt.Pop){let je=D.get(S.location.pathname);je&&je.has(P.pathname)?xe={currentLocation:S.location,nextLocation:P}:D.has(P.pathname)&&(xe={currentLocation:P,nextLocation:S.location})}else if(N){let je=D.get(S.location.pathname);je?je.add(P.pathname):(je=new Set([P.pathname]),D.set(S.location.pathname,je)),xe={currentLocation:S.location,nextLocation:P}}ye(at({},L,{actionData:ue,loaderData:le,historyAction:k,location:P,initialized:!0,navigation:Uf,revalidation:"idle",restoreScrollPosition:ev(P,L.matches||S.matches),preventScrollReset:Mt,blockers:ke}),{viewTransitionOpts:xe,flushSync:ve===!0}),k=dt.Pop,T=!1,N=!1,j=!1,B=!1,re=[],V=[]}async function pe(P,L){if(typeof P=="number"){e.history.go(P);return}let z=zp(S.location,S.matches,a,u.v7_prependBasename,P,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:G,submission:ne,error:ve}=J0(u.v7_normalizeFormMethod,!1,z,L),ce=S.location,ue=Oa(S.location,G,L&&L.state);ue=at({},ue,e.history.encodeLocation(ue));let le=L&&L.replace!=null?L.replace:void 0,ke=dt.Push;le===!0?ke=dt.Replace:le===!1||ne!=null&&tr(ne.formMethod)&&ne.formAction===S.location.pathname+S.location.search&&(ke=dt.Replace);let Mt=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,xe=(L&&L.unstable_flushSync)===!0,je=Zm({currentLocation:ce,nextLocation:ue,historyAction:ke});if(je){Za(je,{state:"blocked",location:ue,proceed(){Za(je,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),pe(P,L)},reset(){let et=new Map(S.blockers);et.set(je,ys),ye({blockers:et})}});return}return await We(ke,ue,{submission:ne,pendingError:ve,preventScrollReset:Mt,replace:L&&L.replace,enableViewTransition:L&&L.unstable_viewTransition,flushSync:xe})}function Te(){if(dn(),ye({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){We(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}We(k||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function We(P,L,z){b&&b.abort(),b=null,k=P,j=(z&&z.startUninterruptedRevalidation)===!0,QC(S.location,S.matches),T=(z&&z.preventScrollReset)===!0,N=(z&&z.enableViewTransition)===!0;let G=s||l,ne=z&&z.overrideNavigation,ve=cl(G,L,a),ce=(z&&z.flushSync)===!0;if(!ve){let et=Ln(404,{pathname:L.pathname}),{matches:Qt,route:hr}=o1(G);Kd(),Se(L,{matches:Qt,loaderData:{},errors:{[hr.id]:et}},{flushSync:ce});return}if(S.initialized&&!B&&I4(S.location,L)&&!(z&&z.submission&&tr(z.submission.formMethod))){Se(L,{matches:ve},{flushSync:ce});return}b=new AbortController;let ue=ws(e.history,L,b.signal,z&&z.submission),le,ke;if(z&&z.pendingError)ke={[Zs(ve).route.id]:z.pendingError};else if(z&&z.submission&&tr(z.submission.formMethod)){let et=await At(ue,L,z.submission,ve,{replace:z.replace,flushSync:ce});if(et.shortCircuited)return;le=et.pendingActionData,ke=et.pendingActionError,ne=Hf(L,z.submission),ce=!1,ue=new Request(ue.url,{signal:ue.signal})}let{shortCircuited:Mt,loaderData:xe,errors:je}=await cn(ue,L,ve,ne,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,ce,le,ke);Mt||(b=null,Se(L,at({matches:ve},le?{actionData:le}:{},{loaderData:xe,errors:je})))}async function At(P,L,z,G,ne){ne===void 0&&(ne={}),dn();let ve=B4(L,z);ye({navigation:ve},{flushSync:ne.flushSync===!0});let ce,ue=Bp(G,L);if(!ue.route.action&&!ue.route.lazy)ce={type:ft.error,error:Ln(405,{method:P.method,pathname:L.pathname,routeId:ue.route.id})};else if(ce=await xs("action",P,ue,G,i,o,a),P.signal.aborted)return{shortCircuited:!0};if(_l(ce)){let le;return ne&&ne.replace!=null?le=ne.replace:le=ce.location===S.location.pathname+S.location.search,await qe(S,ce,{submission:z,replace:le}),{shortCircuited:!0}}if(qs(ce)){let le=Zs(G,ue.route.id);return(ne&&ne.replace)!==!0&&(k=dt.Push),{pendingActionData:{},pendingActionError:{[le.route.id]:ce.error}}}if(si(ce))throw Ln(400,{type:"defer-action"});return{pendingActionData:{[ue.route.id]:ce.data}}}async function cn(P,L,z,G,ne,ve,ce,ue,le,ke){let Mt=G||Hf(L,ne),xe=ne||ve||s1(Mt),je=s||l,[et,Qt]=Z0(e.history,S,z,xe,L,B,re,V,H,R,O,je,a,le,ke);if(Kd(ze=>!(z&&z.some(Mn=>Mn.route.id===ze))||et&&et.some(Mn=>Mn.route.id===ze)),$=++C,et.length===0&&Qt.length===0){let ze=Xo();return Se(L,at({matches:z,loaderData:{},errors:ke||null},le?{actionData:le}:{},ze?{fetchers:new Map(S.fetchers)}:{}),{flushSync:ue}),{shortCircuited:!0}}if(!j){Qt.forEach(Mn=>{let gt=S.fetchers.get(Mn.key),Qo=_s(void 0,gt?gt.data:void 0);S.fetchers.set(Mn.key,Qo)});let ze=le||S.actionData;ye(at({navigation:Mt},ze?Object.keys(ze).length===0?{actionData:null}:{actionData:ze}:{},Qt.length>0?{fetchers:new Map(S.fetchers)}:{}),{flushSync:ue})}Qt.forEach(ze=>{Y.has(ze.key)&&lt(ze.key),ze.controller&&Y.set(ze.key,ze.controller)});let hr=()=>Qt.forEach(ze=>lt(ze.key));b&&b.signal.addEventListener("abort",hr);let{results:is,loaderResults:Gd,fetcherResults:Di}=await Yt(S.matches,z,et,Qt,P);if(P.signal.aborted)return{shortCircuited:!0};b&&b.signal.removeEventListener("abort",hr),Qt.forEach(ze=>Y.delete(ze.key));let Yn=i1(is);if(Yn){if(Yn.idx>=et.length){let ze=Qt[Yn.idx-et.length].key;O.add(ze)}return await qe(S,Yn.result,{replace:ce}),{shortCircuited:!0}}let{loaderData:qa,errors:Yd}=n1(S,z,et,Gd,ke,Qt,Di,ae);ae.forEach((ze,Mn)=>{ze.subscribe(gt=>{(gt||ze.done)&&ae.delete(Mn)})});let Xd=Xo(),Qd=os($),Ii=Xd||Qd||Qt.length>0;return at({loaderData:qa,errors:Yd},Ii?{fetchers:new Map(S.fetchers)}:{})}function Gn(P,L,z,G){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Y.has(P)&&lt(P);let ne=(G&&G.unstable_flushSync)===!0,ve=s||l,ce=zp(S.location,S.matches,a,u.v7_prependBasename,z,L,G==null?void 0:G.relative),ue=cl(ve,ce,a);if(!ue){Et(P,L,Ln(404,{pathname:ce}),{flushSync:ne});return}let{path:le,submission:ke,error:Mt}=J0(u.v7_normalizeFormMethod,!0,ce,G);if(Mt){Et(P,L,Mt,{flushSync:ne});return}let xe=Bp(ue,le);if(T=(G&&G.preventScrollReset)===!0,ke&&tr(ke.formMethod)){Re(P,L,le,xe,ue,ne,ke);return}R.set(P,{routeId:L,path:le}),yt(P,L,le,xe,ue,ne,ke)}async function Re(P,L,z,G,ne,ve,ce){if(dn(),R.delete(P),!G.route.action&&!G.route.lazy){let gt=Ln(405,{method:ce.formMethod,pathname:z,routeId:L});Et(P,L,gt,{flushSync:ve});return}let ue=S.fetchers.get(P);ct(P,W4(ce,ue),{flushSync:ve});let le=new AbortController,ke=ws(e.history,z,le.signal,ce);Y.set(P,le);let Mt=C,xe=await xs("action",ke,G,ne,i,o,a);if(ke.signal.aborted){Y.get(P)===le&&Y.delete(P);return}if(H.has(P)){ct(P,fo(void 0));return}if(_l(xe))if(Y.delete(P),$>Mt){ct(P,fo(void 0));return}else return O.add(P),ct(P,_s(ce)),qe(S,xe,{fetcherSubmission:ce});if(qs(xe)){Et(P,L,xe.error);return}if(si(xe))throw Ln(400,{type:"defer-action"});let je=S.navigation.location||S.location,et=ws(e.history,je,le.signal),Qt=s||l,hr=S.navigation.state!=="idle"?cl(Qt,S.navigation.location,a):S.matches;Ee(hr,"Didn't find any matches after fetcher action");let is=++C;E.set(P,is);let Gd=_s(ce,xe.data);S.fetchers.set(P,Gd);let[Di,Yn]=Z0(e.history,S,hr,ce,je,B,re,V,H,R,O,Qt,a,{[G.route.id]:xe.data},void 0);Yn.filter(gt=>gt.key!==P).forEach(gt=>{let Qo=gt.key,tv=S.fetchers.get(Qo),ZC=_s(void 0,tv?tv.data:void 0);S.fetchers.set(Qo,ZC),Y.has(Qo)&&lt(Qo),gt.controller&&Y.set(Qo,gt.controller)}),ye({fetchers:new Map(S.fetchers)});let qa=()=>Yn.forEach(gt=>lt(gt.key));le.signal.addEventListener("abort",qa);let{results:Yd,loaderResults:Xd,fetcherResults:Qd}=await Yt(S.matches,hr,Di,Yn,et);if(le.signal.aborted)return;le.signal.removeEventListener("abort",qa),E.delete(P),Y.delete(P),Yn.forEach(gt=>Y.delete(gt.key));let Ii=i1(Yd);if(Ii){if(Ii.idx>=Di.length){let gt=Yn[Ii.idx-Di.length].key;O.add(gt)}return qe(S,Ii.result)}let{loaderData:ze,errors:Mn}=n1(S,S.matches,Di,Xd,void 0,Yn,Qd,ae);if(S.fetchers.has(P)){let gt=fo(xe.data);S.fetchers.set(P,gt)}os(is),S.navigation.state==="loading"&&is>$?(Ee(k,"Expected pending action"),b&&b.abort(),Se(S.navigation.location,{matches:hr,loaderData:ze,errors:Mn,fetchers:new Map(S.fetchers)})):(ye({errors:Mn,loaderData:r1(S.loaderData,ze,hr,Mn),fetchers:new Map(S.fetchers)}),B=!1)}async function yt(P,L,z,G,ne,ve,ce){let ue=S.fetchers.get(P);ct(P,_s(ce,ue?ue.data:void 0),{flushSync:ve});let le=new AbortController,ke=ws(e.history,z,le.signal);Y.set(P,le);let Mt=C,xe=await xs("loader",ke,G,ne,i,o,a);if(si(xe)&&(xe=await SC(xe,ke.signal,!0)||xe),Y.get(P)===le&&Y.delete(P),!ke.signal.aborted){if(H.has(P)){ct(P,fo(void 0));return}if(_l(xe))if($>Mt){ct(P,fo(void 0));return}else{O.add(P),await qe(S,xe);return}if(qs(xe)){Et(P,L,xe.error);return}Ee(!si(xe),"Unhandled fetcher deferred data"),ct(P,fo(xe.data))}}async function qe(P,L,z){let{submission:G,fetcherSubmission:ne,replace:ve}=z===void 0?{}:z;L.revalidate&&(B=!0);let ce=Oa(P.location,L.location,{_isRedirect:!0});if(Ee(ce,"Expected a location on the redirect navigation"),n){let je=!1;if(L.reloadDocument)je=!0;else if(yC.test(L.location)){const et=e.history.createURL(L.location);je=et.origin!==t.location.origin||Ja(et.pathname,a)==null}if(je){ve?t.location.replace(L.location):t.location.assign(L.location);return}}b=null;let ue=ve===!0?dt.Replace:dt.Push,{formMethod:le,formAction:ke,formEncType:Mt}=P.navigation;!G&&!ne&&le&&ke&&Mt&&(G=s1(P.navigation));let xe=G||ne;if(N4.has(L.status)&&xe&&tr(xe.formMethod))await We(ue,ce,{submission:at({},xe,{formAction:L.location}),preventScrollReset:T});else{let je=Hf(ce,G);await We(ue,ce,{overrideNavigation:je,fetcherSubmission:ne,preventScrollReset:T})}}async function Yt(P,L,z,G,ne){let ve=await Promise.all([...z.map(le=>xs("loader",ne,le,L,i,o,a)),...G.map(le=>le.matches&&le.match&&le.controller?xs("loader",ws(e.history,le.path,le.controller.signal),le.match,le.matches,i,o,a):{type:ft.error,error:Ln(404,{pathname:le.path})})]),ce=ve.slice(0,z.length),ue=ve.slice(z.length);return await Promise.all([l1(P,z,ce,ce.map(()=>ne.signal),!1,S.loaderData),l1(P,G.map(le=>le.match),ue,G.map(le=>le.controller?le.controller.signal:null),!0)]),{results:ve,loaderResults:ce,fetcherResults:ue}}function dn(){B=!0,re.push(...Kd()),R.forEach((P,L)=>{Y.has(L)&&(V.push(L),lt(L))})}function ct(P,L,z){z===void 0&&(z={}),S.fetchers.set(P,L),ye({fetchers:new Map(S.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function Et(P,L,z,G){G===void 0&&(G={});let ne=Zs(S.matches,L);xn(P),ye({errors:{[ne.route.id]:z},fetchers:new Map(S.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Xt(P){return u.v7_fetcherPersist&&(F.set(P,(F.get(P)||0)+1),H.has(P)&&H.delete(P)),S.fetchers.get(P)||R4}function xn(P){let L=S.fetchers.get(P);Y.has(P)&&!(L&&L.state==="loading"&&E.has(P))&&lt(P),R.delete(P),E.delete(P),O.delete(P),H.delete(P),S.fetchers.delete(P)}function Mr(P){if(u.v7_fetcherPersist){let L=(F.get(P)||0)-1;L<=0?(F.delete(P),H.add(P)):F.set(P,L)}else xn(P);ye({fetchers:new Map(S.fetchers)})}function lt(P){let L=Y.get(P);Ee(L,"Expected fetch controller: "+P),L.abort(),Y.delete(P)}function fr(P){for(let L of P){let z=Xt(L),G=fo(z.data);S.fetchers.set(L,G)}}function Xo(){let P=[],L=!1;for(let z of O){let G=S.fetchers.get(z);Ee(G,"Expected fetcher: "+z),G.state==="loading"&&(O.delete(z),P.push(z),L=!0)}return fr(P),L}function os(P){let L=[];for(let[z,G]of E)if(G<P){let ne=S.fetchers.get(z);Ee(ne,"Expected fetcher: "+z),ne.state==="loading"&&(lt(z),E.delete(z),L.push(z))}return fr(L),L.length>0}function YC(P,L){let z=S.blockers.get(P)||ys;return oe.get(P)!==L&&oe.set(P,L),z}function Jm(P){S.blockers.delete(P),oe.delete(P)}function Za(P,L){let z=S.blockers.get(P)||ys;Ee(z.state==="unblocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="blocked"||z.state==="blocked"&&L.state==="proceeding"||z.state==="blocked"&&L.state==="unblocked"||z.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+L.state);let G=new Map(S.blockers);G.set(P,L),ye({blockers:G})}function Zm(P){let{currentLocation:L,nextLocation:z,historyAction:G}=P;if(oe.size===0)return;oe.size>1&&Ei(!1,"A router only supports one blocker at a time");let ne=Array.from(oe.entries()),[ve,ce]=ne[ne.length-1],ue=S.blockers.get(ve);if(!(ue&&ue.state==="proceeding")&&ce({currentLocation:L,nextLocation:z,historyAction:G}))return ve}function Kd(P){let L=[];return ae.forEach((z,G)=>{(!P||P(G))&&(z.cancel(),L.push(G),ae.delete(G))}),L}function XC(P,L,z){if(f=P,m=L,h=z||null,!g&&S.navigation===Uf){g=!0;let G=ev(S.location,S.matches);G!=null&&ye({restoreScrollPosition:G})}return()=>{f=null,m=null,h=null}}function qm(P,L){return h&&h(P,L.map(G=>i4(G,S.loaderData)))||P.key}function QC(P,L){if(f&&m){let z=qm(P,L);f[z]=m()}}function ev(P,L){if(f){let z=qm(P,L),G=f[z];if(typeof G=="number")return G}return null}function JC(P){i={},s=jp(P,o,void 0,i)}return x={get basename(){return a},get state(){return S},get routes(){return l},get window(){return t},initialize:_e,subscribe:Ne,enableScrollRestoration:XC,navigate:pe,fetch:Gn,revalidate:Te,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:Xt,deleteFetcher:Mr,dispose:Q,getBlocker:YC,deleteBlocker:Jm,_internalFetchControllers:Y,_internalActiveDeferreds:ae,_internalSetRoutes:JC},x}function A4(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function zp(e,t,n,r,o,i,l){let s,a;if(i){s=[];for(let c of t)if(s.push(c),c.route.id===i){a=c;break}}else s=t,a=t[t.length-1];let u=gC(o||".",pC(s),Ja(e.pathname,n)||e.pathname,l==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&a&&a.route.index&&!Um(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Ao([n,u.pathname])),Qa(u)}function J0(e,t,n,r){if(!r||!A4(r))return{path:n};if(r.formMethod&&!F4(r.formMethod))return{path:n,error:Ln(405,{method:r.formMethod})};let o=()=>({path:n,error:Ln(400,{type:"invalid-body"})}),i=r.formMethod||"get",l=e?i.toUpperCase():i.toLowerCase(),s=_C(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!tr(l))return o();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,m)=>{let[g,_]=m;return""+h+g+"="+_+`
179
+ `},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!tr(l))return o();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return o()}}}Ee(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Fp(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Fp(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=t1(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=t1(a)}catch{return o()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(tr(c.formMethod))return{path:n,submission:c};let d=oo(n);return t&&d.search&&Um(d.search)&&a.append("index",""),d.search="?"+a,{path:Qa(d),submission:c}}function M4(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function Z0(e,t,n,r,o,i,l,s,a,u,c,d,f,h,m){let g=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,_=e.createURL(t.location),v=e.createURL(o),y=m?Object.keys(m)[0]:void 0,S=M4(n,y).filter((T,b)=>{if(T.route.lazy)return!0;if(T.route.loader==null)return!1;if(L4(t.loaderData,t.matches[b],T)||l.some(M=>M===T.route.id))return!0;let N=t.matches[b],D=T;return q0(T,at({currentUrl:_,currentParams:N.params,nextUrl:v,nextParams:D.params},r,{actionResult:g,defaultShouldRevalidate:i||_.pathname+_.search===v.pathname+v.search||_.search!==v.search||wC(N,D)}))}),k=[];return u.forEach((T,b)=>{if(!n.some(B=>B.route.id===T.routeId)||a.has(b))return;let N=cl(d,T.path,f);if(!N){k.push({key:b,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(b),M=Bp(N,T.path),j=!1;c.has(b)?j=!1:s.includes(b)?j=!0:D&&D.state!=="idle"&&D.data===void 0?j=i:j=q0(M,at({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:i})),j&&k.push({key:b,routeId:T.routeId,path:T.path,matches:N,match:M,controller:new AbortController})}),[S,k]}function L4(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function wC(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function q0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function e1(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];Ee(o,"No route found in manifest");let i={};for(let l in r){let a=o[l]!==void 0&&l!=="hasErrorBoundary";Ei(!a,'Route "'+o.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!a&&!r4.has(l)&&(i[l]=r[l])}Object.assign(o,i),Object.assign(o,at({},t(o),{lazy:void 0}))}async function xs(e,t,n,r,o,i,l,s){s===void 0&&(s={});let a,u,c,d=m=>{let g,_=new Promise((v,y)=>g=y);return c=()=>g(),t.signal.addEventListener("abort",c),Promise.race([m({request:t,params:n.params,context:s.requestContext}),_])};try{let m=n.route[e];if(n.route.lazy)if(m){let g,_=await Promise.all([d(m).catch(v=>{g=v}),e1(n.route,i,o)]);if(g)throw g;u=_[0]}else if(await e1(n.route,i,o),m=n.route[e],m)u=await d(m);else if(e==="action"){let g=new URL(t.url),_=g.pathname+g.search;throw Ln(405,{method:t.method,pathname:_,routeId:n.route.id})}else return{type:ft.data,data:void 0};else if(m)u=await d(m);else{let g=new URL(t.url),_=g.pathname+g.search;throw Ln(404,{pathname:_})}Ee(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){a=ft.error,u=m}finally{c&&t.signal.removeEventListener("abort",c)}if(z4(u)){let m=u.status;if(T4.has(m)){let v=u.headers.get("Location");if(Ee(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!yC.test(v))v=zp(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),S=Ja(x.pathname,l)!=null;x.origin===y.origin&&S&&(v=x.pathname+x.search+x.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:ft.redirect,status:m,location:v,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:a===ft.error?ft.error:ft.data,response:u};let g,_=u.headers.get("Content-Type");return _&&/\bapplication\/json\b/.test(_)?g=await u.json():g=await u.text(),a===ft.error?{type:a,error:new Wm(m,u.statusText,g),headers:u.headers}:{type:ft.data,data:g,statusCode:u.status,headers:u.headers}}if(a===ft.error)return{type:a,error:u};if(j4(u)){var f,h;return{type:ft.deferred,deferredData:u,statusCode:(f=u.init)==null?void 0:f.status,headers:((h=u.init)==null?void 0:h.headers)&&new Headers(u.init.headers)}}return{type:ft.data,data:u}}function ws(e,t,n,r){let o=e.createURL(_C(t)).toString(),i={signal:n};if(r&&tr(r.formMethod)){let{formMethod:l,formEncType:s}=r;i.method=l.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=Fp(r.formData):i.body=r.formData}return new Request(o,i)}function Fp(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function t1(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function D4(e,t,n,r,o){let i={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(Ee(!_l(c),"Cannot handle redirect results in processLoaderData"),qs(c)){let h=Zs(e,f),m=c.error;r&&(m=Object.values(r)[0],r=void 0),l=l||{},l[h.route.id]==null&&(l[h.route.id]=m),i[f]=void 0,a||(a=!0,s=mC(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else si(c)?(o.set(f,c.deferredData),i[f]=c.deferredData.data):i[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:l,statusCode:s||200,loaderHeaders:u}}function n1(e,t,n,r,o,i,l,s){let{loaderData:a,errors:u}=D4(t,n,r,o,s);for(let c=0;c<i.length;c++){let{key:d,match:f,controller:h}=i[c];Ee(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let m=l[c];if(!(h&&h.signal.aborted))if(qs(m)){let g=Zs(e.matches,f==null?void 0:f.route.id);u&&u[g.route.id]||(u=at({},u,{[g.route.id]:m.error})),e.fetchers.delete(d)}else if(_l(m))Ee(!1,"Unhandled fetcher revalidation redirect");else if(si(m))Ee(!1,"Unhandled fetcher deferred data");else{let g=fo(m.data);e.fetchers.set(d,g)}}return{loaderData:a,errors:u}}function r1(e,t,n,r){let o=at({},t);for(let i of n){let l=i.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(o[l]=t[l]):e[l]!==void 0&&i.route.loader&&(o[l]=e[l]),r&&r.hasOwnProperty(l))break}return o}function Zs(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function o1(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ln(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Wm(e||500,l,new Error(s),!0)}function i1(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(_l(n))return{result:n,idx:t}}}function _C(e){let t=typeof e=="string"?oo(e):e;return Qa(at({},t,{hash:""}))}function I4(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function si(e){return e.type===ft.deferred}function qs(e){return e.type===ft.error}function _l(e){return(e&&e.type)===ft.redirect}function j4(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function z4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function F4(e){return b4.has(e.toLowerCase())}function tr(e){return $4.has(e.toLowerCase())}async function l1(e,t,n,r,o,i){for(let l=0;l<n.length;l++){let s=n[l],a=t[l];if(!a)continue;let u=e.find(d=>d.route.id===a.route.id),c=u!=null&&!wC(u,a)&&(i&&i[a.route.id])!==void 0;if(si(s)&&(o||c)){let d=r[l];Ee(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await SC(s,d,o).then(f=>{f&&(n[l]=f||n[l])})}}}async function SC(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ft.data,data:e.deferredData.unwrappedData}}catch(o){return{type:ft.error,error:o}}return{type:ft.data,data:e.deferredData.data}}}function Um(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Bp(e,t){let n=typeof t=="string"?oo(t).search:t.search;if(e[e.length-1].route.index&&Um(n||""))return e[e.length-1];let r=hC(e);return r[r.length-1]}function s1(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:l}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Hf(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function B4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function _s(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function W4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function fo(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function U4(e,t){try{let n=e.sessionStorage.getItem(xC);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function H4(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(xC,JSON.stringify(n))}catch(r){Ei(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
180
+ * React Router v6.20.0
181
+ *
182
+ * Copyright (c) Remix Software Inc.
183
+ *
184
+ * This source code is licensed under the MIT license found in the
185
+ * LICENSE.md file in the root directory of this source tree.
186
+ *
187
+ * @license MIT
188
+ */function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}const Fd=p.createContext(null),EC=p.createContext(null),Bd=p.createContext(null),Wd=p.createContext(null),Li=p.createContext({outlet:null,matches:[],isDataRoute:!1}),CC=p.createContext(null);function Ud(){return p.useContext(Wd)!=null}function $C(){return Ud()||Ee(!1),p.useContext(Wd).location}function kC(e){p.useContext(Bd).static||p.useLayoutEffect(e)}function Hm(){let{isDataRoute:e}=p.useContext(Li);return e?rM():V4()}function V4(){Ud()||Ee(!1);let e=p.useContext(Fd),{basename:t,navigator:n}=p.useContext(Bd),{matches:r}=p.useContext(Li),{pathname:o}=$C(),i=JSON.stringify(pC(r)),l=p.useRef(!1);return kC(()=>{l.current=!0}),p.useCallback(function(a,u){if(u===void 0&&(u={}),!l.current)return;if(typeof a=="number"){n.go(a);return}let c=gC(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ao([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function K4(){let{matches:e}=p.useContext(Li),t=e[e.length-1];return t?t.params:{}}function G4(e,t,n){Ud()||Ee(!1);let{navigator:r}=p.useContext(Bd),{matches:o}=p.useContext(Li),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let a=$C(),u;if(t){var c;let g=typeof t=="string"?oo(t):t;s==="/"||(c=g.pathname)!=null&&c.startsWith(s)||Ee(!1),u=g}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=cl(e,{pathname:f}),m=Z4(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:Ao([s,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Ao([s,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n);return t&&m?p.createElement(Wd.Provider,{value:{location:Jc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:dt.Pop}},m):m}function Y4(){let e=nM(),t=mC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,i)}const X4=p.createElement(Y4,null);class Q4 extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?p.createElement(Li.Provider,{value:this.props.routeContext},p.createElement(CC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function J4(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(Fd);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Li.Provider,{value:t},r)}function Z4(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=i.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||Ee(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,a,u)=>{let c=a.route.id?l==null?void 0:l[a.route.id]:null,d=null;n&&(d=a.route.errorElement||X4);let f=t.concat(i.slice(0,u+1)),h=()=>{let m;return c?m=d:a.route.Component?m=p.createElement(a.route.Component,null):a.route.element?m=a.route.element:m=s,p.createElement(J4,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:m})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(Q4,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var bC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(bC||{}),Zc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Zc||{});function q4(e){let t=p.useContext(Fd);return t||Ee(!1),t}function eM(e){let t=p.useContext(EC);return t||Ee(!1),t}function tM(e){let t=p.useContext(Li);return t||Ee(!1),t}function TC(e){let t=tM(),n=t.matches[t.matches.length-1];return n.route.id||Ee(!1),n.route.id}function nM(){var e;let t=p.useContext(CC),n=eM(Zc.UseRouteError),r=TC(Zc.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function rM(){let{router:e}=q4(bC.UseNavigateStable),t=TC(Zc.UseNavigateStable),n=p.useRef(!1);return kC(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Jc({fromRouteId:t},i)))},[e,t])}function oM(e){let{basename:t="/",children:n=null,location:r,navigationType:o=dt.Pop,navigator:i,static:l=!1}=e;Ud()&&Ee(!1);let s=t.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:i,static:l}),[s,i,l]);typeof r=="string"&&(r=oo(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,m=p.useMemo(()=>{let g=Ja(u,s);return g==null?null:{location:{pathname:g,search:c,hash:d,state:f,key:h},navigationType:o}},[s,u,c,d,f,h,o]);return m==null?null:p.createElement(Bd.Provider,{value:a},p.createElement(Wd.Provider,{children:n,value:m}))}new Promise(()=>{});function iM(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}const NC=ee.createContext(null),lM=e=>{var s,a;const t=ee.useContext(NC),[n,r]=$n.splitModuleIdAndModulePath(e),o=(s=t==null?void 0:t[n])==null?void 0:s.source,i=(a=t==null?void 0:t[n])==null?void 0:a.schema;if(!o||!i)throw Error("Could not find module: "+n);const l=$n.resolvePath(r,o,i);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},sM=({valApi:e})=>{var S,k;const{"*":t}=K4(),[n,r]=p.useState(null),[o,i]=p.useState(null),[l,s]=p.useState(),[a]=l?$n.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&((S=n==null?void 0:n[a])==null?void 0:S.source),c=a&&((k=n==null?void 0:n[a])==null?void 0:k.schema),d=Object.entries(n||{}).flatMap(([,T])=>T.errors?T.errors.fatal?T.errors.fatal:[]:[]),f=Object.entries(n||{}).flatMap(([,T])=>T.errors&&T.errors.validation?[T.errors.validation]:[]);if(d&&d.length>0){const T=d.length===1?d[0].message:`Multiple errors detected:
189
+ ${d.map((N,D)=>`${D+1}. ${N.message}`).join(`
190
+ `)}
191
+
192
+ Showing stack trace of: 0. ${d[0].message}`,b=new Error(T);throw b.stack=d[0].stack,b}f&&f.length>0&&console.warn("Val encountered validation errors:",f),p.useEffect(()=>{s(t?`/${t}`:l)},[t]);const[h,m]=p.useState(null);p.useEffect(()=>{try{new WebSocket(`${window.location.origin.replace("http://","ws://")}/_next/webpack-hmr`).addEventListener("message",b=>{let N;try{N=JSON.parse(b.data)}catch{console.error("Failed to parse HMR")}typeof(N==null?void 0:N.hash)=="string"&&(N==null?void 0:N.action)==="built"&&m(N.hash)})}catch(T){console.warn("Failed to initialize HMR",T)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getTree({patch:!0,includeSchema:!0,includeSource:!0}).then(T=>{Fs.isOk(T)?r(T.value.modules):(i("Could not load modules: "+T.error.message),console.error(T.error))})},[h]);const g=Hm(),[_,v]=QO();p.useEffect(()=>{const T=b=>{console.log("popstate",b)};return window.addEventListener("popstate",T),()=>{window.removeEventListener("popstate",T)}},[]);const y=ee.useRef(null),x=p.useCallback(T=>async b=>{const[N,D]=$n.splitModuleIdAndModulePath(T),M=await b($n.createPatchJSONPath(D));return e.postPatches(N,M).then(j=>{if(Fs.isErr(j))throw j.error;if(!h)return e.getTree({treePath:N,patch:!0,includeSchema:!0,includeSource:!0}).then(B=>{Fs.isOk(B)?r(B.value.modules):(i("Could not load modules: "+B.error.message),console.error(B.error))})}).catch(j=>{console.error(j)})},[]);return w.jsx(cE.Provider,{value:{theme:_,setTheme:v,api:e,editMode:"full",session:{status:"not-asked"},highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:w.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":_,children:[w.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:w.jsx(KO,{api:e})}),w.jsx("div",{id:"val-fullscreen-hover",ref:y}),w.jsx(RC.Provider,{value:{hoverElem:y==null?void 0:y.current},children:w.jsx("div",{className:"text-primary bg-background",children:w.jsxs(Ws,{children:[w.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:w.jsx(sC,{})}),w.jsx(Bs,{className:"px-4",children:n?w.jsx(mM,{paths:Object.keys(n),setSelectedModuleId:T=>{g(T)}}):!o&&w.jsx("div",{className:"py-4",children:"Loading..."})}),w.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[w.jsx("button",{onClick:()=>{history.back()},children:w.jsx(DO,{})}),w.jsx("p",{children:l||"/"})]}),w.jsxs("div",{className:"p-4",children:[o&&w.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",o]}),n&&l&&a&&u!==void 0&&c!==void 0&&w.jsx(NC.Provider,{value:n,children:w.jsx(uM,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:x})})]})]})})})]})})},RC=ee.createContext({hoverElem:null}),aM=()=>ee.useContext(RC);function uM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o}){const[,i]=$n.splitModuleIdAndModulePath(e),l=$n.resolvePath(i,t,n);if(!l)throw Error("Could not resolve module: "+e);return w.jsx(PC,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:o,top:!0})}function PC({path:e,source:t,schema:n,setSelectedPath:r,field:o,initOnSubmit:i,top:l}){return t===null||n.opt?w.jsx(hM,{path:e,source:t,schema:n,field:o,initOnSubmit:i,setSelectedPath:r}):n.type==="object"?typeof t!="object"||ea(t)?w.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):w.jsx(OC,{source:t,path:e,schema:n,initOnSubmit:i,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!ea(t)?w.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):w.jsx(AC,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?w.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):ea(t)?w.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):w.jsx(cM,{source:t,path:e,schema:n,setSelectedPath:r}):w.jsxs("div",{className:"py-2 gap-y-4",children:[w.jsx("div",{className:"text-left",children:o||e}),w.jsx(lC,{path:e,disabled:!1,source:t,schema:n,onSubmit:i(e)})]})}function OC({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,top:i}){return w.jsx("div",{className:vd("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!i}),children:Object.entries(n.items).map(([l,s])=>{const a=Aa(e,l);return w.jsx(PC,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:o},a)})},e)}function cM({path:e,source:t,schema:n,setSelectedPath:r}){const o=Hm();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([i,l])=>{const s=Aa(e,i);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(dM,{recordKey:i,path:s,source:l,schema:n.item})},s)})},e)}const Wp=170;function dM({recordKey:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=Wp&&l(!0)},[]),w.jsxs(Bm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Wp},children:[w.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),w.jsx("div",{className:"text-xs",children:w.jsx(Vm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function AC({path:e,source:t,schema:n,setSelectedPath:r}){const o=Hm();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((i,l)=>{const s=Aa(e,l);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(fM,{index:l,path:s,source:i,schema:n.item},s)},s)})},e)}const a1=Wp;function fM({index:e,path:t,source:n,schema:r}){const o=ee.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=a1&&l(!0)},[]),w.jsxs(Bm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:a1},children:[w.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),w.jsx("div",{className:"text-xs",children:w.jsx(Vm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function Aa(e,t){const n=$n.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Vm({path:e,source:t,schema:n}){const[r,o]=p.useState(null),{hoverElem:i}=aM();if(n.type==="object")return w.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>w.jsxs(p.Fragment,{children:[w.jsxs("span",{className:"text-muted",children:[l,":"]}),w.jsx("span",{children:w.jsx(Vm,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:Aa(e,l)})})]},Aa(e,l)))},e);if(n.type==="array")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?w.jsxs("span",{children:[w.jsx("span",{className:"text-accent",children:t.length}),w.jsx("span",{children:t.length===1?" item":" items"})]},e):w.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?w.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(Kt in t)||t[Kt]!=="richtext"?w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):w.jsx(vM,{children:v_(t)},e);if(n.type==="string")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{children:t});if(n.type==="image"){if(t===null)return w.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(vn in t)||typeof t[vn]!="string")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=$n.convertFileSource(t).url;return w.jsxs("span",{onMouseOver:s=>{o({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{o(null)},className:"relative flex items-center justify-start gap-1",children:[w.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[vn]}),r&&i&&Nr.createPortal(w.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),i)]},e)}else{if(n.type==="boolean")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()},e)}return w.jsxs("div",{children:["TODO: ",n.type]},e)}function hM({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,field:i}){const[l,s]=p.useState(t!==null);return w.jsxs("div",{className:"flex flex-col gap-y-6",children:[i?w.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[w.jsx(Ip,{checked:l,onClick:()=>{s(a=>!a)}}),w.jsx("span",{children:i})]}):w.jsx(Ip,{checked:l,onClick:()=>{s(a=>!a)}}),l&&w.jsx(pM,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:o})]},e)}function pM({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o}){if(n.type==="array"){if(typeof e=="object"&&(e===null||ea(e)))return w.jsx(AC,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!ea(e)))return w.jsx(OC,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return w.jsx(lC,{path:t,disabled:!1,source:e,schema:n,onSubmit:o(t)},t);return w.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function ea(e){return Array.isArray(e)}function gM(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(i=>i!=="");let o=t;r.forEach(i=>{o[i]||(o[i]={}),o=o[i]})}),t}function mM({paths:e,setSelectedModuleId:t}){const n=gM(e);return w.jsx(s_,{children:Object.entries(n).map(([r,o])=>w.jsx("div",{className:"px-4 py-2",children:w.jsx(MC,{name:r,tree:o,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function MC({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return w.jsxs("div",{children:[w.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([o,i])=>w.jsx("div",{className:"px-4 py-1",children:w.jsx(MC,{name:o,tree:i,moduleId:`${n}/${o}`,setSelectedModuleId:r})},`${n}/${o}`))]})}const u1={tags:{h1:"font-bold",h2:"font-bold",h3:"font-bold",h4:"font-bold",h5:"font-bold",h6:"font-bold",p:""},classes:{bold:"font-bold",italic:"italic",lineThrough:"line-through"}};function vM({children:e}){const t=e;function n(i,l){const s=u1.tags[i];return s&&l?[l,s].join(" "):s||l}function r(i,l){const s=u1.classes[i];return s&&l?[l,s].join(" "):s||l}function o(i,l){var u,c;if(typeof i=="string")return i;if(i.tag==="p")return w.jsx("p",{className:n("p"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="img")return w.jsx("img",{className:n("img"),src:i.src},l);if(i.tag==="ul")return w.jsx("ul",{className:n("ul"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="ol")return w.jsx("ol",{className:n("ol"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="li")return w.jsx("li",{className:n("li"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="span")return w.jsx("span",{className:i.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h1")return w.jsx("h1",{className:n("h1"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h2")return w.jsx("h2",{className:n("h2"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h3")return w.jsx("h3",{className:n("h3"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h4")return w.jsx("h4",{className:n("h4"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h5")return w.jsx("h5",{className:n("h5"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h6")return w.jsx("h6",{className:n("h6"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="br")return w.jsx("br",{},l);if(i.tag==="a")return w.jsx("a",{href:i.href,children:i.children.map((d,f)=>o(d,f))},l);console.error("Unknown tag",i.tag);const a=i.tag;return a!=null&&a.tag?ee.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(o)}):null}return w.jsx("span",{"data-val-path":t.valPath,children:t.children.map((i,l)=>o(i,l))})}const yM=p.createContext(null),Vf={didCatch:!1,error:null};class xM extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Vf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(Vf)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&wM(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(Vf)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(o))s=o;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(yM.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function wM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const LC="Collapsible",[_M,DC]=Ni(LC),[SM,Km]=_M(LC),EM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...s}=e,[a=!1,u]=Dl({prop:r,defaultProp:o,onChange:l});return p.createElement(SM,{scope:n,disabled:i,contentId:Ad(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Ie.div,te({"data-state":Gm(a),"data-disabled":i?"":void 0},s,{ref:t})))}),CM="CollapsibleTrigger",$M=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Km(CM,n);return p.createElement(Ie.button,te({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Gm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:Ge(e.onClick,o.onOpenToggle)}))}),IC="CollapsibleContent",kM=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Km(IC,e.__scopeCollapsible);return p.createElement(Wl,{present:n||o.open},({present:i})=>p.createElement(bM,te({},r,{ref:t,present:i})))}),bM=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=Km(IC,n),[s,a]=p.useState(r),u=p.useRef(null),c=Ze(t,u),d=p.useRef(0),f=d.current,h=p.useRef(0),m=h.current,g=l.open||s,_=p.useRef(g),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(y)},[]),Nn(()=>{const y=u.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();d.current=x.height,h.current=x.width,_.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Ie.div,te({"data-state":Gm(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g},i,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style}}),g&&o)});function Gm(e){return e?"open":"closed"}const TM=EM,NM=$M,RM=kM,Yo="Accordion",PM=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ym,OM,AM]=vE(Yo),[Hd,gL]=Ni(Yo,[AM,DC]),Xm=DC(),jC=ee.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return ee.createElement(Ym.Provider,{scope:e.__scopeAccordion},n==="multiple"?ee.createElement(IM,te({},i,{ref:t})):ee.createElement(DM,te({},o,{ref:t})))});jC.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[zC,MM]=Hd(Yo),[FC,LM]=Hd(Yo,{collapsible:!1}),DM=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...l}=e,[s,a]=Dl({prop:n,defaultProp:r,onChange:o});return ee.createElement(zC,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:ee.useCallback(()=>i&&a(""),[i,a])},ee.createElement(FC,{scope:e.__scopeAccordion,collapsible:i},ee.createElement(BC,te({},l,{ref:t}))))}),IM=ee.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l=[],s]=Dl({prop:n,defaultProp:r,onChange:o}),a=ee.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=ee.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return ee.createElement(zC,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},ee.createElement(FC,{scope:e.__scopeAccordion,collapsible:!0},ee.createElement(BC,te({},i,{ref:t}))))}),[jM,Vd]=Hd(Yo),BC=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...l}=e,s=ee.useRef(null),a=Ze(s,t),u=OM(n),d=Wg(o)==="ltr",f=Ge(e.onKeyDown,h=>{var m;if(!PM.includes(h.key))return;const g=h.target,_=u().filter(D=>{var M;return!((M=D.ref.current)!==null&&M!==void 0&&M.disabled)}),v=_.findIndex(D=>D.ref.current===g),y=_.length;if(v===-1)return;h.preventDefault();let x=v;const S=0,k=y-1,T=()=>{x=v+1,x>k&&(x=S)},b=()=>{x=v-1,x<S&&(x=k)};switch(h.key){case"Home":x=S;break;case"End":x=k;break;case"ArrowRight":i==="horizontal"&&(d?T():b());break;case"ArrowDown":i==="vertical"&&T();break;case"ArrowLeft":i==="horizontal"&&(d?b():T());break;case"ArrowUp":i==="vertical"&&b();break}const N=x%y;(m=_[N].ref.current)===null||m===void 0||m.focus()});return ee.createElement(jM,{scope:n,disabled:r,direction:o,orientation:i},ee.createElement(Ym.Slot,{scope:n},ee.createElement(Ie.div,te({},l,{"data-orientation":i,ref:a,onKeyDown:r?void 0:f}))))}),Up="AccordionItem",[zM,Qm]=Hd(Up),FM=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=Vd(Up,n),l=MM(Up,n),s=Xm(n),a=Ad(),u=r&&l.value.includes(r)||!1,c=i.disabled||e.disabled;return ee.createElement(zM,{scope:n,open:u,disabled:c,triggerId:a},ee.createElement(TM,te({"data-orientation":i.orientation,"data-state":WC(u)},s,o,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),BM="AccordionHeader",WM=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Vd(Yo,n),i=Qm(BM,n);return ee.createElement(Ie.h3,te({"data-orientation":o.orientation,"data-state":WC(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),c1="AccordionTrigger",UM=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Vd(Yo,n),i=Qm(c1,n),l=LM(c1,n),s=Xm(n);return ee.createElement(Ym.ItemSlot,{scope:n},ee.createElement(NM,te({"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),HM="AccordionContent",VM=ee.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Vd(Yo,n),i=Qm(HM,n),l=Xm(n);return ee.createElement(RM,te({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},l,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function WC(e){return e?"open":"closed"}const KM=jC,GM=FM,YM=WM,UC=UM,HC=VM,XM=KM,VC=p.forwardRef(({className:e,...t},n)=>w.jsx(GM,{ref:n,className:ut("border-b",e),...t}));VC.displayName="AccordionItem";const KC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(YM,{className:"flex",children:w.jsxs(UC,{ref:r,className:ut("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,w.jsx(mE,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));KC.displayName=UC.displayName;const GC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(HC,{ref:r,className:ut("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:w.jsx("div",{className:"pt-0 pb-4",children:t})}));GC.displayName=HC.displayName;/**
193
+ * React Router DOM v6.20.0
194
+ *
195
+ * Copyright (c) Remix Software Inc.
196
+ *
197
+ * This source code is licensed under the MIT license found in the
198
+ * LICENSE.md file in the root directory of this source tree.
199
+ *
200
+ * @license MIT
201
+ */function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}function QM(e,t){return O4({basename:t==null?void 0:t.basename,future:qc({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:e4({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||JM(),routes:e,mapRouteProperties:iM,window:t==null?void 0:t.window}).initialize()}function JM(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=qc({},t,{errors:ZM(t.errors)})),t}function ZM(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Wm(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let l=new i(o.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const qM=p.createContext({isTransitioning:!1}),eL=p.createContext(new Map),tL="startTransition",d1=C1[tL],nL="flushSync",f1=wb[nL];function rL(e){d1?d1(e):e()}function Ss(e){f1?f1(e):e()}class oL{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function iL(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=p.useState(n.state),[l,s]=p.useState(),[a,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[f,h]=p.useState(),[m,g]=p.useState(),_=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback(b=>{v?rL(b):b()},[v]),x=p.useCallback((b,N)=>{let{deletedFetchers:D,unstable_flushSync:M,unstable_viewTransitionOpts:j}=N;D.forEach(re=>_.current.delete(re)),b.fetchers.forEach((re,V)=>{re.data!==void 0&&_.current.set(V,re.data)});let B=n.window==null||typeof n.window.document.startViewTransition!="function";if(!j||B){M?Ss(()=>i(b)):y(()=>i(b));return}if(M){Ss(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:j.currentLocation,nextLocation:j.nextLocation})});let re=n.window.document.startViewTransition(()=>{Ss(()=>i(b))});re.finished.finally(()=>{Ss(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})})}),Ss(()=>h(re));return}f?(c&&c.resolve(),f.skipTransition(),g({state:b,currentLocation:j.currentLocation,nextLocation:j.nextLocation})):(s(b),u({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}))},[n.window,f,c,_,y]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{a.isTransitioning&&!a.flushSync&&d(new oL)},[a]),p.useEffect(()=>{if(c&&l&&n.window){let b=l,N=c.promise,D=n.window.document.startViewTransition(async()=>{y(()=>i(b)),await N});D.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(D)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&o.location.key===l.location.key&&c.resolve()},[c,f,o.location,l]),p.useEffect(()=>{!a.isTransitioning&&m&&(s(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[a.isTransitioning,m]);let S=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:b=>n.navigate(b),push:(b,N,D)=>n.navigate(b,{state:N,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(b,N,D)=>n.navigate(b,{replace:!0,state:N,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),k=n.basename||"/",T=p.useMemo(()=>({router:n,navigator:S,static:!1,basename:k}),[n,S,k]);return p.createElement(p.Fragment,null,p.createElement(Fd.Provider,{value:T},p.createElement(EC.Provider,{value:o},p.createElement(eL.Provider,{value:_.current},p.createElement(qM.Provider,{value:a},p.createElement(oM,{basename:k,location:o.location,navigationType:o.historyAction,navigator:S},o.initialized?p.createElement(lL,{routes:n.routes,state:o}):t))))),null)}function lL(e){let{routes:t,state:n}=e;return G4(t,void 0,n)}var h1;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(h1||(h1={}));var p1;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(p1||(p1={}));function sL({error:e,resetErrorBoundary:t}){return console.error(e),w.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:w.jsx("div",{className:"w-full h-full p-10",children:w.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[w.jsx(sC,{})," encountered an error"]}),w.jsx("button",{onClick:t,children:w.jsx(VO,{})})]}),w.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),w.jsx("pre",{children:e.message}),e.stack&&w.jsx(XM,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:w.jsxs(VC,{value:"error",children:[w.jsx(KC,{children:"Stack trace:"}),w.jsx(GC,{className:"p-4 bg-popover text-popover-foreground",children:e.stack&&w.jsx("pre",{children:e.stack})})]})})]})})})}function aL(){const e=QM([{path:"/*",element:w.jsx(xM,{fallbackRender:sL,children:w.jsx(sM,{valApi:new NT("/api/val")})})}],{basename:"/api/val/static/edit"});return w.jsx(iL,{router:e})}Kf.createRoot(document.getElementById("root")).render(ee.createElement(ee.StrictMode,null,ee.createElement(aL,null)));