@valbuild/ui 0.43.0 → 0.44.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.
@@ -1,201 +0,0 @@
1
- var vb=Object.defineProperty;var yb=(t,e,n)=>e in t?vb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Je=(t,e,n)=>(yb(t,typeof e!="symbol"?e+"":e,n),n),xb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var th=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var Gu=(t,e,n)=>(xb(t,e,"access private method"),n);function k_(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function Tu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var b_={exports:{}},Pe={};/**
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 Nu=Symbol.for("react.element"),_b=Symbol.for("react.portal"),wb=Symbol.for("react.fragment"),Sb=Symbol.for("react.strict_mode"),Eb=Symbol.for("react.profiler"),Cb=Symbol.for("react.provider"),kb=Symbol.for("react.context"),bb=Symbol.for("react.forward_ref"),$b=Symbol.for("react.suspense"),Tb=Symbol.for("react.memo"),Nb=Symbol.for("react.lazy"),cy=Symbol.iterator;function Rb(t){return t===null||typeof t!="object"?null:(t=cy&&t[cy]||t["@@iterator"],typeof t=="function"?t:null)}var $_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T_=Object.assign,N_={};function ys(t,e,n){this.props=t,this.context=e,this.refs=N_,this.updater=n||$_}ys.prototype.isReactComponent={};ys.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};ys.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function R_(){}R_.prototype=ys.prototype;function Jg(t,e,n){this.props=t,this.context=e,this.refs=N_,this.updater=n||$_}var qg=Jg.prototype=new R_;qg.constructor=Jg;T_(qg,ys.prototype);qg.isPureReactComponent=!0;var dy=Array.isArray,O_=Object.prototype.hasOwnProperty,em={current:null},P_={key:!0,ref:!0,__self:!0,__source:!0};function A_(t,e,n){var r,i={},o=null,l=null;if(e!=null)for(r in e.ref!==void 0&&(l=e.ref),e.key!==void 0&&(o=""+e.key),e)O_.call(e,r)&&!P_.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];i.children=a}if(t&&t.defaultProps)for(r in s=t.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Nu,type:t,key:o,ref:l,props:i,_owner:em.current}}function Ob(t,e){return{$$typeof:Nu,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function tm(t){return typeof t=="object"&&t!==null&&t.$$typeof===Nu}function Pb(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var fy=/\/+/g;function nh(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Pb(""+t.key):e.toString(36)}function Tc(t,e,n,r,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var l=!1;if(t===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case Nu:case _b:l=!0}}if(l)return l=t,i=i(l),t=r===""?"."+nh(l,0):r,dy(i)?(n="",t!=null&&(n=t.replace(fy,"$&/")+"/"),Tc(i,e,n,"",function(u){return u})):i!=null&&(tm(i)&&(i=Ob(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(fy,"$&/")+"/")+t)),e.push(i)),1;if(l=0,r=r===""?".":r+":",dy(t))for(var s=0;s<t.length;s++){o=t[s];var a=r+nh(o,s);l+=Tc(o,e,n,a,i)}else if(a=Rb(t),typeof a=="function")for(t=a.call(t),s=0;!(o=t.next()).done;)o=o.value,a=r+nh(o,s++),l+=Tc(o,e,n,a,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return l}function Yu(t,e,n){if(t==null)return t;var r=[],i=0;return Tc(t,r,"","",function(o){return e.call(n,o,i++)}),r}function Ab(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var xn={current:null},Nc={transition:null},Mb={ReactCurrentDispatcher:xn,ReactCurrentBatchConfig:Nc,ReactCurrentOwner:em};Pe.Children={map:Yu,forEach:function(t,e,n){Yu(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Yu(t,function(){e++}),e},toArray:function(t){return Yu(t,function(e){return e})||[]},only:function(t){if(!tm(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Pe.Component=ys;Pe.Fragment=wb;Pe.Profiler=Eb;Pe.PureComponent=Jg;Pe.StrictMode=Sb;Pe.Suspense=$b;Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mb;Pe.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=T_({},t.props),i=t.key,o=t.ref,l=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,l=em.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(a in e)O_.call(e,a)&&!P_.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&s!==void 0?s[a]:e[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:Nu,type:t.type,key:i,ref:o,props:r,_owner:l}};Pe.createContext=function(t){return t={$$typeof:kb,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Cb,_context:t},t.Consumer=t};Pe.createElement=A_;Pe.createFactory=function(t){var e=A_.bind(null,t);return e.type=t,e};Pe.createRef=function(){return{current:null}};Pe.forwardRef=function(t){return{$$typeof:bb,render:t}};Pe.isValidElement=tm;Pe.lazy=function(t){return{$$typeof:Nb,_payload:{_status:-1,_result:t},_init:Ab}};Pe.memo=function(t,e){return{$$typeof:Tb,type:t,compare:e===void 0?null:e}};Pe.startTransition=function(t){var e=Nc.transition;Nc.transition={};try{t()}finally{Nc.transition=e}};Pe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Pe.useCallback=function(t,e){return xn.current.useCallback(t,e)};Pe.useContext=function(t){return xn.current.useContext(t)};Pe.useDebugValue=function(){};Pe.useDeferredValue=function(t){return xn.current.useDeferredValue(t)};Pe.useEffect=function(t,e){return xn.current.useEffect(t,e)};Pe.useId=function(){return xn.current.useId()};Pe.useImperativeHandle=function(t,e,n){return xn.current.useImperativeHandle(t,e,n)};Pe.useInsertionEffect=function(t,e){return xn.current.useInsertionEffect(t,e)};Pe.useLayoutEffect=function(t,e){return xn.current.useLayoutEffect(t,e)};Pe.useMemo=function(t,e){return xn.current.useMemo(t,e)};Pe.useReducer=function(t,e,n){return xn.current.useReducer(t,e,n)};Pe.useRef=function(t){return xn.current.useRef(t)};Pe.useState=function(t){return xn.current.useState(t)};Pe.useSyncExternalStore=function(t,e,n){return xn.current.useSyncExternalStore(t,e,n)};Pe.useTransition=function(){return xn.current.useTransition()};Pe.version="18.2.0";b_.exports=Pe;var p=b_.exports;const re=Tu(p),M_=k_({__proto__:null,default:re},[p]);var Xh={},L_={exports:{}},Vn={},I_={exports:{}},D_={};/**
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(t){function e(E,A){var N=E.length;E.push(A);e:for(;0<N;){var F=N-1>>>1,K=E[F];if(0<i(K,A))E[F]=A,E[N]=K,N=F;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var A=E[0],N=E.pop();if(N!==A){E[0]=N;e:for(var F=0,K=E.length,de=K>>>1;F<de;){var se=2*(F+1)-1,Ae=E[se],Ne=se+1,Q=E[Ne];if(0>i(Ae,N))Ne<K&&0>i(Q,Ae)?(E[F]=Q,E[Ne]=N,F=Ne):(E[F]=Ae,E[se]=N,F=se);else if(Ne<K&&0>i(Q,N))E[F]=Q,E[Ne]=N,F=Ne;else break e}}return A}function i(E,A){var N=E.sortIndex-A.sortIndex;return N!==0?N:E.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,d=null,f=3,h=!1,m=!1,g=!1,w=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 A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=E)r(u),A.sortIndex=A.expirationTime,e(a,A);else break;A=n(u)}}function S(E){if(g=!1,x(E),!m)if(n(a)!==null)m=!0,C(b);else{var A=n(u);A!==null&&k(S,A.startTime-E)}}function b(E,A){m=!1,g&&(g=!1,v(O),O=-1),h=!0;var N=f;try{for(x(A),d=n(a);d!==null&&(!(d.expirationTime>A)||E&&!D());){var F=d.callback;if(typeof F=="function"){d.callback=null,f=d.priorityLevel;var K=F(d.expirationTime<=A);A=t.unstable_now(),typeof K=="function"?d.callback=K:d===n(a)&&r(a),x(A)}else r(a);d=n(a)}if(d!==null)var de=!0;else{var se=n(u);se!==null&&k(S,se.startTime-A),de=!1}return de}finally{d=null,f=N,h=!1}}var T=!1,$=null,O=-1,L=5,P=-1;function D(){return!(t.unstable_now()-P<L)}function B(){if($!==null){var E=t.unstable_now();P=E;var A=!0;try{A=$(!0,E)}finally{A?oe():(T=!1,$=null)}}else T=!1}var oe;if(typeof y=="function")oe=function(){y(B)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,Z=H.port2;H.port1.onmessage=B,oe=function(){Z.postMessage(null)}}else oe=function(){w(B,0)};function C(E){$=E,T||(T=!0,oe())}function k(E,A){O=w(function(){E(t.unstable_now())},A)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(E){E.callback=null},t.unstable_continueExecution=function(){m||h||(m=!0,C(b))},t.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"):L=0<E?Math.floor(1e3/E):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(E){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var N=f;f=A;try{return E()}finally{f=N}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(E,A){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var N=f;f=E;try{return A()}finally{f=N}},t.unstable_scheduleCallback=function(E,A,N){var F=t.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?F+N:F):N=F,E){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=N+K,E={id:c++,callback:A,priorityLevel:E,startTime:N,expirationTime:K,sortIndex:-1},N>F?(E.sortIndex=N,e(u,E),n(a)===null&&E===n(u)&&(g?(v(O),O=-1):g=!0,k(S,N-F))):(E.sortIndex=K,e(a,E),m||h||(m=!0,C(b))),E},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(E){var A=f;return function(){var N=f;f=A;try{return E.apply(this,arguments)}finally{f=N}}}})(D_);I_.exports=D_;var Lb=I_.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 j_=p,Bn=Lb;function W(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var z_=new Set,Ia={};function el(t,e){es(t,e),es(t+"Capture",e)}function es(t,e){for(Ia[t]=e,t=0;t<e.length;t++)z_.add(e[t])}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qh=Object.prototype.hasOwnProperty,Ib=/^[: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]*$/,hy={},py={};function Db(t){return Qh.call(py,t)?!0:Qh.call(hy,t)?!1:Ib.test(t)?py[t]=!0:(hy[t]=!0,!1)}function jb(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function zb(t,e,n,r){if(e===null||typeof e>"u"||jb(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function _n(t,e,n,r,i,o,l){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=l}var Gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Gt[t]=new _n(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Gt[e]=new _n(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Gt[t]=new _n(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Gt[t]=new _n(t,2,!1,t,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(t){Gt[t]=new _n(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Gt[t]=new _n(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Gt[t]=new _n(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Gt[t]=new _n(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Gt[t]=new _n(t,5,!1,t.toLowerCase(),null,!1,!1)});var nm=/[\-:]([a-z])/g;function rm(t){return t[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(t){var e=t.replace(nm,rm);Gt[e]=new _n(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(nm,rm);Gt[e]=new _n(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(nm,rm);Gt[e]=new _n(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Gt[t]=new _n(t,1,!1,t.toLowerCase(),null,!1,!1)});Gt.xlinkHref=new _n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Gt[t]=new _n(t,1,!1,t.toLowerCase(),null,!0,!0)});function im(t,e,n,r){var i=Gt.hasOwnProperty(e)?Gt[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(zb(e,n,i,r)&&(n=null),r||i===null?Db(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var xi=j_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xu=Symbol.for("react.element"),bl=Symbol.for("react.portal"),$l=Symbol.for("react.fragment"),om=Symbol.for("react.strict_mode"),Jh=Symbol.for("react.profiler"),F_=Symbol.for("react.provider"),B_=Symbol.for("react.context"),lm=Symbol.for("react.forward_ref"),qh=Symbol.for("react.suspense"),ep=Symbol.for("react.suspense_list"),sm=Symbol.for("react.memo"),Ai=Symbol.for("react.lazy"),U_=Symbol.for("react.offscreen"),gy=Symbol.iterator;function Fs(t){return t===null||typeof t!="object"?null:(t=gy&&t[gy]||t["@@iterator"],typeof t=="function"?t:null)}var gt=Object.assign,rh;function oa(t){if(rh===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);rh=e&&e[1]||""}return`
26
- `+rh+t}var ih=!1;function oh(t,e){if(!t||ih)return"";ih=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
27
- `),o=r.stack.split(`
28
- `),l=i.length-1,s=o.length-1;1<=l&&0<=s&&i[l]!==o[s];)s--;for(;1<=l&&0<=s;l--,s--)if(i[l]!==o[s]){if(l!==1||s!==1)do if(l--,s--,0>s||i[l]!==o[s]){var a=`
29
- `+i[l].replace(" at new "," at ");return t.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",t.displayName)),a}while(1<=l&&0<=s);break}}}finally{ih=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?oa(t):""}function Fb(t){switch(t.tag){case 5:return oa(t.type);case 16:return oa("Lazy");case 13:return oa("Suspense");case 19:return oa("SuspenseList");case 0:case 2:case 15:return t=oh(t.type,!1),t;case 11:return t=oh(t.type.render,!1),t;case 1:return t=oh(t.type,!0),t;default:return""}}function tp(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case $l:return"Fragment";case bl:return"Portal";case Jh:return"Profiler";case om:return"StrictMode";case qh:return"Suspense";case ep:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case B_:return(t.displayName||"Context")+".Consumer";case F_:return(t._context.displayName||"Context")+".Provider";case lm:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case sm:return e=t.displayName||null,e!==null?e:tp(t.type)||"Memo";case Ai:e=t._payload,t=t._init;try{return tp(t(e))}catch{}}return null}function Bb(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tp(e);case 8:return e===om?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function to(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function W_(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ub(t){var e=W_(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Qu(t){t._valueTracker||(t._valueTracker=Ub(t))}function V_(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=W_(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Yc(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function np(t,e){var n=e.checked;return gt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function my(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=to(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function H_(t,e){e=e.checked,e!=null&&im(t,"checked",e,!1)}function rp(t,e){H_(t,e);var n=to(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ip(t,e.type,n):e.hasOwnProperty("defaultValue")&&ip(t,e.type,to(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function vy(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ip(t,e,n){(e!=="number"||Yc(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var la=Array.isArray;function Ul(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+to(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function op(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(W(91));return gt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function yy(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(W(92));if(la(n)){if(1<n.length)throw Error(W(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:to(n)}}function K_(t,e){var n=to(e.value),r=to(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function xy(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Z_(t){switch(t){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 lp(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Z_(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ju,G_=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ju=Ju||document.createElement("div"),Ju.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ju.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Da(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ha={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},Wb=["Webkit","ms","Moz","O"];Object.keys(ha).forEach(function(t){Wb.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ha[e]=ha[t]})});function Y_(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ha.hasOwnProperty(t)&&ha[t]?(""+e).trim():e+"px"}function X_(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Y_(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var Vb=gt({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 sp(t,e){if(e){if(Vb[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(W(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(W(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(W(61))}if(e.style!=null&&typeof e.style!="object")throw Error(W(62))}}function ap(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 up=null;function am(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var cp=null,Wl=null,Vl=null;function _y(t){if(t=Pu(t)){if(typeof cp!="function")throw Error(W(280));var e=t.stateNode;e&&(e=af(e),cp(t.stateNode,t.type,e))}}function Q_(t){Wl?Vl?Vl.push(t):Vl=[t]:Wl=t}function J_(){if(Wl){var t=Wl,e=Vl;if(Vl=Wl=null,_y(t),e)for(t=0;t<e.length;t++)_y(e[t])}}function q_(t,e){return t(e)}function e1(){}var lh=!1;function t1(t,e,n){if(lh)return t(e,n);lh=!0;try{return q_(t,e,n)}finally{lh=!1,(Wl!==null||Vl!==null)&&(e1(),J_())}}function ja(t,e){var n=t.stateNode;if(n===null)return null;var r=af(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(W(231,e,typeof n));return n}var dp=!1;if(di)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){dp=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{dp=!1}function Hb(t,e,n,r,i,o,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var pa=!1,Xc=null,Qc=!1,fp=null,Kb={onError:function(t){pa=!0,Xc=t}};function Zb(t,e,n,r,i,o,l,s,a){pa=!1,Xc=null,Hb.apply(Kb,arguments)}function Gb(t,e,n,r,i,o,l,s,a){if(Zb.apply(this,arguments),pa){if(pa){var u=Xc;pa=!1,Xc=null}else throw Error(W(198));Qc||(Qc=!0,fp=u)}}function tl(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function n1(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function wy(t){if(tl(t)!==t)throw Error(W(188))}function Yb(t){var e=t.alternate;if(!e){if(e=tl(t),e===null)throw Error(W(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return wy(i),t;if(o===r)return wy(i),e;o=o.sibling}throw Error(W(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,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){for(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)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?t:e}function r1(t){return t=Yb(t),t!==null?i1(t):null}function i1(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=i1(t);if(e!==null)return e;t=t.sibling}return null}var o1=Bn.unstable_scheduleCallback,Sy=Bn.unstable_cancelCallback,Xb=Bn.unstable_shouldYield,Qb=Bn.unstable_requestPaint,Ct=Bn.unstable_now,Jb=Bn.unstable_getCurrentPriorityLevel,um=Bn.unstable_ImmediatePriority,l1=Bn.unstable_UserBlockingPriority,Jc=Bn.unstable_NormalPriority,qb=Bn.unstable_LowPriority,s1=Bn.unstable_IdlePriority,rf=null,zr=null;function e$(t){if(zr&&typeof zr.onCommitFiberRoot=="function")try{zr.onCommitFiberRoot(rf,t,void 0,(t.current.flags&128)===128)}catch{}}var xr=Math.clz32?Math.clz32:r$,t$=Math.log,n$=Math.LN2;function r$(t){return t>>>=0,t===0?32:31-(t$(t)/n$|0)|0}var qu=64,ec=4194304;function sa(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function qc(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=sa(s):(o&=l,o!==0&&(r=sa(o)))}else l=n&~i,l!==0?r=sa(l):o!==0&&(r=sa(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-xr(e),i=1<<n,r|=t[n],e&=~i;return r}function i$(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 o$(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var l=31-xr(o),s=1<<l,a=i[l];a===-1?(!(s&n)||s&r)&&(i[l]=i$(s,e)):a<=e&&(t.expiredLanes|=s),o&=~s}}function hp(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function a1(){var t=qu;return qu<<=1,!(qu&4194240)&&(qu=64),t}function sh(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ru(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-xr(e),t[e]=n}function l$(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-xr(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}function cm(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-xr(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var We=0;function u1(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var c1,dm,d1,f1,h1,pp=!1,tc=[],Vi=null,Hi=null,Ki=null,za=new Map,Fa=new Map,Ii=[],s$="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 Ey(t,e){switch(t){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Hi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":za.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fa.delete(e.pointerId)}}function Us(t,e,n,r,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Pu(e),e!==null&&dm(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function a$(t,e,n,r,i){switch(e){case"focusin":return Vi=Us(Vi,t,e,n,r,i),!0;case"dragenter":return Hi=Us(Hi,t,e,n,r,i),!0;case"mouseover":return Ki=Us(Ki,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return za.set(o,Us(za.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Fa.set(o,Us(Fa.get(o)||null,t,e,n,r,i)),!0}return!1}function p1(t){var e=To(t.target);if(e!==null){var n=tl(e);if(n!==null){if(e=n.tag,e===13){if(e=n1(n),e!==null){t.blockedOn=e,h1(t.priority,function(){d1(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Rc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=gp(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);up=r,n.target.dispatchEvent(r),up=null}else return e=Pu(n),e!==null&&dm(e),t.blockedOn=n,!1;e.shift()}return!0}function Cy(t,e,n){Rc(t)&&n.delete(e)}function u$(){pp=!1,Vi!==null&&Rc(Vi)&&(Vi=null),Hi!==null&&Rc(Hi)&&(Hi=null),Ki!==null&&Rc(Ki)&&(Ki=null),za.forEach(Cy),Fa.forEach(Cy)}function Ws(t,e){t.blockedOn===e&&(t.blockedOn=null,pp||(pp=!0,Bn.unstable_scheduleCallback(Bn.unstable_NormalPriority,u$)))}function Ba(t){function e(i){return Ws(i,t)}if(0<tc.length){Ws(tc[0],t);for(var n=1;n<tc.length;n++){var r=tc[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Vi!==null&&Ws(Vi,t),Hi!==null&&Ws(Hi,t),Ki!==null&&Ws(Ki,t),za.forEach(e),Fa.forEach(e),n=0;n<Ii.length;n++)r=Ii[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Ii.length&&(n=Ii[0],n.blockedOn===null);)p1(n),n.blockedOn===null&&Ii.shift()}var Hl=xi.ReactCurrentBatchConfig,ed=!0;function c$(t,e,n,r){var i=We,o=Hl.transition;Hl.transition=null;try{We=1,fm(t,e,n,r)}finally{We=i,Hl.transition=o}}function d$(t,e,n,r){var i=We,o=Hl.transition;Hl.transition=null;try{We=4,fm(t,e,n,r)}finally{We=i,Hl.transition=o}}function fm(t,e,n,r){if(ed){var i=gp(t,e,n,r);if(i===null)vh(t,e,r,td,n),Ey(t,r);else if(a$(i,t,e,n,r))r.stopPropagation();else if(Ey(t,r),e&4&&-1<s$.indexOf(t)){for(;i!==null;){var o=Pu(i);if(o!==null&&c1(o),o=gp(t,e,n,r),o===null&&vh(t,e,r,td,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else vh(t,e,r,null,n)}}var td=null;function gp(t,e,n,r){if(td=null,t=am(r),t=To(t),t!==null)if(e=tl(t),e===null)t=null;else if(n=e.tag,n===13){if(t=n1(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return td=t,null}function g1(t){switch(t){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(Jb()){case um:return 1;case l1:return 4;case Jc:case qb:return 16;case s1:return 536870912;default:return 16}default:return 16}}var Fi=null,hm=null,Oc=null;function m1(){if(Oc)return Oc;var t,e=hm,n=e.length,r,i="value"in Fi?Fi.value:Fi.textContent,o=i.length;for(t=0;t<n&&e[t]===i[t];t++);var l=n-t;for(r=1;r<=l&&e[n-r]===i[o-r];r++);return Oc=i.slice(t,1<r?1-r:void 0)}function Pc(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function nc(){return!0}function ky(){return!1}function Hn(t){function e(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(n=t[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?nc:ky,this.isPropagationStopped=ky,this}return gt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=nc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=nc)},persist:function(){},isPersistent:nc}),e}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pm=Hn(xs),Ou=gt({},xs,{view:0,detail:0}),f$=Hn(Ou),ah,uh,Vs,of=gt({},Ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vs&&(Vs&&t.type==="mousemove"?(ah=t.screenX-Vs.screenX,uh=t.screenY-Vs.screenY):uh=ah=0,Vs=t),ah)},movementY:function(t){return"movementY"in t?t.movementY:uh}}),by=Hn(of),h$=gt({},of,{dataTransfer:0}),p$=Hn(h$),g$=gt({},Ou,{relatedTarget:0}),ch=Hn(g$),m$=gt({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),v$=Hn(m$),y$=gt({},xs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),x$=Hn(y$),_$=gt({},xs,{data:0}),$y=Hn(_$),w$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S$={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"},E$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C$(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=E$[t])?!!e[t]:!1}function gm(){return C$}var k$=gt({},Ou,{key:function(t){if(t.key){var e=w$[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Pc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?S$[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(t){return t.type==="keypress"?Pc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Pc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),b$=Hn(k$),$$=gt({},of,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ty=Hn($$),T$=gt({},Ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),N$=Hn(T$),R$=gt({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),O$=Hn(R$),P$=gt({},of,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),A$=Hn(P$),M$=[9,13,27,32],mm=di&&"CompositionEvent"in window,ga=null;di&&"documentMode"in document&&(ga=document.documentMode);var L$=di&&"TextEvent"in window&&!ga,v1=di&&(!mm||ga&&8<ga&&11>=ga),Ny=" ",Ry=!1;function y1(t,e){switch(t){case"keyup":return M$.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function x1(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Tl=!1;function I$(t,e){switch(t){case"compositionend":return x1(e);case"keypress":return e.which!==32?null:(Ry=!0,Ny);case"textInput":return t=e.data,t===Ny&&Ry?null:t;default:return null}}function D$(t,e){if(Tl)return t==="compositionend"||!mm&&y1(t,e)?(t=m1(),Oc=hm=Fi=null,Tl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return v1&&e.locale!=="ko"?null:e.data;default:return null}}var j$={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 Oy(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!j$[t.type]:e==="textarea"}function _1(t,e,n,r){Q_(r),e=nd(e,"onChange"),0<e.length&&(n=new pm("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var ma=null,Ua=null;function z$(t){O1(t,0)}function lf(t){var e=Ol(t);if(V_(e))return t}function F$(t,e){if(t==="change")return e}var w1=!1;if(di){var dh;if(di){var fh="oninput"in document;if(!fh){var Py=document.createElement("div");Py.setAttribute("oninput","return;"),fh=typeof Py.oninput=="function"}dh=fh}else dh=!1;w1=dh&&(!document.documentMode||9<document.documentMode)}function Ay(){ma&&(ma.detachEvent("onpropertychange",S1),Ua=ma=null)}function S1(t){if(t.propertyName==="value"&&lf(Ua)){var e=[];_1(e,Ua,t,am(t)),t1(z$,e)}}function B$(t,e,n){t==="focusin"?(Ay(),ma=e,Ua=n,ma.attachEvent("onpropertychange",S1)):t==="focusout"&&Ay()}function U$(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return lf(Ua)}function W$(t,e){if(t==="click")return lf(e)}function V$(t,e){if(t==="input"||t==="change")return lf(e)}function H$(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Er=typeof Object.is=="function"?Object.is:H$;function Wa(t,e){if(Er(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Qh.call(e,i)||!Er(t[i],e[i]))return!1}return!0}function My(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ly(t,e){var n=My(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=My(n)}}function E1(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?E1(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function C1(){for(var t=window,e=Yc();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Yc(t.document)}return e}function vm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function K$(t){var e=C1(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&E1(n.ownerDocument.documentElement,n)){if(r!==null&&vm(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=Ly(n,o);var l=Ly(n,r);i&&l&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(l.node,l.offset)):(e.setEnd(l.node,l.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Z$=di&&"documentMode"in document&&11>=document.documentMode,Nl=null,mp=null,va=null,vp=!1;function Iy(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vp||Nl==null||Nl!==Yc(r)||(r=Nl,"selectionStart"in r&&vm(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}),va&&Wa(va,r)||(va=r,r=nd(mp,"onSelect"),0<r.length&&(e=new pm("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Nl)))}function rc(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Rl={animationend:rc("Animation","AnimationEnd"),animationiteration:rc("Animation","AnimationIteration"),animationstart:rc("Animation","AnimationStart"),transitionend:rc("Transition","TransitionEnd")},hh={},k1={};di&&(k1=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function sf(t){if(hh[t])return hh[t];if(!Rl[t])return t;var e=Rl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in k1)return hh[t]=e[n];return t}var b1=sf("animationend"),$1=sf("animationiteration"),T1=sf("animationstart"),N1=sf("transitionend"),R1=new Map,Dy="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 go(t,e){R1.set(t,e),el(e,[t])}for(var ph=0;ph<Dy.length;ph++){var gh=Dy[ph],G$=gh.toLowerCase(),Y$=gh[0].toUpperCase()+gh.slice(1);go(G$,"on"+Y$)}go(b1,"onAnimationEnd");go($1,"onAnimationIteration");go(T1,"onAnimationStart");go("dblclick","onDoubleClick");go("focusin","onFocus");go("focusout","onBlur");go(N1,"onTransitionEnd");es("onMouseEnter",["mouseout","mouseover"]);es("onMouseLeave",["mouseout","mouseover"]);es("onPointerEnter",["pointerout","pointerover"]);es("onPointerLeave",["pointerout","pointerover"]);el("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));el("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));el("onBeforeInput",["compositionend","keypress","textInput","paste"]);el("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));el("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));el("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var aa="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(" "),X$=new Set("cancel close invalid load scroll toggle".split(" ").concat(aa));function jy(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,Gb(r,e,void 0,t),t.currentTarget=null}function O1(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var o=void 0;if(e)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==o&&i.isPropagationStopped())break e;jy(i,s,u),o=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==o&&i.isPropagationStopped())break e;jy(i,s,u),o=a}}}if(Qc)throw t=fp,Qc=!1,fp=null,t}function et(t,e){var n=e[Sp];n===void 0&&(n=e[Sp]=new Set);var r=t+"__bubble";n.has(r)||(P1(e,t,2,!1),n.add(r))}function mh(t,e,n){var r=0;e&&(r|=4),P1(n,t,r,e)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Va(t){if(!t[ic]){t[ic]=!0,z_.forEach(function(n){n!=="selectionchange"&&(X$.has(n)||mh(n,!1,t),mh(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ic]||(e[ic]=!0,mh("selectionchange",!1,e))}}function P1(t,e,n,r){switch(g1(e)){case 1:var i=c$;break;case 4:i=d$;break;default:i=fm}n=i.bind(null,e,n,t),i=void 0,!dp||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function vh(t,e,n,r,i){var o=r;if(!(e&1)&&!(e&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===i||s.nodeType===8&&s.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;l=l.return}for(;s!==null;){if(l=To(s),l===null)return;if(a=l.tag,a===5||a===6){r=o=l;continue e}s=s.parentNode}}r=r.return}t1(function(){var u=o,c=am(n),d=[];e:{var f=R1.get(t);if(f!==void 0){var h=pm,m=t;switch(t){case"keypress":if(Pc(n)===0)break e;case"keydown":case"keyup":h=b$;break;case"focusin":m="focus",h=ch;break;case"focusout":m="blur",h=ch;break;case"beforeblur":case"afterblur":h=ch;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=by;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=p$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=N$;break;case b1:case $1:case T1:h=v$;break;case N1:h=O$;break;case"scroll":h=f$;break;case"wheel":h=A$;break;case"copy":case"cut":case"paste":h=x$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ty}var g=(e&4)!==0,w=!g&&t==="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=ja(y,v),S!=null&&g.push(Ha(y,S,x)))),w)break;y=y.return}0<g.length&&(f=new h(f,m,null,n,c),d.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==up&&(m=n.relatedTarget||n.fromElement)&&(To(m)||m[fi]))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?To(m):null,m!==null&&(w=tl(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(g=by,S="onMouseLeave",v="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(g=Ty,S="onPointerLeave",v="onPointerEnter",y="pointer"),w=h==null?f:Ol(h),x=m==null?f:Ol(m),f=new g(S,y+"leave",h,n,c),f.target=w,f.relatedTarget=x,S=null,To(c)===u&&(g=new g(v,y+"enter",m,n,c),g.target=x,g.relatedTarget=w,S=g),w=S,h&&m)t:{for(g=h,v=m,y=0,x=g;x;x=pl(x))y++;for(x=0,S=v;S;S=pl(S))x++;for(;0<y-x;)g=pl(g),y--;for(;0<x-y;)v=pl(v),x--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=pl(g),v=pl(v)}g=null}else g=null;h!==null&&zy(d,f,h,g,!1),m!==null&&w!==null&&zy(d,w,m,g,!0)}}e:{if(f=u?Ol(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var b=F$;else if(Oy(f))if(w1)b=V$;else{b=U$;var T=B$}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(b=W$);if(b&&(b=b(t,u))){_1(d,b,n,c);break e}T&&T(t,f,u),t==="focusout"&&(T=f._wrapperState)&&T.controlled&&f.type==="number"&&ip(f,"number",f.value)}switch(T=u?Ol(u):window,t){case"focusin":(Oy(T)||T.contentEditable==="true")&&(Nl=T,mp=u,va=null);break;case"focusout":va=mp=Nl=null;break;case"mousedown":vp=!0;break;case"contextmenu":case"mouseup":case"dragend":vp=!1,Iy(d,n,c);break;case"selectionchange":if(Z$)break;case"keydown":case"keyup":Iy(d,n,c)}var $;if(mm)e:{switch(t){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Tl?y1(t,n)&&(O="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(v1&&n.locale!=="ko"&&(Tl||O!=="onCompositionStart"?O==="onCompositionEnd"&&Tl&&($=m1()):(Fi=c,hm="value"in Fi?Fi.value:Fi.textContent,Tl=!0)),T=nd(u,O),0<T.length&&(O=new $y(O,t,null,n,c),d.push({event:O,listeners:T}),$?O.data=$:($=x1(n),$!==null&&(O.data=$)))),($=L$?I$(t,n):D$(t,n))&&(u=nd(u,"onBeforeInput"),0<u.length&&(c=new $y("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=$))}O1(d,e)})}function Ha(t,e,n){return{instance:t,listener:e,currentTarget:n}}function nd(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=ja(t,n),o!=null&&r.unshift(Ha(t,o,i)),o=ja(t,e),o!=null&&r.push(Ha(t,o,i))),t=t.return}return r}function pl(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function zy(t,e,n,r,i){for(var o=e._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,i?(a=ja(n,o),a!=null&&l.unshift(Ha(n,a,s))):i||(a=ja(n,o),a!=null&&l.push(Ha(n,a,s)))),n=n.return}l.length!==0&&t.push({event:e,listeners:l})}var Q$=/\r\n?/g,J$=/\u0000|\uFFFD/g;function Fy(t){return(typeof t=="string"?t:""+t).replace(Q$,`
30
- `).replace(J$,"")}function oc(t,e,n){if(e=Fy(e),Fy(t)!==e&&n)throw Error(W(425))}function rd(){}var yp=null,xp=null;function _p(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var wp=typeof setTimeout=="function"?setTimeout:void 0,q$=typeof clearTimeout=="function"?clearTimeout:void 0,By=typeof Promise=="function"?Promise:void 0,eT=typeof queueMicrotask=="function"?queueMicrotask:typeof By<"u"?function(t){return By.resolve(null).then(t).catch(tT)}:wp;function tT(t){setTimeout(function(){throw t})}function yh(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),Ba(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ba(e)}function Zi(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Uy(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var _s=Math.random().toString(36).slice(2),Mr="__reactFiber$"+_s,Ka="__reactProps$"+_s,fi="__reactContainer$"+_s,Sp="__reactEvents$"+_s,nT="__reactListeners$"+_s,rT="__reactHandles$"+_s;function To(t){var e=t[Mr];if(e)return e;for(var n=t.parentNode;n;){if(e=n[fi]||n[Mr]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Uy(t);t!==null;){if(n=t[Mr])return n;t=Uy(t)}return e}t=n,n=t.parentNode}return null}function Pu(t){return t=t[Mr]||t[fi],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ol(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(W(33))}function af(t){return t[Ka]||null}var Ep=[],Pl=-1;function mo(t){return{current:t}}function it(t){0>Pl||(t.current=Ep[Pl],Ep[Pl]=null,Pl--)}function Xe(t,e){Pl++,Ep[Pl]=t.current,t.current=e}var no={},rn=mo(no),$n=mo(!1),Fo=no;function ts(t,e){var n=t.type.contextTypes;if(!n)return no;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Tn(t){return t=t.childContextTypes,t!=null}function id(){it($n),it(rn)}function Wy(t,e,n){if(rn.current!==no)throw Error(W(168));Xe(rn,e),Xe($n,n)}function A1(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(W(108,Bb(t)||"Unknown",i));return gt({},n,r)}function od(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||no,Fo=rn.current,Xe(rn,t),Xe($n,$n.current),!0}function Vy(t,e,n){var r=t.stateNode;if(!r)throw Error(W(169));n?(t=A1(t,e,Fo),r.__reactInternalMemoizedMergedChildContext=t,it($n),it(rn),Xe(rn,t)):it($n),Xe($n,n)}var ii=null,uf=!1,xh=!1;function M1(t){ii===null?ii=[t]:ii.push(t)}function iT(t){uf=!0,M1(t)}function vo(){if(!xh&&ii!==null){xh=!0;var t=0,e=We;try{var n=ii;for(We=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}ii=null,uf=!1}catch(i){throw ii!==null&&(ii=ii.slice(t+1)),o1(um,vo),i}finally{We=e,xh=!1}}return null}var Al=[],Ml=0,ld=null,sd=0,Yn=[],Xn=0,Bo=null,si=1,ai="";function Co(t,e){Al[Ml++]=sd,Al[Ml++]=ld,ld=t,sd=e}function L1(t,e,n){Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Bo,Bo=t;var r=si;t=ai;var i=32-xr(r)-1;r&=~(1<<i),n+=1;var o=32-xr(e)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,si=1<<32-xr(e)+i|n<<i|r,ai=o+t}else si=1<<o|n<<i|r,ai=t}function ym(t){t.return!==null&&(Co(t,1),L1(t,1,0))}function xm(t){for(;t===ld;)ld=Al[--Ml],Al[Ml]=null,sd=Al[--Ml],Al[Ml]=null;for(;t===Bo;)Bo=Yn[--Xn],Yn[Xn]=null,ai=Yn[--Xn],Yn[Xn]=null,si=Yn[--Xn],Yn[Xn]=null}var Dn=null,In=null,ot=!1,gr=null;function I1(t,e){var n=qn(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Hy(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Dn=t,In=Zi(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Dn=t,In=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Bo!==null?{id:si,overflow:ai}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=qn(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Dn=t,In=null,!0):!1;default:return!1}}function Cp(t){return(t.mode&1)!==0&&(t.flags&128)===0}function kp(t){if(ot){var e=In;if(e){var n=e;if(!Hy(t,e)){if(Cp(t))throw Error(W(418));e=Zi(n.nextSibling);var r=Dn;e&&Hy(t,e)?I1(r,n):(t.flags=t.flags&-4097|2,ot=!1,Dn=t)}}else{if(Cp(t))throw Error(W(418));t.flags=t.flags&-4097|2,ot=!1,Dn=t}}}function Ky(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Dn=t}function lc(t){if(t!==Dn)return!1;if(!ot)return Ky(t),ot=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!_p(t.type,t.memoizedProps)),e&&(e=In)){if(Cp(t))throw D1(),Error(W(418));for(;e;)I1(t,e),e=Zi(e.nextSibling)}if(Ky(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(W(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){In=Zi(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}In=null}}else In=Dn?Zi(t.stateNode.nextSibling):null;return!0}function D1(){for(var t=In;t;)t=Zi(t.nextSibling)}function ns(){In=Dn=null,ot=!1}function _m(t){gr===null?gr=[t]:gr.push(t)}var oT=xi.ReactCurrentBatchConfig;function fr(t,e){if(t&&t.defaultProps){e=gt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}var ad=mo(null),ud=null,Ll=null,wm=null;function Sm(){wm=Ll=ud=null}function Em(t){var e=ad.current;it(ad),t._currentValue=e}function bp(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Kl(t,e){ud=t,wm=Ll=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(bn=!0),t.firstContext=null)}function nr(t){var e=t._currentValue;if(wm!==t)if(t={context:t,memoizedValue:e,next:null},Ll===null){if(ud===null)throw Error(W(308));Ll=t,ud.dependencies={lanes:0,firstContext:t}}else Ll=Ll.next=t;return e}var No=null;function Cm(t){No===null?No=[t]:No.push(t)}function j1(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Cm(e)):(n.next=i.next,i.next=n),e.interleaved=n,hi(t,r)}function hi(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Mi=!1;function km(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z1(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ui(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Gi(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Le&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,hi(t,n)}return i=r.interleaved,i===null?(e.next=e,Cm(r)):(e.next=i.next,i.next=e),r.interleaved=e,hi(t,n)}function Ac(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cm(t,n)}}function Zy(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=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};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function cd(t,e,n,r){var i=t.updateQueue;Mi=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?o=u:l.next=u,l=a;var c=t.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(o!==null){var d=i.baseState;l=0,c=u=a=null,s=o;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=t,g=s;switch(f=e,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=gt({},d,f);break e;case 2:Mi=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.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=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do l|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);Wo|=l,t.lanes=l,t.memoizedState=d}}function Gy(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(W(191,i));i.call(r)}}}var F1=new j_.Component().refs;function $p(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:gt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var cf={isMounted:function(t){return(t=t._reactInternals)?tl(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=vn(),i=Xi(t),o=ui(r,i);o.payload=e,n!=null&&(o.callback=n),e=Gi(t,o,i),e!==null&&(_r(e,t,i,r),Ac(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=vn(),i=Xi(t),o=ui(r,i);o.tag=1,o.payload=e,n!=null&&(o.callback=n),e=Gi(t,o,i),e!==null&&(_r(e,t,i,r),Ac(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=vn(),r=Xi(t),i=ui(n,r);i.tag=2,e!=null&&(i.callback=e),e=Gi(t,i,r),e!==null&&(_r(e,t,r,n),Ac(e,t,r))}};function Yy(t,e,n,r,i,o,l){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,o,l):e.prototype&&e.prototype.isPureReactComponent?!Wa(n,r)||!Wa(i,o):!0}function B1(t,e,n){var r=!1,i=no,o=e.contextType;return typeof o=="object"&&o!==null?o=nr(o):(i=Tn(e)?Fo:rn.current,r=e.contextTypes,o=(r=r!=null)?ts(t,i):no),e=new e(n,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=cf,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function Xy(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&cf.enqueueReplaceState(e,e.state,null)}function Tp(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=F1,km(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=nr(o):(o=Tn(e)?Fo:rn.current,i.context=ts(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&($p(t,e,o,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&cf.enqueueReplaceState(i,i.state,null),cd(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Hs(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,t));var i=r,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(l){var s=i.refs;s===F1&&(s=i.refs={}),l===null?delete s[o]:s[o]=l},e._stringRef=o,e)}if(typeof t!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,t))}return t}function sc(t,e){throw t=Object.prototype.toString.call(e),Error(W(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Qy(t){var e=t._init;return e(t._payload)}function U1(t){function e(v,y){if(t){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function n(v,y){if(!t)return null;for(;y!==null;)e(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 i(v,y){return v=Qi(v,y),v.index=0,v.sibling=null,v}function o(v,y,x){return v.index=x,t?(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 t&&v.alternate===null&&(v.flags|=2),v}function s(v,y,x,S){return y===null||y.tag!==6?(y=bh(x,v.mode,S),y.return=v,y):(y=i(y,x),y.return=v,y)}function a(v,y,x,S){var b=x.type;return b===$l?c(v,y,x.props.children,S,x.key):y!==null&&(y.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ai&&Qy(b)===y.type)?(S=i(y,x.props),S.ref=Hs(v,y,x),S.return=v,S):(S=zc(x.type,x.key,x.props,null,v.mode,S),S.ref=Hs(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=$h(x,v.mode,S),y.return=v,y):(y=i(y,x.children||[]),y.return=v,y)}function c(v,y,x,S,b){return y===null||y.tag!==7?(y=Mo(x,v.mode,S,b),y.return=v,y):(y=i(y,x),y.return=v,y)}function d(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=bh(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xu:return x=zc(y.type,y.key,y.props,null,v.mode,x),x.ref=Hs(v,null,y),x.return=v,x;case bl:return y=$h(y,v.mode,x),y.return=v,y;case Ai:var S=y._init;return d(v,S(y._payload),x)}if(la(y)||Fs(y))return y=Mo(y,v.mode,x,null),y.return=v,y;sc(v,y)}return null}function f(v,y,x,S){var b=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return b!==null?null:s(v,y,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Xu:return x.key===b?a(v,y,x,S):null;case bl:return x.key===b?u(v,y,x,S):null;case Ai:return b=x._init,f(v,y,b(x._payload),S)}if(la(x)||Fs(x))return b!==null?null:c(v,y,x,S,null);sc(v,x)}return null}function h(v,y,x,S,b){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(x)||null,s(y,v,""+S,b);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Xu:return v=v.get(S.key===null?x:S.key)||null,a(y,v,S,b);case bl:return v=v.get(S.key===null?x:S.key)||null,u(y,v,S,b);case Ai:var T=S._init;return h(v,y,x,T(S._payload),b)}if(la(S)||Fs(S))return v=v.get(x)||null,c(y,v,S,b,null);sc(y,S)}return null}function m(v,y,x,S){for(var b=null,T=null,$=y,O=y=0,L=null;$!==null&&O<x.length;O++){$.index>O?(L=$,$=null):L=$.sibling;var P=f(v,$,x[O],S);if(P===null){$===null&&($=L);break}t&&$&&P.alternate===null&&e(v,$),y=o(P,y,O),T===null?b=P:T.sibling=P,T=P,$=L}if(O===x.length)return n(v,$),ot&&Co(v,O),b;if($===null){for(;O<x.length;O++)$=d(v,x[O],S),$!==null&&(y=o($,y,O),T===null?b=$:T.sibling=$,T=$);return ot&&Co(v,O),b}for($=r(v,$);O<x.length;O++)L=h($,v,O,x[O],S),L!==null&&(t&&L.alternate!==null&&$.delete(L.key===null?O:L.key),y=o(L,y,O),T===null?b=L:T.sibling=L,T=L);return t&&$.forEach(function(D){return e(v,D)}),ot&&Co(v,O),b}function g(v,y,x,S){var b=Fs(x);if(typeof b!="function")throw Error(W(150));if(x=b.call(x),x==null)throw Error(W(151));for(var T=b=null,$=y,O=y=0,L=null,P=x.next();$!==null&&!P.done;O++,P=x.next()){$.index>O?(L=$,$=null):L=$.sibling;var D=f(v,$,P.value,S);if(D===null){$===null&&($=L);break}t&&$&&D.alternate===null&&e(v,$),y=o(D,y,O),T===null?b=D:T.sibling=D,T=D,$=L}if(P.done)return n(v,$),ot&&Co(v,O),b;if($===null){for(;!P.done;O++,P=x.next())P=d(v,P.value,S),P!==null&&(y=o(P,y,O),T===null?b=P:T.sibling=P,T=P);return ot&&Co(v,O),b}for($=r(v,$);!P.done;O++,P=x.next())P=h($,v,O,P.value,S),P!==null&&(t&&P.alternate!==null&&$.delete(P.key===null?O:P.key),y=o(P,y,O),T===null?b=P:T.sibling=P,T=P);return t&&$.forEach(function(B){return e(v,B)}),ot&&Co(v,O),b}function w(v,y,x,S){if(typeof x=="object"&&x!==null&&x.type===$l&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Xu:e:{for(var b=x.key,T=y;T!==null;){if(T.key===b){if(b=x.type,b===$l){if(T.tag===7){n(v,T.sibling),y=i(T,x.props.children),y.return=v,v=y;break e}}else if(T.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ai&&Qy(b)===T.type){n(v,T.sibling),y=i(T,x.props),y.ref=Hs(v,T,x),y.return=v,v=y;break e}n(v,T);break}else e(v,T);T=T.sibling}x.type===$l?(y=Mo(x.props.children,v.mode,S,x.key),y.return=v,v=y):(S=zc(x.type,x.key,x.props,null,v.mode,S),S.ref=Hs(v,y,x),S.return=v,v=S)}return l(v);case bl: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=i(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else e(v,y);y=y.sibling}y=$h(x,v.mode,S),y.return=v,v=y}return l(v);case Ai:return T=x._init,w(v,y,T(x._payload),S)}if(la(x))return m(v,y,x,S);if(Fs(x))return g(v,y,x,S);sc(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=i(y,x),y.return=v,v=y):(n(v,y),y=bh(x,v.mode,S),y.return=v,v=y),l(v)):n(v,y)}return w}var rs=U1(!0),W1=U1(!1),Au={},Fr=mo(Au),Za=mo(Au),Ga=mo(Au);function Ro(t){if(t===Au)throw Error(W(174));return t}function bm(t,e){switch(Xe(Ga,e),Xe(Za,t),Xe(Fr,Au),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:lp(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=lp(e,t)}it(Fr),Xe(Fr,e)}function is(){it(Fr),it(Za),it(Ga)}function V1(t){Ro(Ga.current);var e=Ro(Fr.current),n=lp(e,t.type);e!==n&&(Xe(Za,t),Xe(Fr,n))}function $m(t){Za.current===t&&(it(Fr),it(Za))}var dt=mo(0);function dd(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _h=[];function Tm(){for(var t=0;t<_h.length;t++)_h[t]._workInProgressVersionPrimary=null;_h.length=0}var Mc=xi.ReactCurrentDispatcher,wh=xi.ReactCurrentBatchConfig,Uo=0,ht=null,Rt=null,It=null,fd=!1,ya=!1,Ya=0,lT=0;function Yt(){throw Error(W(321))}function Nm(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Er(t[n],e[n]))return!1;return!0}function Rm(t,e,n,r,i,o){if(Uo=o,ht=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Mc.current=t===null||t.memoizedState===null?cT:dT,t=n(r,i),ya){o=0;do{if(ya=!1,Ya=0,25<=o)throw Error(W(301));o+=1,It=Rt=null,e.updateQueue=null,Mc.current=fT,t=n(r,i)}while(ya)}if(Mc.current=hd,e=Rt!==null&&Rt.next!==null,Uo=0,It=Rt=ht=null,fd=!1,e)throw Error(W(300));return t}function Om(){var t=Ya!==0;return Ya=0,t}function Pr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?ht.memoizedState=It=t:It=It.next=t,It}function rr(){if(Rt===null){var t=ht.alternate;t=t!==null?t.memoizedState:null}else t=Rt.next;var e=It===null?ht.memoizedState:It.next;if(e!==null)It=e,Rt=t;else{if(t===null)throw Error(W(310));Rt=t,t={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},It===null?ht.memoizedState=It=t:It=It.next=t}return It}function Xa(t,e){return typeof e=="function"?e(t):e}function Sh(t){var e=rr(),n=e.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=t;var r=Rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=l=null,a=null,u=o;do{var c=u.lane;if((Uo&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:t(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,ht.lanes|=c,Wo|=c}u=u.next}while(u!==null&&u!==o);a===null?l=r:a.next=s,Er(r,e.memoizedState)||(bn=!0),e.memoizedState=r,e.baseState=l,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do o=i.lane,ht.lanes|=o,Wo|=o,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Eh(t){var e=rr(),n=e.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=t(o,l.action),l=l.next;while(l!==i);Er(o,e.memoizedState)||(bn=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function H1(){}function K1(t,e){var n=ht,r=rr(),i=e(),o=!Er(r.memoizedState,i);if(o&&(r.memoizedState=i,bn=!0),r=r.queue,Pm(Y1.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||It!==null&&It.memoizedState.tag&1){if(n.flags|=2048,Qa(9,G1.bind(null,n,r,i,e),void 0,null),Bt===null)throw Error(W(349));Uo&30||Z1(n,e,i)}return i}function Z1(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ht.updateQueue,e===null?(e={lastEffect:null,stores:null},ht.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function G1(t,e,n,r){e.value=n,e.getSnapshot=r,X1(e)&&Q1(t)}function Y1(t,e,n){return n(function(){X1(e)&&Q1(t)})}function X1(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Er(t,n)}catch{return!0}}function Q1(t){var e=hi(t,1);e!==null&&_r(e,t,1,-1)}function Jy(t){var e=Pr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xa,lastRenderedState:t},e.queue=t,t=t.dispatch=uT.bind(null,ht,t),[e.memoizedState,t]}function Qa(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=ht.updateQueue,e===null?(e={lastEffect:null,stores:null},ht.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function J1(){return rr().memoizedState}function Lc(t,e,n,r){var i=Pr();ht.flags|=t,i.memoizedState=Qa(1|e,n,void 0,r===void 0?null:r)}function df(t,e,n,r){var i=rr();r=r===void 0?null:r;var o=void 0;if(Rt!==null){var l=Rt.memoizedState;if(o=l.destroy,r!==null&&Nm(r,l.deps)){i.memoizedState=Qa(e,n,o,r);return}}ht.flags|=t,i.memoizedState=Qa(1|e,n,o,r)}function qy(t,e){return Lc(8390656,8,t,e)}function Pm(t,e){return df(2048,8,t,e)}function q1(t,e){return df(4,2,t,e)}function ew(t,e){return df(4,4,t,e)}function tw(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function nw(t,e,n){return n=n!=null?n.concat([t]):null,df(4,4,tw.bind(null,e,t),n)}function Am(){}function rw(t,e){var n=rr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nm(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function iw(t,e){var n=rr();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&Nm(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ow(t,e,n){return Uo&21?(Er(n,e)||(n=a1(),ht.lanes|=n,Wo|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,bn=!0),t.memoizedState=n)}function sT(t,e){var n=We;We=n!==0&&4>n?n:4,t(!0);var r=wh.transition;wh.transition={};try{t(!1),e()}finally{We=n,wh.transition=r}}function lw(){return rr().memoizedState}function aT(t,e,n){var r=Xi(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sw(t))aw(e,n);else if(n=j1(t,e,n,r),n!==null){var i=vn();_r(n,t,r,i),uw(n,e,r)}}function uT(t,e,n){var r=Xi(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sw(t))aw(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var l=e.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,Er(s,l)){var a=e.interleaved;a===null?(i.next=i,Cm(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=j1(t,e,i,r),n!==null&&(i=vn(),_r(n,t,r,i),uw(n,e,r))}}function sw(t){var e=t.alternate;return t===ht||e!==null&&e===ht}function aw(t,e){ya=fd=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function uw(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,cm(t,n)}}var hd={readContext:nr,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},cT={readContext:nr,useCallback:function(t,e){return Pr().memoizedState=[t,e===void 0?null:e],t},useContext:nr,useEffect:qy,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Lc(4194308,4,tw.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Lc(4194308,4,t,e)},useInsertionEffect:function(t,e){return Lc(4,2,t,e)},useMemo:function(t,e){var n=Pr();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Pr();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=aT.bind(null,ht,t),[r.memoizedState,t]},useRef:function(t){var e=Pr();return t={current:t},e.memoizedState=t},useState:Jy,useDebugValue:Am,useDeferredValue:function(t){return Pr().memoizedState=t},useTransition:function(){var t=Jy(!1),e=t[0];return t=sT.bind(null,t[1]),Pr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=ht,i=Pr();if(ot){if(n===void 0)throw Error(W(407));n=n()}else{if(n=e(),Bt===null)throw Error(W(349));Uo&30||Z1(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,qy(Y1.bind(null,r,o,t),[t]),r.flags|=2048,Qa(9,G1.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Pr(),e=Bt.identifierPrefix;if(ot){var n=ai,r=si;n=(r&~(1<<32-xr(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Ya++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=lT++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},dT={readContext:nr,useCallback:rw,useContext:nr,useEffect:Pm,useImperativeHandle:nw,useInsertionEffect:q1,useLayoutEffect:ew,useMemo:iw,useReducer:Sh,useRef:J1,useState:function(){return Sh(Xa)},useDebugValue:Am,useDeferredValue:function(t){var e=rr();return ow(e,Rt.memoizedState,t)},useTransition:function(){var t=Sh(Xa)[0],e=rr().memoizedState;return[t,e]},useMutableSource:H1,useSyncExternalStore:K1,useId:lw,unstable_isNewReconciler:!1},fT={readContext:nr,useCallback:rw,useContext:nr,useEffect:Pm,useImperativeHandle:nw,useInsertionEffect:q1,useLayoutEffect:ew,useMemo:iw,useReducer:Eh,useRef:J1,useState:function(){return Eh(Xa)},useDebugValue:Am,useDeferredValue:function(t){var e=rr();return Rt===null?e.memoizedState=t:ow(e,Rt.memoizedState,t)},useTransition:function(){var t=Eh(Xa)[0],e=rr().memoizedState;return[t,e]},useMutableSource:H1,useSyncExternalStore:K1,useId:lw,unstable_isNewReconciler:!1};function os(t,e){try{var n="",r=e;do n+=Fb(r),r=r.return;while(r);var i=n}catch(o){i=`
31
- Error generating stack: `+o.message+`
32
- `+o.stack}return{value:t,source:e,stack:i,digest:null}}function Ch(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Np(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var hT=typeof WeakMap=="function"?WeakMap:Map;function cw(t,e,n){n=ui(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){gd||(gd=!0,zp=r),Np(t,e)},n}function dw(t,e,n){n=ui(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Np(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Np(t,e),typeof r!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var l=e.stack;this.componentDidCatch(e.value,{componentStack:l!==null?l:""})}),n}function e0(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new hT;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=$T.bind(null,t,e,n),e.then(t,t))}function t0(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function n0(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=ui(-1,1),e.tag=2,Gi(n,e,1))),n.lanes|=1),t)}var pT=xi.ReactCurrentOwner,bn=!1;function un(t,e,n,r){e.child=t===null?W1(e,null,n,r):rs(e,t.child,n,r)}function r0(t,e,n,r,i){n=n.render;var o=e.ref;return Kl(e,i),r=Rm(t,e,n,r,o,i),n=Om(),t!==null&&!bn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pi(t,e,i)):(ot&&n&&ym(e),e.flags|=1,un(t,e,r,i),e.child)}function i0(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!Bm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,fw(t,e,o,r,i)):(t=zc(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Wa,n(l,r)&&t.ref===e.ref)return pi(t,e,i)}return e.flags|=1,t=Qi(o,r),t.ref=e.ref,t.return=e,e.child=t}function fw(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(Wa(o,r)&&t.ref===e.ref)if(bn=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(bn=!0);else return e.lanes=t.lanes,pi(t,e,i)}return Rp(t,e,n,r,i)}function hw(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xe(Dl,An),An|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Xe(Dl,An),An|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Xe(Dl,An),An|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Xe(Dl,An),An|=r;return un(t,e,i,n),e.child}function pw(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Rp(t,e,n,r,i){var o=Tn(n)?Fo:rn.current;return o=ts(e,o),Kl(e,i),n=Rm(t,e,n,r,o,i),r=Om(),t!==null&&!bn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,pi(t,e,i)):(ot&&r&&ym(e),e.flags|=1,un(t,e,n,i),e.child)}function o0(t,e,n,r,i){if(Tn(n)){var o=!0;od(e)}else o=!1;if(Kl(e,i),e.stateNode===null)Ic(t,e),B1(e,n,r),Tp(e,n,r,i),r=!0;else if(t===null){var l=e.stateNode,s=e.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=nr(u):(u=Tn(n)?Fo:rn.current,u=ts(e,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)&&Xy(e,l,r,u),Mi=!1;var f=e.memoizedState;l.state=f,cd(e,r,l,i),a=e.memoizedState,s!==r||f!==a||$n.current||Mi?(typeof c=="function"&&($p(e,n,c,r),a=e.memoizedState),(s=Mi||Yy(e,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"&&(e.flags|=4194308)):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{l=e.stateNode,z1(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:fr(e.type,s),l.props=u,d=e.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=nr(a):(a=Tn(n)?Fo:rn.current,a=ts(e,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)&&Xy(e,l,r,a),Mi=!1,f=e.memoizedState,l.state=f,cd(e,r,l,i);var m=e.memoizedState;s!==d||f!==m||$n.current||Mi?(typeof h=="function"&&($p(e,n,h,r),m=e.memoizedState),(u=Mi||Yy(e,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"&&(e.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=m),l.props=r,l.state=m,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return Op(t,e,n,r,o,i)}function Op(t,e,n,r,i,o){pw(t,e);var l=(e.flags&128)!==0;if(!r&&!l)return i&&Vy(e,n,!1),pi(t,e,o);r=e.stateNode,pT.current=e;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&l?(e.child=rs(e,t.child,null,o),e.child=rs(e,null,s,o)):un(t,e,s,o),e.memoizedState=r.state,i&&Vy(e,n,!0),e.child}function gw(t){var e=t.stateNode;e.pendingContext?Wy(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Wy(t,e.context,!1),bm(t,e.containerInfo)}function l0(t,e,n,r,i){return ns(),_m(i),e.flags|=256,un(t,e,n,r),e.child}var Pp={dehydrated:null,treeContext:null,retryLane:0};function Ap(t){return{baseLanes:t,cachePool:null,transitions:null}}function mw(t,e,n){var r=e.pendingProps,i=dt.current,o=!1,l=(e.flags&128)!==0,s;if((s=l)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Xe(dt,i&1),t===null)return kp(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(l=r.children,t=r.fallback,o?(r=e.mode,o=e.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=pf(l,r,0,null),t=Mo(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=Ap(n),e.memoizedState=Pp,t):Mm(e,l));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return gT(t,e,l,r,s,i,n);if(o){o=r.fallback,l=e.mode,i=t.child,s=i.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=Qi(i,a),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qi(s,o):(o=Mo(o,l,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,l=t.child.memoizedState,l=l===null?Ap(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=t.childLanes&~n,e.memoizedState=Pp,r}return o=t.child,t=o.sibling,r=Qi(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Mm(t,e){return e=pf({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function ac(t,e,n,r){return r!==null&&_m(r),rs(e,t.child,null,n),t=Mm(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function gT(t,e,n,r,i,o,l){if(n)return e.flags&256?(e.flags&=-257,r=Ch(Error(W(422))),ac(t,e,l,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=pf({mode:"visible",children:r.children},i,0,null),o=Mo(o,i,l,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&rs(e,t.child,null,l),e.child.memoizedState=Ap(l),e.memoizedState=Pp,o);if(!(e.mode&1))return ac(t,e,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(W(419)),r=Ch(o,r,void 0),ac(t,e,l,r)}if(s=(l&t.childLanes)!==0,bn||s){if(r=Bt,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,hi(t,i),_r(r,t,i,-1))}return Fm(),r=Ch(Error(W(421))),ac(t,e,l,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=TT.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,In=Zi(i.nextSibling),Dn=e,ot=!0,gr=null,t!==null&&(Yn[Xn++]=si,Yn[Xn++]=ai,Yn[Xn++]=Bo,si=t.id,ai=t.overflow,Bo=e),e=Mm(e,r.children),e.flags|=4096,e)}function s0(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),bp(t.return,e,n)}function kh(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function vw(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(un(t,e,r.children,n),r=dt.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&s0(t,n,e);else if(t.tag===19)s0(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Xe(dt,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&dd(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),kh(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&dd(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}kh(e,!0,n,null,o);break;case"together":kh(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ic(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function pi(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Wo|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(W(153));if(e.child!==null){for(t=e.child,n=Qi(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Qi(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function mT(t,e,n){switch(e.tag){case 3:gw(e),ns();break;case 5:V1(e);break;case 1:Tn(e.type)&&od(e);break;case 4:bm(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Xe(ad,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Xe(dt,dt.current&1),e.flags|=128,null):n&e.child.childLanes?mw(t,e,n):(Xe(dt,dt.current&1),t=pi(t,e,n),t!==null?t.sibling:null);Xe(dt,dt.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return vw(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xe(dt,dt.current),r)break;return null;case 22:case 23:return e.lanes=0,hw(t,e,n)}return pi(t,e,n)}var yw,Mp,xw,_w;yw=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mp=function(){};xw=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Ro(Fr.current);var o=null;switch(n){case"input":i=np(t,i),r=np(t,r),o=[];break;case"select":i=gt({},i,{value:void 0}),r=gt({},r,{value:void 0}),o=[];break;case"textarea":i=op(t,i),r=op(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=rd)}sp(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ia.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var a=r[u];if(s=i!=null?i[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||(o||(o=[]),o.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(o=o||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ia.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&et("scroll",t),o||s===a||(o=[])):(o=o||[]).push(u,a))}n&&(o=o||[]).push("style",n);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};_w=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ks(t,e){if(!ot)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Xt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function vT(t,e,n){var r=e.pendingProps;switch(xm(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(e),null;case 1:return Tn(e.type)&&id(),Xt(e),null;case 3:return r=e.stateNode,is(),it($n),it(rn),Tm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(lc(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,gr!==null&&(Up(gr),gr=null))),Mp(t,e),Xt(e),null;case 5:$m(e);var i=Ro(Ga.current);if(n=e.type,t!==null&&e.stateNode!=null)xw(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(W(166));return Xt(e),null}if(t=Ro(Fr.current),lc(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[Mr]=e,r[Ka]=o,t=(e.mode&1)!==0,n){case"dialog":et("cancel",r),et("close",r);break;case"iframe":case"object":case"embed":et("load",r);break;case"video":case"audio":for(i=0;i<aa.length;i++)et(aa[i],r);break;case"source":et("error",r);break;case"img":case"image":case"link":et("error",r),et("load",r);break;case"details":et("toggle",r);break;case"input":my(r,o),et("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},et("invalid",r);break;case"textarea":yy(r,o),et("invalid",r)}sp(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var s=o[l];l==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,t),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&oc(r.textContent,s,t),i=["children",""+s]):Ia.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&et("scroll",r)}switch(n){case"input":Qu(r),vy(r,o,!0);break;case"textarea":Qu(r),xy(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=rd)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Z_(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=l.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=l.createElement(n,{is:r.is}):(t=l.createElement(n),n==="select"&&(l=t,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):t=l.createElementNS(t,n),t[Mr]=e,t[Ka]=r,yw(t,e,!1,!1),e.stateNode=t;e:{switch(l=ap(n,r),n){case"dialog":et("cancel",t),et("close",t),i=r;break;case"iframe":case"object":case"embed":et("load",t),i=r;break;case"video":case"audio":for(i=0;i<aa.length;i++)et(aa[i],t);i=r;break;case"source":et("error",t),i=r;break;case"img":case"image":case"link":et("error",t),et("load",t),i=r;break;case"details":et("toggle",t),i=r;break;case"input":my(t,r),i=np(t,r),et("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=gt({},r,{value:void 0}),et("invalid",t);break;case"textarea":yy(t,r),i=op(t,r),et("invalid",t);break;default:i=r}sp(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="style"?X_(t,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&G_(t,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Da(t,a):typeof a=="number"&&Da(t,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ia.hasOwnProperty(o)?a!=null&&o==="onScroll"&&et("scroll",t):a!=null&&im(t,o,a,l))}switch(n){case"input":Qu(t),vy(t,r,!1);break;case"textarea":Qu(t),xy(t);break;case"option":r.value!=null&&t.setAttribute("value",""+to(r.value));break;case"select":t.multiple=!!r.multiple,o=r.value,o!=null?Ul(t,!!r.multiple,o,!1):r.defaultValue!=null&&Ul(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=rd)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Xt(e),null;case 6:if(t&&e.stateNode!=null)_w(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(W(166));if(n=Ro(Ga.current),Ro(Fr.current),lc(e)){if(r=e.stateNode,n=e.memoizedProps,r[Mr]=e,(o=r.nodeValue!==n)&&(t=Dn,t!==null))switch(t.tag){case 3:oc(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&oc(r.nodeValue,n,(t.mode&1)!==0)}o&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Mr]=e,e.stateNode=r}return Xt(e),null;case 13:if(it(dt),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ot&&In!==null&&e.mode&1&&!(e.flags&128))D1(),ns(),e.flags|=98560,o=!1;else if(o=lc(e),r!==null&&r.dehydrated!==null){if(t===null){if(!o)throw Error(W(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(W(317));o[Mr]=e}else ns(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Xt(e),o=!1}else gr!==null&&(Up(gr),gr=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||dt.current&1?Pt===0&&(Pt=3):Fm())),e.updateQueue!==null&&(e.flags|=4),Xt(e),null);case 4:return is(),Mp(t,e),t===null&&Va(e.stateNode.containerInfo),Xt(e),null;case 10:return Em(e.type._context),Xt(e),null;case 17:return Tn(e.type)&&id(),Xt(e),null;case 19:if(it(dt),o=e.memoizedState,o===null)return Xt(e),null;if(r=(e.flags&128)!==0,l=o.rendering,l===null)if(r)Ks(o,!1);else{if(Pt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(l=dd(t),l!==null){for(e.flags|=128,Ks(o,!1),r=l.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)o=n,t=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,t=l.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return Xe(dt,dt.current&1|2),e.child}t=t.sibling}o.tail!==null&&Ct()>ls&&(e.flags|=128,r=!0,Ks(o,!1),e.lanes=4194304)}else{if(!r)if(t=dd(l),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ks(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!ot)return Xt(e),null}else 2*Ct()-o.renderingStartTime>ls&&n!==1073741824&&(e.flags|=128,r=!0,Ks(o,!1),e.lanes=4194304);o.isBackwards?(l.sibling=e.child,e.child=l):(n=o.last,n!==null?n.sibling=l:e.child=l,o.last=l)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Ct(),e.sibling=null,n=dt.current,Xe(dt,r?n&1|2:n&1),e):(Xt(e),null);case 22:case 23:return zm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?An&1073741824&&(Xt(e),e.subtreeFlags&6&&(e.flags|=8192)):Xt(e),null;case 24:return null;case 25:return null}throw Error(W(156,e.tag))}function yT(t,e){switch(xm(e),e.tag){case 1:return Tn(e.type)&&id(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return is(),it($n),it(rn),Tm(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return $m(e),null;case 13:if(it(dt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(W(340));ns()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return it(dt),null;case 4:return is(),null;case 10:return Em(e.type._context),null;case 22:case 23:return zm(),null;case 24:return null;default:return null}}var uc=!1,Jt=!1,xT=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Il(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){vt(t,e,r)}else n.current=null}function Lp(t,e,n){try{n()}catch(r){vt(t,e,r)}}var a0=!1;function _T(t,e){if(yp=ed,t=C1(),vm(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(s=l+i),d!==o||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===t)break t;if(f===n&&++u===i&&(s=l),f===o&&++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(xp={focusedElem:t,selectionRange:n},ed=!1,ne=e;ne!==null;)if(e=ne,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ne=t;else for(;ne!==null;){e=ne;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,w=m.memoizedState,v=e.stateNode,y=v.getSnapshotBeforeUpdate(e.elementType===e.type?g:fr(e.type,g),w);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=e.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(W(163))}}catch(S){vt(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,ne=t;break}ne=e.return}return m=a0,a0=!1,m}function xa(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&Lp(e,n,o)}i=i.next}while(i!==r)}}function ff(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Ip(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function ww(t){var e=t.alternate;e!==null&&(t.alternate=null,ww(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Mr],delete e[Ka],delete e[Sp],delete e[nT],delete e[rT])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Sw(t){return t.tag===5||t.tag===3||t.tag===4}function u0(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Sw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Dp(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=rd));else if(r!==4&&(t=t.child,t!==null))for(Dp(t,e,n),t=t.sibling;t!==null;)Dp(t,e,n),t=t.sibling}function jp(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(jp(t,e,n),t=t.sibling;t!==null;)jp(t,e,n),t=t.sibling}var Ht=null,hr=!1;function bi(t,e,n){for(n=n.child;n!==null;)Ew(t,e,n),n=n.sibling}function Ew(t,e,n){if(zr&&typeof zr.onCommitFiberUnmount=="function")try{zr.onCommitFiberUnmount(rf,n)}catch{}switch(n.tag){case 5:Jt||Il(n,e);case 6:var r=Ht,i=hr;Ht=null,bi(t,e,n),Ht=r,hr=i,Ht!==null&&(hr?(t=Ht,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ht.removeChild(n.stateNode));break;case 18:Ht!==null&&(hr?(t=Ht,n=n.stateNode,t.nodeType===8?yh(t.parentNode,n):t.nodeType===1&&yh(t,n),Ba(t)):yh(Ht,n.stateNode));break;case 4:r=Ht,i=hr,Ht=n.stateNode.containerInfo,hr=!0,bi(t,e,n),Ht=r,hr=i;break;case 0:case 11:case 14:case 15:if(!Jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Lp(n,e,l),i=i.next}while(i!==r)}bi(t,e,n);break;case 1:if(!Jt&&(Il(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){vt(n,e,s)}bi(t,e,n);break;case 21:bi(t,e,n);break;case 22:n.mode&1?(Jt=(r=Jt)||n.memoizedState!==null,bi(t,e,n),Jt=r):bi(t,e,n);break;default:bi(t,e,n)}}function c0(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new xT),e.forEach(function(r){var i=NT.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ar(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,l=e,s=l;e:for(;s!==null;){switch(s.tag){case 5:Ht=s.stateNode,hr=!1;break e;case 3:Ht=s.stateNode.containerInfo,hr=!0;break e;case 4:Ht=s.stateNode.containerInfo,hr=!0;break e}s=s.return}if(Ht===null)throw Error(W(160));Ew(o,l,i),Ht=null,hr=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){vt(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Cw(e,t),e=e.sibling}function Cw(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(ar(e,t),Or(t),r&4){try{xa(3,t,t.return),ff(3,t)}catch(g){vt(t,t.return,g)}try{xa(5,t,t.return)}catch(g){vt(t,t.return,g)}}break;case 1:ar(e,t),Or(t),r&512&&n!==null&&Il(n,n.return);break;case 5:if(ar(e,t),Or(t),r&512&&n!==null&&Il(n,n.return),t.flags&32){var i=t.stateNode;try{Da(i,"")}catch(g){vt(t,t.return,g)}}if(r&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,l=n!==null?n.memoizedProps:o,s=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&H_(i,o),ap(s,l);var u=ap(s,o);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?X_(i,d):c==="dangerouslySetInnerHTML"?G_(i,d):c==="children"?Da(i,d):im(i,c,d,u)}switch(s){case"input":rp(i,o);break;case"textarea":K_(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Ul(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Ul(i,!!o.multiple,o.defaultValue,!0):Ul(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ka]=o}catch(g){vt(t,t.return,g)}}break;case 6:if(ar(e,t),Or(t),r&4){if(t.stateNode===null)throw Error(W(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(g){vt(t,t.return,g)}}break;case 3:if(ar(e,t),Or(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ba(e.containerInfo)}catch(g){vt(t,t.return,g)}break;case 4:ar(e,t),Or(t);break;case 13:ar(e,t),Or(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(Dm=Ct())),r&4&&c0(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Jt=(u=Jt)||c,ar(e,t),Jt=u):ar(e,t),Or(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(ne=t,c=t.child;c!==null;){for(d=ne=c;ne!==null;){switch(f=ne,h=f.child,f.tag){case 0:case 11:case 14:case 15:xa(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{e=r,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(g){vt(r,n,g)}}break;case 5:Il(f,f.return);break;case 22:if(f.memoizedState!==null){f0(d);continue}}h!==null?(h.return=f,ne=h):f0(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=Y_("display",l))}catch(g){vt(t,t.return,g)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){vt(t,t.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ar(e,t),Or(t),r&4&&c0(t);break;case 21:break;default:ar(e,t),Or(t)}}function Or(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Sw(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Da(i,""),r.flags&=-33);var o=u0(t);jp(t,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,s=u0(t);Dp(t,s,l);break;default:throw Error(W(161))}}catch(a){vt(t,t.return,a)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function wT(t,e,n){ne=t,kw(t)}function kw(t,e,n){for(var r=(t.mode&1)!==0;ne!==null;){var i=ne,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||uc;if(!l){var s=i.alternate,a=s!==null&&s.memoizedState!==null||Jt;s=uc;var u=Jt;if(uc=l,(Jt=a)&&!u)for(ne=i;ne!==null;)l=ne,a=l.child,l.tag===22&&l.memoizedState!==null?h0(i):a!==null?(a.return=l,ne=a):h0(i);for(;o!==null;)ne=o,kw(o),o=o.sibling;ne=i,uc=s,Jt=u}d0(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,ne=o):d0(t)}}function d0(t){for(;ne!==null;){var e=ne;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Jt||ff(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Jt)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:fr(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&Gy(e,o,r);break;case 3:var l=e.updateQueue;if(l!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}Gy(e,l,n)}break;case 5:var s=e.stateNode;if(n===null&&e.flags&4){n=s;var a=e.memoizedProps;switch(e.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(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ba(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Jt||e.flags&512&&Ip(e)}catch(f){vt(e,e.return,f)}}if(e===t){ne=null;break}if(n=e.sibling,n!==null){n.return=e.return,ne=n;break}ne=e.return}}function f0(t){for(;ne!==null;){var e=ne;if(e===t){ne=null;break}var n=e.sibling;if(n!==null){n.return=e.return,ne=n;break}ne=e.return}}function h0(t){for(;ne!==null;){var e=ne;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ff(4,e)}catch(a){vt(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(a){vt(e,i,a)}}var o=e.return;try{Ip(e)}catch(a){vt(e,o,a)}break;case 5:var l=e.return;try{Ip(e)}catch(a){vt(e,l,a)}}}catch(a){vt(e,e.return,a)}if(e===t){ne=null;break}var s=e.sibling;if(s!==null){s.return=e.return,ne=s;break}ne=e.return}}var ST=Math.ceil,pd=xi.ReactCurrentDispatcher,Lm=xi.ReactCurrentOwner,tr=xi.ReactCurrentBatchConfig,Le=0,Bt=null,bt=null,Zt=0,An=0,Dl=mo(0),Pt=0,Ja=null,Wo=0,hf=0,Im=0,_a=null,kn=null,Dm=0,ls=1/0,ti=null,gd=!1,zp=null,Yi=null,cc=!1,Bi=null,md=0,wa=0,Fp=null,Dc=-1,jc=0;function vn(){return Le&6?Ct():Dc!==-1?Dc:Dc=Ct()}function Xi(t){return t.mode&1?Le&2&&Zt!==0?Zt&-Zt:oT.transition!==null?(jc===0&&(jc=a1()),jc):(t=We,t!==0||(t=window.event,t=t===void 0?16:g1(t.type)),t):1}function _r(t,e,n,r){if(50<wa)throw wa=0,Fp=null,Error(W(185));Ru(t,n,r),(!(Le&2)||t!==Bt)&&(t===Bt&&(!(Le&2)&&(hf|=n),Pt===4&&Di(t,Zt)),Nn(t,r),n===1&&Le===0&&!(e.mode&1)&&(ls=Ct()+500,uf&&vo()))}function Nn(t,e){var n=t.callbackNode;o$(t,e);var r=qc(t,t===Bt?Zt:0);if(r===0)n!==null&&Sy(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Sy(n),e===1)t.tag===0?iT(p0.bind(null,t)):M1(p0.bind(null,t)),eT(function(){!(Le&6)&&vo()}),n=null;else{switch(u1(r)){case 1:n=um;break;case 4:n=l1;break;case 16:n=Jc;break;case 536870912:n=s1;break;default:n=Jc}n=Aw(n,bw.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function bw(t,e){if(Dc=-1,jc=0,Le&6)throw Error(W(327));var n=t.callbackNode;if(Zl()&&t.callbackNode!==n)return null;var r=qc(t,t===Bt?Zt:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=vd(t,r);else{e=r;var i=Le;Le|=2;var o=Tw();(Bt!==t||Zt!==e)&&(ti=null,ls=Ct()+500,Ao(t,e));do try{kT();break}catch(s){$w(t,s)}while(!0);Sm(),pd.current=o,Le=i,bt!==null?e=0:(Bt=null,Zt=0,e=Pt)}if(e!==0){if(e===2&&(i=hp(t),i!==0&&(r=i,e=Bp(t,i))),e===1)throw n=Ja,Ao(t,0),Di(t,r),Nn(t,Ct()),n;if(e===6)Di(t,r);else{if(i=t.current.alternate,!(r&30)&&!ET(i)&&(e=vd(t,r),e===2&&(o=hp(t),o!==0&&(r=o,e=Bp(t,o))),e===1))throw n=Ja,Ao(t,0),Di(t,r),Nn(t,Ct()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(W(345));case 2:ko(t,kn,ti);break;case 3:if(Di(t,r),(r&130023424)===r&&(e=Dm+500-Ct(),10<e)){if(qc(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){vn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=wp(ko.bind(null,t,kn,ti),e);break}ko(t,kn,ti);break;case 4:if(Di(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var l=31-xr(r);o=1<<l,l=e[l],l>i&&(i=l),r&=~o}if(r=i,r=Ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ST(r/1960))-r,10<r){t.timeoutHandle=wp(ko.bind(null,t,kn,ti),r);break}ko(t,kn,ti);break;case 5:ko(t,kn,ti);break;default:throw Error(W(329))}}}return Nn(t,Ct()),t.callbackNode===n?bw.bind(null,t):null}function Bp(t,e){var n=_a;return t.current.memoizedState.isDehydrated&&(Ao(t,e).flags|=256),t=vd(t,e),t!==2&&(e=kn,kn=n,e!==null&&Up(e)),t}function Up(t){kn===null?kn=t:kn.push.apply(kn,t)}function ET(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Er(o(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Di(t,e){for(e&=~Im,e&=~hf,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-xr(e),r=1<<n;t[n]=-1,e&=~r}}function p0(t){if(Le&6)throw Error(W(327));Zl();var e=qc(t,0);if(!(e&1))return Nn(t,Ct()),null;var n=vd(t,e);if(t.tag!==0&&n===2){var r=hp(t);r!==0&&(e=r,n=Bp(t,r))}if(n===1)throw n=Ja,Ao(t,0),Di(t,e),Nn(t,Ct()),n;if(n===6)throw Error(W(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ko(t,kn,ti),Nn(t,Ct()),null}function jm(t,e){var n=Le;Le|=1;try{return t(e)}finally{Le=n,Le===0&&(ls=Ct()+500,uf&&vo())}}function Vo(t){Bi!==null&&Bi.tag===0&&!(Le&6)&&Zl();var e=Le;Le|=1;var n=tr.transition,r=We;try{if(tr.transition=null,We=1,t)return t()}finally{We=r,tr.transition=n,Le=e,!(Le&6)&&vo()}}function zm(){An=Dl.current,it(Dl)}function Ao(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,q$(n)),bt!==null)for(n=bt.return;n!==null;){var r=n;switch(xm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&id();break;case 3:is(),it($n),it(rn),Tm();break;case 5:$m(r);break;case 4:is();break;case 13:it(dt);break;case 19:it(dt);break;case 10:Em(r.type._context);break;case 22:case 23:zm()}n=n.return}if(Bt=t,bt=t=Qi(t.current,null),Zt=An=e,Pt=0,Ja=null,Im=hf=Wo=0,kn=_a=null,No!==null){for(e=0;e<No.length;e++)if(n=No[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}No=null}return t}function $w(t,e){do{var n=bt;try{if(Sm(),Mc.current=hd,fd){for(var r=ht.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fd=!1}if(Uo=0,It=Rt=ht=null,ya=!1,Ya=0,Lm.current=null,n===null||n.return===null){Pt=1,Ja=e,bt=null;break}e:{var o=t,l=n.return,s=n,a=e;if(e=Zt,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=t0(l);if(h!==null){h.flags&=-257,n0(h,l,s,o,e),h.mode&1&&e0(o,u,e),e=h,a=u;var m=e.updateQueue;if(m===null){var g=new Set;g.add(a),e.updateQueue=g}else m.add(a);break e}else{if(!(e&1)){e0(o,u,e),Fm();break e}a=Error(W(426))}}else if(ot&&s.mode&1){var w=t0(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),n0(w,l,s,o,e),_m(os(a,s));break e}}o=a=os(a,s),Pt!==4&&(Pt=2),_a===null?_a=[o]:_a.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var v=cw(o,a,e);Zy(o,v);break e;case 1:s=a;var y=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Yi===null||!Yi.has(x)))){o.flags|=65536,e&=-e,o.lanes|=e;var S=dw(o,s,e);Zy(o,S);break e}}o=o.return}while(o!==null)}Rw(n)}catch(b){e=b,bt===n&&n!==null&&(bt=n=n.return);continue}break}while(!0)}function Tw(){var t=pd.current;return pd.current=hd,t===null?hd:t}function Fm(){(Pt===0||Pt===3||Pt===2)&&(Pt=4),Bt===null||!(Wo&268435455)&&!(hf&268435455)||Di(Bt,Zt)}function vd(t,e){var n=Le;Le|=2;var r=Tw();(Bt!==t||Zt!==e)&&(ti=null,Ao(t,e));do try{CT();break}catch(i){$w(t,i)}while(!0);if(Sm(),Le=n,pd.current=r,bt!==null)throw Error(W(261));return Bt=null,Zt=0,Pt}function CT(){for(;bt!==null;)Nw(bt)}function kT(){for(;bt!==null&&!Xb();)Nw(bt)}function Nw(t){var e=Pw(t.alternate,t,An);t.memoizedProps=t.pendingProps,e===null?Rw(t):bt=e,Lm.current=null}function Rw(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=yT(n,e),n!==null){n.flags&=32767,bt=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Pt=6,bt=null;return}}else if(n=vT(n,e,An),n!==null){bt=n;return}if(e=e.sibling,e!==null){bt=e;return}bt=e=t}while(e!==null);Pt===0&&(Pt=5)}function ko(t,e,n){var r=We,i=tr.transition;try{tr.transition=null,We=1,bT(t,e,n,r)}finally{tr.transition=i,We=r}return null}function bT(t,e,n,r){do Zl();while(Bi!==null);if(Le&6)throw Error(W(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(W(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(l$(t,o),t===Bt&&(bt=Bt=null,Zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||cc||(cc=!0,Aw(Jc,function(){return Zl(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=tr.transition,tr.transition=null;var l=We;We=1;var s=Le;Le|=4,Lm.current=null,_T(t,n),Cw(n,t),K$(xp),ed=!!yp,xp=yp=null,t.current=n,wT(n),Qb(),Le=s,We=l,tr.transition=o}else t.current=n;if(cc&&(cc=!1,Bi=t,md=i),o=t.pendingLanes,o===0&&(Yi=null),e$(n.stateNode),Nn(t,Ct()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(gd)throw gd=!1,t=zp,zp=null,t;return md&1&&t.tag!==0&&Zl(),o=t.pendingLanes,o&1?t===Fp?wa++:(wa=0,Fp=t):wa=0,vo(),null}function Zl(){if(Bi!==null){var t=u1(md),e=tr.transition,n=We;try{if(tr.transition=null,We=16>t?16:t,Bi===null)var r=!1;else{if(t=Bi,Bi=null,md=0,Le&6)throw Error(W(331));var i=Le;for(Le|=4,ne=t.current;ne!==null;){var o=ne,l=o.child;if(ne.flags&16){var s=o.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(ne=u;ne!==null;){var c=ne;switch(c.tag){case 0:case 11:case 15:xa(8,c,o)}var d=c.child;if(d!==null)d.return=c,ne=d;else for(;ne!==null;){c=ne;var f=c.sibling,h=c.return;if(ww(c),c===u){ne=null;break}if(f!==null){f.return=h,ne=f;break}ne=h}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}ne=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,ne=l;else e:for(;ne!==null;){if(o=ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xa(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,ne=v;break e}ne=o.return}}var y=t.current;for(ne=y;ne!==null;){l=ne;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,ne=x;else e:for(l=y;ne!==null;){if(s=ne,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:ff(9,s)}}catch(b){vt(s,s.return,b)}if(s===l){ne=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,ne=S;break e}ne=s.return}}if(Le=i,vo(),zr&&typeof zr.onPostCommitFiberRoot=="function")try{zr.onPostCommitFiberRoot(rf,t)}catch{}r=!0}return r}finally{We=n,tr.transition=e}}return!1}function g0(t,e,n){e=os(n,e),e=cw(t,e,1),t=Gi(t,e,1),e=vn(),t!==null&&(Ru(t,1,e),Nn(t,e))}function vt(t,e,n){if(t.tag===3)g0(t,t,n);else for(;e!==null;){if(e.tag===3){g0(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yi===null||!Yi.has(r))){t=os(n,t),t=dw(e,t,1),e=Gi(e,t,1),t=vn(),e!==null&&(Ru(e,1,t),Nn(e,t));break}}e=e.return}}function $T(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=vn(),t.pingedLanes|=t.suspendedLanes&n,Bt===t&&(Zt&n)===n&&(Pt===4||Pt===3&&(Zt&130023424)===Zt&&500>Ct()-Dm?Ao(t,0):Im|=n),Nn(t,e)}function Ow(t,e){e===0&&(t.mode&1?(e=ec,ec<<=1,!(ec&130023424)&&(ec=4194304)):e=1);var n=vn();t=hi(t,e),t!==null&&(Ru(t,e,n),Nn(t,n))}function TT(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Ow(t,n)}function NT(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(e),Ow(t,n)}var Pw;Pw=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||$n.current)bn=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return bn=!1,mT(t,e,n);bn=!!(t.flags&131072)}else bn=!1,ot&&e.flags&1048576&&L1(e,sd,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Ic(t,e),t=e.pendingProps;var i=ts(e,rn.current);Kl(e,n),i=Rm(null,e,r,t,i,n);var o=Om();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Tn(r)?(o=!0,od(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,km(e),i.updater=cf,e.stateNode=i,i._reactInternals=e,Tp(e,r,t,n),e=Op(null,e,r,!0,o,n)):(e.tag=0,ot&&o&&ym(e),un(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Ic(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=OT(r),t=fr(r,t),i){case 0:e=Rp(null,e,r,t,n);break e;case 1:e=o0(null,e,r,t,n);break e;case 11:e=r0(null,e,r,t,n);break e;case 14:e=i0(null,e,r,fr(r.type,t),n);break e}throw Error(W(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:fr(r,i),Rp(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:fr(r,i),o0(t,e,r,i,n);case 3:e:{if(gw(e),t===null)throw Error(W(387));r=e.pendingProps,o=e.memoizedState,i=o.element,z1(t,e),cd(e,r,null,n);var l=e.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=os(Error(W(423)),e),e=l0(t,e,r,n,i);break e}else if(r!==i){i=os(Error(W(424)),e),e=l0(t,e,r,n,i);break e}else for(In=Zi(e.stateNode.containerInfo.firstChild),Dn=e,ot=!0,gr=null,n=W1(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ns(),r===i){e=pi(t,e,n);break e}un(t,e,r,n)}e=e.child}return e;case 5:return V1(e),t===null&&kp(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,l=i.children,_p(r,i)?l=null:o!==null&&_p(r,o)&&(e.flags|=32),pw(t,e),un(t,e,l,n),e.child;case 6:return t===null&&kp(e),null;case 13:return mw(t,e,n);case 4:return bm(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=rs(e,null,r,n):un(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:fr(r,i),r0(t,e,r,i,n);case 7:return un(t,e,e.pendingProps,n),e.child;case 8:return un(t,e,e.pendingProps.children,n),e.child;case 12:return un(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,l=i.value,Xe(ad,r._currentValue),r._currentValue=l,o!==null)if(Er(o.value,l)){if(o.children===i.children&&!$n.current){e=pi(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=ui(-1,n&-n),a.tag=2;var u=o.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}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),bp(o.return,n,e),s.lanes|=n;break}a=a.next}}else if(o.tag===10)l=o.type===e.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(W(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),bp(l,n,e),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===e){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}un(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Kl(e,n),i=nr(i),r=r(i),e.flags|=1,un(t,e,r,n),e.child;case 14:return r=e.type,i=fr(r,e.pendingProps),i=fr(r.type,i),i0(t,e,r,i,n);case 15:return fw(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:fr(r,i),Ic(t,e),e.tag=1,Tn(r)?(t=!0,od(e)):t=!1,Kl(e,n),B1(e,r,i),Tp(e,r,i,n),Op(null,e,r,!0,t,n);case 19:return vw(t,e,n);case 22:return hw(t,e,n)}throw Error(W(156,e.tag))};function Aw(t,e){return o1(t,e)}function RT(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 qn(t,e,n,r){return new RT(t,e,n,r)}function Bm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function OT(t){if(typeof t=="function")return Bm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===lm)return 11;if(t===sm)return 14}return 2}function Qi(t,e){var n=t.alternate;return n===null?(n=qn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function zc(t,e,n,r,i,o){var l=2;if(r=t,typeof t=="function")Bm(t)&&(l=1);else if(typeof t=="string")l=5;else e:switch(t){case $l:return Mo(n.children,i,o,e);case om:l=8,i|=8;break;case Jh:return t=qn(12,n,e,i|2),t.elementType=Jh,t.lanes=o,t;case qh:return t=qn(13,n,e,i),t.elementType=qh,t.lanes=o,t;case ep:return t=qn(19,n,e,i),t.elementType=ep,t.lanes=o,t;case U_:return pf(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case F_:l=10;break e;case B_:l=9;break e;case lm:l=11;break e;case sm:l=14;break e;case Ai:l=16,r=null;break e}throw Error(W(130,t==null?t:typeof t,""))}return e=qn(l,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function Mo(t,e,n,r){return t=qn(7,t,r,e),t.lanes=n,t}function pf(t,e,n,r){return t=qn(22,t,r,e),t.elementType=U_,t.lanes=n,t.stateNode={isHidden:!1},t}function bh(t,e,n){return t=qn(6,t,null,e),t.lanes=n,t}function $h(t,e,n){return e=qn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function PT(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sh(0),this.expirationTimes=sh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sh(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Um(t,e,n,r,i,o,l,s,a){return t=new PT(t,e,n,s,a),e===1?(e=1,o===!0&&(e|=8)):e=0,o=qn(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},km(o),t}function AT(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bl,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Mw(t){if(!t)return no;t=t._reactInternals;e:{if(tl(t)!==t||t.tag!==1)throw Error(W(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Tn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(W(171))}if(t.tag===1){var n=t.type;if(Tn(n))return A1(t,n,e)}return e}function Lw(t,e,n,r,i,o,l,s,a){return t=Um(n,r,!0,t,i,o,l,s,a),t.context=Mw(null),n=t.current,r=vn(),i=Xi(n),o=ui(r,i),o.callback=e??null,Gi(n,o,i),t.current.lanes=i,Ru(t,i,r),Nn(t,r),t}function gf(t,e,n,r){var i=e.current,o=vn(),l=Xi(i);return n=Mw(n),e.context===null?e.context=n:e.pendingContext=n,e=ui(o,l),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Gi(i,e,l),t!==null&&(_r(t,i,l,o),Ac(t,i,l)),l}function yd(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function m0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Wm(t,e){m0(t,e),(t=t.alternate)&&m0(t,e)}function MT(){return null}var Iw=typeof reportError=="function"?reportError:function(t){console.error(t)};function Vm(t){this._internalRoot=t}mf.prototype.render=Vm.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(W(409));gf(t,e,null,null)};mf.prototype.unmount=Vm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Vo(function(){gf(null,t,null,null)}),e[fi]=null}};function mf(t){this._internalRoot=t}mf.prototype.unstable_scheduleHydration=function(t){if(t){var e=f1();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ii.length&&e!==0&&e<Ii[n].priority;n++);Ii.splice(n,0,t),n===0&&p1(t)}};function Hm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function vf(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function v0(){}function LT(t,e,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=yd(l);o.call(u)}}var l=Lw(e,r,t,0,null,!1,!1,"",v0);return t._reactRootContainer=l,t[fi]=l.current,Va(t.nodeType===8?t.parentNode:t),Vo(),l}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=yd(a);s.call(u)}}var a=Um(t,0,!1,null,null,!1,!1,"",v0);return t._reactRootContainer=a,t[fi]=a.current,Va(t.nodeType===8?t.parentNode:t),Vo(function(){gf(e,a,n,r)}),a}function yf(t,e,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var s=i;i=function(){var a=yd(l);s.call(a)}}gf(e,l,t,i)}else l=LT(n,e,t,i,r);return yd(l)}c1=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=sa(e.pendingLanes);n!==0&&(cm(e,n|1),Nn(e,Ct()),!(Le&6)&&(ls=Ct()+500,vo()))}break;case 13:Vo(function(){var r=hi(t,1);if(r!==null){var i=vn();_r(r,t,1,i)}}),Wm(t,1)}};dm=function(t){if(t.tag===13){var e=hi(t,134217728);if(e!==null){var n=vn();_r(e,t,134217728,n)}Wm(t,134217728)}};d1=function(t){if(t.tag===13){var e=Xi(t),n=hi(t,e);if(n!==null){var r=vn();_r(n,t,e,r)}Wm(t,e)}};f1=function(){return We};h1=function(t,e){var n=We;try{return We=t,e()}finally{We=n}};cp=function(t,e,n){switch(e){case"input":if(rp(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=af(r);if(!i)throw Error(W(90));V_(r),rp(r,i)}}}break;case"textarea":K_(t,n);break;case"select":e=n.value,e!=null&&Ul(t,!!n.multiple,e,!1)}};q_=jm;e1=Vo;var IT={usingClientEntryPoint:!1,Events:[Pu,Ol,af,Q_,J_,jm]},Zs={findFiberByHostInstance:To,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},DT={bundleType:Zs.bundleType,version:Zs.version,rendererPackageName:Zs.rendererPackageName,rendererConfig:Zs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xi.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=r1(t),t===null?null:t.stateNode},findFiberByHostInstance:Zs.findFiberByHostInstance||MT,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 dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dc.isDisabled&&dc.supportsFiber)try{rf=dc.inject(DT),zr=dc}catch{}}Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=IT;Vn.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Hm(e))throw Error(W(200));return AT(t,e,null,n)};Vn.createRoot=function(t,e){if(!Hm(t))throw Error(W(299));var n=!1,r="",i=Iw;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=Um(t,1,!1,null,null,n,!1,r,i),t[fi]=e.current,Va(t.nodeType===8?t.parentNode:t),new Vm(e)};Vn.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(W(188)):(t=Object.keys(t).join(","),Error(W(268,t)));return t=r1(e),t=t===null?null:t.stateNode,t};Vn.flushSync=function(t){return Vo(t)};Vn.hydrate=function(t,e,n){if(!vf(e))throw Error(W(200));return yf(null,t,e,!0,n)};Vn.hydrateRoot=function(t,e,n){if(!Hm(t))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=Iw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),e=Lw(e,null,t,1,n??null,i,!1,o,l),t[fi]=e.current,Va(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new mf(e)};Vn.render=function(t,e,n){if(!vf(e))throw Error(W(200));return yf(null,t,e,!1,n)};Vn.unmountComponentAtNode=function(t){if(!vf(t))throw Error(W(40));return t._reactRootContainer?(Vo(function(){yf(null,null,t,!1,function(){t._reactRootContainer=null,t[fi]=null})}),!0):!1};Vn.unstable_batchedUpdates=jm;Vn.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!vf(n))throw Error(W(200));if(t==null||t._reactInternals===void 0)throw Error(W(38));return yf(t,e,n,!1,r)};Vn.version="18.2.0-next-9e3b772b8-20220608";function Dw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dw)}catch(t){console.error(t)}}Dw(),L_.exports=Vn;var Gr=L_.exports;const jw=Tu(Gr),jT=k_({__proto__:null,default:jw},[Gr]);var y0=Gr;Xh.createRoot=y0.createRoot,Xh.hydrateRoot=y0.hydrateRoot;var zw={exports:{}},xf={};/**
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 zT=p,FT=Symbol.for("react.element"),BT=Symbol.for("react.fragment"),UT=Object.prototype.hasOwnProperty,WT=zT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,VT={key:!0,ref:!0,__self:!0,__source:!0};function Fw(t,e,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(l=e.ref);for(r in e)UT.call(e,r)&&!VT.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:FT,type:t,key:o,ref:l,props:i,_owner:WT.current}}xf.Fragment=BT;xf.jsx=Fw;xf.jsxs=Fw;zw.exports=xf;var _=zw.exports;function Wp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Km(t,e){if(t){if(typeof t=="string")return Wp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wp(t,e)}}function Zm(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Km(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(a){throw a},f:i}}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 o=!0,l=!1,s;return{s:function(){n=n.call(t)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function Bw(t){return t.length>0}var Mu=Object.freeze({kind:"ok",value:void 0});function Lu(t){return t===void 0?Mu:{kind:"ok",value:t}}function Br(t){return{kind:"err",error:t}}function ws(t){return t===Mu||t.kind==="ok"}function Gm(t){return t!==Mu&&t.kind==="err"}function Uw(t){var e=[],n=[],r=Zm(t),i;try{for(r.s();!(i=r.n()).done;){var o=i.value;ws(o)?e.push(o.value):n.push(o.error)}}catch(l){r.e(l)}finally{r.f()}return Bw(n)?Br(n):Lu(e)}function HT(t){return Uw(t)}function KT(t){var e=[],n=Zm(t),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;Gm(i)&&e.push(i.error)}}catch(o){n.e(o)}finally{n.f()}return Bw(e)?Br(e):Mu}function ZT(t,e){return function(n){for(var r=Lu(e),i=0;i<n.length&&ws(r);++i)r=t(r.value,n[i],i);return r}}function GT(t){return function(e){return ws(e)?Lu(t(e.value)):e}}function YT(t){return function(e){return ws(e)?t(e.value):e}}function XT(t){return function(e){return Gm(e)?Br(t(e.error)):e}}function QT(t,e){return function(n){return t(n)?Lu(n):Br(e(n))}}var JT=function(e,n){return function(r){return ws(r)?e(r.value)?r:Br(n(r.value)):r}},Lo=Object.freeze({__proto__:null,voidOk:Mu,ok:Lu,err:Br,isOk:ws,isErr:Gm,allT:Uw,all:HT,allV:KT,flatMapReduce:ZT,map:GT,flatMap:YT,mapErr:XT,fromPredicate:QT,filterOrElse:JT});function qT(t){if(Array.isArray(t))return Wp(t)}function eN(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tN(){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 nN(t){return qT(t)||eN(t)||Km(t)||tN()}function Ee(t){"@babel/helpers - typeof";return Ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(t)}function rN(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ww(t){var e=rN(t,"string");return typeof e=="symbol"?e:String(e)}function Ue(t,e,n){return e=Ww(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ss(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?x0(Object(n),!0).forEach(function(r){Ue(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iN(t){if(Array.isArray(t))return t}function oN(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,l,s=[],a=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return s}}function lN(){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 Ji(t,e){return iN(t)||oN(t,e)||Km(t,e)||lN()}function br(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ww(r.key),r)}}function $r(t,e,n){return e&&_0(t.prototype,e),n&&_0(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vp(t,e){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vp(t,e)}function nl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vp(t,e)}function xd(t){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xd(t)}function sN(){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 Vw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aN(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vw(t)}function rl(t){var e=sN();return function(){var r=xd(t),i;if(e){var o=xd(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return aN(this,i)}}var il=function(){function t(){br(this,t)}return $r(t,[{key:"appendValidationError",value:function(n,r,i,o){return n?(n[r]?n[r].push({message:i,value:o}):n[r]=[{message:i,value:o}],n):Ue({},r,[{message:i,value:o}])}}]),t}(),Fc=Symbol("GetSchema"),pn=Symbol("Path"),Ot=Symbol("GetSource");function uN(t){return t[Fc]}var Ym=$r(function t(e){br(this,t),this.span=e}),cN=function(t){nl(n,t);var e=rl(n);function n(r,i){var o;return br(this,n),o=e.call(this,i),Ue(Vw(o),"type","Sym"),o.value=r,o}return $r(n,[{key:"transpile",value:function(){return this.value}}]),n}(Ym);new cN("()");var nn="_type",Rn="_ref",dN=function(t){nl(n,t);var e=rl(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return br(this,n),i=e.call(this),i.options=r,i.opt=o,i}return $r(n,[{key:"validate",value:function(i,o){return this.opt&&o==null?!1:o==null?Ue({},i,[{message:"Non-optional image was null or undefined.",value:o}]):typeof o[Rn]!="string"?Ue({},i,[{message:"Image did not have a file reference string. Got: ".concat(Ee(o[Rn])),value:o}]):o[nn]!=="file"?Ue({},i,[{message:"Image did not have the valid file extension type. Got: ".concat(o[nn]),value:o}]):o.metadata?Ue({},i,[{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:o,fixes:["image:replace-metadata"]}]):Ue({},i,[{message:"Could not validate Image metadata.",value:o,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(i){return this.opt&&i==null?!0:(i==null?void 0:i[Rn])==="image"&&(i==null?void 0:i[nn])==="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}(il),Hw=function(e){var n;if(!e[Rn].startsWith("/public")){var r;return{url:e[Rn]+"?sha256=".concat((r=e.metadata)===null||r===void 0?void 0:r.sha256),metadata:e.metadata}}return{url:e[Rn].slice(7)+"?sha256=".concat((n=e.metadata)===null||n===void 0?void 0:n.sha256),metadata:e.metadata}};function Kw(t){return Ee(t)==="object"&&t!==null&&t!==void 0&&("val"in t||"valPath"in t)}function fN(t){return Ee(t)==="object"&&t!==null&&t!==void 0&&pn in t&&"val"in t}function hN(t){return t[pn]}function pN(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function w0(t,e,n){return e?Mt(t(Mt(e,n))):Mt(e,n)}function qi(t){return Ee(t)==="object"&&t!==null&&(Ot in t||pn in t)}function Mt(t,e,n){if(Ee(t)==="object"){if(qi(t))return t;if(Kw(t))return Mt(t.val,t.valPath)}if(t&&t[Rn]&&t[nn]==="file"){var r=t[Rn];if(typeof r!="string")throw Error("Invalid file ref: "+r);return Mt(Hw(t),e,n)}switch(Ee(t)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(Ee(t),": ").concat(t));case"object":if(t!==null)return new Proxy(t,{has:function(o,l){return l===Ot||l===pn||l==="andThen"||l===Fc?!0:l in o},get:function(o,l){if(l===Ot)return t;if(l===pn)return e;if(l===Fc)return n;if(l==="andThen")return function(a){return w0(a,t,e)};if(Array.isArray(o)){if(l==="filter")return function(a){var u=o.map(function(c,d){return Mt(c,mr(e,d),n==null?void 0:n.item)}).filter(function(c){return a&&a instanceof il?a.assert(S0(c)):S0(a(c))});return Mt(u,e,n)};if(l==="map")return function(a){var u=o.map(function(c,d){var f=a(Mt(c,mr(e,d),n==null?void 0:n.item),Mt(d));return qi(f)?f:Mt(f)});return Mt(u,e,n)}}if(Array.isArray(o)&&l==="length")return Mt(o.length);var s=Reflect.get(o,l);return pN(t,l)?Number.isNaN(Number(l))?Mt(s,mr(e,l),n==null?void 0:n.items[l]):Mt(s,mr(e,Number(l)),n==null?void 0:n.item):s}});default:return Ue(Ue(Ue({eq:function(o){var l=o;if(qi(o)&&(l=o[Ot],l instanceof Ym))throw Error("TODO: Cannot evaluate equality with an Expr");return Mt(t===l,void 0)},andThen:function(o){return w0(o,t===void 0?null:t,e)}},Ot,t===void 0?null:t),pn,e),Fc,n)}}function mr(t,e){if(Ee(e)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(e.toString()));return t&&"".concat(t,".").concat(JSON.stringify(e))}function S0(t){if(Ee(t)==="object"&&(Ot in t||pn in t)){var e=t[Ot];return e}return t}var gN=function(t){nl(n,t);var e=rl(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return br(this,n),i=e.call(this),i.items=r,i.opt=o,i}return $r(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:Ee(o)!=="object"?Ue({},i,[{message:"Expected 'object', got '".concat(Ee(o),"'")}]):Array.isArray(o)?Ue({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=mr(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(c),o);else{var h=d.validate(f,o[c]);h&&s?s=ss(ss({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(this.items);o<l.length;o++){var s=Ji(l[o],2),a=s[0],u=s[1];if(!u.assert(i[a]))return!1}return Ee(i)==="object"&&!Array.isArray(i)}},{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(i){var o=Ji(i,2),l=o[0],s=o[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(il),mN=function(t){nl(n,t);var e=rl(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return br(this,n),i=e.call(this),i.item=r,i.opt=o,i}return $r(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:Ee(o)!=="object"||!Array.isArray(o)?Ue({},i,[{message:"Expected 'array', got '".concat(Ee(o),"'")}]):(o.forEach(function(a,u){var c=mr(i,u);if(!c)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at index ").concat(u),o);else{var d=l.item.validate(c,a);d&&s?s=ss(ss({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;var o=Zm(i),l;try{for(o.s();!(l=o.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){o.e(a)}finally{o.f()}return Ee(i)==="object"&&Array.isArray(i)}},{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}(il),vN=function(t){nl(n,t);var e=rl(n);function n(r,i){var o,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return br(this,n),o=e.call(this),o.key=r,o.items=i,o.opt=l,o}return $r(n,[{key:"validate",value:function(i,o){return!1}},{key:"assert",value:function(i){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(i){return i.serialize()}),opt:this.opt}:{type:"union",items:this.items.map(function(i){return i.serialize()}),opt:this.opt}}}]),n}(il),yN=function(t){nl(n,t);var e=rl(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return br(this,n),i=e.call(this),i.options=r,i.opt=o,i}return $r(n,[{key:"validate",value:function(i,o){return!1}},{key:"assert",value:function(i){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(il),xN=function(t){nl(n,t);var e=rl(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return br(this,n),i=e.call(this),i.item=r,i.opt=o,i}return $r(n,[{key:"validate",value:function(i,o){var l=this,s=!1;return this.opt&&o==null?!1:Ee(o)!=="object"?Ue({},i,[{message:"Expected 'object', got '".concat(Ee(o),"'")}]):Array.isArray(o)?Ue({},i,[{message:"Expected 'object', got 'array'"}]):(Object.entries(o).forEach(function(a){var u=Ji(a,2),c=u[0],d=u[1],f=mr(i,c);if(!f)s=l.appendValidationError(s,i,"Internal error: could not create path at ".concat(!i&&typeof i=="string"?"<empty string>":i," at key ").concat(d),o);else{var h=l.item.validate(f,d);h&&s?s=ss(ss({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(i){if(this.opt&&i==null)return!0;if(!i)return!1;for(var o=0,l=Object.entries(i);o<l.length;o++){var s=Ji(l[o],2),a=s[1];if(!this.item.assert(a))return!1}return Ee(i)==="object"&&!Array.isArray(i)}},{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}(il);function _N(t){var e=t[Ot];if(e instanceof Ym)throw Error("Cannot get raw source of an Expr");var n=e;return n}function wN(t){return t.indexOf(".")===-1?[t,""]:[t.slice(0,t.indexOf(".")),t.slice(t.indexOf(".")+1)]}function SN(t){return t instanceof gN||Ee(t)==="object"&&"type"in t&&t.type==="object"}function EN(t){return t instanceof xN||Ee(t)==="object"&&"type"in t&&t.type==="record"}function CN(t){return t instanceof mN||Ee(t)==="object"&&"type"in t&&t.type==="array"}function kN(t){return t instanceof vN||Ee(t)==="object"&&"type"in t&&t.type==="union"}function bN(t){return t instanceof yN||Ee(t)==="object"&&"type"in t&&t.type==="richtext"}function $N(t){return t instanceof dN||Ee(t)==="object"&&"type"in t&&t.type==="image"}function TN(t,e,n){for(var r=NN(t),i=nN(r),o=n,l=e,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(CN(o)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(o)," must have a number as path, but got ").concat(c,". Path: ").concat(t));if(Ee(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(Ee(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(t))}l=l[c],o=o.item}else if(EN(o)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(o," must have path: ").concat(c," as string"));if(Ee(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(Ee(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(t));l=l[c],o=o.item}else if(SN(o)){if(Ee(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(Ee(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(t));l=l[c],o=o.items[c]}else{if($N(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};if(kN(o)){var f=o.key;if(!f)return{v:{path:i.map(function(g){return Number.isNaN(Number(g))?JSON.stringify(g):g}).join("."),schema:o,source:l}};var h=l[f];if(!h)throw Error("Invalid path: union source ".concat(o," did not have required key ").concat(f," in path: ").concat(t));var m=o.items.find(function(g){var w;return(g==null||(w=g.items)===null||w===void 0||(w=w[f])===null||w===void 0?void 0:w.value)===h});if(!m)throw Error("Invalid path: union schema ".concat(o," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(t));o=m.items[c],l=l[c]}else{if(bN(o))return{v:{path:i.slice(0,i.length-r.length-1).map(function(g){return JSON.stringify(g)}).join("."),schema:o,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(o)))}}},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:i.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:o,source:l}}function NN(t){for(var e=[],n=0;n<t.length;){var r="";if(t[n]==='"'){for(n++;n<t.length&&t[n]!=='"';)t[n]==="\\"&&t[n+1]==='"'?(r+='"',n++):r+=t[n],n++;if(t[n]!=='"'){var i;throw new Error("Invalid input (".concat(JSON.stringify(t),"): Missing closing double quote: ").concat((i=t[n])!==null&&i!==void 0?i:"at end of string"," (char: ").concat(n,"; length: ").concat(t.length,")"))}}else for(;n<t.length&&t[n]!==".";)r+=t[n],n++;r!==""&&e.push(r),n++}return e}function RN(t){return Zw(AN(t))}function ON(t){return qi(t)?Ee(t[Ot])==="object"&&t[Ot]!==null&&Array.isArray(t[Ot]):Array.isArray(t)}function PN(t){return qi(t)?Ee(t[Ot])==="object"&&t[Ot]!==null&&!Array.isArray(t[Ot]):Ee(t)==="object"}function AN(t){var e=Mt(t);function n(r){var i=ON(r),o=PN(r);if(i){var l=Ot in r?r[Ot]:r,s=pn in r?r[pn]:void 0;return{val:l.map(function(c,d){return n(qi(c)?c:Mt(c,mr(s,d)))}),valPath:s}}else if(o){var a=Ot in r?r[Ot]:r,u=pn in r?r[pn]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=Ji(c,2),f=d[0],h=d[1];return[f,n(qi(h)?h:Mt(h,mr(u,f)))]})),valPath:u}}else return qi(r)?{val:n(r[Ot]),valPath:r[pn]}:r}return n(e)}function Hp(t){var e=Kw(t)?t.val:t;switch(Ee(e)){case"function":case"symbol":throw Error("Invalid val type: ".concat(Ee(e)));case"object":return e===null?null:Array.isArray(e)?e.map(Hp):Object.fromEntries(Object.entries(e).map(function(n){var r=Ji(n,2),i=r[0],o=r[1];return[i,o&&Hp(o)]}));default:return e}}function Zw(t){var e=t.val;switch(Ee(e)){case"function":case"symbol":throw Error("Invalid val type: ".concat(Ee(e)));case"object":if(e!==null)return new Proxy(e,{has:function(r,i){return i==="val"||i===pn?!0:E0(r,i)},get:function(r,i){if(i===pn)return t.valPath;if(i==="val")return Hp(t);if(Array.isArray(r)&&i==="length")return r.length;if(E0(e,i)){var o,l;return Zw({val:Reflect.get(r,i).val,valPath:(o=(l=Reflect.get(r,i))===null||l===void 0?void 0:l.valPath)!==null&&o!==void 0?o:mr(t.valPath,Array.isArray(r)?Number(i):i)})}return Reflect.get(r,i)}});default:return Ue(Ue({},pn,t.valPath),"val",t.val)}}function E0(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var MN=[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],Ve=function(t){return t[t.inputBytes=64]="inputBytes",t[t.inputWords=16]="inputWords",t[t.highIndex=14]="highIndex",t[t.lowIndex=15]="lowIndex",t[t.workWords=64]="workWords",t[t.allocBytes=80]="allocBytes",t[t.allocWords=20]="allocWords",t[t.allocTotal=8e3]="allocTotal",t}(Ve||{}),C0={sha256:1};function LN(t){if(t&&!C0[t]&&!C0[t.toLowerCase()])throw new Error("Digest method not supported");return new IN}var IN=function(){function t(){br(this,t),Ue(this,"A",1779033703),Ue(this,"B",-1150833019),Ue(this,"C",1013904242),Ue(this,"D",-1521486534),Ue(this,"E",1359893119),Ue(this,"F",-1694144372),Ue(this,"G",528734635),Ue(this,"H",1541459225),Ue(this,"_size",0),Ue(this,"_sp",0),(!fc||Gs>=Ve.allocTotal)&&(fc=new ArrayBuffer(Ve.allocTotal),Gs=0),this._byte=new Uint8Array(fc,Gs,Ve.allocBytes),this._word=new Int32Array(fc,Gs,Ve.allocWords),Gs+=Ve.allocBytes}return $r(t,[{key:"update",value:function(n){if(typeof n=="string")return this._utf8(n);if(n==null)throw new TypeError("Invalid type: "+Ee(n));var r=n.byteOffset,i=n.byteLength,o=i/Ve.inputBytes|0,l=0;if(o&&!(r&3)&&!(this._size%Ve.inputBytes)){for(var s=new Int32Array(n.buffer,r,o*Ve.inputWords);o--;)this._int32(s,l>>2),l+=Ve.inputBytes;this._size+=l}var a=n.BYTES_PER_ELEMENT;if(a!==1&&n.buffer){var u=new Uint8Array(n.buffer,r+l,i-l);return this._uint8(u)}return l===i?this:this._uint8(n,l)}},{key:"_uint8",value:function(n,r){var i=this._byte,o=this._word,l=n.length;for(r=r|0;r<l;){for(var s=this._size%Ve.inputBytes,a=s;r<l&&a<Ve.inputBytes;)i[a++]=n[r++];a>=Ve.inputBytes&&this._int32(o),this._size+=a-s}return this}},{key:"_utf8",value:function(n){for(var r=this._byte,i=this._word,o=n.length,l=this._sp,s=0;s<o;){for(var a=this._size%Ve.inputBytes,u=a;s<o&&u<Ve.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>=Ve.inputBytes&&(this._int32(i),i[0]=i[Ve.inputWords]),this._size+=u-a}return this._sp=l,this}},{key:"_int32",value:function(n,r){var i=this.A,o=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<Ve.inputWords;)So[f++]=ur(n[r++]);for(f=Ve.inputWords;f<Ve.workWords;f++)So[f]=VN(So[f-2])+So[f-7]+WN(So[f-15])+So[f-16]|0;for(f=0;f<Ve.workWords;f++){var h=d+UN(a)+zN(a,u,c)+MN[f]+So[f]|0,m=BN(i)+FN(i,o,l)|0;d=c,c=u,u=a,a=s+h|0,s=l,l=o,o=i,i=h+m|0}this.A=i+this.A|0,this.B=o+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,i=this._word,o=this._size%Ve.inputBytes|0;for(r[o++]=128;o&3;)r[o++]=0;if(o>>=2,o>Ve.highIndex){for(;o<Ve.inputWords;)i[o++]=0;o=0,this._int32(i)}for(;o<Ve.inputWords;)i[o++]=0;var l=this._size*8,s=(l&4294967295)>>>0,a=(l-s)/4294967296;return a&&(i[Ve.highIndex]=ur(a)),s&&(i[Ve.lowIndex]=ur(s)),this._int32(i),n==="hex"?this._hex():this._bin()}},{key:"_hex",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H;return $i(n)+$i(r)+$i(i)+$i(o)+$i(l)+$i(s)+$i(a)+$i(u)}},{key:"_bin",value:function(){var n=this.A,r=this.B,i=this.C,o=this.D,l=this.E,s=this.F,a=this.G,u=this.H,c=this._byte,d=this._word;return d[0]=ur(n),d[1]=ur(r),d[2]=ur(i),d[3]=ur(o),d[4]=ur(l),d[5]=ur(s),d[6]=ur(a),d[7]=ur(u),c.slice(0,32)}}]),t}(),So=new Int32Array(Ve.workWords),fc,Gs=0,$i=function(e){return(e+4294967296).toString(16).substr(-8)},DN=function(e){return e<<24&4278190080|e<<8&16711680|e>>8&65280|e>>24&255},jN=function(e){return e},ur=HN()?jN:DN,zN=function(e,n,r){return r^e&(n^r)},FN=function(e,n,r){return e&n|r&(e|n)},BN=function(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)},UN=function(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)},WN=function(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3},VN=function(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10};function HN(){var t=new Uint8Array(new Uint16Array([65279]).buffer);return t[0]===254}var KN=function(e){return LN().update(e).digest("hex")};function qa(){qa=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(C,k,E){C[k]=E.value},o=typeof Symbol=="function"?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(C,k,E){return Object.defineProperty(C,k,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[k]}try{u({},"")}catch{u=function(k,E,A){return k[E]=A}}function c(C,k,E,A){var N=k&&k.prototype instanceof v?k:v,F=Object.create(N.prototype),K=new H(A||[]);return i(F,"_invoke",{value:P(C,E,K)}),F}function d(C,k,E){try{return{type:"normal",arg:C.call(k,E)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",w={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var b=Object.getPrototypeOf,T=b&&b(b(Z([])));T&&T!==n&&r.call(T,l)&&(S=T);var $=x.prototype=v.prototype=Object.create(S);function O(C){["next","throw","return"].forEach(function(k){u(C,k,function(E){return this._invoke(k,E)})})}function L(C,k){function E(N,F,K,de){var se=d(C[N],C,F);if(se.type!=="throw"){var Ae=se.arg,Ne=Ae.value;return Ne&&typeof Ne=="object"&&r.call(Ne,"__await")?k.resolve(Ne.__await).then(function(Q){E("next",Q,K,de)},function(Q){E("throw",Q,K,de)}):k.resolve(Ne).then(function(Q){Ae.value=Q,K(Ae)},function(Q){return E("throw",Q,K,de)})}de(se.arg)}var A;i(this,"_invoke",{value:function(N,F){function K(){return new k(function(de,se){E(N,F,de,se)})}return A=A?A.then(K,K):K()}})}function P(C,k,E){var A=f;return function(N,F){if(A===m)throw new Error("Generator is already running");if(A===g){if(N==="throw")throw F;return{value:t,done:!0}}for(E.method=N,E.arg=F;;){var K=E.delegate;if(K){var de=D(K,E);if(de){if(de===w)continue;return de}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(A===f)throw A=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);A=m;var se=d(C,k,E);if(se.type==="normal"){if(A=E.done?g:h,se.arg===w)continue;return{value:se.arg,done:E.done}}se.type==="throw"&&(A=g,E.method="throw",E.arg=se.arg)}}}function D(C,k){var E=k.method,A=C.iterator[E];if(A===t)return k.delegate=null,E==="throw"&&C.iterator.return&&(k.method="return",k.arg=t,D(C,k),k.method==="throw")||E!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+E+"' method")),w;var N=d(A,C.iterator,k.arg);if(N.type==="throw")return k.method="throw",k.arg=N.arg,k.delegate=null,w;var F=N.arg;return F?F.done?(k[C.resultName]=F.value,k.next=C.nextLoc,k.method!=="return"&&(k.method="next",k.arg=t),k.delegate=null,w):F:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,w)}function B(C){var k={tryLoc:C[0]};1 in C&&(k.catchLoc=C[1]),2 in C&&(k.finallyLoc=C[2],k.afterLoc=C[3]),this.tryEntries.push(k)}function oe(C){var k=C.completion||{};k.type="normal",delete k.arg,C.completion=k}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Z(C){if(C||C===""){var k=C[l];if(k)return k.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,A=function N(){for(;++E<C.length;)if(r.call(C,E))return N.value=C[E],N.done=!1,N;return N.value=t,N.done=!0,N};return A.next=A}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,i($,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),e.isGeneratorFunction=function(C){var k=typeof C=="function"&&C.constructor;return!!k&&(k===y||(k.displayName||k.name)==="GeneratorFunction")},e.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create($),C},e.awrap=function(C){return{__await:C}},O(L.prototype),u(L.prototype,s,function(){return this}),e.AsyncIterator=L,e.async=function(C,k,E,A,N){N===void 0&&(N=Promise);var F=new L(c(C,k,E,A),N);return e.isGeneratorFunction(k)?F:F.next().then(function(K){return K.done?K.value:F.next()})},O($),u($,a,"Generator"),u($,l,function(){return this}),u($,"toString",function(){return"[object Generator]"}),e.keys=function(C){var k=Object(C),E=[];for(var A in k)E.push(A);return E.reverse(),function N(){for(;E.length;){var F=E.pop();if(F in k)return N.value=F,N.done=!1,N}return N.done=!0,N}},e.values=Z,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(oe),!C)for(var k in this)k.charAt(0)==="t"&&r.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=t)},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 k=this;function E(se,Ae){return F.type="throw",F.arg=C,k.next=se,Ae&&(k.method="next",k.arg=t),!!Ae}for(var A=this.tryEntries.length-1;A>=0;--A){var N=this.tryEntries[A],F=N.completion;if(N.tryLoc==="root")return E("end");if(N.tryLoc<=this.prev){var K=r.call(N,"catchLoc"),de=r.call(N,"finallyLoc");if(K&&de){if(this.prev<N.catchLoc)return E(N.catchLoc,!0);if(this.prev<N.finallyLoc)return E(N.finallyLoc)}else if(K){if(this.prev<N.catchLoc)return E(N.catchLoc,!0)}else{if(!de)throw new Error("try statement without catch or finally");if(this.prev<N.finallyLoc)return E(N.finallyLoc)}}}},abrupt:function(C,k){for(var E=this.tryEntries.length-1;E>=0;--E){var A=this.tryEntries[E];if(A.tryLoc<=this.prev&&r.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var N=A;break}}N&&(C==="break"||C==="continue")&&N.tryLoc<=k&&k<=N.finallyLoc&&(N=null);var F=N?N.completion:{};return F.type=C,F.arg=k,N?(this.method="next",this.next=N.finallyLoc,w):this.complete(F)},complete:function(C,k){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"&&k&&(this.next=k),w},finish:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var E=this.tryEntries[k];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),oe(E),w}},catch:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var E=this.tryEntries[k];if(E.tryLoc===C){var A=E.completion;if(A.type==="throw"){var N=A.arg;oe(E)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(C,k,E){return this.delegate={iterator:Z(C),resultName:k,nextLoc:E},this.method==="next"&&(this.arg=t),w}},e}function k0(t,e,n,r,i,o,l){try{var s=t[o](l),a=s.value}catch(u){n(u);return}s.done?e(a):Promise.resolve(a).then(r,i)}function Gw(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(a){k0(o,r,i,l,s,"next",a)}function s(a){k0(o,r,i,l,s,"throw",a)}l(void 0)})}}var ZN=function(){function t(e){br(this,t),this.host=e}return $r(t,[{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 e=Gw(qa().mark(function r(i){var o,l,s;return qa().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=i.patchIds,l=i.headers,s=o?"?".concat(o.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 Xs(c)}).catch(Ys));case 3:case"end":return u.stop()}},r,this)}));function n(r){return e.apply(this,arguments)}return n}()},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"postPatches",value:function(n,r,i){return fetch("".concat(this.host,"/patches/~"),{headers:i||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(Ue({},n,r))}).then(function(o){return Xs(o)}).catch(Ys)}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return Xs(n).catch(Ys)})}},{key:"getTree",value:function(n){var r=n.patch,i=r===void 0?!1:r,o=n.includeSchema,l=o===void 0?!1:o,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",i.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 Xs(h)}).catch(Ys)}},{key:"postCommit",value:function(n){var r=n.patches,i=n.headers;return fetch("".concat(this.host,"/commit"),{method:"POST",body:JSON.stringify({patches:r}),headers:i||{"Content-Type":"application/json"}}).then(function(o){return Xs(o)}).catch(Ys)}}]),t}();function Ys(t){return Br({statusCode:500,message:t instanceof Error?t.message:"Unknown error"})}function Xs(t){return Kp.apply(this,arguments)}function Kp(){return Kp=Gw(qa().mark(function t(e){var n;return qa().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,!e.ok){i.next=9;break}return i.t0=Lo,i.next=5,e.json();case 5:return i.t1=i.sent,i.abrupt("return",i.t0.ok.call(i.t0,i.t1));case 9:return i.prev=9,i.next=12,e.json();case 12:return n=i.sent,i.abrupt("return",Br({statusCode:e.status,message:n.message||e.statusText,details:n.details||Object.fromEntries(Object.entries(n).filter(function(o){var l=Ji(o,1),s=l[0];return s!=="message"}))}));case 16:return i.prev=16,i.t2=i.catch(9),i.abrupt("return",Br({statusCode:e.status,message:e.statusText}));case 19:i.next=24;break;case 21:return i.prev=21,i.t3=i.catch(0),i.abrupt("return",Br({message:i.t3 instanceof Error?i.t3.message:"Unknown error"}));case 24:case"end":return i.stop()}},t,null,[[0,21],[9,16]])})),Kp.apply(this,arguments)}var jn={convertFileSource:Hw,getSchema:uN,getValPath:hN,getVal:RN,getSource:_N,resolvePath:TN,splitModuleIdAndModulePath:wN,isVal:fN,createValPathOfItem:mr,getSHA256Hash:KN,createPatchJSONPath:function(e){return"/".concat(e.split(".").map(function(n){return n&&GN(n)}).join("/"))},VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"};function GN(t){try{return JSON.parse(t)}catch{return t}}var Yw={exports:{}};/*!
44
- Copyright (c) 2018 Jed Watson.
45
- Licensed under the MIT License (MIT), see
46
- http://jedwatson.github.io/classnames
47
- */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var l=typeof o;if(l==="string"||l==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(l==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(Yw);var YN=Yw.exports;const _f=Tu(YN);function ie(){return ie=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ie.apply(this,arguments)}function XN(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function Xw(...t){return e=>t.forEach(n=>XN(n,e))}function st(...t){return p.useCallback(Xw(...t),t)}const as=p.forwardRef((t,e)=>{const{children:n,...r}=t,i=p.Children.toArray(n),o=i.find(JN);if(o){const l=o.props.children,s=i.map(a=>a===o?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Zp,ie({},r,{ref:e}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Zp,ie({},r,{ref:e}),n)});as.displayName="Slot";const Zp=p.forwardRef((t,e)=>{const{children:n,...r}=t;return p.isValidElement(n)?p.cloneElement(n,{...qN(r,n.props),ref:e?Xw(e,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Zp.displayName="SlotClone";const QN=({children:t})=>p.createElement(p.Fragment,null,t);function JN(t){return p.isValidElement(t)&&t.type===QN}function qN(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const e2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=e2.reduce((t,e)=>{const n=p.forwardRef((r,i)=>{const{asChild:o,...l}=r,s=o?as:e;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,ie({},l,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function t2(t,e){t&&Gr.flushSync(()=>t.dispatchEvent(e))}const Un=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function n2(t,e){return p.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const Ss=t=>{const{present:e,children:n}=t,r=r2(e),i=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),o=st(r.ref,i.ref);return typeof n=="function"||r.isPresent?p.cloneElement(i,{ref:o}):null};Ss.displayName="Presence";function r2(t){const[e,n]=p.useState(),r=p.useRef({}),i=p.useRef(t),o=p.useRef("none"),l=t?"mounted":"unmounted",[s,a]=n2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=hc(r.current);o.current=s==="mounted"?u:"none"},[s]),Un(()=>{const u=r.current,c=i.current;if(c!==t){const f=o.current,h=hc(u);t?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,a]),Un(()=>{if(e){const u=d=>{const h=hc(r.current).includes(d.animationName);d.target===e&&h&&Gr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===e&&(o.current=hc(r.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[e,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function hc(t){return(t==null?void 0:t.animationName)||"none"}function ol(t,e=[]){let n=[];function r(o,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[t][a])||s,w=p.useMemo(()=>m,Object.values(m));return p.createElement(g.Provider,{value:w},h)}function c(d,f){const h=(f==null?void 0:f[t][a])||s,m=p.useContext(h);if(m)return m;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[t])||o;return p.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}};return i.scopeName=t,[r,i2(i,...e)]}function i2(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(o)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return n.scopeName=e.scopeName,n}function en(t){const e=p.useRef(t);return p.useEffect(()=>{e.current=t}),p.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}const o2=p.createContext(void 0);function Xm(t){const e=p.useContext(o2);return t||e||"ltr"}function Gp(t,[e,n]){return Math.min(n,Math.max(e,t))}function nt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function l2(t,e){return p.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const Qw="ScrollArea",[Jw,ND]=ol(Qw),[s2,or]=Jw(Qw),a2=p.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...l}=t,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,m]=p.useState(null),[g,w]=p.useState(null),[v,y]=p.useState(0),[x,S]=p.useState(0),[b,T]=p.useState(!1),[$,O]=p.useState(!1),L=st(e,D=>a(D)),P=Xm(i);return p.createElement(s2,{scope:n,type:r,dir:P,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:m,scrollbarXEnabled:b,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:w,scrollbarYEnabled:$,onScrollbarYEnabledChange:O,onCornerWidthChange:y,onCornerHeightChange:S},p.createElement(Ke.div,ie({dir:P},l,{ref:L,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})))}),u2="ScrollAreaViewport",c2=p.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=or(u2,n),l=p.useRef(null),s=st(e,l,o.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(Ke.div,ie({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),p.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),_i="ScrollAreaScrollbar",qw=p.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=or(_i,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=i,s=t.orientation==="horizontal";return p.useEffect(()=>(s?o(!0):l(!0),()=>{s?o(!1):l(!1)}),[s,o,l]),i.type==="hover"?p.createElement(d2,ie({},r,{ref:e,forceMount:n})):i.type==="scroll"?p.createElement(f2,ie({},r,{ref:e,forceMount:n})):i.type==="auto"?p.createElement(eS,ie({},r,{ref:e,forceMount:n})):i.type==="always"?p.createElement(Qm,ie({},r,{ref:e})):null}),d2=p.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=or(_i,t.__scopeScrollArea),[o,l]=p.useState(!1);return p.useEffect(()=>{const s=i.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),p.createElement(Ss,{present:n||o},p.createElement(eS,ie({"data-state":o?"visible":"hidden"},r,{ref:e})))}),f2=p.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=or(_i,t.__scopeScrollArea),o=t.orientation==="horizontal",l=Sf(()=>a("SCROLL_END"),100),[s,a]=l2("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"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,a]),p.useEffect(()=>{const u=i.viewport,c=o?"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)}},[i.viewport,o,a,l]),p.createElement(Ss,{present:n||s!=="hidden"},p.createElement(Qm,ie({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:nt(t.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:nt(t.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),eS=p.forwardRef((t,e)=>{const n=or(_i,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,l]=p.useState(!1),s=t.orientation==="horizontal",a=Sf(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return us(n.viewport,a),us(n.content,a),p.createElement(Ss,{present:r||o},p.createElement(Qm,ie({"data-state":o?"visible":"hidden"},i,{ref:e})))}),Qm=p.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,i=or(_i,t.__scopeScrollArea),o=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=iS(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return _2(f,l.current,s,h)}return n==="horizontal"?p.createElement(h2,ie({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=b0(f,s,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?p.createElement(p2,ie({},c,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=b0(f,s);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),h2=p.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=or(_i,t.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(e,a,o.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":wf(n)+"px",...t.style},onThumbPointerDown:c=>t.onThumbPointerDown(c.x),onDragScroll:c=>t.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+c.deltaX;t.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:_d(l.paddingLeft),paddingEnd:_d(l.paddingRight)}})}}))}),p2=p.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=or(_i,t.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=st(e,a,o.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(nS,ie({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":wf(n)+"px",...t.style},onThumbPointerDown:c=>t.onThumbPointerDown(c.y),onDragScroll:c=>t.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollTop+c.deltaY;t.onWheelScroll(f),lS(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:_d(l.paddingTop),paddingEnd:_d(l.paddingBottom)}})}}))}),[g2,tS]=Jw(_i),nS=p.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=t,h=or(_i,n),[m,g]=p.useState(null),w=st(e,L=>g(L)),v=p.useRef(null),y=p.useRef(""),x=h.viewport,S=r.content-r.viewport,b=en(c),T=en(a),$=Sf(d,10);function O(L){if(v.current){const P=L.clientX-v.current.left,D=L.clientY-v.current.top;u({x:P,y:D})}}return p.useEffect(()=>{const L=P=>{const D=P.target;(m==null?void 0:m.contains(D))&&b(P,S)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[x,m,S,b]),p.useEffect(T,[r,T]),us(m,$),us(h.content,$),p.createElement(g2,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:en(o),onThumbPointerUp:en(l),onThumbPositionChange:T,onThumbPointerDown:en(s)},p.createElement(Ke.div,ie({},f,{ref:w,style:{position:"absolute",...f.style},onPointerDown:nt(t.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),O(L))}),onPointerMove:nt(t.onPointerMove,O),onPointerUp:nt(t.onPointerUp,L=>{const P=L.target;P.hasPointerCapture(L.pointerId)&&P.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Yp="ScrollAreaThumb",m2=p.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=tS(Yp,t.__scopeScrollArea);return p.createElement(Ss,{present:n||i.hasThumb},p.createElement(v2,ie({ref:e},r)))}),v2=p.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=or(Yp,n),l=tS(Yp,n),{onThumbPositionChange:s}=l,a=st(e,d=>l.onThumbChange(d)),u=p.useRef(),c=Sf(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(c(),!u.current){const h=w2(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,c,s]),p.createElement(Ke.div,ie({"data-state":l.hasThumb?"visible":"hidden"},i,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:nt(t.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),m=d.clientX-h.left,g=d.clientY-h.top;l.onThumbPointerDown({x:m,y:g})}),onPointerUp:nt(t.onPointerUp,l.onThumbPointerUp)}))}),rS="ScrollAreaCorner",y2=p.forwardRef((t,e)=>{const n=or(rS,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(x2,ie({},t,{ref:e})):null}),x2=p.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,i=or(rS,n),[o,l]=p.useState(0),[s,a]=p.useState(0),u=!!(o&&s);return us(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),a(d)}),us(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),l(d)}),u?p.createElement(Ke.div,ie({},r,{ref:e,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}})):null});function _d(t){return t?parseInt(t,10):0}function iS(t,e){const n=t/e;return isNaN(n)?0:n}function wf(t){const e=iS(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function _2(t,e,n,r="ltr"){const i=wf(n),o=i/2,l=e||o,s=i-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 oS([a,u],d)(t)}function b0(t,e,n="ltr"){const r=wf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,l=e.content-e.viewport,s=o-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Gp(t,a);return oS([0,l],[0,s])(u)}function oS(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function lS(t,e){return t>0&&t<e}const w2=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},l=n.left!==o.left,s=n.top!==o.top;(l||s)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Sf(t,e){const n=en(t),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function us(t,e){const n=en(e);Un(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const sS=a2,S2=c2,E2=y2;function aS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=aS(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function uS(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=aS(t))&&(r&&(r+=" "),r+=e);return r}const Jm="-";function C2(t){const e=b2(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;function i(l){const s=l.split(Jm);return s[0]===""&&s.length!==1&&s.shift(),cS(s,e)||k2(l)}function o(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function cS(t,e){var l;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?cS(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const o=t.join(Jm);return(l=e.validators.find(({validator:s})=>s(o)))==null?void 0:l.classGroupId}const $0=/^\[(.+)\]$/;function k2(t){if($0.test(t)){const e=$0.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function b2(t){const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return T2(Object.entries(t.classGroups),n).forEach(([o,l])=>{Xp(l,r,o,e)}),r}function Xp(t,e,n,r){t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:T0(e,i);o.classGroupId=n;return}if(typeof i=="function"){if($2(i)){Xp(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{Xp(l,T0(e,o),n,r)})})}function T0(t,e){let n=t;return e.split(Jm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function $2(t){return t.isThemeGetter}function T2(t,e){return e?t.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,s])=>[e+l,s])):o);return[n,i]}):t}function N2(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;function i(o,l){n.set(o,l),e++,e>t&&(e=0,r=n,n=new Map)}return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}}const dS="!";function R2(t){const e=t.separator,n=e.length===1,r=e[0],i=e.length;return function(l){const s=[];let a=0,u=0,c;for(let g=0;g<l.length;g++){let w=l[g];if(a===0){if(w===r&&(n||l.slice(g,g+i)===e)){s.push(l.slice(u,g)),u=g+i;continue}if(w==="/"){c=g;continue}}w==="["?a++:w==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(dS),h=f?d.substring(1):d,m=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}}}function O2(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e}function P2(t){return{cache:N2(t.cacheSize),splitModifiers:R2(t),...C2(t)}}const A2=/\s+/;function M2(t,e){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,o=new Set;return t.trim().split(A2).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=O2(s).join(":");return{isTailwindClass:!0,modifierId:a?h+dS: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 o.has(c)?!1:(o.add(c),i(a,u).forEach(d=>o.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function L2(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=fS(e))&&(r&&(r+=" "),r+=n);return r}function fS(t){if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=fS(t[r]))&&(n&&(n+=" "),n+=e);return n}function I2(t,...e){let n,r,i,o=l;function l(a){const u=e.reduce((c,d)=>d(c),t());return n=P2(u),r=n.cache.get,i=n.cache.set,o=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=M2(a,n);return i(a,c),c}return function(){return o(L2.apply(null,arguments))}}function qe(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const hS=/^\[(?:([a-z-]+):)?(.+)\]$/i,D2=/^\d+\/\d+$/,j2=new Set(["px","full","screen"]),z2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F2=/\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$/,B2=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function cr(t){return Oo(t)||j2.has(t)||D2.test(t)}function Ti(t){return Es(t,"length",X2)}function Oo(t){return!!t&&!Number.isNaN(Number(t))}function pc(t){return Es(t,"number",Oo)}function Qs(t){return!!t&&Number.isInteger(Number(t))}function W2(t){return t.endsWith("%")&&Oo(t.slice(0,-1))}function Se(t){return hS.test(t)}function Ni(t){return z2.test(t)}const V2=new Set(["length","size","percentage"]);function H2(t){return Es(t,V2,pS)}function K2(t){return Es(t,"position",pS)}const Z2=new Set(["image","url"]);function G2(t){return Es(t,Z2,J2)}function Y2(t){return Es(t,"",Q2)}function Js(){return!0}function Es(t,e,n){const r=hS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1}function X2(t){return F2.test(t)}function pS(){return!1}function Q2(t){return B2.test(t)}function J2(t){return U2.test(t)}function q2(){const t=qe("colors"),e=qe("spacing"),n=qe("blur"),r=qe("brightness"),i=qe("borderColor"),o=qe("borderRadius"),l=qe("borderSpacing"),s=qe("borderWidth"),a=qe("contrast"),u=qe("grayscale"),c=qe("hueRotate"),d=qe("invert"),f=qe("gap"),h=qe("gradientColorStops"),m=qe("gradientColorStopPositions"),g=qe("inset"),w=qe("margin"),v=qe("opacity"),y=qe("padding"),x=qe("saturate"),S=qe("scale"),b=qe("sepia"),T=qe("skew"),$=qe("space"),O=qe("translate"),L=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Se,e],B=()=>[Se,e],oe=()=>["",cr,Ti],H=()=>["auto",Oo,Se],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],k=()=>["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"],A=()=>["","0",Se],N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Oo,pc],K=()=>[Oo,Se];return{cacheSize:500,separator:":",theme:{colors:[Js],spacing:[cr,Ti],blur:["none","",Ni,Se],brightness:F(),borderColor:[t],borderRadius:["none","","full",Ni,Se],borderSpacing:B(),borderWidth:oe(),contrast:F(),grayscale:A(),hueRotate:K(),invert:A(),gap:B(),gradientColorStops:[t],gradientColorStopPositions:[W2,Ti],inset:D(),margin:D(),opacity:F(),padding:B(),saturate:F(),scale:F(),sepia:A(),skew:K(),space:B(),translate:B()},classGroups:{aspect:[{aspect:["auto","square","video",Se]}],container:["container"],columns:[{columns:[Ni]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:[...Z(),Se]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],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",Qs,Se]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Se]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Qs,Se]}],"grid-cols":[{"grid-cols":[Js]}],"col-start-end":[{col:["auto",{span:["full",Qs,Se]},Se]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Js]}],"row-start-end":[{row:["auto",{span:[Qs,Se]},Se]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Se]}],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:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Se,e]}],"min-w":[{"min-w":["min","max","fit",Se,cr]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Ni]},Ni,Se]}],h:[{h:[Se,e,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",cr,Se]}],"max-h":[{"max-h":[Se,e,"min","max","fit"]}],"font-size":[{text:["base",Ni,Ti]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pc]}],"font-family":[{font:[Js]}],"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",Se]}],"line-clamp":[{"line-clamp":["none",Oo,pc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cr,Se]}],"list-image":[{"list-image":["none",Se]}],"list-style-type":[{list:["none","disc","decimal",Se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"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",cr,Ti]}],"underline-offset":[{"underline-offset":["auto",cr,Se]}],"text-decoration-color":[{decoration:[t]}],"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",Se]}],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",Se]}],"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:[...Z(),K2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",H2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},G2]}],"bg-color":[{bg:[t]}],"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:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[cr,Se]}],"outline-w":[{outline:[cr,Ti]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[cr,Ti]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Ni,Y2]}],"shadow-color":[{shadow:[Js]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":k()}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",Ni,Se]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"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":[b]}],"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",Se]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",Se]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",Se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Qs,Se]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"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",Se]}],accent:[{accent:["auto",t]}],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",Se]}],"caret-color":[{caret:[t]}],"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",Se]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[cr,Ti,pc]}],stroke:[{stroke:[t,"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 eR=I2(q2);function xt(...t){return eR(uS(t))}const Sa=p.forwardRef(({className:t,children:e,...n},r)=>_.jsxs(sS,{ref:r,className:xt("relative overflow-hidden",t),...n,children:[_.jsx(S2,{className:"h-full w-full rounded-[inherit]",children:e}),_.jsx(gS,{}),_.jsx(E2,{})]}));Sa.displayName=sS.displayName;const gS=p.forwardRef(({className:t,orientation:e="vertical",...n},r)=>_.jsx(qw,{ref:r,orientation:e,className:xt("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:_.jsx(m2,{className:xt("relative rounded-full bg-border",e==="vertical"&&"flex-1")})}));gS.displayName=qw.displayName;function Ea({children:t}){const e=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),i=p.useRef(0),o=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,o.current=null,i.current=0,l.current=0},a=w=>{w.preventDefault();const v=o.current==="left"?e:n;if(v.current&&r.current){const y=o.current==="left"?w.screenX-i.current:i.current-w.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=w=>v=>{if(v.target){const x=w==="left"?e:w==="right"?n:null;r.current=!0,x&&x.current&&(i.current=v.screenX,o.current=w,x.current&&(l.current=x.current.offsetWidth))}},[c,d,f,h,m,g]=p.Children.toArray(t);return p.useEffect(()=>(document.addEventListener("mouseup",s),document.addEventListener("mousemove",a),()=>{document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",a)}),[]),_.jsxs("div",{className:"flex h-screen",children:[_.jsxs("div",{ref:e,className:"relative border-r border-border",style:{width:300},children:[_.jsxs(Ea.Column,{children:[c,_.jsx(Sa,{style:{height:"calc(100vh - 50px)"},children:d})]}),_.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")})]}),_.jsx("div",{className:_f("",{"w-full":!m&&!g}),children:_.jsxs(Ea.Column,{children:[f,_.jsx(Sa,{style:{height:"calc(100vh - 50px)"},children:h})]})}),m||g&&_.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[_.jsxs(Ea.Column,{children:[m,_.jsx(Sa,{style:{height:"calc(100vh - 50px)"},children:g})]}),_.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"})]})]})}Ea.Column=({children:t})=>{const[e,n]=p.Children.toArray(t);return _.jsxs("div",{className:"flex flex-col",children:[_.jsx("div",{className:"flex items-center border-b border-border",children:e}),n]})};const tR=({className:t})=>_.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[_.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[_.jsx("rect",{y:"0.5",width:"9",height:"9"}),_.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),_.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),_.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_1225_1638",children:_.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),mS=tR,nR=({className:t})=>_.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:t,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[_.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),_.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_1222_1618",children:_.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),rR=nR,iR=({className:t})=>_.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:t,children:_.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:_.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"})})}),oR=iR;function vS({children:t,rootPath:e}){return _.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(t,n=>p.cloneElement(n,{paths:[e]}))})}vS.Node=({children:t,paths:e=[],path:n,level:r=1,type:i,setActivePath:o})=>{const l=r*30,s=i==="string"?_.jsx(oR,{}):i==="image"?_.jsx(mS,{className:"h-[9px] w-[9px]"}):_.jsx(rR,{});return _.jsxs("div",{className:"w-full",children:[_.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{o&&o(n)},style:{paddingLeft:l},children:_.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,_.jsx("p",{children:n})]})}),t&&_.jsx(_.Fragment,{children:p.Children.map(t,a=>p.cloneElement(a,{level:r+1,paths:[...e,n]}))})]})};function qm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let ll=qm();function yS(t){ll=t}const xS=/[&<>"']/,lR=new RegExp(xS.source,"g"),_S=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,sR=new RegExp(_S.source,"g"),aR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},N0=t=>aR[t];function Mn(t,e){if(e){if(xS.test(t))return t.replace(lR,N0)}else if(_S.test(t))return t.replace(sR,N0);return t}const uR=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function cR(t){return t.replace(uR,(e,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 dR=/(^|[^\[])\^/g;function Be(t,e){t=typeof t=="string"?t:t.source,e=e||"";const n={replace:(r,i)=>(i=typeof i=="object"&&"source"in i?i.source:i,i=i.replace(dR,"$1"),t=t.replace(r,i),n),getRegex:()=>new RegExp(t,e)};return n}function R0(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const wd={exec:()=>null};function O0(t,e){const n=t.replace(/\|/g,(o,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function gc(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r;){const o=t.charAt(r-i-1);if(o===e&&!n)i++;else if(o!==e&&n)i++;else break}return t.slice(0,r-i)}function fR(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function P0(t,e,n,r){const i=e.href,o=e.title?Mn(e.title):null,l=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:i,title:o,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:i,title:o,text:Mn(l)}}function hR(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
48
- `).map(i=>{const o=i.match(/^\s+/);if(o===null)return i;const[l]=o;return l.length>=r.length?i.slice(r.length):i}).join(`
49
- `)}class Sd{constructor(e){Je(this,"options");Je(this,"rules");Je(this,"lexer");this.options=e||ll}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:gc(r,`
50
- `)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=hR(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=gc(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const r=gc(n[0].replace(/^ *>[ \t]?/gm,""),`
51
- `),i=this.lexer.state.top;this.lexer.state.top=!0;const o=this.lexer.blockTokens(r);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:o,text:r}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim();const i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",a="",u=!1;for(;e;){let c=!1;if(!(n=l.exec(e))||this.rules.block.hr.test(e))break;s=n[0],e=e.substring(s.length);let d=n[2].split(`
52
- `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=e.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
- `,e=e.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(;e;){const b=e.split(`
55
- `,1)[0];if(f=b,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(f)||S.test(f)||v.test(f)||y.test(e))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+=b+`
58
- `,e=e.substring(b.length+1),d=f.slice(h)}}o.loose||(u?o.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let g=null,w;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(w=g[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:s,task:!!g,checked:w,loose:!1,text:a,tokens:[]}),o.raw+=s}o.items[o.items.length-1].raw=s.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){const d=o.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));o.loose=f}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(e){const n=this.rules.block.def.exec(e);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",o=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:i,title:o}}}table(e){const n=this.rules.block.table.exec(e);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:O0(n[1]).map(i=>({text:i,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 i=r.align.length,o,l,s,a;for(o=0;o<i;o++){const u=r.align[o];u&&(/^ *-+: *$/.test(u)?r.align[o]="right":/^ *:-+: *$/.test(u)?r.align[o]="center":/^ *:-+ *$/.test(u)?r.align[o]="left":r.align[o]=null)}for(i=r.rows.length,o=0;o<i;o++)r.rows[o]=O0(r.rows[o],r.header.length).map(u=>({text:u,tokens:[]}));for(i=r.header.length,l=0;l<i;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(i=r.rows.length,l=0;l<i;l++)for(a=r.rows[l],s=0;s<a.length;s++)a[s].tokens=this.lexer.inline(a[s].text);return r}}}lheading(e){const n=this.rules.block.lheading.exec(e);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(e){const n=this.rules.block.paragraph.exec(e);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(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Mn(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);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(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=gc(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=fR(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 i=n[2],o="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),P0(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:o&&o.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return P0(r,i,r[0],this.lexer)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrong.lDelim.exec(e);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...i[0]].length-1;let s,a,u=l,c=0;const d=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*e.length+l);(i=d.exec(n))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){u+=a;continue}else if((i[5]||i[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...i[0]][0].length,h=e.slice(0,l+i.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(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),o=/^ /.test(r)&&/ $/.test(r);return i&&o&&(r=r.substring(1,r.length-1)),r=Mn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,i;return n[2]==="@"?(r=Mn(n[1]),i="mailto:"+r):(r=Mn(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let n;if(n=this.rules.inline.url.exec(e)){let r,i;if(n[2]==="@")r=Mn(n[0]),i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(o!==n[0]);r=Mn(n[0]),n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Mn(n[0]),{type:"text",raw:n[0],text:r}}}}const ce={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:wd,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]+/};ce._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;ce._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;ce.def=Be(ce.def).replace("label",ce._label).replace("title",ce._title).getRegex();ce.bullet=/(?:[*+-]|\d{1,9}[.)])/;ce.listItemStart=Be(/^( *)(bull) */).replace("bull",ce.bullet).getRegex();ce.list=Be(ce.list).replace(/bull/g,ce.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ce.def.source+")").getRegex();ce._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";ce._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;ce.html=Be(ce.html,"i").replace("comment",ce._comment).replace("tag",ce._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();ce.lheading=Be(ce.lheading).replace(/bull/g,ce.bullet).getRegex();ce.paragraph=Be(ce._paragraph).replace("hr",ce.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",ce._tag).getRegex();ce.blockquote=Be(ce.blockquote).replace("paragraph",ce.paragraph).getRegex();ce.normal={...ce};ce.gfm={...ce.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};ce.gfm.table=Be(ce.gfm.table).replace("hr",ce.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",ce._tag).getRegex();ce.gfm.paragraph=Be(ce._paragraph).replace("hr",ce.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ce.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",ce._tag).getRegex();ce.pedantic={...ce.normal,html:Be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ce._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:wd,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Be(ce.normal._paragraph).replace("hr",ce.hr).replace("heading",` *#{1,6} *[^
61
- ]`).replace("lheading",ce.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const X={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:wd,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:wd,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};X._punctuation="\\p{P}$+<=>`^|~";X.punctuation=Be(X.punctuation,"u").replace(/punctuation/g,X._punctuation).getRegex();X.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;X.anyPunctuation=/\\[punct]/g;X._escapes=/\\([punct])/g;X._comment=Be(ce._comment).replace("(?:-->|$)","-->").getRegex();X.emStrong.lDelim=Be(X.emStrong.lDelim,"u").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimAst=Be(X.emStrong.rDelimAst,"gu").replace(/punct/g,X._punctuation).getRegex();X.emStrong.rDelimUnd=Be(X.emStrong.rDelimUnd,"gu").replace(/punct/g,X._punctuation).getRegex();X.anyPunctuation=Be(X.anyPunctuation,"gu").replace(/punct/g,X._punctuation).getRegex();X._escapes=Be(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=Be(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=Be(X.tag).replace("comment",X._comment).replace("attribute",X._attribute).getRegex();X._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;X._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;X._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;X.link=Be(X.link).replace("label",X._label).replace("href",X._href).replace("title",X._title).getRegex();X.reflink=Be(X.reflink).replace("label",X._label).replace("ref",ce._label).getRegex();X.nolink=Be(X.nolink).replace("ref",ce._label).getRegex();X.reflinkSearch=Be(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:Be(/^!?\[(label)\]\((.*?)\)/).replace("label",X._label).getRegex(),reflink:Be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",X._label).getRegex()};X.gfm={...X.normal,escape:Be(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=Be(X.gfm.url,"i").replace("email",X.gfm._extended_email).getRegex();X.breaks={...X.gfm,br:Be(X.br).replace("{2,}","*").getRegex(),text:Be(X.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Ir{constructor(e){Je(this,"tokens");Je(this,"options");Je(this,"state");Je(this,"tokenizer");Je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ll,this.options.tokenizer=this.options.tokenizer||new Sd,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:ce.normal,inline:X.normal};this.options.pedantic?(n.block=ce.pedantic,n.inline=X.pedantic):this.options.gfm&&(n.block=ce.gfm,this.options.breaks?n.inline=X.breaks:n.inline=X.gfm),this.tokenizer.rules=n}static get rules(){return{block:ce,inline:X}}static lex(e,n){return new Ir(n).lex(e)}static lexInline(e,n){return new Ir(n).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
62
- `),this.blockTokens(e,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").replace(/^ +$/gm,""):e=e.replace(/^( *)(\t+)/gm,(s,a,u)=>a+" ".repeat(u.length));let r,i,o,l;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(e)){e=e.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(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
64
- `+r.raw,i.text+=`
65
- `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
66
- `+r.raw,i.text+=`
67
- `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(o=e,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const a=e.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&&(o=e.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){i=n[n.length-1],l&&i.type==="paragraph"?(i.raw+=`
68
- `+r.raw,i.text+=`
69
- `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r),l=o.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
70
- `+r.raw,i.text+=`
71
- `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(r);continue}if(e){const s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,i,o,l=e,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(;e;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,l,u)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),n.push(r);continue}if(o=e,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=e.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&&(o=e.substring(0,c+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(e){const c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Ed{constructor(e){Je(this,"options");this.options=e||ll}code(e,n,r){var o;const i=(o=(n||"").match(/^\S*/))==null?void 0:o[0];return e=e.replace(/\n$/,"")+`
72
- `,i?'<pre><code class="language-'+Mn(i)+'">'+(r?e:Mn(e,!0))+`</code></pre>
73
- `:"<pre><code>"+(r?e:Mn(e,!0))+`</code></pre>
74
- `}blockquote(e){return`<blockquote>
75
- ${e}</blockquote>
76
- `}html(e,n){return e}heading(e,n,r){return`<h${n}>${e}</h${n}>
77
- `}hr(){return`<hr>
78
- `}list(e,n,r){const i=n?"ol":"ul",o=n&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
79
- `+e+"</"+i+`>
80
- `}listitem(e,n,r){return`<li>${e}</li>
81
- `}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>
82
- `}table(e,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
83
- <thead>
84
- `+e+`</thead>
85
- `+n+`</table>
86
- `}tablerow(e){return`<tr>
87
- ${e}</tr>
88
- `}tablecell(e,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+e+`</${r}>
89
- `}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,n,r){const i=R0(e);if(i===null)return r;e=i;let o='<a href="'+e+'"';return n&&(o+=' title="'+n+'"'),o+=">"+r+"</a>",o}image(e,n,r){const i=R0(e);if(i===null)return r;e=i;let o=`<img src="${e}" alt="${r}"`;return n&&(o+=` title="${n}"`),o+=">",o}text(e){return e}}class ev{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,n,r){return""+r}image(e,n,r){return""+r}br(){return""}}class Dr{constructor(e){Je(this,"options");Je(this,"renderer");Je(this,"textRenderer");this.options=e||ll,this.options.renderer=this.options.renderer||new Ed,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ev}static parse(e,n){return new Dr(n).parse(e)}static parseInline(e,n){return new Dr(n).parseInline(e)}parse(e,n=!0){let r="";for(let i=0;i<e.length;i++){const o=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const l=o,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(o.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=o;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,cR(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=o;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=o;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=o,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=o,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 w=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=w+" "+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=w+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:w+" "}):g+=w+" "}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=o;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=o;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=o,s=l.tokens?this.parseInline(l.tokens):l.text;for(;i+1<e.length&&e[i+1].type==="text";)l=e[++i],s+=`
90
- `+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(e,n){n=n||this.renderer;let r="";for(let i=0;i<e.length;i++){const o=e[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}switch(o.type){case"escape":{const l=o;r+=n.text(l.text);break}case"html":{const l=o;r+=n.html(l.text);break}case"link":{const l=o;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=o;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=o;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=o;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=o;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=o;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=o;r+=n.text(l.text);break}default:{const l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class Ca{constructor(e){Je(this,"options");this.options=e||ll}preprocess(e){return e}postprocess(e){return e}}Je(Ca,"passThroughHooks",new Set(["preprocess","postprocess"]));var $u,Qp,nf,wS;class pR{constructor(...e){th(this,$u);th(this,nf);Je(this,"defaults",qm());Je(this,"options",this.setOptions);Je(this,"parse",Gu(this,$u,Qp).call(this,Ir.lex,Dr.parse));Je(this,"parseInline",Gu(this,$u,Qp).call(this,Ir.lexInline,Dr.parseInline));Je(this,"Parser",Dr);Je(this,"Renderer",Ed);Je(this,"TextRenderer",ev);Je(this,"Lexer",Ir);Je(this,"Tokenizer",Sd);Je(this,"Hooks",Ca);this.use(...e)}walkTokens(e,n){var i,o;let r=[];for(const l of e)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;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[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(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const l=n.renderers[o.name];l?n.renderers[o.name]=function(...s){let a=o.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){const o=this.defaults.renderer||new Ed(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=o[a];o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d||""}}i.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Sd(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=o[a];o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d}}i.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Ca;for(const l in r.hooks){const s=r.hooks[l],a=l,u=o[a];Ca.passThroughHooks.has(l)?o[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(o,c)).then(f=>u.call(o,f));const d=s.call(o,c);return u.call(o,d)}:o[a]=(...c)=>{let d=s.apply(o,c);return d===!1&&(d=u.apply(o,c)),d}}i.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),o&&(a=a.concat(o.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return Ir.lex(e,n??this.defaults)}parser(e,n){return Dr.parse(e,n??this.defaults)}}$u=new WeakSet,Qp=function(e,n){return(r,i)=>{const o={...i},l={...this.defaults,...o};this.defaults.async===!0&&o.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=Gu(this,nf,wS).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=>e(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=e(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)}}},nf=new WeakSet,wS=function(e,n){return r=>{if(r.message+=`
91
- Please report this to https://github.com/markedjs/marked.`,e){const i="<p>An error occurred:</p><pre>"+Mn(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}};const Ho=new pR;function He(t,e){return Ho.parse(t,e)}He.options=He.setOptions=function(t){return Ho.setOptions(t),He.defaults=Ho.defaults,yS(He.defaults),He};He.getDefaults=qm;He.defaults=ll;He.use=function(...t){return Ho.use(...t),He.defaults=Ho.defaults,yS(He.defaults),He};He.walkTokens=function(t,e){return Ho.walkTokens(t,e)};He.parseInline=Ho.parseInline;He.Parser=Dr;He.parser=Dr.parse;He.Renderer=Ed;He.TextRenderer=ev;He.Lexer=Ir;He.lexer=Ir.lex;He.Tokenizer=Sd;He.Hooks=Ca;He.parse=He;He.options;He.setOptions;He.use;He.walkTokens;He.parseInline;Dr.parse;const gR=Ir.lex;function eu(){eu=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(C,k,E){C[k]=E.value},o=typeof Symbol=="function"?Symbol:{},l=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(C,k,E){return Object.defineProperty(C,k,{value:E,enumerable:!0,configurable:!0,writable:!0}),C[k]}try{u({},"")}catch{u=function(k,E,A){return k[E]=A}}function c(C,k,E,A){var N=k&&k.prototype instanceof v?k:v,F=Object.create(N.prototype),K=new H(A||[]);return i(F,"_invoke",{value:P(C,E,K)}),F}function d(C,k,E){try{return{type:"normal",arg:C.call(k,E)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",m="executing",g="completed",w={};function v(){}function y(){}function x(){}var S={};u(S,l,function(){return this});var b=Object.getPrototypeOf,T=b&&b(b(Z([])));T&&T!==n&&r.call(T,l)&&(S=T);var $=x.prototype=v.prototype=Object.create(S);function O(C){["next","throw","return"].forEach(function(k){u(C,k,function(E){return this._invoke(k,E)})})}function L(C,k){function E(N,F,K,de){var se=d(C[N],C,F);if(se.type!=="throw"){var Ae=se.arg,Ne=Ae.value;return Ne&&typeof Ne=="object"&&r.call(Ne,"__await")?k.resolve(Ne.__await).then(function(Q){E("next",Q,K,de)},function(Q){E("throw",Q,K,de)}):k.resolve(Ne).then(function(Q){Ae.value=Q,K(Ae)},function(Q){return E("throw",Q,K,de)})}de(se.arg)}var A;i(this,"_invoke",{value:function(N,F){function K(){return new k(function(de,se){E(N,F,de,se)})}return A=A?A.then(K,K):K()}})}function P(C,k,E){var A=f;return function(N,F){if(A===m)throw new Error("Generator is already running");if(A===g){if(N==="throw")throw F;return{value:t,done:!0}}for(E.method=N,E.arg=F;;){var K=E.delegate;if(K){var de=D(K,E);if(de){if(de===w)continue;return de}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(A===f)throw A=g,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);A=m;var se=d(C,k,E);if(se.type==="normal"){if(A=E.done?g:h,se.arg===w)continue;return{value:se.arg,done:E.done}}se.type==="throw"&&(A=g,E.method="throw",E.arg=se.arg)}}}function D(C,k){var E=k.method,A=C.iterator[E];if(A===t)return k.delegate=null,E==="throw"&&C.iterator.return&&(k.method="return",k.arg=t,D(C,k),k.method==="throw")||E!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+E+"' method")),w;var N=d(A,C.iterator,k.arg);if(N.type==="throw")return k.method="throw",k.arg=N.arg,k.delegate=null,w;var F=N.arg;return F?F.done?(k[C.resultName]=F.value,k.next=C.nextLoc,k.method!=="return"&&(k.method="next",k.arg=t),k.delegate=null,w):F:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,w)}function B(C){var k={tryLoc:C[0]};1 in C&&(k.catchLoc=C[1]),2 in C&&(k.finallyLoc=C[2],k.afterLoc=C[3]),this.tryEntries.push(k)}function oe(C){var k=C.completion||{};k.type="normal",delete k.arg,C.completion=k}function H(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(B,this),this.reset(!0)}function Z(C){if(C||C===""){var k=C[l];if(k)return k.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var E=-1,A=function N(){for(;++E<C.length;)if(r.call(C,E))return N.value=C[E],N.done=!1,N;return N.value=t,N.done=!0,N};return A.next=A}}throw new TypeError(typeof C+" is not iterable")}return y.prototype=x,i($,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),e.isGeneratorFunction=function(C){var k=typeof C=="function"&&C.constructor;return!!k&&(k===y||(k.displayName||k.name)==="GeneratorFunction")},e.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,x):(C.__proto__=x,u(C,a,"GeneratorFunction")),C.prototype=Object.create($),C},e.awrap=function(C){return{__await:C}},O(L.prototype),u(L.prototype,s,function(){return this}),e.AsyncIterator=L,e.async=function(C,k,E,A,N){N===void 0&&(N=Promise);var F=new L(c(C,k,E,A),N);return e.isGeneratorFunction(k)?F:F.next().then(function(K){return K.done?K.value:F.next()})},O($),u($,a,"Generator"),u($,l,function(){return this}),u($,"toString",function(){return"[object Generator]"}),e.keys=function(C){var k=Object(C),E=[];for(var A in k)E.push(A);return E.reverse(),function N(){for(;E.length;){var F=E.pop();if(F in k)return N.value=F,N.done=!1,N}return N.done=!0,N}},e.values=Z,H.prototype={constructor:H,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(oe),!C)for(var k in this)k.charAt(0)==="t"&&r.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=t)},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 k=this;function E(se,Ae){return F.type="throw",F.arg=C,k.next=se,Ae&&(k.method="next",k.arg=t),!!Ae}for(var A=this.tryEntries.length-1;A>=0;--A){var N=this.tryEntries[A],F=N.completion;if(N.tryLoc==="root")return E("end");if(N.tryLoc<=this.prev){var K=r.call(N,"catchLoc"),de=r.call(N,"finallyLoc");if(K&&de){if(this.prev<N.catchLoc)return E(N.catchLoc,!0);if(this.prev<N.finallyLoc)return E(N.finallyLoc)}else if(K){if(this.prev<N.catchLoc)return E(N.catchLoc,!0)}else{if(!de)throw new Error("try statement without catch or finally");if(this.prev<N.finallyLoc)return E(N.finallyLoc)}}}},abrupt:function(C,k){for(var E=this.tryEntries.length-1;E>=0;--E){var A=this.tryEntries[E];if(A.tryLoc<=this.prev&&r.call(A,"finallyLoc")&&this.prev<A.finallyLoc){var N=A;break}}N&&(C==="break"||C==="continue")&&N.tryLoc<=k&&k<=N.finallyLoc&&(N=null);var F=N?N.completion:{};return F.type=C,F.arg=k,N?(this.method="next",this.next=N.finallyLoc,w):this.complete(F)},complete:function(C,k){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"&&k&&(this.next=k),w},finish:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var E=this.tryEntries[k];if(E.finallyLoc===C)return this.complete(E.completion,E.afterLoc),oe(E),w}},catch:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var E=this.tryEntries[k];if(E.tryLoc===C){var A=E.completion;if(A.type==="throw"){var N=A.arg;oe(E)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(C,k,E){return this.delegate={iterator:Z(C),resultName:k,nextLoc:E},this.method==="next"&&(this.arg=t),w}},e}function Jp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tv(t,e){if(t){if(typeof t=="string")return Jp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jp(t,e)}}function mR(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=tv(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(a){throw a},f:i}}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 o=!0,l=!1,s;return{s:function(){n=n.call(t)},n:function(){var a=n.next();return o=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function vR(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yR(t){var e=vR(t,"string");return typeof e=="symbol"?e:String(e)}function qt(t,e,n){return e=yR(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xR(t){if(Array.isArray(t))return t}function _R(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,l,s=[],a=!0,u=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);a=!0);}catch(c){u=!0,i=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return s}}function wR(){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 SR(t,e){return xR(t)||_R(t,e)||tv(t,e)||wR()}function A0(t,e,n,r,i,o,l){try{var s=t[o](l),a=s.value}catch(u){n(u);return}s.done?e(a):Promise.resolve(a).then(r,i)}function SS(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function l(a){A0(o,r,i,l,s,"next",a)}function s(a){A0(o,r,i,l,s,"throw",a)}l(void 0)})}}function ER(t){if(Array.isArray(t))return Jp(t)}function CR(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function kR(){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 qp(t){return ER(t)||CR(t)||tv(t)||kR()}var bR=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function nv(t){var e=bR.exec(t);if(e&&e[1])return e[1]}function rv(t){return t==="image/svg+xml"?"svg":t==="image/vnd.microsoft.icon"?"ico":t.startsWith("image/")?t.slice(6):t}var $R=/^h([\d+])$/;function TR(t){var e=t.children.map(NR);return RR(e)}function NR(t){if(t.type==="heading"){var e,n="",r=Number((e=t.tag.match($R))===null||e===void 0?void 0:e[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(var i=0;i<Number(r);i++)n+="#";var o=["".concat(n," ")];return{type:"block",children:o.concat.apply(o,qp(t.children.map(tg)))}}else{if(t.type==="paragraph")return t.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:t.children.map(function(s){return tg(s)})};if(t.type==="list")return{type:"block",children:t.children.flatMap(function(s,a){return CS(kS(t),s,0,a===0)})};var l=t;throw new Error("Unhandled node type: ".concat("type"in l?"exhaustiveCheck.type":"unknown"))}}function RR(t){return eg.apply(this,arguments)}function eg(){return eg=SS(eu().mark(function t(e){var n,r,i,o,l,s,a,u,c;return eu().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:n=[`
95
- `],r=[],i={},o=0;case 4:if(!(o<e.length)){f.next=44;break}l=e[o],s=mR(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,MR(u,i);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(IR(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:o===e.length-1?n[n.length-1]+=`
96
- `:n[n.length-1]+=`
97
-
98
- `;case 41:o++,f.next=4;break;case 44:return f.abrupt("return",qt(qt(qt(qt({},nn,"richtext"),"templateStrings",n),"exprs",r),"files",i));case 45:case"end":return f.stop()}},t,null,[[7,34,37,40]])})),eg.apply(this,arguments)}function ES(t){var e=typeof t.format=="number"?PR(t.format):[],n=t.text.trimStart(),r=t.text.length-n.length;n=n.trimEnd();var i=t.text.length-n.length-r;return e.includes("bold")&&e.includes("italic")?n="***".concat(n,"***"):e.includes("bold")?n="**".concat(n,"**"):e.includes("italic")&&(n="_".concat(n,"_")),e.includes("line-through")&&(n="~~".concat(n,"~~")),"".concat(" ".repeat(r)).concat(n).concat(" ".repeat(i))}function tg(t){return t.type==="text"?ES(t):t.type==="linebreak"?`
99
- `:t}function CS(t,e,n){var r,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=i?"":`
100
- `,l=["".concat(o).concat(" ".repeat(n)).concat(t)];return((r=e.children)===null||r===void 0||(r=r[0])===null||r===void 0?void 0:r.type)!=="list"&&l.push(" "),l.concat(e.children.flatMap(function(s){return s.type==="list"?s.children.flatMap(function(a){return CS(kS(s),a,n+4)}):[tg(s)]}))}function kS(t){if(t.listType==="bullet")return"-";if(t.listType==="number")return"1.";throw new Error("Unhandled list type: ".concat(t.listType))}var OR={bold:1,italic:2,"line-through":4};function PR(t){return Object.entries(OR).flatMap(function(e){var n=SR(e,2),r=n[0],i=n[1];return(i&t)===i?[r]:[]})}var AR=new TextEncoder;function MR(t,e){return ng.apply(this,arguments)}function ng(){return ng=SS(eu().mark(function t(e,n){var r,i,o,l,s;return eu().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!e.src.startsWith("data:")){u.next=13;break}return u.next=3,jn.getSHA256Hash(AR.encode(e.src));case 3:if(r=u.sent,i=nv(e.src),i!==void 0){u.next=7;break}throw new Error("Could not detect Mime Type for image: ".concat(e.src));case 7:return o=rv(i),l="/public/".concat(r,".").concat(o),n[l]=e.src,u.abrupt("return",qt(qt(qt({},nn,"file"),Rn,l),"metadata",{width:e.width||0,height:e.height||0,sha256:r||""}));case 13:return s=LR("sha256",e.src),u.abrupt("return",qt(qt(qt({},nn,"file"),Rn,"/public".concat(e.src.split("?")[0])),"metadata",{width:e.width||0,height:e.height||0,sha256:s||""}));case 15:case"end":return u.stop()}},t)})),ng.apply(this,arguments)}function LR(t,e){var n=e.split("?");if(!(n.length<2)){var r=n[1],i=new URLSearchParams(r);if(i.has(t))return i.get(t)}}function IR(t){return qt(qt(qt({},nn,"link"),"href",t.url),"children",t.children.map(ES))}function M0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?M0(Object(n),!0).forEach(function(r){qt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Cr={version:1,format:"",indent:0,direction:null};function Cs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof t=="string")return lt(lt({},Cr),{},{type:"text",format:"",text:t});if("tag"in t)switch(t.tag){case"h1":return gl(t);case"h2":return gl(t);case"h3":return gl(t);case"h4":return gl(t);case"h5":return gl(t);case"h6":return gl(t);case"li":return UR(t);case"p":return FR(t);case"ul":return L0(t);case"ol":return L0(t);case"span":return bS(t);case"a":return jR(t);case"img":return DR(t);case"br":return e?lt(lt({},Cr),{},{type:"linebreak"}):BR();default:throw Error("Unexpected node tag: "+JSON.stringify(t,null,2))}else throw Error("Unexpected node: "+JSON.stringify(t,null,2))}function DR(t){var e=t.src;return lt(lt({},Cr),{},{type:"image",src:e,width:t.width,height:t.height})}function jR(t){return lt(lt({},Cr),{},{type:"link",url:t.href,children:t.children.map(function(e){return Cs(e)})})}function zR(t){return lt(lt({},Cr),{},{format:"",type:"root",children:t.children.map(function(e){return Cs(e)})})}function gl(t){return lt(lt({},Cr),{},{type:"heading",tag:t.tag,children:t.children.map(function(e){return Cs(e)})})}function FR(t){return lt(lt({},Cr),{},{type:"paragraph",children:t.children.map(function(e){return Cs(e,!0)})})}function BR(){return lt(lt({},Cr),{},{type:"paragraph",children:[]})}function UR(t){return lt(lt({},Cr),{},{type:"listitem",children:t.children.map(function(e){return Cs(e,!0)})})}function L0(t){return lt(lt({},Cr),{},{type:"list",listType:t.tag==="ol"?"number":"bullet",children:t.children.map(function(e){return Cs(e)})},t.dir?{direction:t.dir}:{direction:null})}var WR={bold:1,italic:2,"line-through":4};function VR(t){return t.reduce(function(e,n){return e|WR[n]},0)}function bS(t){var e=t.children[0];return typeof e=="string"?lt(lt({},Cr),{},{type:"text",text:e,format:VR(t.classes)}):bS(lt(lt({},e),{},{classes:t.classes.concat(e.classes)}))}var Cd='<val value="',rg='">',ig="</val>";function dr(t,e,n){for(var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=[],o=function(){var a=t[n];if(a.type==="heading")i.push({tag:"h".concat(a.depth),children:dr(a.tokens?a.tokens:[],e,0).children});else if(a.type==="paragraph")i.push({tag:"p",children:dr(a.tokens?a.tokens:[],e,0).children});else if(a.type==="strong")i.push({tag:"span",classes:["bold"],children:dr(a.tokens?a.tokens:[],e,0).children});else if(a.type==="em")i.push({tag:"span",classes:["italic"],children:dr(a.tokens?a.tokens:[],e,0).children});else if(a.type==="del")i.push({tag:"span",classes:["line-through"],children:dr(a.tokens?a.tokens:[],e,0).children});else if(a.type==="text")if("tokens"in a&&Array.isArray(a.tokens))i.push.apply(i,qp(dr(a.tokens,e,n,r).children));else if(r&&typeof a.raw=="string"){var u=a.raw.split(`
101
- `),c=u.flatMap(function(S,b){return b===u.length-1?[S]:[S,{tag:"br",children:[]}]});i.push.apply(i,qp(c))}else i.push(a.raw);else if(a.type==="list")i.push({tag:a.ordered?"ol":"ul",children:dr(a.items,e,0).children});else if(a.type==="list_item")i.push({tag:"li",children:dr(a.tokens?a.tokens:[],e,0,!0).children});else if(a.type!=="space")if(a.type==="html"){if(a.text===ig)return{v:{children:i,cursor:n}};var d=a.text.indexOf(rg);if(a.text.startsWith(Cd)&&d>-1){var f=Number(a.text.slice(Cd.length,d));if(Number.isNaN(f))throw Error("Illegal val intermediate node: ".concat(JSON.stringify(a)));var h=dr(t.map(function(S){return S.type==="link"||S.type==="list"?{type:"text",raw:S.raw,text:S.raw}:S}),e,n+1),m=h.children,g=h.cursor,w=e[f];if(w._type==="link")i.push({tag:"a",href:w.href,children:m});else if(w._type==="file"){var v,y;i.push({tag:"img",src:jn.convertFileSource(w).url,width:(v=w.metadata)===null||v===void 0?void 0:v.width,height:(y=w.metadata)===null||y===void 0?void 0:y.height,children:[]})}n=g}var x=/<br\s*\/?>/gi;a.text.trim().match(x)&&i.push({tag:"br",children:[]})}else a.type==="link"?a.raw===a.href?i.push(a.raw):i.push({tag:"a",href:a.href,children:dr(a.tokens?a.tokens:[],e,0).children}):a.type==="br"?i.push({tag:"br",children:[]}):console.error("Could not parse markdown: unsupported token type: ".concat(a.type,". Found: ").concat(a.raw));n++},l;n<t.length;)if(l=o(),l)return l.v;return{children:i,cursor:n}}function $S(t){var e=t.templateStrings,n=t.exprs,r=e.flatMap(function(a,u){var c=n[u];return c?c[nn]==="link"?a.concat("".concat(Cd).concat(u).concat(rg).concat(c.children[0]).concat(ig)):a.concat("".concat(Cd).concat(u).concat(rg).concat(ig)):a}).join(""),i=gR(r,{gfm:!0}),o=dr(i,n,0),l=o.children,s=o.cursor;if(s!==i.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return qt(qt({},nn,"richtext"),"children",l)}var wn={},j={};let Ef={},TS={},tu={},ka={},og={},Gl={},iv={},lg={},nu={},ru={},Ui={},ov={},lv={},NS={},RS={},OS={},PS={},AS={},MS={},LS={},kd={},IS={},DS={},jS={},zS={},FS={},BS={},US={},WS={},VS={},sv={},av={},sg={},HS={},KS={},ZS={};function G(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let wi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",HR=wi&&"documentMode"in document?document.documentMode:null,Qt=wi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ro=wi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),bd=wi&&"InputEvent"in window&&!HR?"getTargetRanges"in new window.InputEvent("input"):!1,uv=wi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Cf=wi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,KR=wi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),cv=wi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!KR,kf=uv||Cf||cv?" ":"​",ZR=ro?" ":kf,GR=/^[^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]/,YR=/^[^\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]/,Io={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},XR={directionless:1,unmergeable:2},I0={center:2,end:6,justify:4,left:1,right:3,start:5},QR={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},JR={normal:0,segmented:2,token:1},qR={0:"normal",2:"segmented",1:"token"},ag=!1,dv=0;function eO(t){dv=t.timeStamp}function Th(t,e,n){return e.__lexicalLineBreak===t||t[`__lexicalKey_${n._key}`]!==void 0}function tO(t){return t.getEditorState().read(()=>{let e=rt();return e!==null?e.clone():null})}function GS(t,e,n){ag=!0;let r=100<performance.now()-dv;try{Wn(t,()=>{let i=rt()||tO(t);var o=new Map,l=t.getRootElement(),s=t._editorState,a=t._blockCursorElement;let u=!1,c="";for(var d=0;d<e.length;d++){var f=e[d],h=f.type,m=f.target,g=Du(m,s);if(!(g===null&&m!==l||tt(g))){if(h==="characterData"){if(f=r&&ee(g))e:{f=i,h=m;var w=g;if(ve(f)){var v=f.anchor.getNode();if(v.is(w)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&w.isAttached()}f&&(w=Xr(t._window),h=f=null,w!==null&&w.anchorNode===m&&(f=w.anchorOffset,h=w.focusOffset),m=m.nodeValue,m!==null&&vv(g,m,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,w=0;w<h.length;w++){v=h[w];var y=tE(v),x=v.parentNode;x==null||v===a||y!==null||v.nodeName==="BR"&&Th(v,x,t)||(ro&&(y=v.innerText||v.nodeValue)&&(c+=y),x.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(w=0,v=0;v<h;v++)x=f[v],(x.nodeName==="BR"&&Th(x,m,t)||a===x)&&(m.appendChild(x),w++);h!==w&&(m===l&&(g=s._nodeMap.get("root")),o.set(m,g))}}}}if(0<o.size)for(let[S,b]of o)if(U(b))for(o=b.getChildrenKeys(),l=S.firstChild,s=0;s<o.length;s++)a=t.getElementByKey(o[s]),a!==null&&(l==null?(S.appendChild(a),l=a):l!==a&&S.replaceChild(a,l),l=l.nextSibling);else ee(b)&&b.markDirty();if(o=n.takeRecords(),0<o.length){for(l=0;l<o.length;l++)for(a=o[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)g=s[d],m=g.parentNode,m==null||g.nodeName!=="BR"||Th(g,a,t)||m.removeChild(g);n.takeRecords()}i!==null&&(u&&(i.dirty=!0,Wr(i)),ro&&oE(t)&&i.insertRawText(c))})}finally{ag=!1}}function YS(t){let e=t._observer;if(e!==null){let n=e.takeRecords();GS(t,n,e)}}function XS(t){dv===0&&$f(t).addEventListener("textInput",eO,!0),t._observer=new MutationObserver((e,n)=>{GS(t,e,n)})}function D0(t,e){let n=t.__mode,r=t.__format;t=t.__style;let i=e.__mode,o=e.__format;return e=e.__style,(n===null||n===i)&&(r===null||r===o)&&(t===null||t===e)}function j0(t,e){let n=t.mergeWithSibling(e),r=pt()._normalizedNodes;return r.add(t.__key),r.add(e.__key),n}function QS(t){if(t.__text===""&&t.isSimpleText()&&!t.isUnmergeable())t.remove();else{for(var e;(e=t.getPreviousSibling())!==null&&ee(e)&&e.isSimpleText()&&!e.isUnmergeable();)if(e.__text==="")e.remove();else{D0(e,t)&&(t=j0(e,t));break}for(var n;(n=t.getNextSibling())!==null&&ee(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{D0(t,n)&&j0(t,n);break}}}function fv(t){return z0(t.anchor),z0(t.focus),t}function z0(t){for(;t.type==="element";){var e=t.getNode(),n=t.offset;if(n===e.getChildrenSize()?(e=e.getChildAtIndex(n-1),n=!0):(e=e.getChildAtIndex(n),n=!1),ee(e)){t.set(e.__key,n?e.getTextContentSize():0,"text");break}else if(!U(e))break;t.set(e.__key,n?e.getChildrenSize():0,"element")}}let nO=1,rO=typeof queueMicrotask=="function"?queueMicrotask:t=>{Promise.resolve().then(t)};function hv(t){let e=document.activeElement;if(e===null)return!1;let n=e.nodeName;return tt(Du(t))&&(n==="INPUT"||n==="TEXTAREA"||e.contentEditable==="true"&&e.__lexicalEditor==null)}function Iu(t,e,n){let r=t.getRootElement();try{return r!==null&&r.contains(e)&&r.contains(n)&&e!==null&&!hv(e)&&pv(e)===t}catch{return!1}}function pv(t){for(;t!=null;){let e=t.__lexicalEditor;if(e!=null)return e;t=bf(t)}return null}function ug(t){return t.isToken()||t.isSegmented()}function $d(t){for(;t!=null;){if(t.nodeType===3)return t;t=t.firstChild}return null}function JS(t,e,n){return e=Io[e],t&e&&(n===null||!(n&e))?t^e:n===null||n&e?t|e:t}function qS(t){return ee(t)||su(t)||tt(t)}function eE(t,e){if(e!=null)t.__key=e;else{hn(),99<au&&G(14),e=pt();var n=Qr(),r=""+nO++;n._nodeMap.set(r,t),U(t)?e._dirtyElements.set(r,!0):e._dirtyLeaves.add(r),e._cloneNotNeeded.add(r),e._dirtyType=1,t.__key=r}}function Do(t){var e=t.getParent();if(e!==null){let i=t.getWritable();e=e.getWritable();var n=t.getPreviousSibling();if(t=t.getNextSibling(),n===null)if(t!==null){var r=t.getWritable();e.__first=t.__key,r.__prev=null}else e.__first=null;else{if(r=n.getWritable(),t!==null){let o=t.getWritable();o.__prev=r.__key,r.__next=o.__key}else r.__next=null;i.__prev=null}t===null?n!==null?(t=n.getWritable(),e.__last=n.__key,t.__next=null):e.__last=null:(t=t.getWritable(),n!==null?(n=n.getWritable(),n.__next=t.__key,t.__prev=n.__key):t.__prev=null,i.__next=null),e.__size--,i.__parent=null}}function Td(t){99<au&&G(14);var e=t.getLatest(),n=e.__parent,r=Qr();let i=pt(),o=r._nodeMap;if(r=i._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=o.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}e=e.__key,i._dirtyType=1,U(t)?r.set(e,!0):i._dirtyLeaves.add(e)}function Kt(t){hn();var e=pt();let n=e._compositionKey;t!==n&&(e._compositionKey=t,n!==null&&(e=Dt(n),e!==null&&e.getWritable()),t!==null&&(t=Dt(t),t!==null&&t.getWritable()))}function Wi(){return Ns()?null:pt()._compositionKey}function Dt(t,e){return t=(e||Qr())._nodeMap.get(t),t===void 0?null:t}function tE(t,e){let n=pt();return t=t[`__lexicalKey_${n._key}`],t!==void 0?Dt(t,e):null}function Du(t,e){for(;t!=null;){let n=tE(t,e);if(n!==null)return n;t=bf(t)}return null}function nE(t){let e=Object.assign({},t._decorators);return t._pendingDecorators=e}function F0(t){return t.read(()=>Yr().getTextContent())}function iO(t,e){Wn(t,()=>{var n=Qr();if(!n.isEmpty())if(e==="root")Yr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},t._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Yr(){return Qr()._nodeMap.get("root")}function Wr(t){hn();let e=Qr();t!==null&&(t.dirty=!0,t._cachedNodes=null),e._selection=t}function jl(t){var e=pt(),n;e:{for(n=t;n!=null;){let r=n[`__lexicalKey_${e._key}`];if(r!==void 0){n=r;break e}n=bf(n)}n=null}return n===null?(e=e.getRootElement(),t===e?Dt("root"):null):Dt(n)}function rE(t){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(t)}function gv(t){let e=[];for(;t!==null;)e.push(t),t=t._parentEditor;return e}function iE(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function mv(t,e,n){if(e=Xr(e._window),e!==null){var r=e.anchorNode,{anchorOffset:i,focusOffset:o}=e;if(r!==null&&(e=r.nodeType===3?r.nodeValue:null,r=Du(r),e!==null&&ee(r))){if(e===kf&&n){let l=n.length;e=n,o=i=l}e!==null&&vv(r,e,i,o,t)}}}function vv(t,e,n,r,i){let o=t;if(o.isAttached()&&(i||!o.isDirty())){let u=o.isComposing(),c=e;if((u||i)&&e[e.length-1]===kf&&(c=e.slice(0,-1)),e=o.getTextContent(),i||c!==e)if(c==="")if(Kt(null),uv||Cf||cv)o.remove();else{let d=pt();setTimeout(()=>{d.update(()=>{o.isAttached()&&o.remove()})},20)}else{i=o.getParent(),e=Ts();var l=o.getTextContentSize(),s=Wi(),a=o.getKey();o.isToken()||s!==null&&a===s&&!u||ve(e)&&(i!==null&&!i.canInsertTextBefore()&&e.anchor.offset===0||e.anchor.key===t.__key&&e.anchor.offset===0&&!o.canInsertTextBefore()||e.focus.key===t.__key&&e.focus.offset===l&&!o.canInsertTextAfter())?o.markDirty():(t=rt(),ve(t)&&n!==null&&r!==null&&(t.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=o.getTextContent(),n=Lt(n),o.replace(n),o=n)),o.setTextContent(c))}}}function oO(t,e){if(e.isSegmented())return!0;if(!t.isCollapsed())return!1;t=t.anchor.offset;let n=e.getParentOrThrow(),r=e.isToken();return t===0?((t=!e.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(e=e.getPreviousSibling(),t=(ee(e)||U(e)&&e.isInline())&&!e.canInsertTextAfter()),t):t===e.getTextContentSize()?!e.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function ba(t,e){t.__lexicalClassNameCache===void 0&&(t.__lexicalClassNameCache={});let n=t.__lexicalClassNameCache,r=n[e];return r!==void 0?r:(t=t[e],typeof t=="string"?(t=t.split(" "),n[e]=t):t)}function yv(t,e,n,r,i){n.size!==0&&(n=r.__type,r=r.__key,e=e.get(n),e===void 0&&G(33,n),n=e.klass,e=t.get(n),e===void 0&&(e=new Map,t.set(n,e)),t=e.get(r),n=t==="destroyed"&&i==="created",(t===void 0||n)&&e.set(r,n?"updated":i))}function B0(t,e,n){let r=t.getParent(),i=n;return r!==null&&(e&&n===0?(i=t.getIndexWithinParent(),t=r):e||n!==t.getChildrenSize()||(i=t.getIndexWithinParent()+1,t=r)),t.getChildAtIndex(e?i-1:i)}function cg(t,e){var n=t.offset;return t.type==="element"?(t=t.getNode(),B0(t,e,n)):(t=t.getNode(),e&&n===0||!e&&n===t.getTextContentSize()?(n=e?t.getPreviousSibling():t.getNextSibling(),n===null?B0(t.getParentOrThrow(),e,t.getIndexWithinParent()+(e?0:1)):n):null)}function oE(t){return t=(t=$f(t).event)&&t.inputType,t==="insertFromPaste"||t==="insertFromPasteAsQuotation"}function Nd(t){return!gn(t)&&!t.isLastChild()&&!t.isInline()}function Rd(t,e){return t=t._keyToDOMMap.get(e),t===void 0&&G(75,e),t}function bf(t){return t=t.assignedSlot||t.parentElement,t!==null&&t.nodeType===11?t.host:t}function Od(t,e){for(t=t.getParent();t!==null;){if(t.is(e))return!0;t=t.getParent()}return!1}function $f(t){return t=t._window,t===null&&G(78),t}function lE(t){for(t=t.getParentOrThrow();t!==null&&!vr(t);)t=t.getParentOrThrow();return t}function vr(t){return gn(t)||U(t)&&t.isShadowRoot()}function sE(t){return t=t.constructor.clone(t),eE(t,null),t}function ju(t){var e=pt();let n=t.constructor.getType();return e=e._nodes.get(n),e===void 0&&G(97),e=e.replace,e!==null?(e=e(t),e instanceof t.constructor||G(98),e):t}function Nh(t,e){t=t.getParent(),!gn(t)||U(e)||tt(e)||G(99)}function Rh(t){return(tt(t)||U(t)&&!t.canBeEmpty())&&!t.isInline()}function dg(t,e,n){n.style.removeProperty("caret-color"),e._blockCursorElement=null,e=t.parentElement,e!==null&&e.removeChild(t)}function Xr(t){return wi?(t||window).getSelection():null}function aE(t,e){let n=t.getChildAtIndex(e);n==null&&(n=t),vr(t)&&G(102);let r=l=>{const s=l.getParentOrThrow(),a=vr(s),u=l!==n||a?sE(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]},[i,o]=r(n);return[i,o]}function Pd(t,e){for(;t!==Yr()&&t!=null;){if(e(t))return t;t=t.getParent()}return null}function lO(t){let e=[],n=[t];for(;0<n.length;){let r=n.pop();r===void 0&&G(112),U(r)&&n.unshift(...r.getChildren()),r!==t&&e.push(r)}return e}function Tf(t){return t.nodeType===1}function uE(t,e,n,r,i,o){for(t=t.getFirstChild();t!==null;){let l=t.__key;t.__parent===e&&(U(t)&&uE(t,l,n,r,i,o),n.has(l)||o.delete(l),i.push(l)),t=t.getNextSibling()}}function sO(t,e,n,r){t=t._nodeMap,e=e._nodeMap;let i=[];for(let[o]of r){let l=e.get(o);l===void 0||l.isAttached()||(U(l)&&uE(l,o,t,e,i,r),t.has(o)||r.delete(o),i.push(o))}for(let o of i)e.delete(o);for(let o of n)r=e.get(o),r===void 0||r.isAttached()||(t.has(o)||n.delete(o),e.delete(o))}let Nt="",fn="",oi="",io,tn,iu,cE=!1,xv=!1,Nf,Bc=null,fg,hg,Ko,oo,pg,ou;function Uc(t,e){let n=Ko.get(t);if(e!==null){let r=vg(t);r.parentNode===e&&e.removeChild(r)}oo.has(t)||tn._keyToDOMMap.delete(t),U(n)&&(t=Ad(n,Ko),gg(t,0,t.length-1,null)),n!==void 0&&yv(ou,iu,Nf,n,"destroyed")}function gg(t,e,n,r){for(;e<=n;++e){let i=t[e];i!==void 0&&Uc(i,r)}}function Eo(t,e){t.setProperty("text-align",e)}function dE(t,e){var n=io.theme.indent;if(typeof n=="string"){let r=t.classList.contains(n);0<e&&!r?t.classList.add(n):1>e&&r&&t.classList.remove(n)}n=getComputedStyle(t).getPropertyValue("--lexical-indent-base-value")||"40px",t.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${n})`)}function fE(t,e){t=t.style,e===0?Eo(t,""):e===1?Eo(t,"left"):e===2?Eo(t,"center"):e===3?Eo(t,"right"):e===4?Eo(t,"justify"):e===5?Eo(t,"start"):e===6&&Eo(t,"end")}function Wc(t,e,n){let r=oo.get(t);r===void 0&&G(60);let i=r.createDOM(io,tn);var o=tn._keyToDOMMap;if(i["__lexicalKey_"+tn._key]=t,o.set(t,i),ee(r)?i.setAttribute("data-lexical-text","true"):tt(r)&&i.setAttribute("data-lexical-decorator","true"),U(r)){if(t=r.__indent,o=r.__size,t!==0&&dE(i,t),o!==0){--o,t=Ad(r,oo);var l=fn;fn="",mg(t,r,0,o,i,null),pE(r,i),fn=l}t=r.__format,t!==0&&fE(i,t),r.isInline()||hE(null,r,i),Nd(r)&&(Nt+=`
102
-
103
- `,oi+=`
104
-
105
- `)}else o=r.getTextContent(),tt(r)?(l=r.decorate(tn,io),l!==null&&gE(t,l),i.contentEditable="false"):ee(r)&&(r.isDirectionless()||(fn+=o)),Nt+=o,oi+=o;return e!==null&&(n!=null?e.insertBefore(i,n):(n=e.__lexicalLineBreak,n!=null?e.insertBefore(i,n):e.appendChild(i))),yv(ou,iu,Nf,r,"created"),i}function mg(t,e,n,r,i,o){let l=Nt;for(Nt="";n<=r;++n)Wc(t[n],i,o);Nd(e)&&(Nt+=`
106
-
107
- `),i.__lexicalTextContent=Nt,Nt=l+Nt}function U0(t,e){return t=e.get(t),su(t)||tt(t)&&t.isInline()}function hE(t,e,n){t=t!==null&&(t.__size===0||U0(t.__last,Ko)),e=e.__size===0||U0(e.__last,oo),t?e||(e=n.__lexicalLineBreak,e!=null&&n.removeChild(e),n.__lexicalLineBreak=null):e&&(e=document.createElement("br"),n.__lexicalLineBreak=e,n.appendChild(e))}function pE(t,e){var n=e.__lexicalDir;if(e.__lexicalDirTextContent!==fn||n!==Bc){let o=fn==="";if(o)var r=Bc;else r=fn,r=GR.test(r)?"rtl":YR.test(r)?"ltr":null;if(r!==n){let l=e.classList,s=io.theme;var i=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;i!==void 0&&(typeof i=="string"&&(i=i.split(" "),i=s[n]=i),l.remove(...i)),r===null||o&&r==="ltr"?e.removeAttribute("dir"):(a!==void 0&&(typeof a=="string"&&(n=a.split(" "),a=s[r]=n),a!==void 0&&l.add(...a)),e.dir=r),xv||(t.getWritable().__dir=r)}Bc=r,e.__lexicalDirTextContent=fn,e.__lexicalDir=r}}function Ad(t,e){let n=[];for(t=t.__first;t!==null;){let r=e.get(t);r===void 0&&G(101),n.push(t),t=r.__next}return n}function ua(t,e){var n=Ko.get(t),r=oo.get(t);n!==void 0&&r!==void 0||G(61);var i=cE||hg.has(t)||fg.has(t);let o=Rd(tn,t);if(n===r&&!i)return U(n)?(r=o.__lexicalTextContent,r!==void 0&&(Nt+=r,oi+=r),r=o.__lexicalDirTextContent,r!==void 0&&(fn+=r)):(r=n.getTextContent(),ee(n)&&!n.isDirectionless()&&(fn+=r),oi+=r,Nt+=r),o;if(n!==r&&i&&yv(ou,iu,Nf,r,"updated"),r.updateDOM(n,o,io))return r=Wc(t,null,null),e===null&&G(62),e.replaceChild(r,o),Uc(t,null),r;if(U(n)&&U(r)){if(t=r.__indent,t!==n.__indent&&dE(o,t),t=r.__format,t!==n.__format&&fE(o,t),i){t=r,i=fn,fn="",e=Nt;var l=n.__size,s=t.__size;if(Nt="",l===1&&s===1){var a=n.__first,u=t.__first;if(a===u)ua(a,o);else{var c=vg(a);u=Wc(u,null,null),o.replaceChild(u,c),Uc(a,null)}}else{u=Ad(n,Ko);var d=Ad(t,oo);if(l===0)s!==0&&mg(d,t,0,s-1,o,null);else if(s===0)l!==0&&(a=o.__lexicalLineBreak==null,gg(u,0,l-1,a?null:o),a&&(o.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let m=o.firstChild,g=0;for(s=0;g<=d&&s<=l;){var h=f[g];let w=u[s];if(h===w)m=Oh(ua(w,o)),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(w);v?(y?(h=Rd(tn,w),h===m?m=Oh(ua(w,o)):(m!=null?o.insertBefore(h,m):o.appendChild(h),ua(w,o)),g++):Wc(w,o,m),s++):(m=Oh(vg(h)),Uc(h,o),g++)}}a=g>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:tn.getElementByKey(a),mg(u,t,s,l,o,a)):c&&!a&&gg(f,g,d,o)}}Nd(t)&&(Nt+=`
108
-
109
- `),o.__lexicalTextContent=Nt,Nt=e+Nt,pE(t,o),fn=i,gn(r)||r.isInline()||hE(n,r,o)}Nd(r)&&(Nt+=`
110
-
111
- `,oi+=`
112
-
113
- `)}else n=r.getTextContent(),tt(r)?(i=r.decorate(tn,io),i!==null&&gE(t,i)):ee(r)&&!r.isDirectionless()&&(fn+=n),Nt+=n,oi+=n;return!xv&&gn(r)&&r.__cachedText!==oi&&(r=r.getWritable(),r.__cachedText=oi),o}function gE(t,e){let n=tn._pendingDecorators,r=tn._decorators;if(n===null){if(r[t]===e)return;n=nE(tn)}n[t]=e}function Oh(t){return t=t.nextSibling,t!==null&&t===tn._blockCursorElement&&(t=t.nextSibling),t}function vg(t){let e=pg.get(t);return e===void 0&&G(75,t),e}let ei=Object.freeze({}),yg=[["keydown",gO],["pointerdown",uO],["compositionstart",hO],["compositionend",pO],["input",fO],["click",aO],["cut",ei],["copy",ei],["dragstart",ei],["dragover",ei],["dragend",ei],["paste",ei],["focus",ei],["blur",ei],["drop",ei]];bd&&yg.push(["beforeinput",(t,e)=>dO(t,e)]);let lu=0,mE=0,vE=0,Cl=null,$a=0,xg=!1,_g=!1,Ta=!1,ca=!1,yE=[0,"",0,"root",0];function xE(t,e,n,r,i){let o=t.anchor,l=t.focus,s=o.getNode();var a=pt();let u=Xr(a._window),c=u!==null?u.anchorNode:null,d=o.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!ee(s)||(!i&&(!bd||vE<r+50)||s.isDirty()&&2>f||rE(n))&&o.offset!==l.offset&&!s.isComposing()||ug(s)||s.isDirty()&&1<f||(i||!bd)&&a!==null&&!s.isComposing()&&c!==$d(a)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||s.getFormat()!==t.format||s.getStyle()!==t.style||oO(t,s)}function W0(t,e){return t!==null&&t.nodeValue!==null&&t.nodeType===3&&e!==0&&e!==t.nodeValue.length}function V0(t,e,n){let{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:l}=t;xg&&(xg=!1,W0(r,i)&&W0(o,l))||Wn(e,()=>{if(!n)Wr(null);else if(Iu(e,r,o)){var s=rt();if(ve(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){t.type==="Range"&&t.anchorNode===t.focusNode&&(s.dirty=!0);var c=$f(e).event;c=c?c.timeStamp:performance.now();let[d,f,h,m,g]=yE;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(ee(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}J(e,Ef,void 0)}})}function aO(t,e){Wn(e,()=>{let n=rt();var r=Xr(e._window);let i=Ts();if(r)if(ve(n)){let l=n.anchor;var o=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!gn(o)&&Yr().getChildrenSize()===1&&o.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):t.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),o!==r&&(U(o)?o.select(0):o.getParentOrThrow().select(0)))}else t.pointerType==="touch"&&(o=r.anchorNode,o!==null&&(o=o.nodeType,o===1||o===3))&&(r=wv(i,r,e),Wr(r));J(e,TS,t)})}function uO(t,e){let n=t.target;t=t.pointerType,n instanceof Node&&t!=="touch"&&Wn(e,()=>{tt(Du(n))||(_g=!0)})}function _E(t){return t.getTargetRanges?(t=t.getTargetRanges(),t.length===0?null:t[0]):null}function cO(t,e){return t!==e||U(t)||U(e)||!t.isToken()||!e.isToken()}function dO(t,e){let n=t.inputType,r=_E(t);n==="deleteCompositionText"||ro&&oE(e)||n!=="insertCompositionText"&&Wn(e,()=>{let i=rt();if(n==="deleteContentBackward"){if(i===null){var o=Ts();if(!ve(o))return;Wr(o.clone())}if(ve(i)){mE===229&&t.timeStamp<lu+30&&e.isComposing()&&i.anchor.key===i.focus.key?(Kt(null),lu=0,setTimeout(()=>{Wn(e,()=>{Kt(null)})},30),ve(i)&&(o=i.anchor.getNode(),o.markDirty(),i.format=o.getFormat(),i.style=o.getStyle())):(t.preventDefault(),J(e,tu,!0));return}}if(ve(i)){o=t.data,Cl!==null&&mv(!1,e,Cl),i.dirty&&Cl===null||!i.isCollapsed()||gn(i.anchor.getNode())||r===null||i.applyDOMRange(r),Cl=null;var l=i.focus,s=i.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")o===`
114
- `?(t.preventDefault(),J(e,ka,!1)):o===`
115
-
116
- `?(t.preventDefault(),J(e,og,void 0)):o==null&&t.dataTransfer?(o=t.dataTransfer.getData("text/plain"),t.preventDefault(),i.insertRawText(o)):o!=null&&xE(i,r,o,t.timeStamp,!0)?(t.preventDefault(),J(e,Gl,o)):Cl=o,vE=t.timeStamp;else switch(t.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":J(e,Gl,t);break;case"insertFromComposition":Kt(null),J(e,Gl,t);break;case"insertLineBreak":Kt(null),J(e,ka,!1);break;case"insertParagraph":Kt(null),Ta&&!Cf?(Ta=!1,J(e,ka,!1)):J(e,og,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":J(e,iv,t);break;case"deleteByComposition":cO(s,l)&&J(e,lg,t);break;case"deleteByDrag":case"deleteByCut":J(e,lg,t);break;case"deleteContent":J(e,tu,!1);break;case"deleteWordBackward":J(e,nu,!0);break;case"deleteWordForward":J(e,nu,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":J(e,ru,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":J(e,ru,!1);break;case"formatStrikeThrough":J(e,Ui,"strikethrough");break;case"formatBold":J(e,Ui,"bold");break;case"formatItalic":J(e,Ui,"italic");break;case"formatUnderline":J(e,Ui,"underline");break;case"historyUndo":J(e,ov,void 0);break;case"historyRedo":J(e,lv,void 0)}}})}function fO(t,e){t.stopPropagation(),Wn(e,()=>{var n=rt(),r=t.data,i=_E(t);if(r!=null&&ve(n)&&xE(n,i,r,t.timeStamp,!1)){ca&&(wg(e,r),ca=!1);var o=n.anchor,l=o.getNode();if(i=Xr(e._window),i===null)return;let s=o.offset;(o=bd&&!n.isCollapsed()&&ee(l)&&i.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),i=i.anchorNode,o=l===(i.nodeType===3?i.nodeValue:null)),o||J(e,Gl,r),r=r.length,ro&&1<r&&t.inputType==="insertCompositionText"&&!e.isComposing()&&(n.anchor.offset-=r),uv||Cf||cv||!e.isComposing()||(lu=0,Kt(null))}else mv(!1,e,r!==null?r:void 0),ca&&(wg(e,r||void 0),ca=!1);hn(),n=pt(),YS(n)}),Cl=null}function hO(t,e){Wn(e,()=>{let n=rt();if(ve(n)&&!e.isComposing()){let r=n.anchor,i=n.anchor.getNode();Kt(r.key),(t.timeStamp<lu+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||i.getStyle()!==n.style)&&J(e,Gl,ZR)}})}function wg(t,e){var n=t._compositionKey;if(Kt(null),n!==null&&e!=null){if(e===""){e=Dt(n),t=$d(t.getElementByKey(n)),t!==null&&t.nodeValue!==null&&ee(e)&&vv(e,t.nodeValue,null,null,!0);return}if(e[e.length-1]===`
117
- `&&(n=rt(),ve(n))){e=n.focus,n.anchor.set(e.key,e.offset,e.type),J(t,kd,null);return}}mv(!0,t,e)}function pO(t,e){ro?ca=!0:Wn(e,()=>{wg(e,t.data)})}function gO(t,e){if(lu=t.timeStamp,mE=t.keyCode,!e.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:l}=t;if(!J(e,NS,t)){if(n!==39||i||o||l)if(n!==39||l||r||!i&&!o)if(n!==37||i||o||l)if(n!==37||l||r||!i&&!o)if(n!==38||i||o)if(n!==40||i||o)if(n===13&&r)Ta=!0,J(e,kd,t);else if(n===32)J(e,IS,t);else if(Qt&&i&&n===79)t.preventDefault(),Ta=!0,J(e,ka,!0);else if(n!==13||r){var s=Qt?l||o?!1:n===8||n===72&&i:i||l||o?!1:n===8;s?n===8?J(e,DS,t):(t.preventDefault(),J(e,tu,!0)):n===27?J(e,jS,t):(s=Qt?r||l||o?!1:n===46||n===68&&i:i||l||o?!1:n===46,s?n===46?J(e,zS,t):(t.preventDefault(),J(e,tu,!1)):n===8&&(Qt?l:i)?(t.preventDefault(),J(e,nu,!0)):n===46&&(Qt?l:i)?(t.preventDefault(),J(e,nu,!1)):Qt&&o&&n===8?(t.preventDefault(),J(e,ru,!0)):Qt&&o&&n===46?(t.preventDefault(),J(e,ru,!1)):n===66&&!l&&(Qt?o:i)?(t.preventDefault(),J(e,Ui,"bold")):n===85&&!l&&(Qt?o:i)?(t.preventDefault(),J(e,Ui,"underline")):n===73&&!l&&(Qt?o:i)?(t.preventDefault(),J(e,Ui,"italic")):n!==9||l||i||o?n===90&&!r&&(Qt?o:i)?(t.preventDefault(),J(e,ov,void 0)):(s=Qt?n===90&&o&&r:n===89&&i||n===90&&i&&r,s?(t.preventDefault(),J(e,lv,void 0)):$s(e._editorState._selection)?(s=r?!1:n===67?Qt?o:i:!1,s?(t.preventDefault(),J(e,sv,t)):(s=r?!1:n===88?Qt?o:i:!1,s?(t.preventDefault(),J(e,av,t)):n===65&&(Qt?o:i)&&(t.preventDefault(),J(e,sg,t)))):!ro&&n===65&&(Qt?o:i)&&(t.preventDefault(),J(e,sg,t))):J(e,FS,t))}else Ta=!1,J(e,kd,t);else J(e,LS,t);else J(e,MS,t);else J(e,AS,t);else J(e,PS,t);else J(e,OS,t);else J(e,RS,t);(i||r||l||o)&&J(e,ZS,t)}}}function wE(t){let e=t.__lexicalEventHandles;return e===void 0&&(e=[],t.__lexicalEventHandles=e),e}let Yl=new Map;function SE(t){t=t.target;let e=Xr(t==null?null:t.nodeType===9?t.defaultView:t.ownerDocument.defaultView);if(e!==null){var n=pv(e.anchorNode);if(n!==null){_g&&(_g=!1,Wn(n,()=>{var l=Ts(),s=e.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=wv(l,e,n),Wr(l))})),t=gv(n),t=t[t.length-1];var r=t._key,i=Yl.get(r),o=i||t;o!==n&&V0(e,o,!1),V0(e,n,!0),n!==t?Yl.set(r,n):i&&Yl.delete(r)}}}function mO(t,e){$a===0&&t.ownerDocument.addEventListener("selectionchange",SE),$a++,t.__lexicalEditor=e;let n=wE(t);for(let r=0;r<yg.length;r++){let[i,o]=yg[r],l=typeof o=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,e.isEditable()&&o(s,e))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,e.isEditable()))switch(i){case"cut":return J(e,av,s);case"copy":return J(e,sv,s);case"paste":return J(e,iv,s);case"dragstart":return J(e,US,s);case"dragover":return J(e,WS,s);case"dragend":return J(e,VS,s);case"focus":return J(e,HS,s);case"blur":return J(e,KS,s);case"drop":return J(e,BS,s)}};t.addEventListener(i,l),n.push(()=>{t.removeEventListener(i,l)})}}function Sg(t,e,n){hn();var r=t.__key;let i=t.getParent();if(i!==null){var o=rt();if(ve(o)&&U(t)){var{anchor:l,focus:s}=o,a=l.getNode(),u=s.getNode();Od(a,t)&&l.set(t.__key,0,"element"),Od(u,t)&&s.set(t.__key,0,"element")}if(a=o,u=!1,ve(a)&&e){o=a.anchor;let c=a.focus;o.key===r&&(Ld(o,t,i,t.getPreviousSibling(),t.getNextSibling()),u=!0),c.key===r&&(Ld(c,t,i,t.getPreviousSibling(),t.getNextSibling()),u=!0)}else $s(a)&&e&&t.isSelected()&&t.selectPrevious();ve(a)&&e&&!u?(r=t.getIndexWithinParent(),Do(t),Md(a,i,r,-1)):Do(t),n||vr(i)||i.canBeEmpty()||!i.isEmpty()||Sg(i,e),e&&gn(i)&&i.isEmpty()&&i.selectEnd()}}class zu{static getType(){G(64,this.name)}static clone(){G(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,eE(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;e!==null;){if(e==="root")return!0;if(e=Dt(e),e===null)break;e=e.__parent}return!1}isSelected(e){if(e=e||rt(),e==null)return!1;let n=e.getNodes().some(r=>r.__key===this.__key);return ee(this)?n:ve(e)&&e.anchor.type==="element"&&e.focus.type==="element"&&e.anchor.key===e.focus.key&&e.anchor.offset===e.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(e===null)return-1;e=e.getFirstChild();let n=0;for(;e!==null;){if(this.is(e))return n;n++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return e===null?null:Dt(e)}getParentOrThrow(){let e=this.getParent();return e===null&&G(66,this.__key),e}getTopLevelElement(){let e=this;for(;e!==null;){let n=e.getParent();if(vr(n))return e;e=n}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return e===null&&G(67,this.__key),e}getParents(){let e=[],n=this.getParent();for(;n!==null;)e.push(n),n=n.getParent();return e}getParentKeys(){let e=[],n=this.getParent();for(;n!==null;)e.push(n.__key),n=n.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return e===null?null:Dt(e)}getPreviousSiblings(){let e=[];var n=this.getParent();if(n===null)return e;for(n=n.getFirstChild();n!==null&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return e===null?null:Dt(e)}getNextSiblings(){let e=[],n=this.getNextSibling();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getCommonAncestor(e){let n=this.getParents();var r=e.getParents();U(this)&&n.unshift(this),U(e)&&r.unshift(e),e=n.length;var i=r.length;if(e===0||i===0||n[e-1]!==r[i-1])return null;for(r=new Set(r),i=0;i<e;i++){let o=n[i];if(r.has(o))return o}return null}is(e){return e==null?!1:this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;var n=this.getCommonAncestor(e);let r=this;for(;;){var i=r.getParentOrThrow();if(i===n){i=r.getIndexWithinParent();break}r=i}for(r=e;;){if(e=r.getParentOrThrow(),e===n){n=r.getIndexWithinParent();break}r=e}return i<n}isParentOf(e){let n=this.__key;if(n===e.__key)return!1;for(;e!==null;){if(e.__key===n)return!0;e=e.getParent()}return!1}getNodesBetween(e){let n=this.isBefore(e),r=[],i=new Set;for(var o=this;;){var l=o.__key;if(i.has(l)||(i.add(l),r.push(o)),o===e)break;if(l=U(o)?n?o.getFirstChild():o.getLastChild():null,l!==null)o=l;else if(l=n?o.getNextSibling():o.getPreviousSibling(),l!==null)o=l;else{if(o=o.getParentOrThrow(),i.has(o.__key)||r.push(o),o===e)break;l=o;do l===null&&G(68),o=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(o!==null||i.has(l.__key)||r.push(l));while(o===null)}}return n||r.reverse(),r}isDirty(){let e=pt()._dirtyLeaves;return e!==null&&e.has(this.__key)}getLatest(){let e=Dt(this.__key);return e===null&&G(113),e}getWritable(){hn();var e=Qr(),n=pt();e=e._nodeMap;let r=this.__key,i=this.getLatest(),o=i.__parent;n=n._cloneNotNeeded;var l=rt();return l!==null&&(l._cachedNodes=null),n.has(r)?(Td(i),i):(l=i.constructor.clone(i),l.__parent=o,l.__next=i.__next,l.__prev=i.__prev,U(i)&&U(l)?(l.__first=i.__first,l.__last=i.__last,l.__size=i.__size,l.__indent=i.__indent,l.__format=i.__format,l.__dir=i.__dir):ee(i)&&ee(l)&&(l.__format=i.__format,l.__style=i.__style,l.__mode=i.__mode,l.__detail=i.__detail),n.add(r),l.__key=r,Td(l),e.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){G(70)}updateDOM(){G(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){G(72)}static importJSON(){G(18,this.name)}static transform(){return null}remove(e){Sg(this,!0,e)}replace(e,n){hn();var r=rt();r!==null&&(r=r.clone()),Nh(this,e);let i=this.getLatest(),o=this.__key,l=e.__key,s=e.getWritable();e=this.getParentOrThrow().getWritable();let a=e.__size;Do(s);let u=i.getPreviousSibling(),c=i.getNextSibling(),d=i.__prev,f=i.__next,h=i.__parent;return Sg(i,!1,!0),u===null?e.__first=l:u.getWritable().__next=l,s.__prev=d,c===null?e.__last=l:c.getWritable().__prev=l,s.__next=f,s.__parent=h,e.__size=a,n&&this.getChildren().forEach(m=>{s.append(m)}),ve(r)&&(Wr(r),n=r.anchor,r=r.focus,n.key===o&&Z0(n,s),r.key===o&&Z0(r,s)),Wi()===o&&Kt(l),s}insertAfter(e,n=!0){hn(),Nh(this,e);var r=this.getWritable();let i=e.getWritable();var o=i.getParent();let l=rt();var s=!1,a=!1;if(o!==null){var u=e.getIndexWithinParent();Do(i),ve(l)&&(a=o.__key,s=l.anchor,o=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=o.type==="element"&&o.key===a&&o.offset===u+1)}o=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=i.__key,d=r.__next;return o===null?u.__last=c:o.getWritable().__prev=c,u.__size++,r.__next=c,i.__next=d,i.__prev=r.__key,i.__parent=r.__parent,n&&ve(l)&&(n=this.getIndexWithinParent(),Md(l,u,n+1),r=u.__key,s&&l.anchor.set(r,n+2,"element"),a&&l.focus.set(r,n+2,"element")),e}insertBefore(e,n=!0){hn(),Nh(this,e);var r=this.getWritable();let i=e.getWritable(),o=i.__key;Do(i);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=o:l.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=a,i.__next=r.__key,i.__parent=r.__parent,r=rt(),n&&ve(r)&&(n=this.getParentOrThrow(),Md(r,n,u)),e}isParentRequired(){return!1}createParentElementNode(){return Zo()}selectPrevious(e,n){hn();let r=this.getPreviousSibling(),i=this.getParentOrThrow();return r===null?i.select(0,0):U(r)?r.select():ee(r)?r.select(e,n):(e=r.getIndexWithinParent()+1,i.select(e,e))}selectNext(e,n){hn();let r=this.getNextSibling(),i=this.getParentOrThrow();return r===null?i.select():U(r)?r.select(0,0):ee(r)?r.select(e,n):(e=r.getIndexWithinParent(),i.select(e,e))}markDirty(){this.getWritable()}}class ks extends zu{static getType(){return"linebreak"}static clone(e){return new ks(e.__key)}constructor(e){super(e)}getTextContent(){return`
118
- `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let n=e.parentElement,r,i;return n!==null&&((r=n.firstChild)===e||r.nextSibling===e&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((i=n.lastChild)===e||i.previousSibling===e&&i.nodeType===3&&(i.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:vO,priority:0}}}}static importJSON(){return cs()}exportJSON(){return{type:"linebreak",version:1}}}function vO(){return{node:cs()}}function cs(){return ju(new ks)}function su(t){return t instanceof ks}function Ph(t,e){return e&16?"code":e&128?"mark":e&32?"sub":e&64?"sup":null}function Ah(t,e){return e&1?"strong":e&2?"em":"span"}function Mh(t,e,n,r,i){t=r.classList,r=ba(i,"base"),r!==void 0&&t.add(...r),r=ba(i,"underlineStrikethrough");let o=!1,l=e&8&&e&4;var s=n&8&&n&4;r!==void 0&&(s?(o=!0,l||t.add(...r)):l&&t.remove(...r));for(let a in Io)s=Io[a],r=ba(i,a),r!==void 0&&(n&s?!o||a!=="underline"&&a!=="strikethrough"?(!(e&s)||l&&a==="underline"||a==="strikethrough")&&t.add(...r):e&s&&t.remove(...r):e&s&&t.remove(...r))}function Lh(t,e,n){let r=e.firstChild;if(n=n.isComposing(),t+=n?kf:"",r==null)e.textContent=t;else if(e=r.nodeValue,e!==t)if(n||ro){n=e.length;let i=t.length,o=0,l=0;for(;o<n&&o<i&&e[o]===t[o];)o++;for(;l+o<n&&l+o<i&&e[n-l-1]===t[i-l-1];)l++;t=[o,n-o-l,t.slice(o,i-l)];let[s,a,u]=t;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=t}function mc(t,e){return e=document.createElement(e),e.appendChild(t),e}class sl extends zu{static getType(){return"text"}static clone(e){return new sl(e.__text,e.__key)}constructor(e,n){super(n),this.__text=e,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let e=this.getLatest();return qR[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===Wi()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(e){return e=Io[e],(this.getFormat()&e)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(e,n){let r=this.getLatest().__format;return JS(r,e,n)}createDOM(e){var n=this.__format,r=Ph(this,n);let i=Ah(this,n),o=document.createElement(r===null?i:r),l=o;return this.hasFormat("code")&&o.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(i),o.appendChild(l)),r=l,Lh(this.__text,r,this),e=e.theme.text,e!==void 0&&Mh(i,0,n,r,e),n=this.__style,n!==""&&(o.style.cssText=n),o}updateDOM(e,n,r){let i=this.__text;var o=e.__format,l=this.__format,s=Ph(this,o);let a=Ph(this,l);var u=Ah(this,o);let c=Ah(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(o=n.firstChild,o==null&&G(48),e=s=document.createElement(c),Lh(i,e,this),r=r.theme.text,r!==void 0&&Mh(c,0,l,e,r),n.replaceChild(s,o),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&G(49)),Lh(i,u,this),r=r.theme.text,r!==void 0&&o!==l&&Mh(c,o,l,u,r),l=this.__style,e.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:_O,priority:0}),b:()=>({conversion:xO,priority:0}),code:()=>({conversion:Ri,priority:0}),em:()=>({conversion:Ri,priority:0}),i:()=>({conversion:Ri,priority:0}),s:()=>({conversion:Ri,priority:0}),span:()=>({conversion:yO,priority:0}),strong:()=>({conversion:Ri,priority:0}),sub:()=>({conversion:Ri,priority:0}),sup:()=>({conversion:Ri,priority:0}),u:()=>({conversion:Ri,priority:0})}}static importJSON(e){let n=Lt(e.text);return n.setFormat(e.format),n.setDetail(e.detail),n.setMode(e.mode),n.setStyle(e.style),n}exportDOM(e){return{element:e}=super.exportDOM(e),e!==null&&Tf(e)||G(132),e.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(e=mc(e,"b")),this.hasFormat("italic")&&(e=mc(e,"i")),this.hasFormat("strikethrough")&&(e=mc(e,"s")),this.hasFormat("underline")&&(e=mc(e,"u")),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let n=this.getWritable();return n.__format=typeof e=="string"?Io[e]:e,n}setDetail(e){let n=this.getWritable();return n.__detail=typeof e=="string"?XR[e]:e,n}setStyle(e){let n=this.getWritable();return n.__style=e,n}toggleFormat(e){return e=Io[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=JR[e],this.__mode===e)return this;let n=this.getWritable();return n.__mode=e,n}setTextContent(e){if(this.__text===e)return this;let n=this.getWritable();return n.__text=e,n}select(e,n){hn();let r=rt();var i=this.getTextContent();let o=this.__key;if(typeof i=="string"?(i=i.length,e===void 0&&(e=i),n===void 0&&(n=i)):n=e=0,ve(r))i=Wi(),i!==r.anchor.key&&i!==r.focus.key||Kt(o),r.setTextNodeRange(this,e,this,n);else return kE(o,e,o,n,"text","text");return r}spliceText(e,n,r,i){let o=this.getWritable(),l=o.__text,s=r.length,a=e;0>a&&(a=s+a,0>a&&(a=0));let u=rt();return i&&ve(u)&&(e+=s,u.setTextNodeRange(o,e,o,e)),n=l.slice(0,a)+r+l.slice(a+n),o.__text=n,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){hn();var n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=Wi(),l=new Set(e);e=[];for(var s=r.length,a="",u=0;u<s;u++)a!==""&&l.has(u)&&(e.push(a),a=""),a+=r[u];if(a!==""&&e.push(a),l=e.length,l===0)return[];if(e[0]===r)return[n];var c=e[0];r=n.getParentOrThrow(),u=n.getFormat();let d=n.getStyle(),f=n.__detail;s=!1,n.isSegmented()?(a=Lt(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=rt(),a=[a],c=c.length;for(let g=1;g<l;g++){var h=e[g],m=h.length;h=Lt(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let w=h.__key;if(m=c+m,ve(n)){let v=n.anchor,y=n.focus;v.key===i&&v.type==="text"&&v.offset>c&&v.offset<=m&&(v.key=w,v.offset-=c,n.dirty=!0),y.key===i&&y.type==="text"&&y.offset>c&&y.offset<=m&&(y.key=w,y.offset-=c,n.dirty=!0)}o===i&&Kt(w),c=m,a.push(h)}return i=this.getPreviousSibling(),o=this.getNextSibling(),i!==null&&Td(i),o!==null&&Td(o),i=r.getWritable(),o=this.getIndexWithinParent(),s?(i.splice(o,0,a),this.remove()):i.splice(o,1,a),ve(n)&&Md(n,r,o,l-1),a}mergeWithSibling(e){var n=e===this.getPreviousSibling();n||e===this.getNextSibling()||G(50);var r=this.__key;let i=e.__key,o=this.__text,l=o.length;Wi()===i&&Kt(r);let s=rt();if(ve(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===i&&(ex(a,n,r,e,l),s.dirty=!0),u!==null&&u.key===i&&(ex(u,n,r,e,l),s.dirty=!0)}return r=e.__text,this.setTextContent(n?r+o:o+r),n=this.getWritable(),e.remove(),n}isTextEntity(){return!1}}function yO(t){let e=t.style.fontWeight==="700",n=t.style.textDecoration==="line-through",r=t.style.fontStyle==="italic",i=t.style.textDecoration==="underline",o=t.style.verticalAlign;return{forChild:l=>(ee(l)&&(e&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),i&&l.toggleFormat("underline"),o==="sub"&&l.toggleFormat("subscript"),o==="super"&&l.toggleFormat("superscript")),l),node:null}}function xO(t){let e=t.style.fontWeight==="normal";return{forChild:n=>(ee(n)&&!e&&n.toggleFormat("bold"),n),node:null}}let H0=new WeakMap;function _O(t){t.parentElement===null&&G(129);for(var e=t.textContent||"",n,r=t.parentNode,i=[t];r!==null&&(n=H0.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)i.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<i.length;r++)H0.set(i[r],n);if(n!==null){for(e=e.split(/(\r?\n|\t)/),t=[],i=e.length,n=0;n<i;n++)r=e[n],r===`
119
- `||r===`\r
120
- `?t.push(cs()):r===" "?t.push(Rf()):r!==""&&t.push(Lt(r));return{node:t}}if(e=e.replace(/\r/g,"").replace(/[ \t\n]+/g," "),e==="")return{node:null};if(e[0]===" "){for(i=t,n=!0;i!==null&&(i=K0(i,!1))!==null;)if(r=i.textContent||"",0<r.length){/[ \t\n]$/.test(r)&&(e=e.slice(1)),n=!1;break}n&&(e=e.slice(1))}if(e[e.length-1]===" "){for(i=!0;t!==null&&(t=K0(t,!0))!==null;)if(0<(t.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){i=!1;break}i&&(e=e.slice(0,e.length-1))}return e===""?{node:null}:{node:Lt(e)}}let wO=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 K0(t,e){for(;;){for(var n=void 0;(n=e?t.nextSibling:t.previousSibling)===null;)if(t=t.parentElement,t===null)return null;if(t=n,t.nodeType===1&&(n=t.style.display,n===""&&t.nodeName.match(wO)===null||n!==""&&!n.startsWith("inline")))return null;for(;(n=e?t.firstChild:t.lastChild)!==null;)t=n;if(t.nodeType===3)return t;if(t.nodeName==="BR")return null}}let SO={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Ri(t){let e=SO[t.nodeName.toLowerCase()];return e===void 0?{node:null}:{forChild:n=>(ee(n)&&!n.hasFormat(e)&&n.toggleFormat(e),n),node:null}}function Lt(t=""){return ju(new sl(t))}function ee(t){return t instanceof sl}class bs extends sl{static getType(){return"tab"}static clone(e){let n=new bs(e.__key);return n.__text=e.__text,n.__format=e.__format,n.__style=e.__style,n}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let n=Rf();return n.setFormat(e.format),n.setStyle(e.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){G(126)}setDetail(){G(127)}setMode(){G(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Rf(){return ju(new bs)}class Vr{constructor(e,n,r){this._selection=null,this.key=e,this.offset=n,this.type=r}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let n=this.getNode(),r=e.getNode(),i=this.offset;if(e=e.offset,U(n)){var o=n.getDescendantByIndex(i);n=o??n}return U(r)&&(o=r.getDescendantByIndex(e),r=o??r),n===r?i<e:n.isBefore(r)}getNode(){let e=Dt(this.key);return e===null&&G(20),e}set(e,n,r){let i=this._selection,o=this.key;this.key=e,this.offset=n,this.type=r,Ns()||(Wi()===o&&Kt(e),i!==null&&(i._cachedNodes=null,i.dirty=!0))}}function Ih(t,e){let n=e.__key,r=t.offset,i="element";if(ee(e))i="text",e=e.getTextContentSize(),r>e&&(r=e);else if(!U(e)){var o=e.getNextSibling();ee(o)?(n=o.__key,r=0,i="text"):(o=e.getParent())&&(n=o.__key,r=e.getIndexWithinParent()+1)}t.set(n,r,i)}function Z0(t,e){if(U(e)){let n=e.getLastDescendant();U(n)||ee(n)?Ih(t,n):Ih(t,e)}else Ih(t,e)}function G0(t,e,n,r){let i=t.getNode(),o=i.getChildAtIndex(t.offset),l=Lt(),s=gn(i)?Zo().append(l):l;l.setFormat(n),l.setStyle(r),o===null?i.append(s):(o.insertBefore(s),e.type==="element"&&e.key===t.key&&e.offset!==t.offset&&e.set(e.key,e.offset+1,"element")),t.is(e)&&e.set(l.__key,0,"text"),t.set(l.__key,0,"text")}function Li(t,e,n,r){t.key=e,t.offset=n,t.type=r}class Of{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!$s(e))return!1;let n=this._nodes,r=e._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new Of(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,n){let r=this.getNodes(),i=r.length;var o=r[i-1];if(ee(o))o=o.select();else{let l=o.getIndexWithinParent()+1;o=o.getParentOrThrow().select(l,l)}for(o.insertNodes(e,n),e=0;e<i;e++)r[e].remove();return!0}getNodes(){var e=this._cachedNodes;if(e!==null)return e;var n=this._nodes;e=[];for(let r of n)n=Dt(r),n!==null&&e.push(n);return Ns()||(this._cachedNodes=e),e}getTextContent(){let e=this.getNodes(),n="";for(let r=0;r<e.length;r++)n+=e[r].getTextContent();return n}}function ve(t){return t instanceof al}function Eg(t){let[e,,n]=$E(t);t=n.getChildren();let r=t.length;var i=t[0].getChildren().length;let o=Array(r);for(var l=0;l<r;l++)o[l]=Array(i);for(i=0;i<r;i++){l=t[i].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;o[i][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++)o[i+f][s+h]=u;if(e===u)return{colSpan:d,columnIndex:s,rowIndex:i,rowSpan:c};s+=d}}return null}class Pf{constructor(e,n,r){this.gridKey=e,this.anchor=n,this.focus=r,this.dirty=!1,this._cachedNodes=null,n._selection=this,r._selection=this}is(e){return _v(e)?this.gridKey===e.gridKey&&this.anchor.is(e.anchor)&&this.focus.is(e.focus):!1}set(e,n,r){this.dirty=!0,this.gridKey=e,this.anchor.key=n,this.focus.key=r,this._cachedNodes=null}clone(){return new Pf(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return Vc(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,n){let r=this.focus.getNode();return fv(r.select(0,r.getChildrenSize())).insertNodes(e,n)}getShape(){var e=Dt(this.anchor.key);if(Qn(e)||G(103),e=Eg(e),e===null)throw Error("getCellRect: expected to find AnchorNode");var n=Dt(this.focus.key);Qn(n)||G(104);let r=Eg(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(e.columnIndex,r.columnIndex);let i=Math.max(e.columnIndex,r.columnIndex),o=Math.min(e.rowIndex,r.rowIndex);return e=Math.max(e.rowIndex,r.rowIndex),{fromX:Math.min(n,i),fromY:Math.min(o,e),toX:Math.max(n,i),toY:Math.max(o,e)}}getNodes(){function e(w){let{cell:v,startColumn:y,startRow:x}=w;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=Pd(r,Qn);var i=Pd(n,Qn);Qn(r)||G(103),Qn(i)||G(104),n=r.getParent(),uu(n)||G(105),n=n.getParent(),kv(n)||G(106);let[o,l,s]=bE(n,r,i),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,i=u;for(var f=a,h=u;a<r||u<i||c>f||d>h;){if(a<r){var m=h-i;--r;for(var g=0;g<=m;g++)e(o[i+g][r])}if(u<i)for(m=f-r,--i,g=0;g<=m;g++)e(o[i][r+g]);if(c>f)for(m=h-i,f+=1,g=0;g<=m;g++)e(o[i+g][f]);if(d>h)for(m=f-r,h+=1,g=0;g<=m;g++)e(o[h][r+g])}for(n=[n],r=null,i=u;i<=d;i++)for(f=a;f<=c;f++)({cell:h}=o[i][f]),m=h.getParent(),uu(m)||G(107),m!==r&&n.push(m),n.push(h,...lO(h)),r=m;return Ns()||(this._cachedNodes=n),n}getTextContent(){let e=this.getNodes(),n="";for(let r=0;r<e.length;r++)n+=e[r].getTextContent();return n}}function _v(t){return t instanceof Pf}class al{constructor(e,n,r,i){this.anchor=e,this.focus=n,this.dirty=!1,this.format=r,this.style=i,this._cachedNodes=null,e._selection=this,n._selection=this}is(e){return ve(e)?this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style:!1}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var e=this._cachedNodes;if(e!==null)return e;e=this.anchor;var n=this.focus,r=e.isBefore(n),i=r?e:n;r=r?n:e,e=i.getNode(),n=r.getNode();let o=i.offset;return i=r.offset,U(e)&&(r=e.getDescendantByIndex(o),e=r??e),U(n)&&(r=n.getDescendantByIndex(i),r!==null&&r!==e&&n.getChildAtIndex(i)===r&&(r=r.getPreviousSibling()),n=r??n),e=e.is(n)?U(e)&&0<e.getChildrenSize()?[]:[e]:e.getNodesBetween(n),Ns()||(this._cachedNodes=e),e}setTextNodeRange(e,n,r,i){Li(this.anchor,e.__key,n,"text"),Li(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let e=this.getNodes();if(e.length===0)return"";let n=e[0],r=e[e.length-1],i=this.anchor,o=this.focus,l=i.isBefore(o),[s,a]=Vc(this),u="",c=!0;for(let d=0;d<e.length;d++){let f=e[d];if(U(f)&&!f.isInline())c||(u+=`
121
- `),c=!f.isEmpty();else if(c=!1,ee(f)){let h=f.getTextContent();f===n?f===r?(i.type!=="element"||o.type!=="element"||o.offset===i.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!tt(f)&&!su(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(e){let n=pt(),r=n.getEditorState()._selection;if(e=CE(e.startContainer,e.startOffset,e.endContainer,e.endOffset,n,r),e!==null){var[i,o]=e;Li(this.anchor,i.key,i.offset,i.type),Li(this.focus,o.key,o.offset,o.type),this._cachedNodes=null}}clone(){let e=this.anchor,n=this.focus;return new al(new Vr(e.key,e.offset,e.type),new Vr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(e){this.format=JS(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){return(this.format&Io[e])!==0}insertRawText(e){e=e.split(/(\r?\n|\t)/);let n=[],r=e.length;for(let i=0;i<r;i++){let o=e[i];o===`
122
- `||o===`\r
123
- `?n.push(cs()):o===" "?n.push(Rf()):n.push(Lt(o))}this.insertNodes(n)}insertText(e){var n=this.anchor,r=this.focus,i=this.isCollapsed()||n.isBefore(r),o=this.format,l=this.style;i&&n.type==="element"?G0(n,r,o,l):i||r.type!=="element"||G0(r,n,o,l);var s=this.getNodes(),a=s.length,u=i?r:n;r=(i?n:r).offset;var c=u.offset;n=s[0],ee(n)||G(26),i=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===i&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(ee(h)&&h.canInsertTextBefore()&&!ug(h)||(h=Lt(),h.setFormat(o),d.canInsertTextAfter()?n.insertAfter(h):d.insertAfter(h)),h.select(0,0),n=h,e!==""){this.insertText(e);return}}else if(this.isCollapsed()&&r===0&&(n.isSegmented()||n.isToken()||!n.canInsertTextBefore()||!d.canInsertTextBefore()&&n.getPreviousSibling()===null)){if(h=n.getPreviousSibling(),(!ee(h)||ug(h))&&(h=Lt(),h.setFormat(o),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,e!==""){this.insertText(e);return}}else if(n.isSegmented()&&r!==i)d=Lt(n.getTextContent()),d.setFormat(o),n.replace(d),n=d;else if(!(this.isCollapsed()||e===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!U(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),EE(this.anchor,this.focus,null),this.insertText(e);return}if(a===1)if(n.isToken())e=Lt(e),e.select(),n.replace(e);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==o||a!==l))if(n.getTextContent()==="")n.setFormat(o),n.setStyle(l);else{s=Lt(e),s.setFormat(o),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-=e.length);return}n=n.spliceText(r,c-r,e,!0),n.getTextContent()===""?n.remove():this.anchor.type==="text"&&(n.isComposing()?this.anchor.offset-=e.length:(this.format=s,this.style=a))}else{if(o=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=U(n)?n:n.getParentOrThrow(),l=U(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(ee(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var m=Lt(f.getTextContent());f.replace(m),f=m}gn(u.getNode())||(f=f.spliceText(0,c,"")),o.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else o.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)||U(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))&&(o.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===i?n.select():(e=Lt(e),e.select(),n.replace(e)):(n=n.spliceText(r,i-r,e,!0),n.getTextContent()===""?n.remove():n.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=e.length)),e=1;e<a;e++)n=s[e],o.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())this.toggleFormat(e),Kt(null);else{var n=this.getNodes(),r=[];for(var i of n)ee(i)&&r.push(i);var o=r.length;if(o===0)this.toggleFormat(e),Kt(null);else{i=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:i,i=s?i: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(e,null);var c=o-1,d=r[c];if(o=i.type==="text"?i.offset:d.getTextContentSize(),u.is(d))l!==o&&(l===0&&o===u.getTextContentSize()?u.setFormat(s):(e=u.splitText(l,o),e=l===0?e[0]:e[1],e.setFormat(s),n.type==="text"&&n.set(e.__key,0,"text"),i.type==="text"&&i.set(e.__key,o-l,"text")),this.format=s);else{l!==0&&([,u]=u.splitText(l),l=0),u.setFormat(s);var f=d.getFormatFlags(e,s);for(0<o&&(o!==d.getTextContentSize()&&([d]=d.splitText(o)),d.setFormat(f)),a+=1;a<c;a++){let h=r[a];if(!h.isToken()){let m=h.getFormatFlags(e,f);h.setFormat(m)}}n.type==="text"&&n.set(u.__key,l,"text"),i.type==="text"&&i.set(d.__key,o,"text"),this.format=s|f}}}}}insertNodes(e,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,i=r.getNode().getNextSibling();if(i=i?i.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===i&&this.focus.offset===0){var o=Lt();this.focus.getNode().insertBefore(o)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(o=Lt(),this.focus.getNode().insertAfter(o));o&&(this.focus.set(o.__key,0,"text"),this.anchor.set(o.__key,0,"text"))}}o=this.anchor,r=o.offset;var l=o.getNode();i=l,o.type==="element"&&(o=o.getNode(),i=o.getChildAtIndex(r-1),i=i===null?o:i),o=[];var s=l.getNextSiblings(),a=vr(l)?null:l.getTopLevelElementOrThrow();if(ee(l))if(i=l.getTextContent().length,r===0&&i!==0)i=l.getPreviousSibling(),i=i!==null?i:l.getParentOrThrow(),o.push(l);else if(r===i)i=l;else{if(l.isToken())return!1;[i,l]=l.splitText(r),o.push(l)}l=i,o.push(...s),s=e[0];var u=!1,c=null;for(let m=0;m<e.length;m++){var d=e[m];if(vr(i)||tt(i)||!U(d)||d.isInline())u&&!U(d)&&!tt(d)&&vr(i.getParent())&&G(28);else{if(d.is(s)){if(U(i)&&i.isEmpty()&&i.canReplaceWith(d)){i.replace(d),i=d,u=!0;continue}if(u=d.getFirstDescendant(),qS(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,U(i)){var h=i.getFirstChild();for(let g=0;g<u;g++){let w=c[g];h===null?i.append(w):h.insertAfter(w),h=w}}else{for(h=u-1;0<=h;h--)i.insertAfter(c[h]);i=i.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}ee(i)&&(a===null&&G(27),i=a)}u=!1,U(i)&&!i.isInline()?(c=d,tt(d)&&!d.isInline()?i=e.length===1&&i.canBeEmpty()&&i.isEmpty()?i.insertBefore(d,!1):i.insertAfter(d,!1):U(d)?(d.canBeEmpty()||!d.isEmpty())&&(gn(i)?(f=i.getChildAtIndex(r),f!==null?f.insertBefore(d):i.append(d),i=d):d.isInline()?(i.append(d),i=d):i=i.insertAfter(d,!1)):(f=i.getFirstChild(),f!==null?f.insertBefore(d):i.append(d),i=d)):!U(d)||U(d)&&d.isInline()||tt(i)&&!i.isInline()?(c=d,ve(this)&&tt(d)&&(U(i)||ee(i))&&!d.isInline()?(ee(i)?(f=i.getParentOrThrow(),[i]=i.splitText(r),i=i.getIndexWithinParent()+1):(f=i,i=r),[,i]=aE(f,i),i=i.insertBefore(d)):i=i.insertAfter(d,!1)):(d=i.getParentOrThrow(),su(i)&&i.remove(),i=d,m--)}if(n&&(ee(l)?l.select():(e=i.getPreviousSibling(),ee(e)?e.select():(e=i.getIndexWithinParent(),i.getParentOrThrow().select(e,e)))),U(i)){if(e=ee(c)?c:U(c)&&c.isInline()?c.getLastDescendant():i.getLastDescendant(),n||(e===null?i.select():ee(e)?e.getTextContent()===""?e.selectPrevious():e.select():e.selectNext()),o.length!==0)for(n=i,e=o.length-1;0<=e;e--)r=o[e],a=r.getParentOrThrow(),!U(i)||Cg(r)||tt(r)&&(!r.isInline()||r.isIsolated())?U(i)||Cg(r)?U(r)&&!r.canInsertAfter(i)?(l=a.constructor.clone(a),U(l)||G(29),l.append(r),i.insertAfter(l)):i.insertAfter(r):(i.insertBefore(r),i=r):(n===i?i.append(r):i.insertBefore(r),i=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(ee(i)?i.select():(n=i.getParentOrThrow(),e=i.getIndexWithinParent()+1,n.select(e,e)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var e=this.anchor,n=e.offset,r=[];if(e.type==="text"){var i=e.getNode(),o=i.getNextSiblings().reverse(),l=i.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():i.getTextContentSize();n===0?o.push(i):(s&&(r=l.getNextSiblings()),n===a||s&&n===i.getTextContentSize()||([,i]=i.splitText(n),o.push(i)))}else{if(l=e.getNode(),vr(l)){o=Zo(),r=l.getChildAtIndex(n),o.select(),r!==null?r.insertBefore(o,!1):l.append(o);return}o=l.getChildren().slice(n).reverse()}if(i=o.length,n===0&&0<i&&l.isInline()){if(r=l.getParentOrThrow(),o=r.insertNewAfter(this,!1),U(o))for(r=r.getChildren(),l=0;l<r.length;l++)o.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(U(s))if(a=l.getFirstChild(),n===0&&(l.is(e.getNode())||a&&a.is(e.getNode()))&&0<i)l.insertBefore(s);else{if(l=null,n=r.length,e=s.getParentOrThrow(),0<n)for(a=0;a<n;a++)e.append(r[a]);if(i!==0)for(r=0;r<i;r++)n=o[r],l===null?s.append(n):l.insertBefore(n),l=n;s.canBeEmpty()||s.getChildrenSize()!==0?s.selectStart():(s.selectPrevious(),s.remove())}}insertLineBreak(e){let n=cs();var r=this.anchor;r.type==="element"&&(r=r.getNode(),gn(r)&&this.insertParagraph()),e?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return Vc(this)}extract(){var e=this.getNodes(),n=e.length,r=n-1,i=this.anchor;let o=this.focus;var l=e[0];let s=e[r],[a,u]=Vc(this);return n===0?[]:n===1?ee(l)&&!this.isCollapsed()?(e=a>u?u:a,r=l.splitText(e,a>u?a:u),e=e===0?r[0]:r[1],e!=null?[e]:[]):[l]:(n=i.isBefore(o),ee(l)&&(i=n?a:u,i===l.getTextContentSize()?e.shift():i!==0&&([,l]=l.splitText(i),e[0]=l)),ee(s)&&(l=s.getTextContent().length,n=n?u:a,n===0?e.pop():n!==l&&([s]=s.splitText(n),e[r]=s)),e)}modify(e,n,r){var i=this.focus,o=this.anchor,l=e==="move",s=cg(i,n);if(tt(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=kg(),n.add(s.__key),Wr(n)):(e=n?s.getPreviousSibling():s.getNextSibling(),ee(e)?(s=e.__key,n=n?e.getTextContent().length:0,i.set(s,n,"text"),l&&o.set(s,n,"text")):(r=s.getParentOrThrow(),U(e)?(r=e.__key,s=n?e.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),i.set(r,s,"element"),l&&o.set(r,s,"element")));else if(o=pt(),i=Xr(o._window)){var a=o._blockCursorElement,u=o._rootElement;if(u===null||a===null||!U(s)||s.isInline()||s.canBeEmpty()||dg(a,o,u),i.modify(e,n?"backward":"forward",r),0<i.rangeCount&&(s=i.getRangeAt(0),o=this.anchor.getNode(),o=gn(o)?o:lE(o),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),e=[],r=!1,a=0;a<l.length;a++)u=l[a],Od(u,o)?e.push(u):r=!0;r&&0<e.length&&(n?(n=e[0],U(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=e[e.length-1],U(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(i.anchorNode!==s.startContainer||i.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,i=l.key,s=l.offset,o=l.type,Li(l,n.key,n.offset,n.type),Li(n,i,s,o),this._cachedNodes=null)}}}deleteCharacter(e){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,i=this.focus,o=r.getNode();if(!e&&(r.type==="element"&&U(o)&&r.offset===o.getChildrenSize()||r.type==="text"&&r.offset===o.getTextContentSize())){var l=o.getParent();if(l=o.getNextSibling()||(l===null?null:l.getNextSibling()),U(l)&&l.isShadowRoot())return}if(l=cg(i,e),tt(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&U(o)&&o.getChildrenSize()===0?(o.remove(),e=kg(),e.add(l.__key),Wr(e)):(l.remove(),pt().dispatchCommand(Ef,void 0));return}if(!e&&U(l)&&U(o)&&o.isEmpty()){o.remove(),l.selectStart();return}if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l=i.type==="text"?i.getNode():null,o=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=i.offset,i=l.getTextContentSize(),l.is(o)||e&&r!==i||!e&&r!==0){X0(l,e,r);return}}else if(o!==null&&o.isSegmented()&&(r=r.offset,i=o.getTextContentSize(),o.is(l)||e&&r!==0||!e&&r!==i)){X0(o,e,r);return}if(o=this.anchor,l=this.focus,r=o.getNode(),i=l.getNode(),r===i&&o.type==="text"&&l.type==="text"){var s=o.offset,a=l.offset;let u=s<a;i=u?s:a,a=u?a:s,s=a-1,i!==s&&(r=r.getTextContent().slice(i,a),rE(r)||(e?l.offset=s:o.offset=s))}}}this.removeText(),e&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(e=this.anchor.getNode(),e.isEmpty()&&gn(e.getParent())&&e.getIndexWithinParent()===0&&e.collapseAtStart(this))}deleteLine(e){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",e,"lineboundary"),(e?this.focus:this.anchor).offset===0&&this.modify("extend",e,"character")),this.removeText()}deleteWord(e){this.isCollapsed()&&this.modify("extend",e,"word"),this.removeText()}}function $s(t){return t instanceof Of}function Y0(t){let e=t.offset;return t.type==="text"?e:(t=t.getNode(),e===t.getChildrenSize()?t.getTextContent().length:0)}function Vc(t){let e=t.anchor;return t=t.focus,e.type==="element"&&t.type==="element"&&e.key===t.key&&e.offset===t.offset?[0,0]:[Y0(e),Y0(t)]}function X0(t,e,n){let r=t.getTextContent().split(/(?=\s)/g),i=r.length,o=0,l=0;for(let s=0;s<i;s++){let a=r[s],u=s===i-1;if(l=o,o+=a.length,e&&o===n||o>n||u){r.splice(s,1),u&&(l=void 0);break}}e=r.join("").trim(),e===""?t.remove():(t.setTextContent(e),t.select(l,l))}function Q0(t,e,n,r){var i=e;if(t.nodeType===1){let s=!1;var o=t.childNodes,l=o.length;i===l&&(s=!0,i=l-1);let a=o[i];if(l=!1,a===r._blockCursorElement?(a=o[i+1],l=!0):r._blockCursorElement!==null&&i--,r=jl(a),ee(r))i=s?r.getTextContentSize():0;else{if(o=jl(t),o===null)return null;if(U(o)?(t=o.getChildAtIndex(i),(e=U(t))&&(e=t.getParent(),e=n===null||e===null||!e.canBeEmpty()||e!==n.getNode()),e&&(n=s?t.getLastDescendant():t.getFirstDescendant(),n===null?(o=t,i=0):(t=n,o=U(t)?t:t.getParentOrThrow())),ee(t)?(r=t,o=null,i=s?t.getTextContentSize():0):t!==o&&s&&!l&&i++):(i=o.getIndexWithinParent(),i=e===0&&tt(o)&&jl(t)===o?i:i+1,o=o.getParentOrThrow()),U(o))return new Vr(o.__key,i,"element")}}else r=jl(t);return ee(r)?new Vr(r.__key,i,"text"):null}function J0(t,e,n){var r=t.offset,i=t.getNode();r===0?(r=i.getPreviousSibling(),i=i.getParent(),e?(n||!e)&&r===null&&U(i)&&i.isInline()&&(e=i.getPreviousSibling(),ee(e)&&(t.key=e.__key,t.offset=e.getTextContent().length)):U(r)&&!n&&r.isInline()?(t.key=r.__key,t.offset=r.getChildrenSize(),t.type="element"):ee(r)&&(t.key=r.__key,t.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),e&&U(r)&&r.isInline()?(t.key=r.__key,t.offset=0,t.type="element"):(n||e)&&r===null&&U(i)&&i.isInline()&&!i.canInsertTextAfter()&&(e=i.getNextSibling(),ee(e)&&(t.key=e.__key,t.offset=0)))}function EE(t,e,n){if(t.type==="text"&&e.type==="text"){var r=t.isBefore(e);let i=t.is(e);J0(t,r,i),J0(e,!r,i),i&&(e.key=t.key,e.offset=t.offset,e.type=t.type),r=pt(),r.isComposing()&&r._compositionKey!==t.key&&ve(n)&&(r=n.anchor,n=n.focus,Li(t,r.key,r.offset,r.type),Li(e,n.key,n.offset,n.type))}}function CE(t,e,n,r,i,o){return t===null||n===null||!Iu(i,t,n)||(e=Q0(t,e,ve(o)?o.anchor:null,i),e===null)||(r=Q0(n,r,ve(o)?o.focus:null,i),r===null||e.type==="element"&&r.type==="element"&&(t=jl(t),n=jl(n),tt(t)&&tt(n)))?null:(EE(e,r,o),[e,r])}function Cg(t){return U(t)&&!t.isInline()}function kE(t,e,n,r,i,o){let l=Qr();return t=new al(new Vr(t,e,i),new Vr(n,r,o),0,""),t.dirty=!0,l._selection=t}function kg(){return new Of(new Set)}function EO(t){let e=t.getEditorState()._selection,n=Xr(t._window);return $s(e)||_v(e)?e.clone():wv(e,n,t)}function wv(t,e,n){var r=n._window;if(r===null)return null;var i=r.event,o=i?i.type:void 0;r=o==="selectionchange",i=!ag&&(r||o==="beforeinput"||o==="compositionstart"||o==="compositionend"||o==="click"&&i&&i.detail===3||o==="drop"||o===void 0);let l;if(!ve(t)||i){if(e===null)return null;if(i=e.anchorNode,o=e.focusNode,l=e.anchorOffset,e=e.focusOffset,r&&ve(t)&&!Iu(n,i,o))return t.clone()}else return t.clone();if(n=CE(i,l,o,e,n,t),n===null)return null;let[s,a]=n;return new al(s,a,ve(t)?t.format:0,ve(t)?t.style:"")}function rt(){return Qr()._selection}function Ts(){return pt()._editorState._selection}function Md(t,e,n,r=1){var i=t.anchor,o=t.focus,l=i.getNode(),s=o.getNode();if(e.is(l)||e.is(s)){if(l=e.__key,t.isCollapsed())e=i.offset,(n<=e&&0<r||n<e&&0>r)&&(n=Math.max(0,e+r),i.set(l,n,"element"),o.set(l,n,"element"),q0(t));else{let u=t.isBackward();s=u?o:i;var a=s.getNode();i=u?i:o,o=i.getNode(),e.is(a)&&(a=s.offset,(n<=a&&0<r||n<a&&0>r)&&s.set(l,Math.max(0,a+r),"element")),e.is(o)&&(e=i.offset,(n<=e&&0<r||n<e&&0>r)&&i.set(l,Math.max(0,e+r),"element"))}q0(t)}}function q0(t){var e=t.anchor,n=e.offset;let r=t.focus;var i=r.offset,o=e.getNode(),l=r.getNode();if(t.isCollapsed())U(o)&&(l=o.getChildrenSize(),l=(i=n>=l)?o.getChildAtIndex(l-1):o.getChildAtIndex(n),ee(l)&&(n=0,i&&(n=l.getTextContentSize()),e.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(U(o)){let s=o.getChildrenSize();n=(t=n>=s)?o.getChildAtIndex(s-1):o.getChildAtIndex(n),ee(n)&&(o=0,t&&(o=n.getTextContentSize()),e.set(n.__key,o,"text"))}U(l)&&(n=l.getChildrenSize(),i=(e=i>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(i),ee(i)&&(l=0,e&&(l=i.getTextContentSize()),r.set(i.__key,l,"text")))}}function CO(t,e){if(e=e.getEditorState()._selection,t=t._selection,ve(t)){var n=t.anchor;let r=t.focus,i;n.type==="text"&&(i=n.getNode(),i.selectionTransform(e,t)),r.type==="text"&&(n=r.getNode(),i!==n&&n.selectionTransform(e,t))}}function Ld(t,e,n,r,i){let o=null,l=0,s=null;r!==null?(o=r.__key,ee(r)?(l=r.getTextContentSize(),s="text"):U(r)&&(l=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,ee(i)?s="text":U(i)&&(s="element")),o!==null&&s!==null?t.set(o,l,s):(l=e.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),t.set(n.__key,l,"element"))}function ex(t,e,n,r,i){t.type==="text"?(t.key=n,e||(t.offset+=i)):t.offset>r.getIndexWithinParent()&&--t.offset}function bE(t,e,n){let r=[],i=null,o=null;t=t.getChildren();for(let c=0;c<t.length;c++){var l=t[c];uu(l)||G(108);var s=l.getChildren();l=0;for(let d of s){for(Qn(d)||G(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 w=0;w<m;w++)r[s+g][a+w]=f}e.is(u)&&(i=f),n.is(u)&&(o=f),l+=d.__colSpan}}return i===null&&G(110),o===null&&G(111),[r,i,o]}function $E(t){t instanceof Cv||(t instanceof zu?(t=Pd(t,Qn),Qn(t)||G(114)):(t=Pd(t.getNode(),Qn),Qn(t)||G(114)));let e=t.getParent();uu(e)||G(115);let n=e.getParent();return kv(n)||G(116),[t,e,n]}let jt=null,zt=null,On=!1,Dh=!1,au=0,tx={characterData:!0,childList:!0,subtree:!0};function Ns(){return On||jt!==null&&jt._readOnly}function hn(){On&&G(13)}function Qr(){return jt===null&&G(15),jt}function pt(){return zt===null&&G(16),zt}function nx(t,e,n){var r=e.__type;let i=t._nodes.get(r);for(i===void 0&&G(30,r),t=n.get(r),t===void 0&&(t=Array.from(i.transforms),n.set(r,t)),n=t.length,r=0;r<n&&(t[r](e),e.isAttached());r++);}function kO(t,e){e=e._dirtyLeaves,t=t._nodeMap;for(let n of e)e=t.get(n),ee(e)&&e.isAttached()&&e.isSimpleText()&&!e.isUnmergeable()&&QS(e)}function bO(t,e){let n=e._dirtyLeaves,r=e._dirtyElements;t=t._nodeMap;let i=Wi(),o=new Map;var l=n;let s=l.size;for(var a=r,u=a.size;0<s||0<u;){if(0<s){e._dirtyLeaves=new Set;for(let c of l)l=t.get(c),ee(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&QS(l),l!==void 0&&l!==void 0&&l.__key!==i&&l.isAttached()&&nx(e,l,o),n.add(c);if(l=e._dirtyLeaves,s=l.size,0<s){au++;continue}}e._dirtyLeaves=new Set,e._dirtyElements=new Map;for(let c of a)a=c[0],u=c[1],(a==="root"||u)&&(l=t.get(a),l!==void 0&&l!==void 0&&l.__key!==i&&l.isAttached()&&nx(e,l,o),r.set(a,u));l=e._dirtyLeaves,s=l.size,a=e._dirtyElements,u=a.size,au++}e._dirtyLeaves=n,e._dirtyElements=r}function Sv(t,e){var n=t.type,r=e.get(n);if(r===void 0&&G(17,n),n=r.klass,t.type!==n.getType()&&G(18,n.name),n=n.importJSON(t),t=t.children,U(n)&&Array.isArray(t))for(r=0;r<t.length;r++){let i=Sv(t[r],e);n.append(i)}return n}function rx(t,e){let n=jt,r=On,i=zt;jt=t,On=!0,zt=null;try{return e()}finally{jt=n,On=r,zt=i}}function jo(t,e){let n=t._pendingEditorState,r=t._rootElement,i=t._headless||r===null;if(n!==null){var o=t._editorState,l=o._selection,s=n._selection,a=t._dirtyType!==0,u=jt,c=On,d=zt,f=t._updating,h=t._observer,m=null;if(t._pendingEditorState=null,t._editorState=n,!i&&a&&h!==null){zt=t,jt=n,On=!1,t._updating=!0;try{let ze=t._dirtyType,Tt=t._dirtyElements,at=t._dirtyLeaves;h.disconnect();var g=ze,w=Tt,v=at;fn=oi=Nt="",cE=g===2,Bc=null,tn=t,io=t._config,iu=t._nodes,Nf=tn._listeners.mutation,fg=w,hg=v,Ko=o._nodeMap,oo=n._nodeMap,xv=n._readOnly,pg=new Map(t._keyToDOMMap);let ln=new Map;ou=ln,ua("root",null),ou=pg=io=oo=Ko=hg=fg=iu=tn=void 0,m=ln}catch(ze){if(ze instanceof Error&&t._onError(ze),Dh)throw ze;OE(t,null,r,n),XS(t),t._dirtyType=2,Dh=!0,jo(t,o),Dh=!1;return}finally{h.observe(r,tx),t._updating=f,jt=u,On=c,zt=d}}n._readOnly||(n._readOnly=!0);var y=t._dirtyLeaves,x=t._dirtyElements,S=t._normalizedNodes,b=t._updateTags,T=t._deferred;a&&(t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements=new Map,t._normalizedNodes=new Set,t._updateTags=new Set);var $=t._decorators,O=t._pendingDecorators||$,L=n._nodeMap,P;for(P in O)L.has(P)||(O===$&&(O=nE(t)),delete O[P]);var D=i?null:Xr(t._window);if(t._editable&&D!==null&&(a||s===null||s.dirty)){zt=t,jt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let ze=t._blockCursorElement;ze!==null&&dg(ze,t,r);e:{let Tt=D.anchorNode,at=D.focusNode,ln=D.anchorOffset,En=D.focusOffset,_t=document.activeElement;if(!(b.has("collaboration")&&_t!==r||_t!==null&&hv(_t)))if(ve(s)){var B=s.anchor,oe=s.focus,H=B.key,Z=oe.key,C=Rd(t,H),k=Rd(t,Z),E=B.offset,A=oe.offset,N=s.format,F=s.style,K=s.isCollapsed(),de=C,se=k,Ae=!1;if(B.type==="text"){de=$d(C);let At=B.getNode();Ae=At.getFormat()!==N||At.getStyle()!==F}else ve(l)&&l.anchor.type==="text"&&(Ae=!0);if(oe.type==="text"&&(se=$d(k)),de!==null&&se!==null){if(K&&(l===null||Ae||ve(l)&&(l.format!==N||l.style!==F))){var Ne=performance.now();yE=[N,F,E,H,Ne]}if(ln===E&&En===A&&Tt===de&&at===se&&(D.type!=="Range"||!K)&&(_t!==null&&r.contains(_t)||r.focus({preventScroll:!0}),B.type!=="element"))break e;try{D.setBaseAndExtent(de,E,se,A)}catch{}if(!b.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let At=s instanceof al&&s.anchor.type==="element"?de.childNodes[E]||null:0<D.rangeCount?D.getRangeAt(0):null;if(At!==null){let sn;if(At instanceof Text){let mt=document.createRange();mt.selectNode(At),sn=mt.getBoundingClientRect()}else sn=At.getBoundingClientRect();let Pn=r.ownerDocument,qr=Pn.defaultView;if(qr!==null)for(var{top:Q,bottom:je}=sn,be,Re,we=r;we!==null;){let mt=we===Pn.body;if(mt)be=0,Re=$f(t).innerHeight;else{let _o=we.getBoundingClientRect();be=_o.top,Re=_o.bottom}let Nr=0;if(Q<be?Nr=-(be-Q):je>Re&&(Nr=je-Re),Nr!==0)if(mt)qr.scrollBy(0,Nr);else{let _o=we.scrollTop;we.scrollTop+=Nr;let js=we.scrollTop-_o;Q-=js,je-=js}if(mt)break;we=bf(we)}}}xg=!0}}else l!==null&&Iu(t,Tt,at)&&D.removeAllRanges()}}e:{let ze=t._blockCursorElement;if(ve(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let Tt=s.anchor,at=Tt.getNode(),ln=Tt.offset,En=at.getChildrenSize(),_t=!1,At=null;if(ln===En){let sn=at.getChildAtIndex(ln-1);Rh(sn)&&(_t=!0)}else{let sn=at.getChildAtIndex(ln);if(Rh(sn)){let Pn=sn.getPreviousSibling();(Pn===null||Rh(Pn))&&(_t=!0,At=t.getElementByKey(sn.__key))}}if(_t){let sn=t.getElementByKey(at.__key);if(ze===null){let Pn=t._config.theme,qr=document.createElement("div");qr.contentEditable="false",qr.setAttribute("data-lexical-cursor","true");let mt=Pn.blockCursor;if(mt!==void 0){if(typeof mt=="string"){let Nr=mt.split(" ");mt=Pn.blockCursor=Nr}mt!==void 0&&qr.classList.add(...mt)}t._blockCursorElement=ze=qr}r.style.caretColor="transparent",At===null?sn.appendChild(ze):sn.insertBefore(ze,At);break e}}ze!==null&&dg(ze,t,r)}h!==null&&h.observe(r,tx)}finally{zt=d,jt=u}}if(m!==null){var Ie=m;let ze=Array.from(t._listeners.mutation),Tt=ze.length;for(let at=0;at<Tt;at++){let[ln,En]=ze[at],_t=Ie.get(En);_t!==void 0&&ln(_t,{dirtyLeaves:y,prevEditorState:o,updateTags:b})}}ve(s)||s===null||l!==null&&l.is(s)||t.dispatchCommand(Ef,void 0);var Qe=t._pendingDecorators;Qe!==null&&(t._decorators=Qe,t._pendingDecorators=null,Na("decorator",t,!0,Qe));var Wt=F0(e||o),Sn=F0(n);if(Wt!==Sn&&Na("textcontent",t,!0,Sn),Na("update",t,!0,{dirtyElements:x,dirtyLeaves:y,editorState:n,normalizedNodes:S,prevEditorState:e||o,tags:b}),t._deferred=[],T.length!==0){let ze=t._updating;t._updating=!0;try{for(let Tt=0;Tt<T.length;Tt++)T[Tt]()}finally{t._updating=ze}}var lr=t._updates;if(lr.length!==0){let ze=lr.shift();if(ze){let[Tt,at]=ze;TE(t,Tt,at)}}}}function Na(t,e,n,...r){let i=e._updating;e._updating=n;try{let o=Array.from(e._listeners[t]);for(t=0;t<o.length;t++)o[t].apply(null,r)}finally{e._updating=i}}function J(t,e,n){if(t._updating===!1||zt!==t){let o=!1;return t.update(()=>{o=J(t,e,n)}),o}let r=gv(t);for(let o=4;0<=o;o--)for(let l=0;l<r.length;l++){var i=r[l]._commands.get(e);if(i!==void 0&&(i=i[o],i!==void 0)){i=Array.from(i);let s=i.length;for(let a=0;a<s;a++)if(i[a](n,t)===!0)return!0}}return!1}function ix(t,e){let n=t._updates;for(e=e||!1;n.length!==0;){var r=n.shift();if(r){let[i,o]=r,l;o!==void 0&&(r=o.onUpdate,l=o.tag,o.skipTransforms&&(e=!0),r&&t._deferred.push(r),l&&t._updateTags.add(l)),i()}}return e}function TE(t,e,n){let r=t._updateTags;var i,o=i=!1;if(n!==void 0){var l=n.onUpdate;i=n.tag,i!=null&&r.add(i),i=n.skipTransforms||!1,o=n.discrete||!1}l&&t._deferred.push(l),n=t._editorState,l=t._pendingEditorState;let s=!1;(l===null||l._readOnly)&&(l=t._pendingEditorState=new Af(new Map((l||n)._nodeMap)),s=!0),l._flushSync=o,o=jt;let a=On,u=zt,c=t._updating;jt=l,On=!1,t._updating=!0,zt=t;try{s&&(t._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=EO(t));let d=t._compositionKey;e(),i=ix(t,i),CO(l,t),t._dirtyType!==0&&(i?kO(l,t):bO(l,t),ix(t),sO(n,l,t._dirtyLeaves,t._dirtyElements)),d!==t._compositionKey&&(l._flushSync=!0);let f=l._selection;if(ve(f)){let h=l._nodeMap,m=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(m)!==void 0||G(19)}else $s(f)&&f._nodes.size===0&&(l._selection=null)}catch(d){d instanceof Error&&t._onError(d),t._pendingEditorState=n,t._dirtyType=2,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),jo(t);return}finally{jt=o,On=a,zt=u,t._updating=c,au=0}t._dirtyType!==0||$O(l,t)?l._flushSync?(l._flushSync=!1,jo(t)):s&&rO(()=>{jo(t)}):(l._flushSync=!1,s&&(r.clear(),t._deferred=[],t._pendingEditorState=null))}function Wn(t,e,n){t._updating?t._updates.push([e,n]):TE(t,e,n)}class NE extends zu{constructor(e){super(e)}decorate(){G(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function tt(t){return t instanceof NE}class ul extends zu{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return QR[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n),n=n.getNextSibling();return e}getChildrenKeys(){let e=[],n=this.getFirstChild();for(;n!==null;)e.push(n.__key),n=n.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let e=pt()._dirtyElements;return e!==null&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(e)}getAllTextNodes(){let e=[],n=this.getFirstChild();for(;n!==null;){if(ee(n)&&e.push(n),U(n)){let r=n.getAllTextNodes();e.push(...r)}n=n.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;e!==null;){if(U(e)){let n=e.getFirstChild();if(n!==null){e=n;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;e!==null;){if(U(e)){let n=e.getLastChild();if(n!==null){e=n;continue}}break}return e}getDescendantByIndex(e){let n=this.getChildren(),r=n.length;return e>=r?(e=n[r-1],U(e)&&e.getLastDescendant()||e||null):(e=n[e],U(e)&&e.getFirstDescendant()||e||null)}getFirstChild(){let e=this.getLatest().__first;return e===null?null:Dt(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return e===null&&G(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return e===null?null:Dt(e)}getLastChildOrThrow(){let e=this.getLastChild();return e===null&&G(96,this.__key),e}getChildAtIndex(e){var n=this.getChildrenSize();let r;if(e<n/2){for(r=this.getFirstChild(),n=0;r!==null&&n<=e;){if(n===e)return r;r=r.getNextSibling(),n++}return null}for(r=this.getLastChild(),--n;r!==null&&n>=e;){if(n===e)return r;r=r.getPreviousSibling(),n--}return null}getTextContent(){let e="",n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){let o=n[i];e+=o.getTextContent(),U(o)&&i!==r-1&&!o.isInline()&&(e+=`
124
-
125
- `)}return e}getTextContentSize(){let e=0,n=this.getChildren(),r=n.length;for(let i=0;i<r;i++){let o=n[i];e+=o.getTextContentSize(),U(o)&&i!==r-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){return e!==""?(e=I0[e],(this.getFormat()&e)!==0):!1}select(e,n){hn();let r=rt(),i=e,o=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(e===0&&n===0){if(e=this.getFirstChild(),ee(e)||U(e))return e.select(0,0)}else if(!(e!==void 0&&e!==l||n!==void 0&&n!==l)&&(e=this.getLastChild(),ee(e)||U(e)))return e.select()}if(i===void 0&&(i=l),o===void 0&&(o=l),l=this.__key,ve(r))r.anchor.set(l,i,"element"),r.focus.set(l,o,"element"),r.dirty=!0;else return kE(l,i,l,o,"element","element");return r}selectStart(){let e=this.getFirstDescendant();return U(e)||ee(e)?e.select(0,0):e!==null?e.selectPrevious():this.select(0,0)}selectEnd(){let e=this.getLastDescendant();return U(e)||ee(e)?e.select():e!==null?e.selectNext():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(n=>n.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let n=this.getWritable();return n.__dir=e,n}setFormat(e){return this.getWritable().__format=e!==""?I0[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,n,r){let i=r.length,o=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(e+n),d=null,f=o-n+i;if(e!==0)if(e===o)d=this.getLastChild();else{var h=this.getChildAtIndex(e);h!==null&&(d=h.getPreviousSibling())}if(0<n){var m=d===null?this.getFirstChild():d.getNextSibling();for(h=0;h<n;h++){m===null&&G(100);var g=m.getNextSibling(),w=m.__key;m=m.getWritable(),Do(m),u.push(w),m=g}}for(h=d,g=0;g<i;g++){w=r[g],h!==null&&w.is(h)&&(d=h=h.getPreviousSibling()),m=w.getWritable(),m.__parent===s&&f--,Do(m);let v=w.__key;h===null?(l.__first=v,m.__prev=null):(h=h.getWritable(),h.__next=v,m.__prev=h.__key),w.__key===s&&G(76),m.__parent=s,a.push(v),h=w}if(e+n===o?h!==null&&(h.getWritable().__next=null,l.__last=h.__key):c!==null&&(e=c.getWritable(),h!==null?(n=h.getWritable(),e.__prev=h.__key,n.__next=c.__key):e.__prev=null),l.__size=f,u.length&&(e=rt(),ve(e))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=e;ox(v,u,a)&&Ld(v,v.getNode(),this,d,c),ox(y,u,a)&&Ld(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||vr(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 U(t){return t instanceof ul}function ox(t,e,n){for(t=t.getNode();t;){let r=t.__key;if(e.has(r)&&!n.has(r))return!0;t=t.getParent()}return!1}class Rs extends ul{static getType(){return"root"}static clone(){return new Rs}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){G(51)}getTextContent(){let e=this.__cachedText;return!Ns()&&pt()._dirtyType!==0||e===null?super.getTextContent():e}remove(){G(52)}replace(){G(53)}insertBefore(){G(54)}insertAfter(){G(55)}updateDOM(){return!1}append(...e){for(let n=0;n<e.length;n++){let r=e[n];U(r)||tt(r)||G(56)}return super.append(...e)}static importJSON(e){let n=Yr();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function gn(t){return t instanceof Rs}function $O(t,e){if(e=e.getEditorState()._selection,t=t._selection,t!==null){if(t.dirty||!t.is(e))return!0}else if(e!==null)return!0;return!1}function Ev(){return new Af(new Map([["root",new Rs]]))}function RE(t){let e=t.exportJSON();var n=t.constructor;e.type!==n.getType()&&G(130,n.name);let r=e.children;if(U(t))for(Array.isArray(r)||G(59,n.name),t=t.getChildren(),n=0;n<t.length;n++){let i=RE(t[n]);r.push(i)}return e}class Af{constructor(e,n){this._nodeMap=e,this._selection=n||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(e){return rx(this,e)}clone(e){return e=new Af(this._nodeMap,e===void 0?this._selection:e),e._readOnly=!0,e}toJSON(){return rx(this,()=>({root:RE(Yr())}))}}class Os extends ul{static getType(){return"paragraph"}static clone(e){return new Os(e.__key)}createDOM(e){let n=document.createElement("p");return e=ba(e.theme,"paragraph"),e!==void 0&&n.classList.add(...e),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:TO,priority:0})}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&Tf(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n),n=this.getIndent(),0<n&&(e.style.textIndent=`${20*n}px`)}return{element:e}}static importJSON(e){let n=Zo();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,n){e=Zo();let r=this.getDirection();return e.setDirection(r),this.insertAfter(e,n),e}collapseAtStart(){let e=this.getChildren();if(e.length===0||ee(e[0])&&e[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 TO(t){let e=Zo();return t.style&&(e.setFormat(t.style.textAlign),t=parseInt(t.style.textIndent,10)/20,0<t&&e.setIndent(t)),{node:e}}function Zo(){return ju(new Os)}function OE(t,e,n,r){let i=t._keyToDOMMap;i.clear(),t._editorState=Ev(),t._pendingEditorState=r,t._compositionKey=null,t._dirtyType=0,t._cloneNotNeeded.clear(),t._dirtyLeaves=new Set,t._dirtyElements.clear(),t._normalizedNodes=new Set,t._updateTags=new Set,t._updates=[],t._blockCursorElement=null,r=t._observer,r!==null&&(r.disconnect(),t._observer=null),e!==null&&(e.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function NO(t){let e=new Map,n=new Set;return t.forEach(r=>{if(r=r.klass.importDOM!=null?r.klass.importDOM.bind(r.klass):null,r!=null&&!n.has(r)){n.add(r);var i=r();i!==null&&Object.keys(i).forEach(o=>{let l=e.get(o);l===void 0&&(l=[],e.set(o,l)),l.push(i[o])})}}),e}class RO{constructor(e,n,r,i,o,l,s){this._parentEditor=n,this._rootElement=null,this._editorState=e,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=i,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=iE(),this._onError=o,this._htmlConversions=l,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(e){let n=this._listeners.update;return n.add(e),()=>{n.delete(e)}}registerEditableListener(e){let n=this._listeners.editable;return n.add(e),()=>{n.delete(e)}}registerDecoratorListener(e){let n=this._listeners.decorator;return n.add(e),()=>{n.delete(e)}}registerTextContentListener(e){let n=this._listeners.textcontent;return n.add(e),()=>{n.delete(e)}}registerRootListener(e){let n=this._listeners.root;return e(this._rootElement,null),n.add(e),()=>{e(null,this._rootElement),n.delete(e)}}registerCommand(e,n,r){r===void 0&&G(35);let i=this._commands;i.has(e)||i.set(e,[new Set,new Set,new Set,new Set,new Set]);let o=i.get(e);o===void 0&&G(36,String(e));let l=o[r];return l.add(n),()=>{l.delete(n),o.every(s=>s.size===0)&&i.delete(e)}}registerMutationListener(e,n){this._nodes.get(e.getType())===void 0&&G(37,e.name);let r=this._listeners.mutation;return r.set(n,e),()=>{r.delete(n)}}registerNodeTransformToKlass(e,n){var r=e.getType();return r=this._nodes.get(r),r===void 0&&G(37,e.name),r.transforms.add(n),r}registerNodeTransform(e,n){var r=this.registerNodeTransformToKlass(e,n);let i=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),i.push(r)),iO(this,e.getType()),()=>{i.forEach(o=>o.transforms.delete(n))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,n){return J(this,e,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let n=this._rootElement;if(e!==n){let l=ba(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=e,OE(this,n,e,r),n!==null){if(!this._config.disableEvents){$a!==0&&($a--,$a===0&&n.ownerDocument.removeEventListener("selectionchange",SE));var i=n.__lexicalEditor;if(i!=null){if(i._parentEditor!==null){var o=gv(i);o=o[o.length-1]._key,Yl.get(o)===i&&Yl.delete(o)}else Yl.delete(i._key);n.__lexicalEditor=null}for(i=wE(n),o=0;o<i.length;o++)i[o]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}e!==null?(r=(r=e.ownerDocument)&&r.defaultView||null,i=e.style,i.userSelect="text",i.whiteSpace="pre-wrap",i.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,XS(this),this._updateTags.add("history-merge"),jo(this),this._config.disableEvents||mO(e,this),l!=null&&e.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),Na("root",this,!1,e,n)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,n){e.isEmpty()&&G(38),YS(this);let r=this._pendingEditorState,i=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&i.add(n),jo(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&i.add(n),jo(this)}parseEditorState(e,n){e=typeof e=="string"?JSON.parse(e):e;let r=Ev(),i=jt,o=On,l=zt,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,jt=r,On=!1,zt=this;try{Sv(e.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,jt=i,On=o,zt=l}return r}update(e,n){Wn(this,e,n)}focus(e,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Wn(this,()=>{let i=rt(),o=Yr();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;e!==null&&e.blur(),e=Xr(this._window),e!==null&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Na("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Cv extends ul{constructor(e,n){super(n),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Qn(t){return t instanceof Cv}class PE extends ul{}function kv(t){return t instanceof PE}class AE extends ul{}function uu(t){return t instanceof AE}j.$addUpdateTag=function(t){hn(),pt()._updateTags.add(t)};j.$applyNodeReplacement=ju;j.$copyNode=sE;j.$createLineBreakNode=cs;j.$createNodeSelection=kg;j.$createParagraphNode=Zo;j.$createRangeSelection=function(){let t=new Vr("root",0,"element"),e=new Vr("root",0,"element");return new al(t,e,0,"")};j.$createTabNode=Rf;j.$createTextNode=Lt;j.$getAdjacentNode=cg;j.$getNearestNodeFromDOMNode=Du;j.$getNearestRootOrShadowRoot=lE;j.$getNodeByKey=Dt;j.$getPreviousSelection=Ts;j.$getRoot=Yr;j.$getSelection=rt;j.$getTextContent=function(){let t=rt();return t===null?"":t.getTextContent()};j.$hasAncestor=Od;j.$hasUpdateTag=function(t){return pt()._updateTags.has(t)};j.$insertNodes=function(t,e){let n=rt()||Ts();return n===null&&(n=Yr().selectEnd()),n.insertNodes(t,e)};j.$isBlockElementNode=Cg;j.$isDecoratorNode=tt;j.$isElementNode=U;j.$isInlineElementOrDecoratorNode=function(t){return U(t)&&t.isInline()||tt(t)&&t.isInline()};j.$isLeafNode=qS;j.$isLineBreakNode=su;j.$isNodeSelection=$s;j.$isParagraphNode=function(t){return t instanceof Os};j.$isRangeSelection=ve;j.$isRootNode=gn;j.$isRootOrShadowRoot=vr;j.$isTabNode=function(t){return t instanceof bs};j.$isTextNode=ee;j.$nodesOfType=function(t){var e=Qr();let n=e._readOnly,r=t.getType();e=e._nodeMap;let i=[];for(let[,o]of e)o instanceof t&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i};j.$normalizeSelection__EXPERIMENTAL=fv;j.$parseSerializedNode=function(t){return Sv(t,pt()._nodes)};j.$selectAll=function(){var t=Yr();t=t.select(0,t.getChildrenSize()),Wr(fv(t))};j.$setCompositionKey=Kt;j.$setSelection=Wr;j.$splitNode=aE;j.BLUR_COMMAND=KS;j.CAN_REDO_COMMAND={};j.CAN_UNDO_COMMAND={};j.CLEAR_EDITOR_COMMAND={};j.CLEAR_HISTORY_COMMAND={};j.CLICK_COMMAND=TS;j.COMMAND_PRIORITY_CRITICAL=4;j.COMMAND_PRIORITY_EDITOR=0;j.COMMAND_PRIORITY_HIGH=3;j.COMMAND_PRIORITY_LOW=1;j.COMMAND_PRIORITY_NORMAL=2;j.CONTROLLED_TEXT_INSERTION_COMMAND=Gl;j.COPY_COMMAND=sv;j.CUT_COMMAND=av;j.DELETE_CHARACTER_COMMAND=tu;j.DELETE_LINE_COMMAND=ru;j.DELETE_WORD_COMMAND=nu;j.DEPRECATED_$computeGridMap=bE;j.DEPRECATED_$createGridSelection=function(){let t=new Vr("root",0,"element"),e=new Vr("root",0,"element");return new Pf("root",t,e)};j.DEPRECATED_$getGridCellNodeRect=Eg;j.DEPRECATED_$getNodeTriplet=$E;j.DEPRECATED_$isGridCellNode=Qn;j.DEPRECATED_$isGridNode=kv;j.DEPRECATED_$isGridRowNode=uu;j.DEPRECATED_$isGridSelection=_v;j.DEPRECATED_GridCellNode=Cv;j.DEPRECATED_GridNode=PE;j.DEPRECATED_GridRowNode=AE;j.DRAGEND_COMMAND=VS;j.DRAGOVER_COMMAND=WS;j.DRAGSTART_COMMAND=US;j.DROP_COMMAND=BS;j.DecoratorNode=NE;j.ElementNode=ul;j.FOCUS_COMMAND=HS;j.FORMAT_ELEMENT_COMMAND={};j.FORMAT_TEXT_COMMAND=Ui;j.INDENT_CONTENT_COMMAND={};j.INSERT_LINE_BREAK_COMMAND=ka;j.INSERT_PARAGRAPH_COMMAND=og;j.INSERT_TAB_COMMAND={};j.KEY_ARROW_DOWN_COMMAND=LS;j.KEY_ARROW_LEFT_COMMAND=PS;j.KEY_ARROW_RIGHT_COMMAND=RS;j.KEY_ARROW_UP_COMMAND=MS;j.KEY_BACKSPACE_COMMAND=DS;j.KEY_DELETE_COMMAND=zS;j.KEY_DOWN_COMMAND=NS;j.KEY_ENTER_COMMAND=kd;j.KEY_ESCAPE_COMMAND=jS;j.KEY_MODIFIER_COMMAND=ZS;j.KEY_SPACE_COMMAND=IS;j.KEY_TAB_COMMAND=FS;j.LineBreakNode=ks;j.MOVE_TO_END=OS;j.MOVE_TO_START=AS;j.OUTDENT_CONTENT_COMMAND={};j.PASTE_COMMAND=iv;j.ParagraphNode=Os;j.REDO_COMMAND=lv;j.REMOVE_TEXT_COMMAND=lg;j.RootNode=Rs;j.SELECTION_CHANGE_COMMAND=Ef;j.SELECT_ALL_COMMAND=sg;j.TabNode=bs;j.TextNode=sl;j.UNDO_COMMAND=ov;j.createCommand=function(){return{}};j.createEditor=function(t){var e=t||{},n=zt,r=e.theme||{};let i=t===void 0?n:e.parentEditor||null,o=e.disableEvents||!1,l=Ev(),s=e.namespace||(i!==null?i._config.namespace:iE()),a=e.editorState,u=[Rs,sl,ks,bs,Os,...e.nodes||[]],c=e.onError;if(e=e.editable!==void 0?e.editable:!0,t===void 0&&n!==null)t=n._nodes;else for(t=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(),w=new Set;g!==null&&w.add(g),t.set(m,{klass:f,replace:h,replaceWithKlass:d,transforms:w})}return r=new RO(l,i,t,{disableEvents:o,namespace:s,theme:r},c||console.error,NO(t),e),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};j.getNearestEditorFromDOMNode=pv;j.isHTMLAnchorElement=function(t){return Tf(t)&&t.tagName==="A"};j.isHTMLElement=Tf;j.isSelectionCapturedInDecoratorInput=hv;j.isSelectionWithinEditor=Iu;const OO=j;var _e=OO,$t={},Ut={},ae=_e;let Id=new Map;function lx(t){for(;t!=null;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function sx(t){let e=t.parentNode;if(e==null)throw Error("Should never happen");return[e,Array.from(e.childNodes).indexOf(t)]}function ME(t){let e={};t=t.split(";");for(let n of t)if(n!==""){let[r,i]=n.split(/:([^]+)/);e[r.trim()]=i.trim()}return e}function Dd(t){let e=Id.get(t);return e===void 0&&(e=ME(t),Id.set(t,e)),e}function PO(t){let e="";for(let n in t)n&&(e+=`${n}: ${t[n]};`);return e}function ml(t,e){var n=Dd("getStyle"in t?t.getStyle():t.style);e=Object.entries(e).reduce((r,[i,o])=>(o===null?delete r[i]:r[i]=o,r),{...n}),n=PO(e),t.setStyle(n),Id.set(n,e)}function LE(t,e){var n=t.getNodes(),r=n.length;if(ae.DEPRECATED_$isGridSelection(t)){for(var i=ae.$createRangeSelection(),o=i.anchor,l=i.focus,s=0;s<r;s++){var a=n[s];ae.DEPRECATED_$isGridCellNode(a)&&(o.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),LE(ae.$normalizeSelection__EXPERIMENTAL(i),e))}ae.$setSelection(t)}else if(--r,i=n[0],o=n[r],t.isCollapsed())ml(t,e);else{var u=t.anchor,c=t.focus;s=i.getTextContent().length,a=c.offset;var d=u.offset,f=u.isBefore(c);l=f?d:a,t=f?a:d;var h=f?u.type:c.type,m=f?c.type:u.type;if(u=f?c.key:u.key,ae.$isTextNode(i)&&l===s&&(c=i.getNextSibling(),ae.$isTextNode(c)&&(l=d=0,i=c)),n.length===1)ae.$isTextNode(i)&&(l=h==="element"?0:d>a?a:d,t=m==="element"?s:d>a?d:a,l!==t&&(l===0&&t===s?(ml(i,e),i.select(l,t)):(n=i.splitText(l,t),n=l===0?n[0]:n[1],ml(n,e),n.select(0,t-l))));else for(ae.$isTextNode(i)&&l<i.getTextContentSize()&&(l!==0&&(i=i.splitText(l)[1]),ml(i,e)),ae.$isTextNode(o)&&(l=o.getTextContent().length,o.__key!==u&&t!==0&&(t=l),t!==l&&([o]=o.splitText(t)),t!==0&&ml(o,e)),t=1;t<r;t++)l=n[t],s=l.getKey(),ae.$isTextNode(l)&&s!==i.getKey()&&s!==o.getKey()&&!l.isToken()&&ml(l,e)}}function AO(t){for(;t!==null&&!ae.$isRootOrShadowRoot(t);){let e=t.getLatest(),n=t.getParent();e.getChildrenSize()===0&&t.remove(!0),t=n}}function jh(t,e,n,r,i=null){if(e.length!==0){var o=e[0],l=new Map,s=[];o=ae.$isElementNode(o)?o:o.getParentOrThrow(),o.isInline()&&(o=o.getParentOrThrow());for(var a=!1;o!==null;){var u=o.getPreviousSibling();if(u!==null){o=u,a=!0;break}if(o=o.getParentOrThrow(),ae.$isRootOrShadowRoot(o))break}u=new Set;for(var c=0;c<n;c++){var d=e[c];ae.$isElementNode(d)&&d.getChildrenSize()===0&&u.add(d.getKey())}var f=new Set;for(c=0;c<n;c++){d=e[c];var h=d.getParent();if(h!==null&&h.isInline()&&(h=h.getParent()),h!==null&&ae.$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()),ae.$isElementNode(g)&&g.getChildrenKeys().forEach(w=>f.add(w))}),AO(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(i!==null)for(e=0;e<s.length;e++)i.append(s[e]);if(e=null,ae.$isRootOrShadowRoot(o))if(a)if(i!==null)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)o.insertAfter(s[i]);else if(a=o.getFirstChild(),ae.$isElementNode(a)&&(o=a),a===null)if(i)o.append(i);else for(i=0;i<s.length;i++)a=s[i],o.append(a),e=a;else if(i!==null)a.insertBefore(i);else for(o=0;o<s.length;o++)i=s[o],a.insertBefore(i),e=i;else if(i)o.insertAfter(i);else for(i=s.length-1;0<=i;i--)a=s[i],o.insertAfter(a),e=a;s=ae.$getPreviousSelection(),ae.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?ae.$setSelection(s.clone()):e!==null?e.selectEnd():t.dirty=!0}}function IE(t,e,n,r){t.modify(e?"extend":"move",n,r)}function DE(t){return t=t.anchor.getNode(),(ae.$isRootNode(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}Ut.$addNodeStyle=function(t){t=t.getStyle();let e=ME(t);Id.set(t,e)};Ut.$cloneWithProperties=function(t){let e=t.constructor.clone(t);return e.__parent=t.__parent,e.__next=t.__next,e.__prev=t.__prev,ae.$isElementNode(t)&&ae.$isElementNode(e)?(e.__first=t.__first,e.__last=t.__last,e.__size=t.__size,e.__format=t.__format,e.__indent=t.__indent,e.__dir=t.__dir,e):(ae.$isTextNode(t)&&ae.$isTextNode(e)&&(e.__format=t.__format,e.__style=t.__style,e.__mode=t.__mode,e.__detail=t.__detail),e)};Ut.$getSelectionStyleValueForProperty=function(t,e,n=""){let r=null,i=t.getNodes();var o=t.anchor,l=t.focus,s=t.isBackward();let a=s?l.offset:o.offset;if(o=s?l.getNode():o.getNode(),t.style!==""&&(t=Dd(t.style),t!==null&&e in t))return t[e];for(t=0;t<i.length;t++){var u=i[t];if((t===0||a!==0||!u.is(o))&&ae.$isTextNode(u)){if(l=e,s=n,u=u.getStyle(),u=Dd(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Ut.$isAtNodeEnd=function(t){return t.type==="text"?t.offset===t.getNode().getTextContentSize():t.offset===t.getNode().getChildrenSize()};Ut.$isParentElementRTL=DE;Ut.$moveCaretSelection=IE;Ut.$moveCharacter=function(t,e,n){let r=DE(t);IE(t,e,n?!r:r,"character")};Ut.$patchStyleText=LE;Ut.$selectAll=function(t){let e=t.anchor;t=t.focus;var n=e.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let i="element",o="element",l=0;ae.$isTextNode(r)?i="text":ae.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),ae.$isTextNode(n)?(o="text",l=n.getTextContentSize()):ae.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(e.set(r.getKey(),0,i),t.set(n.getKey(),l,o))};Ut.$setBlocksType=function(t,e){if(t.anchor.key==="root"){e=e();var n=ae.$getRoot();(t=n.getFirstChild())?t.replace(e,!0):n.append(e)}else for(n=t.getNodes(),t=t.anchor.getNode().getParentOrThrow(),n.indexOf(t)===-1&&n.push(t),t.isInline()&&(t=t.getParentOrThrow(),n.indexOf(t)===-1&&n.push(t)),t=0;t<n.length;t++){let o=n[t];var r=o;if(!ae.$isElementNode(r)||ae.$isRootOrShadowRoot(r))r=!1;else{var i=r.getFirstChild();i=i===null||ae.$isLineBreakNode(i)||ae.$isTextNode(i)||i.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&i}r&&(r=e(),r.setFormat(o.getFormatType()),r.setIndent(o.getIndent()),o.replace(r,!0))}};Ut.$shouldOverrideDefaultCharacterSelection=function(t,e){return t=ae.$getAdjacentNode(t.focus,e),ae.$isDecoratorNode(t)&&!t.isIsolated()||ae.$isElementNode(t)&&!t.isInline()&&!t.canBeEmpty()};Ut.$sliceSelectedTextNodeContent=function(t,e){if(e.isSelected()&&!e.isSegmented()&&!e.isToken()&&(ae.$isRangeSelection(t)||ae.DEPRECATED_$isGridSelection(t))){var n=t.anchor.getNode(),r=t.focus.getNode(),i=e.is(n),o=e.is(r);if(i||o){i=t.isBackward();let[l,s]=t.getCharacterOffsets();t=n.is(r),o=e.is(i?r:n),r=e.is(i?n:r),n=0;let a;t?(n=l>s?s:l,a=l>s?l:s):o?(n=i?s:l,a=void 0):r&&(i=i?l:s,n=0,a=i),e.__text=e.__text.slice(n,a)}}return e};Ut.$wrapNodes=function(t,e,n=null){var r=t.getNodes();let i=r.length;var o=t.anchor;if(i===0||i===1&&o.type==="element"&&o.getNode().getChildrenSize()===0){t=o.type==="text"?o.getNode().getParentOrThrow():o.getNode(),r=t.getChildren();let s=e();s.setFormat(t.getFormatType()),s.setIndent(t.getIndent()),r.forEach(a=>s.append(a)),n&&(s=n.append(s)),t.replace(s)}else{o=null;var l=[];for(let s=0;s<i;s++){let a=r[s];ae.$isRootOrShadowRoot(a)?(jh(t,l,l.length,e,n),l=[],o=a):o===null||o!==null&&ae.$hasAncestor(a,o)?l.push(a):(jh(t,l,l.length,e,n),l=[a])}jh(t,l,l.length,e,n)}};Ut.createDOMRange=function(t,e,n,r,i){let o=e.getKey(),l=r.getKey(),s=document.createRange(),a=t.getElementByKey(o);if(t=t.getElementByKey(l),ae.$isTextNode(e)&&(a=lx(a)),ae.$isTextNode(r)&&(t=lx(t)),e===void 0||r===void 0||a===null||t===null)return null;a.nodeName==="BR"&&([a,n]=sx(a)),t.nodeName==="BR"&&([t,i]=sx(t)),e=a.firstChild,a===t&&e!=null&&e.nodeName==="BR"&&n===0&&i===0&&(i=1);try{s.setStart(a,n),s.setEnd(t,i)}catch{return null}return!s.collapsed||n===i&&o===l||(s.setStart(t,i),s.setEnd(a,n)),s};Ut.createRectsFromDOMRange=function(t,e){var n=t.getRootElement();if(n===null)return[];t=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),e=Array.from(e.getClientRects());let r=e.length;e.sort((o,l)=>{let s=o.top-l.top;return 3>=Math.abs(s)?o.left-l.left:s});let i;for(let o=0;o<r;o++){let l=e[o],s=l.width+n===t.width;i&&i.top<=l.top&&i.top+i.height>l.top&&i.left+i.width>l.left||s?(e.splice(o--,1),r--):i=l}return e};Ut.getStyleObjectFromCSS=Dd;Ut.trimTextContentFromAnchor=function(t,e,n){let r=e.getNode();if(ae.$isElementNode(r)){var i=r.getDescendantByIndex(e.offset);i!==null&&(r=i)}for(;0<n&&r!==null;){var o=r.getPreviousSibling(),l=0;if(o===null){i=r.getParentOrThrow();for(var s=i.getPreviousSibling();s===null;){if(i=i.getParent(),i===null){o=null;break}s=i.getPreviousSibling()}i!==null&&(l=i.isInline()?0:2,o=ae.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&ae.$isElementNode(r)&&!r.isInline()&&(s=`
126
-
127
- `),i=s.length,!ae.$isTextNode(r)||n>=i)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||ae.$isRootNode(s)||s.remove(),n-=i+l,r=o;else{let a=r.getKey();l=t.getEditorState().read(()=>{const c=ae.$getNodeByKey(a);return ae.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),o=i-n;let u=s.slice(0,o);l!==null&&l!==s?(n=ae.$getPreviousSelection(),i=r,r.isSimpleText()?r.setTextContent(l):(i=ae.$createTextNode(l),r.replace(i)),ae.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,i.select(n,n))):r.isSimpleText()?(l=e.key===a,s=e.offset,s<n&&(s=i),n=l?s-n:0,i=l?s:o,l&&n===0?([n]=r.splitText(n,i),n.remove()):([,n]=r.splitText(n,i),n.remove())):(n=ae.$createTextNode(u),r.replace(n)),n=0}}};const MO=Ut;var lo=MO,LO=lo,Et=_e;function IO(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function jE(t,e){for(let n of e)if(t.type.startsWith(n))return!0;return!1}function zE(t,e){for(;t!==Et.$getRoot()&&t!=null;){if(e(t))return t;t=t.getParent()}return null}$t.$splitNode=Et.$splitNode;$t.isHTMLAnchorElement=Et.isHTMLAnchorElement;$t.isHTMLElement=Et.isHTMLElement;$t.$dfs=function(t,e){let n=[];t=(t||Et.$getRoot()).getLatest(),e=e||(Et.$isElementNode(t)?t.getLastDescendant():t);for(var r=t,i=0;(r=r.getParent())!==null;)i++;for(r=i;t!==null&&!t.is(e);)if(n.push({depth:r,node:t}),Et.$isElementNode(t)&&0<t.getChildrenSize())t=t.getFirstChild(),r++;else for(i=null;i===null&&t!==null;)i=t.getNextSibling(),i===null?(t=t.getParent(),r--):t=i;return t!==null&&t.is(e)&&n.push({depth:r,node:t}),n};$t.$filter=function(t,e){let n=[];for(let r=0;r<t.length;r++){let i=e(t[r]);i!==null&&n.push(i)}return n};$t.$findMatchingParent=zE;$t.$getNearestBlockElementAncestorOrThrow=function(t){let e=zE(t,n=>Et.$isElementNode(n)&&!n.isInline());return Et.$isElementNode(e)||IO(4,t.__key),e};$t.$getNearestNodeOfType=function(t,e){for(;t!=null;){if(t instanceof e)return t;t=t.getParent()}return null};$t.$insertFirst=function(t,e){let n=t.getFirstChild();n!==null?n.insertBefore(e):t.append(e)};$t.$insertNodeToNearestRoot=function(t){var e=Et.$getSelection()||Et.$getPreviousSelection();if(Et.$isRangeSelection(e)){var{focus:n}=e;if(e=n.getNode(),n=n.offset,Et.$isRootOrShadowRoot(e))n=e.getChildAtIndex(n),n==null?e.append(t):n.insertBefore(t),t.selectNext();else{let r,i;Et.$isTextNode(e)?(r=e.getParentOrThrow(),i=e.getIndexWithinParent(),0<n&&(i+=1,e.splitText(n))):(r=e,i=n),[,e]=Et.$splitNode(r,i),e.insertBefore(t),e.selectStart()}}else Et.$isNodeSelection(e)||Et.DEPRECATED_$isGridSelection(e)?(e=e.getNodes(),e[e.length-1].getTopLevelElementOrThrow().insertAfter(t)):Et.$getRoot().append(t),e=Et.$createParagraphNode(),t.insertAfter(e),e.select();return t.getLatest()};$t.$restoreEditorState=function(t,e){let n=new Map,r=t._pendingEditorState;for(let[i,o]of e._nodeMap){let l=LO.$cloneWithProperties(o);Et.$isTextNode(l)&&(l.__text=o.__text),n.set(i,l)}r&&(r._nodeMap=n),t._dirtyType=2,t=e._selection,Et.$setSelection(t===null?null:t.clone())};$t.$wrapNodeInElement=function(t,e){return e=e(),t.replace(e),e.append(t),e};$t.addClassNamesToElement=function(t,...e){e.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),t.classList.add(...n))})};$t.isMimeType=jE;$t.mediaFileReader=function(t,e){let n=t[Symbol.iterator]();return new Promise((r,i)=>{let o=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(o);const u=new FileReader;u.addEventListener("error",i),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&o.push({file:a,result:c}),l()}),jE(a,e)?u.readAsDataURL(a):l()};l()})};$t.mergeRegister=function(...t){return()=>{t.forEach(e=>e())}};$t.objectKlassEquals=function(t,e){return t!==null?Object.getPrototypeOf(t).constructor.name===e.name:!1};$t.registerNestedElementResolver=function(t,e,n,r){return t.registerNodeTransform(e,i=>{e:{for(var o=i.getChildren(),l=0;l<o.length;l++)if(o[l]instanceof e){o=null;break e}for(o=i;o!==null;)if(l=o,o=o.getParent(),o instanceof e){o={child:l,parent:o};break e}o=null}if(o!==null){const{child:s,parent:a}=o;if(s.is(i)){if(r(a,i),i=s.getNextSiblings(),o=i.length,a.insertAfter(s),o!==0){l=n(a),s.insertAfter(l);for(let u=0;u<o;u++)l.append(i[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};$t.removeClassNamesFromElement=function(t,...e){e.forEach(n=>{typeof n=="string"&&t.classList.remove(...n.split(" "))})};const DO=$t;var Ft=DO,Fe=_e,so=Ft;function ds(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function FE(t){let e=1;for(t=t.getParent();t!=null;){if(ft(t)){if(t=t.getParent(),Te(t)){e++,t=t.getParent();continue}ds(40)}break}return e}function bg(t){t=t.getParent(),Te(t)||ds(40);let e=t;for(;e!==null;)e=e.getParent(),Te(e)&&(t=e);return t}function BE(t){let e=[];t=t.getChildren().filter(ft);for(let n=0;n<t.length;n++){let r=t[n],i=r.getFirstChild();Te(i)?e=e.concat(BE(i)):e.push(r)}return e}function Ar(t){return ft(t)&&Te(t.getFirstChild())}function jO(t){for(;t.getNextSibling()==null&&t.getPreviousSibling()==null;){let e=t.getParent();if(e==null||!ft(t)&&!Te(t))break;t=e}t.remove()}function ax(t){return zn().append(t)}function UE(t,e){return ft(t)&&(e.length===0||e.length===1&&t.is(e[0])&&t.getChildrenSize()===0)}function Go(t,e){t.splice(t.getChildrenSize(),0,e)}function ux(t,e){if(Te(t))return t;let n=t.getPreviousSibling(),r=t.getNextSibling(),i=zn();return i.setFormat(t.getFormatType()),i.setIndent(t.getIndent()),Go(i,t.getChildren()),Te(n)&&e===n.getListType()?(n.append(i),t.remove(),Te(r)&&e===r.getListType()&&(Go(n,r.getChildren()),r.remove()),n):Te(r)&&e===r.getListType()?(r.getFirstChildOrThrow().insertBefore(i),t.remove(),r):(e=mn(e),e.append(i),t.replace(e),cn(e),e)}function WE(t,e){var n=t.getLastChild();let r=e.getFirstChild();n&&r&&Ar(n)&&Ar(r)&&(WE(n.getFirstChild(),r.getFirstChild()),r.remove()),n=e.getChildren(),0<n.length&&(t.append(...n),cn(t)),e.remove()}function cn(t,e){if(t=e||t.getChildren(),t!==void 0)for(e=0;e<t.length;e++){let o=t[e];if(ft(o)){let l=o.getValue();var n=o,r=n.getParent(),i=1;for(r!=null&&(Te(r)?i=r.getStart():ds(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];ft(s)&&!Te(s.getFirstChild())&&i++}l!==i&&o.setValue(i)}}}function zO(t){if(!Ar(t)){var e=t.getParent(),n=e?e.getParent():void 0,r=n?n.getParent():void 0;if(Te(r)&&ft(n)&&Te(e)){var i=e?e.getFirstChild():void 0,o=e?e.getLastChild():void 0;if(t.is(i))n.insertBefore(t),e.isEmpty()&&n.remove();else if(t.is(o))n.insertAfter(t),e.isEmpty()&&n.remove();else{var l=e.getListType();i=zn();let s=mn(l);i.append(s),t.getPreviousSiblings().forEach(a=>s.append(a)),o=zn(),l=mn(l),o.append(l),Go(l,t.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(t)}cn(e),cn(r)}}}let Mf=class VE extends Fe.ElementNode{static getType(){return"listitem"}static clone(e){return new VE(e.__value,e.__checked,e.__key)}constructor(e,n,r){super(r),this.__value=e===void 0?1:e,this.__checked=n}createDOM(e){let n=document.createElement("li"),r=this.getParent();return Te(r)&&r.getListType()==="check"&&dx(n,this,null),n.value=this.__value,cx(n,e.theme,this),n}updateDOM(e,n,r){let i=this.getParent();return Te(i)&&i.getListType()==="check"&&dx(n,this,e),n.value=this.__value,cx(n,r.theme,this),!1}static transform(){return e=>{let n=e.getParent();Te(n)&&(cn(n),n.getListType()!=="check"&&e.getChecked()!=null&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:FO,priority:0})}}static importJSON(e){let n=zn();return n.setChecked(e.checked),n.setValue(e.value),n.setFormat(e.format),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let n=0;n<e.length;n++){let r=e[n];if(Fe.$isElementNode(r)&&this.canMergeWith(r)){let i=r.getChildren();this.append(...i),r.remove()}else super.append(r)}return this}replace(e,n){if(ft(e))return super.replace(e);this.setIndent(0);let r=this.getParentOrThrow();if(!Te(r))return e;if(r.__first===this.getKey())r.insertBefore(e);else if(r.__last===this.getKey())r.insertAfter(e);else{let i=mn(r.getListType()),o=this.getNextSibling();for(;o;){let l=o;o=o.getNextSibling(),i.append(l)}r.insertAfter(e),e.insertAfter(i)}return n&&this.getChildren().forEach(i=>{e.append(i)}),this.remove(),r.getChildrenSize()===0&&r.remove(),e}insertAfter(e,n=!0){var r=this.getParentOrThrow();Te(r)||ds(39);var i=this.getNextSiblings();if(ft(e))return n=super.insertAfter(e,n),e=e.getParentOrThrow(),Te(e)&&cn(e),n;if(Te(e)){for(r=e,e=e.getChildren(),i=e.length-1;0<=i;i--)r=e[i],this.insertAfter(r,n);return r}if(r.insertAfter(e,n),i.length!==0){let o=mn(r.getListType());i.forEach(l=>o.append(l)),e.insertAfter(o,n)}return e}remove(e){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(e),n&&r&&Ar(n)&&Ar(r)?(WE(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(e=r.getParent(),Te(e)&&cn(e))}insertNewAfter(e,n=!0){return e=zn(this.__checked==null?void 0:!1),this.insertAfter(e,n),e}collapseAtStart(e){let n=Fe.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),i=r.getParentOrThrow();let o=ft(i);return r.getChildrenSize()===1?o?(r.remove(),i.select()):(r.insertBefore(n),r.remove(),r=e.anchor,e=e.focus,i=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(i,r.offset,"element"),e.type==="element"&&e.getNode().is(this)&&e.set(i,e.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(e===null)return this.getLatest().__indent;e=e.getParentOrThrow();let n=0;for(;ft(e);)e=e.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(e){typeof e=="number"&&-1<e||ds(117);let n=this.getIndent();for(;n!==e;)if(n<e){e:{var r=new Set;if(Ar(this)||r.has(this.getKey()))break e;let s=this.getParent();var i=this.getNextSibling(),o=this.getPreviousSibling();if(Ar(i)&&Ar(o)){if(o=o.getFirstChild(),Te(o)){o.append(this);var l=i.getFirstChild();Te(l)&&(l=l.getChildren(),Go(o,l),i.remove(),r.add(i.getKey())),cn(o)}}else Ar(i)?(i=i.getFirstChild(),Te(i)&&(r=i.getFirstChild(),r!==null&&r.insertBefore(this),cn(i))):Ar(o)?(i=o.getFirstChild(),Te(i)&&(i.append(this),cn(i))):Te(s)&&(r=zn(),l=mn(s.getListType()),r.append(l),l.append(this),o?o.insertAfter(r):i?i.insertBefore(r):s.append(r),cn(l));Te(s)&&cn(s)}n++}else zO(this),n--;return this}insertBefore(e){if(ft(e)){let n=this.getParentOrThrow();if(Te(n)){let r=this.getNextSiblings();cn(n,r)}}return super.insertBefore(e)}canInsertAfter(e){return ft(e)}canReplaceWith(e){return ft(e)}canMergeWith(e){return Fe.$isParagraphNode(e)||ft(e)}extractWithChild(e,n){if(!Fe.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return mn("bullet")}};function cx(t,e,n){let r=[],i=[];var o=(e=e.list)?e.listitem:void 0;if(e&&e.nested)var l=e.nested.listitem;if(o!==void 0&&(o=o.split(" "),r.push(...o)),e){o=n.getParent(),o=Te(o)&&o.getListType()==="check";let s=n.getChecked();o&&!s||i.push(e.listitemUnchecked),o&&s||i.push(e.listitemChecked),o&&r.push(s?e.listitemChecked:e.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>Te(s))?r.push(...l):i.push(...l)),0<i.length&&so.removeClassNamesFromElement(t,...i),0<r.length&&so.addClassNamesToElement(t,...r)}function dx(t,e,n){Te(e.getFirstChild())?(t.removeAttribute("role"),t.removeAttribute("tabIndex"),t.removeAttribute("aria-checked")):(t.setAttribute("role","checkbox"),t.setAttribute("tabIndex","-1"),n&&e.__checked===n.__checked||t.setAttribute("aria-checked",e.getChecked()?"true":"false"))}function FO(t){return t=so.isHTMLElement(t)&&t.getAttribute("aria-checked")==="true",{node:zn(t)}}function zn(t){return Fe.$applyNodeReplacement(new Mf(void 0,t))}function ft(t){return t instanceof Mf}let bv=class HE extends Fe.ElementNode{static getType(){return"list"}static clone(e){return new HE(e.__listType||px[e.__tag],e.__start,e.__key)}constructor(e,n,r){super(r),this.__listType=e=px[e]||e,this.__tag=e==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(e){let n=this.getWritable();n.__listType=e,n.__tag=e==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(e){let n=document.createElement(this.__tag);return this.__start!==1&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,fx(n,e.theme,this),n}updateDOM(e,n,r){return e.__tag!==this.__tag?!0:(fx(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:hx,priority:0}),ul:()=>({conversion:hx,priority:0})}}static importJSON(e){let n=mn(e.listType,e.start);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportDOM(e){return{element:e}=super.exportDOM(e),e&&so.isHTMLElement(e)&&(this.__start!==1&&e.setAttribute("start",String(this.__start)),this.__listType==="check"&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let r=0;r<e.length;r++){var n=e[r];if(ft(n))super.append(n);else{let i=zn();Te(n)||Fe.$isElementNode(n)&&(n=Fe.$createTextNode(n.getTextContent())),i.append(n),super.append(i)}}return cn(this),this}extractWithChild(e){return ft(e)}};function fx(t,e,n){let r=[],i=[];var o=e.list;if(o!==void 0){let s=o[`${n.__tag}Depth`]||[];e=FE(n)-1;let a=e%s.length;var l=s[a];let u=o[n.__tag],c;if(o=o.nested,o!==void 0&&o.list&&(c=o.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&&i.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<e?r.push(...n):i.push(...n))}0<i.length&&so.removeClassNamesFromElement(t,...i),0<r.length&&so.addClassNamesToElement(t,...r)}function BO(t){let e=[];for(let r=0;r<t.length;r++){var n=t[r];ft(n)?(e.push(n),n=n.getChildren(),1<n.length&&n.forEach(i=>{Te(i)&&e.push(ax(i))})):e.push(ax(n))}return e}function hx(t){let e=t.nodeName.toLowerCase(),n=null;return e==="ol"?n=mn("number",t.start):e==="ul"&&(n=so.isHTMLElement(t)&&t.getAttribute("__lexicallisttype")==="check"?mn("check"):mn("bullet")),{after:BO,node:n}}let px={ol:"number",ul:"bullet"};function mn(t,e=1){return Fe.$applyNodeReplacement(new bv(t,e))}function Te(t){return t instanceof bv}let UO=Fe.createCommand("INSERT_UNORDERED_LIST_COMMAND"),WO=Fe.createCommand("INSERT_ORDERED_LIST_COMMAND"),VO=Fe.createCommand("INSERT_CHECK_LIST_COMMAND"),HO=Fe.createCommand("REMOVE_LIST_COMMAND");wn.$createListItemNode=zn;wn.$createListNode=mn;wn.$getListDepth=FE;wn.$handleListInsertParagraph=function(){var t=Fe.$getSelection();if(!Fe.$isRangeSelection(t)||!t.isCollapsed()||(t=t.anchor.getNode(),!ft(t)||t.getChildrenSize()!==0))return!1;var e=bg(t),n=t.getParent();Te(n)||ds(40);let r=n.getParent(),i;if(Fe.$isRootOrShadowRoot(r))i=Fe.$createParagraphNode(),e.insertAfter(i);else if(ft(r))i=zn(),r.insertAfter(i);else return!1;if(i.select(),e=t.getNextSiblings(),0<e.length){let o=mn(n.getListType());Fe.$isParagraphNode(i)?i.insertAfter(o):(n=zn(),n.append(o),i.insertAfter(n)),e.forEach(l=>{l.remove(),o.append(l)})}return jO(t),!0};wn.$isListItemNode=ft;wn.$isListNode=Te;wn.INSERT_CHECK_LIST_COMMAND=VO;wn.INSERT_ORDERED_LIST_COMMAND=WO;wn.INSERT_UNORDERED_LIST_COMMAND=UO;wn.ListItemNode=Mf;wn.ListNode=bv;wn.REMOVE_LIST_COMMAND=HO;wn.insertList=function(t,e){t.update(()=>{var n=Fe.$getSelection();if(Fe.$isRangeSelection(n)||Fe.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var i=n.getParent();if(UE(n,r))r=mn(e),Fe.$isRootOrShadowRoot(i)?(n.replace(r),i=zn(),Fe.$isElementNode(n)&&(i.setFormat(n.getFormatType()),i.setIndent(n.getIndent())),r.append(i)):ft(n)&&(n=n.getParentOrThrow(),Go(r,n.getChildren()),n.replace(r));else for(n=new Set,i=0;i<r.length;i++){var o=r[i];if(Fe.$isElementNode(o)&&o.isEmpty()&&!n.has(o.getKey()))ux(o,e);else if(Fe.$isLeafNode(o))for(o=o.getParent();o!=null;){let s=o.getKey();if(Te(o)){if(!n.has(s)){var l=mn(e);Go(l,o.getChildren()),o.replace(l),cn(l),n.add(s)}break}else{if(l=o.getParent(),Fe.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),ux(o,e);break}o=l}}}}})};wn.removeList=function(t){t.update(()=>{let e=Fe.$getSelection();if(Fe.$isRangeSelection(e)){var n=new Set,r=e.getNodes(),i=e.anchor.getNode();if(UE(i,r))n.add(bg(i));else for(i=0;i<r.length;i++){var o=r[i];Fe.$isLeafNode(o)&&(o=so.$getNearestNodeOfType(o,Mf),o!=null&&n.add(bg(o)))}for(let l of n){n=l,r=BE(l);for(let s of r)r=Fe.$createParagraphNode(),Go(r,s.getChildren()),n.insertAfter(r),n=r,s.__key===e.anchor.key&&e.anchor.set(r.getKey(),0,"element"),s.__key===e.focus.key&&e.focus.set(r.getKey(),0,"element"),s.remove();l.remove()}}})};const KO=wn;var ji=KO,KE={},Lf={},ZE=p;function ZO(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let GE=ZE.createContext(null);Lf.LexicalComposerContext=GE;Lf.createLexicalComposerContext=function(t,e){let n=null;return t!=null&&(n=t[1]),{getTheme:function(){return e??(n!=null?n.getTheme():null)}}};Lf.useLexicalComposerContext=function(){let t=ZE.useContext(GE);return t==null&&ZO(8),t};const GO=Lf;var Tr=GO,gx=Tr,da=_e,jd=p;let YE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var YO=YE?jd.useLayoutEffect:jd.useEffect;let vc={tag:"history-merge"};function XO(t,e){if(e!==null){if(e===void 0)t.update(()=>{var n=da.$getRoot();if(n.isEmpty()){let r=da.$createParagraphNode();n.append(r),n=YE?document.activeElement:null,(da.$getSelection()!==null||n!==null&&n===t.getRootElement())&&r.select()}},vc);else if(e!==null)switch(typeof e){case"string":let n=t.parseEditorState(e);t.setEditorState(n,vc);break;case"object":t.setEditorState(e,vc);break;case"function":t.update(()=>{da.$getRoot().isEmpty()&&e(t)},vc)}}}KE.LexicalComposer=function({initialConfig:t,children:e}){let n=jd.useMemo(()=>{const{theme:r,namespace:i,editor__DEPRECATED:o,nodes:l,onError:s,editorState:a}=t,u=gx.createLexicalComposerContext(null,r);let c=o||null;if(c===null){const d=da.createEditor({editable:t.editable,namespace:i,nodes:l,onError:f=>s(f,d),theme:r});XO(d,a),c=d}return[c,u]},[]);return YO(()=>{let r=t.editable,[i]=n;i.setEditable(r!==void 0?r:!0)},[]),jd.createElement(gx.LexicalComposerContext.Provider,{value:n},e)};const QO=KE;var JO=QO,Ra=p;function $g(t,e){return $g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$g(t,e)}function qO(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,$g(t,e)}function eP(t,e){return t===void 0&&(t=[]),e===void 0&&(e=[]),t.length!==e.length||t.some(function(n,r){return!Object.is(n,e[r])})}var mx={error:null},tP=function(t){function e(){for(var r,i=arguments.length,o=Array(i),l=0;l<i;l++)o[l]=arguments[l];return r=t.call.apply(t,[this].concat(o))||this,r.state=mx,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}qO(e,t),e.getDerivedStateFromError=function(r){return{error:r}};var n=e.prototype;return n.reset=function(){this.setState(mx)},n.componentDidCatch=function(r,i){var o,l;(o=(l=this.props).onError)==null||o.call(l,r,i)},n.componentDidUpdate=function(r,i){var o=this.props.resetKeys;if(this.state.error!==null&&i.error!==null&&eP(r.resetKeys,o)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,o),this.reset()}},n.render=function(){var r=this.state.error,i=this.props,o=i.fallbackRender,l=i.FallbackComponent;if(i=i.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},Ra.isValidElement(i))return i;if(typeof o=="function")return o(r);if(l)return Ra.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},e}(Ra.Component),nP=function({children:t,onError:e}){return Ra.createElement(tP,{fallback:Ra.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:e},t)};const rP=nP;var iP=rP;const oP=Tu(iP);var $v={},Tv={},lP=Ft,Ye=_e;function sP(t,e,n,r,i){if(t===null||n.size===0&&r.size===0&&!i)return 0;var o=e._selection,l=t._selection;if(i)return 1;if(!(Ye.$isRangeSelection(o)&&Ye.$isRangeSelection(l)&&l.isCollapsed()&&o.isCollapsed()))return 0;i=e._nodeMap;let s=[];for(let a of n)n=i.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=i.get(a),r===void 0||Ye.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=e._nodeMap,e=r.get(o.anchor.key),l=r.get(l.anchor.key),e&&l&&!t._nodeMap.has(e.__key)&&Ye.$isTextNode(e)&&e.__text.length===1&&o.anchor.offset===1?2:0):(e=s[0],t=t._nodeMap.get(e.__key),!Ye.$isTextNode(t)||!Ye.$isTextNode(e)||t.__mode!==e.__mode||(t=t.__text,e=e.__text,t===e)||(o=o.anchor,l=l.anchor,o.key!==l.key||o.type!=="text")?0:(o=o.offset,l=l.offset,t=e.length-t.length,t===1&&l===o-1?2:t===-1&&l===o+1?3:t===-1&&l===o?4:0))}function aP(t,e){let n=Date.now(),r=0;return(i,o,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=sP(i,o,s,a,t.isComposing()),f=(()=>{var h=l===null||l.editor===t,m=u.has("history-push");if(!m&&h&&u.has("history-merge"))return 0;if(i===null)return 1;var g=o._selection;if(!(0<s.size||0<a.size))return g!==null?0:2;if(m===!1&&d!==0&&d===r&&c<n+e&&h)return 0;if(s.size===1){{m=Array.from(s)[0],h=i._nodeMap.get(m),m=o._nodeMap.get(m),g=i._selection;let w=o._selection,v=!1;Ye.$isRangeSelection(g)&&Ye.$isRangeSelection(w)&&(v=g.anchor.type==="element"&&g.focus.type==="element"&&w.anchor.type==="text"&&w.focus.type==="text"),h=!v&&Ye.$isTextNode(h)&&Ye.$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}}Tv.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};Tv.registerHistory=function(t,e,n){let r=aP(t,n);n=({editorState:l,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:c})=>{const d=e.current,f=e.redoStack,h=e.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&&(e.redoStack=[],t.dispatchCommand(Ye.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),t.dispatchCommand(Ye.CAN_UNDO_COMMAND,!0));else if(s===2)return;e.current={editor:t,editorState:l}}};let i=lP.mergeRegister(t.registerCommand(Ye.UNDO_COMMAND,()=>{let l=e.redoStack,s=e.undoStack;if(s.length!==0){let a=e.current,u=s.pop();a!==null&&(l.push(a),t.dispatchCommand(Ye.CAN_REDO_COMMAND,!0)),s.length===0&&t.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),e.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),t.registerCommand(Ye.REDO_COMMAND,()=>{let l=e.redoStack;var s=e.undoStack;if(l.length!==0){let a=e.current;a!==null&&(s.push(a),t.dispatchCommand(Ye.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&t.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),e.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},Ye.COMMAND_PRIORITY_EDITOR),t.registerCommand(Ye.CLEAR_EDITOR_COMMAND,()=>(e.undoStack=[],e.redoStack=[],e.current=null,!1),Ye.COMMAND_PRIORITY_EDITOR),t.registerCommand(Ye.CLEAR_HISTORY_COMMAND,()=>(e.undoStack=[],e.redoStack=[],e.current=null,t.dispatchCommand(Ye.CAN_REDO_COMMAND,!1),t.dispatchCommand(Ye.CAN_UNDO_COMMAND,!1),!0),Ye.COMMAND_PRIORITY_EDITOR),t.registerUpdateListener(n)),o=t.registerUpdateListener(n);return()=>{i(),o()}};const uP=Tv;var cP=uP,dP=Tr,Tg=cP,vx=p;function fP(t,e,n=1e3){let r=vx.useMemo(()=>e||Tg.createEmptyHistoryState(),[e]);vx.useEffect(()=>Tg.registerHistory(t,r,n),[n,t,r])}$v.createEmptyHistoryState=Tg.createEmptyHistoryState;$v.HistoryPlugin=function({externalHistoryState:t}){let[e]=dP.useLexicalComposerContext();return fP(e,t),null};const hP=$v;var pP=hP,XE={},gP=Tr,Oa=p,mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Oa.useLayoutEffect:Oa.useEffect;function vP(t){let[e]=gP.useLexicalComposerContext(),n=Oa.useMemo(()=>t(e),[e,t]),r=Oa.useRef(n.initialValueFn()),[i,o]=Oa.useState(r.current);return mP(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,o(a)),s(u=>{r.current=u,o(u)})},[n,t]),i}function yP(t){return{initialValueFn:()=>t.isEditable(),subscribe:e=>t.registerEditableListener(e)}}var xP=function(){return vP(yP)};const _P=xP;var wP=_P,yo={},dn=_e;function Nv(t,e=!0){return t?!1:(t=QE(),e&&(t=t.trim()),t==="")}function QE(){return dn.$getRoot().getTextContent()}function JE(t){if(!Nv(t,!1))return!1;t=dn.$getRoot().getChildren();let e=t.length;if(1<e)return!1;for(let r=0;r<e;r++){var n=t[r];if(dn.$isDecoratorNode(n))return!1;if(dn.$isElementNode(n)){if(!dn.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let i=n.length;for(let o=0;o<i;o++)if(!dn.$isTextNode(n[r]))return!1}}return!0}yo.$canShowPlaceholder=JE;yo.$canShowPlaceholderCurry=function(t){return()=>JE(t)};yo.$findTextIntersectionFromCharacters=function(t,e){var n=t.getFirstChild();t=0;e:for(;n!==null;){if(dn.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(dn.$isTextNode(n)){if(r=n.getTextContentSize(),t+r>e)return{node:n,offset:e-t};t+=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};yo.$isRootTextContentEmpty=Nv;yo.$isRootTextContentEmptyCurry=function(t,e){return()=>Nv(t,e)};yo.$rootTextContent=QE;yo.registerLexicalTextEntity=function(t,e,n,r){let i=l=>{const s=dn.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},o=t.registerNodeTransform(dn.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(dn.$isTextNode(s)){var c=s.getTextContent(),d=e(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){i(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=e(a),a=d=l===null?"":a.slice(l.end),d===""){if(c=u.getNextSibling(),dn.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=e(d),d===null){c instanceof n?i(c):c.markDirty();break}else if(d.start!==0)break}}else if(c=e(d),c!==null&&c.start===0)break;if(l===null)break;if(l.start===0&&dn.$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 t=t.registerNodeTransform(n,l=>{var s=l.getTextContent();const a=e(s);a===null||a.start!==0?i(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),i(l)),s=l.getNextSibling(),dn.$isTextNode(s)&&s.isTextEntity()&&(i(s),l instanceof n&&i(l)))}),[o,t]};const SP=yo;var EP=SP,qE={},yc=_e;qE.registerDragonSupport=function(t){let e=window.location.origin,n=r=>{if(r.origin===e){var i=t.getRootElement();if(document.activeElement===i&&(i=r.data,typeof i=="string")){try{var o=JSON.parse(i)}catch{return}if(o&&o.protocol==="nuanria_messaging"&&o.type==="request"&&(o=o.payload)&&o.functionId==="makeChanges"&&(o=o.args)){const[l,s,a,u,c]=o;t.update(()=>{const d=yc.$getSelection();if(yc.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),m=0,g=0;yc.$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()),yc.$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 CP=qE;var kP=CP,Jr={},Si={},Rv={},yx=lo,bP=Ft,zl=_e;function eC(t,e,n,r=null){let i=r!=null?e.isSelected(r):!0,o=zl.$isElementNode(e)&&e.excludeFromCopy("html");var l=e;r!==null&&(l=yx.$cloneWithProperties(e),l=zl.$isTextNode(l)&&r!=null?yx.$sliceSelectedTextNodeContent(r,l):l);let s=zl.$isElementNode(l)?l.getChildren():[],{element:a,after:u}=l.exportDOM(t);if(!a)return!1;let c=document.createDocumentFragment();for(let d=0;d<s.length;d++){let f=s[d],h=eC(t,f,c,r);!i&&zl.$isElementNode(e)&&h&&e.extractWithChild(f,r,"html")&&(i=!0)}return i&&!o?(bP.isHTMLElement(a)&&a.append(c),n.append(a),u&&(t=u.call(l,a))&&a.replaceWith(t)):n.append(c),i}let tC=new Set(["STYLE","SCRIPT"]);function nC(t,e,n=new Map,r){let i=[];if(tC.has(t.nodeName))return i;let o=null;var l,{nodeName:s}=t,a=e._htmlConversions.get(s.toLowerCase());if(s=null,a!==void 0)for(l of a)a=l(t),a!==null&&(s===null||s.priority<a.priority)&&(s=a);if(s=(l=s!==null?s.conversion:null)?l(t):null,l=null,s!==null){if(l=s.after,a=s.node,o=Array.isArray(a)?a[a.length-1]:a,o!==null){for(var[,u]of n)if(o=u(o,r),!o)break;o&&i.push(...Array.isArray(a)?a:[o])}s.forChild!=null&&n.set(t.nodeName,s.forChild)}for(t=t.childNodes,r=[],u=0;u<t.length;u++)r.push(...nC(t[u],e,new Map(n),o));return l!=null&&(r=l(r)),o==null?i=i.concat(r):zl.$isElementNode(o)&&o.append(...r),i}Rv.$generateHtmlFromNodes=function(t,e){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=zl.$getRoot().getChildren();for(let i=0;i<r.length;i++)eC(t,r[i],n,e);return n.innerHTML};Rv.$generateNodesFromDOM=function(t,e){e=e.body?e.body.childNodes:[];let n=[];for(let i=0;i<e.length;i++){var r=e[i];tC.has(r.nodeName)||(r=nC(r,t),r!==null&&(n=n.concat(r)))}return n};const $P=Rv;var TP=$P,rC=TP,Ng=lo,Xl=Ft,me=_e;function li(t){let e=new URLSearchParams;e.append("code",t);for(let n=1;n<arguments.length;n++)e.append("v",arguments[n]);throw Error(`Minified Lexical error #${t}; visit https://lexical.dev/docs/error?${e} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let iC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oC(t){let e=me.$getSelection();if(e==null)throw Error("Expected valid LexicalSelection");return me.$isRangeSelection(e)&&e.isCollapsed()||e.getNodes().length===0?"":rC.$generateHtmlFromNodes(t,e)}function lC(t){let e=me.$getSelection();if(e==null)throw Error("Expected valid LexicalSelection");return me.$isRangeSelection(e)&&e.isCollapsed()||e.getNodes().length===0?null:JSON.stringify(aC(t,e))}function Rg(t,e,n){(me.DEPRECATED_$isGridSelection(n)||Xl.$findMatchingParent(n.anchor.getNode(),r=>me.DEPRECATED_$isGridCellNode(r))!==null&&Xl.$findMatchingParent(n.focus.getNode(),r=>me.DEPRECATED_$isGridCellNode(r))!==null)&&e.length===1&&me.DEPRECATED_$isGridNode(e[0])?RP(e,n,!1,t):NP(e,n)}function NP(t,e){let n=[],r=null;for(let i=0;i<t.length;i++){let o=t[i],l=me.$isLineBreakNode(o);if(l||me.$isDecoratorNode(o)&&o.isInline()||me.$isElementNode(o)&&o.isInline()||me.$isTextNode(o)||o.isParentRequired()){if(r===null&&(r=o.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(o)}else n.push(o),r=null}me.$isRangeSelection(e)?e.insertNodes(n):me.DEPRECATED_$isGridSelection(e)&&(t=e.anchor.getNode(),me.DEPRECATED_$isGridCellNode(t)||li(41),t.append(...n))}function RP(t,e,n,r){t.length===1&&me.DEPRECATED_$isGridNode(t[0])||li(42);var i=t[0];t=i.getChildren(),n=i.getFirstChildOrThrow().getChildrenSize();var o=i.getChildrenSize(),l=Xl.$findMatchingParent(e.anchor.getNode(),h=>me.DEPRECATED_$isGridCellNode(h));e=(i=l&&Xl.$findMatchingParent(l,h=>me.DEPRECATED_$isGridRowNode(h)))&&Xl.$findMatchingParent(i,h=>me.DEPRECATED_$isGridNode(h)),me.DEPRECATED_$isGridCellNode(l)&&me.DEPRECATED_$isGridRowNode(i)&&me.DEPRECATED_$isGridNode(e)||li(43);var s=i.getIndexWithinParent(),a=Math.min(e.getChildrenSize()-1,s+o-1);o=l.getIndexWithinParent(),l=Math.min(i.getChildrenSize()-1,o+n-1),n=Math.min(o,l),i=Math.min(s,a),o=Math.max(o,l),s=Math.max(s,a),a=e.getChildren(),l=0;let u,c;for(let h=i;h<=s;h++){var d=a[h];me.DEPRECATED_$isGridRowNode(d)||li(24);var f=t[l];me.DEPRECATED_$isGridRowNode(f)||li(24),d=d.getChildren(),f=f.getChildren();let m=0;for(let g=n;g<=o;g++){let w=d[g];me.DEPRECATED_$isGridCellNode(w)||li(25);let v=f[m];me.DEPRECATED_$isGridCellNode(v)||li(25),h===i&&g===n?u=w.getKey():h===s&&g===o&&(c=w.getKey());let y=w.getChildren();v.getChildren().forEach(x=>{me.$isTextNode(x)&&me.$createParagraphNode().append(x),w.append(x)}),y.forEach(x=>x.remove()),m++}l++}u&&c&&(t=me.DEPRECATED_$createGridSelection(),t.set(e.getKey(),u,c),me.$setSelection(t),r.dispatchCommand(me.SELECTION_CHANGE_COMMAND,void 0))}function sC(t,e,n,r=[]){let i=e!=null?n.isSelected(e):!0,o=me.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(e!==null){var s=Ng.$cloneWithProperties(n);l=s=me.$isTextNode(s)&&e!=null?Ng.$sliceSelectedTextNodeContent(e,s):s}let a=me.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&li(58,c.name);let d=s.children;for(me.$isElementNode(u)&&(Array.isArray(d)||li(59,c.name)),me.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:i=!1),l=0;l<a.length;l++)u=a[l],c=sC(t,e,u,s.children),!i&&me.$isElementNode(n)&&c&&n.extractWithChild(u,e,"clone")&&(i=!0);if(i&&!o)r.push(s);else if(Array.isArray(s.children))for(t=0;t<s.children.length;t++)r.push(s.children[t]);return i}function aC(t,e){let n=[],r=me.$getRoot().getChildren();for(let i=0;i<r.length;i++)sC(t,e,r[i],n);return{namespace:t._config.namespace,nodes:n}}function uC(t){let e=[];for(let n=0;n<t.length;n++){let r=me.$parseSerializedNode(t[n]);me.$isTextNode(r)&&Ng.$addNodeStyle(r),e.push(r)}return e}let vl=null;function xx(t,e){var n=iC?(t._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!me.isSelectionWithinEditor(t,r,n)||(e.preventDefault(),e=e.clipboardData,r=me.$getSelection(),e===null||r===null))return!1;n=oC(t),t=lC(t);let i="";return r!==null&&(i=r.getTextContent()),n!==null&&e.setData("text/html",n),t!==null&&e.setData("application/x-lexical-editor",t),e.setData("text/plain",i),!0}Si.$generateJSONFromSelectedNodes=aC;Si.$generateNodesFromSerializedNodes=uC;Si.$getHtmlContent=oC;Si.$getLexicalContent=lC;Si.$insertDataTransferForPlainText=function(t,e){t=t.getData("text/plain")||t.getData("text/uri-list"),t!=null&&e.insertRawText(t)};Si.$insertDataTransferForRichText=function(t,e,n){var r=t.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=uC(l.nodes);return Rg(n,s,e)}}catch{}if(r=t.getData("text/html"))try{var i=new DOMParser().parseFromString(r,"text/html"),o=rC.$generateNodesFromDOM(n,i);return Rg(n,o,e)}catch{}if(t=t.getData("text/plain")||t.getData("text/uri-list"),t!=null)if(me.$isRangeSelection(e))for(t=t.split(/(\r?\n|\t)/),n=t.length,i=0;i<n;i++)o=t[i],o===`
128
- `||o===`\r
129
- `?e.insertParagraph():o===" "?e.insertNodes([me.$createTabNode()]):e.insertText(o);else e.insertRawText(t)};Si.$insertGeneratedNodes=Rg;Si.copyToClipboard=async function(t,e){if(vl!==null)return!1;if(e!==null)return new Promise(l=>{t.update(()=>{l(xx(t,e))})});var n=t.getRootElement();let r=t._window==null?window.document:t._window.document,i=iC?(t._window||window).getSelection():null;if(n===null||i===null)return!1;let o=r.createElement("span");return o.style.cssText="position: fixed; top: -1000px;",o.append(r.createTextNode("#")),n.append(o),n=new Range,n.setStart(o,0),n.setEnd(o,1),i.removeAllRanges(),i.addRange(n),new Promise(l=>{let s=t.registerCommand(me.COPY_COMMAND,a=>(Xl.objectKlassEquals(a,ClipboardEvent)&&(s(),vl!==null&&(window.clearTimeout(vl),vl=null),l(xx(t,a))),!0),me.COMMAND_PRIORITY_CRITICAL);vl=window.setTimeout(()=>{s(),vl=null,l(!1)},50),r.execCommand("copy"),o.remove()})};const OP=Si;var PP=OP,zd=PP,xc=lo,jr=Ft,M=_e;function _x(t,e){return typeof document.caretRangeFromPoint<"u"?(t=document.caretRangeFromPoint(t,e),t===null?null:{node:t.startContainer,offset:t.startOffset}):document.caretPositionFromPoint!=="undefined"?(t=document.caretPositionFromPoint(t,e),t===null?null:{node:t.offsetNode,offset:t.offset}):null}let Ps=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AP=Ps&&"documentMode"in document?document.documentMode:null,MP=Ps&&"InputEvent"in window&&!AP?"getTargetRanges"in new window.InputEvent("input"):!1,LP=Ps&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),IP=Ps&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,DP=Ps&&/^(?=.*Chrome).*/i.test(navigator.userAgent),jP=Ps&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!DP,Og=M.createCommand("DRAG_DROP_PASTE_FILE"),Ov=class cC extends M.ElementNode{static getType(){return"quote"}static clone(e){return new cC(e.__key)}constructor(e){super(e)}createDOM(e){let n=document.createElement("blockquote");return jr.addClassNamesToElement(n,e.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:zP,priority:0})}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&jr.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n)}return{element:e}}static importJSON(e){let n=Pv();return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,n){e=M.$createParagraphNode();let r=this.getDirection();return e.setDirection(r),this.insertAfter(e,n),e}collapseAtStart(){let e=M.$createParagraphNode();return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}};function Pv(){return M.$applyNodeReplacement(new Ov)}let Av=class dC extends M.ElementNode{static getType(){return"heading"}static clone(e){return new dC(e.__tag,e.__key)}constructor(e,n){super(n),this.__tag=e}getTag(){return this.__tag}createDOM(e){let n=this.__tag,r=document.createElement(n);return e=e.theme.heading,e!==void 0&&jr.addClassNamesToElement(r,e[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:yl,priority:0}),h2:()=>({conversion:yl,priority:0}),h3:()=>({conversion:yl,priority:0}),h4:()=>({conversion:yl,priority:0}),h5:()=>({conversion:yl,priority:0}),h6:()=>({conversion:yl,priority:0}),p:e=>(e=e.firstChild,e!==null&&wx(e)?{conversion:()=>({node:null}),priority:3}:null),span:e=>wx(e)?{conversion:()=>({node:Fl("h1")}),priority:3}:null}}exportDOM(e){if({element:e}=super.exportDOM(e),e&&jr.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var n=this.getFormatType();e.style.textAlign=n,(n=this.getDirection())&&(e.dir=n)}return{element:e}}static importJSON(e){let n=Fl(e.tag);return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,n=!0){e=e?e.anchor.offset:0,e=0<e&&e<this.getTextContentSize()?Fl(this.getTag()):M.$createParagraphNode();let r=this.getDirection();return e.setDirection(r),this.insertAfter(e,n),e}collapseAtStart(){let e=this.isEmpty()?M.$createParagraphNode():Fl(this.getTag());return this.getChildren().forEach(n=>e.append(n)),this.replace(e),!0}extractWithChild(){return!0}};function wx(t){return t.nodeName.toLowerCase()==="span"?t.style.fontSize==="26pt":!1}function yl(t){let e=t.nodeName.toLowerCase(),n=null;return(e==="h1"||e==="h2"||e==="h3"||e==="h4"||e==="h5"||e==="h6")&&(n=Fl(e),t.style!==null&&n.setFormat(t.style.textAlign)),{node:n}}function zP(t){let e=Pv();return t.style!==null&&e.setFormat(t.style.textAlign),{node:e}}function Fl(t){return M.$applyNodeReplacement(new Av(t))}function FP(t,e){t.preventDefault(),e.update(()=>{let n=M.$getSelection(),r=t instanceof InputEvent||t instanceof KeyboardEvent?null:t.clipboardData;r!=null&&(M.$isRangeSelection(n)||M.DEPRECATED_$isGridSelection(n))&&zd.$insertDataTransferForRichText(r,n,e)},{tag:"paste"})}async function BP(t,e){await zd.copyToClipboard(e,jr.objectKlassEquals(t,ClipboardEvent)?t:null),e.update(()=>{let n=M.$getSelection();M.$isRangeSelection(n)?n.removeText():M.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function fa(t){let e=null;if(t instanceof DragEvent?e=t.dataTransfer:t instanceof ClipboardEvent&&(e=t.clipboardData),e===null)return[!1,[],!1];var n=e.types;return t=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[t,Array.from(e.files),n]}function Sx(t){var e=M.$getSelection();if(!M.$isRangeSelection(e))return!1;let n=new Set;e=e.getNodes();for(let o=0;o<e.length;o++){var r=e[o],i=r.getKey();n.has(i)||(r=jr.$getNearestBlockElementAncestorOrThrow(r),i=r.getKey(),r.canIndent()&&!n.has(i)&&(n.add(i),t(r)))}return 0<n.size}function _c(t){return t=M.$getNearestNodeFromDOMNode(t),M.$isDecoratorNode(t)}Jr.$createHeadingNode=Fl;Jr.$createQuoteNode=Pv;Jr.$isHeadingNode=function(t){return t instanceof Av};Jr.$isQuoteNode=function(t){return t instanceof Ov};Jr.DRAG_DROP_PASTE=Og;Jr.HeadingNode=Av;Jr.QuoteNode=Ov;Jr.eventFiles=fa;Jr.registerRichText=function(t){return jr.mergeRegister(t.registerCommand(M.CLICK_COMMAND,()=>{const e=M.$getSelection();return M.$isNodeSelection(e)?(e.clear(),!0):!1},0),t.registerCommand(M.DELETE_CHARACTER_COMMAND,e=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteCharacter(e),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.DELETE_WORD_COMMAND,e=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteWord(e),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.DELETE_LINE_COMMAND,e=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.deleteLine(e),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.CONTROLLED_TEXT_INSERTION_COMMAND,e=>{const n=M.$getSelection();if(typeof e=="string")M.$isRangeSelection(n)?n.insertText(e):M.DEPRECATED_$isGridSelection(n);else{if(!M.$isRangeSelection(n)&&!M.DEPRECATED_$isGridSelection(n))return!1;const r=e.dataTransfer;r!=null?zd.$insertDataTransferForRichText(r,n,t):M.$isRangeSelection(n)&&(e=e.data)&&n.insertText(e)}return!0},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.REMOVE_TEXT_COMMAND,()=>{const e=M.$getSelection();return M.$isRangeSelection(e)?(e.removeText(),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.FORMAT_TEXT_COMMAND,e=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.formatText(e),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.FORMAT_ELEMENT_COMMAND,e=>{var n=M.$getSelection();if(!M.$isRangeSelection(n)&&!M.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=jr.$findMatchingParent(r,i=>M.$isElementNode(i)&&!i.isInline()),n!==null&&n.setFormat(e);return!0},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.INSERT_LINE_BREAK_COMMAND,e=>{const n=M.$getSelection();return M.$isRangeSelection(n)?(n.insertLineBreak(e),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.INSERT_PARAGRAPH_COMMAND,()=>{const e=M.$getSelection();return M.$isRangeSelection(e)?(e.insertParagraph(),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.INSERT_TAB_COMMAND,()=>(M.$insertNodes([M.$createTabNode()]),!0),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.INDENT_CONTENT_COMMAND,()=>Sx(e=>{const n=e.getIndent();e.setIndent(n+1)}),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.OUTDENT_CONTENT_COMMAND,()=>Sx(e=>{const n=e.getIndent();0<n&&e.setIndent(n-1)}),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ARROW_UP_COMMAND,e=>{var n=M.$getSelection();if(M.$isNodeSelection(n)&&!_c(e.target)){if(e=n.getNodes(),0<e.length)return e[0].selectPrevious(),!0}else if(M.$isRangeSelection(n)&&(n=M.$getAdjacentNode(n.focus,!0),!e.shiftKey&&M.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),e.preventDefault(),!0;return!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ARROW_DOWN_COMMAND,e=>{var n=M.$getSelection();if(M.$isNodeSelection(n)){if(e=n.getNodes(),0<e.length)return e[0].selectNext(0,0),!0}else if(M.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===M.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(n=M.$getAdjacentNode(n.focus,!1),!e.shiftKey&&M.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),e.preventDefault(),!0}return!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ARROW_LEFT_COMMAND,e=>{const n=M.$getSelection();if(M.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return e.preventDefault(),r[0].selectPrevious(),!0}return M.$isRangeSelection(n)&&xc.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=e.shiftKey,e.preventDefault(),xc.$moveCharacter(n,r,!0),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ARROW_RIGHT_COMMAND,e=>{const n=M.$getSelection();if(M.$isNodeSelection(n)&&!_c(e.target)){var r=n.getNodes();if(0<r.length)return e.preventDefault(),r[0].selectNext(0,0),!0}return M.$isRangeSelection(n)?(r=e.shiftKey,xc.$shouldOverrideDefaultCharacterSelection(n,!1)?(e.preventDefault(),xc.$moveCharacter(n,r,!1),!0):!1):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_BACKSPACE_COMMAND,e=>{if(_c(e.target))return!1;const n=M.$getSelection();if(!M.$isRangeSelection(n))return!1;e.preventDefault(),{anchor:e}=n;const r=e.getNode();return n.isCollapsed()&&e.offset===0&&!M.$isRootNode(r)&&0<jr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?t.dispatchCommand(M.OUTDENT_CONTENT_COMMAND,void 0):t.dispatchCommand(M.DELETE_CHARACTER_COMMAND,!0)},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_DELETE_COMMAND,e=>{if(_c(e.target))return!1;const n=M.$getSelection();return M.$isRangeSelection(n)?(e.preventDefault(),t.dispatchCommand(M.DELETE_CHARACTER_COMMAND,!1)):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ENTER_COMMAND,e=>{const n=M.$getSelection();if(!M.$isRangeSelection(n))return!1;if(e!==null){if((IP||LP||jP)&&MP)return!1;if(e.preventDefault(),e.shiftKey)return t.dispatchCommand(M.INSERT_LINE_BREAK_COMMAND,!1)}return t.dispatchCommand(M.INSERT_PARAGRAPH_COMMAND,void 0)},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.KEY_ESCAPE_COMMAND,()=>{const e=M.$getSelection();return M.$isRangeSelection(e)?(t.blur(),!0):!1},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.DROP_COMMAND,e=>{const[,n]=fa(e);if(0<n.length){var r=_x(e.clientX,e.clientY);if(r!==null){const{offset:o,node:l}=r;var i=M.$getNearestNodeFromDOMNode(l);if(i!==null){if(r=M.$createRangeSelection(),M.$isTextNode(i))r.anchor.set(i.getKey(),o,"text"),r.focus.set(i.getKey(),o,"text");else{const s=i.getParentOrThrow().getKey();i=i.getIndexWithinParent()+1,r.anchor.set(s,i,"element"),r.focus.set(s,i,"element")}r=M.$normalizeSelection__EXPERIMENTAL(r),M.$setSelection(r)}t.dispatchCommand(Og,n)}return e.preventDefault(),!0}return e=M.$getSelection(),!!M.$isRangeSelection(e)},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.DRAGSTART_COMMAND,e=>{[e]=fa(e);const n=M.$getSelection();return!(e&&!M.$isRangeSelection(n))},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.DRAGOVER_COMMAND,e=>{var[n]=fa(e);const r=M.$getSelection();return n&&!M.$isRangeSelection(r)?!1:(n=_x(e.clientX,e.clientY),n!==null&&(n=M.$getNearestNodeFromDOMNode(n.node),M.$isDecoratorNode(n)&&e.preventDefault()),!0)},M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.SELECT_ALL_COMMAND,()=>(M.$selectAll(),!0),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.COPY_COMMAND,e=>(zd.copyToClipboard(t,jr.objectKlassEquals(e,ClipboardEvent)?e:null),!0),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.CUT_COMMAND,e=>(BP(e,t),!0),M.COMMAND_PRIORITY_EDITOR),t.registerCommand(M.PASTE_COMMAND,e=>{const[,n,r]=fa(e);if(0<n.length&&!r)return t.dispatchCommand(Og,n),!0;if(M.isSelectionCapturedInDecoratorInput(e.target))return!1;const i=M.$getSelection();return M.$isRangeSelection(i)||M.DEPRECATED_$isGridSelection(i)?(FP(e,t),!0):!1},M.COMMAND_PRIORITY_EDITOR))};const UP=Jr;var Pa=UP,fC=Tr,WP=wP,Jn=p,VP=EP,hC=Ft,Ex=Gr,HP=kP,KP=Pa,Mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Jn.useLayoutEffect:Jn.useEffect;function Cx(t){return t.getEditorState().read(VP.$canShowPlaceholderCurry(t.isComposing()))}function ZP(t){let[e,n]=Jn.useState(()=>Cx(t));return Mv(()=>{function r(){let i=Cx(t);n(i)}return r(),hC.mergeRegister(t.registerUpdateListener(()=>{r()}),t.registerEditableListener(()=>{r()}))},[t]),e}function GP(t,e){let[n,r]=Jn.useState(()=>t.getDecorators());return Mv(()=>t.registerDecoratorListener(i=>{Ex.flushSync(()=>{r(i)})}),[t]),Jn.useEffect(()=>{r(t.getDecorators())},[t]),Jn.useMemo(()=>{let i=[],o=Object.keys(n);for(let l=0;l<o.length;l++){let s=o[l],a=Jn.createElement(e,{onError:c=>t._onError(c)},Jn.createElement(Jn.Suspense,{fallback:null},n[s])),u=t.getElementByKey(s);u!==null&&i.push(Ex.createPortal(a,u,s))}return i},[e,n,t])}function YP(t){Mv(()=>hC.mergeRegister(KP.registerRichText(t),HP.registerDragonSupport(t)),[t])}function XP({content:t}){var[e]=fC.useLexicalComposerContext();e=ZP(e);let n=WP();return e?typeof t=="function"?t(n):t:null}XE.RichTextPlugin=function({contentEditable:t,placeholder:e,ErrorBoundary:n}){let[r]=fC.useLexicalComposerContext();return n=GP(r,n),YP(r),Jn.createElement(Jn.Fragment,null,t,Jn.createElement(XP,{content:e}),n)};const QP=XE;var JP=QP,pC={},ni=ji,qP=Tr,gC=p,eA=Ft,qs=_e;function tA(t){gC.useEffect(()=>eA.mergeRegister(t.registerCommand(ni.INSERT_ORDERED_LIST_COMMAND,()=>(ni.insertList(t,"number"),!0),qs.COMMAND_PRIORITY_LOW),t.registerCommand(ni.INSERT_UNORDERED_LIST_COMMAND,()=>(ni.insertList(t,"bullet"),!0),qs.COMMAND_PRIORITY_LOW),t.registerCommand(ni.REMOVE_LIST_COMMAND,()=>(ni.removeList(t),!0),qs.COMMAND_PRIORITY_LOW),t.registerCommand(qs.INSERT_PARAGRAPH_COMMAND,()=>!!ni.$handleListInsertParagraph(),qs.COMMAND_PRIORITY_LOW)),[t])}pC.ListPlugin=function(){let[t]=qP.useLexicalComposerContext();return gC.useEffect(()=>{if(!t.hasNodes([ni.ListNode,ni.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[t]),tA(t),null};const nA=pC;var rA=nA,mC={},Ei={},vC=Ft,Ur=_e;let iA=new Set(["http:","https:","mailto:","sms:","tel:"]);class As extends Ur.ElementNode{static getType(){return"link"}static clone(e){return new As(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,n={},r){super(r);let{target:i=null,rel:o=null,title:l=null}=n;this.__url=e,this.__target=i,this.__rel=o,this.__title=l}createDOM(e){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),vC.addClassNamesToElement(n,e.theme.link),n}updateDOM(e,n){let r=this.__url,i=this.__target,o=this.__rel,l=this.__title;return r!==e.__url&&(n.href=r),i!==e.__target&&(i?n.target=i:n.removeAttribute("target")),o!==e.__rel&&(o?n.rel=o:n.removeAttribute("rel")),l!==e.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:oA,priority:1})}}static importJSON(e){let n=cu(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}sanitizeUrl(e){try{let n=new URL(e);if(!iA.has(n.protocol))return"about:blank"}catch{}return e}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(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),Ur.$isElementNode(e)?(n=cu(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,n){if(!Ur.$isRangeSelection(n))return!1;e=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(e)&&this.isParentOf(r)&&0<n.getTextContent().length}}function oA(t){let e=null;if(vC.isHTMLAnchorElement(t)){let n=t.textContent;n!==null&&n!==""&&(e=cu(t.getAttribute("href")||"",{rel:t.getAttribute("rel"),target:t.getAttribute("target"),title:t.getAttribute("title")}))}return{node:e}}function cu(t,e){return Ur.$applyNodeReplacement(new As(t,e))}function bo(t){return t instanceof As}class Fu extends As{static getType(){return"autolink"}static clone(e){return new Fu(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}static importJSON(e){let n=Pg(e.url,{rel:e.rel,target:e.target,title:e.title});return n.setFormat(e.format),n.setIndent(e.indent),n.setDirection(e.direction),n}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(e,n=!0){return e=this.getParentOrThrow().insertNewAfter(e,n),Ur.$isElementNode(e)?(n=Pg(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),e.append(n),n):null}}function Pg(t,e){return Ur.$applyNodeReplacement(new Fu(t,e))}let lA=Ur.createCommand("TOGGLE_LINK_COMMAND");function sA(t,e){for(;t!==null&&(t=t.getParent())!==null&&!e(t););return t}Ei.$createAutoLinkNode=Pg;Ei.$createLinkNode=cu;Ei.$isAutoLinkNode=function(t){return t instanceof Fu};Ei.$isLinkNode=bo;Ei.AutoLinkNode=Fu;Ei.LinkNode=As;Ei.TOGGLE_LINK_COMMAND=lA;Ei.toggleLink=function(t,e={}){let{target:n,title:r}=e,i=e.rel===void 0?"noreferrer":e.rel;if(e=Ur.$getSelection(),Ur.$isRangeSelection(e))if(e=e.extract(),t===null)e.forEach(l=>{if(l=l.getParent(),bo(l)){let s=l.getChildren();for(let a=0;a<s.length;a++)l.insertBefore(s[a]);l.remove()}});else{if(e.length===1){var o=e[0];if(o=bo(o)?o:sA(o,bo),o!==null){o.setURL(t),n!==void 0&&o.setTarget(n),i!==null&&o.setRel(i),r!==void 0&&o.setTitle(r);return}}let l=null,s=null;e.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!Ur.$isElementNode(a)||a.isInline()))if(bo(u))s=u,u.setURL(t),n!==void 0&&u.setTarget(n),i!==null&&s.setRel(i),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=cu(t,{rel:i,target:n}),bo(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),bo(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 aA=Ei;var fs=aA,xl=fs,uA=Tr,cA=Ft,_l=_e,dA=p;mC.LinkPlugin=function({validateUrl:t}){let[e]=uA.useLexicalComposerContext();return dA.useEffect(()=>{if(!e.hasNodes([xl.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return cA.mergeRegister(e.registerCommand(xl.TOGGLE_LINK_COMMAND,n=>{if(n===null)return xl.toggleLink(n),!0;if(typeof n=="string")return t===void 0||t(n)?(xl.toggleLink(n),!0):!1;let{url:r,target:i,rel:o,title:l}=n;return xl.toggleLink(r,{rel:o,target:i,title:l}),!0},_l.COMMAND_PRIORITY_LOW),t!==void 0?e.registerCommand(_l.PASTE_COMMAND,n=>{let r=_l.$getSelection();if(!_l.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let i=n.clipboardData.getData("text");return t(i)?r.getNodes().some(o=>_l.$isElementNode(o))?!1:(e.dispatchCommand(xl.TOGGLE_LINK_COMMAND,i),n.preventDefault(),!0):!1},_l.COMMAND_PRIORITY_LOW):()=>{})},[e,t]),null};const fA=mC;var hA=fA;function pA({ariaActiveDescendant:t,ariaAutoComplete:e,ariaControls:n,ariaDescribedBy:r,ariaExpanded:i,ariaLabel:o,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:m=!0,style:g,tabIndex:w,"data-testid":v,...y}){const[x]=Tr.useLexicalComposerContext(),[S,b]=p.useState(!1),T=p.useCallback($=>{var L;x.setRootElement($);const O=(L=document.getElementById("val-ui"))==null?void 0:L.shadowRoot;if(O&&"getSelection"in O){x._window=O;return}},[x]);return p.useLayoutEffect(()=>(b(x.isEditable()),x.registerEditableListener($=>{b($)})),[x]),_.jsx("div",{...y,"aria-activedescendant":S?t:void 0,"aria-autocomplete":S?e:"none","aria-controls":S?n:void 0,"aria-describedby":r,"aria-expanded":S&&h==="combobox"?!!i:void 0,"aria-label":o,"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:w})}function gA({className:t}){return _.jsx(pA,{className:t})}class Bu extends _e.DecoratorNode{constructor(e,n){super(n),this.__src=e.src,this.__altText=e.altText,this.__width=e.width,this.__height=e.height}static getType(){return"image"}static clone(e){return new Bu({src:e.__src,altText:e.__altText,width:e.__width,height:e.__height})}exportJSON(){return{altText:this.__altText,height:this.__width,src:this.__src,type:"image",version:1,width:this.__width}}static importJSON(e){return yC(e)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return _.jsx(mA,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function mA(t){return _.jsx("img",{src:t.src})}function yC(t){return new Bu(t)}function vA(){const[t]=Tr.useLexicalComposerContext();return p.useEffect(()=>{t.focus()},[t]),null}const xC=_e.createCommand("INSERT_IMAGE_COMMAND");function yA(){const[t]=Tr.useLexicalComposerContext();return p.useEffect(()=>{if(!t.hasNodes([Bu]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Ft.mergeRegister(t.registerCommand(xC,e=>{const n=yC(e);return _e.$insertNodes([n]),_e.$isRootOrShadowRoot(n.getParentOrThrow())&&Ft.$wrapNodeInElement(n,_e.$createParagraphNode).selectEnd(),!0},_e.COMMAND_PRIORITY_EDITOR))},[t]),null}const xA=({className:t})=>_.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:t,children:[_.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),_.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),_A=xA,wA=({className:t})=>_.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:t,width:12,height:12,children:[_.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),_.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),_.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),SA=wA,EA=({className:t})=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",className:t,width:12,height:12,children:_.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"})}),CA=EA,kA=({variant:t="primary",onClick:e,children:n,icon:r,disabled:i=!1})=>_.jsx("button",{disabled:i,className:_f("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":t==="primary","bg-background hover:bg-background text-fill disabled:bg-fill disabled:text-background":t==="primary","bg-transparent border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":t!=="primary"}),onClick:e,children:_.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),$o=kA,bA=({className:t})=>_.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:t,children:[_.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"}),_.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"})]}),$A=bA,_C=re.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 Lv(){return re.useContext(_C)}const TA=({options:t,onChange:e,label:n,icon:r})=>{const[i,o]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=Lv(),c=()=>{o(!i)},d=(f,h)=>{a(h),e(f),o(!1)};return p.useEffect(()=>{const f=h=>{i&&l.current&&!l.current.contains(h.target)&&o(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),_.jsx("div",{className:"text-[12px]",ref:l,children:_.jsx($o,{onClick:f=>{f.preventDefault(),c()},icon:_.jsx($A,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${i?"":"rotate-[90deg]"}`}),children:_.jsxs("div",{className:"relative",children:[_.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),i&&_.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:_.jsx("div",{className:"flex flex-col ",children:t==null?void 0:t.map((f,h)=>_.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))})})]})})})},NA=TA,RA=new TextEncoder;function wC(t){return new Promise((e,n)=>{var o;const r=(o=t.currentTarget.files)==null?void 0:o[0],i=new FileReader;i.addEventListener("load",()=>{const l=i.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",async()=>{const a=await jn.getSHA256Hash(RA.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=nv(l);e({src:l,width:s.naturalWidth,height:s.naturalHeight,filename:r==null?void 0:r.name,sha256:a,mimeType:u,fileExt:u&&rv(u)})}else e({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&&i.readAsDataURL(r)})}function SC(t){const e=t.anchor,n=t.focus,r=t.anchor.getNode(),i=t.focus.getNode();return r===i?r:t.isBackward()?lo.$isAtNodeEnd(n)?r:i:lo.$isAtNodeEnd(e)?r:i}function OA(){const[t]=Tr.useLexicalComposerContext();return p.useEffect(()=>Ft.mergeRegister(t.registerCommand(_e.CLICK_COMMAND,e=>{const n=_e.$getSelection();if(_e.$isRangeSelection(n)){const r=SC(n),i=Ft.$findMatchingParent(r,fs.$isLinkNode);if(fs.$isLinkNode(i)&&(e.metaKey||e.ctrlKey))return window.open(i.getURL(),"_blank"),!0}return!1},_e.COMMAND_PRIORITY_LOW)),[]),null}var EC={exports:{}},PA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",AA=PA,MA=AA;function CC(){}function kC(){}kC.resetWarningCache=CC;var LA=function(){function t(r,i,o,l,s,a){if(a!==MA){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}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:kC,resetWarningCache:CC};return n.PropTypes=n,n};EC.exports=LA();var IA=EC.exports;const er=Tu(IA);function Ag(){return Ag=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ag.apply(this,arguments)}function DA(t,e){if(t==null)return{};var n=jA(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jA(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Iv=p.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?24:i,l=DA(t,["color","size"]);return re.createElement("svg",Ag({ref:e,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("polyline",{points:"20 6 9 17 4 12"}))});Iv.propTypes={color:er.string,size:er.oneOfType([er.string,er.number])};Iv.displayName="Check";const zA=Iv;function Mg(){return Mg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mg.apply(this,arguments)}function FA(t,e){if(t==null)return{};var n=BA(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function BA(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var Dv=p.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?24:i,l=FA(t,["color","size"]);return re.createElement("svg",Mg({ref:e,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.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"}),re.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"}))});Dv.propTypes={color:er.string,size:er.oneOfType([er.string,er.number])};Dv.displayName="Link";const UA=Dv;function Lg(){return Lg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lg.apply(this,arguments)}function WA(t,e){if(t==null)return{};var n=VA(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function VA(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var jv=p.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=t.size,o=i===void 0?24:i,l=WA(t,["color","size"]);return re.createElement("svg",Lg({ref:e,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});jv.propTypes={color:er.string,size:er.oneOfType([er.string,er.number])};jv.displayName="X";const HA=jv,KA=({fontSizes:t,fontsFamilies:e,onEditor:n,colors:r})=>{const[i]=Tr.useLexicalComposerContext();p.useEffect(()=>{n&&n(i)},[i]);const[o,l]=p.useState(i),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(!1),[g,w]=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),b=P=>{i.dispatchCommand(fs.TOGGLE_LINK_COMMAND,P)},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"},$={};for(const P in T)$[T[P]]=P;const O=p.useCallback(()=>{const P=_e.$getSelection();if(_e.$isRangeSelection(P)){const D=P.anchor.getNode();let B=D.getKey()==="root"?D:Ft.$findMatchingParent(D,k=>{const E=k.getParent();return E!==null&&_e.$isRootOrShadowRoot(E)});B===null&&(B=D.getTopLevelElementOrThrow());const oe=SC(P),H=Ft.$findMatchingParent(oe,fs.$isLinkNode);if(H!==null){const k=H.getURL();S(k)}else S(null);const Z=B.getKey(),C=o.getElementByKey(Z);if(c(P.hasFormat("bold")),f(P.hasFormat("italic")),m(P.hasFormat("strikethrough")),w(P.hasFormat("underline")),C!==null)if(a(Z),ji.$isListNode(B)){const k=Ft.$getNearestNodeOfType(D,ji.ListNode),E=k?k.getListType():B.getListType();y(E)}else{const k=Pa.$isHeadingNode(B)?B.getTag():B.getType();k in T&&y(k)}}},[o]);p.useEffect(()=>Ft.mergeRegister(i.registerUpdateListener(({editorState:P})=>{P.read(()=>{O()})})),[O,o,i]),p.useEffect(()=>i.registerCommand(_e.SELECTION_CHANGE_COMMAND,(P,D)=>(O(),l(D),!1),_e.COMMAND_PRIORITY_CRITICAL),[i,O]);const L=P=>{["h1","h2","h3","h4","h5","h6"].includes(P)?v!==P&&i.update(()=>{const D=_e.$getSelection();_e.$isRangeSelection(D)&&lo.$setBlocksType(D,()=>Pa.$createHeadingNode(P))}):P==="paragraph"&&v!=="paragraph"?i.update(()=>{const D=_e.$getSelection();(_e.$isRangeSelection(D)||_e.DEPRECATED_$isGridSelection(D))&&lo.$setBlocksType(D,()=>_e.$createParagraphNode())}):P==="number"&&v!=="number"?i.dispatchCommand(ji.INSERT_ORDERED_LIST_COMMAND,void 0):P==="bullet"&&v!=="bullet"?i.dispatchCommand(ji.INSERT_UNORDERED_LIST_COMMAND,void 0):i.dispatchCommand(ji.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{i.update(()=>{const P=_e.$getSelection();if(_e.$isRangeSelection(P)){const D=P.anchor,B=P.focus,oe=P.getNodes();if(D.key===B.key&&D.offset===B.offset)return;oe.forEach((H,Z)=>{_e.$isTextNode(H)?(Z===0&&D.offset!==0&&(H=H.splitText(D.offset)[1]||H),Z===oe.length-1&&(H=H.splitText(B.offset)[0]||H),H.__style!==""&&H.setStyle(""),H.__format!==0&&(H.setFormat(0),Ft.$getNearestBlockElementAncestorOrThrow(H).setFormat(""))):Pa.$isHeadingNode(H)&&H.replace(_e.$createParagraphNode(),!0)})}})},[o]),_.jsxs("div",{className:"sticky top-0 border-b bg-background border-highlight flex flex-col",children:[_.jsxs("div",{className:"flex flex-row gap-1",children:[_.jsx(NA,{options:Object.values(T),label:T[v]??v+" (not supported)",onChange:P=>{L($[P])}}),_.jsx($o,{variant:"primary",onClick:P=>{P.preventDefault(),i.dispatchCommand(_e.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:_.jsx(_A,{className:`${u&&"stroke-[3px]"}`})}),_.jsx($o,{active:h,onClick:P=>{P.preventDefault(),i.dispatchCommand(_e.FORMAT_TEXT_COMMAND,"strikethrough")},icon:_.jsx(CA,{className:`${h&&"stroke-[2px]"}`})}),_.jsx($o,{active:d,onClick:P=>{P.preventDefault(),i.dispatchCommand(_e.FORMAT_TEXT_COMMAND,"italic")},icon:_.jsx(SA,{className:`${d&&"stroke-[3px]"}`})}),_.jsx($o,{active:x!==null,onClick:P=>{P.preventDefault(),S(""),b("")},icon:_.jsx(UA,{width:12,height:12,className:`${x!==null&&"stroke-[3px]"}`})}),_.jsxs("label",{className:"flex items-center justify-center cursor-pointer",children:[_.jsx(mS,{}),_.jsx("input",{type:"file",hidden:!0,onChange:P=>{P.preventDefault(),wC(P).then(D=>{i.dispatchCommand(xC,{...D})}).catch(D=>{console.error("Error reading image",D)})}})]})]}),x!==null&&_.jsxs("div",{className:"flex flex-row p-2",children:[_.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 text-primary bg-background px-2",value:x,onChange:P=>{P.preventDefault(),S(P.target.value)}}),_.jsx($o,{variant:"primary",onClick:P=>{P.preventDefault(),b(x||null)},icon:_.jsx(zA,{size:14})}),_.jsx($o,{variant:"primary",onClick:P=>{P.preventDefault(),b(null)},icon:_.jsx(HA,{size:14})})]})]})},ZA=KA;function GA(t){console.error(t)}const YA=28,XA=({richtext:t,onEditor:e})=>{const{windowSize:n}=Lv(),i={namespace:"val",editorState:o=>{o.setEditorState(o.parseEditorState({root:zR($S(t))}))},nodes:[Pa.HeadingNode,Bu,ji.ListNode,ji.ListItemNode,fs.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:GA};return _.jsxs(JO.LexicalComposer,{initialConfig:i,children:[_.jsx(vA,{}),_.jsx(ZA,{onEditor:e}),_.jsx(JP.RichTextPlugin,{contentEditable:_.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-YA:void 0},children:_.jsx(gA,{className:"p-4 outline-none bg-fill"})}),placeholder:_.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:oP}),_.jsx(hA.LinkPlugin,{}),_.jsx(OA,{}),_.jsx(rA.ListPlugin,{}),_.jsx(yA,{}),_.jsx(pP.HistoryPlugin,{})]})};var QA={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 JA=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(t,e)=>{const n=p.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...QA,width:i,height:i,stroke:r,strokeWidth:l?Number(o)*24/Number(i):o,className:`lucide lucide-${JA(t)}`,...a},[...e.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${t}`,n},qA=Kn("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),bC=Kn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),e5=Kn("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),kx=Kn("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"}]]),t5=Kn("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"}]]),n5=Kn("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"}]]),r5=Kn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),i5=Kn("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),o5=Kn("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),l5=Kn("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),s5=Kn("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),a5=Kn("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"}]]),u5=Kn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),zv="p-1 border rounded-full shadow border-accent",bx="valbuild:urlBeforeNavigation";function c5({api:t,patches:e,onCommit:n}){const{theme:r,setTheme:i,editMode:o,setEditMode:l,session:s}=Lv();if(s.status==="success"&&s.data.mode==="unauthorized")return _.jsxs($x,{href:t.getLoginUrl(window.location.href),children:[_.jsx("span",{children:"Login"}),_.jsx(kx,{size:18})]});if(s.status==="success"&&!s.data.enabled)return _.jsxs($x,{href:t.getEnableUrl(window.location.href),children:[_.jsx("span",{children:"Enable"}),_.jsx(kx,{size:18})]});const[a,u]=p.useState();return p.useEffect(()=>{let c=0;for(const d in e)c+=e[d].length;u(c)},[e]),_.jsxs(d5,{children:[_.jsx(wc,{active:o==="hover",onClick:()=>{l(c=>c==="hover"?"off":"hover")},children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="hover"?_.jsx(i5,{size:18}):_.jsx(o5,{size:18})})}),_.jsx(wc,{onClick:()=>{i(r==="dark"?"light":"dark")},children:_.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[r==="dark"&&_.jsx(a5,{size:15}),r==="light"&&_.jsx(r5,{size:15})]})}),_.jsx(wc,{active:o==="full",onClick:()=>{if(o!=="full")localStorage.setItem(bx,window.location.href),window.location.href=t.getEditUrl();else if(o==="full"){const c=localStorage.getItem(bx);window.location.href=c||"/"}},children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:o==="full"?_.jsx(n5,{size:15}):_.jsx(t5,{size:15})})}),a!==void 0&&_.jsx(wc,{onClick:()=>{a>0?t.postCommit({patches:e}).then(c=>{Lo.isErr(c)?(console.error(c.error),alert("Could not commit patches: "+c.error.message)):(console.log("Committed patches: ",c.value),n())}):alert("No patches to commit")},children:_.jsxs("div",{className:"relative h-[24px] w-[24px] flex justify-center items-center",children:[_.jsx("div",{className:"absolute -right-[10px] -top-[10px] border border-border rounded-full px-1 font-sans text-xs bg-card text-accent",children:a}),_.jsx(s5,{size:18})]})}),_.jsx("a",{className:zv,href:t.getDisableUrl(window.location.href),children:_.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:_.jsx(l5,{size:18})})})]})}function $x({href:t,children:e}){return _.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:_.jsx("a",{className:zv,href:t,children:_.jsx("div",{className:"flex items-center justify-center px-2 gap-x-2",children:e})})})}function d5({children:t}){return _.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:t})}function wc({active:t,onClick:e,children:n}){return _.jsx("button",{className:_f(zv,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":t}),onClick:e,children:n})}function f5(t,e){const[n,r]=p.useState({}),[i,o]=p.useState(0);return p.useEffect(()=>{t.status==="success"&&t.data.mode==="proxy"&&e.getPatches({}).then(l=>{if(Lo.isOk(l)){const s={};for(const a in l.value)s[a]=l.value[a].map(u=>u.patch_id);r(s)}else console.error("Could not load patches",l.error)})},[t,i]),{patches:n,setPatchResetId:o}}function h5(t="dark"){const[e,n]=p.useState(t);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=i=>{localStorage.getItem("val-theme")||n(i.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",r)}},[]),[e,r=>{localStorage.setItem("val-theme",r),n(r)}]}var De;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const o={};for(const l of i)o[l]=l;return o},t.getValidEnumValues=i=>{const o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),l={};for(const s of o)l[s]=i[s];return t.objectValues(l)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&o.push(l);return o},t.find=(i,o)=>{for(const l of i)if(o(l))return l},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(De||(De={}));var Ig;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ig||(Ig={}));const q=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),zi=t=>{switch(typeof t){case"undefined":return q.undefined;case"string":return q.string;case"number":return isNaN(t)?q.nan:q.number;case"boolean":return q.boolean;case"function":return q.function;case"bigint":return q.bigint;case"symbol":return q.symbol;case"object":return Array.isArray(t)?q.array:t===null?q.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?q.promise:typeof Map<"u"&&t instanceof Map?q.map:typeof Set<"u"&&t instanceof Set?q.set:typeof Date<"u"&&t instanceof Date?q.date:q.object;default:return q.unknown}},V=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),p5=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class wr extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(o){return o.message},r={_errors:[]},i=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(i);else if(l.code==="invalid_return_type")i(l.returnTypeError);else if(l.code==="invalid_arguments")i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let s=r,a=0;for(;a<l.path.length;){const u=l.path[a];a===l.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(n(l))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}wr.create=t=>new wr(t);const du=(t,e)=>{let n;switch(t.code){case V.invalid_type:t.received===q.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case V.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,De.jsonStringifyReplacer)}`;break;case V.unrecognized_keys:n=`Unrecognized key(s) in object: ${De.joinValues(t.keys,", ")}`;break;case V.invalid_union:n="Invalid input";break;case V.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${De.joinValues(t.options)}`;break;case V.invalid_enum_value:n=`Invalid enum value. Expected ${De.joinValues(t.options)}, received '${t.received}'`;break;case V.invalid_arguments:n="Invalid function arguments";break;case V.invalid_return_type:n="Invalid function return type";break;case V.invalid_date:n="Invalid date";break;case V.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:De.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case V.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case V.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case V.custom:n="Invalid input";break;case V.invalid_intersection_types:n="Intersection results could not be merged";break;case V.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case V.not_finite:n="Number must be finite";break;default:n=e.defaultError,De.assertNever(t)}return{message:n}};let $C=du;function g5(t){$C=t}function Fd(){return $C}const Bd=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,o=[...n,...i.path||[]],l={...i,path:o};let s="";const a=r.filter(u=>!!u).slice().reverse();for(const u of a)s=u(l,{data:e,defaultError:s}).message;return{...i,path:o,message:i.message||s}},m5=[];function te(t,e){const n=Bd({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Fd(),du].filter(r=>!!r)});t.common.issues.push(n)}class on{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return ye;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return on.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:o,value:l}=i;if(o.status==="aborted"||l.status==="aborted")return ye;o.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||i.alwaysSet)&&(r[o.value]=l.value)}return{status:e.value,value:r}}}const ye=Object.freeze({status:"aborted"}),TC=t=>({status:"dirty",value:t}),yn=t=>({status:"valid",value:t}),Dg=t=>t.status==="aborted",jg=t=>t.status==="dirty",fu=t=>t.status==="valid",Ud=t=>typeof Promise<"u"&&t instanceof Promise;var fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));class Hr{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Tx=(t,e)=>{if(fu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new wr(t.common.issues);return this._error=n,this._error}}};function xe(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(l,s)=>l.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}class Ce{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return zi(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:zi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new on,ctx:{common:e.parent.common,data:e.data,parsedType:zi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Ud(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zi(e)},o=this._parseSync({data:e,path:i.path,parent:i});return Tx(i,o)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:zi(e)},i=this._parse({data:e,path:r.path,parent:r}),o=await(Ud(i)?i:Promise.resolve(i));return Tx(r,o)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const l=e(i),s=()=>o.addIssue({code:V.custom,...r(i)});return typeof Promise<"u"&&l instanceof Promise?l.then(a=>a?!0:(s(),!1)):l?!0:(s(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new kr({schema:this,typeName:he.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ci.create(this,this._def)}nullable(){return Qo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sr.create(this,this._def)}promise(){return ps.create(this,this._def)}or(e){return mu.create([this,e],this._def)}and(e){return vu.create(this,e,this._def)}transform(e){return new kr({...xe(this._def),schema:this,typeName:he.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Su({...xe(this._def),innerType:this,defaultValue:n,typeName:he.ZodDefault})}brand(){return new RC({typeName:he.ZodBranded,type:this,...xe(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Kd({...xe(this._def),innerType:this,catchValue:n,typeName:he.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Uu.create(this,e)}readonly(){return Gd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const v5=/^c[^\s-]{8,}$/i,y5=/^[a-z][a-z0-9]*$/,x5=/^[0-9A-HJKMNP-TV-Z]{26}$/,_5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,w5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,S5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zh;const E5=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,C5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,k5=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function b5(t,e){return!!((e==="v4"||!e)&&E5.test(t)||(e==="v6"||!e)&&C5.test(t))}class yr extends Ce{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){const o=this._getOrReturnCtx(e);return te(o,{code:V.invalid_type,expected:q.string,received:o.parsedType}),ye}const r=new on;let i;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),te(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),te(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=e.data.length>o.value,s=e.data.length<o.value;(l||s)&&(i=this._getOrReturnCtx(e,i),l?te(i,{code:V.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&te(i,{code:V.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")w5.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"email",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")zh||(zh=new RegExp(S5,"u")),zh.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"emoji",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")_5.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"uuid",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")v5.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"cuid",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")y5.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"cuid2",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")x5.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"ulid",code:V.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),te(i,{validation:"url",code:V.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"regex",code:V.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),te(i,{code:V.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),te(i,{code:V.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),te(i,{code:V.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?k5(o).test(e.data)||(i=this._getOrReturnCtx(e,i),te(i,{code:V.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?b5(e.data,o.version)||(i=this._getOrReturnCtx(e,i),te(i,{validation:"ip",code:V.invalid_string,message:o.message}),r.dirty()):De.assertNever(o);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:V.invalid_string,...fe.errToObj(r)})}_addCheck(e){return new yr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.errToObj(e)})}datetime(e){var n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,...fe.errToObj(e==null?void 0:e.message)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new yr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new yr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new yr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}yr.create=t=>{var e;return new yr({checks:[],typeName:he.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};function $5(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(t.toFixed(i).replace(".","")),l=parseInt(e.toFixed(i).replace(".",""));return o%l/Math.pow(10,i)}class ao extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){const o=this._getOrReturnCtx(e);return te(o,{code:V.invalid_type,expected:q.number,received:o.parsedType}),ye}let r;const i=new on;for(const o of this._def.checks)o.kind==="int"?De.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:V.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?$5(e.data,o.value)!==0&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),te(r,{code:V.not_finite,message:o.message}),i.dirty()):De.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,r,i){return new ao({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:fe.toString(i)}]})}_addCheck(e){return new ao({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&De.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}ao.create=t=>new ao({checks:[],typeName:he.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});class uo extends Ce{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==q.bigint){const o=this._getOrReturnCtx(e);return te(o,{code:V.invalid_type,expected:q.bigint,received:o.parsedType}),ye}let r;const i=new on;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),te(r,{code:V.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):De.assertNever(o);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,r,i){return new uo({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:fe.toString(i)}]})}_addCheck(e){return new uo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}uo.create=t=>{var e;return new uo({checks:[],typeName:he.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...xe(t)})};class hu extends Ce{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.boolean,received:r.parsedType}),ye}return yn(e.data)}}hu.create=t=>new hu({typeName:he.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});class Yo extends Ce{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){const o=this._getOrReturnCtx(e);return te(o,{code:V.invalid_type,expected:q.date,received:o.parsedType}),ye}if(isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return te(o,{code:V.invalid_date}),ye}const r=new on;let i;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),te(i,{code:V.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),te(i,{code:V.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):De.assertNever(o);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Yo({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Yo.create=t=>new Yo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:he.ZodDate,...xe(t)});class Wd extends Ce{_parse(e){if(this._getType(e)!==q.symbol){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.symbol,received:r.parsedType}),ye}return yn(e.data)}}Wd.create=t=>new Wd({typeName:he.ZodSymbol,...xe(t)});class pu extends Ce{_parse(e){if(this._getType(e)!==q.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.undefined,received:r.parsedType}),ye}return yn(e.data)}}pu.create=t=>new pu({typeName:he.ZodUndefined,...xe(t)});class gu extends Ce{_parse(e){if(this._getType(e)!==q.null){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.null,received:r.parsedType}),ye}return yn(e.data)}}gu.create=t=>new gu({typeName:he.ZodNull,...xe(t)});class hs extends Ce{constructor(){super(...arguments),this._any=!0}_parse(e){return yn(e.data)}}hs.create=t=>new hs({typeName:he.ZodAny,...xe(t)});class zo extends Ce{constructor(){super(...arguments),this._unknown=!0}_parse(e){return yn(e.data)}}zo.create=t=>new zo({typeName:he.ZodUnknown,...xe(t)});class gi extends Ce{_parse(e){const n=this._getOrReturnCtx(e);return te(n,{code:V.invalid_type,expected:q.never,received:n.parsedType}),ye}}gi.create=t=>new gi({typeName:he.ZodNever,...xe(t)});class Vd extends Ce{_parse(e){if(this._getType(e)!==q.undefined){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.void,received:r.parsedType}),ye}return yn(e.data)}}Vd.create=t=>new Vd({typeName:he.ZodVoid,...xe(t)});class Sr extends Ce{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==q.array)return te(n,{code:V.invalid_type,expected:q.array,received:n.parsedType}),ye;if(i.exactLength!==null){const l=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(l||s)&&(te(n,{code:l?V.too_big:V.too_small,minimum:s?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(te(n,{code:V.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(te(n,{code:V.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,s)=>i.type._parseAsync(new Hr(n,l,n.path,s)))).then(l=>on.mergeArray(r,l));const o=[...n.data].map((l,s)=>i.type._parseSync(new Hr(n,l,n.path,s)));return on.mergeArray(r,o)}get element(){return this._def.type}min(e,n){return new Sr({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new Sr({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new Sr({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}Sr.create=(t,e)=>new Sr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:he.ZodArray,...xe(e)});function kl(t){if(t instanceof ct){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=ci.create(kl(r))}return new ct({...t._def,shape:()=>e})}else return t instanceof Sr?new Sr({...t._def,type:kl(t.element)}):t instanceof ci?ci.create(kl(t.unwrap())):t instanceof Qo?Qo.create(kl(t.unwrap())):t instanceof Kr?Kr.create(t.items.map(e=>kl(e))):t}class ct extends Ce{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=De.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==q.object){const u=this._getOrReturnCtx(e);return te(u,{code:V.invalid_type,expected:q.object,received:u.parsedType}),ye}const{status:r,ctx:i}=this._processInputParams(e),{shape:o,keys:l}=this._getCached(),s=[];if(!(this._def.catchall instanceof gi&&this._def.unknownKeys==="strip"))for(const u in i.data)l.includes(u)||s.push(u);const a=[];for(const u of l){const c=o[u],d=i.data[u];a.push({key:{status:"valid",value:u},value:c._parse(new Hr(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof gi){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)a.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(te(i,{code:V.unrecognized_keys,keys:s}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const d=i.data[c];a.push({key:{status:"valid",value:c},value:u._parse(new Hr(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of a){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>on.mergeObjectSync(r,u)):on.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new ct({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,o,l,s;const a=(l=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&l!==void 0?l:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=fe.errToObj(e).message)!==null&&s!==void 0?s:a}:{message:a}}}:{}})}strip(){return new ct({...this._def,unknownKeys:"strip"})}passthrough(){return new ct({...this._def,unknownKeys:"passthrough"})}extend(e){return new ct({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ct({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:he.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new ct({...this._def,catchall:e})}pick(e){const n={};return De.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}omit(e){const n={};return De.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new ct({...this._def,shape:()=>n})}deepPartial(){return kl(this)}partial(e){const n={};return De.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new ct({...this._def,shape:()=>n})}required(e){const n={};return De.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof ci;)o=o._def.innerType;n[r]=o}}),new ct({...this._def,shape:()=>n})}keyof(){return NC(De.objectKeys(this.shape))}}ct.create=(t,e)=>new ct({shape:()=>t,unknownKeys:"strip",catchall:gi.create(),typeName:he.ZodObject,...xe(e)});ct.strictCreate=(t,e)=>new ct({shape:()=>t,unknownKeys:"strict",catchall:gi.create(),typeName:he.ZodObject,...xe(e)});ct.lazycreate=(t,e)=>new ct({shape:t,unknownKeys:"strip",catchall:gi.create(),typeName:he.ZodObject,...xe(e)});class mu extends Ce{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const l=o.map(s=>new wr(s.ctx.common.issues));return te(n,{code:V.invalid_union,unionErrors:l}),ye}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let o;const l=[];for(const a of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=a._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&l.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=l.map(a=>new wr(a));return te(n,{code:V.invalid_union,unionErrors:s}),ye}}get options(){return this._def.options}}mu.create=(t,e)=>new mu({options:t,typeName:he.ZodUnion,...xe(e)});const Hc=t=>t instanceof xu?Hc(t.schema):t instanceof kr?Hc(t.innerType()):t instanceof _u?[t.value]:t instanceof co?t.options:t instanceof wu?Object.keys(t.enum):t instanceof Su?Hc(t._def.innerType):t instanceof pu?[void 0]:t instanceof gu?[null]:null;class If extends Ce{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return te(n,{code:V.invalid_type,expected:q.object,received:n.parsedType}),ye;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(te(n,{code:V.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ye)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const o of n){const l=Hc(o.shape[e]);if(!l)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of l){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new If({typeName:he.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...xe(r)})}}function zg(t,e){const n=zi(t),r=zi(e);if(t===e)return{valid:!0,data:t};if(n===q.object&&r===q.object){const i=De.objectKeys(e),o=De.objectKeys(t).filter(s=>i.indexOf(s)!==-1),l={...t,...e};for(const s of o){const a=zg(t[s],e[s]);if(!a.valid)return{valid:!1};l[s]=a.data}return{valid:!0,data:l}}else if(n===q.array&&r===q.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let o=0;o<t.length;o++){const l=t[o],s=e[o],a=zg(l,s);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}else return n===q.date&&r===q.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class vu extends Ce{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(o,l)=>{if(Dg(o)||Dg(l))return ye;const s=zg(o.value,l.value);return s.valid?((jg(o)||jg(l))&&n.dirty(),{status:n.value,value:s.data}):(te(r,{code:V.invalid_intersection_types}),ye)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>i(o,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}vu.create=(t,e,n)=>new vu({left:t,right:e,typeName:he.ZodIntersection,...xe(n)});class Kr extends Ce{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.array)return te(r,{code:V.invalid_type,expected:q.array,received:r.parsedType}),ye;if(r.data.length<this._def.items.length)return te(r,{code:V.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:V.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,s)=>{const a=this._def.items[s]||this._def.rest;return a?a._parse(new Hr(r,l,r.path,s)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>on.mergeArray(n,l)):on.mergeArray(n,o)}get items(){return this._def.items}rest(e){return new Kr({...this._def,rest:e})}}Kr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kr({items:t,typeName:he.ZodTuple,rest:null,...xe(e)})};class yu extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.object)return te(r,{code:V.invalid_type,expected:q.object,received:r.parsedType}),ye;const i=[],o=this._def.keyType,l=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new Hr(r,s,r.path,s)),value:l._parse(new Hr(r,r.data[s],r.path,s))});return r.common.async?on.mergeObjectAsync(n,i):on.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ce?new yu({keyType:e,valueType:n,typeName:he.ZodRecord,...xe(r)}):new yu({keyType:yr.create(),valueType:e,typeName:he.ZodRecord,...xe(n)})}}class Hd extends Ce{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.map)return te(r,{code:V.invalid_type,expected:q.map,received:r.parsedType}),ye;const i=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([s,a],u)=>({key:i._parse(new Hr(r,s,r.path,[u,"key"])),value:o._parse(new Hr(r,a,r.path,[u,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const a of l){const u=await a.key,c=await a.value;if(u.status==="aborted"||c.status==="aborted")return ye;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const a of l){const u=a.key,c=a.value;if(u.status==="aborted"||c.status==="aborted")return ye;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(u.value,c.value)}return{status:n.value,value:s}}}}Hd.create=(t,e,n)=>new Hd({valueType:e,keyType:t,typeName:he.ZodMap,...xe(n)});class Xo extends Ce{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==q.set)return te(r,{code:V.invalid_type,expected:q.set,received:r.parsedType}),ye;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(te(r,{code:V.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(te(r,{code:V.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function l(a){const u=new Set;for(const c of a){if(c.status==="aborted")return ye;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const s=[...r.data.values()].map((a,u)=>o._parse(new Hr(r,a,r.path,u)));return r.common.async?Promise.all(s).then(a=>l(a)):l(s)}min(e,n){return new Xo({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Xo({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Xo.create=(t,e)=>new Xo({valueType:t,minSize:null,maxSize:null,typeName:he.ZodSet,...xe(e)});class Ql extends Ce{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==q.function)return te(n,{code:V.invalid_type,expected:q.function,received:n.parsedType}),ye;function r(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),du].filter(u=>!!u),issueData:{code:V.invalid_arguments,argumentsError:a}})}function i(s,a){return Bd({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Fd(),du].filter(u=>!!u),issueData:{code:V.invalid_return_type,returnTypeError:a}})}const o={errorMap:n.common.contextualErrorMap},l=n.data;if(this._def.returns instanceof ps){const s=this;return yn(async function(...a){const u=new wr([]),c=await s._def.args.parseAsync(a,o).catch(h=>{throw u.addIssue(r(a,h)),u}),d=await Reflect.apply(l,this,c);return await s._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const s=this;return yn(function(...a){const u=s._def.args.safeParse(a,o);if(!u.success)throw new wr([r(a,u.error)]);const c=Reflect.apply(l,this,u.data),d=s._def.returns.safeParse(c,o);if(!d.success)throw new wr([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Ql({...this._def,args:Kr.create(e).rest(zo.create())})}returns(e){return new Ql({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Ql({args:e||Kr.create([]).rest(zo.create()),returns:n||zo.create(),typeName:he.ZodFunction,...xe(r)})}}class xu extends Ce{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xu.create=(t,e)=>new xu({getter:t,typeName:he.ZodLazy,...xe(e)});class _u extends Ce{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return te(n,{received:n.data,code:V.invalid_literal,expected:this._def.value}),ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}_u.create=(t,e)=>new _u({value:t,typeName:he.ZodLiteral,...xe(e)});function NC(t,e){return new co({values:t,typeName:he.ZodEnum,...xe(e)})}class co extends Ce{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{expected:De.joinValues(r),received:n.parsedType,code:V.invalid_type}),ye}if(this._def.values.indexOf(e.data)===-1){const n=this._getOrReturnCtx(e),r=this._def.values;return te(n,{received:n.data,code:V.invalid_enum_value,options:r}),ye}return yn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e){return co.create(e)}exclude(e){return co.create(this.options.filter(n=>!e.includes(n)))}}co.create=NC;class wu extends Ce{_parse(e){const n=De.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==q.string&&r.parsedType!==q.number){const i=De.objectValues(n);return te(r,{expected:De.joinValues(i),received:r.parsedType,code:V.invalid_type}),ye}if(n.indexOf(e.data)===-1){const i=De.objectValues(n);return te(r,{received:r.data,code:V.invalid_enum_value,options:i}),ye}return yn(e.data)}get enum(){return this._def.values}}wu.create=(t,e)=>new wu({values:t,typeName:he.ZodNativeEnum,...xe(e)});class ps extends Ce{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==q.promise&&n.common.async===!1)return te(n,{code:V.invalid_type,expected:q.promise,received:n.parsedType}),ye;const r=n.parsedType===q.promise?n.data:Promise.resolve(n.data);return yn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ps.create=(t,e)=>new ps({type:t,typeName:he.ZodPromise,...xe(e)});class kr extends Ce{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===he.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:l=>{te(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const l=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(l).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:l,path:r.path,parent:r})}if(i.type==="refinement"){const l=s=>{const a=i.refinement(s,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ye:(s.status==="dirty"&&n.dirty(),l(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?ye:(s.status==="dirty"&&n.dirty(),l(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fu(l))return l;const s=i.transform(l.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>fu(l)?Promise.resolve(i.transform(l.value,o)).then(s=>({status:n.value,value:s})):l);De.assertNever(i)}}kr.create=(t,e,n)=>new kr({schema:t,typeName:he.ZodEffects,effect:e,...xe(n)});kr.createWithPreprocess=(t,e,n)=>new kr({schema:e,effect:{type:"preprocess",transform:t},typeName:he.ZodEffects,...xe(n)});class ci extends Ce{_parse(e){return this._getType(e)===q.undefined?yn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ci.create=(t,e)=>new ci({innerType:t,typeName:he.ZodOptional,...xe(e)});class Qo extends Ce{_parse(e){return this._getType(e)===q.null?yn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qo.create=(t,e)=>new Qo({innerType:t,typeName:he.ZodNullable,...xe(e)});class Su extends Ce{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Su.create=(t,e)=>new Su({innerType:t,typeName:he.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});class Kd extends Ce{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ud(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new wr(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new wr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Kd.create=(t,e)=>new Kd({innerType:t,typeName:he.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});class Zd extends Ce{_parse(e){if(this._getType(e)!==q.nan){const r=this._getOrReturnCtx(e);return te(r,{code:V.invalid_type,expected:q.nan,received:r.parsedType}),ye}return{status:"valid",value:e.data}}}Zd.create=t=>new Zd({typeName:he.ZodNaN,...xe(t)});const T5=Symbol("zod_brand");class RC extends Ce{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Uu extends Ce{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ye:o.status==="dirty"?(n.dirty(),TC(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ye:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new Uu({in:e,out:n,typeName:he.ZodPipeline})}}class Gd extends Ce{_parse(e){const n=this._def.innerType._parse(e);return fu(n)&&(n.value=Object.freeze(n.value)),n}}Gd.create=(t,e)=>new Gd({innerType:t,typeName:he.ZodReadonly,...xe(e)});const OC=(t,e={},n)=>t?hs.create().superRefine((r,i)=>{var o,l;if(!t(r)){const s=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,a=(l=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&l!==void 0?l:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:a})}}):hs.create(),N5={object:ct.lazycreate};var he;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(he||(he={}));const R5=(t,e={message:`Input not instance of ${t.name}`})=>OC(n=>n instanceof t,e),PC=yr.create,AC=ao.create,O5=Zd.create,P5=uo.create,MC=hu.create,A5=Yo.create,M5=Wd.create,L5=pu.create,I5=gu.create,D5=hs.create,j5=zo.create,z5=gi.create,F5=Vd.create,B5=Sr.create,U5=ct.create,W5=ct.strictCreate,V5=mu.create,H5=If.create,K5=vu.create,Z5=Kr.create,G5=yu.create,Y5=Hd.create,X5=Xo.create,Q5=Ql.create,J5=xu.create,q5=_u.create,e3=co.create,t3=wu.create,n3=ps.create,Nx=kr.create,r3=ci.create,i3=Qo.create,o3=kr.createWithPreprocess,l3=Uu.create,s3=()=>PC().optional(),a3=()=>AC().optional(),u3=()=>MC().optional(),c3={string:t=>yr.create({...t,coerce:!0}),number:t=>ao.create({...t,coerce:!0}),boolean:t=>hu.create({...t,coerce:!0}),bigint:t=>uo.create({...t,coerce:!0}),date:t=>Yo.create({...t,coerce:!0})},d3=ye;var Cn=Object.freeze({__proto__:null,defaultErrorMap:du,setErrorMap:g5,getErrorMap:Fd,makeIssue:Bd,EMPTY_PATH:m5,addIssueToContext:te,ParseStatus:on,INVALID:ye,DIRTY:TC,OK:yn,isAborted:Dg,isDirty:jg,isValid:fu,isAsync:Ud,get util(){return De},get objectUtil(){return Ig},ZodParsedType:q,getParsedType:zi,ZodType:Ce,ZodString:yr,ZodNumber:ao,ZodBigInt:uo,ZodBoolean:hu,ZodDate:Yo,ZodSymbol:Wd,ZodUndefined:pu,ZodNull:gu,ZodAny:hs,ZodUnknown:zo,ZodNever:gi,ZodVoid:Vd,ZodArray:Sr,ZodObject:ct,ZodUnion:mu,ZodDiscriminatedUnion:If,ZodIntersection:vu,ZodTuple:Kr,ZodRecord:yu,ZodMap:Hd,ZodSet:Xo,ZodFunction:Ql,ZodLazy:xu,ZodLiteral:_u,ZodEnum:co,ZodNativeEnum:wu,ZodPromise:ps,ZodEffects:kr,ZodTransformer:kr,ZodOptional:ci,ZodNullable:Qo,ZodDefault:Su,ZodCatch:Kd,ZodNaN:Zd,BRAND:T5,ZodBranded:RC,ZodPipeline:Uu,ZodReadonly:Gd,custom:OC,Schema:Ce,ZodSchema:Ce,late:N5,get ZodFirstPartyTypeKind(){return he},coerce:c3,any:D5,array:B5,bigint:P5,boolean:MC,date:A5,discriminatedUnion:H5,effect:Nx,enum:e3,function:Q5,instanceof:R5,intersection:K5,lazy:J5,literal:q5,map:Y5,nan:O5,nativeEnum:t3,never:z5,null:I5,nullable:i3,number:AC,object:U5,oboolean:u3,onumber:a3,optional:r3,ostring:s3,pipeline:l3,preprocess:o3,promise:n3,record:G5,set:X5,strictObject:W5,string:PC,symbol:M5,transformer:Nx,tuple:Z5,undefined:L5,union:V5,unknown:j5,void:F5,NEVER:d3,ZodIssueCode:V,quotelessJson:p5,ZodError:wr});const f3=Cn.union([Cn.object({id:Cn.string(),mode:Cn.literal("proxy"),full_name:Cn.string().optional().nullable(),username:Cn.string().optional().nullable(),avatar_url:Cn.string().url().optional().nullable(),enabled:Cn.boolean()}),Cn.object({mode:Cn.literal("local"),enabled:Cn.boolean().optional()}),Cn.object({mode:Cn.literal("unauthorized"),enabled:Cn.boolean().optional()})]);function h3(t){const[e,n]=p.useState({status:"not-asked"}),[r,i]=p.useState(0);return p.useEffect(()=>{n({status:"loading"}),t.getSession().then(async o=>{try{if(Lo.isOk(o)){const l=o.value;n({status:"success",data:f3.parse(l)})}else o.error.statusCode===401?n({status:"success",data:{mode:"unauthorized"}}):r<3?setTimeout(()=>{i(r+1)},200*r):n({status:"error",error:"Could not fetch session"})}catch(l){console.error("Could not authorize:",l),n({status:"error",error:"Got an error while trying to get session"})}})},[r]),e}const Rx=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,Ox=uS,p3=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Ox(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,l=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Rx(c)||Rx(d);return i[u][f]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),a=e==null||(r=e.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,w]=m;return Array.isArray(w)?w.includes({...o,...s}[g]):{...o,...s}[g]===w})?[...u,d,f]:u},[]);return Ox(t,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},g3=p3("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"}}),Ms=p.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...i},o)=>{const l=r?as:"button";return _.jsx(l,{className:xt(g3({variant:e,size:n,className:t})),ref:o,...i})});Ms.displayName="Button";const Fv=p.forwardRef(({className:t,type:e,...n},r)=>_.jsx("input",{type:e,className:xt("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",t),ref:r,...n}));Fv.displayName="Input";function LC(t){const e=t+"CollectionProvider",[n,r]=ol(e),[i,o]=n(e,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:m,children:g}=h,w=re.useRef(null),v=re.useRef(new Map).current;return re.createElement(i,{scope:m,itemMap:v,collectionRef:w},g)},s=t+"CollectionSlot",a=re.forwardRef((h,m)=>{const{scope:g,children:w}=h,v=o(s,g),y=st(m,v.collectionRef);return re.createElement(as,{ref:y},w)}),u=t+"CollectionItemSlot",c="data-radix-collection-item",d=re.forwardRef((h,m)=>{const{scope:g,children:w,...v}=h,y=re.useRef(null),x=st(m,y),S=o(u,g);return re.useEffect(()=>(S.itemMap.set(y,{ref:y,...v}),()=>void S.itemMap.delete(y))),re.createElement(as,{[c]:"",ref:x},w)});function f(h){const m=o(t+"CollectionConsumer",h);return re.useCallback(()=>{const w=m.collectionRef.current;if(!w)return[];const v=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((S,b)=>v.indexOf(S.ref.current)-v.indexOf(b.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function m3(t,e=globalThis==null?void 0:globalThis.document){const n=en(t);p.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}const Fg="dismissableLayer.update",v3="dismissableLayer.pointerDownOutside",y3="dismissableLayer.focusOutside";let Px;const x3=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_3=p.forwardRef((t,e)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=t,c=p.useContext(x3),[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=st(e,O=>f(O)),w=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(v),x=d?w.indexOf(d):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,T=w3(O=>{const L=O.target,P=[...c.branches].some(D=>D.contains(L));!b||P||(o==null||o(O),s==null||s(O),O.defaultPrevented||a==null||a())},h),$=S3(O=>{const L=O.target;[...c.branches].some(D=>D.contains(L))||(l==null||l(O),s==null||s(O),O.defaultPrevented||a==null||a())},h);return m3(O=>{x===c.layers.size-1&&(i==null||i(O),!O.defaultPrevented&&a&&(O.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Px=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ax(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Px)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ax())},[d,c]),p.useEffect(()=>{const O=()=>m({});return document.addEventListener(Fg,O),()=>document.removeEventListener(Fg,O)},[]),p.createElement(Ke.div,ie({},u,{ref:g,style:{pointerEvents:S?b?"auto":"none":void 0,...t.style},onFocusCapture:nt(t.onFocusCapture,$.onFocusCapture),onBlurCapture:nt(t.onBlurCapture,$.onBlurCapture),onPointerDownCapture:nt(t.onPointerDownCapture,T.onPointerDownCapture)}))});function w3(t,e=globalThis==null?void 0:globalThis.document){const n=en(t),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){IC(v3,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);r.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",o),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function S3(t,e=globalThis==null?void 0:globalThis.document){const n=en(t),r=p.useRef(!1);return p.useEffect(()=>{const i=o=>{o.target&&!r.current&&IC(y3,n,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ax(){const t=new CustomEvent(Fg);document.dispatchEvent(t)}function IC(t,e,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?t2(i,o):i.dispatchEvent(o)}let Fh=0;function E3(){p.useEffect(()=>{var t,e;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=n[0])!==null&&t!==void 0?t:Mx()),document.body.insertAdjacentElement("beforeend",(e=n[1])!==null&&e!==void 0?e:Mx()),Fh++,()=>{Fh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Fh--}},[])}function Mx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const Bh="focusScope.autoFocusOnMount",Uh="focusScope.autoFocusOnUnmount",Lx={bubbles:!1,cancelable:!0},C3=p.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=t,[s,a]=p.useState(null),u=en(i),c=en(o),d=p.useRef(null),f=st(e,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 $=T.target;s.contains($)?d.current=$:Oi(d.current,{select:!0})},x=function(T){if(h.paused||!s)return;const $=T.relatedTarget;$!==null&&(s.contains($)||Oi(d.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Oi(s)};var g=y,w=x,v=S;document.addEventListener("focusin",y),document.addEventListener("focusout",x);const b=new MutationObserver(S);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),b.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){Dx.add(h);const g=document.activeElement;if(!s.contains(g)){const v=new CustomEvent(Bh,Lx);s.addEventListener(Bh,u),s.dispatchEvent(v),v.defaultPrevented||(k3(R3(DC(s)),{select:!0}),document.activeElement===g&&Oi(s))}return()=>{s.removeEventListener(Bh,u),setTimeout(()=>{const v=new CustomEvent(Uh,Lx);s.addEventListener(Uh,c),s.dispatchEvent(v),v.defaultPrevented||Oi(g??document.body,{select:!0}),s.removeEventListener(Uh,c),Dx.remove(h)},0)}}},[s,u,c,h]);const m=p.useCallback(g=>{if(!n&&!r||h.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(w&&v){const y=g.currentTarget,[x,S]=b3(y);x&&S?!g.shiftKey&&v===S?(g.preventDefault(),n&&Oi(x,{select:!0})):g.shiftKey&&v===x&&(g.preventDefault(),n&&Oi(S,{select:!0})):v===y&&g.preventDefault()}},[n,r,h.paused]);return p.createElement(Ke.div,ie({tabIndex:-1},l,{ref:f,onKeyDown:m}))});function k3(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Oi(r,{select:e}),document.activeElement!==n)return}function b3(t){const e=DC(t),n=Ix(e,t),r=Ix(e.reverse(),t);return[n,r]}function DC(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Ix(t,e){for(const n of t)if(!$3(n,{upTo:e}))return n}function $3(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function T3(t){return t instanceof HTMLInputElement&&"select"in t}function Oi(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&T3(t)&&e&&t.select()}}const Dx=N3();function N3(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=jx(t,e),t.unshift(e)},remove(e){var n;t=jx(t,e),(n=t[0])===null||n===void 0||n.resume()}}}function jx(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function R3(t){return t.filter(e=>e.tagName!=="A")}const O3=M_.useId||(()=>{});let P3=0;function Df(t){const[e,n]=p.useState(O3());return Un(()=>{t||n(r=>r??String(P3++))},[t]),t||(e?`radix-${e}`:"")}const A3=["top","right","bottom","left"],fo=Math.min,Ln=Math.max,Yd=Math.round,Sc=Math.floor,ho=t=>({x:t,y:t}),M3={left:"right",right:"left",bottom:"top",top:"bottom"},L3={start:"end",end:"start"};function Bg(t,e,n){return Ln(t,fo(e,n))}function mi(t,e){return typeof t=="function"?t(e):t}function vi(t){return t.split("-")[0]}function Ls(t){return t.split("-")[1]}function Bv(t){return t==="x"?"y":"x"}function Uv(t){return t==="y"?"height":"width"}function Is(t){return["top","bottom"].includes(vi(t))?"y":"x"}function Wv(t){return Bv(Is(t))}function I3(t,e,n){n===void 0&&(n=!1);const r=Ls(t),i=Wv(t),o=Uv(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=Xd(l)),[l,Xd(l)]}function D3(t){const e=Xd(t);return[Ug(t),e,Ug(e)]}function Ug(t){return t.replace(/start|end/g,e=>L3[e])}function j3(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:l;default:return[]}}function z3(t,e,n,r){const i=Ls(t);let o=j3(vi(t),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),e&&(o=o.concat(o.map(Ug)))),o}function Xd(t){return t.replace(/left|right|bottom|top/g,e=>M3[e])}function F3(t){return{top:0,right:0,bottom:0,left:0,...t}}function jC(t){return typeof t!="number"?F3(t):{top:t,right:t,bottom:t,left:t}}function Qd(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function zx(t,e,n){let{reference:r,floating:i}=t;const o=Is(e),l=Wv(e),s=Uv(l),a=vi(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-i.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-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ls(e)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const B3=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,s=o.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(e));let u=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=zx(u,r,a),f=r,h={},m=0;for(let g=0;g<s.length;g++){const{name:w,fn:v}=s[g],{x:y,y:x,data:S,reset:b}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:u,platform:l,elements:{reference:t,floating:e}});if(c=y??c,d=x??d,h={...h,[w]:{...h[w],...S}},b&&m<=50){m++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(u=b.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:c,y:d}=zx(u,f,a)),g=-1;continue}}return{x:c,y:d,placement:f,strategy:i,middlewareData:h}};async function Eu(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:l,elements:s,strategy:a}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=mi(e,t),m=jC(h),w=s[f?d==="floating"?"reference":"floating":d],v=Qd(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:i}:l.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},b=Qd(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:x,strategy:a}):y);return{top:(v.top-b.top+m.top)/S.y,bottom:(b.bottom-v.bottom+m.bottom)/S.y,left:(v.left-b.left+m.left)/S.x,right:(b.right-v.right+m.right)/S.x}}const Fx=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:l,elements:s,middlewareData:a}=e,{element:u,padding:c=0}=mi(t,e)||{};if(u==null)return{};const d=jC(c),f={x:n,y:r},h=Wv(i),m=Uv(h),g=await l.getDimensions(u),w=h==="y",v=w?"top":"left",y=w?"bottom":"right",x=w?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[h]-f[h]-o.floating[m],b=f[h]-o.reference[h],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let $=T?T[x]:0;(!$||!await(l.isElement==null?void 0:l.isElement(T)))&&($=s.floating[x]||o.floating[m]);const O=S/2-b/2,L=$/2-g[m]/2-1,P=fo(d[v],L),D=fo(d[y],L),B=P,oe=$-g[m]-D,H=$/2-g[m]/2+O,Z=Bg(B,H,oe),C=!a.arrow&&Ls(i)!=null&&H!=Z&&o.reference[m]/2-(H<B?P:D)-g[m]/2<0,k=C?H<B?H-B:H-oe:0;return{[h]:f[h]+k,data:{[h]:Z,centerOffset:H-Z-k,...C&&{alignmentOffset:k}},reset:C}}}),U3=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:s,platform:a,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...w}=mi(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const v=vi(i),y=vi(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),S=f||(y||!g?[Xd(s)]:D3(s));!f&&m!=="none"&&S.push(...z3(s,g,m,x));const b=[s,...S],T=await Eu(e,w),$=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&$.push(T[v]),d){const B=I3(i,l,x);$.push(T[B[0]],T[B[1]])}if(O=[...O,{placement:i,overflows:$}],!$.every(B=>B<=0)){var L,P;const B=(((L=o.flip)==null?void 0:L.index)||0)+1,oe=b[B];if(oe)return{data:{index:B,overflows:O},reset:{placement:oe}};let H=(P=O.filter(Z=>Z.overflows[0]<=0).sort((Z,C)=>Z.overflows[1]-C.overflows[1])[0])==null?void 0:P.placement;if(!H)switch(h){case"bestFit":{var D;const Z=(D=O.map(C=>[C.placement,C.overflows.filter(k=>k>0).reduce((k,E)=>k+E,0)]).sort((C,k)=>C[1]-k[1])[0])==null?void 0:D[0];Z&&(H=Z);break}case"initialPlacement":H=s;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function Bx(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ux(t){return A3.some(e=>t[e]>=0)}const W3=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=mi(t,e);switch(r){case"referenceHidden":{const o=await Eu(e,{...i,elementContext:"reference"}),l=Bx(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Ux(l)}}}case"escaped":{const o=await Eu(e,{...i,altBoundary:!0}),l=Bx(o,n.floating);return{data:{escapedOffsets:l,escaped:Ux(l)}}}default:return{}}}}};async function V3(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=vi(n),s=Ls(n),a=Is(n)==="y",u=["left","top"].includes(l)?-1:1,c=o&&a?-1:1,d=mi(e,t);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 H3=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:r}=e,i=await V3(e,t);return{x:n+i.x,y:r+i.y,data:i}}}},K3=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:s={fn:w=>{let{x:v,y}=w;return{x:v,y}}},...a}=mi(t,e),u={x:n,y:r},c=await Eu(e,a),d=Is(vi(i)),f=Bv(d);let h=u[f],m=u[d];if(o){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[w],x=h-c[v];h=Bg(y,h,x)}if(l){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+c[w],x=m-c[v];m=Bg(y,m,x)}const g=s.fn({...e,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}},Z3=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=e,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=mi(t,e),c={x:n,y:r},d=Is(i),f=Bv(d);let h=c[f],m=c[d];const g=mi(s,e),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const x=f==="y"?"height":"width",S=o.reference[f]-o.floating[x]+w.mainAxis,b=o.reference[f]+o.reference[x]-w.mainAxis;h<S?h=S:h>b&&(h=b)}if(u){var v,y;const x=f==="y"?"width":"height",S=["top","left"].includes(vi(i)),b=o.reference[d]-o.floating[x]+(S&&((v=l.offset)==null?void 0:v[d])||0)+(S?0:w.crossAxis),T=o.reference[d]+o.reference[x]+(S?0:((y=l.offset)==null?void 0:y[d])||0)-(S?w.crossAxis:0);m<b?m=b:m>T&&(m=T)}return{[f]:h,[d]:m}}}},G3=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:i,elements:o}=e,{apply:l=()=>{},...s}=mi(t,e),a=await Eu(e,s),u=vi(n),c=Ls(n),d=Is(n)==="y",{width:f,height:h}=r.floating;let m,g;u==="top"||u==="bottom"?(m=u,g=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,m=c==="end"?"top":"bottom");const w=h-a[m],v=f-a[g],y=!e.middlewareData.shift;let x=w,S=v;if(d){const T=f-a.left-a.right;S=c||y?fo(v,T):T}else{const T=h-a.top-a.bottom;x=c||y?fo(w,T):T}if(y&&!c){const T=Ln(a.left,0),$=Ln(a.right,0),O=Ln(a.top,0),L=Ln(a.bottom,0);d?S=f-2*(T!==0||$!==0?T+$:Ln(a.left,a.right)):x=h-2*(O!==0||L!==0?O+L:Ln(a.top,a.bottom))}await l({...e,availableWidth:S,availableHeight:x});const b=await i.getDimensions(o.floating);return f!==b.width||h!==b.height?{reset:{rects:!0}}:{}}}};function po(t){return zC(t)?(t.nodeName||"").toLowerCase():"#document"}function Fn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ci(t){var e;return(e=(zC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function zC(t){return t instanceof Node||t instanceof Fn(t).Node}function yi(t){return t instanceof Element||t instanceof Fn(t).Element}function Zr(t){return t instanceof HTMLElement||t instanceof Fn(t).HTMLElement}function Wx(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fn(t).ShadowRoot}function Wu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=ir(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Y3(t){return["table","td","th"].includes(po(t))}function Vv(t){const e=Hv(),n=ir(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(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 X3(t){let e=gs(t);for(;Zr(e)&&!jf(e);){if(Vv(e))return e;e=gs(e)}return null}function Hv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jf(t){return["html","body","#document"].includes(po(t))}function ir(t){return Fn(t).getComputedStyle(t)}function zf(t){return yi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function gs(t){if(po(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Wx(t)&&t.host||Ci(t);return Wx(e)?e.host:e}function FC(t){const e=gs(t);return jf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Zr(e)&&Wu(e)?e:FC(e)}function Cu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=FC(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),l=Fn(i);return o?e.concat(l,l.visualViewport||[],Wu(i)?i:[],l.frameElement&&n?Cu(l.frameElement):[]):e.concat(i,Cu(i,[],n))}function BC(t){const e=ir(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Zr(t),o=i?t.offsetWidth:n,l=i?t.offsetHeight:r,s=Yd(n)!==o||Yd(r)!==l;return s&&(n=o,r=l),{width:n,height:r,$:s}}function Kv(t){return yi(t)?t:t.contextElement}function Jl(t){const e=Kv(t);if(!Zr(e))return ho(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=BC(e);let l=(o?Yd(n.width):n.width)/r,s=(o?Yd(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Q3=ho(0);function UC(t){const e=Fn(t);return!Hv()||!e.visualViewport?Q3:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function J3(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Fn(t)?!1:e}function Jo(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=Kv(t);let l=ho(1);e&&(r?yi(r)&&(l=Jl(r)):l=Jl(t));const s=J3(o,n,r)?UC(o):ho(0);let a=(i.left+s.x)/l.x,u=(i.top+s.y)/l.y,c=i.width/l.x,d=i.height/l.y;if(o){const f=Fn(o),h=r&&yi(r)?Fn(r):r;let m=f.frameElement;for(;m&&r&&h!==f;){const g=Jl(m),w=m.getBoundingClientRect(),v=ir(m),y=w.left+(m.clientLeft+parseFloat(v.paddingLeft))*g.x,x=w.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=Fn(m).frameElement}}return Qd({width:c,height:d,x:a,y:u})}function q3(t){let{rect:e,offsetParent:n,strategy:r}=t;const i=Zr(n),o=Ci(n);if(n===o)return e;let l={scrollLeft:0,scrollTop:0},s=ho(1);const a=ho(0);if((i||!i&&r!=="fixed")&&((po(n)!=="body"||Wu(o))&&(l=zf(n)),Zr(n))){const u=Jo(n);s=Jl(n),a.x=u.x+n.clientLeft,a.y=u.y+n.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-l.scrollLeft*s.x+a.x,y:e.y*s.y-l.scrollTop*s.y+a.y}}function eM(t){return Array.from(t.getClientRects())}function WC(t){return Jo(Ci(t)).left+zf(t).scrollLeft}function tM(t){const e=Ci(t),n=zf(t),r=t.ownerDocument.body,i=Ln(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Ln(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+WC(t);const s=-n.scrollTop;return ir(r).direction==="rtl"&&(l+=Ln(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:s}}function nM(t,e){const n=Fn(t),r=Ci(t),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,s=0,a=0;if(i){o=i.width,l=i.height;const u=Hv();(!u||u&&e==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:o,height:l,x:s,y:a}}function rM(t,e){const n=Jo(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=Zr(t)?Jl(t):ho(1),l=t.clientWidth*o.x,s=t.clientHeight*o.y,a=i*o.x,u=r*o.y;return{width:l,height:s,x:a,y:u}}function Vx(t,e,n){let r;if(e==="viewport")r=nM(t,n);else if(e==="document")r=tM(Ci(t));else if(yi(e))r=rM(e,n);else{const i=UC(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Qd(r)}function VC(t,e){const n=gs(t);return n===e||!yi(n)||jf(n)?!1:ir(n).position==="fixed"||VC(n,e)}function iM(t,e){const n=e.get(t);if(n)return n;let r=Cu(t,[],!1).filter(s=>yi(s)&&po(s)!=="body"),i=null;const o=ir(t).position==="fixed";let l=o?gs(t):t;for(;yi(l)&&!jf(l);){const s=ir(l),a=Vv(l);!a&&s.position==="fixed"&&(i=null),(o?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Wu(l)&&!a&&VC(t,l))?r=r.filter(c=>c!==l):i=s,l=gs(l)}return e.set(t,r),r}function oM(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const l=[...n==="clippingAncestors"?iM(e,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=Vx(e,c,i);return u.top=Ln(d.top,u.top),u.right=fo(d.right,u.right),u.bottom=fo(d.bottom,u.bottom),u.left=Ln(d.left,u.left),u},Vx(e,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function lM(t){return BC(t)}function sM(t,e,n){const r=Zr(e),i=Ci(e),o=n==="fixed",l=Jo(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const a=ho(0);if(r||!r&&!o)if((po(e)!=="body"||Wu(i))&&(s=zf(e)),r){const u=Jo(e,!0,o,e);a.x=u.x+e.clientLeft,a.y=u.y+e.clientTop}else i&&(a.x=WC(i));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function Hx(t,e){return!Zr(t)||ir(t).position==="fixed"?null:e?e(t):t.offsetParent}function HC(t,e){const n=Fn(t);if(!Zr(t))return n;let r=Hx(t,e);for(;r&&Y3(r)&&ir(r).position==="static";)r=Hx(r,e);return r&&(po(r)==="html"||po(r)==="body"&&ir(r).position==="static"&&!Vv(r))?n:r||X3(t)||n}const aM=async function(t){let{reference:e,floating:n,strategy:r}=t;const i=this.getOffsetParent||HC,o=this.getDimensions;return{reference:sM(e,await i(n),r),floating:{x:0,y:0,...await o(n)}}};function uM(t){return ir(t).direction==="rtl"}const cM={convertOffsetParentRelativeRectToViewportRelativeRect:q3,getDocumentElement:Ci,getClippingRect:oM,getOffsetParent:HC,getElementRects:aM,getClientRects:eM,getDimensions:lM,getScale:Jl,isElement:yi,isRTL:uM};function dM(t,e){let n=null,r;const i=Ci(t);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),o();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(s||e(),!d||!f)return;const h=Sc(c),m=Sc(i.clientWidth-(u+d)),g=Sc(i.clientHeight-(c+f)),w=Sc(u),y={rootMargin:-h+"px "+-m+"px "+-g+"px "+-w+"px",threshold:Ln(0,fo(1,a))||1};let x=!0;function S(b){const T=b[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:i.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(t)}return l(!0),o}function fM(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=Kv(t),c=i||o?[...u?Cu(u):[],...Cu(e)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),o&&v.addEventListener("resize",n)});const d=u&&s?dM(u,n):null;let f=-1,h=null;l&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(e)})),n()}),u&&!a&&h.observe(u),h.observe(e));let m,g=a?Jo(t):null;a&&w();function w(){const v=Jo(t);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,m=requestAnimationFrame(w)}return n(),()=>{c.forEach(v=>{i&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(m)}}const hM=(t,e,n)=>{const r=new Map,i={platform:cM,...n},o={...i.platform,_c:r};return B3(t,e,{...i,platform:o})},pM=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Fx({element:r.current,padding:i}).fn(n):{}:r?Fx({element:r,padding:i}).fn(n):{}}}};var Kc=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Jd(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!Jd(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!Jd(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function KC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Kx(t,e){const n=KC(t);return Math.round(e*n)/n}function Zx(t){const e=p.useRef(t);return Kc(()=>{e.current=t}),e}function gM(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=t,[c,d]=p.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Jd(f,r)||h(r);const[m,g]=p.useState(null),[w,v]=p.useState(null),y=p.useCallback(C=>{C!=T.current&&(T.current=C,g(C))},[g]),x=p.useCallback(C=>{C!==$.current&&($.current=C,v(C))},[v]),S=o||m,b=l||w,T=p.useRef(null),$=p.useRef(null),O=p.useRef(c),L=Zx(a),P=Zx(i),D=p.useCallback(()=>{if(!T.current||!$.current)return;const C={placement:e,strategy:n,middleware:f};P.current&&(C.platform=P.current),hM(T.current,$.current,C).then(k=>{const E={...k,isPositioned:!0};B.current&&!Jd(O.current,E)&&(O.current=E,Gr.flushSync(()=>{d(E)}))})},[f,e,n,P]);Kc(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const B=p.useRef(!1);Kc(()=>(B.current=!0,()=>{B.current=!1}),[]),Kc(()=>{if(S&&(T.current=S),b&&($.current=b),S&&b){if(L.current)return L.current(S,b,D);D()}},[S,b,D,L]);const oe=p.useMemo(()=>({reference:T,floating:$,setReference:y,setFloating:x}),[y,x]),H=p.useMemo(()=>({reference:S,floating:b}),[S,b]),Z=p.useMemo(()=>{const C={position:n,left:0,top:0};if(!H.floating)return C;const k=Kx(H.floating,c.x),E=Kx(H.floating,c.y);return s?{...C,transform:"translate("+k+"px, "+E+"px)",...KC(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:E}},[n,s,H.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:D,refs:oe,elements:H,floatingStyles:Z}),[c,D,oe,H,Z])}function ZC(t){const[e,n]=p.useState(void 0);return Un(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,s;if("borderBoxSize"in o){const a=o.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=t.offsetWidth,s=t.offsetHeight;n({width:l,height:s})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}const GC="Popper",[YC,XC]=ol(GC),[mM,QC]=YC(GC),vM=t=>{const{__scopePopper:e,children:n}=t,[r,i]=p.useState(null);return p.createElement(mM,{scope:e,anchor:r,onAnchorChange:i},n)},yM="PopperAnchor",xM=p.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,o=QC(yM,n),l=p.useRef(null),s=st(e,l);return p.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(Ke.div,ie({},i,{ref:s}))}),JC="PopperContent",[_M,RD]=YC(JC),wM=p.forwardRef((t,e)=>{var n,r,i,o,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:w=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:b="optimized",onPlaced:T,...$}=t,O=QC(JC,c),[L,P]=p.useState(null),D=st(e,Sn=>P(Sn)),[B,oe]=p.useState(null),H=ZC(B),Z=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,C=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,k=d+(h!=="center"?"-"+h:""),E=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},A=Array.isArray(v)?v:[v],N=A.length>0,F={padding:E,boundary:A.filter(SM),altBoundary:N},{refs:K,floatingStyles:de,placement:se,isPositioned:Ae,middlewareData:Ne}=gM({strategy:"fixed",placement:k,whileElementsMounted:(...Sn)=>fM(...Sn,{animationFrame:b==="always"}),elements:{reference:O.anchor},middleware:[H3({mainAxis:f+C,alignmentAxis:m}),w&&K3({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?Z3():void 0,...F}),w&&U3({...F}),G3({...F,apply:({elements:Sn,rects:lr,availableWidth:ze,availableHeight:Tt})=>{const{width:at,height:ln}=lr.reference,En=Sn.floating.style;En.setProperty("--radix-popper-available-width",`${ze}px`),En.setProperty("--radix-popper-available-height",`${Tt}px`),En.setProperty("--radix-popper-anchor-width",`${at}px`),En.setProperty("--radix-popper-anchor-height",`${ln}px`)}}),B&&pM({element:B,padding:g}),EM({arrowWidth:Z,arrowHeight:C}),S&&W3({strategy:"referenceHidden",...F})]}),[Q,je]=qC(se),be=en(T);Un(()=>{Ae&&(be==null||be())},[Ae,be]);const Re=(i=Ne.arrow)===null||i===void 0?void 0:i.x,we=(o=Ne.arrow)===null||o===void 0?void 0:o.y,Ie=((l=Ne.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Qe,Wt]=p.useState();return Un(()=>{L&&Wt(window.getComputedStyle(L).zIndex)},[L]),p.createElement("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:Ae?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Qe,"--radix-popper-transform-origin":[(s=Ne.transformOrigin)===null||s===void 0?void 0:s.x,(a=Ne.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:t.dir},p.createElement(_M,{scope:c,placedSide:Q,onArrowChange:oe,arrowX:Re,arrowY:we,shouldHideArrow:Ie},p.createElement(Ke.div,ie({"data-side":Q,"data-align":je},$,{ref:D,style:{...$.style,animation:Ae?void 0:"none",opacity:(u=Ne.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function SM(t){return t!==null}const EM=t=>({name:"transformOrigin",options:t,fn(e){var n,r,i,o,l;const{placement:s,rects:a,middlewareData:u}=e,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=d?0:t.arrowWidth,h=d?0:t.arrowHeight,[m,g]=qC(s),w={start:"0%",center:"50%",end:"100%"}[g],v=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+f/2,y=((o=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)+h/2;let x="",S="";return m==="bottom"?(x=d?w:`${v}px`,S=`${-h}px`):m==="top"?(x=d?w:`${v}px`,S=`${a.floating.height+h}px`):m==="right"?(x=`${-h}px`,S=d?w:`${y}px`):m==="left"&&(x=`${a.floating.width+h}px`,S=d?w:`${y}px`),{data:{x,y:S}}}});function qC(t){const[e,n="center"]=t.split("-");return[e,n]}const CM=vM,kM=xM,bM=wM,$M=p.forwardRef((t,e)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=t;return r?jw.createPortal(p.createElement(Ke.div,ie({},i,{ref:e})),r):null});function ms({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=TM({defaultProp:e,onChange:n}),o=t!==void 0,l=o?t:r,s=en(n),a=p.useCallback(u=>{if(o){const d=typeof u=="function"?u(t):u;d!==t&&s(d)}else i(u)},[o,t,i,s]);return[l,a]}function TM({defaultProp:t,onChange:e}){const n=p.useState(t),[r]=n,i=p.useRef(r),o=en(e);return p.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function ek(t){const e=p.useRef({value:t,previous:t});return p.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const NM=p.forwardRef((t,e)=>p.createElement(Ke.span,ie({},t,{ref:e,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",...t.style}})));var RM=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},wl=new WeakMap,Ec=new WeakMap,Cc={},Wh=0,tk=function(t){return t&&(t.host||tk(t.parentNode))},OM=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=tk(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},PM=function(t,e,n,r){var i=OM(e,Array.isArray(t)?t:[t]);Cc[n]||(Cc[n]=new WeakMap);var o=Cc[n],l=[],s=new Set,a=new Set(i),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};i.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=(wl.get(f)||0)+1,w=(o.get(f)||0)+1;wl.set(f,g),o.set(f,w),l.push(f),g===1&&m&&Ec.set(f,!0),w===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return c(e),s.clear(),Wh++,function(){l.forEach(function(d){var f=wl.get(d)-1,h=o.get(d)-1;wl.set(d,f),o.set(d,h),f||(Ec.has(d)||d.removeAttribute(r),Ec.delete(d)),h||d.removeAttribute(n)}),Wh--,Wh||(wl=new WeakMap,wl=new WeakMap,Ec=new WeakMap,Cc={})}},AM=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=e||RM(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),PM(r,i,n,"aria-hidden")):function(){return null}},Lr=function(){return Lr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Lr.apply(this,arguments)};function nk(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function MM(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Zc="right-scroll-bar-position",Gc="width-before-scroll-bar",LM="with-scroll-bars-hidden",IM="--removed-body-scroll-bar-size";function DM(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function jM(t,e){var n=p.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}function zM(t,e){return jM(e||null,function(n){return t.forEach(function(r){return DM(r,n)})})}function FM(t){return t}function BM(t,e){e===void 0&&(e=FM);var n=[],r=!1,i={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]:t},useMedium:function(o){var l=e(o,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(o),l=n}var a=function(){var c=l;l=[],c.forEach(o)},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 i}function UM(t){t===void 0&&(t={});var e=BM(null);return e.options=Lr({async:!0,ssr:!1},t),e}var rk=function(t){var e=t.sideCar,n=nk(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Lr({},n))};rk.isSideCarExport=!0;function WM(t,e){return t.useMedium(e),rk}var ik=UM(),Vh=function(){},Ff=p.forwardRef(function(t,e){var n=p.useRef(null),r=p.useState({onScrollCapture:Vh,onWheelCapture:Vh,onTouchMoveCapture:Vh}),i=r[0],o=r[1],l=t.forwardProps,s=t.children,a=t.className,u=t.removeScrollBar,c=t.enabled,d=t.shards,f=t.sideCar,h=t.noIsolation,m=t.inert,g=t.allowPinchZoom,w=t.as,v=w===void 0?"div":w,y=nk(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,S=zM([n,e]),b=Lr(Lr({},y),i);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:ik,removeScrollBar:u,shards:d,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),l?p.cloneElement(p.Children.only(s),Lr(Lr({},b),{ref:S})):p.createElement(v,Lr({},b,{className:a,ref:S}),s))});Ff.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ff.classNames={fullWidth:Gc,zeroRight:Zc};var Gx,VM=function(){if(Gx)return Gx;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function HM(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=VM();return e&&t.setAttribute("nonce",e),t}function KM(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ZM(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var GM=function(){var t=0,e=null;return{add:function(n){t==0&&(e=HM())&&(KM(e,n),ZM(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},YM=function(){var t=GM();return function(e,n){p.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},ok=function(){var t=YM(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},XM={left:0,top:0,right:0,gap:0},Hh=function(t){return parseInt(t||"",10)||0},QM=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Hh(n),Hh(r),Hh(i)]},JM=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return XM;var e=QM(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},qM=ok(),e4=function(t,e,n,r){var i=t.left,o=t.top,l=t.right,s=t.gap;return n===void 0&&(n="margin"),`
130
- .`.concat(LM,` {
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([e&&"position: relative ".concat(r,";"),n==="margin"&&`
138
- padding-left: `.concat(i,`px;
139
- padding-top: `).concat(o,`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(Zc,` {
148
- right: `).concat(s,"px ").concat(r,`;
149
- }
150
-
151
- .`).concat(Gc,` {
152
- margin-right: `).concat(s,"px ").concat(r,`;
153
- }
154
-
155
- .`).concat(Zc," .").concat(Zc,` {
156
- right: 0 `).concat(r,`;
157
- }
158
-
159
- .`).concat(Gc," .").concat(Gc,` {
160
- margin-right: 0 `).concat(r,`;
161
- }
162
-
163
- body {
164
- `).concat(IM,": ").concat(s,`px;
165
- }
166
- `)},t4=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r,o=p.useMemo(function(){return JM(i)},[i]);return p.createElement(qM,{styles:e4(o,!e,i,n?"":"!important")})},Wg=!1;if(typeof window<"u")try{var kc=Object.defineProperty({},"passive",{get:function(){return Wg=!0,!0}});window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch{Wg=!1}var Sl=Wg?{passive:!1}:!1,n4=function(t){return t.tagName==="TEXTAREA"},lk=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!n4(t)&&n[e]==="visible")},r4=function(t){return lk(t,"overflowY")},i4=function(t){return lk(t,"overflowX")},Yx=function(t,e){var n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=sk(t,n);if(r){var i=ak(t,n),o=i[1],l=i[2];if(o>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},o4=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},l4=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},sk=function(t,e){return t==="v"?r4(e):i4(e)},ak=function(t,e){return t==="v"?o4(e):l4(e)},s4=function(t,e){return t==="h"&&e==="rtl"?-1:1},a4=function(t,e,n,r,i){var o=s4(t,window.getComputedStyle(e).direction),l=o*r,s=n.target,a=e.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=ak(t,s),m=h[0],g=h[1],w=h[2],v=g-w-o*m;(m||v)&&sk(t,s)&&(d+=v,f+=m),s=s.parentNode}while(!a&&s!==document.body||a&&(e.contains(s)||e===s));return(c&&(i&&d===0||!i&&l>d)||!c&&(i&&f===0||!i&&-l>f))&&(u=!0),u},bc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Xx=function(t){return[t.deltaX,t.deltaY]},Qx=function(t){return t&&"current"in t?t.current:t},u4=function(t,e){return t[0]===e[0]&&t[1]===e[1]},c4=function(t){return`
167
- .block-interactivity-`.concat(t,` {pointer-events: none;}
168
- .allow-interactivity-`).concat(t,` {pointer-events: all;}
169
- `)},d4=0,El=[];function f4(t){var e=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(d4++)[0],o=p.useState(function(){return ok()})[0],l=p.useRef(t);p.useEffect(function(){l.current=t},[t]),p.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var g=MM([t.lockRef.current],(t.shards||[]).map(Qx),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var s=p.useCallback(function(g,w){if("touches"in g&&g.touches.length===2)return!l.current.allowPinchZoom;var v=bc(g),y=n.current,x="deltaX"in g?g.deltaX:y[0]-v[0],S="deltaY"in g?g.deltaY:y[1]-v[1],b,T=g.target,$=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&$==="h"&&T.type==="range")return!1;var O=Yx($,T);if(!O)return!0;if(O?b=$:(b=$==="v"?"h":"v",O=Yx($,T)),!O)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=b),!b)return!0;var L=r.current||b;return a4(L,w,g,L==="h"?x:S,!0)},[]),a=p.useCallback(function(g){var w=g;if(!(!El.length||El[El.length-1]!==o)){var v="deltaY"in w?Xx(w):bc(w),y=e.current.filter(function(b){return b.name===w.type&&b.target===w.target&&u4(b.delta,v)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var x=(l.current.shards||[]).map(Qx).filter(Boolean).filter(function(b){return b.contains(w.target)}),S=x.length>0?s(w,x[0]):!l.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),u=p.useCallback(function(g,w,v,y){var x={name:g,delta:w,target:v,should:y};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(S){return S!==x})},1)},[]),c=p.useCallback(function(g){n.current=bc(g),r.current=void 0},[]),d=p.useCallback(function(g){u(g.type,Xx(g),g.target,s(g,t.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,bc(g),g.target,s(g,t.lockRef.current))},[]);p.useEffect(function(){return El.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Sl),document.addEventListener("touchmove",a,Sl),document.addEventListener("touchstart",c,Sl),function(){El=El.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,Sl),document.removeEventListener("touchmove",a,Sl),document.removeEventListener("touchstart",c,Sl)}},[]);var h=t.removeScrollBar,m=t.inert;return p.createElement(p.Fragment,null,m?p.createElement(o,{styles:c4(i)}):null,h?p.createElement(t4,{gapMode:"margin"}):null)}const h4=WM(ik,f4);var uk=p.forwardRef(function(t,e){return p.createElement(Ff,Lr({},t,{ref:e,sideCar:h4}))});uk.classNames=Ff.classNames;const p4=uk,g4=[" ","Enter","ArrowUp","ArrowDown"],m4=[" ","Enter"],Bf="Select",[Uf,Zv,v4]=LC(Bf),[Ds,OD]=ol(Bf,[v4,XC]),Gv=XC(),[y4,cl]=Ds(Bf),[x4,_4]=Ds(Bf),w4=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=t,m=Gv(e),[g,w]=p.useState(null),[v,y]=p.useState(null),[x,S]=p.useState(!1),b=Xm(u),[T=!1,$]=ms({prop:r,defaultProp:i,onChange:o}),[O,L]=ms({prop:l,defaultProp:s,onChange:a}),P=p.useRef(null),D=g?!!g.closest("form"):!0,[B,oe]=p.useState(new Set),H=Array.from(B).map(Z=>Z.props.value).join(";");return p.createElement(CM,m,p.createElement(y4,{required:h,scope:e,trigger:g,onTriggerChange:w,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Df(),value:O,onValueChange:L,open:T,onOpenChange:$,dir:b,triggerPointerDownPosRef:P,disabled:f},p.createElement(Uf.Provider,{scope:e},p.createElement(x4,{scope:t.__scopeSelect,onNativeOptionAdd:p.useCallback(Z=>{oe(C=>new Set(C).add(Z))},[]),onNativeOptionRemove:p.useCallback(Z=>{oe(C=>{const k=new Set(C);return k.delete(Z),k})},[])},n)),D?p.createElement(hk,{key:H,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:O,onChange:Z=>L(Z.target.value),disabled:f},O===void 0?p.createElement("option",{value:""}):null,Array.from(B)):null))},S4="SelectTrigger",E4=p.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...i}=t,o=Gv(n),l=cl(S4,n),s=l.disabled||r,a=st(e,l.onTriggerChange),u=Zv(n),[c,d,f]=pk(m=>{const g=u().filter(y=>!y.disabled),w=g.find(y=>y.value===l.value),v=gk(g,m,w);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(kM,ie({asChild:!0},o),p.createElement(Ke.button,ie({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":fk(l.value)?"":void 0},i,{ref:a,onClick:nt(i.onClick,m=>{m.currentTarget.focus()}),onPointerDown:nt(i.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:nt(i.onKeyDown,m=>{const g=c.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&d(m.key),!(g&&m.key===" ")&&g4.includes(m.key)&&(h(),m.preventDefault())})})))}),C4="SelectValue",k4=p.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...s}=t,a=cl(C4,n),{onValueNodeHasChildrenChange:u}=a,c=o!==void 0,d=st(e,a.onValueNodeChange);return Un(()=>{u(c)},[u,c]),p.createElement(Ke.span,ie({},s,{ref:d,style:{pointerEvents:"none"}}),fk(a.value)?p.createElement(p.Fragment,null,l):o)}),b4=p.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return p.createElement(Ke.span,ie({"aria-hidden":!0},i,{ref:e}),r||"▼")}),$4=t=>p.createElement($M,ie({asChild:!0},t)),vs="SelectContent",T4=p.forwardRef((t,e)=>{const n=cl(vs,t.__scopeSelect),[r,i]=p.useState();if(Un(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Gr.createPortal(p.createElement(ck,{scope:t.__scopeSelect},p.createElement(Uf.Slot,{scope:t.__scopeSelect},p.createElement("div",null,t.children))),o):null}return p.createElement(N4,ie({},t,{ref:e}))}),ri=10,[ck,Wf]=Ds(vs),N4=p.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:w,...v}=t,y=cl(vs,n),[x,S]=p.useState(null),[b,T]=p.useState(null),$=st(e,Q=>S(Q)),[O,L]=p.useState(null),[P,D]=p.useState(null),B=Zv(n),[oe,H]=p.useState(!1),Z=p.useRef(!1);p.useEffect(()=>{if(x)return AM(x)},[x]),E3();const C=p.useCallback(Q=>{const[je,...be]=B().map(Ie=>Ie.ref.current),[Re]=be.slice(-1),we=document.activeElement;for(const Ie of Q)if(Ie===we||(Ie==null||Ie.scrollIntoView({block:"nearest"}),Ie===je&&b&&(b.scrollTop=0),Ie===Re&&b&&(b.scrollTop=b.scrollHeight),Ie==null||Ie.focus(),document.activeElement!==we))return},[B,b]),k=p.useCallback(()=>C([O,x]),[C,O,x]);p.useEffect(()=>{oe&&k()},[oe,k]);const{onOpenChange:E,triggerPointerDownPosRef:A}=y;p.useEffect(()=>{if(x){let Q={x:0,y:0};const je=Re=>{var we,Ie,Qe,Wt;Q={x:Math.abs(Math.round(Re.pageX)-((we=(Ie=A.current)===null||Ie===void 0?void 0:Ie.x)!==null&&we!==void 0?we:0)),y:Math.abs(Math.round(Re.pageY)-((Qe=(Wt=A.current)===null||Wt===void 0?void 0:Wt.y)!==null&&Qe!==void 0?Qe:0))}},be=Re=>{Q.x<=10&&Q.y<=10?Re.preventDefault():x.contains(Re.target)||E(!1),document.removeEventListener("pointermove",je),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",je),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",je),document.removeEventListener("pointerup",be,{capture:!0})}}},[x,E,A]),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[N,F]=pk(Q=>{const je=B().filter(we=>!we.disabled),be=je.find(we=>we.ref.current===document.activeElement),Re=gk(je,Q,be);Re&&setTimeout(()=>Re.ref.current.focus())}),K=p.useCallback((Q,je,be)=>{const Re=!Z.current&&!be;(y.value!==void 0&&y.value===je||Re)&&(L(Q),Re&&(Z.current=!0))},[y.value]),de=p.useCallback(()=>x==null?void 0:x.focus(),[x]),se=p.useCallback((Q,je,be)=>{const Re=!Z.current&&!be;(y.value!==void 0&&y.value===je||Re)&&D(Q)},[y.value]),Ae=r==="popper"?Jx:R4,Ne=Ae===Jx?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:w}:{};return p.createElement(ck,{scope:n,content:x,viewport:b,onViewportChange:T,itemRefCallback:K,selectedItem:O,onItemLeave:de,itemTextRefCallback:se,focusSelectedItem:k,selectedItemText:P,position:r,isPositioned:oe,searchRef:N},p.createElement(p4,{as,allowPinchZoom:!0},p.createElement(C3,{asChild:!0,trapped:y.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:nt(i,Q=>{var je;(je=y.trigger)===null||je===void 0||je.focus({preventScroll:!0}),Q.preventDefault()})},p.createElement(_3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement(Ae,ie({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Q=>Q.preventDefault()},v,Ne,{onPlaced:()=>H(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:nt(v.onKeyDown,Q=>{const je=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!je&&Q.key.length===1&&F(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let Re=B().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const we=Q.target,Ie=Re.indexOf(we);Re=Re.slice(Ie+1)}setTimeout(()=>C(Re)),Q.preventDefault()}})}))))))}),R4=p.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,o=cl(vs,n),l=Wf(vs,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=st(e,$=>c($)),f=Zv(n),h=p.useRef(!1),m=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:v,focusSelectedItem:y}=l,x=p.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&u&&g&&w&&v){const $=o.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),L=o.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(o.dir!=="rtl"){const we=P.left-O.left,Ie=L.left-we,Qe=$.left-Ie,Wt=$.width+Qe,Sn=Math.max(Wt,O.width),lr=window.innerWidth-ri,ze=Gp(Ie,[ri,lr-Sn]);s.style.minWidth=Wt+"px",s.style.left=ze+"px"}else{const we=O.right-P.right,Ie=window.innerWidth-L.right-we,Qe=window.innerWidth-$.right-Ie,Wt=$.width+Qe,Sn=Math.max(Wt,O.width),lr=window.innerWidth-ri,ze=Gp(Ie,[ri,lr-Sn]);s.style.minWidth=Wt+"px",s.style.right=ze+"px"}const D=f(),B=window.innerHeight-ri*2,oe=g.scrollHeight,H=window.getComputedStyle(u),Z=parseInt(H.borderTopWidth,10),C=parseInt(H.paddingTop,10),k=parseInt(H.borderBottomWidth,10),E=parseInt(H.paddingBottom,10),A=Z+C+oe+E+k,N=Math.min(w.offsetHeight*5,A),F=window.getComputedStyle(g),K=parseInt(F.paddingTop,10),de=parseInt(F.paddingBottom,10),se=$.top+$.height/2-ri,Ae=B-se,Ne=w.offsetHeight/2,Q=w.offsetTop+Ne,je=Z+C+Q,be=A-je;if(je<=se){const we=w===D[D.length-1].ref.current;s.style.bottom="0px";const Ie=u.clientHeight-g.offsetTop-g.offsetHeight,Qe=Math.max(Ae,Ne+(we?de:0)+Ie+k),Wt=je+Qe;s.style.height=Wt+"px"}else{const we=w===D[0].ref.current;s.style.top="0px";const Qe=Math.max(se,Z+g.offsetTop+(we?K:0)+Ne)+be;s.style.height=Qe+"px",g.scrollTop=je-se+g.offsetTop}s.style.margin=`${ri}px 0`,s.style.minHeight=N+"px",s.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,s,u,g,w,v,o.dir,r]);Un(()=>x(),[x]);const[S,b]=p.useState();Un(()=>{u&&b(window.getComputedStyle(u).zIndex)},[u]);const T=p.useCallback($=>{$&&m.current===!0&&(x(),y==null||y(),m.current=!1)},[x,y]);return p.createElement(O4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:T},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},p.createElement(Ke.div,ie({},i,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Jx=p.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ri,...o}=t,l=Gv(n);return p.createElement(bM,ie({},l,o,{ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.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)"}}))}),[O4,P4]=Ds(vs,{}),qx="SelectViewport",A4=p.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Wf(qx,n),o=P4(qx,n),l=st(e,i.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(Uf.Slot,{scope:n},p.createElement(Ke.div,ie({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:nt(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-ri*2,m=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),w=Math.max(m,g);if(w<h){const v=w+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})}))))}),M4="SelectGroup",[PD,L4]=Ds(M4),I4="SelectLabel",D4=p.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=L4(I4,n);return p.createElement(Ke.div,ie({id:i.id},r,{ref:e}))}),Vg="SelectItem",[j4,dk]=Ds(Vg),z4=p.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=t,s=cl(Vg,n),a=Wf(Vg,n),u=s.value===r,[c,d]=p.useState(o??""),[f,h]=p.useState(!1),m=st(e,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,i)}),g=Df(),w=()=>{i||(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(j4,{scope:n,value:r,disabled:i,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(Uf.ItemSlot,{scope:n,value:r,disabled:i,textValue:c},p.createElement(Ke.div,ie({role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},l,{ref:m,onFocus:nt(l.onFocus,()=>h(!0)),onBlur:nt(l.onBlur,()=>h(!1)),onPointerUp:nt(l.onPointerUp,w),onPointerMove:nt(l.onPointerMove,v=>{if(i){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:nt(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:nt(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(m4.includes(v.key)&&w(),v.key===" "&&v.preventDefault())})}))))}),$c="SelectItemText",F4=p.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...o}=t,l=cl($c,n),s=Wf($c,n),a=dk($c,n),u=_4($c,n),[c,d]=p.useState(null),f=st(e,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:w}=u;return Un(()=>(g(m),()=>w(m)),[g,w,m]),p.createElement(p.Fragment,null,p.createElement(Ke.span,ie({id:a.textId},o,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Gr.createPortal(o.children,l.valueNode):null)}),B4="SelectItemIndicator",U4=p.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return dk(B4,n).isSelected?p.createElement(Ke.span,ie({"aria-hidden":!0},r,{ref:e})):null}),W4=p.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return p.createElement(Ke.div,ie({"aria-hidden":!0},r,{ref:e}))});function fk(t){return t===""||t===void 0}const hk=p.forwardRef((t,e)=>{const{value:n,...r}=t,i=p.useRef(null),o=st(e,i),l=ek(n);return p.useEffect(()=>{const s=i.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(NM,{asChild:!0},p.createElement("select",ie({},r,{ref:o,defaultValue:n})))});hk.displayName="BubbleSelect";function pk(t){const e=en(t),n=p.useRef(""),r=p.useRef(0),i=p.useCallback(l=>{const s=n.current+l;e(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[e]),o=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function gk(t,e,n){const i=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,o=n?t.indexOf(n):-1;let l=V4(t,Math.max(o,0));i.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return a!==n?a:void 0}function V4(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const H4=w4,mk=E4,K4=k4,Z4=b4,G4=$4,vk=T4,Y4=A4,yk=D4,xk=z4,X4=F4,Q4=U4,_k=W4,J4=H4,q4=K4,wk=p.forwardRef(({className:t,children:e,...n},r)=>_.jsxs(mk,{ref:r,className:xt("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",t),...n,children:[e,_.jsx(Z4,{asChild:!0,children:_.jsx(bC,{className:"w-4 h-4 opacity-50"})})]}));wk.displayName=mk.displayName;const Sk=p.forwardRef(({className:t,children:e,position:n="popper",...r},i)=>_.jsx(G4,{children:_.jsx(vk,{ref:i,className:xt("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",t),position:n,...r,children:_.jsx(Y4,{className:xt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Sk.displayName=vk.displayName;const eL=p.forwardRef(({className:t,...e},n)=>_.jsx(yk,{ref:n,className:xt("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));eL.displayName=yk.displayName;const Ek=p.forwardRef(({className:t,children:e,...n},r)=>_.jsxs(xk,{ref:r,className:xt("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",t),...n,children:[_.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:_.jsx(Q4,{children:_.jsx(qA,{className:"w-4 h-4"})})}),_.jsx(X4,{children:e})]}));Ek.displayName=xk.displayName;const tL=p.forwardRef(({className:t,...e},n)=>_.jsx(_k,{ref:n,className:xt("-mx-1 my-1 h-px bg-muted",t),...e}));tL.displayName=_k.displayName;function Ck({path:t,disabled:e,source:n,schema:r,registerPatchCallback:i,onSubmit:o}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?_.jsx(iL,{defaultValue:n,disabled:e,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?_.jsx(r_,{defaultValue:n,disabled:e,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?_.jsx(n_,{defaultValue:n,disabled:e,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?_.jsx(r_,{defaultValue:n,disabled:e,registerPatchCallback:i,onSubmit:o}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?_.jsx(n_,{defaultValue:n,disabled:e,registerPatchCallback:i,onSubmit:o,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?_.jsx(rL,{registerPatchCallback:i,onSubmit:o,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?_.jsx(nL,{path:t,registerPatchCallback:i,onSubmit:o,defaultValue:n}):_.jsxs("div",{children:["Unsupported schema: ",r.type]})}function e_(t,e,n,r){if(!e||!r)return[];const i=r.sha256.slice(0,5),o=function(){const l=nv(e)??"unknown",s=rv(l);return n?`/public/${n.split(".").slice(0,-1).join(".")||n}_${i}.${s}`:`/public/${r.sha256}.${s}`}();return[{value:{[Rn]:o,[nn]:"file",metadata:r},op:"replace",path:t},{value:e,op:"file",path:t,filePath:o}]}function nL({path:t,defaultValue:e,onSubmit:n,registerPatchCallback:r}){const[i,o]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(e&&jn.convertFileSource(e).url)},[e]),p.useEffect(()=>{r&&r(async f=>e_(f,(i==null?void 0:i.src)??null,(i==null?void 0:i.filename)??null,a))},[i,e]),_.jsxs("div",{className:"max-w-4xl p-4",children:[_.jsxs("label",{htmlFor:`img_input:${t}`,className:"",children:[i||c?_.jsx("img",{src:(i==null?void 0:i.src)||c}):_.jsx("div",{children:"Empty"}),_.jsx("input",{id:`img_input:${t}`,type:"file",hidden:!0,onChange:f=>{wC(f).then(h=>{o({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),o(null),u(void 0)})}})]}),n&&_.jsx("div",{children:i&&_.jsx(Ms,{disabled:l,onClick:()=>{s(!0),n(f=>Promise.resolve(e_(f,i.src,i.filename??null,a))).finally(()=>{s(!1),o(null),u(void 0)})},children:l?"Saving...":"Save"})})]},t)}async function t_(t,e){const{templateStrings:n,exprs:r,files:i}=e?await TR(e.getEditorState().toJSON().root):{[nn]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:t,value:{templateStrings:n,exprs:r,[nn]:"richtext"}},...Object.entries(i).map(([o,l])=>({op:"file",path:t,filePath:o,value:l}))]}function rL({defaultValue:t,onSubmit:e,registerPatchCallback:n}){const[r,i]=p.useState(null),[o,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=>t_(u,r))},[r]),_.jsxs("div",{className:"p-4 border rounded border-card",children:[_.jsx(XA,{onEditor:u=>{i(u)},richtext:t||{children:[],[nn]:"root"}}),e&&_.jsx("div",{children:o&&_.jsx(Ms,{disabled:s||!r,onClick:()=>{r&&(a(!0),e(u=>t_(u,r)).finally(()=>{a(!1),l(!1)}))},children:s?"Saving...":"Save"})})]})}function n_({disabled:t,defaultValue:e,registerPatchCallback:n,onSubmit:r,selector:i}){const o=kI(i),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"])})(o),[a,u]=p.useState(e||s.values[0]),[c,d]=p.useState(!1);p.useEffect(()=>{d(t)},[t]);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]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsxs(J4,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[_.jsx(wk,{children:_.jsx(q4,{placeholder:"Select a value"})}),_.jsx(Sk,{children:s.values.map(h=>_.jsx(Ek,{value:h.toString(),children:h.toString()},h))})]}),r&&_.jsx("div",{children:e!==a&&_.jsx(Ms,{disabled:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})},children:c?"Saving...":"Save"})})]})}function r_({disabled:t,defaultValue:e,registerPatchCallback:n,onSubmit:r}){const[i,o]=p.useState(e||0),[l,s]=p.useState(!1);p.useEffect(()=>{s(t)},[t]);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}]})},[]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsx(Fv,{ref:a,disabled:l,defaultValue:i??0,onChange:u=>o(Number(u.target.value)),type:"number"}),r&&_.jsx("div",{children:e!==i&&_.jsx(Ms,{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...":"Save"})})]})}function iL({disabled:t,defaultValue:e,registerPatchCallback:n,onSubmit:r}){const[i,o]=p.useState(e||""),[l,s]=p.useState(!1);p.useEffect(()=>{s(t)},[t]);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)||""}]})},[]),_.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[_.jsx(Fv,{ref:a,disabled:l,defaultValue:i??"",onChange:u=>o(u.target.value)}),r&&_.jsx("div",{children:e!==i&&_.jsx(Ms,{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...":"Save"})})]})}const oL=({className:t})=>_.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[_.jsx("g",{filter:"url(#filter0_d_21_1677)",children:_.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"})}),_.jsx("g",{filter:"url(#filter1_i_21_1677)",children:_.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),_.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"}),_.jsxs("defs",{children:[_.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[_.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),_.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"}),_.jsx("feOffset",{}),_.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),_.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),_.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"}),_.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),_.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),_.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[_.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),_.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),_.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"}),_.jsx("feOffset",{}),_.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),_.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),_.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"}),_.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),kk=oL,bk="Switch",[lL,AD]=ol(bk),[sL,aL]=lL(bk),uL=p.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=t,[d,f]=p.useState(null),h=st(e,y=>f(y)),m=p.useRef(!1),g=d?!!d.closest("form"):!0,[w=!1,v]=ms({prop:i,defaultProp:o,onChange:u});return p.createElement(sL,{scope:n,checked:w,disabled:s},p.createElement(Ke.button,ie({type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":$k(w),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:nt(t.onClick,y=>{v(x=>!x),g&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})})),g&&p.createElement(fL,{control:d,bubbles:!m.current,name:r,value:a,checked:w,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),cL="SwitchThumb",dL=p.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=aL(cL,n);return p.createElement(Ke.span,ie({"data-state":$k(i.checked),"data-disabled":i.disabled?"":void 0},r,{ref:e}))}),fL=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,o=p.useRef(null),l=ek(n),s=ZC(e);return p.useEffect(()=>{const a=o.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",ie({type:"checkbox","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...t.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $k(t){return t?"checked":"unchecked"}const Tk=uL,hL=dL,Hg=p.forwardRef(({className:t,...e},n)=>_.jsx(Tk,{className:xt("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",t),...e,ref:n,children:_.jsx(hL,{className:xt("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")})}));Hg.displayName=Tk.displayName;const Yv=p.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:xt("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Yv.displayName="Card";const pL=p.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:xt("flex flex-col space-y-1.5 p-6",t),...e}));pL.displayName="CardHeader";const gL=p.forwardRef(({className:t,...e},n)=>_.jsx("h3",{ref:n,className:xt("text-2xl font-semibold leading-none tracking-tight",t),...e}));gL.displayName="CardTitle";const mL=p.forwardRef(({className:t,...e},n)=>_.jsx("p",{ref:n,className:xt("text-sm text-muted-foreground",t),...e}));mL.displayName="CardDescription";const vL=p.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:xt("p-6 pt-0",t),...e}));vL.displayName="CardContent";const yL=p.forwardRef(({className:t,...e},n)=>_.jsx("div",{ref:n,className:xt("flex items-center p-6 pt-0",t),...e}));yL.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 yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yt.apply(this,arguments)}var wt;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(wt||(wt={}));const i_="popstate";function xL(t){t===void 0&&(t={});function e(r,i){let{pathname:o,search:l,hash:s}=r.location;return ku("",{pathname:o,search:l,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Vu(i)}return wL(e,n,null,t)}function Oe(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function qo(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function _L(){return Math.random().toString(36).substr(2,8)}function o_(t,e){return{usr:t.state,key:t.key,idx:e}}function ku(t,e,n,r){return n===void 0&&(n=null),yt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ki(e):e,{state:n,key:e&&e.key||r||_L()})}function Vu(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ki(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function wL(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,l=i.history,s=wt.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(yt({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=wt.Pop;let w=c(),v=w==null?null:w-u;u=w,a&&a({action:s,location:g.location,delta:v})}function f(w,v){s=wt.Push;let y=ku(g.location,w,v);n&&n(y,w),u=c()+1;let x=o_(y,u),S=g.createHref(y);try{l.pushState(x,"",S)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;i.location.assign(S)}o&&a&&a({action:s,location:g.location,delta:1})}function h(w,v){s=wt.Replace;let y=ku(g.location,w,v);n&&n(y,w),u=c();let x=o_(y,u),S=g.createHref(y);l.replaceState(x,"",S),o&&a&&a({action:s,location:g.location,delta:0})}function m(w){let v=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof w=="string"?w:Vu(w);return Oe(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 t(i,l)},listen(w){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(i_,d),a=w,()=>{i.removeEventListener(i_,d),a=null}},createHref(w){return e(i,w)},createURL:m,encodeLocation(w){let v=m(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(w){return l.go(w)}};return g}var St;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(St||(St={}));const SL=new Set(["lazy","caseSensitive","path","id","index","children"]);function EL(t){return t.index===!0}function Kg(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((i,o)=>{let l=[...n,o],s=typeof i.id=="string"?i.id:l.join("-");if(Oe(i.index!==!0||!i.children,"Cannot specify children on an index route"),Oe(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),EL(i)){let a=yt({},i,e(i),{id:s});return r[s]=a,a}else{let a=yt({},i,e(i),{id:s,children:void 0});return r[s]=a,i.children&&(a.children=Kg(i.children,e,l,r)),a}})}function Bl(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?ki(e):e,i=Hu(r.pathname||"/",n);if(i==null)return null;let o=Nk(t);kL(o);let l=null;for(let s=0;l==null&&s<o.length;++s)l=ML(o[s],DL(i));return l}function CL(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],handle:n.handle}}function Nk(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,l,s)=>{let a={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};a.relativePath.startsWith("/")&&(Oe(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=eo([r,a.relativePath]),c=n.concat(a);o.children&&o.children.length>0&&(Oe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Nk(o.children,e,c,u)),!(o.path==null&&!o.index)&&e.push({path:u,score:PL(u,o.index),routesMeta:c})};return t.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,l);else for(let a of Rk(o.path))i(o,l,a)}),e}function Rk(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let l=Rk(r.join("/")),s=[];return s.push(...l.map(a=>a===""?o:[o,a].join("/"))),i&&s.push(...l),s.map(a=>t.startsWith("/")&&a===""?"/":a)}function kL(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:AL(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const bL=/^:\w+$/,$L=3,TL=2,NL=1,RL=10,OL=-2,l_=t=>t==="*";function PL(t,e){let n=t.split("/"),r=n.length;return n.some(l_)&&(r+=OL),e&&(r+=TL),n.filter(i=>!l_(i)).reduce((i,o)=>i+(bL.test(o)?$L:o===""?NL:RL),r)}function AL(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function ML(t,e){let{routesMeta:n}=t,r={},i="/",o=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=i==="/"?e:e.slice(i.length)||"/",c=LL({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;o.push({params:r,pathname:eo([i,c.pathname]),pathnameBase:BL(eo([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=eo([i,c.pathnameBase]))}return o}function LL(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=IL(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let o=i[0],l=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let g=s[d]||"";l=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?u[f]=void 0:u[f]=jL(m||"",f),u},{}),pathname:o,pathnameBase:l,pattern:t}}function IL(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),qo(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function DL(t){try{return decodeURI(t)}catch(e){return qo(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function jL(t,e){try{return decodeURIComponent(t)}catch(n){return qo(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function Hu(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function zL(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?ki(t):t;return{pathname:n?n.startsWith("/")?n:FL(n,e):e,search:UL(r),hash:WL(i)}}function FL(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Kh(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 Ok(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Pk(t){return Ok(t).map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ak(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=ki(t):(i=yt({},t),Oe(!i.pathname||!i.pathname.includes("?"),Kh("?","pathname","search",i)),Oe(!i.pathname||!i.pathname.includes("#"),Kh("#","pathname","hash",i)),Oe(!i.search||!i.search.includes("#"),Kh("#","search","hash",i)));let o=t===""||i.pathname==="",l=o?"/":i.pathname,s;if(l==null)s=n;else if(r){let d=e[e.length-1].replace(/^\//,"").split("/");if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d.pop();i.pathname=f.join("/")}s="/"+d.join("/")}else{let d=e.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?e[d]:"/"}let a=zL(i,s),u=l&&l!=="/"&&l.endsWith("/"),c=(o||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const eo=t=>t.join("/").replace(/\/\/+/g,"/"),BL=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),UL=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,WL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class Xv{constructor(e,n,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Mk(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Lk=["post","put","patch","delete"],VL=new Set(Lk),HL=["get",...Lk],KL=new Set(HL),ZL=new Set([301,302,303,307,308]),GL=new Set([307,308]),Zh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},YL={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ea={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ik=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XL=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Dk="remix-router-transitions";function QL(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Oe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let R=t.detectErrorBoundary;i=I=>({hasErrorBoundary:R(I)})}else i=XL;let o={},l=Kg(t.routes,i,void 0,o),s,a=t.basename||"/",u=yt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},t.future),c=null,d=new Set,f=null,h=null,m=null,g=t.hydrationData!=null,w=Bl(l,t.history.location,a),v=null;if(w==null){let R=Gn(404,{pathname:t.history.location.pathname}),{matches:I,route:z}=p_(l);w=I,v={[z.id]:R}}let y=!w.some(R=>R.route.lazy)&&(!w.some(R=>R.route.loader)||t.hydrationData!=null),x,S={historyAction:t.history.action,location:t.history.location,matches:w,initialized:y,navigation:Zh,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||v,fetchers:new Map,blockers:new Map},b=wt.Pop,T=!1,$,O=!1,L=new Map,P=null,D=!1,B=!1,oe=[],H=[],Z=new Map,C=0,k=-1,E=new Map,A=new Set,N=new Map,F=new Map,K=new Set,de=new Map,se=new Map,Ae=!1;function Ne(){if(c=t.history.listen(R=>{let{action:I,location:z,delta:Y}=R;if(Ae){Ae=!1;return}qo(se.size===0||Y!=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 le=ly({currentLocation:S.location,nextLocation:z,historyAction:I});if(le&&Y!=null){Ae=!0,t.history.go(Y*-1),Ku(le,{state:"blocked",location:z,proceed(){Ku(le,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),t.history.go(Y)},reset(){let ke=new Map(S.blockers);ke.set(le,ea),be({blockers:ke})}});return}return Qe(I,z)}),n){aI(e,L);let R=()=>uI(e,L);e.addEventListener("pagehide",R),P=()=>e.removeEventListener("pagehide",R)}return S.initialized||Qe(wt.Pop,S.location),x}function Q(){c&&c(),P&&P(),d.clear(),$&&$.abort(),S.fetchers.forEach((R,I)=>Pn(I)),S.blockers.forEach((R,I)=>oy(I))}function je(R){return d.add(R),()=>d.delete(R)}function be(R,I){I===void 0&&(I={}),S=yt({},S,R);let z=[],Y=[];u.v7_fetcherPersist&&S.fetchers.forEach((le,ke)=>{le.state==="idle"&&(K.has(ke)?Y.push(ke):z.push(ke))}),[...d].forEach(le=>le(S,{deletedFetchers:Y,unstable_viewTransitionOpts:I.viewTransitionOpts,unstable_flushSync:I.flushSync===!0})),u.v7_fetcherPersist&&(z.forEach(le=>S.fetchers.delete(le)),Y.forEach(le=>Pn(le)))}function Re(R,I,z){var Y,le;let{flushSync:ke}=z===void 0?{}:z,ge=S.actionData!=null&&S.navigation.formMethod!=null&&pr(S.navigation.formMethod)&&S.navigation.state==="loading"&&((Y=R.state)==null?void 0:Y._isRedirect)!==!0,pe;I.actionData?Object.keys(I.actionData).length>0?pe=I.actionData:pe=null:ge?pe=S.actionData:pe=null;let ue=I.loaderData?h_(S.loaderData,I.loaderData,I.matches||[],I.errors):S.loaderData,Me=S.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((Ze,ut)=>Me.set(ut,ea)));let Vt=T===!0||S.navigation.formMethod!=null&&pr(S.navigation.formMethod)&&((le=R.state)==null?void 0:le._isRedirect)!==!0;s&&(l=s,s=void 0),D||b===wt.Pop||(b===wt.Push?t.history.push(R,R.state):b===wt.Replace&&t.history.replace(R,R.state));let $e;if(b===wt.Pop){let Ze=L.get(S.location.pathname);Ze&&Ze.has(R.pathname)?$e={currentLocation:S.location,nextLocation:R}:L.has(R.pathname)&&($e={currentLocation:R,nextLocation:S.location})}else if(O){let Ze=L.get(S.location.pathname);Ze?Ze.add(R.pathname):(Ze=new Set([R.pathname]),L.set(S.location.pathname,Ze)),$e={currentLocation:S.location,nextLocation:R}}be(yt({},I,{actionData:pe,loaderData:ue,historyAction:b,location:R,initialized:!0,navigation:Zh,revalidation:"idle",restoreScrollPosition:ay(R,I.matches||S.matches),preventScrollReset:Vt,blockers:Me}),{viewTransitionOpts:$e,flushSync:ke===!0}),b=wt.Pop,T=!1,O=!1,D=!1,B=!1,oe=[],H=[]}async function we(R,I){if(typeof R=="number"){t.history.go(R);return}let z=Zg(S.location,S.matches,a,u.v7_prependBasename,R,I==null?void 0:I.fromRouteId,I==null?void 0:I.relative),{path:Y,submission:le,error:ke}=s_(u.v7_normalizeFormMethod,!1,z,I),ge=S.location,pe=ku(S.location,Y,I&&I.state);pe=yt({},pe,t.history.encodeLocation(pe));let ue=I&&I.replace!=null?I.replace:void 0,Me=wt.Push;ue===!0?Me=wt.Replace:ue===!1||le!=null&&pr(le.formMethod)&&le.formAction===S.location.pathname+S.location.search&&(Me=wt.Replace);let Vt=I&&"preventScrollReset"in I?I.preventScrollReset===!0:void 0,$e=(I&&I.unstable_flushSync)===!0,Ze=ly({currentLocation:ge,nextLocation:pe,historyAction:Me});if(Ze){Ku(Ze,{state:"blocked",location:pe,proceed(){Ku(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),we(R,I)},reset(){let ut=new Map(S.blockers);ut.set(Ze,ea),be({blockers:ut})}});return}return await Qe(Me,pe,{submission:le,pendingError:ke,preventScrollReset:Vt,replace:I&&I.replace,enableViewTransition:I&&I.unstable_viewTransition,flushSync:$e})}function Ie(){if(En(),be({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){Qe(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}Qe(b||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation})}}async function Qe(R,I,z){$&&$.abort(),$=null,b=R,D=(z&&z.startUninterruptedRevalidation)===!0,pb(S.location,S.matches),T=(z&&z.preventScrollReset)===!0,O=(z&&z.enableViewTransition)===!0;let Y=s||l,le=z&&z.overrideNavigation,ke=Bl(Y,I,a),ge=(z&&z.flushSync)===!0;if(!ke){let ut=Gn(404,{pathname:I.pathname}),{matches:an,route:Rr}=p_(Y);Xf(),Re(I,{matches:an,loaderData:{},errors:{[Rr.id]:ut}},{flushSync:ge});return}if(S.initialized&&!B&&nI(S.location,I)&&!(z&&z.submission&&pr(z.submission.formMethod))){Re(I,{matches:ke},{flushSync:ge});return}$=new AbortController;let pe=na(t.history,I,$.signal,z&&z.submission),ue,Me;if(z&&z.pendingError)Me={[Aa(ke).route.id]:z.pendingError};else if(z&&z.submission&&pr(z.submission.formMethod)){let ut=await Wt(pe,I,z.submission,ke,{replace:z.replace,flushSync:ge});if(ut.shortCircuited)return;ue=ut.pendingActionData,Me=ut.pendingActionError,le=Gh(I,z.submission),ge=!1,pe=new Request(pe.url,{signal:pe.signal})}let{shortCircuited:Vt,loaderData:$e,errors:Ze}=await Sn(pe,I,ke,le,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,ge,ue,Me);Vt||($=null,Re(I,yt({matches:ke},ue?{actionData:ue}:{},{loaderData:$e,errors:Ze})))}async function Wt(R,I,z,Y,le){le===void 0&&(le={}),En();let ke=lI(I,z);be({navigation:ke},{flushSync:le.flushSync===!0});let ge,pe=Yg(Y,I);if(!pe.route.action&&!pe.route.lazy)ge={type:St.error,error:Gn(405,{method:R.method,pathname:I.pathname,routeId:pe.route.id})};else if(ge=await ta("action",R,pe,Y,o,i,a),R.signal.aborted)return{shortCircuited:!0};if(ql(ge)){let ue;return le&&le.replace!=null?ue=le.replace:ue=ge.location===S.location.pathname+S.location.search,await at(S,ge,{submission:z,replace:ue}),{shortCircuited:!0}}if(Ma(ge)){let ue=Aa(Y,pe.route.id);return(le&&le.replace)!==!0&&(b=wt.Push),{pendingActionData:{},pendingActionError:{[ue.route.id]:ge.error}}}if(Po(ge))throw Gn(400,{type:"defer-action"});return{pendingActionData:{[pe.route.id]:ge.data}}}async function Sn(R,I,z,Y,le,ke,ge,pe,ue,Me){let Vt=Y||Gh(I,le),$e=le||ke||v_(Vt),Ze=s||l,[ut,an]=a_(t.history,S,z,$e,I,B,oe,H,K,N,A,Ze,a,ue,Me);if(Xf(Ge=>!(z&&z.some(Zn=>Zn.route.id===Ge))||ut&&ut.some(Zn=>Zn.route.id===Ge)),k=++C,ut.length===0&&an.length===0){let Ge=_o();return Re(I,yt({matches:z,loaderData:{},errors:Me||null},ue?{actionData:ue}:{},Ge?{fetchers:new Map(S.fetchers)}:{}),{flushSync:pe}),{shortCircuited:!0}}if(!D){an.forEach(Zn=>{let kt=S.fetchers.get(Zn.key),wo=ra(void 0,kt?kt.data:void 0);S.fetchers.set(Zn.key,wo)});let Ge=ue||S.actionData;be(yt({navigation:Vt},Ge?Object.keys(Ge).length===0?{actionData:null}:{actionData:Ge}:{},an.length>0?{fetchers:new Map(S.fetchers)}:{}),{flushSync:pe})}an.forEach(Ge=>{Z.has(Ge.key)&&mt(Ge.key),Ge.controller&&Z.set(Ge.key,Ge.controller)});let Rr=()=>an.forEach(Ge=>mt(Ge.key));$&&$.signal.addEventListener("abort",Rr);let{results:zs,loaderResults:Qf,fetcherResults:fl}=await ln(S.matches,z,ut,an,R);if(R.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",Rr),an.forEach(Ge=>Z.delete(Ge.key));let sr=g_(zs);if(sr){if(sr.idx>=ut.length){let Ge=an[sr.idx-ut.length].key;A.add(Ge)}return await at(S,sr.result,{replace:ge}),{shortCircuited:!0}}let{loaderData:Zu,errors:Jf}=f_(S,z,ut,Qf,Me,an,fl,de);de.forEach((Ge,Zn)=>{Ge.subscribe(kt=>{(kt||Ge.done)&&de.delete(Zn)})});let qf=_o(),eh=js(k),hl=qf||eh||an.length>0;return yt({loaderData:Zu,errors:Jf},hl?{fetchers:new Map(S.fetchers)}:{})}function lr(R,I,z,Y){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.");Z.has(R)&&mt(R);let le=(Y&&Y.unstable_flushSync)===!0,ke=s||l,ge=Zg(S.location,S.matches,a,u.v7_prependBasename,z,I,Y==null?void 0:Y.relative),pe=Bl(ke,ge,a);if(!pe){At(R,I,Gn(404,{pathname:ge}),{flushSync:le});return}let{path:ue,submission:Me,error:Vt}=s_(u.v7_normalizeFormMethod,!0,ge,Y);if(Vt){At(R,I,Vt,{flushSync:le});return}let $e=Yg(pe,ue);if(T=(Y&&Y.preventScrollReset)===!0,Me&&pr(Me.formMethod)){ze(R,I,ue,$e,pe,le,Me);return}N.set(R,{routeId:I,path:ue}),Tt(R,I,ue,$e,pe,le,Me)}async function ze(R,I,z,Y,le,ke,ge){if(En(),N.delete(R),!Y.route.action&&!Y.route.lazy){let kt=Gn(405,{method:ge.formMethod,pathname:z,routeId:I});At(R,I,kt,{flushSync:ke});return}let pe=S.fetchers.get(R);_t(R,sI(ge,pe),{flushSync:ke});let ue=new AbortController,Me=na(t.history,z,ue.signal,ge);Z.set(R,ue);let Vt=C,$e=await ta("action",Me,Y,le,o,i,a);if(Me.signal.aborted){Z.get(R)===ue&&Z.delete(R);return}if(K.has(R)){_t(R,Pi(void 0));return}if(ql($e))if(Z.delete(R),k>Vt){_t(R,Pi(void 0));return}else return A.add(R),_t(R,ra(ge)),at(S,$e,{fetcherSubmission:ge});if(Ma($e)){At(R,I,$e.error);return}if(Po($e))throw Gn(400,{type:"defer-action"});let Ze=S.navigation.location||S.location,ut=na(t.history,Ze,ue.signal),an=s||l,Rr=S.navigation.state!=="idle"?Bl(an,S.navigation.location,a):S.matches;Oe(Rr,"Didn't find any matches after fetcher action");let zs=++C;E.set(R,zs);let Qf=ra(ge,$e.data);S.fetchers.set(R,Qf);let[fl,sr]=a_(t.history,S,Rr,ge,Ze,B,oe,H,K,N,A,an,a,{[Y.route.id]:$e.data},void 0);sr.filter(kt=>kt.key!==R).forEach(kt=>{let wo=kt.key,uy=S.fetchers.get(wo),mb=ra(void 0,uy?uy.data:void 0);S.fetchers.set(wo,mb),Z.has(wo)&&mt(wo),kt.controller&&Z.set(wo,kt.controller)}),be({fetchers:new Map(S.fetchers)});let Zu=()=>sr.forEach(kt=>mt(kt.key));ue.signal.addEventListener("abort",Zu);let{results:Jf,loaderResults:qf,fetcherResults:eh}=await ln(S.matches,Rr,fl,sr,ut);if(ue.signal.aborted)return;ue.signal.removeEventListener("abort",Zu),E.delete(R),Z.delete(R),sr.forEach(kt=>Z.delete(kt.key));let hl=g_(Jf);if(hl){if(hl.idx>=fl.length){let kt=sr[hl.idx-fl.length].key;A.add(kt)}return at(S,hl.result)}let{loaderData:Ge,errors:Zn}=f_(S,S.matches,fl,qf,void 0,sr,eh,de);if(S.fetchers.has(R)){let kt=Pi($e.data);S.fetchers.set(R,kt)}js(zs),S.navigation.state==="loading"&&zs>k?(Oe(b,"Expected pending action"),$&&$.abort(),Re(S.navigation.location,{matches:Rr,loaderData:Ge,errors:Zn,fetchers:new Map(S.fetchers)})):(be({errors:Zn,loaderData:h_(S.loaderData,Ge,Rr,Zn),fetchers:new Map(S.fetchers)}),B=!1)}async function Tt(R,I,z,Y,le,ke,ge){let pe=S.fetchers.get(R);_t(R,ra(ge,pe?pe.data:void 0),{flushSync:ke});let ue=new AbortController,Me=na(t.history,z,ue.signal);Z.set(R,ue);let Vt=C,$e=await ta("loader",Me,Y,le,o,i,a);if(Po($e)&&($e=await Fk($e,Me.signal,!0)||$e),Z.get(R)===ue&&Z.delete(R),!Me.signal.aborted){if(K.has(R)){_t(R,Pi(void 0));return}if(ql($e))if(k>Vt){_t(R,Pi(void 0));return}else{A.add(R),await at(S,$e);return}if(Ma($e)){At(R,I,$e.error);return}Oe(!Po($e),"Unhandled fetcher deferred data"),_t(R,Pi($e.data))}}async function at(R,I,z){let{submission:Y,fetcherSubmission:le,replace:ke}=z===void 0?{}:z;I.revalidate&&(B=!0);let ge=ku(R.location,I.location,{_isRedirect:!0});if(Oe(ge,"Expected a location on the redirect navigation"),n){let Ze=!1;if(I.reloadDocument)Ze=!0;else if(Ik.test(I.location)){const ut=t.history.createURL(I.location);Ze=ut.origin!==e.location.origin||Hu(ut.pathname,a)==null}if(Ze){ke?e.location.replace(I.location):e.location.assign(I.location);return}}$=null;let pe=ke===!0?wt.Replace:wt.Push,{formMethod:ue,formAction:Me,formEncType:Vt}=R.navigation;!Y&&!le&&ue&&Me&&Vt&&(Y=v_(R.navigation));let $e=Y||le;if(GL.has(I.status)&&$e&&pr($e.formMethod))await Qe(pe,ge,{submission:yt({},$e,{formAction:I.location}),preventScrollReset:T});else{let Ze=Gh(ge,Y);await Qe(pe,ge,{overrideNavigation:Ze,fetcherSubmission:le,preventScrollReset:T})}}async function ln(R,I,z,Y,le){let ke=await Promise.all([...z.map(ue=>ta("loader",le,ue,I,o,i,a)),...Y.map(ue=>ue.matches&&ue.match&&ue.controller?ta("loader",na(t.history,ue.path,ue.controller.signal),ue.match,ue.matches,o,i,a):{type:St.error,error:Gn(404,{pathname:ue.path})})]),ge=ke.slice(0,z.length),pe=ke.slice(z.length);return await Promise.all([m_(R,z,ge,ge.map(()=>le.signal),!1,S.loaderData),m_(R,Y.map(ue=>ue.match),pe,Y.map(ue=>ue.controller?ue.controller.signal:null),!0)]),{results:ke,loaderResults:ge,fetcherResults:pe}}function En(){B=!0,oe.push(...Xf()),N.forEach((R,I)=>{Z.has(I)&&(H.push(I),mt(I))})}function _t(R,I,z){z===void 0&&(z={}),S.fetchers.set(R,I),be({fetchers:new Map(S.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function At(R,I,z,Y){Y===void 0&&(Y={});let le=Aa(S.matches,I);Pn(R),be({errors:{[le.route.id]:z},fetchers:new Map(S.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function sn(R){return u.v7_fetcherPersist&&(F.set(R,(F.get(R)||0)+1),K.has(R)&&K.delete(R)),S.fetchers.get(R)||YL}function Pn(R){let I=S.fetchers.get(R);Z.has(R)&&!(I&&I.state==="loading"&&E.has(R))&&mt(R),N.delete(R),E.delete(R),A.delete(R),K.delete(R),S.fetchers.delete(R)}function qr(R){if(u.v7_fetcherPersist){let I=(F.get(R)||0)-1;I<=0?(F.delete(R),K.add(R)):F.set(R,I)}else Pn(R);be({fetchers:new Map(S.fetchers)})}function mt(R){let I=Z.get(R);Oe(I,"Expected fetch controller: "+R),I.abort(),Z.delete(R)}function Nr(R){for(let I of R){let z=sn(I),Y=Pi(z.data);S.fetchers.set(I,Y)}}function _o(){let R=[],I=!1;for(let z of A){let Y=S.fetchers.get(z);Oe(Y,"Expected fetcher: "+z),Y.state==="loading"&&(A.delete(z),R.push(z),I=!0)}return Nr(R),I}function js(R){let I=[];for(let[z,Y]of E)if(Y<R){let le=S.fetchers.get(z);Oe(le,"Expected fetcher: "+z),le.state==="loading"&&(mt(z),E.delete(z),I.push(z))}return Nr(I),I.length>0}function fb(R,I){let z=S.blockers.get(R)||ea;return se.get(R)!==I&&se.set(R,I),z}function oy(R){S.blockers.delete(R),se.delete(R)}function Ku(R,I){let z=S.blockers.get(R)||ea;Oe(z.state==="unblocked"&&I.state==="blocked"||z.state==="blocked"&&I.state==="blocked"||z.state==="blocked"&&I.state==="proceeding"||z.state==="blocked"&&I.state==="unblocked"||z.state==="proceeding"&&I.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+I.state);let Y=new Map(S.blockers);Y.set(R,I),be({blockers:Y})}function ly(R){let{currentLocation:I,nextLocation:z,historyAction:Y}=R;if(se.size===0)return;se.size>1&&qo(!1,"A router only supports one blocker at a time");let le=Array.from(se.entries()),[ke,ge]=le[le.length-1],pe=S.blockers.get(ke);if(!(pe&&pe.state==="proceeding")&&ge({currentLocation:I,nextLocation:z,historyAction:Y}))return ke}function Xf(R){let I=[];return de.forEach((z,Y)=>{(!R||R(Y))&&(z.cancel(),I.push(Y),de.delete(Y))}),I}function hb(R,I,z){if(f=R,m=I,h=z||null,!g&&S.navigation===Zh){g=!0;let Y=ay(S.location,S.matches);Y!=null&&be({restoreScrollPosition:Y})}return()=>{f=null,m=null,h=null}}function sy(R,I){return h&&h(R,I.map(Y=>CL(Y,S.loaderData)))||R.key}function pb(R,I){if(f&&m){let z=sy(R,I);f[z]=m()}}function ay(R,I){if(f){let z=sy(R,I),Y=f[z];if(typeof Y=="number")return Y}return null}function gb(R){o={},s=Kg(R,i,void 0,o)}return x={get basename(){return a},get state(){return S},get routes(){return l},get window(){return e},initialize:Ne,subscribe:je,enableScrollRestoration:hb,navigate:we,fetch:lr,revalidate:Ie,createHref:R=>t.history.createHref(R),encodeLocation:R=>t.history.encodeLocation(R),getFetcher:sn,deleteFetcher:qr,dispose:Q,getBlocker:fb,deleteBlocker:oy,_internalFetchControllers:Z,_internalActiveDeferreds:de,_internalSetRoutes:gb},x}function JL(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Zg(t,e,n,r,i,o,l){let s,a;if(o){s=[];for(let c of e)if(s.push(c),c.route.id===o){a=c;break}}else s=e,a=e[e.length-1];let u=Ak(i||".",Pk(s),Hu(t.pathname,n)||t.pathname,l==="path");return i==null&&(u.search=t.search,u.hash=t.hash),(i==null||i===""||i===".")&&a&&a.route.index&&!Qv(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:eo([n,u.pathname])),Vu(u)}function s_(t,e,n,r){if(!r||!JL(r))return{path:n};if(r.formMethod&&!oI(r.formMethod))return{path:n,error:Gn(405,{method:r.formMethod})};let i=()=>({path:n,error:Gn(400,{type:"invalid-body"})}),o=r.formMethod||"get",l=t?o.toUpperCase():o.toLowerCase(),s=zk(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pr(l))return i();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,w]=m;return""+h+g+"="+w+`
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(!pr(l))return i();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 i()}}}Oe(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=Gg(r.formData),u=r.formData;else if(r.body instanceof FormData)a=Gg(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=d_(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=d_(a)}catch{return i()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(pr(c.formMethod))return{path:n,submission:c};let d=ki(n);return e&&d.search&&Qv(d.search)&&a.append("index",""),d.search="?"+a,{path:Vu(d),submission:c}}function qL(t,e){let n=t;if(e){let r=t.findIndex(i=>i.route.id===e);r>=0&&(n=t.slice(0,r))}return n}function a_(t,e,n,r,i,o,l,s,a,u,c,d,f,h,m){let g=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,w=t.createURL(e.location),v=t.createURL(i),y=m?Object.keys(m)[0]:void 0,S=qL(n,y).filter((T,$)=>{if(T.route.lazy)return!0;if(T.route.loader==null)return!1;if(eI(e.loaderData,e.matches[$],T)||l.some(P=>P===T.route.id))return!0;let O=e.matches[$],L=T;return u_(T,yt({currentUrl:w,currentParams:O.params,nextUrl:v,nextParams:L.params},r,{actionResult:g,defaultShouldRevalidate:o||w.pathname+w.search===v.pathname+v.search||w.search!==v.search||jk(O,L)}))}),b=[];return u.forEach((T,$)=>{if(!n.some(B=>B.route.id===T.routeId)||a.has($))return;let O=Bl(d,T.path,f);if(!O){b.push({key:$,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let L=e.fetchers.get($),P=Yg(O,T.path),D=!1;c.has($)?D=!1:s.includes($)?D=!0:L&&L.state!=="idle"&&L.data===void 0?D=o:D=u_(P,yt({currentUrl:w,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:o})),D&&b.push({key:$,routeId:T.routeId,path:T.path,matches:O,match:P,controller:new AbortController})}),[S,b]}function eI(t,e,n){let r=!e||n.route.id!==e.route.id,i=t[n.route.id]===void 0;return r||i}function jk(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function u_(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}async function c_(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Oe(i,"No route found in manifest");let o={};for(let l in r){let a=i[l]!==void 0&&l!=="hasErrorBoundary";qo(!a,'Route "'+i.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&&!SL.has(l)&&(o[l]=r[l])}Object.assign(i,o),Object.assign(i,yt({},e(i),{lazy:void 0}))}async function ta(t,e,n,r,i,o,l,s){s===void 0&&(s={});let a,u,c,d=m=>{let g,w=new Promise((v,y)=>g=y);return c=()=>g(),e.signal.addEventListener("abort",c),Promise.race([m({request:e,params:n.params,context:s.requestContext}),w])};try{let m=n.route[t];if(n.route.lazy)if(m){let g,w=await Promise.all([d(m).catch(v=>{g=v}),c_(n.route,o,i)]);if(g)throw g;u=w[0]}else if(await c_(n.route,o,i),m=n.route[t],m)u=await d(m);else if(t==="action"){let g=new URL(e.url),w=g.pathname+g.search;throw Gn(405,{method:e.method,pathname:w,routeId:n.route.id})}else return{type:St.data,data:void 0};else if(m)u=await d(m);else{let g=new URL(e.url),w=g.pathname+g.search;throw Gn(404,{pathname:w})}Oe(u!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){a=St.error,u=m}finally{c&&e.signal.removeEventListener("abort",c)}if(iI(u)){let m=u.status;if(ZL.has(m)){let v=u.headers.get("Location");if(Oe(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ik.test(v))v=Zg(new URL(e.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(e.url),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),S=Hu(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:St.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===St.error?St.error:St.data,response:u};let g,w=u.headers.get("Content-Type");return w&&/\bapplication\/json\b/.test(w)?g=await u.json():g=await u.text(),a===St.error?{type:a,error:new Xv(m,u.statusText,g),headers:u.headers}:{type:St.data,data:g,statusCode:u.status,headers:u.headers}}if(a===St.error)return{type:a,error:u};if(rI(u)){var f,h;return{type:St.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:St.data,data:u}}function na(t,e,n,r){let i=t.createURL(zk(e)).toString(),o={signal:n};if(r&&pr(r.formMethod)){let{formMethod:l,formEncType:s}=r;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=Gg(r.formData):o.body=r.formData}return new Request(i,o)}function Gg(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function d_(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function tI(t,e,n,r,i){let o={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=e[d].route.id;if(Oe(!ql(c),"Cannot handle redirect results in processLoaderData"),Ma(c)){let h=Aa(t,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),o[f]=void 0,a||(a=!0,s=Mk(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else Po(c)?(i.set(f,c.deferredData),o[f]=c.deferredData.data):o[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:u}}function f_(t,e,n,r,i,o,l,s){let{loaderData:a,errors:u}=tI(e,n,r,i,s);for(let c=0;c<o.length;c++){let{key:d,match:f,controller:h}=o[c];Oe(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let m=l[c];if(!(h&&h.signal.aborted))if(Ma(m)){let g=Aa(t.matches,f==null?void 0:f.route.id);u&&u[g.route.id]||(u=yt({},u,{[g.route.id]:m.error})),t.fetchers.delete(d)}else if(ql(m))Oe(!1,"Unhandled fetcher revalidation redirect");else if(Po(m))Oe(!1,"Unhandled fetcher deferred data");else{let g=Pi(m.data);t.fetchers.set(d,g)}}return{loaderData:a,errors:u}}function h_(t,e,n,r){let i=yt({},e);for(let o of n){let l=o.route.id;if(e.hasOwnProperty(l)?e[l]!==void 0&&(i[l]=e[l]):t[l]!==void 0&&o.route.loader&&(i[l]=t[l]),r&&r.hasOwnProperty(l))break}return i}function Aa(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function p_(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Gn(t,e){let{pathname:n,routeId:r,method:i,type:o}=e===void 0?{}:e,l="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(l="Bad Request",i&&n&&r?s="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):t===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):t===404?(l="Not Found",s='No route matches URL "'+n+'"'):t===405&&(l="Method Not Allowed",i&&n&&r?s="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new Xv(t||500,l,new Error(s),!0)}function g_(t){for(let e=t.length-1;e>=0;e--){let n=t[e];if(ql(n))return{result:n,idx:e}}}function zk(t){let e=typeof t=="string"?ki(t):t;return Vu(yt({},e,{hash:""}))}function nI(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Po(t){return t.type===St.deferred}function Ma(t){return t.type===St.error}function ql(t){return(t&&t.type)===St.redirect}function rI(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function iI(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function oI(t){return KL.has(t.toLowerCase())}function pr(t){return VL.has(t.toLowerCase())}async function m_(t,e,n,r,i,o){for(let l=0;l<n.length;l++){let s=n[l],a=e[l];if(!a)continue;let u=t.find(d=>d.route.id===a.route.id),c=u!=null&&!jk(u,a)&&(o&&o[a.route.id])!==void 0;if(Po(s)&&(i||c)){let d=r[l];Oe(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Fk(s,d,i).then(f=>{f&&(n[l]=f||n[l])})}}}async function Fk(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:St.data,data:t.deferredData.unwrappedData}}catch(i){return{type:St.error,error:i}}return{type:St.data,data:t.deferredData.data}}}function Qv(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Yg(t,e){let n=typeof e=="string"?ki(e).search:e.search;if(t[t.length-1].route.index&&Qv(n||""))return t[t.length-1];let r=Ok(t);return r[r.length-1]}function v_(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:o,json:l}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Gh(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function lI(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function ra(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function sI(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Pi(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function aI(t,e){try{let n=t.sessionStorage.getItem(Dk);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function uI(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(Dk,JSON.stringify(n))}catch(r){qo(!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 qd(){return qd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qd.apply(this,arguments)}const Vf=p.createContext(null),Bk=p.createContext(null),Hf=p.createContext(null),Kf=p.createContext(null),dl=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Uk=p.createContext(null);function Zf(){return p.useContext(Kf)!=null}function Wk(){return Zf()||Oe(!1),p.useContext(Kf).location}function Vk(t){p.useContext(Hf).static||p.useLayoutEffect(t)}function Jv(){let{isDataRoute:t}=p.useContext(dl);return t?SI():cI()}function cI(){Zf()||Oe(!1);let t=p.useContext(Vf),{basename:e,navigator:n}=p.useContext(Hf),{matches:r}=p.useContext(dl),{pathname:i}=Wk(),o=JSON.stringify(Pk(r)),l=p.useRef(!1);return Vk(()=>{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=Ak(a,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(c.pathname=c.pathname==="/"?e:eo([e,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[e,n,o,i,t])}function dI(){let{matches:t}=p.useContext(dl),e=t[t.length-1];return e?e.params:{}}function fI(t,e,n){Zf()||Oe(!1);let{navigator:r}=p.useContext(Hf),{matches:i}=p.useContext(dl),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let a=Wk(),u;if(e){var c;let g=typeof e=="string"?ki(e):e;s==="/"||(c=g.pathname)!=null&&c.startsWith(s)||Oe(!1),u=g}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=Bl(t,{pathname:f}),m=vI(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:eo([s,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:eo([s,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n);return e&&m?p.createElement(Kf.Provider,{value:{location:qd({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:wt.Pop}},m):m}function hI(){let t=wI(),e=Mk(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},e),n?p.createElement("pre",{style:i},n):null,o)}const pI=p.createElement(hI,null);class gI extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?p.createElement(dl.Provider,{value:this.props.routeContext},p.createElement(Uk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mI(t){let{routeContext:e,match:n,children:r}=t,i=p.useContext(Vf);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(dl.Provider,{value:e},r)}function vI(t,e,n){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let o=t,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=o.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||Oe(!1),o=o.slice(0,Math.min(o.length,s+1))}return o.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||pI);let f=e.concat(o.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(mI,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:m})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(gI,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var Hk=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Hk||{}),ef=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(ef||{});function yI(t){let e=p.useContext(Vf);return e||Oe(!1),e}function xI(t){let e=p.useContext(Bk);return e||Oe(!1),e}function _I(t){let e=p.useContext(dl);return e||Oe(!1),e}function Kk(t){let e=_I(),n=e.matches[e.matches.length-1];return n.route.id||Oe(!1),n.route.id}function wI(){var t;let e=p.useContext(Uk),n=xI(ef.UseRouteError),r=Kk(ef.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function SI(){let{router:t}=yI(Hk.UseNavigateStable),e=Kk(ef.UseNavigateStable),n=p.useRef(!1);return Vk(()=>{n.current=!0}),p.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,qd({fromRouteId:e},o)))},[t,e])}function EI(t){let{basename:e="/",children:n=null,location:r,navigationType:i=wt.Pop,navigator:o,static:l=!1}=t;Zf()&&Oe(!1);let s=e.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:o,static:l}),[s,o,l]);typeof r=="string"&&(r=ki(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,m=p.useMemo(()=>{let g=Hu(u,s);return g==null?null:{location:{pathname:g,search:c,hash:d,state:f,key:h},navigationType:i}},[s,u,c,d,f,h,i]);return m==null?null:p.createElement(Hf.Provider,{value:a},p.createElement(Kf.Provider,{children:n,value:m}))}new Promise(()=>{});function CI(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:p.createElement(t.Component),Component:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:p.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}const Zk=re.createContext(null),kI=t=>{var s,a;const e=re.useContext(Zk),[n,r]=jn.splitModuleIdAndModulePath(t),i=(s=e==null?void 0:e[n])==null?void 0:s.source,o=(a=e==null?void 0:e[n])==null?void 0:a.schema;if(!i||!o)throw Error("Could not find module: "+n);const l=jn.resolvePath(r,i,o);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},bI=({api:t})=>{var $,O;const{"*":e}=dI(),[n,r]=p.useState(null),[i,o]=p.useState(null),[l,s]=p.useState(),[a]=l?jn.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&(($=n==null?void 0:n[a])==null?void 0:$.source),c=a&&((O=n==null?void 0:n[a])==null?void 0:O.schema),d=Object.entries(n||{}).flatMap(([L,P])=>P.errors?P.errors.fatal?P.errors.fatal.map(D=>({id:L,...D})):[]:[]),f=Object.entries(n||{}).flatMap(([,L])=>L.errors&&L.errors.validation?[L.errors.validation]:[]);if(d&&d.length>0){const L=d.length===1?d[0].message:`Multiple errors detected:
189
- ${d.map((D,B)=>`${B+1}. [${D.id}]: ${D.message}`).join(`
190
- `)}
191
-
192
- Showing stack trace of: 1. ${d[0].message}`,P=new Error(L);throw P.stack=d[0].stack,P}f&&f.length>0&&console.warn("Val encountered validation errors:",f),p.useEffect(()=>{s(e?`/${e}`:l)},[e]);const[h,m]=p.useState(null);p.useEffect(()=>{try{new WebSocket(`${window.location.origin.replace("http://","ws://")}/_next/webpack-hmr`).addEventListener("message",P=>{let D;try{D=JSON.parse(P.data)}catch{console.error("Failed to parse HMR")}typeof(D==null?void 0:D.hash)=="string"&&(D==null?void 0:D.action)==="built"&&m(D.hash)})}catch(L){console.warn("Failed to initialize HMR",L)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),t.getTree({patch:!0,includeSchema:!0,includeSource:!0}).then(L=>{Lo.isOk(L)?r(L.value.modules):(o("Could not load modules: "+L.error.message),console.error(L.error))})},[h]);const g=h3(t),w=Jv(),[v,y]=h5(),{patches:x,setPatchResetId:S}=f5(g,t),b=re.useRef(null),T=p.useCallback(L=>async P=>{const[D,B]=jn.splitModuleIdAndModulePath(L),oe=await P(jn.createPatchJSONPath(B));return t.postPatches(D,oe).then(H=>{if(Lo.isErr(H))throw H.error;if(!h)return S(Z=>Z+1),t.getTree({treePath:D,patch:!0,includeSchema:!0,includeSource:!0}).then(Z=>{Lo.isOk(Z)?r(C=>({...C,...Z.value.modules})):(o("Could not load modules: "+Z.error.message),console.error(Z.error))})}).catch(H=>{console.error(H)})},[]);return _.jsx(_C.Provider,{value:{theme:v,setTheme:y,api:t,editMode:"full",session:g,highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:_.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":v,children:[_.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:_.jsx(c5,{api:t,patches:x,onCommit:()=>S(L=>L+1)})}),_.jsx("div",{id:"val-fullscreen-hover",ref:b}),_.jsx(Gk.Provider,{value:{hoverElem:b==null?void 0:b.current},children:_.jsx("div",{className:"text-primary bg-background",children:_.jsxs(Ea,{children:[_.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:_.jsx(kk,{})}),_.jsx(Sa,{className:"px-4",children:n?_.jsx(LI,{paths:Object.keys(n),setSelectedModuleId:L=>{w(L)}}):!i&&_.jsx("div",{className:"py-4",children:"Loading..."})}),_.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[_.jsx("button",{onClick:()=>{history.back()},children:_.jsx(e5,{})}),_.jsx("p",{children:l||"/"})]}),_.jsxs("div",{className:"p-4",children:[i&&_.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",i]}),n&&l&&a&&u!==void 0&&c!==void 0&&_.jsx(Zk.Provider,{value:n,children:_.jsx(TI,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:T})})]})]})})})]})})},Gk=re.createContext({hoverElem:null}),$I=()=>re.useContext(Gk);function TI({path:t,source:e,schema:n,setSelectedPath:r,initOnSubmit:i}){const[,o]=jn.splitModuleIdAndModulePath(t),l=jn.resolvePath(o,e,n);if(!l)throw Error("Could not resolve module: "+t);return _.jsx(Yk,{path:t,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:i,top:!0})}function Yk({path:t,source:e,schema:n,setSelectedPath:r,field:i,initOnSubmit:o,top:l}){return e===null||n.opt?_.jsx(PI,{path:t,source:e,schema:n,field:i,initOnSubmit:o,setSelectedPath:r}):n.type==="object"?typeof e!="object"||La(e)?_.jsxs("div",{children:["ERROR: expected object, but found ",typeof e]}):_.jsx(Xk,{source:e,path:t,schema:n,initOnSubmit:o,setSelectedPath:r,top:l}):n.type==="array"?typeof e!="object"||!La(e)?_.jsxs("div",{children:["ERROR: expected array, but found ",typeof e]}):_.jsx(Qk,{source:e,path:t,schema:n,setSelectedPath:r}):n.type==="record"?typeof e!="object"?_.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof e]}):La(e)?_.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):_.jsx(NI,{source:e,path:t,schema:n,setSelectedPath:r}):_.jsxs("div",{className:"py-2 gap-y-4",children:[_.jsx("div",{className:"text-left",children:i||t}),_.jsx(Ck,{path:t,disabled:!1,source:e,schema:n,onSubmit:o(t)})]})}function Xk({path:t,source:e,schema:n,setSelectedPath:r,initOnSubmit:i,top:o}){return _.jsx("div",{className:_f("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!o}),children:Object.entries(n.items).map(([l,s])=>{const a=bu(t,l);return _.jsx(Yk,{path:a,source:e[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:i},a)})},t)}function NI({path:t,source:e,schema:n,setSelectedPath:r}){const i=Jv();return _.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(e).map(([o,l])=>{const s=bu(t,o);return _.jsx("button",{onClick:()=>{r(s),i(s)},children:_.jsx(RI,{recordKey:o,path:s,source:l,schema:n.item})},s)})},t)}const Xg=170;function RI({recordKey:t,path:e,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=Xg&&l(!0)},[]),_.jsxs(Yv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Xg},children:[_.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:t}),_.jsx("div",{className:"text-xs",children:_.jsx(qv,{path:e,source:n,schema:r})}),o&&_.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},e)}function Qk({path:t,source:e,schema:n,setSelectedPath:r}){const i=Jv();return _.jsx("div",{className:"flex flex-col gap-4 p-2",children:e.map((o,l)=>{const s=bu(t,l);return _.jsx("button",{onClick:()=>{r(s),i(s)},children:_.jsx(OI,{index:l,path:s,source:o,schema:n.item},s)},s)})},t)}const y_=Xg;function OI({index:t,path:e,source:n,schema:r}){const i=re.useRef(null),[o,l]=p.useState(!1);return p.useEffect(()=>{i.current&&i.current.getBoundingClientRect().height>=y_&&l(!0)},[]),_.jsxs(Yv,{ref:i,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:y_},children:[_.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:t+1<10?`0${t+1}`:t+1}),_.jsx("div",{className:"text-xs",children:_.jsx(qv,{path:e,source:n,schema:r})}),o&&_.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function bu(t,e){const n=jn.createValPathOfItem(t,e);if(!n)throw Error(`Could not create val path: ${t} of ${e==null?void 0:e.toString()}`);return n}function qv({path:t,source:e,schema:n}){const[r,i]=p.useState(null),{hoverElem:o}=$I();if(n.type==="object")return _.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>_.jsxs(p.Fragment,{children:[_.jsxs("span",{className:"text-muted",children:[l,":"]}),_.jsx("span",{children:_.jsx(qv,{source:(e==null?void 0:e[l])??null,schema:n.items[l],path:bu(t,l)})})]},bu(t,l)))},t);if(n.type==="array")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):Array.isArray(e)?_.jsxs("span",{children:[_.jsx("span",{className:"text-accent",children:e.length}),_.jsx("span",{children:e.length===1?" item":" items"})]},t):_.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},t);if(n.type==="richtext")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):typeof e!="object"?_.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof e," not an object"]},t):!(nn in e)||e[nn]!=="richtext"?_.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},t):_.jsx(II,{children:$S(e)},t);if(n.type==="string")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):_.jsx("span",{children:e});if(n.type==="image"){if(e===null)return _.jsx("span",{className:"text-accent",children:"Empty"},t);if(typeof e!="object")return _.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},t);if(!(Rn in e)||typeof e[Rn]!="string")return _.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},t);const l=jn.convertFileSource(e).url;return _.jsxs("span",{onMouseOver:s=>{i({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{i(null)},className:"relative flex items-center justify-start gap-1",children:[_.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:e[Rn]}),r&&o&&Gr.createPortal(_.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),o)]},t)}else{if(n.type==="boolean")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):_.jsx("span",{className:"text-accent",children:e?"true":"false"},t);if(n.type==="number")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):_.jsx("span",{className:"text-accent",children:e.toString()});if(n.type==="keyOf")return e===null?_.jsx("span",{className:"text-accent",children:"Empty"},t):_.jsx("span",{className:"text-accent",children:e.toString()},t)}return _.jsxs("div",{children:["TODO: ",n.type]},t)}function PI({path:t,source:e,schema:n,setSelectedPath:r,initOnSubmit:i,field:o}){const[l,s]=p.useState(e!==null);return _.jsxs("div",{className:"flex flex-col gap-y-6",children:[o?_.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[_.jsx(Hg,{checked:l,onClick:()=>{s(a=>!a)}}),_.jsx("span",{children:o})]}):_.jsx(Hg,{checked:l,onClick:()=>{s(a=>!a)}}),l&&_.jsx(AI,{source:e,schema:n,path:t,setSelectedPath:r,initOnSubmit:i})]},t)}function AI({source:t,path:e,schema:n,setSelectedPath:r,initOnSubmit:i}){if(n.type==="array"){if(typeof t=="object"&&(t===null||La(t)))return _.jsx(Qk,{source:t===null?[]:t,path:e,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof t=="object"&&(t===null||!La(t)))return _.jsx(Xk,{source:t,path:e,schema:n,setSelectedPath:r,initOnSubmit:i})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return _.jsx(Ck,{path:e,disabled:!1,source:t,schema:n,onSubmit:i(e)},e);return _.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof t," for schema type"," ",n.type]})}function La(t){return Array.isArray(t)}function MI(t){const e={};return t.forEach(n=>{const r=n.split("/").filter(o=>o!=="");let i=e;r.forEach(o=>{i[o]||(i[o]={}),i=i[o]})}),e}function LI({paths:t,setSelectedModuleId:e}){const n=MI(t);return _.jsx(vS,{children:Object.entries(n).map(([r,i])=>_.jsx("div",{className:"px-4 py-2",children:_.jsx(Jk,{name:r,tree:i,moduleId:`/${r}`,setSelectedModuleId:e})},`/${r}`))})}function Jk({name:t,tree:e,moduleId:n,setSelectedModuleId:r}){return _.jsxs("div",{children:[_.jsx("button",{onClick:()=>{r(n)},children:t}),Object.entries(e).map(([i,o])=>_.jsx("div",{className:"px-4 py-1",children:_.jsx(Jk,{name:i,tree:o,moduleId:`${n}/${i}`,setSelectedModuleId:r})},`${n}/${i}`))]})}const x_={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 II({children:t}){const e=t;function n(o,l){const s=x_.tags[o];return s&&l?[l,s].join(" "):s||l}function r(o,l){const s=x_.classes[o];return s&&l?[l,s].join(" "):s||l}function i(o,l){var u,c;if(typeof o=="string")return o;if(o.tag==="p")return _.jsx("p",{className:n("p"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="img")return _.jsx("img",{className:n("img"),src:o.src},l);if(o.tag==="ul")return _.jsx("ul",{className:n("ul"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="ol")return _.jsx("ol",{className:n("ol"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="li")return _.jsx("li",{className:n("li"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="span")return _.jsx("span",{className:o.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h1")return _.jsx("h1",{className:n("h1"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h2")return _.jsx("h2",{className:n("h2"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h3")return _.jsx("h3",{className:n("h3"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h4")return _.jsx("h4",{className:n("h4"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h5")return _.jsx("h5",{className:n("h5"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="h6")return _.jsx("h6",{className:n("h6"),children:o.children.map((d,f)=>i(d,f))},l);if(o.tag==="br")return _.jsx("br",{},l);if(o.tag==="a")return _.jsx("a",{href:o.href,children:o.children.map((d,f)=>i(d,f))},l);console.error("Unknown tag",o.tag);const a=o.tag;return a!=null&&a.tag?re.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(i)}):null}return _.jsx("span",{"data-val-path":e.valPath,children:e.children.map((o,l)=>i(o,l))})}const DI=p.createContext(null),Yh={didCatch:!1,error:null};class jI extends p.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Yh}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,r,i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Yh)}}componentDidCatch(e,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&zI(e.resetKeys,i)){var o,l;(o=(l=this.props).onReset)===null||o===void 0||o.call(l,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(Yh)}}render(){const{children:e,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:l}=this.state;let s=e;if(o){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(i))s=i;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(DI.Provider,{value:{didCatch:o,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function zI(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}const qk="Collapsible",[FI,eb]=ol(qk),[BI,ey]=FI(qk),UI=p.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...s}=t,[a=!1,u]=ms({prop:r,defaultProp:i,onChange:l});return p.createElement(BI,{scope:n,disabled:o,contentId:Df(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(Ke.div,ie({"data-state":ty(a),"data-disabled":o?"":void 0},s,{ref:e})))}),WI="CollapsibleTrigger",VI=p.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=ey(WI,n);return p.createElement(Ke.button,ie({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ty(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},r,{ref:e,onClick:nt(t.onClick,i.onOpenToggle)}))}),tb="CollapsibleContent",HI=p.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ey(tb,t.__scopeCollapsible);return p.createElement(Ss,{present:n||i.open},({present:o})=>p.createElement(KI,ie({},r,{ref:e,present:o})))}),KI=p.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=t,l=ey(tb,n),[s,a]=p.useState(r),u=p.useRef(null),c=st(e,u),d=p.useRef(0),f=d.current,h=p.useRef(0),m=h.current,g=l.open||s,w=p.useRef(g),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(y)},[]),Un(()=>{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,w.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(Ke.div,ie({"data-state":ty(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!g},o,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...t.style}}),g&&i)});function ty(t){return t?"open":"closed"}const ZI=UI,GI=VI,YI=HI,xo="Accordion",XI=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ny,QI,JI]=LC(xo),[Gf,MD]=ol(xo,[JI,eb]),ry=eb(),nb=re.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,o=r;return re.createElement(ny.Provider,{scope:t.__scopeAccordion},n==="multiple"?re.createElement(nD,ie({},o,{ref:e})):re.createElement(tD,ie({},i,{ref:e})))});nb.propTypes={type(t){const e=t.value||t.defaultValue;return t.type&&!["single","multiple"].includes(t.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):t.type==="multiple"&&typeof e=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):t.type==="single"&&Array.isArray(e)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[rb,qI]=Gf(xo),[ib,eD]=Gf(xo,{collapsible:!1}),tD=re.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:o=!1,...l}=t,[s,a]=ms({prop:n,defaultProp:r,onChange:i});return re.createElement(rb,{scope:t.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:re.useCallback(()=>o&&a(""),[o,a])},re.createElement(ib,{scope:t.__scopeAccordion,collapsible:o},re.createElement(ob,ie({},l,{ref:e}))))}),nD=re.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...o}=t,[l=[],s]=ms({prop:n,defaultProp:r,onChange:i}),a=re.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=re.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return re.createElement(rb,{scope:t.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},re.createElement(ib,{scope:t.__scopeAccordion,collapsible:!0},re.createElement(ob,ie({},o,{ref:e}))))}),[rD,Yf]=Gf(xo),ob=re.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:o="vertical",...l}=t,s=re.useRef(null),a=st(s,e),u=QI(n),d=Xm(i)==="ltr",f=nt(t.onKeyDown,h=>{var m;if(!XI.includes(h.key))return;const g=h.target,w=u().filter(L=>{var P;return!((P=L.ref.current)!==null&&P!==void 0&&P.disabled)}),v=w.findIndex(L=>L.ref.current===g),y=w.length;if(v===-1)return;h.preventDefault();let x=v;const S=0,b=y-1,T=()=>{x=v+1,x>b&&(x=S)},$=()=>{x=v-1,x<S&&(x=b)};switch(h.key){case"Home":x=S;break;case"End":x=b;break;case"ArrowRight":o==="horizontal"&&(d?T():$());break;case"ArrowDown":o==="vertical"&&T();break;case"ArrowLeft":o==="horizontal"&&(d?$():T());break;case"ArrowUp":o==="vertical"&&$();break}const O=x%y;(m=w[O].ref.current)===null||m===void 0||m.focus()});return re.createElement(rD,{scope:n,disabled:r,direction:i,orientation:o},re.createElement(ny.Slot,{scope:n},re.createElement(Ke.div,ie({},l,{"data-orientation":o,ref:a,onKeyDown:r?void 0:f}))))}),Qg="AccordionItem",[iD,iy]=Gf(Qg),oD=re.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,o=Yf(Qg,n),l=qI(Qg,n),s=ry(n),a=Df(),u=r&&l.value.includes(r)||!1,c=o.disabled||t.disabled;return re.createElement(iD,{scope:n,open:u,disabled:c,triggerId:a},re.createElement(ZI,ie({"data-orientation":o.orientation,"data-state":lb(u)},s,i,{ref:e,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),lD="AccordionHeader",sD=re.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Yf(xo,n),o=iy(lD,n);return re.createElement(Ke.h3,ie({"data-orientation":i.orientation,"data-state":lb(o.open),"data-disabled":o.disabled?"":void 0},r,{ref:e}))}),__="AccordionTrigger",aD=re.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Yf(xo,n),o=iy(__,n),l=eD(__,n),s=ry(n);return re.createElement(ny.ItemSlot,{scope:n},re.createElement(GI,ie({"aria-disabled":o.open&&!l.collapsible||void 0,"data-orientation":i.orientation,id:o.triggerId},s,r,{ref:e})))}),uD="AccordionContent",cD=re.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=Yf(xo,n),o=iy(uD,n),l=ry(n);return re.createElement(YI,ie({role:"region","aria-labelledby":o.triggerId,"data-orientation":i.orientation},l,r,{ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}}))});function lb(t){return t?"open":"closed"}const dD=nb,fD=oD,hD=sD,sb=aD,ab=cD,pD=dD,ub=p.forwardRef(({className:t,...e},n)=>_.jsx(fD,{ref:n,className:xt("border-b",t),...e}));ub.displayName="AccordionItem";const cb=p.forwardRef(({className:t,children:e,...n},r)=>_.jsx(hD,{className:"flex",children:_.jsxs(sb,{ref:r,className:xt("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,_.jsx(bC,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));cb.displayName=sb.displayName;const db=p.forwardRef(({className:t,children:e,...n},r)=>_.jsx(ab,{ref:r,className:xt("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",t),...n,children:_.jsx("div",{className:"pt-0 pb-4",children:e})}));db.displayName=ab.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 tf(){return tf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tf.apply(this,arguments)}function gD(t,e){return QL({basename:e==null?void 0:e.basename,future:tf({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:xL({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||mD(),routes:t,mapRouteProperties:CI,window:e==null?void 0:e.window}).initialize()}function mD(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=tf({},e,{errors:vD(e.errors)})),e}function vD(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Xv(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let l=new o(i.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const yD=p.createContext({isTransitioning:!1}),xD=p.createContext(new Map),_D="startTransition",w_=M_[_D],wD="flushSync",S_=jT[wD];function SD(t){w_?w_(t):t()}function ia(t){S_?S_(t):t()}class ED{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function CD(t){let{fallbackElement:e,router:n,future:r}=t,[i,o]=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(),w=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback($=>{v?SD($):$()},[v]),x=p.useCallback(($,O)=>{let{deletedFetchers:L,unstable_flushSync:P,unstable_viewTransitionOpts:D}=O;L.forEach(oe=>w.current.delete(oe)),$.fetchers.forEach((oe,H)=>{oe.data!==void 0&&w.current.set(H,oe.data)});let B=n.window==null||typeof n.window.document.startViewTransition!="function";if(!D||B){P?ia(()=>o($)):y(()=>o($));return}if(P){ia(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:D.currentLocation,nextLocation:D.nextLocation})});let oe=n.window.document.startViewTransition(()=>{ia(()=>o($))});oe.finished.finally(()=>{ia(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})})}),ia(()=>h(oe));return}f?(c&&c.resolve(),f.skipTransition(),g({state:$,currentLocation:D.currentLocation,nextLocation:D.nextLocation})):(s($),u({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}))},[n.window,f,c,w,y]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{a.isTransitioning&&!a.flushSync&&d(new ED)},[a]),p.useEffect(()=>{if(c&&l&&n.window){let $=l,O=c.promise,L=n.window.document.startViewTransition(async()=>{y(()=>o($)),await O});L.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(L)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&i.location.key===l.location.key&&c.resolve()},[c,f,i.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:$=>n.navigate($),push:($,O,L)=>n.navigate($,{state:O,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:($,O,L)=>n.navigate($,{replace:!0,state:O,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),b=n.basename||"/",T=p.useMemo(()=>({router:n,navigator:S,static:!1,basename:b}),[n,S,b]);return p.createElement(p.Fragment,null,p.createElement(Vf.Provider,{value:T},p.createElement(Bk.Provider,{value:i},p.createElement(xD.Provider,{value:w.current},p.createElement(yD.Provider,{value:a},p.createElement(EI,{basename:b,location:i.location,navigationType:i.historyAction,navigator:S},i.initialized?p.createElement(kD,{routes:n.routes,state:i}):e))))),null)}function kD(t){let{routes:e,state:n}=t;return fI(e,void 0,n)}var E_;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(E_||(E_={}));var C_;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(C_||(C_={}));function bD({error:t,resetErrorBoundary:e}){return console.error(t),_.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:_.jsx("div",{className:"w-full h-full p-10",children:_.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[_.jsx(kk,{})," encountered an error"]}),_.jsx("button",{onClick:e,children:_.jsx(u5,{})})]}),_.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),_.jsx("pre",{children:t.message}),t.stack&&_.jsx(pD,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:_.jsxs(ub,{value:"error",children:[_.jsx(cb,{children:"Stack trace:"}),_.jsx(db,{className:"p-4 bg-popover text-popover-foreground",children:t.stack&&_.jsx("pre",{children:t.stack})})]})})]})})})}function $D(){const t=gD([{path:"/*",element:_.jsx(jI,{fallbackRender:bD,children:_.jsx(bI,{api:new ZN("/api/val")})})}],{basename:"/api/val/static/edit"});return _.jsx(CD,{router:t})}Xh.createRoot(document.getElementById("root")).render(re.createElement(re.StrictMode,null,re.createElement($D,null)));