@nickmeriano/task 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/author.d.ts +17 -0
- package/dist/author.d.ts.map +1 -0
- package/dist/author.js +52 -0
- package/dist/author.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +415 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +14 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +292 -0
- package/dist/server.js.map +1 -0
- package/dist/store.d.ts +63 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +346 -0
- package/dist/store.js.map +1 -0
- package/dist/types.d.ts +61 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +81 -0
- package/skill/SKILL.md +109 -0
- package/src/author.ts +57 -0
- package/src/cli.ts +419 -0
- package/src/index.ts +6 -0
- package/src/server.ts +311 -0
- package/src/store.ts +418 -0
- package/src/types.ts +75 -0
- package/ui/dist/assets/index-BopXdeSy.js +229 -0
- package/ui/dist/assets/index-Cl_P2tLU.css +1 -0
- package/ui/dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/ui/dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/ui/dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/ui/dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/ui/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/ui/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/ui/dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/ui/dist/icon.svg +4 -0
- package/ui/dist/index.html +21 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
(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 a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).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 Tk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var N4={exports:{}},$u={};var PE;function _P(){if(PE)return $u;PE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:o}}return $u.Fragment=e,$u.jsx=n,$u.jsxs=n,$u}var OE;function jP(){return OE||(OE=1,N4.exports=_P()),N4.exports}var B=jP(),L4={exports:{}},Te={};var NE;function HP(){if(NE)return Te;NE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=g&&L[g]||L["@@iterator"],typeof L=="function"?L:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function D(L,V,ne){this.props=L,this.context=V,this.refs=E,this.updater=ne||v}D.prototype.isReactComponent={},D.prototype.setState=function(L,V){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,V,"setState")},D.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function w(){}w.prototype=D.prototype;function $(L,V,ne){this.props=L,this.context=V,this.refs=E,this.updater=ne||v}var T=$.prototype=new w;T.constructor=$,C(T,D.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function I(L,V,ne){var le=ne.ref;return{$$typeof:t,type:L,key:V,ref:le!==void 0?le:null,props:ne}}function G(L,V){return I(L.type,V,L.props)}function J(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function U(L){var V={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ne){return V[ne]})}var ie=/\/+/g;function F(L,V){return typeof L=="object"&&L!==null&&L.key!=null?U(""+L.key):V.toString(36)}function te(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(O,O):(L.status="pending",L.then(function(V){L.status==="pending"&&(L.status="fulfilled",L.value=V)},function(V){L.status==="pending"&&(L.status="rejected",L.reason=V)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function N(L,V,ne,le,ue){var fe=typeof L;(fe==="undefined"||fe==="boolean")&&(L=null);var Ee=!1;if(L===null)Ee=!0;else switch(fe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(L.$$typeof){case t:case e:Ee=!0;break;case h:return Ee=L._init,N(Ee(L._payload),V,ne,le,ue)}}if(Ee)return ue=ue(L),Ee=le===""?"."+F(L,0):le,A(ue)?(ne="",Ee!=null&&(ne=Ee.replace(ie,"$&/")+"/"),N(ue,V,ne,"",function(En){return En})):ue!=null&&(J(ue)&&(ue=G(ue,ne+(ue.key==null||L&&L.key===ue.key?"":(""+ue.key).replace(ie,"$&/")+"/")+Ee)),V.push(ue)),1;Ee=0;var Ve=le===""?".":le+":";if(A(L))for(var Se=0;Se<L.length;Se++)le=L[Se],fe=Ve+F(le,Se),Ee+=N(le,V,ne,fe,ue);else if(Se=b(L),typeof Se=="function")for(L=Se.call(L),Se=0;!(le=L.next()).done;)le=le.value,fe=Ve+F(le,Se++),Ee+=N(le,V,ne,fe,ue);else if(fe==="object"){if(typeof L.then=="function")return N(te(L),V,ne,le,ue);throw V=String(L),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(L,V,ne){if(L==null)return L;var le=[],ue=0;return N(L,le,"","",function(fe){return V.call(ne,fe,ue++)}),le}function Y(L){if(L._status===-1){var V=L._result;V=V(),V.then(function(ne){(L._status===0||L._status===-1)&&(L._status=1,L._result=ne)},function(ne){(L._status===0||L._status===-1)&&(L._status=2,L._result=ne)}),L._status===-1&&(L._status=0,L._result=V)}if(L._status===1)return L._result.default;throw L._result}var Z=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},j={map:K,forEach:function(L,V,ne){K(L,function(){V.apply(this,arguments)},ne)},count:function(L){var V=0;return K(L,function(){V++}),V},toArray:function(L){return K(L,function(V){return V})||[]},only:function(L){if(!J(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Te.Activity=m,Te.Children=j,Te.Component=D,Te.Fragment=n,Te.Profiler=i,Te.PureComponent=$,Te.StrictMode=r,Te.Suspense=c,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Te.__COMPILER_RUNTIME={__proto__:null,c:function(L){return M.H.useMemoCache(L)}},Te.cache=function(L){return function(){return L.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(L,V,ne){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var le=C({},L.props),ue=L.key;if(V!=null)for(fe in V.key!==void 0&&(ue=""+V.key),V)!P.call(V,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&V.ref===void 0||(le[fe]=V[fe]);var fe=arguments.length-2;if(fe===1)le.children=ne;else if(1<fe){for(var Ee=Array(fe),Ve=0;Ve<fe;Ve++)Ee[Ve]=arguments[Ve+2];le.children=Ee}return I(L.type,ue,le)},Te.createContext=function(L){return L={$$typeof:a,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Te.createElement=function(L,V,ne){var le,ue={},fe=null;if(V!=null)for(le in V.key!==void 0&&(fe=""+V.key),V)P.call(V,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ue[le]=V[le]);var Ee=arguments.length-2;if(Ee===1)ue.children=ne;else if(1<Ee){for(var Ve=Array(Ee),Se=0;Se<Ee;Se++)Ve[Se]=arguments[Se+2];ue.children=Ve}if(L&&L.defaultProps)for(le in Ee=L.defaultProps,Ee)ue[le]===void 0&&(ue[le]=Ee[le]);return I(L,fe,ue)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(L){return{$$typeof:u,render:L}},Te.isValidElement=J,Te.lazy=function(L){return{$$typeof:h,_payload:{_status:-1,_result:L},_init:Y}},Te.memo=function(L,V){return{$$typeof:f,type:L,compare:V===void 0?null:V}},Te.startTransition=function(L){var V=M.T,ne={};M.T=ne;try{var le=L(),ue=M.S;ue!==null&&ue(ne,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(O,Z)}catch(fe){Z(fe)}finally{V!==null&&ne.types!==null&&(V.types=ne.types),M.T=V}},Te.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Te.use=function(L){return M.H.use(L)},Te.useActionState=function(L,V,ne){return M.H.useActionState(L,V,ne)},Te.useCallback=function(L,V){return M.H.useCallback(L,V)},Te.useContext=function(L){return M.H.useContext(L)},Te.useDebugValue=function(){},Te.useDeferredValue=function(L,V){return M.H.useDeferredValue(L,V)},Te.useEffect=function(L,V){return M.H.useEffect(L,V)},Te.useEffectEvent=function(L){return M.H.useEffectEvent(L)},Te.useId=function(){return M.H.useId()},Te.useImperativeHandle=function(L,V,ne){return M.H.useImperativeHandle(L,V,ne)},Te.useInsertionEffect=function(L,V){return M.H.useInsertionEffect(L,V)},Te.useLayoutEffect=function(L,V){return M.H.useLayoutEffect(L,V)},Te.useMemo=function(L,V){return M.H.useMemo(L,V)},Te.useOptimistic=function(L,V){return M.H.useOptimistic(L,V)},Te.useReducer=function(L,V,ne){return M.H.useReducer(L,V,ne)},Te.useRef=function(L){return M.H.useRef(L)},Te.useState=function(L){return M.H.useState(L)},Te.useSyncExternalStore=function(L,V,ne){return M.H.useSyncExternalStore(L,V,ne)},Te.useTransition=function(){return M.H.useTransition()},Te.version="19.2.4",Te}var LE;function jc(){return LE||(LE=1,L4.exports=HP()),L4.exports}var k=jc();const H=Tk(k);var z4={exports:{}},wu={},I4={exports:{}},F4={};var zE;function VP(){return zE||(zE=1,(function(t){function e(N,K){var Y=N.length;N.push(K);e:for(;0<Y;){var Z=Y-1>>>1,j=N[Z];if(0<i(j,K))N[Z]=K,N[Y]=j,Y=Z;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var K=N[0],Y=N.pop();if(Y!==K){N[0]=Y;e:for(var Z=0,j=N.length,L=j>>>1;Z<L;){var V=2*(Z+1)-1,ne=N[V],le=V+1,ue=N[le];if(0>i(ne,Y))le<j&&0>i(ue,ne)?(N[Z]=ue,N[le]=Y,Z=le):(N[Z]=ne,N[V]=Y,Z=V);else if(le<j&&0>i(ue,Y))N[Z]=ue,N[le]=Y,Z=le;else break e}}return K}function i(N,K){var Y=N.sortIndex-K.sortIndex;return Y!==0?Y:N.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();t.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,m=null,g=3,b=!1,v=!1,C=!1,E=!1,D=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function T(N){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=N)r(f),K.sortIndex=K.expirationTime,e(c,K);else break;K=n(f)}}function A(N){if(C=!1,T(N),!v)if(n(c)!==null)v=!0,O||(O=!0,U());else{var K=n(f);K!==null&&te(A,K.startTime-N)}}var O=!1,M=-1,P=5,I=-1;function G(){return E?!0:!(t.unstable_now()-I<P)}function J(){if(E=!1,O){var N=t.unstable_now();I=N;var K=!0;try{e:{v=!1,C&&(C=!1,w(M),M=-1),b=!0;var Y=g;try{t:{for(T(N),m=n(c);m!==null&&!(m.expirationTime>N&&G());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,g=m.priorityLevel;var j=Z(m.expirationTime<=N);if(N=t.unstable_now(),typeof j=="function"){m.callback=j,T(N),K=!0;break t}m===n(c)&&r(c),T(N)}else r(c);m=n(c)}if(m!==null)K=!0;else{var L=n(f);L!==null&&te(A,L.startTime-N),K=!1}}break e}finally{m=null,g=Y,b=!1}K=void 0}}finally{K?U():O=!1}}}var U;if(typeof $=="function")U=function(){$(J)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,F=ie.port2;ie.port1.onmessage=J,U=function(){F.postMessage(null)}}else U=function(){D(J,0)};function te(N,K){M=D(function(){N(t.unstable_now())},K)}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(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(N){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var Y=g;g=K;try{return N()}finally{g=Y}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(N,K){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var Y=g;g=N;try{return K()}finally{g=Y}},t.unstable_scheduleCallback=function(N,K,Y){var Z=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?Z+Y:Z):Y=Z,N){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=Y+j,N={id:h++,callback:K,priorityLevel:N,startTime:Y,expirationTime:j,sortIndex:-1},Y>Z?(N.sortIndex=Y,e(f,N),n(c)===null&&N===n(f)&&(C?(w(M),M=-1):C=!0,te(A,Y-Z))):(N.sortIndex=j,e(c,N),v||b||(v=!0,O||(O=!0,U()))),N},t.unstable_shouldYield=G,t.unstable_wrapCallback=function(N){var K=g;return function(){var Y=g;g=K;try{return N.apply(this,arguments)}finally{g=Y}}}})(F4)),F4}var IE;function UP(){return IE||(IE=1,I4.exports=VP()),I4.exports}var K4={exports:{}},sn={};var FE;function qP(){if(FE)return sn;FE=1;var t=jc();function e(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:c,containerInfo:f,implementation:h}}var a=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,sn.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(c,f,null,h)},sn.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},sn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},sn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},sn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:b}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:g,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},sn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},sn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},sn.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},sn.requestFormReset=function(c){r.d.r(c)},sn.unstable_batchedUpdates=function(c,f){return c(f)},sn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},sn.useFormStatus=function(){return a.H.useHostTransitionStatus()},sn.version="19.2.4",sn}var KE;function Ak(){if(KE)return K4.exports;KE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),K4.exports=qP(),K4.exports}var _E;function GP(){if(_E)return wu;_E=1;var t=UP(),e=jc(),n=Ak();function r(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function a(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function c(s){if(o(s)!==s)throw Error(r(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(r(188));return l!==s?null:s}for(var d=s,p=l;;){var y=d.return;if(y===null)break;var x=y.alternate;if(x===null){if(p=y.return,p!==null){d=p;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===d)return c(y),s;if(x===p)return c(y),l;x=x.sibling}throw Error(r(188))}if(d.return!==p.return)d=y,p=x;else{for(var S=!1,R=y.child;R;){if(R===d){S=!0,d=y,p=x;break}if(R===p){S=!0,p=y,d=x;break}R=R.sibling}if(!S){for(R=x.child;R;){if(R===d){S=!0,d=x,p=y;break}if(R===p){S=!0,p=x,d=y;break}R=R.sibling}if(!S)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),$=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function U(s){return s===null||typeof s!="object"?null:(s=J&&s[J]||s["@@iterator"],typeof s=="function"?s:null)}var ie=Symbol.for("react.client.reference");function F(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===ie?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case D:return"Profiler";case E:return"StrictMode";case A:return"Suspense";case O:return"SuspenseList";case I:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case v:return"Portal";case $:return s.displayName||"Context";case w:return(s._context.displayName||"Context")+".Consumer";case T:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return l=s.displayName||null,l!==null?l:F(s.type)||"Memo";case P:l=s._payload,s=s._init;try{return F(s(l))}catch{}}return null}var te=Array.isArray,N=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},Z=[],j=-1;function L(s){return{current:s}}function V(s){0>j||(s.current=Z[j],Z[j]=null,j--)}function ne(s,l){j++,Z[j]=s.current,s.current=l}var le=L(null),ue=L(null),fe=L(null),Ee=L(null);function Ve(s,l){switch(ne(fe,l),ne(ue,s),ne(le,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?nE(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=nE(l),s=rE(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(le),ne(le,s)}function Se(){V(le),V(ue),V(fe)}function En(s){s.memoizedState!==null&&ne(Ee,s);var l=le.current,d=rE(l,s.type);l!==d&&(ne(ue,s),ne(le,d))}function rn(s){ue.current===s&&(V(le),V(ue)),Ee.current===s&&(V(Ee),Eu._currentValue=Y)}var hn,mr;function Ft(s){if(hn===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);hn=l&&l[1]||"",mr=-1<d.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+hn+s+mr}var Yo=!1;function Ie(s,l){if(!s||Yo)return"";Yo=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var X=ee}Reflect.construct(s,[],se)}else{try{se.call()}catch(ee){X=ee}s.call(se.prototype)}}else{try{throw Error()}catch(ee){X=ee}(se=s())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&X&&typeof ee.stack=="string")return[ee.stack,X.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=p.DetermineComponentFrameRoot(),S=x[0],R=x[1];if(S&&R){var z=S.split(`
|
|
4
|
+
`),Q=R.split(`
|
|
5
|
+
`);for(y=p=0;p<z.length&&!z[p].includes("DetermineComponentFrameRoot");)p++;for(;y<Q.length&&!Q[y].includes("DetermineComponentFrameRoot");)y++;if(p===z.length||y===Q.length)for(p=z.length-1,y=Q.length-1;1<=p&&0<=y&&z[p]!==Q[y];)y--;for(;1<=p&&0<=y;p--,y--)if(z[p]!==Q[y]){if(p!==1||y!==1)do if(p--,y--,0>y||z[p]!==Q[y]){var re=`
|
|
6
|
+
`+z[p].replace(" at new "," at ");return s.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",s.displayName)),re}while(1<=p&&0<=y);break}}}finally{Yo=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?Ft(d):""}function Oi(s,l){switch(s.tag){case 26:case 27:case 5:return Ft(s.type);case 16:return Ft("Lazy");case 13:return s.child!==l&&l!==null?Ft("Suspense Fallback"):Ft("Suspense");case 19:return Ft("SuspenseList");case 0:case 15:return Ie(s.type,!1);case 11:return Ie(s.type.render,!1);case 1:return Ie(s.type,!0);case 31:return Ft("Activity");default:return""}}function Wr(s){try{var l="",d=null;do l+=Oi(s,d),d=s,s=s.return;while(s);return l}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var Xo=Object.prototype.hasOwnProperty,gr=t.unstable_scheduleCallback,Pl=t.unstable_cancelCallback,od=t.unstable_shouldYield,Em=t.unstable_requestPaint,on=t.unstable_now,it=t.unstable_getCurrentPriorityLevel,Ut=t.unstable_ImmediatePriority,Br=t.unstable_UserBlockingPriority,da=t.unstable_NormalPriority,E8=t.unstable_LowPriority,L1=t.unstable_IdlePriority,D8=t.log,k8=t.unstable_setDisableYieldValue,Ol=null,zn=null;function Ni(s){if(typeof D8=="function"&&k8(s),zn&&typeof zn.setStrictMode=="function")try{zn.setStrictMode(Ol,s)}catch{}}var In=Math.clz32?Math.clz32:w8,S8=Math.log,$8=Math.LN2;function w8(s){return s>>>=0,s===0?32:31-(S8(s)/$8|0)|0}var sd=256,ad=262144,ld=4194304;function Jo(s){var l=s&42;if(l!==0)return l;switch(s&-s){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function ud(s,l,d){var p=s.pendingLanes;if(p===0)return 0;var y=0,x=s.suspendedLanes,S=s.pingedLanes;s=s.warmLanes;var R=p&134217727;return R!==0?(p=R&~x,p!==0?y=Jo(p):(S&=R,S!==0?y=Jo(S):d||(d=R&~s,d!==0&&(y=Jo(d))))):(R=p&~x,R!==0?y=Jo(R):S!==0?y=Jo(S):d||(d=p&~s,d!==0&&(y=Jo(d)))),y===0?0:l!==0&&l!==y&&(l&x)===0&&(x=y&-y,d=l&-l,x>=d||x===32&&(d&4194048)!==0)?l:y}function Nl(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function T8(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function z1(){var s=ld;return ld<<=1,(ld&62914560)===0&&(ld=4194304),s}function Dm(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Ll(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function A8(s,l,d,p,y,x){var S=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var R=s.entanglements,z=s.expirationTimes,Q=s.hiddenUpdates;for(d=S&~d;0<d;){var re=31-In(d),se=1<<re;R[re]=0,z[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var ee=X[re];ee!==null&&(ee.lane&=-536870913)}d&=~se}p!==0&&I1(s,p,0),x!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=x&~(S&~l))}function I1(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var p=31-In(l);s.entangledLanes|=l,s.entanglements[p]=s.entanglements[p]|1073741824|d&261930}function F1(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var p=31-In(d),y=1<<p;y&l|s[p]&l&&(s[p]|=l),d&=~y}}function K1(s,l){var d=l&-l;return d=(d&42)!==0?1:km(d),(d&(s.suspendedLanes|l))!==0?0:d}function km(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Sm(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function _1(){var s=K.p;return s!==0?s:(s=window.event,s===void 0?32:$E(s.type))}function j1(s,l){var d=K.p;try{return K.p=s,l()}finally{K.p=d}}var Li=Math.random().toString(36).slice(2),qt="__reactFiber$"+Li,Dn="__reactProps$"+Li,fa="__reactContainer$"+Li,$m="__reactEvents$"+Li,B8="__reactListeners$"+Li,M8="__reactHandles$"+Li,H1="__reactResources$"+Li,zl="__reactMarker$"+Li;function wm(s){delete s[qt],delete s[Dn],delete s[$m],delete s[B8],delete s[M8]}function ha(s){var l=s[qt];if(l)return l;for(var d=s.parentNode;d;){if(l=d[fa]||d[qt]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=cE(s);s!==null;){if(d=s[qt])return d;s=cE(s)}return l}s=d,d=s.parentNode}return null}function pa(s){if(s=s[qt]||s[fa]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Il(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function ma(s){var l=s[H1];return l||(l=s[H1]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Kt(s){s[zl]=!0}var V1=new Set,U1={};function Zo(s,l){ga(s,l),ga(s+"Capture",l)}function ga(s,l){for(U1[s]=l,s=0;s<l.length;s++)V1.add(l[s])}var R8=RegExp("^[: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]*$"),q1={},G1={};function P8(s){return Xo.call(G1,s)?!0:Xo.call(q1,s)?!1:R8.test(s)?G1[s]=!0:(q1[s]=!0,!1)}function cd(s,l,d){if(P8(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function dd(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Qr(s,l,d,p){if(p===null)s.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+p)}}function Yn(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function W1(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function O8(s,l,d){var p=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,x=p.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return y.call(this)},set:function(S){d=""+S,x.call(this,S)}}),Object.defineProperty(s,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(S){d=""+S},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Tm(s){if(!s._valueTracker){var l=W1(s)?"checked":"value";s._valueTracker=O8(s,l,""+s[l])}}function Q1(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return s&&(p=W1(s)?s.checked?"true":"false":s.value),s=p,s!==d?(l.setValue(s),!0):!1}function fd(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var N8=/[\n"\\]/g;function Xn(s){return s.replace(N8,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Am(s,l,d,p,y,x,S,R){s.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?s.type=S:s.removeAttribute("type"),l!=null?S==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Yn(l)):s.value!==""+Yn(l)&&(s.value=""+Yn(l)):S!=="submit"&&S!=="reset"||s.removeAttribute("value"),l!=null?Bm(s,S,Yn(l)):d!=null?Bm(s,S,Yn(d)):p!=null&&s.removeAttribute("value"),y==null&&x!=null&&(s.defaultChecked=!!x),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?s.name=""+Yn(R):s.removeAttribute("name")}function Y1(s,l,d,p,y,x,S,R){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(s.type=x),l!=null||d!=null){if(!(x!=="submit"&&x!=="reset"||l!=null)){Tm(s);return}d=d!=null?""+Yn(d):"",l=l!=null?""+Yn(l):d,R||l===s.value||(s.value=l),s.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,s.checked=R?s.checked:!!p,s.defaultChecked=!!p,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.name=S),Tm(s)}function Bm(s,l,d){l==="number"&&fd(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function ba(s,l,d,p){if(s=s.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<s.length;d++)y=l.hasOwnProperty("$"+s[d].value),s[d].selected!==y&&(s[d].selected=y),y&&p&&(s[d].defaultSelected=!0)}else{for(d=""+Yn(d),l=null,y=0;y<s.length;y++){if(s[y].value===d){s[y].selected=!0,p&&(s[y].defaultSelected=!0);return}l!==null||s[y].disabled||(l=s[y])}l!==null&&(l.selected=!0)}}function X1(s,l,d){if(l!=null&&(l=""+Yn(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Yn(d):""}function J1(s,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(te(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=Yn(l),s.defaultValue=d,p=s.textContent,p===d&&p!==""&&p!==null&&(s.value=p),Tm(s)}function ya(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var L8=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Z1(s,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":p?s.setProperty(l,d):typeof d!="number"||d===0||L8.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function ev(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?s.setProperty(p,""):p==="float"?s.cssFloat="":s[p]="");for(var y in l)p=l[y],l.hasOwnProperty(y)&&d[y]!==p&&Z1(s,y,p)}else for(var x in l)l.hasOwnProperty(x)&&Z1(s,x,l[x])}function Mm(s){if(s.indexOf("-")===-1)return!1;switch(s){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 z8=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),I8=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hd(s){return I8.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Yr(){}var Rm=null;function Pm(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var va=null,xa=null;function tv(s){var l=pa(s);if(l&&(s=l.stateNode)){var d=s[Dn]||null;e:switch(s=l.stateNode,l.type){case"input":if(Am(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Xn(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==s&&p.form===s.form){var y=p[Dn]||null;if(!y)throw Error(r(90));Am(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===s.form&&Q1(p)}break e;case"textarea":X1(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ba(s,!!d.multiple,l,!1)}}}var Om=!1;function nv(s,l,d){if(Om)return s(l,d);Om=!0;try{var p=s(l);return p}finally{if(Om=!1,(va!==null||xa!==null)&&(ef(),va&&(l=va,s=xa,xa=va=null,tv(l),s)))for(l=0;l<s.length;l++)tv(s[l])}}function Fl(s,l){var d=s.stateNode;if(d===null)return null;var p=d[Dn]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nm=!1;if(Xr)try{var Kl={};Object.defineProperty(Kl,"passive",{get:function(){Nm=!0}}),window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Nm=!1}var zi=null,Lm=null,pd=null;function rv(){if(pd)return pd;var s,l=Lm,d=l.length,p,y="value"in zi?zi.value:zi.textContent,x=y.length;for(s=0;s<d&&l[s]===y[s];s++);var S=d-s;for(p=1;p<=S&&l[d-p]===y[x-p];p++);return pd=y.slice(s,1<p?1-p:void 0)}function md(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function gd(){return!0}function iv(){return!1}function kn(s){function l(d,p,y,x,S){this._reactName=d,this._targetInst=y,this.type=p,this.nativeEvent=x,this.target=S,this.currentTarget=null;for(var R in s)s.hasOwnProperty(R)&&(d=s[R],this[R]=d?d(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?gd:iv,this.isPropagationStopped=iv,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=gd)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=gd)},persist:function(){},isPersistent:gd}),l}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bd=kn(es),_l=m({},es,{view:0,detail:0}),F8=kn(_l),zm,Im,jl,yd=m({},_l,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Km,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==jl&&(jl&&s.type==="mousemove"?(zm=s.screenX-jl.screenX,Im=s.screenY-jl.screenY):Im=zm=0,jl=s),zm)},movementY:function(s){return"movementY"in s?s.movementY:Im}}),ov=kn(yd),K8=m({},yd,{dataTransfer:0}),_8=kn(K8),j8=m({},_l,{relatedTarget:0}),Fm=kn(j8),H8=m({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),V8=kn(H8),U8=m({},es,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),q8=kn(U8),G8=m({},es,{data:0}),sv=kn(G8),W8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q8={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"},Y8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X8(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=Y8[s])?!!l[s]:!1}function Km(){return X8}var J8=m({},_l,{key:function(s){if(s.key){var l=W8[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=md(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Q8[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Km,charCode:function(s){return s.type==="keypress"?md(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?md(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Z8=kn(J8),eR=m({},yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),av=kn(eR),tR=m({},_l,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Km}),nR=kn(tR),rR=m({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),iR=kn(rR),oR=m({},yd,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),sR=kn(oR),aR=m({},es,{newState:0,oldState:0}),lR=kn(aR),uR=[9,13,27,32],_m=Xr&&"CompositionEvent"in window,Hl=null;Xr&&"documentMode"in document&&(Hl=document.documentMode);var cR=Xr&&"TextEvent"in window&&!Hl,lv=Xr&&(!_m||Hl&&8<Hl&&11>=Hl),uv=" ",cv=!1;function dv(s,l){switch(s){case"keyup":return uR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fv(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ca=!1;function dR(s,l){switch(s){case"compositionend":return fv(l);case"keypress":return l.which!==32?null:(cv=!0,uv);case"textInput":return s=l.data,s===uv&&cv?null:s;default:return null}}function fR(s,l){if(Ca)return s==="compositionend"||!_m&&dv(s,l)?(s=rv(),pd=Lm=zi=null,Ca=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return lv&&l.locale!=="ko"?null:l.data;default:return null}}var hR={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 hv(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!hR[s.type]:l==="textarea"}function pv(s,l,d,p){va?xa?xa.push(p):xa=[p]:va=p,l=lf(l,"onChange"),0<l.length&&(d=new bd("onChange","change",null,d,p),s.push({event:d,listeners:l}))}var Vl=null,Ul=null;function pR(s){YC(s,0)}function vd(s){var l=Il(s);if(Q1(l))return s}function mv(s,l){if(s==="change")return l}var gv=!1;if(Xr){var jm;if(Xr){var Hm="oninput"in document;if(!Hm){var bv=document.createElement("div");bv.setAttribute("oninput","return;"),Hm=typeof bv.oninput=="function"}jm=Hm}else jm=!1;gv=jm&&(!document.documentMode||9<document.documentMode)}function yv(){Vl&&(Vl.detachEvent("onpropertychange",vv),Ul=Vl=null)}function vv(s){if(s.propertyName==="value"&&vd(Ul)){var l=[];pv(l,Ul,s,Pm(s)),nv(pR,l)}}function mR(s,l,d){s==="focusin"?(yv(),Vl=l,Ul=d,Vl.attachEvent("onpropertychange",vv)):s==="focusout"&&yv()}function gR(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return vd(Ul)}function bR(s,l){if(s==="click")return vd(l)}function yR(s,l){if(s==="input"||s==="change")return vd(l)}function vR(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Fn=typeof Object.is=="function"?Object.is:vR;function ql(s,l){if(Fn(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var y=d[p];if(!Xo.call(l,y)||!Fn(s[y],l[y]))return!1}return!0}function xv(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Cv(s,l){var d=xv(s);s=0;for(var p;d;){if(d.nodeType===3){if(p=s+d.textContent.length,s<=l&&p>=l)return{node:d,offset:l-s};s=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=xv(d)}}function Ev(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Ev(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function Dv(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=fd(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=fd(s.document)}return l}function Vm(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var xR=Xr&&"documentMode"in document&&11>=document.documentMode,Ea=null,Um=null,Gl=null,qm=!1;function kv(s,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;qm||Ea==null||Ea!==fd(p)||(p=Ea,"selectionStart"in p&&Vm(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Gl&&ql(Gl,p)||(Gl=p,p=lf(Um,"onSelect"),0<p.length&&(l=new bd("onSelect","select",null,l,d),s.push({event:l,listeners:p}),l.target=Ea)))}function ts(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Da={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},Gm={},Sv={};Xr&&(Sv=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function ns(s){if(Gm[s])return Gm[s];if(!Da[s])return s;var l=Da[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in Sv)return Gm[s]=l[d];return s}var $v=ns("animationend"),wv=ns("animationiteration"),Tv=ns("animationstart"),CR=ns("transitionrun"),ER=ns("transitionstart"),DR=ns("transitioncancel"),Av=ns("transitionend"),Bv=new Map,Wm="abort auxClick beforeToggle 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(" ");Wm.push("scrollEnd");function br(s,l){Bv.set(s,l),Zo(l,[s])}var xd=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Jn=[],ka=0,Qm=0;function Cd(){for(var s=ka,l=Qm=ka=0;l<s;){var d=Jn[l];Jn[l++]=null;var p=Jn[l];Jn[l++]=null;var y=Jn[l];Jn[l++]=null;var x=Jn[l];if(Jn[l++]=null,p!==null&&y!==null){var S=p.pending;S===null?y.next=y:(y.next=S.next,S.next=y),p.pending=y}x!==0&&Mv(d,y,x)}}function Ed(s,l,d,p){Jn[ka++]=s,Jn[ka++]=l,Jn[ka++]=d,Jn[ka++]=p,Qm|=p,s.lanes|=p,s=s.alternate,s!==null&&(s.lanes|=p)}function Ym(s,l,d,p){return Ed(s,l,d,p),Dd(s)}function rs(s,l){return Ed(s,null,null,l),Dd(s)}function Mv(s,l,d){s.lanes|=d;var p=s.alternate;p!==null&&(p.lanes|=d);for(var y=!1,x=s.return;x!==null;)x.childLanes|=d,p=x.alternate,p!==null&&(p.childLanes|=d),x.tag===22&&(s=x.stateNode,s===null||s._visibility&1||(y=!0)),s=x,x=x.return;return s.tag===3?(x=s.stateNode,y&&l!==null&&(y=31-In(d),s=x.hiddenUpdates,p=s[y],p===null?s[y]=[l]:p.push(l),l.lane=d|536870912),x):null}function Dd(s){if(50<mu)throw mu=0,o4=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Sa={};function kR(s,l,d,p){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kn(s,l,d,p){return new kR(s,l,d,p)}function Xm(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Jr(s,l){var d=s.alternate;return d===null?(d=Kn(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function Rv(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function kd(s,l,d,p,y,x){var S=0;if(p=s,typeof s=="function")Xm(s)&&(S=1);else if(typeof s=="string")S=AP(s,d,le.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case I:return s=Kn(31,d,l,y),s.elementType=I,s.lanes=x,s;case C:return is(d.children,y,x,l);case E:S=8,y|=24;break;case D:return s=Kn(12,d,l,y|2),s.elementType=D,s.lanes=x,s;case A:return s=Kn(13,d,l,y),s.elementType=A,s.lanes=x,s;case O:return s=Kn(19,d,l,y),s.elementType=O,s.lanes=x,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case $:S=10;break e;case w:S=9;break e;case T:S=11;break e;case M:S=14;break e;case P:S=16,p=null;break e}S=29,d=Error(r(130,s===null?"null":typeof s,"")),p=null}return l=Kn(S,d,l,y),l.elementType=s,l.type=p,l.lanes=x,l}function is(s,l,d,p){return s=Kn(7,s,p,l),s.lanes=d,s}function Jm(s,l,d){return s=Kn(6,s,null,l),s.lanes=d,s}function Pv(s){var l=Kn(18,null,null,0);return l.stateNode=s,l}function Zm(s,l,d){return l=Kn(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var Ov=new WeakMap;function Zn(s,l){if(typeof s=="object"&&s!==null){var d=Ov.get(s);return d!==void 0?d:(l={value:s,source:l,stack:Wr(l)},Ov.set(s,l),l)}return{value:s,source:l,stack:Wr(l)}}var $a=[],wa=0,Sd=null,Wl=0,er=[],tr=0,Ii=null,Mr=1,Rr="";function Zr(s,l){$a[wa++]=Wl,$a[wa++]=Sd,Sd=s,Wl=l}function Nv(s,l,d){er[tr++]=Mr,er[tr++]=Rr,er[tr++]=Ii,Ii=s;var p=Mr;s=Rr;var y=32-In(p)-1;p&=~(1<<y),d+=1;var x=32-In(l)+y;if(30<x){var S=y-y%5;x=(p&(1<<S)-1).toString(32),p>>=S,y-=S,Mr=1<<32-In(l)+y|d<<y|p,Rr=x+s}else Mr=1<<x|d<<y|p,Rr=s}function eg(s){s.return!==null&&(Zr(s,1),Nv(s,1,0))}function tg(s){for(;s===Sd;)Sd=$a[--wa],$a[wa]=null,Wl=$a[--wa],$a[wa]=null;for(;s===Ii;)Ii=er[--tr],er[tr]=null,Rr=er[--tr],er[tr]=null,Mr=er[--tr],er[tr]=null}function Lv(s,l){er[tr++]=Mr,er[tr++]=Rr,er[tr++]=Ii,Mr=l.id,Rr=l.overflow,Ii=s}var Gt=null,lt=null,je=!1,Fi=null,nr=!1,ng=Error(r(519));function Ki(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ql(Zn(l,s)),ng}function zv(s){var l=s.stateNode,d=s.type,p=s.memoizedProps;switch(l[qt]=s,l[Dn]=p,d){case"dialog":Ne("cancel",l),Ne("close",l);break;case"iframe":case"object":case"embed":Ne("load",l);break;case"video":case"audio":for(d=0;d<bu.length;d++)Ne(bu[d],l);break;case"source":Ne("error",l);break;case"img":case"image":case"link":Ne("error",l),Ne("load",l);break;case"details":Ne("toggle",l);break;case"input":Ne("invalid",l),Y1(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ne("invalid",l);break;case"textarea":Ne("invalid",l),J1(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||eE(l.textContent,d)?(p.popover!=null&&(Ne("beforetoggle",l),Ne("toggle",l)),p.onScroll!=null&&Ne("scroll",l),p.onScrollEnd!=null&&Ne("scrollend",l),p.onClick!=null&&(l.onclick=Yr),l=!0):l=!1,l||Ki(s,!0)}function Iv(s){for(Gt=s.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:nr=!1;return;case 27:case 3:nr=!0;return;default:Gt=Gt.return}}function Ta(s){if(s!==Gt)return!1;if(!je)return Iv(s),je=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||x4(s.type,s.memoizedProps)),d=!d),d&<&&Ki(s),Iv(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));lt=uE(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));lt=uE(s)}else l===27?(l=lt,eo(s.type)?(s=S4,S4=null,lt=s):lt=l):lt=Gt?ir(s.stateNode.nextSibling):null;return!0}function ss(){lt=Gt=null,je=!1}function rg(){var s=Fi;return s!==null&&(Tn===null?Tn=s:Tn.push.apply(Tn,s),Fi=null),s}function Ql(s){Fi===null?Fi=[s]:Fi.push(s)}var ig=L(null),as=null,ei=null;function _i(s,l,d){ne(ig,l._currentValue),l._currentValue=d}function ti(s){s._currentValue=ig.current,V(ig)}function og(s,l,d){for(;s!==null;){var p=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),s===d)break;s=s.return}}function sg(s,l,d,p){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var x=y.dependencies;if(x!==null){var S=y.child;x=x.firstContext;e:for(;x!==null;){var R=x;x=y;for(var z=0;z<l.length;z++)if(R.context===l[z]){x.lanes|=d,R=x.alternate,R!==null&&(R.lanes|=d),og(x.return,d,s),p||(S=null);break e}x=R.next}}else if(y.tag===18){if(S=y.return,S===null)throw Error(r(341));S.lanes|=d,x=S.alternate,x!==null&&(x.lanes|=d),og(S,d,s),S=null}else S=y.child;if(S!==null)S.return=y;else for(S=y;S!==null;){if(S===s){S=null;break}if(y=S.sibling,y!==null){y.return=S.return,S=y;break}S=S.return}y=S}}function Aa(s,l,d,p){s=null;for(var y=l,x=!1;y!==null;){if(!x){if((y.flags&524288)!==0)x=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var S=y.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var R=y.type;Fn(y.pendingProps.value,S.value)||(s!==null?s.push(R):s=[R])}}else if(y===Ee.current){if(S=y.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(Eu):s=[Eu])}y=y.return}s!==null&&sg(l,s,d,p),l.flags|=262144}function $d(s){for(s=s.firstContext;s!==null;){if(!Fn(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function ls(s){as=s,ei=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Wt(s){return Fv(as,s)}function wd(s,l){return as===null&&ls(s),Fv(s,l)}function Fv(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},ei===null){if(s===null)throw Error(r(308));ei=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else ei=ei.next=l;return d}var SR=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,p){s.push(p)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},$R=t.unstable_scheduleCallback,wR=t.unstable_NormalPriority,Et={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ag(){return{controller:new SR,data:new Map,refCount:0}}function Yl(s){s.refCount--,s.refCount===0&&$R(wR,function(){s.controller.abort()})}var Xl=null,lg=0,Ba=0,Ma=null;function TR(s,l){if(Xl===null){var d=Xl=[];lg=0,Ba=d4(),Ma={status:"pending",value:void 0,then:function(p){d.push(p)}}}return lg++,l.then(Kv,Kv),l}function Kv(){if(--lg===0&&Xl!==null){Ma!==null&&(Ma.status="fulfilled");var s=Xl;Xl=null,Ba=0,Ma=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function AR(s,l){var d=[],p={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return s.then(function(){p.status="fulfilled",p.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(p.status="rejected",p.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),p}var _v=N.S;N.S=function(s,l){kC=on(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&TR(s,l),_v!==null&&_v(s,l)};var us=L(null);function ug(){var s=us.current;return s!==null?s:nt.pooledCache}function Td(s,l){l===null?ne(us,us.current):ne(us,l.pool)}function jv(){var s=ug();return s===null?null:{parent:Et._currentValue,pool:s}}var Ra=Error(r(460)),cg=Error(r(474)),Ad=Error(r(542)),Bd={then:function(){}};function Hv(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Vv(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Yr,Yr),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,qv(s),s;default:if(typeof l.status=="string")l.then(Yr,Yr);else{if(s=nt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(p){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=p}},function(p){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,qv(s),s}throw ds=l,Ra}}function cs(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ds=d,Ra):d}}var ds=null;function Uv(){if(ds===null)throw Error(r(459));var s=ds;return ds=null,s}function qv(s){if(s===Ra||s===Ad)throw Error(r(483))}var Pa=null,Jl=0;function Md(s){var l=Jl;return Jl+=1,Pa===null&&(Pa=[]),Vv(Pa,s,l)}function Zl(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function Rd(s,l){throw l.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function Gv(s){function l(q,_){if(s){var W=q.deletions;W===null?(q.deletions=[_],q.flags|=16):W.push(_)}}function d(q,_){if(!s)return null;for(;_!==null;)l(q,_),_=_.sibling;return null}function p(q){for(var _=new Map;q!==null;)q.key!==null?_.set(q.key,q):_.set(q.index,q),q=q.sibling;return _}function y(q,_){return q=Jr(q,_),q.index=0,q.sibling=null,q}function x(q,_,W){return q.index=W,s?(W=q.alternate,W!==null?(W=W.index,W<_?(q.flags|=67108866,_):W):(q.flags|=67108866,_)):(q.flags|=1048576,_)}function S(q){return s&&q.alternate===null&&(q.flags|=67108866),q}function R(q,_,W,oe){return _===null||_.tag!==6?(_=Jm(W,q.mode,oe),_.return=q,_):(_=y(_,W),_.return=q,_)}function z(q,_,W,oe){var ve=W.type;return ve===C?re(q,_,W.props.children,oe,W.key):_!==null&&(_.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===P&&cs(ve)===_.type)?(_=y(_,W.props),Zl(_,W),_.return=q,_):(_=kd(W.type,W.key,W.props,null,q.mode,oe),Zl(_,W),_.return=q,_)}function Q(q,_,W,oe){return _===null||_.tag!==4||_.stateNode.containerInfo!==W.containerInfo||_.stateNode.implementation!==W.implementation?(_=Zm(W,q.mode,oe),_.return=q,_):(_=y(_,W.children||[]),_.return=q,_)}function re(q,_,W,oe,ve){return _===null||_.tag!==7?(_=is(W,q.mode,oe,ve),_.return=q,_):(_=y(_,W),_.return=q,_)}function se(q,_,W){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Jm(""+_,q.mode,W),_.return=q,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case b:return W=kd(_.type,_.key,_.props,null,q.mode,W),Zl(W,_),W.return=q,W;case v:return _=Zm(_,q.mode,W),_.return=q,_;case P:return _=cs(_),se(q,_,W)}if(te(_)||U(_))return _=is(_,q.mode,W,null),_.return=q,_;if(typeof _.then=="function")return se(q,Md(_),W);if(_.$$typeof===$)return se(q,wd(q,_),W);Rd(q,_)}return null}function X(q,_,W,oe){var ve=_!==null?_.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return ve!==null?null:R(q,_,""+W,oe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return W.key===ve?z(q,_,W,oe):null;case v:return W.key===ve?Q(q,_,W,oe):null;case P:return W=cs(W),X(q,_,W,oe)}if(te(W)||U(W))return ve!==null?null:re(q,_,W,oe,null);if(typeof W.then=="function")return X(q,_,Md(W),oe);if(W.$$typeof===$)return X(q,_,wd(q,W),oe);Rd(q,W)}return null}function ee(q,_,W,oe,ve){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return q=q.get(W)||null,R(_,q,""+oe,ve);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return q=q.get(oe.key===null?W:oe.key)||null,z(_,q,oe,ve);case v:return q=q.get(oe.key===null?W:oe.key)||null,Q(_,q,oe,ve);case P:return oe=cs(oe),ee(q,_,W,oe,ve)}if(te(oe)||U(oe))return q=q.get(W)||null,re(_,q,oe,ve,null);if(typeof oe.then=="function")return ee(q,_,W,Md(oe),ve);if(oe.$$typeof===$)return ee(q,_,W,wd(_,oe),ve);Rd(_,oe)}return null}function ge(q,_,W,oe){for(var ve=null,Ue=null,ye=_,Be=_=0,Ke=null;ye!==null&&Be<W.length;Be++){ye.index>Be?(Ke=ye,ye=null):Ke=ye.sibling;var qe=X(q,ye,W[Be],oe);if(qe===null){ye===null&&(ye=Ke);break}s&&ye&&qe.alternate===null&&l(q,ye),_=x(qe,_,Be),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe,ye=Ke}if(Be===W.length)return d(q,ye),je&&Zr(q,Be),ve;if(ye===null){for(;Be<W.length;Be++)ye=se(q,W[Be],oe),ye!==null&&(_=x(ye,_,Be),Ue===null?ve=ye:Ue.sibling=ye,Ue=ye);return je&&Zr(q,Be),ve}for(ye=p(ye);Be<W.length;Be++)Ke=ee(ye,q,Be,W[Be],oe),Ke!==null&&(s&&Ke.alternate!==null&&ye.delete(Ke.key===null?Be:Ke.key),_=x(Ke,_,Be),Ue===null?ve=Ke:Ue.sibling=Ke,Ue=Ke);return s&&ye.forEach(function(oo){return l(q,oo)}),je&&Zr(q,Be),ve}function De(q,_,W,oe){if(W==null)throw Error(r(151));for(var ve=null,Ue=null,ye=_,Be=_=0,Ke=null,qe=W.next();ye!==null&&!qe.done;Be++,qe=W.next()){ye.index>Be?(Ke=ye,ye=null):Ke=ye.sibling;var oo=X(q,ye,qe.value,oe);if(oo===null){ye===null&&(ye=Ke);break}s&&ye&&oo.alternate===null&&l(q,ye),_=x(oo,_,Be),Ue===null?ve=oo:Ue.sibling=oo,Ue=oo,ye=Ke}if(qe.done)return d(q,ye),je&&Zr(q,Be),ve;if(ye===null){for(;!qe.done;Be++,qe=W.next())qe=se(q,qe.value,oe),qe!==null&&(_=x(qe,_,Be),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe);return je&&Zr(q,Be),ve}for(ye=p(ye);!qe.done;Be++,qe=W.next())qe=ee(ye,q,Be,qe.value,oe),qe!==null&&(s&&qe.alternate!==null&&ye.delete(qe.key===null?Be:qe.key),_=x(qe,_,Be),Ue===null?ve=qe:Ue.sibling=qe,Ue=qe);return s&&ye.forEach(function(KP){return l(q,KP)}),je&&Zr(q,Be),ve}function tt(q,_,W,oe){if(typeof W=="object"&&W!==null&&W.type===C&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case b:e:{for(var ve=W.key;_!==null;){if(_.key===ve){if(ve=W.type,ve===C){if(_.tag===7){d(q,_.sibling),oe=y(_,W.props.children),oe.return=q,q=oe;break e}}else if(_.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===P&&cs(ve)===_.type){d(q,_.sibling),oe=y(_,W.props),Zl(oe,W),oe.return=q,q=oe;break e}d(q,_);break}else l(q,_);_=_.sibling}W.type===C?(oe=is(W.props.children,q.mode,oe,W.key),oe.return=q,q=oe):(oe=kd(W.type,W.key,W.props,null,q.mode,oe),Zl(oe,W),oe.return=q,q=oe)}return S(q);case v:e:{for(ve=W.key;_!==null;){if(_.key===ve)if(_.tag===4&&_.stateNode.containerInfo===W.containerInfo&&_.stateNode.implementation===W.implementation){d(q,_.sibling),oe=y(_,W.children||[]),oe.return=q,q=oe;break e}else{d(q,_);break}else l(q,_);_=_.sibling}oe=Zm(W,q.mode,oe),oe.return=q,q=oe}return S(q);case P:return W=cs(W),tt(q,_,W,oe)}if(te(W))return ge(q,_,W,oe);if(U(W)){if(ve=U(W),typeof ve!="function")throw Error(r(150));return W=ve.call(W),De(q,_,W,oe)}if(typeof W.then=="function")return tt(q,_,Md(W),oe);if(W.$$typeof===$)return tt(q,_,wd(q,W),oe);Rd(q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,_!==null&&_.tag===6?(d(q,_.sibling),oe=y(_,W),oe.return=q,q=oe):(d(q,_),oe=Jm(W,q.mode,oe),oe.return=q,q=oe),S(q)):d(q,_)}return function(q,_,W,oe){try{Jl=0;var ve=tt(q,_,W,oe);return Pa=null,ve}catch(ye){if(ye===Ra||ye===Ad)throw ye;var Ue=Kn(29,ye,null,q.mode);return Ue.lanes=oe,Ue.return=q,Ue}}}var fs=Gv(!0),Wv=Gv(!1),ji=!1;function dg(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fg(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Hi(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Vi(s,l,d){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(Ge&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,l=Dd(s),Mv(s,null,d),l}return Ed(s,p,l,d),Dd(s)}function eu(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=s.pendingLanes,d|=p,l.lanes=d,F1(s,d)}}function hg(s,l){var d=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var y=null,x=null;if(d=d.firstBaseUpdate,d!==null){do{var S={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};x===null?y=x=S:x=x.next=S,d=d.next}while(d!==null);x===null?y=x=l:x=x.next=l}else y=x=l;d={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:p.shared,callbacks:p.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var pg=!1;function tu(){if(pg){var s=Ma;if(s!==null)throw s}}function nu(s,l,d,p){pg=!1;var y=s.updateQueue;ji=!1;var x=y.firstBaseUpdate,S=y.lastBaseUpdate,R=y.shared.pending;if(R!==null){y.shared.pending=null;var z=R,Q=z.next;z.next=null,S===null?x=Q:S.next=Q,S=z;var re=s.alternate;re!==null&&(re=re.updateQueue,R=re.lastBaseUpdate,R!==S&&(R===null?re.firstBaseUpdate=Q:R.next=Q,re.lastBaseUpdate=z))}if(x!==null){var se=y.baseState;S=0,re=Q=z=null,R=x;do{var X=R.lane&-536870913,ee=X!==R.lane;if(ee?(Fe&X)===X:(p&X)===X){X!==0&&X===Ba&&(pg=!0),re!==null&&(re=re.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ge=s,De=R;X=l;var tt=d;switch(De.tag){case 1:if(ge=De.payload,typeof ge=="function"){se=ge.call(tt,se,X);break e}se=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=De.payload,X=typeof ge=="function"?ge.call(tt,se,X):ge,X==null)break e;se=m({},se,X);break e;case 2:ji=!0}}X=R.callback,X!==null&&(s.flags|=64,ee&&(s.flags|=8192),ee=y.callbacks,ee===null?y.callbacks=[X]:ee.push(X))}else ee={lane:X,tag:R.tag,payload:R.payload,callback:R.callback,next:null},re===null?(Q=re=ee,z=se):re=re.next=ee,S|=X;if(R=R.next,R===null){if(R=y.shared.pending,R===null)break;ee=R,R=ee.next,ee.next=null,y.lastBaseUpdate=ee,y.shared.pending=null}}while(!0);re===null&&(z=se),y.baseState=z,y.firstBaseUpdate=Q,y.lastBaseUpdate=re,x===null&&(y.shared.lanes=0),Qi|=S,s.lanes=S,s.memoizedState=se}}function Qv(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function Yv(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Qv(d[s],l)}var Oa=L(null),Pd=L(0);function Xv(s,l){s=ci,ne(Pd,s),ne(Oa,l),ci=s|l.baseLanes}function mg(){ne(Pd,ci),ne(Oa,Oa.current)}function gg(){ci=Pd.current,V(Oa),V(Pd)}var _n=L(null),rr=null;function Ui(s){var l=s.alternate;ne(vt,vt.current&1),ne(_n,s),rr===null&&(l===null||Oa.current!==null||l.memoizedState!==null)&&(rr=s)}function bg(s){ne(vt,vt.current),ne(_n,s),rr===null&&(rr=s)}function Jv(s){s.tag===22?(ne(vt,vt.current),ne(_n,s),rr===null&&(rr=s)):qi()}function qi(){ne(vt,vt.current),ne(_n,_n.current)}function jn(s){V(_n),rr===s&&(rr=null),V(vt)}var vt=L(0);function Od(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||D4(d)||k4(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ni=0,Ae=null,Ze=null,Dt=null,Nd=!1,Na=!1,hs=!1,Ld=0,ru=0,La=null,BR=0;function mt(){throw Error(r(321))}function yg(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!Fn(s[d],l[d]))return!1;return!0}function vg(s,l,d,p,y,x){return ni=x,Ae=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,N.H=s===null||s.memoizedState===null?Nx:Og,hs=!1,x=d(p,y),hs=!1,Na&&(x=ex(l,d,p,y)),Zv(s),x}function Zv(s){N.H=su;var l=Ze!==null&&Ze.next!==null;if(ni=0,Dt=Ze=Ae=null,Nd=!1,ru=0,La=null,l)throw Error(r(300));s===null||kt||(s=s.dependencies,s!==null&&$d(s)&&(kt=!0))}function ex(s,l,d,p){Ae=s;var y=0;do{if(Na&&(La=null),ru=0,Na=!1,25<=y)throw Error(r(301));if(y+=1,Dt=Ze=null,s.updateQueue!=null){var x=s.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}N.H=Lx,x=l(d,p)}while(Na);return x}function MR(){var s=N.H,l=s.useState()[0];return l=typeof l.then=="function"?iu(l):l,s=s.useState()[0],(Ze!==null?Ze.memoizedState:null)!==s&&(Ae.flags|=1024),l}function xg(){var s=Ld!==0;return Ld=0,s}function Cg(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function Eg(s){if(Nd){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Nd=!1}ni=0,Dt=Ze=Ae=null,Na=!1,ru=Ld=0,La=null}function pn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Ae.memoizedState=Dt=s:Dt=Dt.next=s,Dt}function xt(){if(Ze===null){var s=Ae.alternate;s=s!==null?s.memoizedState:null}else s=Ze.next;var l=Dt===null?Ae.memoizedState:Dt.next;if(l!==null)Dt=l,Ze=s;else{if(s===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));Ze=s,s={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},Dt===null?Ae.memoizedState=Dt=s:Dt=Dt.next=s}return Dt}function zd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function iu(s){var l=ru;return ru+=1,La===null&&(La=[]),s=Vv(La,s,l),l=Ae,(Dt===null?l.memoizedState:Dt.next)===null&&(l=l.alternate,N.H=l===null||l.memoizedState===null?Nx:Og),s}function Id(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return iu(s);if(s.$$typeof===$)return Wt(s)}throw Error(r(438,String(s)))}function Dg(s){var l=null,d=Ae.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Ae.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=zd(),Ae.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),p=0;p<s;p++)d[p]=G;return l.index++,d}function ri(s,l){return typeof l=="function"?l(s):l}function Fd(s){var l=xt();return kg(l,Ze,s)}function kg(s,l,d){var p=s.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=s.baseQueue,x=p.pending;if(x!==null){if(y!==null){var S=y.next;y.next=x.next,x.next=S}l.baseQueue=y=x,p.pending=null}if(x=s.baseState,y===null)s.memoizedState=x;else{l=y.next;var R=S=null,z=null,Q=l,re=!1;do{var se=Q.lane&-536870913;if(se!==Q.lane?(Fe&se)===se:(ni&se)===se){var X=Q.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),se===Ba&&(re=!0);else if((ni&X)===X){Q=Q.next,X===Ba&&(re=!0);continue}else se={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(R=z=se,S=x):z=z.next=se,Ae.lanes|=X,Qi|=X;se=Q.action,hs&&d(x,se),x=Q.hasEagerState?Q.eagerState:d(x,se)}else X={lane:se,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(R=z=X,S=x):z=z.next=X,Ae.lanes|=se,Qi|=se;Q=Q.next}while(Q!==null&&Q!==l);if(z===null?S=x:z.next=R,!Fn(x,s.memoizedState)&&(kt=!0,re&&(d=Ma,d!==null)))throw d;s.memoizedState=x,s.baseState=S,s.baseQueue=z,p.lastRenderedState=x}return y===null&&(p.lanes=0),[s.memoizedState,p.dispatch]}function Sg(s){var l=xt(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var p=d.dispatch,y=d.pending,x=l.memoizedState;if(y!==null){d.pending=null;var S=y=y.next;do x=s(x,S.action),S=S.next;while(S!==y);Fn(x,l.memoizedState)||(kt=!0),l.memoizedState=x,l.baseQueue===null&&(l.baseState=x),d.lastRenderedState=x}return[x,p]}function tx(s,l,d){var p=Ae,y=xt(),x=je;if(x){if(d===void 0)throw Error(r(407));d=d()}else d=l();var S=!Fn((Ze||y).memoizedState,d);if(S&&(y.memoizedState=d,kt=!0),y=y.queue,Tg(ix.bind(null,p,y,s),[s]),y.getSnapshot!==l||S||Dt!==null&&Dt.memoizedState.tag&1){if(p.flags|=2048,za(9,{destroy:void 0},rx.bind(null,p,y,d,l),null),nt===null)throw Error(r(349));x||(ni&127)!==0||nx(p,l,d)}return d}function nx(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=Ae.updateQueue,l===null?(l=zd(),Ae.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function rx(s,l,d,p){l.value=d,l.getSnapshot=p,ox(l)&&sx(s)}function ix(s,l,d){return d(function(){ox(l)&&sx(s)})}function ox(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!Fn(s,d)}catch{return!0}}function sx(s){var l=rs(s,2);l!==null&&An(l,s,2)}function $g(s){var l=pn();if(typeof s=="function"){var d=s;if(s=d(),hs){Ni(!0);try{d()}finally{Ni(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:s},l}function ax(s,l,d,p){return s.baseState=d,kg(s,Ze,typeof p=="function"?p:ri)}function RR(s,l,d,p,y){if(jd(s))throw Error(r(485));if(s=l.action,s!==null){var x={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){x.listeners.push(S)}};N.T!==null?d(!0):x.isTransition=!1,p(x),d=l.pending,d===null?(x.next=l.pending=x,lx(l,x)):(x.next=d.next,l.pending=d.next=x)}}function lx(s,l){var d=l.action,p=l.payload,y=s.state;if(l.isTransition){var x=N.T,S={};N.T=S;try{var R=d(y,p),z=N.S;z!==null&&z(S,R),ux(s,l,R)}catch(Q){wg(s,l,Q)}finally{x!==null&&S.types!==null&&(x.types=S.types),N.T=x}}else try{x=d(y,p),ux(s,l,x)}catch(Q){wg(s,l,Q)}}function ux(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){cx(s,l,p)},function(p){return wg(s,l,p)}):cx(s,l,d)}function cx(s,l,d){l.status="fulfilled",l.value=d,dx(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,lx(s,d)))}function wg(s,l,d){var p=s.pending;if(s.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,dx(l),l=l.next;while(l!==p)}s.action=null}function dx(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function fx(s,l){return l}function hx(s,l){if(je){var d=nt.formState;if(d!==null){e:{var p=Ae;if(je){if(lt){t:{for(var y=lt,x=nr;y.nodeType!==8;){if(!x){y=null;break t}if(y=ir(y.nextSibling),y===null){y=null;break t}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){lt=ir(y.nextSibling),p=y.data==="F!";break e}}Ki(p)}p=!1}p&&(l=d[0])}}return d=pn(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fx,lastRenderedState:l},d.queue=p,d=Rx.bind(null,Ae,p),p.dispatch=d,p=$g(!1),x=Pg.bind(null,Ae,!1,p.queue),p=pn(),y={state:l,dispatch:null,action:s,pending:null},p.queue=y,d=RR.bind(null,Ae,y,x,d),y.dispatch=d,p.memoizedState=s,[l,d,!1]}function px(s){var l=xt();return mx(l,Ze,s)}function mx(s,l,d){if(l=kg(s,l,fx)[0],s=Fd(ri)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=iu(l)}catch(S){throw S===Ra?Ad:S}else p=l;l=xt();var y=l.queue,x=y.dispatch;return d!==l.memoizedState&&(Ae.flags|=2048,za(9,{destroy:void 0},PR.bind(null,y,d),null)),[p,x,s]}function PR(s,l){s.action=l}function gx(s){var l=xt(),d=Ze;if(d!==null)return mx(l,d,s);xt(),l=l.memoizedState,d=xt();var p=d.queue.dispatch;return d.memoizedState=s,[l,p,!1]}function za(s,l,d,p){return s={tag:s,create:d,deps:p,inst:l,next:null},l=Ae.updateQueue,l===null&&(l=zd(),Ae.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(p=d.next,d.next=s,s.next=p,l.lastEffect=s),s}function bx(){return xt().memoizedState}function Kd(s,l,d,p){var y=pn();Ae.flags|=s,y.memoizedState=za(1|l,{destroy:void 0},d,p===void 0?null:p)}function _d(s,l,d,p){var y=xt();p=p===void 0?null:p;var x=y.memoizedState.inst;Ze!==null&&p!==null&&yg(p,Ze.memoizedState.deps)?y.memoizedState=za(l,x,d,p):(Ae.flags|=s,y.memoizedState=za(1|l,x,d,p))}function yx(s,l){Kd(8390656,8,s,l)}function Tg(s,l){_d(2048,8,s,l)}function OR(s){Ae.flags|=4;var l=Ae.updateQueue;if(l===null)l=zd(),Ae.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function vx(s){var l=xt().memoizedState;return OR({ref:l,nextImpl:s}),function(){if((Ge&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function xx(s,l){return _d(4,2,s,l)}function Cx(s,l){return _d(4,4,s,l)}function Ex(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function Dx(s,l,d){d=d!=null?d.concat([s]):null,_d(4,4,Ex.bind(null,l,s),d)}function Ag(){}function kx(s,l){var d=xt();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&yg(l,p[1])?p[0]:(d.memoizedState=[s,l],s)}function Sx(s,l){var d=xt();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&yg(l,p[1]))return p[0];if(p=s(),hs){Ni(!0);try{s()}finally{Ni(!1)}}return d.memoizedState=[p,l],p}function Bg(s,l,d){return d===void 0||(ni&1073741824)!==0&&(Fe&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=$C(),Ae.lanes|=s,Qi|=s,d)}function $x(s,l,d,p){return Fn(d,l)?d:Oa.current!==null?(s=Bg(s,d,p),Fn(s,l)||(kt=!0),s):(ni&42)===0||(ni&1073741824)!==0&&(Fe&261930)===0?(kt=!0,s.memoizedState=d):(s=$C(),Ae.lanes|=s,Qi|=s,l)}function wx(s,l,d,p,y){var x=K.p;K.p=x!==0&&8>x?x:8;var S=N.T,R={};N.T=R,Pg(s,!1,l,d);try{var z=y(),Q=N.S;if(Q!==null&&Q(R,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=AR(z,p);ou(s,l,re,Un(s))}else ou(s,l,p,Un(s))}catch(se){ou(s,l,{then:function(){},status:"rejected",reason:se},Un())}finally{K.p=x,S!==null&&R.types!==null&&(S.types=R.types),N.T=S}}function NR(){}function Mg(s,l,d,p){if(s.tag!==5)throw Error(r(476));var y=Tx(s).queue;wx(s,y,l,Y,d===null?NR:function(){return Ax(s),d(p)})}function Tx(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:Y},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function Ax(s){var l=Tx(s);l.next===null&&(l=s.alternate.memoizedState),ou(s,l.next.queue,{},Un())}function Rg(){return Wt(Eu)}function Bx(){return xt().memoizedState}function Mx(){return xt().memoizedState}function LR(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Un();s=Hi(d);var p=Vi(l,s,d);p!==null&&(An(p,l,d),eu(p,l,d)),l={cache:ag()},s.payload=l;return}l=l.return}}function zR(s,l,d){var p=Un();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},jd(s)?Px(l,d):(d=Ym(s,l,d,p),d!==null&&(An(d,s,p),Ox(d,l,p)))}function Rx(s,l,d){var p=Un();ou(s,l,d,p)}function ou(s,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(jd(s))Px(l,y);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=l.lastRenderedReducer,x!==null))try{var S=l.lastRenderedState,R=x(S,d);if(y.hasEagerState=!0,y.eagerState=R,Fn(R,S))return Ed(s,l,y,0),nt===null&&Cd(),!1}catch{}if(d=Ym(s,l,y,p),d!==null)return An(d,s,p),Ox(d,l,p),!0}return!1}function Pg(s,l,d,p){if(p={lane:2,revertLane:d4(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},jd(s)){if(l)throw Error(r(479))}else l=Ym(s,d,p,2),l!==null&&An(l,s,2)}function jd(s){var l=s.alternate;return s===Ae||l!==null&&l===Ae}function Px(s,l){Na=Nd=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function Ox(s,l,d){if((d&4194048)!==0){var p=l.lanes;p&=s.pendingLanes,d|=p,l.lanes=d,F1(s,d)}}var su={readContext:Wt,use:Id,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};su.useEffectEvent=mt;var Nx={readContext:Wt,use:Id,useCallback:function(s,l){return pn().memoizedState=[s,l===void 0?null:l],s},useContext:Wt,useEffect:yx,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Kd(4194308,4,Ex.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Kd(4194308,4,s,l)},useInsertionEffect:function(s,l){Kd(4,2,s,l)},useMemo:function(s,l){var d=pn();l=l===void 0?null:l;var p=s();if(hs){Ni(!0);try{s()}finally{Ni(!1)}}return d.memoizedState=[p,l],p},useReducer:function(s,l,d){var p=pn();if(d!==void 0){var y=d(l);if(hs){Ni(!0);try{d(l)}finally{Ni(!1)}}}else y=l;return p.memoizedState=p.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},p.queue=s,s=s.dispatch=zR.bind(null,Ae,s),[p.memoizedState,s]},useRef:function(s){var l=pn();return s={current:s},l.memoizedState=s},useState:function(s){s=$g(s);var l=s.queue,d=Rx.bind(null,Ae,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:Ag,useDeferredValue:function(s,l){var d=pn();return Bg(d,s,l)},useTransition:function(){var s=$g(!1);return s=wx.bind(null,Ae,s.queue,!0,!1),pn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var p=Ae,y=pn();if(je){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),nt===null)throw Error(r(349));(Fe&127)!==0||nx(p,l,d)}y.memoizedState=d;var x={value:d,getSnapshot:l};return y.queue=x,yx(ix.bind(null,p,x,s),[s]),p.flags|=2048,za(9,{destroy:void 0},rx.bind(null,p,x,d,l),null),d},useId:function(){var s=pn(),l=nt.identifierPrefix;if(je){var d=Rr,p=Mr;d=(p&~(1<<32-In(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Ld++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=BR++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Rg,useFormState:hx,useActionState:hx,useOptimistic:function(s){var l=pn();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Pg.bind(null,Ae,!0,d),d.dispatch=l,[s,l]},useMemoCache:Dg,useCacheRefresh:function(){return pn().memoizedState=LR.bind(null,Ae)},useEffectEvent:function(s){var l=pn(),d={impl:s};return l.memoizedState=d,function(){if((Ge&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Og={readContext:Wt,use:Id,useCallback:kx,useContext:Wt,useEffect:Tg,useImperativeHandle:Dx,useInsertionEffect:xx,useLayoutEffect:Cx,useMemo:Sx,useReducer:Fd,useRef:bx,useState:function(){return Fd(ri)},useDebugValue:Ag,useDeferredValue:function(s,l){var d=xt();return $x(d,Ze.memoizedState,s,l)},useTransition:function(){var s=Fd(ri)[0],l=xt().memoizedState;return[typeof s=="boolean"?s:iu(s),l]},useSyncExternalStore:tx,useId:Bx,useHostTransitionStatus:Rg,useFormState:px,useActionState:px,useOptimistic:function(s,l){var d=xt();return ax(d,Ze,s,l)},useMemoCache:Dg,useCacheRefresh:Mx};Og.useEffectEvent=vx;var Lx={readContext:Wt,use:Id,useCallback:kx,useContext:Wt,useEffect:Tg,useImperativeHandle:Dx,useInsertionEffect:xx,useLayoutEffect:Cx,useMemo:Sx,useReducer:Sg,useRef:bx,useState:function(){return Sg(ri)},useDebugValue:Ag,useDeferredValue:function(s,l){var d=xt();return Ze===null?Bg(d,s,l):$x(d,Ze.memoizedState,s,l)},useTransition:function(){var s=Sg(ri)[0],l=xt().memoizedState;return[typeof s=="boolean"?s:iu(s),l]},useSyncExternalStore:tx,useId:Bx,useHostTransitionStatus:Rg,useFormState:gx,useActionState:gx,useOptimistic:function(s,l){var d=xt();return Ze!==null?ax(d,Ze,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:Dg,useCacheRefresh:Mx};Lx.useEffectEvent=vx;function Ng(s,l,d,p){l=s.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Lg={enqueueSetState:function(s,l,d){s=s._reactInternals;var p=Un(),y=Hi(p);y.payload=l,d!=null&&(y.callback=d),l=Vi(s,y,p),l!==null&&(An(l,s,p),eu(l,s,p))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var p=Un(),y=Hi(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=Vi(s,y,p),l!==null&&(An(l,s,p),eu(l,s,p))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Un(),p=Hi(d);p.tag=2,l!=null&&(p.callback=l),l=Vi(s,p,d),l!==null&&(An(l,s,d),eu(l,s,d))}};function zx(s,l,d,p,y,x,S){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,x,S):l.prototype&&l.prototype.isPureReactComponent?!ql(d,p)||!ql(y,x):!0}function Ix(s,l,d,p){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==s&&Lg.enqueueReplaceState(l,l.state,null)}function ps(s,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(s=s.defaultProps){d===l&&(d=m({},d));for(var y in s)d[y]===void 0&&(d[y]=s[y])}return d}function Fx(s){xd(s)}function Kx(s){console.error(s)}function _x(s){xd(s)}function Hd(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function jx(s,l,d){try{var p=s.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function zg(s,l,d){return d=Hi(d),d.tag=3,d.payload={element:null},d.callback=function(){Hd(s,l)},d}function Hx(s){return s=Hi(s),s.tag=3,s}function Vx(s,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var x=p.value;s.payload=function(){return y(x)},s.callback=function(){jx(l,d,p)}}var S=d.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(s.callback=function(){jx(l,d,p),typeof y!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var R=p.stack;this.componentDidCatch(p.value,{componentStack:R!==null?R:""})})}function IR(s,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Aa(l,d,y,!0),d=_n.current,d!==null){switch(d.tag){case 31:case 13:return rr===null?tf():d.alternate===null&>===0&&(gt=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===Bd?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),l4(s,p,y)),!1;case 22:return d.flags|=65536,p===Bd?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),l4(s,p,y)),!1}throw Error(r(435,d.tag))}return l4(s,p,y),tf(),!1}if(je)return l=_n.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==ng&&(s=Error(r(422),{cause:p}),Ql(Zn(s,d)))):(p!==ng&&(l=Error(r(423),{cause:p}),Ql(Zn(l,d))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,p=Zn(p,d),y=zg(s.stateNode,p,y),hg(s,y),gt!==4&&(gt=2)),!1;var x=Error(r(520),{cause:p});if(x=Zn(x,d),pu===null?pu=[x]:pu.push(x),gt!==4&&(gt=2),l===null)return!0;p=Zn(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=y&-y,d.lanes|=s,s=zg(d.stateNode,p,s),hg(d,s),!1;case 1:if(l=d.type,x=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Yi===null||!Yi.has(x))))return d.flags|=65536,y&=-y,d.lanes|=y,y=Hx(y),Vx(y,s,d,p),hg(d,y),!1}d=d.return}while(d!==null);return!1}var Ig=Error(r(461)),kt=!1;function Qt(s,l,d,p){l.child=s===null?Wv(l,null,d,p):fs(l,s.child,d,p)}function Ux(s,l,d,p,y){d=d.render;var x=l.ref;if("ref"in p){var S={};for(var R in p)R!=="ref"&&(S[R]=p[R])}else S=p;return ls(l),p=vg(s,l,d,S,x,y),R=xg(),s!==null&&!kt?(Cg(s,l,y),ii(s,l,y)):(je&&R&&eg(l),l.flags|=1,Qt(s,l,p,y),l.child)}function qx(s,l,d,p,y){if(s===null){var x=d.type;return typeof x=="function"&&!Xm(x)&&x.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=x,Gx(s,l,x,p,y)):(s=kd(d.type,null,p,l,l.mode,y),s.ref=l.ref,s.return=l,l.child=s)}if(x=s.child,!qg(s,y)){var S=x.memoizedProps;if(d=d.compare,d=d!==null?d:ql,d(S,p)&&s.ref===l.ref)return ii(s,l,y)}return l.flags|=1,s=Jr(x,p),s.ref=l.ref,s.return=l,l.child=s}function Gx(s,l,d,p,y){if(s!==null){var x=s.memoizedProps;if(ql(x,p)&&s.ref===l.ref)if(kt=!1,l.pendingProps=p=x,qg(s,y))(s.flags&131072)!==0&&(kt=!0);else return l.lanes=s.lanes,ii(s,l,y)}return Fg(s,l,d,p,y)}function Wx(s,l,d,p){var y=p.children,x=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(x=x!==null?x.baseLanes|d:d,s!==null){for(p=l.child=s.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~x}else p=0,l.child=null;return Qx(s,l,x,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Td(l,x!==null?x.cachePool:null),x!==null?Xv(l,x):mg(),Jv(l);else return p=l.lanes=536870912,Qx(s,l,x!==null?x.baseLanes|d:d,d,p)}else x!==null?(Td(l,x.cachePool),Xv(l,x),qi(),l.memoizedState=null):(s!==null&&Td(l,null),mg(),qi());return Qt(s,l,y,d),l.child}function au(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Qx(s,l,d,p,y){var x=ug();return x=x===null?null:{parent:Et._currentValue,pool:x},l.memoizedState={baseLanes:d,cachePool:x},s!==null&&Td(l,null),mg(),Jv(l),s!==null&&Aa(s,l,p,!0),l.childLanes=y,null}function Vd(s,l){return l=qd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function Yx(s,l,d){return fs(l,s.child,null,d),s=Vd(l,l.pendingProps),s.flags|=2,jn(l),l.memoizedState=null,s}function FR(s,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(je){if(p.mode==="hidden")return s=Vd(l,p),l.lanes=536870912,au(null,s);if(bg(l),(s=lt)?(s=lE(s,nr),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ii!==null?{id:Mr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},d=Pv(s),d.return=l,l.child=d,Gt=l,lt=null)):s=null,s===null)throw Ki(l);return l.lanes=536870912,null}return Vd(l,p)}var x=s.memoizedState;if(x!==null){var S=x.dehydrated;if(bg(l),y)if(l.flags&256)l.flags&=-257,l=Yx(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(kt||Aa(s,l,d,!1),y=(d&s.childLanes)!==0,kt||y){if(p=nt,p!==null&&(S=K1(p,d),S!==0&&S!==x.retryLane))throw x.retryLane=S,rs(s,S),An(p,s,S),Ig;tf(),l=Yx(s,l,d)}else s=x.treeContext,lt=ir(S.nextSibling),Gt=l,je=!0,Fi=null,nr=!1,s!==null&&Lv(l,s),l=Vd(l,p),l.flags|=4096;return l}return s=Jr(s.child,{mode:p.mode,children:p.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Ud(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Fg(s,l,d,p,y){return ls(l),d=vg(s,l,d,p,void 0,y),p=xg(),s!==null&&!kt?(Cg(s,l,y),ii(s,l,y)):(je&&p&&eg(l),l.flags|=1,Qt(s,l,d,y),l.child)}function Xx(s,l,d,p,y,x){return ls(l),l.updateQueue=null,d=ex(l,p,d,y),Zv(s),p=xg(),s!==null&&!kt?(Cg(s,l,x),ii(s,l,x)):(je&&p&&eg(l),l.flags|=1,Qt(s,l,d,x),l.child)}function Jx(s,l,d,p,y){if(ls(l),l.stateNode===null){var x=Sa,S=d.contextType;typeof S=="object"&&S!==null&&(x=Wt(S)),x=new d(p,x),l.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Lg,l.stateNode=x,x._reactInternals=l,x=l.stateNode,x.props=p,x.state=l.memoizedState,x.refs={},dg(l),S=d.contextType,x.context=typeof S=="object"&&S!==null?Wt(S):Sa,x.state=l.memoizedState,S=d.getDerivedStateFromProps,typeof S=="function"&&(Ng(l,d,S,p),x.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(S=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),S!==x.state&&Lg.enqueueReplaceState(x,x.state,null),nu(l,p,x,y),tu(),x.state=l.memoizedState),typeof x.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(s===null){x=l.stateNode;var R=l.memoizedProps,z=ps(d,R);x.props=z;var Q=x.context,re=d.contextType;S=Sa,typeof re=="object"&&re!==null&&(S=Wt(re));var se=d.getDerivedStateFromProps;re=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function",R=l.pendingProps!==R,re||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R||Q!==S)&&Ix(l,x,p,S),ji=!1;var X=l.memoizedState;x.state=X,nu(l,p,x,y),tu(),Q=l.memoizedState,R||X!==Q||ji?(typeof se=="function"&&(Ng(l,d,se,p),Q=l.memoizedState),(z=ji||zx(l,d,z,p,X,Q,S))?(re||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(l.flags|=4194308)):(typeof x.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=Q),x.props=p,x.state=Q,x.context=S,p=z):(typeof x.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{x=l.stateNode,fg(s,l),S=l.memoizedProps,re=ps(d,S),x.props=re,se=l.pendingProps,X=x.context,Q=d.contextType,z=Sa,typeof Q=="object"&&Q!==null&&(z=Wt(Q)),R=d.getDerivedStateFromProps,(Q=typeof R=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(S!==se||X!==z)&&Ix(l,x,p,z),ji=!1,X=l.memoizedState,x.state=X,nu(l,p,x,y),tu();var ee=l.memoizedState;S!==se||X!==ee||ji||s!==null&&s.dependencies!==null&&$d(s.dependencies)?(typeof R=="function"&&(Ng(l,d,R,p),ee=l.memoizedState),(re=ji||zx(l,d,re,p,X,ee,z)||s!==null&&s.dependencies!==null&&$d(s.dependencies))?(Q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(p,ee,z),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(p,ee,z)),typeof x.componentDidUpdate=="function"&&(l.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof x.componentDidUpdate!="function"||S===s.memoizedProps&&X===s.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||S===s.memoizedProps&&X===s.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=ee),x.props=p,x.state=ee,x.context=z,p=re):(typeof x.componentDidUpdate!="function"||S===s.memoizedProps&&X===s.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||S===s.memoizedProps&&X===s.memoizedState||(l.flags|=1024),p=!1)}return x=p,Ud(s,l),p=(l.flags&128)!==0,x||p?(x=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:x.render(),l.flags|=1,s!==null&&p?(l.child=fs(l,s.child,null,y),l.child=fs(l,null,d,y)):Qt(s,l,d,y),l.memoizedState=x.state,s=l.child):s=ii(s,l,y),s}function Zx(s,l,d,p){return ss(),l.flags|=256,Qt(s,l,d,p),l.child}var Kg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _g(s){return{baseLanes:s,cachePool:jv()}}function jg(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Vn),s}function eC(s,l,d){var p=l.pendingProps,y=!1,x=(l.flags&128)!==0,S;if((S=x)||(S=s!==null&&s.memoizedState===null?!1:(vt.current&2)!==0),S&&(y=!0,l.flags&=-129),S=(l.flags&32)!==0,l.flags&=-33,s===null){if(je){if(y?Ui(l):qi(),(s=lt)?(s=lE(s,nr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Ii!==null?{id:Mr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},d=Pv(s),d.return=l,l.child=d,Gt=l,lt=null)):s=null,s===null)throw Ki(l);return k4(s)?l.lanes=32:l.lanes=536870912,null}var R=p.children;return p=p.fallback,y?(qi(),y=l.mode,R=qd({mode:"hidden",children:R},y),p=is(p,y,d,null),R.return=l,p.return=l,R.sibling=p,l.child=R,p=l.child,p.memoizedState=_g(d),p.childLanes=jg(s,S,d),l.memoizedState=Kg,au(null,p)):(Ui(l),Hg(l,R))}var z=s.memoizedState;if(z!==null&&(R=z.dehydrated,R!==null)){if(x)l.flags&256?(Ui(l),l.flags&=-257,l=Vg(s,l,d)):l.memoizedState!==null?(qi(),l.child=s.child,l.flags|=128,l=null):(qi(),R=p.fallback,y=l.mode,p=qd({mode:"visible",children:p.children},y),R=is(R,y,d,null),R.flags|=2,p.return=l,R.return=l,p.sibling=R,l.child=p,fs(l,s.child,null,d),p=l.child,p.memoizedState=_g(d),p.childLanes=jg(s,S,d),l.memoizedState=Kg,l=au(null,p));else if(Ui(l),k4(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var Q=S.dgst;S=Q,p=Error(r(419)),p.stack="",p.digest=S,Ql({value:p,source:null,stack:null}),l=Vg(s,l,d)}else if(kt||Aa(s,l,d,!1),S=(d&s.childLanes)!==0,kt||S){if(S=nt,S!==null&&(p=K1(S,d),p!==0&&p!==z.retryLane))throw z.retryLane=p,rs(s,p),An(S,s,p),Ig;D4(R)||tf(),l=Vg(s,l,d)}else D4(R)?(l.flags|=192,l.child=s.child,l=null):(s=z.treeContext,lt=ir(R.nextSibling),Gt=l,je=!0,Fi=null,nr=!1,s!==null&&Lv(l,s),l=Hg(l,p.children),l.flags|=4096);return l}return y?(qi(),R=p.fallback,y=l.mode,z=s.child,Q=z.sibling,p=Jr(z,{mode:"hidden",children:p.children}),p.subtreeFlags=z.subtreeFlags&65011712,Q!==null?R=Jr(Q,R):(R=is(R,y,d,null),R.flags|=2),R.return=l,p.return=l,p.sibling=R,l.child=p,au(null,p),p=l.child,R=s.child.memoizedState,R===null?R=_g(d):(y=R.cachePool,y!==null?(z=Et._currentValue,y=y.parent!==z?{parent:z,pool:z}:y):y=jv(),R={baseLanes:R.baseLanes|d,cachePool:y}),p.memoizedState=R,p.childLanes=jg(s,S,d),l.memoizedState=Kg,au(s.child,p)):(Ui(l),d=s.child,s=d.sibling,d=Jr(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,s!==null&&(S=l.deletions,S===null?(l.deletions=[s],l.flags|=16):S.push(s)),l.child=d,l.memoizedState=null,d)}function Hg(s,l){return l=qd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function qd(s,l){return s=Kn(22,s,null,l),s.lanes=0,s}function Vg(s,l,d){return fs(l,s.child,null,d),s=Hg(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function tC(s,l,d){s.lanes|=l;var p=s.alternate;p!==null&&(p.lanes|=l),og(s.return,l,d)}function Ug(s,l,d,p,y,x){var S=s.memoizedState;S===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:y,treeForkCount:x}:(S.isBackwards=l,S.rendering=null,S.renderingStartTime=0,S.last=p,S.tail=d,S.tailMode=y,S.treeForkCount=x)}function nC(s,l,d){var p=l.pendingProps,y=p.revealOrder,x=p.tail;p=p.children;var S=vt.current,R=(S&2)!==0;if(R?(S=S&1|2,l.flags|=128):S&=1,ne(vt,S),Qt(s,l,p,d),p=je?Wl:0,!R&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&tC(s,d,l);else if(s.tag===19)tC(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)s=d.alternate,s!==null&&Od(s)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),Ug(l,!1,y,d,x,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(s=y.alternate,s!==null&&Od(s)===null){l.child=y;break}s=y.sibling,y.sibling=d,d=y,y=s}Ug(l,!0,d,null,x,p);break;case"together":Ug(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function ii(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Qi|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Aa(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,d=Jr(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=Jr(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function qg(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&$d(s)))}function KR(s,l,d){switch(l.tag){case 3:Ve(l,l.stateNode.containerInfo),_i(l,Et,s.memoizedState.cache),ss();break;case 27:case 5:En(l);break;case 4:Ve(l,l.stateNode.containerInfo);break;case 10:_i(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,bg(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(Ui(l),l.flags|=128,null):(d&l.child.childLanes)!==0?eC(s,l,d):(Ui(l),s=ii(s,l,d),s!==null?s.sibling:null);Ui(l);break;case 19:var y=(s.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Aa(s,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return nC(s,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ne(vt,vt.current),p)break;return null;case 22:return l.lanes=0,Wx(s,l,d,l.pendingProps);case 24:_i(l,Et,s.memoizedState.cache)}return ii(s,l,d)}function rC(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)kt=!0;else{if(!qg(s,d)&&(l.flags&128)===0)return kt=!1,KR(s,l,d);kt=(s.flags&131072)!==0}else kt=!1,je&&(l.flags&1048576)!==0&&Nv(l,Wl,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(s=cs(l.elementType),l.type=s,typeof s=="function")Xm(s)?(p=ps(s,p),l.tag=1,l=Jx(null,l,s,p,d)):(l.tag=0,l=Fg(null,l,s,p,d));else{if(s!=null){var y=s.$$typeof;if(y===T){l.tag=11,l=Ux(null,l,s,p,d);break e}else if(y===M){l.tag=14,l=qx(null,l,s,p,d);break e}}throw l=F(s)||s,Error(r(306,l,""))}}return l;case 0:return Fg(s,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=ps(p,l.pendingProps),Jx(s,l,p,y,d);case 3:e:{if(Ve(l,l.stateNode.containerInfo),s===null)throw Error(r(387));p=l.pendingProps;var x=l.memoizedState;y=x.element,fg(s,l),nu(l,p,null,d);var S=l.memoizedState;if(p=S.cache,_i(l,Et,p),p!==x.cache&&sg(l,[Et],d,!0),tu(),p=S.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:S.cache},l.updateQueue.baseState=x,l.memoizedState=x,l.flags&256){l=Zx(s,l,p,d);break e}else if(p!==y){y=Zn(Error(r(424)),l),Ql(y),l=Zx(s,l,p,d);break e}else for(s=l.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,lt=ir(s.firstChild),Gt=l,je=!0,Fi=null,nr=!0,d=Wv(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(ss(),p===y){l=ii(s,l,d);break e}Qt(s,l,p,d)}l=l.child}return l;case 26:return Ud(s,l),s===null?(d=pE(l.type,null,l.pendingProps,null))?l.memoizedState=d:je||(d=l.type,s=l.pendingProps,p=uf(fe.current).createElement(d),p[qt]=l,p[Dn]=s,Yt(p,d,s),Kt(p),l.stateNode=p):l.memoizedState=pE(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return En(l),s===null&&je&&(p=l.stateNode=dE(l.type,l.pendingProps,fe.current),Gt=l,nr=!0,y=lt,eo(l.type)?(S4=y,lt=ir(p.firstChild)):lt=y),Qt(s,l,l.pendingProps.children,d),Ud(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&je&&((y=p=lt)&&(p=gP(p,l.type,l.pendingProps,nr),p!==null?(l.stateNode=p,Gt=l,lt=ir(p.firstChild),nr=!1,y=!0):y=!1),y||Ki(l)),En(l),y=l.type,x=l.pendingProps,S=s!==null?s.memoizedProps:null,p=x.children,x4(y,x)?p=null:S!==null&&x4(y,S)&&(l.flags|=32),l.memoizedState!==null&&(y=vg(s,l,MR,null,null,d),Eu._currentValue=y),Ud(s,l),Qt(s,l,p,d),l.child;case 6:return s===null&&je&&((s=d=lt)&&(d=bP(d,l.pendingProps,nr),d!==null?(l.stateNode=d,Gt=l,lt=null,s=!0):s=!1),s||Ki(l)),null;case 13:return eC(s,l,d);case 4:return Ve(l,l.stateNode.containerInfo),p=l.pendingProps,s===null?l.child=fs(l,null,p,d):Qt(s,l,p,d),l.child;case 11:return Ux(s,l,l.type,l.pendingProps,d);case 7:return Qt(s,l,l.pendingProps,d),l.child;case 8:return Qt(s,l,l.pendingProps.children,d),l.child;case 12:return Qt(s,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,_i(l,l.type,p.value),Qt(s,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,ls(l),y=Wt(y),p=p(y),l.flags|=1,Qt(s,l,p,d),l.child;case 14:return qx(s,l,l.type,l.pendingProps,d);case 15:return Gx(s,l,l.type,l.pendingProps,d);case 19:return nC(s,l,d);case 31:return FR(s,l,d);case 22:return Wx(s,l,d,l.pendingProps);case 24:return ls(l),p=Wt(Et),s===null?(y=ug(),y===null&&(y=nt,x=ag(),y.pooledCache=x,x.refCount++,x!==null&&(y.pooledCacheLanes|=d),y=x),l.memoizedState={parent:p,cache:y},dg(l),_i(l,Et,y)):((s.lanes&d)!==0&&(fg(s,l),nu(l,null,null,d),tu()),y=s.memoizedState,x=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),_i(l,Et,p)):(p=x.cache,_i(l,Et,p),p!==y.cache&&sg(l,[Et],d,!0))),Qt(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function oi(s){s.flags|=4}function Gg(s,l,d,p,y){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(BC())s.flags|=8192;else throw ds=Bd,cg}else s.flags&=-16777217}function iC(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!vE(l))if(BC())s.flags|=8192;else throw ds=Bd,cg}function Gd(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?z1():536870912,s.lanes|=l,_a|=l)}function lu(s,l){if(!je)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function ut(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,p=0;if(l)for(var y=s.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=p,s.childLanes=d,l}function _R(s,l,d){var p=l.pendingProps;switch(tg(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(l),null;case 1:return ut(l),null;case 3:return d=l.stateNode,p=null,s!==null&&(p=s.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ti(Et),Se(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Ta(l)?oi(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,rg())),ut(l),null;case 26:var y=l.type,x=l.memoizedState;return s===null?(oi(l),x!==null?(ut(l),iC(l,x)):(ut(l),Gg(l,y,null,p,d))):x?x!==s.memoizedState?(oi(l),ut(l),iC(l,x)):(ut(l),l.flags&=-16777217):(s=s.memoizedProps,s!==p&&oi(l),ut(l),Gg(l,y,s,p,d)),null;case 27:if(rn(l),d=fe.current,y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==p&&oi(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ut(l),null}s=le.current,Ta(l)?zv(l):(s=dE(y,p,d),l.stateNode=s,oi(l))}return ut(l),null;case 5:if(rn(l),y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==p&&oi(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ut(l),null}if(x=le.current,Ta(l))zv(l);else{var S=uf(fe.current);switch(x){case 1:x=S.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:x=S.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":x=S.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":x=S.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":x=S.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof p.is=="string"?S.createElement("select",{is:p.is}):S.createElement("select"),p.multiple?x.multiple=!0:p.size&&(x.size=p.size);break;default:x=typeof p.is=="string"?S.createElement(y,{is:p.is}):S.createElement(y)}}x[qt]=l,x[Dn]=p;e:for(S=l.child;S!==null;){if(S.tag===5||S.tag===6)x.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===l)break e;for(;S.sibling===null;){if(S.return===null||S.return===l)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}l.stateNode=x;e:switch(Yt(x,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&oi(l)}}return ut(l),Gg(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==p&&oi(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(s=fe.current,Ta(l)){if(s=l.stateNode,d=l.memoizedProps,p=null,y=Gt,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}s[qt]=l,s=!!(s.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||eE(s.nodeValue,d)),s||Ki(l,!0)}else s=uf(s).createTextNode(p),s[qt]=l,l.stateNode=s}return ut(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(p=Ta(l),d!==null){if(s===null){if(!p)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[qt]=l}else ss(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ut(l),s=!1}else d=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(jn(l),l):(jn(l),null);if((l.flags&128)!==0)throw Error(r(558))}return ut(l),null;case 13:if(p=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=Ta(l),p!==null&&p.dehydrated!==null){if(s===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[qt]=l}else ss(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ut(l),y=!1}else y=rg(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(jn(l),l):(jn(l),null)}return jn(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,s=s!==null&&s.memoizedState!==null,d&&(p=l.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),x=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(x=p.memoizedState.cachePool.pool),x!==y&&(p.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Gd(l,l.updateQueue),ut(l),null);case 4:return Se(),s===null&&m4(l.stateNode.containerInfo),ut(l),null;case 10:return ti(l.type),ut(l),null;case 19:if(V(vt),p=l.memoizedState,p===null)return ut(l),null;if(y=(l.flags&128)!==0,x=p.rendering,x===null)if(y)lu(p,!1);else{if(gt!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(x=Od(s),x!==null){for(l.flags|=128,lu(p,!1),s=x.updateQueue,l.updateQueue=s,Gd(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)Rv(d,s),d=d.sibling;return ne(vt,vt.current&1|2),je&&Zr(l,p.treeForkCount),l.child}s=s.sibling}p.tail!==null&&on()>Jd&&(l.flags|=128,y=!0,lu(p,!1),l.lanes=4194304)}else{if(!y)if(s=Od(x),s!==null){if(l.flags|=128,y=!0,s=s.updateQueue,l.updateQueue=s,Gd(l,s),lu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!je)return ut(l),null}else 2*on()-p.renderingStartTime>Jd&&d!==536870912&&(l.flags|=128,y=!0,lu(p,!1),l.lanes=4194304);p.isBackwards?(x.sibling=l.child,l.child=x):(s=p.last,s!==null?s.sibling=x:l.child=x,p.last=x)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=on(),s.sibling=null,d=vt.current,ne(vt,y?d&1|2:d&1),je&&Zr(l,p.treeForkCount),s):(ut(l),null);case 22:case 23:return jn(l),gg(),p=l.memoizedState!==null,s!==null?s.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(ut(l),l.subtreeFlags&6&&(l.flags|=8192)):ut(l),d=l.updateQueue,d!==null&&Gd(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),s!==null&&V(us),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),ti(Et),ut(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function jR(s,l){switch(tg(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return ti(Et),Se(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return rn(l),null;case 31:if(l.memoizedState!==null){if(jn(l),l.alternate===null)throw Error(r(340));ss()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(jn(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ss()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return V(vt),null;case 4:return Se(),null;case 10:return ti(l.type),null;case 22:case 23:return jn(l),gg(),s!==null&&V(us),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return ti(Et),null;case 25:return null;default:return null}}function oC(s,l){switch(tg(l),l.tag){case 3:ti(Et),Se();break;case 26:case 27:case 5:rn(l);break;case 4:Se();break;case 31:l.memoizedState!==null&&jn(l);break;case 13:jn(l);break;case 19:V(vt);break;case 10:ti(l.type);break;case 22:case 23:jn(l),gg(),s!==null&&V(us);break;case 24:ti(Et)}}function uu(s,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var y=p.next;d=y;do{if((d.tag&s)===s){p=void 0;var x=d.create,S=d.inst;p=x(),S.destroy=p}d=d.next}while(d!==y)}}catch(R){Ye(l,l.return,R)}}function Gi(s,l,d){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var x=y.next;p=x;do{if((p.tag&s)===s){var S=p.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,y=l;var z=d,Q=R;try{Q()}catch(re){Ye(y,z,re)}}}p=p.next}while(p!==x)}}catch(re){Ye(l,l.return,re)}}function sC(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{Yv(l,d)}catch(p){Ye(s,s.return,p)}}}function aC(s,l,d){d.props=ps(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(p){Ye(s,l,p)}}function cu(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var p=s.stateNode;break;case 30:p=s.stateNode;break;default:p=s.stateNode}typeof d=="function"?s.refCleanup=d(p):d.current=p}}catch(y){Ye(s,l,y)}}function Pr(s,l){var d=s.ref,p=s.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){Ye(s,l,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Ye(s,l,y)}else d.current=null}function lC(s){var l=s.type,d=s.memoizedProps,p=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(y){Ye(s,s.return,y)}}function Wg(s,l,d){try{var p=s.stateNode;cP(p,s.type,d,l),p[Dn]=l}catch(y){Ye(s,s.return,y)}}function uC(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&eo(s.type)||s.tag===4}function Qg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||uC(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&eo(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Yg(s,l,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Yr));else if(p!==4&&(p===27&&eo(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Yg(s,l,d),s=s.sibling;s!==null;)Yg(s,l,d),s=s.sibling}function Wd(s,l,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(p!==4&&(p===27&&eo(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Wd(s,l,d),s=s.sibling;s!==null;)Wd(s,l,d),s=s.sibling}function cC(s){var l=s.stateNode,d=s.memoizedProps;try{for(var p=s.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);Yt(l,p,d),l[qt]=s,l[Dn]=d}catch(x){Ye(s,s.return,x)}}var si=!1,St=!1,Xg=!1,dC=typeof WeakSet=="function"?WeakSet:Set,_t=null;function HR(s,l){if(s=s.containerInfo,y4=gf,s=Dv(s),Vm(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var y=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{d.nodeType,x.nodeType}catch{d=null;break e}var S=0,R=-1,z=-1,Q=0,re=0,se=s,X=null;t:for(;;){for(var ee;se!==d||y!==0&&se.nodeType!==3||(R=S+y),se!==x||p!==0&&se.nodeType!==3||(z=S+p),se.nodeType===3&&(S+=se.nodeValue.length),(ee=se.firstChild)!==null;)X=se,se=ee;for(;;){if(se===s)break t;if(X===d&&++Q===y&&(R=S),X===x&&++re===p&&(z=S),(ee=se.nextSibling)!==null)break;se=X,X=se.parentNode}se=ee}d=R===-1||z===-1?null:{start:R,end:z}}else d=null}d=d||{start:0,end:0}}else d=null;for(v4={focusedElem:s,selectionRange:d},gf=!1,_t=l;_t!==null;)if(l=_t,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,_t=s;else for(;_t!==null;){switch(l=_t,x=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)y=s[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&x!==null){s=void 0,d=l,y=x.memoizedProps,x=x.memoizedState,p=d.stateNode;try{var ge=ps(d.type,y);s=p.getSnapshotBeforeUpdate(ge,x),p.__reactInternalSnapshotBeforeUpdate=s}catch(De){Ye(d,d.return,De)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)E4(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":E4(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=l.sibling,s!==null){s.return=l.return,_t=s;break}_t=l.return}}function fC(s,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:li(s,d),p&4&&uu(5,d);break;case 1:if(li(s,d),p&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(S){Ye(d,d.return,S)}else{var y=ps(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(y,l,s.__reactInternalSnapshotBeforeUpdate)}catch(S){Ye(d,d.return,S)}}p&64&&sC(d),p&512&&cu(d,d.return);break;case 3:if(li(s,d),p&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Yv(s,l)}catch(S){Ye(d,d.return,S)}}break;case 27:l===null&&p&4&&cC(d);case 26:case 5:li(s,d),l===null&&p&4&&lC(d),p&512&&cu(d,d.return);break;case 12:li(s,d);break;case 31:li(s,d),p&4&&mC(s,d);break;case 13:li(s,d),p&4&&gC(s,d),p&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=JR.bind(null,d),yP(s,d))));break;case 22:if(p=d.memoizedState!==null||si,!p){l=l!==null&&l.memoizedState!==null||St,y=si;var x=St;si=p,(St=l)&&!x?ui(s,d,(d.subtreeFlags&8772)!==0):li(s,d),si=y,St=x}break;case 30:break;default:li(s,d)}}function hC(s){var l=s.alternate;l!==null&&(s.alternate=null,hC(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&wm(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var dt=null,Sn=!1;function ai(s,l,d){for(d=d.child;d!==null;)pC(s,l,d),d=d.sibling}function pC(s,l,d){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Ol,d)}catch{}switch(d.tag){case 26:St||Pr(d,l),ai(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:St||Pr(d,l);var p=dt,y=Sn;eo(d.type)&&(dt=d.stateNode,Sn=!1),ai(s,l,d),vu(d.stateNode),dt=p,Sn=y;break;case 5:St||Pr(d,l);case 6:if(p=dt,y=Sn,dt=null,ai(s,l,d),dt=p,Sn=y,dt!==null)if(Sn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(d.stateNode)}catch(x){Ye(d,l,x)}else try{dt.removeChild(d.stateNode)}catch(x){Ye(d,l,x)}break;case 18:dt!==null&&(Sn?(s=dt,sE(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),Qa(s)):sE(dt,d.stateNode));break;case 4:p=dt,y=Sn,dt=d.stateNode.containerInfo,Sn=!0,ai(s,l,d),dt=p,Sn=y;break;case 0:case 11:case 14:case 15:Gi(2,d,l),St||Gi(4,d,l),ai(s,l,d);break;case 1:St||(Pr(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&aC(d,l,p)),ai(s,l,d);break;case 21:ai(s,l,d);break;case 22:St=(p=St)||d.memoizedState!==null,ai(s,l,d),St=p;break;default:ai(s,l,d)}}function mC(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Qa(s)}catch(d){Ye(l,l.return,d)}}}function gC(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Qa(s)}catch(d){Ye(l,l.return,d)}}function VR(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new dC),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new dC),l;default:throw Error(r(435,s.tag))}}function Qd(s,l){var d=VR(s);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=ZR.bind(null,s,p);p.then(y,y)}})}function $n(s,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],x=s,S=l,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(eo(R.type)){dt=R.stateNode,Sn=!1;break e}break;case 5:dt=R.stateNode,Sn=!1;break e;case 3:case 4:dt=R.stateNode.containerInfo,Sn=!0;break e}R=R.return}if(dt===null)throw Error(r(160));pC(x,S,y),dt=null,Sn=!1,x=y.alternate,x!==null&&(x.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)bC(l,s),l=l.sibling}var yr=null;function bC(s,l){var d=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:$n(l,s),wn(s),p&4&&(Gi(3,s,s.return),uu(3,s),Gi(5,s,s.return));break;case 1:$n(l,s),wn(s),p&512&&(St||d===null||Pr(d,d.return)),p&64&&si&&(s=s.updateQueue,s!==null&&(p=s.callbacks,p!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var y=yr;if($n(l,s),wn(s),p&512&&(St||d===null||Pr(d,d.return)),p&4){var x=d!==null?d.memoizedState:null;if(p=s.memoizedState,d===null)if(p===null)if(s.stateNode===null){e:{p=s.type,d=s.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":x=y.getElementsByTagName("title")[0],(!x||x[zl]||x[qt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(p),y.head.insertBefore(x,y.querySelector("head > title"))),Yt(x,p,d),x[qt]=s,Kt(x),p=x;break e;case"link":var S=bE("link","href",y).get(p+(d.href||""));if(S){for(var R=0;R<S.length;R++)if(x=S[R],x.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&x.getAttribute("rel")===(d.rel==null?null:d.rel)&&x.getAttribute("title")===(d.title==null?null:d.title)&&x.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){S.splice(R,1);break t}}x=y.createElement(p),Yt(x,p,d),y.head.appendChild(x);break;case"meta":if(S=bE("meta","content",y).get(p+(d.content||""))){for(R=0;R<S.length;R++)if(x=S[R],x.getAttribute("content")===(d.content==null?null:""+d.content)&&x.getAttribute("name")===(d.name==null?null:d.name)&&x.getAttribute("property")===(d.property==null?null:d.property)&&x.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&x.getAttribute("charset")===(d.charSet==null?null:d.charSet)){S.splice(R,1);break t}}x=y.createElement(p),Yt(x,p,d),y.head.appendChild(x);break;default:throw Error(r(468,p))}x[qt]=s,Kt(x),p=x}s.stateNode=p}else yE(y,s.type,s.stateNode);else s.stateNode=gE(y,p,s.memoizedProps);else x!==p?(x===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):x.count--,p===null?yE(y,s.type,s.stateNode):gE(y,p,s.memoizedProps)):p===null&&s.stateNode!==null&&Wg(s,s.memoizedProps,d.memoizedProps)}break;case 27:$n(l,s),wn(s),p&512&&(St||d===null||Pr(d,d.return)),d!==null&&p&4&&Wg(s,s.memoizedProps,d.memoizedProps);break;case 5:if($n(l,s),wn(s),p&512&&(St||d===null||Pr(d,d.return)),s.flags&32){y=s.stateNode;try{ya(y,"")}catch(ge){Ye(s,s.return,ge)}}p&4&&s.stateNode!=null&&(y=s.memoizedProps,Wg(s,y,d!==null?d.memoizedProps:y)),p&1024&&(Xg=!0);break;case 6:if($n(l,s),wn(s),p&4){if(s.stateNode===null)throw Error(r(162));p=s.memoizedProps,d=s.stateNode;try{d.nodeValue=p}catch(ge){Ye(s,s.return,ge)}}break;case 3:if(ff=null,y=yr,yr=cf(l.containerInfo),$n(l,s),yr=y,wn(s),p&4&&d!==null&&d.memoizedState.isDehydrated)try{Qa(l.containerInfo)}catch(ge){Ye(s,s.return,ge)}Xg&&(Xg=!1,yC(s));break;case 4:p=yr,yr=cf(s.stateNode.containerInfo),$n(l,s),wn(s),yr=p;break;case 12:$n(l,s),wn(s);break;case 31:$n(l,s),wn(s),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Qd(s,p)));break;case 13:$n(l,s),wn(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Xd=on()),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Qd(s,p)));break;case 22:y=s.memoizedState!==null;var z=d!==null&&d.memoizedState!==null,Q=si,re=St;if(si=Q||y,St=re||z,$n(l,s),St=re,si=Q,wn(s),p&8192)e:for(l=s.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||z||si||St||ms(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){z=d=l;try{if(x=z.stateNode,y)S=x.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=z.stateNode;var se=z.memoizedProps.style,X=se!=null&&se.hasOwnProperty("display")?se.display:null;R.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ge){Ye(z,z.return,ge)}}}else if(l.tag===6){if(d===null){z=l;try{z.stateNode.nodeValue=y?"":z.memoizedProps}catch(ge){Ye(z,z.return,ge)}}}else if(l.tag===18){if(d===null){z=l;try{var ee=z.stateNode;y?aE(ee,!0):aE(z.stateNode,!1)}catch(ge){Ye(z,z.return,ge)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=s.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,Qd(s,d))));break;case 19:$n(l,s),wn(s),p&4&&(p=s.updateQueue,p!==null&&(s.updateQueue=null,Qd(s,p)));break;case 30:break;case 21:break;default:$n(l,s),wn(s)}}function wn(s){var l=s.flags;if(l&2){try{for(var d,p=s.return;p!==null;){if(uC(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,x=Qg(s);Wd(s,x,y);break;case 5:var S=d.stateNode;d.flags&32&&(ya(S,""),d.flags&=-33);var R=Qg(s);Wd(s,R,S);break;case 3:case 4:var z=d.stateNode.containerInfo,Q=Qg(s);Yg(s,Q,z);break;default:throw Error(r(161))}}catch(re){Ye(s,s.return,re)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function yC(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;yC(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function li(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)fC(s,l.alternate,l),l=l.sibling}function ms(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Gi(4,l,l.return),ms(l);break;case 1:Pr(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&aC(l,l.return,d),ms(l);break;case 27:vu(l.stateNode);case 26:case 5:Pr(l,l.return),ms(l);break;case 22:l.memoizedState===null&&ms(l);break;case 30:ms(l);break;default:ms(l)}s=s.sibling}}function ui(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=s,x=l,S=x.flags;switch(x.tag){case 0:case 11:case 15:ui(y,x,d),uu(4,x);break;case 1:if(ui(y,x,d),p=x,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Q){Ye(p,p.return,Q)}if(p=x,y=p.updateQueue,y!==null){var R=p.stateNode;try{var z=y.shared.hiddenCallbacks;if(z!==null)for(y.shared.hiddenCallbacks=null,y=0;y<z.length;y++)Qv(z[y],R)}catch(Q){Ye(p,p.return,Q)}}d&&S&64&&sC(x),cu(x,x.return);break;case 27:cC(x);case 26:case 5:ui(y,x,d),d&&p===null&&S&4&&lC(x),cu(x,x.return);break;case 12:ui(y,x,d);break;case 31:ui(y,x,d),d&&S&4&&mC(y,x);break;case 13:ui(y,x,d),d&&S&4&&gC(y,x);break;case 22:x.memoizedState===null&&ui(y,x,d),cu(x,x.return);break;case 30:break;default:ui(y,x,d)}l=l.sibling}}function Jg(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Yl(d))}function Zg(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Yl(s))}function vr(s,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)vC(s,l,d,p),l=l.sibling}function vC(s,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:vr(s,l,d,p),y&2048&&uu(9,l);break;case 1:vr(s,l,d,p);break;case 3:vr(s,l,d,p),y&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Yl(s)));break;case 12:if(y&2048){vr(s,l,d,p),s=l.stateNode;try{var x=l.memoizedProps,S=x.id,R=x.onPostCommit;typeof R=="function"&&R(S,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(z){Ye(l,l.return,z)}}else vr(s,l,d,p);break;case 31:vr(s,l,d,p);break;case 13:vr(s,l,d,p);break;case 23:break;case 22:x=l.stateNode,S=l.alternate,l.memoizedState!==null?x._visibility&2?vr(s,l,d,p):du(s,l):x._visibility&2?vr(s,l,d,p):(x._visibility|=2,Ia(s,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&Jg(S,l);break;case 24:vr(s,l,d,p),y&2048&&Zg(l.alternate,l);break;default:vr(s,l,d,p)}}function Ia(s,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var x=s,S=l,R=d,z=p,Q=S.flags;switch(S.tag){case 0:case 11:case 15:Ia(x,S,R,z,y),uu(8,S);break;case 23:break;case 22:var re=S.stateNode;S.memoizedState!==null?re._visibility&2?Ia(x,S,R,z,y):du(x,S):(re._visibility|=2,Ia(x,S,R,z,y)),y&&Q&2048&&Jg(S.alternate,S);break;case 24:Ia(x,S,R,z,y),y&&Q&2048&&Zg(S.alternate,S);break;default:Ia(x,S,R,z,y)}l=l.sibling}}function du(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,p=l,y=p.flags;switch(p.tag){case 22:du(d,p),y&2048&&Jg(p.alternate,p);break;case 24:du(d,p),y&2048&&Zg(p.alternate,p);break;default:du(d,p)}l=l.sibling}}var fu=8192;function Fa(s,l,d){if(s.subtreeFlags&fu)for(s=s.child;s!==null;)xC(s,l,d),s=s.sibling}function xC(s,l,d){switch(s.tag){case 26:Fa(s,l,d),s.flags&fu&&s.memoizedState!==null&&BP(d,yr,s.memoizedState,s.memoizedProps);break;case 5:Fa(s,l,d);break;case 3:case 4:var p=yr;yr=cf(s.stateNode.containerInfo),Fa(s,l,d),yr=p;break;case 22:s.memoizedState===null&&(p=s.alternate,p!==null&&p.memoizedState!==null?(p=fu,fu=16777216,Fa(s,l,d),fu=p):Fa(s,l,d));break;default:Fa(s,l,d)}}function CC(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function hu(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];_t=p,DC(p,s)}CC(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)EC(s),s=s.sibling}function EC(s){switch(s.tag){case 0:case 11:case 15:hu(s),s.flags&2048&&Gi(9,s,s.return);break;case 3:hu(s);break;case 12:hu(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Yd(s)):hu(s);break;default:hu(s)}}function Yd(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];_t=p,DC(p,s)}CC(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Gi(8,l,l.return),Yd(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Yd(l));break;default:Yd(l)}s=s.sibling}}function DC(s,l){for(;_t!==null;){var d=_t;switch(d.tag){case 0:case 11:case 15:Gi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Yl(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,_t=p;else e:for(d=s;_t!==null;){p=_t;var y=p.sibling,x=p.return;if(hC(p),p===d){_t=null;break e}if(y!==null){y.return=x,_t=y;break e}_t=x}}}var UR={getCacheForType:function(s){var l=Wt(Et),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return Wt(Et).controller.signal}},qR=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Oe=null,Fe=0,Qe=0,Hn=null,Wi=!1,Ka=!1,e4=!1,ci=0,gt=0,Qi=0,gs=0,t4=0,Vn=0,_a=0,pu=null,Tn=null,n4=!1,Xd=0,kC=0,Jd=1/0,Zd=null,Yi=null,Pt=0,Xi=null,ja=null,di=0,r4=0,i4=null,SC=null,mu=0,o4=null;function Un(){return(Ge&2)!==0&&Fe!==0?Fe&-Fe:N.T!==null?d4():_1()}function $C(){if(Vn===0)if((Fe&536870912)===0||je){var s=ad;ad<<=1,(ad&3932160)===0&&(ad=262144),Vn=s}else Vn=536870912;return s=_n.current,s!==null&&(s.flags|=32),Vn}function An(s,l,d){(s===nt&&(Qe===2||Qe===9)||s.cancelPendingCommit!==null)&&(Ha(s,0),Ji(s,Fe,Vn,!1)),Ll(s,d),((Ge&2)===0||s!==nt)&&(s===nt&&((Ge&2)===0&&(gs|=d),gt===4&&Ji(s,Fe,Vn,!1)),Or(s))}function wC(s,l,d){if((Ge&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&s.expiredLanes)===0||Nl(s,l),y=p?QR(s,l):a4(s,l,!0),x=p;do{if(y===0){Ka&&!p&&Ji(s,l,0,!1);break}else{if(d=s.current.alternate,x&&!GR(d)){y=a4(s,l,!1),x=!1;continue}if(y===2){if(x=l,s.errorRecoveryDisabledLanes&x)var S=0;else S=s.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){l=S;e:{var R=s;y=pu;var z=R.current.memoizedState.isDehydrated;if(z&&(Ha(R,S).flags|=256),S=a4(R,S,!1),S!==2){if(e4&&!z){R.errorRecoveryDisabledLanes|=x,gs|=x,y=4;break e}x=Tn,Tn=y,x!==null&&(Tn===null?Tn=x:Tn.push.apply(Tn,x))}y=S}if(x=!1,y!==2)continue}}if(y===1){Ha(s,0),Ji(s,l,0,!0);break}e:{switch(p=s,x=y,x){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:Ji(p,l,Vn,!Wi);break e;case 2:Tn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Xd+300-on(),10<y)){if(Ji(p,l,Vn,!Wi),ud(p,0,!0)!==0)break e;di=l,p.timeoutHandle=iE(TC.bind(null,p,d,Tn,Zd,n4,l,Vn,gs,_a,Wi,x,"Throttled",-0,0),y);break e}TC(p,d,Tn,Zd,n4,l,Vn,gs,_a,Wi,x,null,-0,0)}}break}while(!0);Or(s)}function TC(s,l,d,p,y,x,S,R,z,Q,re,se,X,ee){if(s.timeoutHandle=-1,se=l.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yr},xC(l,x,se);var ge=(x&62914560)===x?Xd-on():(x&4194048)===x?kC-on():0;if(ge=MP(se,ge),ge!==null){di=x,s.cancelPendingCommit=ge(LC.bind(null,s,l,x,d,p,y,S,R,z,re,se,null,X,ee)),Ji(s,x,S,!Q);return}}LC(s,l,x,d,p,y,S,R,z)}function GR(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var y=d[p],x=y.getSnapshot;y=y.value;try{if(!Fn(x(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Ji(s,l,d,p){l&=~t4,l&=~gs,s.suspendedLanes|=l,s.pingedLanes&=~l,p&&(s.warmLanes|=l),p=s.expirationTimes;for(var y=l;0<y;){var x=31-In(y),S=1<<x;p[x]=-1,y&=~S}d!==0&&I1(s,d,l)}function ef(){return(Ge&6)===0?(gu(0),!1):!0}function s4(){if(Oe!==null){if(Qe===0)var s=Oe.return;else s=Oe,ei=as=null,Eg(s),Pa=null,Jl=0,s=Oe;for(;s!==null;)oC(s.alternate,s),s=s.return;Oe=null}}function Ha(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,hP(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),di=0,s4(),nt=s,Oe=d=Jr(s.current,null),Fe=l,Qe=0,Hn=null,Wi=!1,Ka=Nl(s,l),e4=!1,_a=Vn=t4=gs=Qi=gt=0,Tn=pu=null,n4=!1,(l&8)!==0&&(l|=l&32);var p=s.entangledLanes;if(p!==0)for(s=s.entanglements,p&=l;0<p;){var y=31-In(p),x=1<<y;l|=s[y],p&=~x}return ci=l,Cd(),d}function AC(s,l){Ae=null,N.H=su,l===Ra||l===Ad?(l=Uv(),Qe=3):l===cg?(l=Uv(),Qe=4):Qe=l===Ig?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Hn=l,Oe===null&&(gt=1,Hd(s,Zn(l,s.current)))}function BC(){var s=_n.current;return s===null?!0:(Fe&4194048)===Fe?rr===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?s===rr:!1}function MC(){var s=N.H;return N.H=su,s===null?su:s}function RC(){var s=N.A;return N.A=UR,s}function tf(){gt=4,Wi||(Fe&4194048)!==Fe&&_n.current!==null||(Ka=!0),(Qi&134217727)===0&&(gs&134217727)===0||nt===null||Ji(nt,Fe,Vn,!1)}function a4(s,l,d){var p=Ge;Ge|=2;var y=MC(),x=RC();(nt!==s||Fe!==l)&&(Zd=null,Ha(s,l)),l=!1;var S=gt;e:do try{if(Qe!==0&&Oe!==null){var R=Oe,z=Hn;switch(Qe){case 8:s4(),S=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(l=!0);var Q=Qe;if(Qe=0,Hn=null,Va(s,R,z,Q),d&&Ka){S=0;break e}break;default:Q=Qe,Qe=0,Hn=null,Va(s,R,z,Q)}}WR(),S=gt;break}catch(re){AC(s,re)}while(!0);return l&&s.shellSuspendCounter++,ei=as=null,Ge=p,N.H=y,N.A=x,Oe===null&&(nt=null,Fe=0,Cd()),S}function WR(){for(;Oe!==null;)PC(Oe)}function QR(s,l){var d=Ge;Ge|=2;var p=MC(),y=RC();nt!==s||Fe!==l?(Zd=null,Jd=on()+500,Ha(s,l)):Ka=Nl(s,l);e:do try{if(Qe!==0&&Oe!==null){l=Oe;var x=Hn;t:switch(Qe){case 1:Qe=0,Hn=null,Va(s,l,x,1);break;case 2:case 9:if(Hv(x)){Qe=0,Hn=null,OC(l);break}l=function(){Qe!==2&&Qe!==9||nt!==s||(Qe=7),Or(s)},x.then(l,l);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Hv(x)?(Qe=0,Hn=null,OC(l)):(Qe=0,Hn=null,Va(s,l,x,7));break;case 5:var S=null;switch(Oe.tag){case 26:S=Oe.memoizedState;case 5:case 27:var R=Oe;if(S?vE(S):R.stateNode.complete){Qe=0,Hn=null;var z=R.sibling;if(z!==null)Oe=z;else{var Q=R.return;Q!==null?(Oe=Q,nf(Q)):Oe=null}break t}}Qe=0,Hn=null,Va(s,l,x,5);break;case 6:Qe=0,Hn=null,Va(s,l,x,6);break;case 8:s4(),gt=6;break e;default:throw Error(r(462))}}YR();break}catch(re){AC(s,re)}while(!0);return ei=as=null,N.H=p,N.A=y,Ge=d,Oe!==null?0:(nt=null,Fe=0,Cd(),gt)}function YR(){for(;Oe!==null&&!od();)PC(Oe)}function PC(s){var l=rC(s.alternate,s,ci);s.memoizedProps=s.pendingProps,l===null?nf(s):Oe=l}function OC(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=Xx(d,l,l.pendingProps,l.type,void 0,Fe);break;case 11:l=Xx(d,l,l.pendingProps,l.type.render,l.ref,Fe);break;case 5:Eg(l);default:oC(d,l),l=Oe=Rv(l,ci),l=rC(d,l,ci)}s.memoizedProps=s.pendingProps,l===null?nf(s):Oe=l}function Va(s,l,d,p){ei=as=null,Eg(l),Pa=null,Jl=0;var y=l.return;try{if(IR(s,y,l,d,Fe)){gt=1,Hd(s,Zn(d,s.current)),Oe=null;return}}catch(x){if(y!==null)throw Oe=y,x;gt=1,Hd(s,Zn(d,s.current)),Oe=null;return}l.flags&32768?(je||p===1?s=!0:Ka||(Fe&536870912)!==0?s=!1:(Wi=s=!0,(p===2||p===9||p===3||p===6)&&(p=_n.current,p!==null&&p.tag===13&&(p.flags|=16384))),NC(l,s)):nf(l)}function nf(s){var l=s;do{if((l.flags&32768)!==0){NC(l,Wi);return}s=l.return;var d=_R(l.alternate,l,ci);if(d!==null){Oe=d;return}if(l=l.sibling,l!==null){Oe=l;return}Oe=l=s}while(l!==null);gt===0&&(gt=5)}function NC(s,l){do{var d=jR(s.alternate,s);if(d!==null){d.flags&=32767,Oe=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){Oe=s;return}Oe=s=d}while(s!==null);gt=6,Oe=null}function LC(s,l,d,p,y,x,S,R,z){s.cancelPendingCommit=null;do rf();while(Pt!==0);if((Ge&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(x=l.lanes|l.childLanes,x|=Qm,A8(s,d,x,S,R,z),s===nt&&(Oe=nt=null,Fe=0),ja=l,Xi=s,di=d,r4=x,i4=y,SC=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,eP(da,function(){return _C(),null})):(s.callbackNode=null,s.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=N.T,N.T=null,y=K.p,K.p=2,S=Ge,Ge|=4;try{HR(s,l,d)}finally{Ge=S,K.p=y,N.T=p}}Pt=1,zC(),IC(),FC()}}function zC(){if(Pt===1){Pt=0;var s=Xi,l=ja,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=N.T,N.T=null;var p=K.p;K.p=2;var y=Ge;Ge|=4;try{bC(l,s);var x=v4,S=Dv(s.containerInfo),R=x.focusedElem,z=x.selectionRange;if(S!==R&&R&&R.ownerDocument&&Ev(R.ownerDocument.documentElement,R)){if(z!==null&&Vm(R)){var Q=z.start,re=z.end;if(re===void 0&&(re=Q),"selectionStart"in R)R.selectionStart=Q,R.selectionEnd=Math.min(re,R.value.length);else{var se=R.ownerDocument||document,X=se&&se.defaultView||window;if(X.getSelection){var ee=X.getSelection(),ge=R.textContent.length,De=Math.min(z.start,ge),tt=z.end===void 0?De:Math.min(z.end,ge);!ee.extend&&De>tt&&(S=tt,tt=De,De=S);var q=Cv(R,De),_=Cv(R,tt);if(q&&_&&(ee.rangeCount!==1||ee.anchorNode!==q.node||ee.anchorOffset!==q.offset||ee.focusNode!==_.node||ee.focusOffset!==_.offset)){var W=se.createRange();W.setStart(q.node,q.offset),ee.removeAllRanges(),De>tt?(ee.addRange(W),ee.extend(_.node,_.offset)):(W.setEnd(_.node,_.offset),ee.addRange(W))}}}}for(se=[],ee=R;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<se.length;R++){var oe=se[R];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}gf=!!y4,v4=y4=null}finally{Ge=y,K.p=p,N.T=d}}s.current=l,Pt=2}}function IC(){if(Pt===2){Pt=0;var s=Xi,l=ja,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=N.T,N.T=null;var p=K.p;K.p=2;var y=Ge;Ge|=4;try{fC(s,l.alternate,l)}finally{Ge=y,K.p=p,N.T=d}}Pt=3}}function FC(){if(Pt===4||Pt===3){Pt=0,Em();var s=Xi,l=ja,d=di,p=SC;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Pt=5:(Pt=0,ja=Xi=null,KC(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(Yi=null),Sm(d),l=l.stateNode,zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Ol,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=N.T,y=K.p,K.p=2,N.T=null;try{for(var x=s.onRecoverableError,S=0;S<p.length;S++){var R=p[S];x(R.value,{componentStack:R.stack})}}finally{N.T=l,K.p=y}}(di&3)!==0&&rf(),Or(s),y=s.pendingLanes,(d&261930)!==0&&(y&42)!==0?s===o4?mu++:(mu=0,o4=s):mu=0,gu(0)}}function KC(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Yl(l)))}function rf(){return zC(),IC(),FC(),_C()}function _C(){if(Pt!==5)return!1;var s=Xi,l=r4;r4=0;var d=Sm(di),p=N.T,y=K.p;try{K.p=32>d?32:d,N.T=null,d=i4,i4=null;var x=Xi,S=di;if(Pt=0,ja=Xi=null,di=0,(Ge&6)!==0)throw Error(r(331));var R=Ge;if(Ge|=4,EC(x.current),vC(x,x.current,S,d),Ge=R,gu(0,!1),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Ol,x)}catch{}return!0}finally{K.p=y,N.T=p,KC(s,l)}}function jC(s,l,d){l=Zn(d,l),l=zg(s.stateNode,l,2),s=Vi(s,l,2),s!==null&&(Ll(s,2),Or(s))}function Ye(s,l,d){if(s.tag===3)jC(s,s,d);else for(;l!==null;){if(l.tag===3){jC(l,s,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Yi===null||!Yi.has(p))){s=Zn(d,s),d=Hx(2),p=Vi(l,d,2),p!==null&&(Vx(d,p,l,s),Ll(p,2),Or(p));break}}l=l.return}}function l4(s,l,d){var p=s.pingCache;if(p===null){p=s.pingCache=new qR;var y=new Set;p.set(l,y)}else y=p.get(l),y===void 0&&(y=new Set,p.set(l,y));y.has(d)||(e4=!0,y.add(d),s=XR.bind(null,s,l,d),l.then(s,s))}function XR(s,l,d){var p=s.pingCache;p!==null&&p.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,nt===s&&(Fe&d)===d&&(gt===4||gt===3&&(Fe&62914560)===Fe&&300>on()-Xd?(Ge&2)===0&&Ha(s,0):t4|=d,_a===Fe&&(_a=0)),Or(s)}function HC(s,l){l===0&&(l=z1()),s=rs(s,l),s!==null&&(Ll(s,l),Or(s))}function JR(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),HC(s,d)}function ZR(s,l){var d=0;switch(s.tag){case 31:case 13:var p=s.stateNode,y=s.memoizedState;y!==null&&(d=y.retryLane);break;case 19:p=s.stateNode;break;case 22:p=s.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),HC(s,d)}function eP(s,l){return gr(s,l)}var of=null,Ua=null,u4=!1,sf=!1,c4=!1,Zi=0;function Or(s){s!==Ua&&s.next===null&&(Ua===null?of=Ua=s:Ua=Ua.next=s),sf=!0,u4||(u4=!0,nP())}function gu(s,l){if(!c4&&sf){c4=!0;do for(var d=!1,p=of;p!==null;){if(s!==0){var y=p.pendingLanes;if(y===0)var x=0;else{var S=p.suspendedLanes,R=p.pingedLanes;x=(1<<31-In(42|s)+1)-1,x&=y&~(S&~R),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(d=!0,GC(p,x))}else x=Fe,x=ud(p,p===nt?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(x&3)===0||Nl(p,x)||(d=!0,GC(p,x));p=p.next}while(d);c4=!1}}function tP(){VC()}function VC(){sf=u4=!1;var s=0;Zi!==0&&fP()&&(s=Zi);for(var l=on(),d=null,p=of;p!==null;){var y=p.next,x=UC(p,l);x===0?(p.next=null,d===null?of=y:d.next=y,y===null&&(Ua=d)):(d=p,(s!==0||(x&3)!==0)&&(sf=!0)),p=y}Pt!==0&&Pt!==5||gu(s),Zi!==0&&(Zi=0)}function UC(s,l){for(var d=s.suspendedLanes,p=s.pingedLanes,y=s.expirationTimes,x=s.pendingLanes&-62914561;0<x;){var S=31-In(x),R=1<<S,z=y[S];z===-1?((R&d)===0||(R&p)!==0)&&(y[S]=T8(R,l)):z<=l&&(s.expiredLanes|=R),x&=~R}if(l=nt,d=Fe,d=ud(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p=s.callbackNode,d===0||s===l&&(Qe===2||Qe===9)||s.cancelPendingCommit!==null)return p!==null&&p!==null&&Pl(p),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||Nl(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(p!==null&&Pl(p),Sm(d)){case 2:case 8:d=Br;break;case 32:d=da;break;case 268435456:d=L1;break;default:d=da}return p=qC.bind(null,s),d=gr(d,p),s.callbackPriority=l,s.callbackNode=d,l}return p!==null&&p!==null&&Pl(p),s.callbackPriority=2,s.callbackNode=null,2}function qC(s,l){if(Pt!==0&&Pt!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(rf()&&s.callbackNode!==d)return null;var p=Fe;return p=ud(s,s===nt?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),p===0?null:(wC(s,p,l),UC(s,on()),s.callbackNode!=null&&s.callbackNode===d?qC.bind(null,s):null)}function GC(s,l){if(rf())return null;wC(s,l,!0)}function nP(){pP(function(){(Ge&6)!==0?gr(Ut,tP):VC()})}function d4(){if(Zi===0){var s=Ba;s===0&&(s=sd,sd<<=1,(sd&261888)===0&&(sd=256)),Zi=s}return Zi}function WC(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:hd(""+s)}function QC(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function rP(s,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var x=WC((y[Dn]||null).action),S=p.submitter;S&&(l=(l=S[Dn]||null)?WC(l.formAction):S.getAttribute("formAction"),l!==null&&(x=l,S=null));var R=new bd("action","action",null,p,y);s.push({event:R,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Zi!==0){var z=S?QC(y,S):new FormData(y);Mg(d,{pending:!0,data:z,method:y.method,action:x},null,z)}}else typeof x=="function"&&(R.preventDefault(),z=S?QC(y,S):new FormData(y),Mg(d,{pending:!0,data:z,method:y.method,action:x},x,z))},currentTarget:y}]})}}for(var f4=0;f4<Wm.length;f4++){var h4=Wm[f4],iP=h4.toLowerCase(),oP=h4[0].toUpperCase()+h4.slice(1);br(iP,"on"+oP)}br($v,"onAnimationEnd"),br(wv,"onAnimationIteration"),br(Tv,"onAnimationStart"),br("dblclick","onDoubleClick"),br("focusin","onFocus"),br("focusout","onBlur"),br(CR,"onTransitionRun"),br(ER,"onTransitionStart"),br(DR,"onTransitionCancel"),br(Av,"onTransitionEnd"),ga("onMouseEnter",["mouseout","mouseover"]),ga("onMouseLeave",["mouseout","mouseover"]),ga("onPointerEnter",["pointerout","pointerover"]),ga("onPointerLeave",["pointerout","pointerover"]),Zo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zo("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bu="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(" "),sP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bu));function YC(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var p=s[d],y=p.event;p=p.listeners;e:{var x=void 0;if(l)for(var S=p.length-1;0<=S;S--){var R=p[S],z=R.instance,Q=R.currentTarget;if(R=R.listener,z!==x&&y.isPropagationStopped())break e;x=R,y.currentTarget=Q;try{x(y)}catch(re){xd(re)}y.currentTarget=null,x=z}else for(S=0;S<p.length;S++){if(R=p[S],z=R.instance,Q=R.currentTarget,R=R.listener,z!==x&&y.isPropagationStopped())break e;x=R,y.currentTarget=Q;try{x(y)}catch(re){xd(re)}y.currentTarget=null,x=z}}}}function Ne(s,l){var d=l[$m];d===void 0&&(d=l[$m]=new Set);var p=s+"__bubble";d.has(p)||(XC(l,s,2,!1),d.add(p))}function p4(s,l,d){var p=0;l&&(p|=4),XC(d,s,p,l)}var af="_reactListening"+Math.random().toString(36).slice(2);function m4(s){if(!s[af]){s[af]=!0,V1.forEach(function(d){d!=="selectionchange"&&(sP.has(d)||p4(d,!1,s),p4(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[af]||(l[af]=!0,p4("selectionchange",!1,l))}}function XC(s,l,d,p){switch($E(l)){case 2:var y=OP;break;case 8:y=NP;break;default:y=B4}d=y.bind(null,l,d,s),y=void 0,!Nm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),p?y!==void 0?s.addEventListener(l,d,{capture:!0,passive:y}):s.addEventListener(l,d,!0):y!==void 0?s.addEventListener(l,d,{passive:y}):s.addEventListener(l,d,!1)}function g4(s,l,d,p,y){var x=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var S=p.tag;if(S===3||S===4){var R=p.stateNode.containerInfo;if(R===y)break;if(S===4)for(S=p.return;S!==null;){var z=S.tag;if((z===3||z===4)&&S.stateNode.containerInfo===y)return;S=S.return}for(;R!==null;){if(S=ha(R),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){p=x=S;continue e}R=R.parentNode}}p=p.return}nv(function(){var Q=x,re=Pm(d),se=[];e:{var X=Bv.get(s);if(X!==void 0){var ee=bd,ge=s;switch(s){case"keypress":if(md(d)===0)break e;case"keydown":case"keyup":ee=Z8;break;case"focusin":ge="focus",ee=Fm;break;case"focusout":ge="blur",ee=Fm;break;case"beforeblur":case"afterblur":ee=Fm;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=ov;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=_8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=nR;break;case $v:case wv:case Tv:ee=V8;break;case Av:ee=iR;break;case"scroll":case"scrollend":ee=F8;break;case"wheel":ee=sR;break;case"copy":case"cut":case"paste":ee=q8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=av;break;case"toggle":case"beforetoggle":ee=lR}var De=(l&4)!==0,tt=!De&&(s==="scroll"||s==="scrollend"),q=De?X!==null?X+"Capture":null:X;De=[];for(var _=Q,W;_!==null;){var oe=_;if(W=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||W===null||q===null||(oe=Fl(_,q),oe!=null&&De.push(yu(_,oe,W))),tt)break;_=_.return}0<De.length&&(X=new ee(X,ge,null,d,re),se.push({event:X,listeners:De}))}}if((l&7)===0){e:{if(X=s==="mouseover"||s==="pointerover",ee=s==="mouseout"||s==="pointerout",X&&d!==Rm&&(ge=d.relatedTarget||d.fromElement)&&(ha(ge)||ge[fa]))break e;if((ee||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,ee?(ge=d.relatedTarget||d.toElement,ee=Q,ge=ge?ha(ge):null,ge!==null&&(tt=o(ge),De=ge.tag,ge!==tt||De!==5&&De!==27&&De!==6)&&(ge=null)):(ee=null,ge=Q),ee!==ge)){if(De=ov,oe="onMouseLeave",q="onMouseEnter",_="mouse",(s==="pointerout"||s==="pointerover")&&(De=av,oe="onPointerLeave",q="onPointerEnter",_="pointer"),tt=ee==null?X:Il(ee),W=ge==null?X:Il(ge),X=new De(oe,_+"leave",ee,d,re),X.target=tt,X.relatedTarget=W,oe=null,ha(re)===Q&&(De=new De(q,_+"enter",ge,d,re),De.target=W,De.relatedTarget=tt,oe=De),tt=oe,ee&&ge)t:{for(De=aP,q=ee,_=ge,W=0,oe=q;oe;oe=De(oe))W++;oe=0;for(var ve=_;ve;ve=De(ve))oe++;for(;0<W-oe;)q=De(q),W--;for(;0<oe-W;)_=De(_),oe--;for(;W--;){if(q===_||_!==null&&q===_.alternate){De=q;break t}q=De(q),_=De(_)}De=null}else De=null;ee!==null&&JC(se,X,ee,De,!1),ge!==null&&tt!==null&&JC(se,tt,ge,De,!0)}}e:{if(X=Q?Il(Q):window,ee=X.nodeName&&X.nodeName.toLowerCase(),ee==="select"||ee==="input"&&X.type==="file")var Ue=mv;else if(hv(X))if(gv)Ue=yR;else{Ue=gR;var ye=mR}else ee=X.nodeName,!ee||ee.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Mm(Q.elementType)&&(Ue=mv):Ue=bR;if(Ue&&(Ue=Ue(s,Q))){pv(se,Ue,d,re);break e}ye&&ye(s,X,Q),s==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&Bm(X,"number",X.value)}switch(ye=Q?Il(Q):window,s){case"focusin":(hv(ye)||ye.contentEditable==="true")&&(Ea=ye,Um=Q,Gl=null);break;case"focusout":Gl=Um=Ea=null;break;case"mousedown":qm=!0;break;case"contextmenu":case"mouseup":case"dragend":qm=!1,kv(se,d,re);break;case"selectionchange":if(xR)break;case"keydown":case"keyup":kv(se,d,re)}var Be;if(_m)e:{switch(s){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ca?dv(s,d)&&(Ke="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Ke="onCompositionStart");Ke&&(lv&&d.locale!=="ko"&&(Ca||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ca&&(Be=rv()):(zi=re,Lm="value"in zi?zi.value:zi.textContent,Ca=!0)),ye=lf(Q,Ke),0<ye.length&&(Ke=new sv(Ke,s,null,d,re),se.push({event:Ke,listeners:ye}),Be?Ke.data=Be:(Be=fv(d),Be!==null&&(Ke.data=Be)))),(Be=cR?dR(s,d):fR(s,d))&&(Ke=lf(Q,"onBeforeInput"),0<Ke.length&&(ye=new sv("onBeforeInput","beforeinput",null,d,re),se.push({event:ye,listeners:Ke}),ye.data=Be)),rP(se,s,Q,d,re)}YC(se,l)})}function yu(s,l,d){return{instance:s,listener:l,currentTarget:d}}function lf(s,l){for(var d=l+"Capture",p=[];s!==null;){var y=s,x=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||x===null||(y=Fl(s,d),y!=null&&p.unshift(yu(s,y,x)),y=Fl(s,l),y!=null&&p.push(yu(s,y,x))),s.tag===3)return p;s=s.return}return[]}function aP(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function JC(s,l,d,p,y){for(var x=l._reactName,S=[];d!==null&&d!==p;){var R=d,z=R.alternate,Q=R.stateNode;if(R=R.tag,z!==null&&z===p)break;R!==5&&R!==26&&R!==27||Q===null||(z=Q,y?(Q=Fl(d,x),Q!=null&&S.unshift(yu(d,Q,z))):y||(Q=Fl(d,x),Q!=null&&S.push(yu(d,Q,z)))),d=d.return}S.length!==0&&s.push({event:l,listeners:S})}var lP=/\r\n?/g,uP=/\u0000|\uFFFD/g;function ZC(s){return(typeof s=="string"?s:""+s).replace(lP,`
|
|
9
|
+
`).replace(uP,"")}function eE(s,l){return l=ZC(l),ZC(s)===l}function et(s,l,d,p,y,x){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||ya(s,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&ya(s,""+p);break;case"className":dd(s,"class",p);break;case"tabIndex":dd(s,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":dd(s,d,p);break;case"style":ev(s,p,x);break;case"data":if(l!=="object"){dd(s,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(d);break}p=hd(""+p),s.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(d==="formAction"?(l!=="input"&&et(s,l,"name",y.name,y,null),et(s,l,"formEncType",y.formEncType,y,null),et(s,l,"formMethod",y.formMethod,y,null),et(s,l,"formTarget",y.formTarget,y,null)):(et(s,l,"encType",y.encType,y,null),et(s,l,"method",y.method,y,null),et(s,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){s.removeAttribute(d);break}p=hd(""+p),s.setAttribute(d,p);break;case"onClick":p!=null&&(s.onclick=Yr);break;case"onScroll":p!=null&&Ne("scroll",s);break;case"onScrollEnd":p!=null&&Ne("scrollend",s);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":s.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){s.removeAttribute("xlink:href");break}d=hd(""+p),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,""+p):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":p===!0?s.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?s.setAttribute(d,p):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?s.setAttribute(d,p):s.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?s.removeAttribute(d):s.setAttribute(d,p);break;case"popover":Ne("beforetoggle",s),Ne("toggle",s),cd(s,"popover",p);break;case"xlinkActuate":Qr(s,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Qr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Qr(s,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Qr(s,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Qr(s,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Qr(s,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Qr(s,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Qr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Qr(s,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":cd(s,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=z8.get(d)||d,cd(s,d,p))}}function b4(s,l,d,p,y,x){switch(d){case"style":ev(s,p,x);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof p=="string"?ya(s,p):(typeof p=="number"||typeof p=="bigint")&&ya(s,""+p);break;case"onScroll":p!=null&&Ne("scroll",s);break;case"onScrollEnd":p!=null&&Ne("scrollend",s);break;case"onClick":p!=null&&(s.onclick=Yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!U1.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),x=s[Dn]||null,x=x!=null?x[d]:null,typeof x=="function"&&s.removeEventListener(l,x,y),typeof p=="function")){typeof x!="function"&&x!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,p,y);break e}d in s?s[d]=p:p===!0?s.setAttribute(d,""):cd(s,d,p)}}}function Yt(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",s),Ne("load",s);var p=!1,y=!1,x;for(x in d)if(d.hasOwnProperty(x)){var S=d[x];if(S!=null)switch(x){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:et(s,l,x,S,d,null)}}y&&et(s,l,"srcSet",d.srcSet,d,null),p&&et(s,l,"src",d.src,d,null);return;case"input":Ne("invalid",s);var R=x=S=y=null,z=null,Q=null;for(p in d)if(d.hasOwnProperty(p)){var re=d[p];if(re!=null)switch(p){case"name":y=re;break;case"type":S=re;break;case"checked":z=re;break;case"defaultChecked":Q=re;break;case"value":x=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:et(s,l,p,re,d,null)}}Y1(s,x,R,z,Q,S,y,!1);return;case"select":Ne("invalid",s),p=S=x=null;for(y in d)if(d.hasOwnProperty(y)&&(R=d[y],R!=null))switch(y){case"value":x=R;break;case"defaultValue":S=R;break;case"multiple":p=R;default:et(s,l,y,R,d,null)}l=x,d=S,s.multiple=!!p,l!=null?ba(s,!!p,l,!1):d!=null&&ba(s,!!p,d,!0);return;case"textarea":Ne("invalid",s),x=y=p=null;for(S in d)if(d.hasOwnProperty(S)&&(R=d[S],R!=null))switch(S){case"value":p=R;break;case"defaultValue":y=R;break;case"children":x=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:et(s,l,S,R,d,null)}J1(s,p,y,x);return;case"option":for(z in d)d.hasOwnProperty(z)&&(p=d[z],p!=null)&&(z==="selected"?s.selected=p&&typeof p!="function"&&typeof p!="symbol":et(s,l,z,p,d,null));return;case"dialog":Ne("beforetoggle",s),Ne("toggle",s),Ne("cancel",s),Ne("close",s);break;case"iframe":case"object":Ne("load",s);break;case"video":case"audio":for(p=0;p<bu.length;p++)Ne(bu[p],s);break;case"image":Ne("error",s),Ne("load",s);break;case"details":Ne("toggle",s);break;case"embed":case"source":case"link":Ne("error",s),Ne("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in d)if(d.hasOwnProperty(Q)&&(p=d[Q],p!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:et(s,l,Q,p,d,null)}return;default:if(Mm(l)){for(re in d)d.hasOwnProperty(re)&&(p=d[re],p!==void 0&&b4(s,l,re,p,d,void 0));return}}for(R in d)d.hasOwnProperty(R)&&(p=d[R],p!=null&&et(s,l,R,p,d,null))}function cP(s,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,x=null,S=null,R=null,z=null,Q=null,re=null;for(ee in d){var se=d[ee];if(d.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":z=se;default:p.hasOwnProperty(ee)||et(s,l,ee,null,p,se)}}for(var X in p){var ee=p[X];if(se=d[X],p.hasOwnProperty(X)&&(ee!=null||se!=null))switch(X){case"type":x=ee;break;case"name":y=ee;break;case"checked":Q=ee;break;case"defaultChecked":re=ee;break;case"value":S=ee;break;case"defaultValue":R=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,l));break;default:ee!==se&&et(s,l,X,ee,p,se)}}Am(s,S,R,z,Q,re,x,y);return;case"select":ee=S=R=X=null;for(x in d)if(z=d[x],d.hasOwnProperty(x)&&z!=null)switch(x){case"value":break;case"multiple":ee=z;default:p.hasOwnProperty(x)||et(s,l,x,null,p,z)}for(y in p)if(x=p[y],z=d[y],p.hasOwnProperty(y)&&(x!=null||z!=null))switch(y){case"value":X=x;break;case"defaultValue":R=x;break;case"multiple":S=x;default:x!==z&&et(s,l,y,x,p,z)}l=R,d=S,p=ee,X!=null?ba(s,!!d,X,!1):!!p!=!!d&&(l!=null?ba(s,!!d,l,!0):ba(s,!!d,d?[]:"",!1));return;case"textarea":ee=X=null;for(R in d)if(y=d[R],d.hasOwnProperty(R)&&y!=null&&!p.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:et(s,l,R,null,p,y)}for(S in p)if(y=p[S],x=d[S],p.hasOwnProperty(S)&&(y!=null||x!=null))switch(S){case"value":X=y;break;case"defaultValue":ee=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==x&&et(s,l,S,y,p,x)}X1(s,X,ee);return;case"option":for(var ge in d)X=d[ge],d.hasOwnProperty(ge)&&X!=null&&!p.hasOwnProperty(ge)&&(ge==="selected"?s.selected=!1:et(s,l,ge,null,p,X));for(z in p)X=p[z],ee=d[z],p.hasOwnProperty(z)&&X!==ee&&(X!=null||ee!=null)&&(z==="selected"?s.selected=X&&typeof X!="function"&&typeof X!="symbol":et(s,l,z,X,p,ee));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in d)X=d[De],d.hasOwnProperty(De)&&X!=null&&!p.hasOwnProperty(De)&&et(s,l,De,null,p,X);for(Q in p)if(X=p[Q],ee=d[Q],p.hasOwnProperty(Q)&&X!==ee&&(X!=null||ee!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,l));break;default:et(s,l,Q,X,p,ee)}return;default:if(Mm(l)){for(var tt in d)X=d[tt],d.hasOwnProperty(tt)&&X!==void 0&&!p.hasOwnProperty(tt)&&b4(s,l,tt,void 0,p,X);for(re in p)X=p[re],ee=d[re],!p.hasOwnProperty(re)||X===ee||X===void 0&&ee===void 0||b4(s,l,re,X,p,ee);return}}for(var q in d)X=d[q],d.hasOwnProperty(q)&&X!=null&&!p.hasOwnProperty(q)&&et(s,l,q,null,p,X);for(se in p)X=p[se],ee=d[se],!p.hasOwnProperty(se)||X===ee||X==null&&ee==null||et(s,l,se,X,p,ee)}function tE(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dP(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var y=d[p],x=y.transferSize,S=y.initiatorType,R=y.duration;if(x&&R&&tE(S)){for(S=0,R=y.responseEnd,p+=1;p<d.length;p++){var z=d[p],Q=z.startTime;if(Q>R)break;var re=z.transferSize,se=z.initiatorType;re&&tE(se)&&(z=z.responseEnd,S+=re*(z<R?1:(R-Q)/(z-Q)))}if(--p,l+=8*(x+S)/(y.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var y4=null,v4=null;function uf(s){return s.nodeType===9?s:s.ownerDocument}function nE(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function rE(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function x4(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var C4=null;function fP(){var s=window.event;return s&&s.type==="popstate"?s===C4?!1:(C4=s,!0):(C4=null,!1)}var iE=typeof setTimeout=="function"?setTimeout:void 0,hP=typeof clearTimeout=="function"?clearTimeout:void 0,oE=typeof Promise=="function"?Promise:void 0,pP=typeof queueMicrotask=="function"?queueMicrotask:typeof oE<"u"?function(s){return oE.resolve(null).then(s).catch(mP)}:iE;function mP(s){setTimeout(function(){throw s})}function eo(s){return s==="head"}function sE(s,l){var d=l,p=0;do{var y=d.nextSibling;if(s.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(p===0){s.removeChild(y),Qa(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")vu(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,vu(d);for(var x=d.firstChild;x;){var S=x.nextSibling,R=x.nodeName;x[zl]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&x.rel.toLowerCase()==="stylesheet"||d.removeChild(x),x=S}}else d==="body"&&vu(s.ownerDocument.body);d=y}while(d);Qa(l)}function aE(s,l){var d=s;s=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=p}while(d)}function E4(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":E4(d),wm(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function gP(s,l,d,p){for(;s.nodeType===1;){var y=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(p){if(!s[zl])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(x=s.getAttribute("rel"),x==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(x!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(x=s.getAttribute("src"),(x!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&x&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var x=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===x)return s}else return s;if(s=ir(s.nextSibling),s===null)break}return null}function bP(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ir(s.nextSibling),s===null))return null;return s}function lE(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ir(s.nextSibling),s===null))return null;return s}function D4(s){return s.data==="$?"||s.data==="$~"}function k4(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function yP(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),s._reactRetry=p}}function ir(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var S4=null;function uE(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ir(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function cE(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function dE(s,l,d){switch(l=uf(d),s){case"html":if(s=l.documentElement,!s)throw Error(r(452));return s;case"head":if(s=l.head,!s)throw Error(r(453));return s;case"body":if(s=l.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function vu(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);wm(s)}var or=new Map,fE=new Set;function cf(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var fi=K.d;K.d={f:vP,r:xP,D:CP,C:EP,L:DP,m:kP,X:$P,S:SP,M:wP};function vP(){var s=fi.f(),l=ef();return s||l}function xP(s){var l=pa(s);l!==null&&l.tag===5&&l.type==="form"?Ax(l):fi.r(s)}var qa=typeof document>"u"?null:document;function hE(s,l,d){var p=qa;if(p&&typeof l=="string"&&l){var y=Xn(l);y='link[rel="'+s+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),fE.has(y)||(fE.add(y),s={rel:s,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),Yt(l,"link",s),Kt(l),p.head.appendChild(l)))}}function CP(s){fi.D(s),hE("dns-prefetch",s,null)}function EP(s,l){fi.C(s,l),hE("preconnect",s,l)}function DP(s,l,d){fi.L(s,l,d);var p=qa;if(p&&s&&l){var y='link[rel="preload"][as="'+Xn(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Xn(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Xn(d.imageSizes)+'"]')):y+='[href="'+Xn(s)+'"]';var x=y;switch(l){case"style":x=Ga(s);break;case"script":x=Wa(s)}or.has(x)||(s=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),or.set(x,s),p.querySelector(y)!==null||l==="style"&&p.querySelector(xu(x))||l==="script"&&p.querySelector(Cu(x))||(l=p.createElement("link"),Yt(l,"link",s),Kt(l),p.head.appendChild(l)))}}function kP(s,l){fi.m(s,l);var d=qa;if(d&&s){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Xn(p)+'"][href="'+Xn(s)+'"]',x=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Wa(s)}if(!or.has(x)&&(s=m({rel:"modulepreload",href:s},l),or.set(x,s),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Cu(x)))return}p=d.createElement("link"),Yt(p,"link",s),Kt(p),d.head.appendChild(p)}}}function SP(s,l,d){fi.S(s,l,d);var p=qa;if(p&&s){var y=ma(p).hoistableStyles,x=Ga(s);l=l||"default";var S=y.get(x);if(!S){var R={loading:0,preload:null};if(S=p.querySelector(xu(x)))R.loading=5;else{s=m({rel:"stylesheet",href:s,"data-precedence":l},d),(d=or.get(x))&&$4(s,d);var z=S=p.createElement("link");Kt(z),Yt(z,"link",s),z._p=new Promise(function(Q,re){z.onload=Q,z.onerror=re}),z.addEventListener("load",function(){R.loading|=1}),z.addEventListener("error",function(){R.loading|=2}),R.loading|=4,df(S,l,p)}S={type:"stylesheet",instance:S,count:1,state:R},y.set(x,S)}}}function $P(s,l){fi.X(s,l);var d=qa;if(d&&s){var p=ma(d).hoistableScripts,y=Wa(s),x=p.get(y);x||(x=d.querySelector(Cu(y)),x||(s=m({src:s,async:!0},l),(l=or.get(y))&&w4(s,l),x=d.createElement("script"),Kt(x),Yt(x,"link",s),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(y,x))}}function wP(s,l){fi.M(s,l);var d=qa;if(d&&s){var p=ma(d).hoistableScripts,y=Wa(s),x=p.get(y);x||(x=d.querySelector(Cu(y)),x||(s=m({src:s,async:!0,type:"module"},l),(l=or.get(y))&&w4(s,l),x=d.createElement("script"),Kt(x),Yt(x,"link",s),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(y,x))}}function pE(s,l,d,p){var y=(y=fe.current)?cf(y):null;if(!y)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Ga(d.href),d=ma(y).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Ga(d.href);var x=ma(y).hoistableStyles,S=x.get(s);if(S||(y=y.ownerDocument||y,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(s,S),(x=y.querySelector(xu(s)))&&!x._p&&(S.instance=x,S.state.loading=5),or.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},or.set(s,d),x||TP(y,s,d,S.state))),l&&p===null)throw Error(r(528,""));return S}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Wa(d),d=ma(y).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Ga(s){return'href="'+Xn(s)+'"'}function xu(s){return'link[rel="stylesheet"]['+s+"]"}function mE(s){return m({},s,{"data-precedence":s.precedence,precedence:null})}function TP(s,l,d,p){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=s.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Yt(l,"link",d),Kt(l),s.head.appendChild(l))}function Wa(s){return'[src="'+Xn(s)+'"]'}function Cu(s){return"script[async]"+s}function gE(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=s.querySelector('style[data-href~="'+Xn(d.href)+'"]');if(p)return l.instance=p,Kt(p),p;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(s.ownerDocument||s).createElement("style"),Kt(p),Yt(p,"style",y),df(p,d.precedence,s),l.instance=p;case"stylesheet":y=Ga(d.href);var x=s.querySelector(xu(y));if(x)return l.state.loading|=4,l.instance=x,Kt(x),x;p=mE(d),(y=or.get(y))&&$4(p,y),x=(s.ownerDocument||s).createElement("link"),Kt(x);var S=x;return S._p=new Promise(function(R,z){S.onload=R,S.onerror=z}),Yt(x,"link",p),l.state.loading|=4,df(x,d.precedence,s),l.instance=x;case"script":return x=Wa(d.src),(y=s.querySelector(Cu(x)))?(l.instance=y,Kt(y),y):(p=d,(y=or.get(x))&&(p=m({},d),w4(p,y)),s=s.ownerDocument||s,y=s.createElement("script"),Kt(y),Yt(y,"link",p),s.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,df(p,d.precedence,s));return l.instance}function df(s,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,x=y,S=0;S<p.length;S++){var R=p[S];if(R.dataset.precedence===l)x=R;else if(x!==y)break}x?x.parentNode.insertBefore(s,x.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function $4(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function w4(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var ff=null;function bE(s,l,d){if(ff===null){var p=new Map,y=ff=new Map;y.set(d,p)}else y=ff,p=y.get(d),p||(p=new Map,y.set(d,p));if(p.has(s))return p;for(p.set(s,null),d=d.getElementsByTagName(s),y=0;y<d.length;y++){var x=d[y];if(!(x[zl]||x[qt]||s==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var S=x.getAttribute(l)||"";S=s+S;var R=p.get(S);R?R.push(x):p.set(S,[x])}}return p}function yE(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function AP(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(s=l.disabled,typeof l.precedence=="string"&&s==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function vE(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function BP(s,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=Ga(p.href),x=l.querySelector(xu(y));if(x){l=x._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=hf.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=x,Kt(x);return}x=l.ownerDocument||l,p=mE(p),(y=or.get(y))&&$4(p,y),x=x.createElement("link"),Kt(x);var S=x;S._p=new Promise(function(R,z){S.onload=R,S.onerror=z}),Yt(x,"link",p),d.instance=x}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=hf.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var T4=0;function MP(s,l){return s.stylesheets&&s.count===0&&mf(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var p=setTimeout(function(){if(s.stylesheets&&mf(s,s.stylesheets),s.unsuspend){var x=s.unsuspend;s.unsuspend=null,x()}},6e4+l);0<s.imgBytes&&T4===0&&(T4=62500*dP());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&mf(s,s.stylesheets),s.unsuspend)){var x=s.unsuspend;s.unsuspend=null,x()}},(s.imgBytes>T4?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function hf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mf(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var pf=null;function mf(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,pf=new Map,l.forEach(RP,s),pf=null,hf.call(s))}function RP(s,l){if(!(l.state.loading&4)){var d=pf.get(s);if(d)var p=d.get(null);else{d=new Map,pf.set(s,d);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<y.length;x++){var S=y[x];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(d.set(S.dataset.precedence,S),p=S)}p&&d.set(null,p)}y=l.instance,S=y.getAttribute("data-precedence"),x=d.get(S)||p,x===p&&d.set(null,y),d.set(S,y),this.count++,p=hf.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),x?x.parentNode.insertBefore(y,x.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),l.state.loading|=4}}var Eu={$$typeof:$,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function PP(s,l,d,p,y,x,S,R,z){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Dm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dm(0),this.hiddenUpdates=Dm(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=x,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function xE(s,l,d,p,y,x,S,R,z,Q,re,se){return s=new PP(s,l,d,S,z,Q,re,se,R),l=1,x===!0&&(l|=24),x=Kn(3,null,null,l),s.current=x,x.stateNode=s,l=ag(),l.refCount++,s.pooledCache=l,l.refCount++,x.memoizedState={element:p,isDehydrated:d,cache:l},dg(x),s}function CE(s){return s?(s=Sa,s):Sa}function EE(s,l,d,p,y,x){y=CE(y),p.context===null?p.context=y:p.pendingContext=y,p=Hi(l),p.payload={element:d},x=x===void 0?null:x,x!==null&&(p.callback=x),d=Vi(s,p,l),d!==null&&(An(d,s,l),eu(d,s,l))}function DE(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function A4(s,l){DE(s,l),(s=s.alternate)&&DE(s,l)}function kE(s){if(s.tag===13||s.tag===31){var l=rs(s,67108864);l!==null&&An(l,s,67108864),A4(s,67108864)}}function SE(s){if(s.tag===13||s.tag===31){var l=Un();l=km(l);var d=rs(s,l);d!==null&&An(d,s,l),A4(s,l)}}var gf=!0;function OP(s,l,d,p){var y=N.T;N.T=null;var x=K.p;try{K.p=2,B4(s,l,d,p)}finally{K.p=x,N.T=y}}function NP(s,l,d,p){var y=N.T;N.T=null;var x=K.p;try{K.p=8,B4(s,l,d,p)}finally{K.p=x,N.T=y}}function B4(s,l,d,p){if(gf){var y=M4(p);if(y===null)g4(s,l,p,bf,d),wE(s,p);else if(zP(y,s,l,d,p))p.stopPropagation();else if(wE(s,p),l&4&&-1<LP.indexOf(s)){for(;y!==null;){var x=pa(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var S=Jo(x.pendingLanes);if(S!==0){var R=x;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var z=1<<31-In(S);R.entanglements[1]|=z,S&=~z}Or(x),(Ge&6)===0&&(Jd=on()+500,gu(0))}}break;case 31:case 13:R=rs(x,2),R!==null&&An(R,x,2),ef(),A4(x,2)}if(x=M4(p),x===null&&g4(s,l,p,bf,d),x===y)break;y=x}y!==null&&p.stopPropagation()}else g4(s,l,p,null,d)}}function M4(s){return s=Pm(s),R4(s)}var bf=null;function R4(s){if(bf=null,s=ha(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=a(l),s!==null)return s;s=null}else if(d===31){if(s=u(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return bf=s,null}function $E(s){switch(s){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(it()){case Ut:return 2;case Br:return 8;case da:case E8:return 32;case L1:return 268435456;default:return 32}default:return 32}}var P4=!1,to=null,no=null,ro=null,Du=new Map,ku=new Map,io=[],LP="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".split(" ");function wE(s,l){switch(s){case"focusin":case"focusout":to=null;break;case"dragenter":case"dragleave":no=null;break;case"mouseover":case"mouseout":ro=null;break;case"pointerover":case"pointerout":Du.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":ku.delete(l.pointerId)}}function Su(s,l,d,p,y,x){return s===null||s.nativeEvent!==x?(s={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:x,targetContainers:[y]},l!==null&&(l=pa(l),l!==null&&kE(l)),s):(s.eventSystemFlags|=p,l=s.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),s)}function zP(s,l,d,p,y){switch(l){case"focusin":return to=Su(to,s,l,d,p,y),!0;case"dragenter":return no=Su(no,s,l,d,p,y),!0;case"mouseover":return ro=Su(ro,s,l,d,p,y),!0;case"pointerover":var x=y.pointerId;return Du.set(x,Su(Du.get(x)||null,s,l,d,p,y)),!0;case"gotpointercapture":return x=y.pointerId,ku.set(x,Su(ku.get(x)||null,s,l,d,p,y)),!0}return!1}function TE(s){var l=ha(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){s.blockedOn=l,j1(s.priority,function(){SE(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,j1(s.priority,function(){SE(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function yf(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=M4(s.nativeEvent);if(d===null){d=s.nativeEvent;var p=new d.constructor(d.type,d);Rm=p,d.target.dispatchEvent(p),Rm=null}else return l=pa(d),l!==null&&kE(l),s.blockedOn=d,!1;l.shift()}return!0}function AE(s,l,d){yf(s)&&d.delete(l)}function IP(){P4=!1,to!==null&&yf(to)&&(to=null),no!==null&&yf(no)&&(no=null),ro!==null&&yf(ro)&&(ro=null),Du.forEach(AE),ku.forEach(AE)}function vf(s,l){s.blockedOn===l&&(s.blockedOn=null,P4||(P4=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IP)))}var xf=null;function BE(s){xf!==s&&(xf=s,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){xf===s&&(xf=null);for(var l=0;l<s.length;l+=3){var d=s[l],p=s[l+1],y=s[l+2];if(typeof p!="function"){if(R4(p||d)===null)continue;break}var x=pa(d);x!==null&&(s.splice(l,3),l-=3,Mg(x,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function Qa(s){function l(z){return vf(z,s)}to!==null&&vf(to,s),no!==null&&vf(no,s),ro!==null&&vf(ro,s),Du.forEach(l),ku.forEach(l);for(var d=0;d<io.length;d++){var p=io[d];p.blockedOn===s&&(p.blockedOn=null)}for(;0<io.length&&(d=io[0],d.blockedOn===null);)TE(d),d.blockedOn===null&&io.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],x=d[p+1],S=y[Dn]||null;if(typeof x=="function")S||BE(d);else if(S){var R=null;if(x&&x.hasAttribute("formAction")){if(y=x,S=x[Dn]||null)R=S.formAction;else if(R4(y)!==null)continue}else R=S.action;typeof R=="function"?d[p+1]=R:(d.splice(p,3),p-=3),BE(d)}}}function ME(){function s(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(S){return y=S})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function O4(s){this._internalRoot=s}Cf.prototype.render=O4.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=Un();EE(d,p,s,l,null,null)},Cf.prototype.unmount=O4.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;EE(s.current,2,null,s,null,null),ef(),l[fa]=null}};function Cf(s){this._internalRoot=s}Cf.prototype.unstable_scheduleHydration=function(s){if(s){var l=_1();s={blockedOn:null,target:s,priority:l};for(var d=0;d<io.length&&l!==0&&l<io[d].priority;d++);io.splice(d,0,s),d===0&&TE(s)}};var RE=e.version;if(RE!=="19.2.4")throw Error(r(527,RE,"19.2.4"));K.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var FP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ef=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ef.isDisabled&&Ef.supportsFiber)try{Ol=Ef.inject(FP),zn=Ef}catch{}}return wu.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,p="",y=Fx,x=Kx,S=_x;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),l=xE(s,1,!1,null,null,d,p,null,y,x,S,ME),s[fa]=l.current,m4(s),new O4(l)},wu.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var p=!1,y="",x=Fx,S=Kx,R=_x,z=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(x=d.onUncaughtError),d.onCaughtError!==void 0&&(S=d.onCaughtError),d.onRecoverableError!==void 0&&(R=d.onRecoverableError),d.formState!==void 0&&(z=d.formState)),l=xE(s,1,!0,l,d??null,p,y,z,x,S,R,ME),l.context=CE(null),d=l.current,p=Un(),p=km(p),y=Hi(p),y.callback=null,Vi(d,y,p),d=p,l.current.lanes=d,Ll(l,d),Or(l),s[fa]=l.current,m4(s),new Cf(l)},wu.version="19.2.4",wu}var jE;function WP(){if(jE)return z4.exports;jE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),z4.exports=GP(),z4.exports}var QP=WP(),Hc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},YP=class extends Hc{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},$y=new YP,XP={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},JP=class{#e=XP;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},ks=new JP;function ZP(t){setTimeout(t,0)}var eO=typeof window>"u"||"Deno"in globalThis;function Mn(){}function tO(t,e){return typeof t=="function"?t(e):t}function Zb(t){return typeof t=="number"&&t>=0&&t!==1/0}function Bk(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Do(t,e){return typeof t=="function"?t(e):t}function qn(t,e){return typeof t=="function"?t(e):t}function HE(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==wy(a,e.options))return!1}else if(!hl(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||o&&!o(e))}function VE(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(bc(e.options.mutationKey)!==bc(o))return!1}else if(!hl(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function wy(t,e){return(e?.queryKeyHashFn||bc)(t)}function bc(t){return JSON.stringify(t,(e,n)=>t0(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function hl(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let r=0;r<e.length;r++)if(!hl(t[r],e[r]))return!1;return!0}const n=Object.keys(e);for(const r of n)if(!hl(t[r],e[r]))return!1;return!0}return!1}var nO=Object.prototype.hasOwnProperty;function Mk(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=UE(t)&&UE(e);if(!r&&!(t0(t)&&t0(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const m=r?h:a[h],g=t[m],b=e[m];if(g===b){c[m]=g,(r?h<o:nO.call(t,m))&&f++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){c[m]=b;continue}const v=Mk(g,b,n+1);c[m]=v,v===g&&f++}return o===u&&f===o?t:c}function e0(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function UE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function t0(t){if(!qE(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!qE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function qE(t){return Object.prototype.toString.call(t)==="[object Object]"}function rO(t){return new Promise(e=>{ks.setTimeout(e,t)})}function n0(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Mk(t,e):e}function iO(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function oO(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Ty=Symbol();function Rk(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Ty?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Pk(t,e){return typeof t=="function"?t(...e):!!t}function sO(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var yc=(()=>{let t=()=>eO;return{isServer(){return t()},setIsServer(e){t=e}}})();function r0(){let t,e;const n=new Promise((i,o)=>{t=i,e=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var aO=ZP;function lO(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=aO;const o=u=>{e?t.push(u):i(()=>{n(u)})},a=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;e++;try{c=u()}finally{e--,e||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Jt=lO(),uO=class extends Hc{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},yh=new uO;function cO(t){return Math.min(1e3*2**t,3e4)}function Ok(t){return(t??"online")==="online"?yh.isOnline():!0}var i0=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Nk(t){let e=!1,n=0,r;const i=r0(),o=()=>i.status!=="pending",a=C=>{if(!o()){const E=new i0(C);g(E),t.onCancel?.(E)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>$y.isFocused()&&(t.networkMode==="always"||yh.isOnline())&&t.canRun(),h=()=>Ok(t.networkMode)&&t.canRun(),m=C=>{o()||(r?.(),i.resolve(C))},g=C=>{o()||(r?.(),i.reject(C))},b=()=>new Promise(C=>{r=E=>{(o()||f())&&C(E)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),v=()=>{if(o())return;let C;const E=n===0?t.initialPromise:void 0;try{C=E??t.fn()}catch(D){C=Promise.reject(D)}Promise.resolve(C).then(m).catch(D=>{if(o())return;const w=t.retry??(yc.isServer()?0:3),$=t.retryDelay??cO,T=typeof $=="function"?$(n,D):$,A=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,D);if(e||!A){g(D);return}n++,t.onFail?.(n,D),rO(T).then(()=>f()?void 0:b()).then(()=>{e?g(D):v()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?v():b().then(v),i)}}var Lk=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zb(this.gcTime)&&(this.#e=ks.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(yc.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ks.clearTimeout(this.#e),this.#e=void 0)}};function dO(t){return{onFetch:(e,n)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let h=!1;const m=v=>{sO(v,()=>e.signal,()=>h=!0)},g=Rk(e.options,e.fetchOptions),b=async(v,C,E)=>{if(h)return Promise.reject(e.signal.reason);if(C==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const O={client:e.client,queryKey:e.queryKey,pageParam:C,direction:E?"backward":"forward",meta:e.options.meta};return m(O),O})(),$=await g(w),{maxPages:T}=e.options,A=E?oO:iO;return{pages:A(v.pages,$,T),pageParams:A(v.pageParams,C,T)}};if(i&&o.length){const v=i==="backward",C=v?fO:GE,E={pages:o,pageParams:a},D=C(r,E);u=await b(E,D,v)}else{const v=t??o.length;do{const C=c===0?a[0]??r.initialPageParam:GE(r,u);if(c>0&&C==null)break;u=await b(u,C),c++}while(c<v)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=f}}}function GE(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function fO(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var hO=class extends Lk{#e;#t;#n;#r;#o;#i;#a;#s;constructor(t){super(),this.#s=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=QE(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=QE(this.options);e.data!==void 0&&(this.setState(WE(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=n0(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(Mn).catch(Mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>qn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ty||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Do(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Bk(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#s||this.#c()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{const c=Rk(this.options,e),h=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(c,h,this):c(h)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return r(c),c})();(this.#e==="infinite"?dO(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#i=Nk({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof i0&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#i.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof i0){if(c.silent)return this.#i.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...zk(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...WE(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),Jt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function zk(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ok(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function WE(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function QE(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var pO=class extends Hc{constructor(t,e){super(),this.options=e,this.#e=t,this.#s=null,this.#a=r0(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#i;#a;#s;#c;#l;#p;#d;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),YE(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return o0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return o0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#C(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),e._defaulted&&!e0(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&XE(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(e.enabled,this.#t)||Do(this.options.staleTime,this.#t)!==Do(e.staleTime,this.#t))&&this.#g();const i=this.#b();r&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(e.enabled,this.#t)||i!==this.#u)&&this.#y(i)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return gO(this,n)&&(this.#r=n,this.#i=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#E();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Mn)),e}#g(){this.#x();const t=Do(this.options.staleTime,this.#t);if(yc.isServer()||this.#r.isStale||!Zb(t))return;const n=Bk(this.#r.dataUpdatedAt,t)+1;this.#d=ks.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#C(),this.#u=t,!(yc.isServer()||qn(this.options.enabled,this.#t)===!1||!Zb(this.#u)||this.#u===0)&&(this.#f=ks.setInterval(()=>{(this.options.refetchIntervalInBackground||$y.isFocused())&&this.#h()},this.#u))}#v(){this.#g(),this.#y(this.#b())}#x(){this.#d!==void 0&&(ks.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#f!==void 0&&(ks.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,i=this.#r,o=this.#o,a=this.#i,c=t!==n?t.state:this.#n,{state:f}=t;let h={...f},m=!1,g;if(e._optimisticResults){const P=this.hasListeners(),I=!P&&YE(t,e),G=P&&XE(t,n,e,r);(I||G)&&(h={...h,...zk(f.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:C}=h;g=h.data;let E=!1;if(e.placeholderData!==void 0&&g===void 0&&C==="pending"){let P;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(P=i.data,E=!0):P=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,P!==void 0&&(C="success",g=n0(i?.data,P,e),m=!0)}if(e.select&&g!==void 0&&!E)if(i&&g===o?.data&&e.select===this.#c)g=this.#l;else try{this.#c=e.select,g=e.select(g),g=n0(i?.data,g,e),this.#l=g,this.#s=null}catch(P){this.#s=P}this.#s&&(b=this.#s,g=this.#l,v=Date.now(),C="error");const D=h.fetchStatus==="fetching",w=C==="pending",$=C==="error",T=w&&D,A=g!==void 0,M={status:C,fetchStatus:h.fetchStatus,isPending:w,isSuccess:C==="success",isError:$,isInitialLoading:T,isLoading:T,data:g,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:D,isRefetching:D&&!w,isLoadingError:$&&!A,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:$&&A,isStale:Ay(t,e),refetch:this.refetch,promise:this.#a,isEnabled:qn(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=M.data!==void 0,I=M.status==="error"&&!P,G=ie=>{I?ie.reject(M.error):P&&ie.resolve(M.data)},J=()=>{const ie=this.#a=M.promise=r0();G(ie)},U=this.#a;switch(U.status){case"pending":t.queryHash===n.queryHash&&G(U);break;case"fulfilled":(I||M.data!==U.value)&&J();break;case"rejected":(!I||M.error!==U.reason)&&J();break}}return M}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#i=this.options,this.#o.data!==void 0&&(this.#p=this.#t),e0(e,t))return;this.#r=e;const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#m.size)return!0;const o=new Set(i??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&o.has(u)})};this.#D({listeners:n()})}#E(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#D(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mO(t,e){return qn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&qn(e.retryOnMount,t)===!1)}function YE(t,e){return mO(t,e)||t.state.data!==void 0&&o0(t,e,e.refetchOnMount)}function o0(t,e,n){if(qn(e.enabled,t)!==!1&&Do(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Ay(t,e)}return!1}function XE(t,e,n,r){return(t!==e||qn(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Ay(t,n)}function Ay(t,e){return qn(e.enabled,t)!==!1&&t.isStaleByTime(Do(e.staleTime,t))}function gO(t,e){return!e0(t.getCurrentResult(),e)}var bO=class extends Lk{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||yO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Nk({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:i})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Jt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function yO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vO=class extends Hc{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){const r=new bO({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);const e=Df(t);if(typeof e=="string"){const n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=Df(t);if(typeof e=="string"){const n=this.#t.get(e);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Df(t);if(typeof e=="string"){const r=this.#t.get(e)?.find(i=>i.state.status==="pending");return!r||r===t}else return!0}runNext(t){const e=Df(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Jt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(n=>VE(e,n))}findAll(t={}){return this.getAll().filter(e=>VE(t,e))}notify(t){Jt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Jt.batch(()=>Promise.all(t.map(e=>e.continue().catch(Mn))))}};function Df(t){return t.options.scope?.id}var xO=class extends Hc{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,i=e.queryHash??wy(r,e);let o=this.get(i);return o||(o=new hO({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(n=>HE(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>HE(t,n)):e}notify(t){Jt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},CO=class{#e;#t;#n;#r;#o;#i;#a;#s;constructor(t={}){this.#e=t.queryCache||new xO,this.#t=t.mutationCache||new vO,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=$y.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=yh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Do(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,a=tO(e,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Jt.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;Jt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return Jt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Jt.batch(()=>this.#e.findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Mn).catch(Mn)}invalidateQueries(t,e={}){return Jt.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Jt.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Mn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Mn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(Do(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mn).catch(Mn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mn).catch(Mn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return yh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(bc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{hl(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(bc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],n={};return e.forEach(r=>{hl(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=wy(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ty&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ik=k.createContext(void 0),Lp=t=>{const e=k.useContext(Ik);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},EO=({client:t,children:e})=>(k.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),B.jsx(Ik.Provider,{value:t,children:e})),Fk=k.createContext(!1),DO=()=>k.useContext(Fk);Fk.Provider;function kO(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var SO=k.createContext(kO()),$O=()=>k.useContext(SO),wO=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?Pk(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},TO=t=>{k.useEffect(()=>{t.clearReset()},[t])},AO=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||Pk(n,[t.error,r])),BO=t=>{if(t.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},MO=(t,e)=>t.isLoading&&t.isFetching&&!e,RO=(t,e)=>t?.suspense&&e.isPending,JE=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function PO(t,e,n){const r=DO(),i=$O(),o=Lp(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=o.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,BO(a),wO(a,i,u),TO(i);const f=!o.getQueryCache().get(a.queryHash),[h]=k.useState(()=>new e(o,a)),m=h.getOptimisticResult(a),g=!r&&c;if(k.useSyncExternalStore(k.useCallback(b=>{const v=g?h.subscribe(Jt.batchCalls(b)):Mn;return h.updateResult(),v},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),k.useEffect(()=>{h.setOptions(a)},[a,h]),RO(a,m))throw JE(a,h,i);if(AO({result:m,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw m.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!yc.isServer()&&MO(m,r)&&(f?JE(a,h,i):u?.promise)?.catch(Mn).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function zp(t,e){return PO(t,pO)}var Ku=typeof window<"u"?k.useLayoutEffect:k.useEffect;function _4(t){const e=k.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function OO(t,e,n={},r={}){k.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{e(o)},n);return i.observe(t.current),()=>{i.disconnect()}},[e,n,r.disabled,t])}function NO(t){const e=k.useRef(null);return k.useImperativeHandle(t,()=>e.current,[]),e}const Kk=!1;function vc(t){return t[t.length-1]}function LO(t){return typeof t=="function"}function Ss(t,e){return LO(t)?t(e):t}const _k=Object.prototype.hasOwnProperty,ZE=Object.prototype.propertyIsEnumerable;function jk(t){for(const e in t)if(_k.call(t,e))return!0;return!1}const zO=()=>Object.create(null),bs=(t,e)=>$s(t,e,zO);function $s(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const i=e,o=n5(t)&&n5(i);if(!o&&!(vh(t)&&vh(i)))return i;const a=o?t:e5(t);if(!a)return i;const u=o?i:e5(i);if(!u)return i;const c=a.length,f=u.length,h=o?new Array(f):n();let m=0;for(let g=0;g<f;g++){const b=o?g:u[g],v=t[b],C=i[b];if(v===C){h[b]=v,(o?g<c:_k.call(t,b))&&m++;continue}if(v===null||C===null||typeof v!="object"||typeof C!="object"){h[b]=C;continue}const E=$s(v,C,n,r+1);h[b]=E,E===v&&m++}return c===f&&m===c?t:h}function e5(t){const e=Object.getOwnPropertyNames(t);for(const i of e)if(!ZE.call(t,i))return!1;const n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;const r=e;for(const i of n){if(!ZE.call(t,i))return!1;r.push(i)}return r}function vh(t){if(!t5(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!t5(n)||!n.hasOwnProperty("isPrototypeOf"))}function t5(t){return Object.prototype.toString.call(t)==="[object Object]"}function n5(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zs(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,i=t.length;r<i;r++)if(!zs(t[r],e[r],n))return!1;return!0}if(vh(t)&&vh(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!zs(t[a],e[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&i++;let o=0;for(const a in e)if((!r||e[a]!==void 0)&&(o++,o>i||!zs(t[a],e[a],n)))return!1;return i===o}return!1}function pl(t){let e,n;const r=new Promise((i,o)=>{e=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,e(i),t?.(i)},r.reject=i=>{r.status="rejected",n(i)},r}function xc(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const IO=/[\x00-\x1f\x7f"<>`{}]/g;function FO(t){return t.replace(IO,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function r5(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return FO(e)}const KO=["http:","https:","mailto:","tel:"];function xh(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Tu(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let n=0,r="",i;for(;(i=e.exec(t))!==null;)r+=r5(t.slice(n,i.index))+i[0],n=e.lastIndex;r=r+r5(n?t.slice(n):t);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function _O(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function jO(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function ki(){throw new Error("Invariant failed")}function Cc(t){const e=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=e.get(o);if(a)return i(a),a.value},set(o,a){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=e.get(o);if(u)u.value=a,i(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(o,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const bo=4,Hk=5;function HO(t){const e=t.indexOf("{");if(e===-1)return null;const n=t.indexOf("}",e);return n===-1||e+1>=t.length?null:[e,n]}function Vk(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),i=r===-1?t.length:r,o=t.substring(e,i);if(!o||!o.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=i,n[4]=i,n[5]=i,n;if(o==="$"){const u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=i,n[4]=i,n[5]=i,n;const a=HO(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const h=u+3,m=c;if(h<m)return n[0]=3,n[1]=e+u,n[2]=e+h,n[3]=e+m,n[4]=e+c+1,n[5]=i,n}}else if(f===36){const h=u+1,m=u+2;return m===c?(n[0]=2,n[1]=e+u,n[2]=e+h,n[3]=e+m,n[4]=e+c+1,n[5]=t.length,n):(n[0]=1,n[1]=e+u,n[2]=e+m,n[3]=e+c,n[4]=e+c+1,n[5]=i,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=i,n[4]=i,n[5]=i,n}function Ip(t,e,n,r,i,o,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,h=n.options?.caseSensitive??t,m=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const b=Vk(c,u,e);let v;const C=u,E=b[5];switch(u=E+1,o++,b[0]){case 0:{const D=c.substring(b[2],b[3]);if(h){const w=i.static?.get(D);if(w)v=w;else{i.static??=new Map;const $=ws(n.fullPath??n.from);$.parent=i,$.depth=o,v=$,i.static.set(D,$)}}else{const w=D.toLowerCase(),$=i.staticInsensitive?.get(w);if($)v=$;else{i.staticInsensitive??=new Map;const T=ws(n.fullPath??n.from);T.parent=i,T.depth=o,v=T,i.staticInsensitive.set(w,T)}}break}case 1:{const D=c.substring(C,b[1]),w=c.substring(b[4],E),$=h&&!!(D||w),T=D?$?D:D.toLowerCase():void 0,A=w?$?w:w.toLowerCase():void 0,O=!m&&i.dynamic?.find(M=>!M.parse&&M.caseSensitive===$&&M.prefix===T&&M.suffix===A);if(O)v=O;else{const M=H4(1,n.fullPath??n.from,$,T,A);v=M,M.depth=o,M.parent=i,i.dynamic??=[],i.dynamic.push(M)}break}case 3:{const D=c.substring(C,b[1]),w=c.substring(b[4],E),$=h&&!!(D||w),T=D?$?D:D.toLowerCase():void 0,A=w?$?w:w.toLowerCase():void 0,O=!m&&i.optional?.find(M=>!M.parse&&M.caseSensitive===$&&M.prefix===T&&M.suffix===A);if(O)v=O;else{const M=H4(3,n.fullPath??n.from,$,T,A);v=M,M.parent=i,M.depth=o,i.optional??=[],i.optional.push(M)}break}case 2:{const D=c.substring(C,b[1]),w=c.substring(b[4],E),$=h&&!!(D||w),T=D?$?D:D.toLowerCase():void 0,A=w?$?w:w.toLowerCase():void 0,O=H4(2,n.fullPath??n.from,$,T,A);v=O,O.parent=i,O.depth=o,i.wildcard??=[],i.wildcard.push(O)}}i=v}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=ws(n.fullPath??n.from);b.kind=Hk,b.parent=i,o++,b.depth=o,i.pathless??=[],i.pathless.push(b),i=b}const g=(n.path||!n.children)&&!n.isRoot;if(g&&c.endsWith("/")){const b=ws(n.fullPath??n.from);b.kind=bo,b.parent=i,o++,b.depth=o,i.index=b,i=b}i.parse=m??null,i.priority=n.options?.params?.priority??0,g&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)Ip(t,e,c,u,i,o,a)}function j4(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function uo(t){if(t.pathless)for(const e of t.pathless)uo(e);if(t.static)for(const e of t.static.values())uo(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())uo(e);if(t.dynamic?.length){t.dynamic.sort(j4);for(const e of t.dynamic)uo(e)}if(t.optional?.length){t.optional.sort(j4);for(const e of t.optional)uo(e)}if(t.wildcard?.length){t.wildcard.sort(j4);for(const e of t.wildcard)uo(e)}}function ws(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function H4(t,e,n,r,i){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function VO(t,e){const n=ws("/"),r=new Uint16Array(6);for(const i of t)Ip(!1,r,i,1,n,0);uo(n),e.masksTree=n,e.flatCache=Cc(1e3)}function UO(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=By(t,e.masksTree);return e.flatCache.set(t,r),r}function qO(t,e,n,r,i){t||="/",r||="/";const o=e?`case\0${t}`:t;let a=i.singleCache.get(o);return a||(a=ws("/"),Ip(e,new Uint16Array(6),{from:t},1,a,0),i.singleCache.set(o,a)),By(r,a,n)}function GO(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,i=e.matchCache.get(r);if(i!==void 0)return i;t||="/";let o;try{o=By(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=qk(o.route)),e.matchCache.set(r,o),o}function WO(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function QO(t,e=!1,n){const r=ws(t.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return Ip(e,i,t,1,r,0,c=>{if(n?.(c,u),c.id in o&&ki(),o[c.id]=c,u!==0&&c.path){const f=WO(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),uo(r),{processedTree:{segmentTree:r,singleCache:Cc(1e3),matchCache:Cc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function By(t,e,n=!1){const r=t.split("/"),i=XO(t,r,e,n);if(!i)return null;const[o]=Uk(t,r,i);return{route:i.node.route,rawParams:o}}function Uk(t,e,n){const r=YO(n.node);let i=null;const o=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const h=r[u];if(h.kind===bo)break;if(h.kind===Hk){f--,a--,c--;continue}const m=e[a],g=c;if(m&&(c+=m.length),h.kind===1){i??=n.node.fullPath.split("/");const b=i[f],v=h.prefix?.length??0;if(b.charCodeAt(v)===123){const C=h.suffix?.length??0,E=b.substring(v+2,b.length-C-1),D=m.substring(v,m.length-C);o[E]=decodeURIComponent(D)}else{const C=b.substring(1);o[C]=decodeURIComponent(m)}}else if(h.kind===3){if(n.skipped&1<<u){a--,c=g-1;continue}i??=n.node.fullPath.split("/");const b=i[f],v=h.prefix?.length??0,C=h.suffix?.length??0,E=b.substring(v+3,b.length-C-1),D=h.suffix||h.prefix?m.substring(v,m.length-C):m;D&&(o[E]=decodeURIComponent(D))}else if(h.kind===2){const b=h,v=t.substring(g+(b.prefix?.length??0),t.length-(b.suffix?.length??0)),C=decodeURIComponent(v);o["*"]=C,o._splat=C;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function qk(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function YO(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function XO(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const i=!vc(e),o=i&&t!=="/",a=e.length-(i?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const h=u.pop(),{node:m,index:g,skipped:b,depth:v,statics:C,dynamics:E,optionals:D}=h;let{extract:w,rawParams:$}=h;if(m.kind===2&&m.route&&!Sf(f,h))continue;if(m.parse){if(!i5(t,e,h))continue;$=h.rawParams,w=h.extract}r&&m.route&&m.kind!==bo&&Sf(c,h)&&(c=h);const T=g===a;if(T&&(m.route&&(!o||m.kind===bo||m.kind===2)&&Sf(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const A=T?void 0:e[g];let O;if(T&&m.index){const M={node:m.index,index:g,skipped:b,depth:v+1,statics:C,dynamics:E,optionals:D,extract:w,rawParams:$};let P=!0;if(m.index.parse&&(i5(t,e,M)||(P=!1)),P){if(!E&&!D&&!b&&JO(C,a))return M;Sf(f,M)&&(f=M)}}if(m.wildcard)for(let M=m.wildcard.length-1;M>=0;M--){const P=m.wildcard[M],{prefix:I,suffix:G}=P;if(!(I&&(T||!(P.caseSensitive?A:O??=A.toLowerCase()).startsWith(I)))){if(G){if(T)continue;const J=e.slice(g).join("/").slice(-G.length);if((P.caseSensitive?J:J.toLowerCase())!==G)continue}u.push({node:P,index:a,skipped:b,depth:v+1,statics:C,dynamics:E,optionals:D,extract:w,rawParams:$})}}if(m.optional){const M=b|1<<v,P=v+1;for(let I=m.optional.length-1;I>=0;I--){const G=m.optional[I];u.push({node:G,index:g,skipped:M,depth:P,statics:C,dynamics:E,optionals:D,extract:w,rawParams:$})}if(!T)for(let I=m.optional.length-1;I>=0;I--){const G=m.optional[I],{prefix:J,suffix:U}=G;if(J||U){const ie=G.caseSensitive?A:O??=A.toLowerCase();if(J&&!ie.startsWith(J)||U&&!ie.endsWith(U))continue}u.push({node:G,index:g+1,skipped:b,depth:P,statics:C,dynamics:E,optionals:D+kf(a,g),extract:w,rawParams:$})}}if(!T&&m.dynamic&&A)for(let M=m.dynamic.length-1;M>=0;M--){const P=m.dynamic[M],{prefix:I,suffix:G}=P;if(I||G){const J=P.caseSensitive?A:O??=A.toLowerCase();if(I&&!J.startsWith(I)||G&&!J.endsWith(G))continue}u.push({node:P,index:g+1,skipped:b,depth:v+1,statics:C,dynamics:E+kf(a,g),optionals:D,extract:w,rawParams:$})}if(!T&&m.staticInsensitive){const M=m.staticInsensitive.get(O??=A.toLowerCase());M&&u.push({node:M,index:g+1,skipped:b,depth:v+1,statics:C+kf(a,g),dynamics:E,optionals:D,extract:w,rawParams:$})}if(!T&&m.static){const M=m.static.get(A);M&&u.push({node:M,index:g+1,skipped:b,depth:v+1,statics:C+kf(a,g),dynamics:E,optionals:D,extract:w,rawParams:$})}if(m.pathless){const M=v+1;for(let P=m.pathless.length-1;P>=0;P--){const I=m.pathless[P];u.push({node:I,index:g,skipped:b,depth:M,statics:C,dynamics:E,optionals:D,extract:w,rawParams:$})}}}if(f)return f;if(r&&c){let h=c.index;for(let g=0;g<c.index;g++)h+=e[g].length;const m=h===t.length?"/":t.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(m),c}return null}function kf(t,e){return 2**(t-e-1)}function JO(t,e){return t===2**(e-1)-1}function i5(t,e,n){let r,i;try{[r,i]=Uk(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Sf(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===bo)>(t.node.kind===bo)||e.node.kind===bo==(t.node.kind===bo)&&e.depth>t.depth))):!0}function nh(t){return My(t.filter(e=>e!==void 0).join("/"))}function My(t){return t.replace(/\/{2,}/g,"/")}function Gk(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function Ci(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function Wk(t){return Ci(Gk(t))}function Ch(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function ZO(t,e,n){return Ch(t,n)===Ch(e,n)}function eN({base:t,to:e,trailingSlash:n="never",cache:r}){const i=e.startsWith("/"),o=!i&&e===".";let a;if(r){a=i?e:o?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(o)u=t.split("/");else if(i)u=e.split("/");else{for(u=t.split("/");u.length>1&&vc(u)==="";)u.pop();const f=e.split("/");for(let h=0,m=f.length;h<m;h++){const g=f[h];g===""?h?h===m-1&&u.push(g):u=[g]:g===".."?u.pop():g==="."||u.push(g)}}u.length>1&&(vc(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=My(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function tN(t){const e=new Map(t.map(i=>[encodeURIComponent(i),i])),n=Array.from(e.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,o=>e.get(o)??o)}function V4(t,e,n){const r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>s5(i,n)).join("/"):s5(r,n)}function o5({path:t,params:e,decoder:n,...r}){let i=!1;const o=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:o,isMissingParams:i};const a=t.length;let u=0,c,f="";for(;u<a;){const h=u;c=Vk(t,h,c);const m=c[5];if(u=m+1,h===m)continue;const g=c[0];if(g===0){f+="/"+t.substring(h,m);continue}if(g===2){const b=e._splat;o._splat=b,o["*"]=b;const v=t.substring(h,c[1]),C=t.substring(c[4],m);if(!b){i=!0,(v||C)&&(f+="/"+v+C);continue}const E=V4("_splat",e,n);f+="/"+v+E+C;continue}if(g===1){const b=t.substring(c[2],c[3]);!i&&!(b in e)&&(i=!0),o[b]=e[b];const v=t.substring(h,c[1]),C=t.substring(c[4],m),E=V4(b,e,n)??"undefined";f+="/"+v+E+C;continue}if(g===3){const b=t.substring(c[2],c[3]),v=e[b];if(v==null)continue;o[b]=v;const C=t.substring(h,c[1]),E=t.substring(c[4],m),D=V4(b,e,n)??"";f+="/"+C+D+E;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function s5(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function Qk(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function un(t){return t?.isNotFound===!0}function nN(){try{return sessionStorage}catch{return}}const rN="tsr-scroll-restoration-v1_3",Yk=nN();function iN(){try{return JSON.parse(Yk?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function oN(){try{Yk?.setItem(rN,JSON.stringify(tl))}catch{}}const tl=iN(),a5="data-scroll-restoration-id",sN=t=>t.state.__TSR_key||t.href;function aN(t){const e=t.getAttribute(a5);if(e)return`[${a5}="${e}"]`;let n="",r=t,i;for(;i=r.parentNode;){let o=1,a=r;for(;a=a.previousElementSibling;)o++;const u=`${r.localName}:nth-child(${o})`;n=n?`${u} > ${n}`:u,r=i}return n}let $f=!1;const rh="window";function s0(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function l5(t){const e=new Set;for(const n of t){if(n===rh)continue;const r=s0(n);r&&e.add(r)}return e}function lN(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const i=t.options.getScrollRestorationKey||sN,o=new Set,a=u=>{const c=tl[u]||={};for(const f of o)f===document?c[rh]={scrollX,scrollY}:f.isConnected&&(c[aN(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,$f=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{$f||o.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(i(u.fromLocation)),o.clear()}),addEventListener("pagehide",()=>{a(i(t.stores.resolvedLocation.get()??t.stores.location.get())),oN()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",u=>{const c=t.options.scrollRestorationBehavior,f=t.options.scrollToTopSelectors,h=r.next,m=r.hash;let g;if(o.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const b=i(u.toLocation),v=u.fromLocation&&i(u.fromLocation);if(r.restoring&&v&&v!==b){const C=tl[v];if(C){let E=tl[b];for(const D in C){if(D===rh){if(h)continue}else{const w=s0(D);if(!w||h&&f&&(g??=l5(f),g.has(w)))continue}E||(E=tl[b]={}),E[D]??=C[D]}}}$f=!0;try{const C=u.toLocation.hash,E=u.toLocation.state.__hashScrollIntoViewOptions??!0;let D=!1;if(h){!C&&f&&(g??=l5(f));const w=C&&E&&m,$=r.restoring?tl[b]:void 0;if($)for(const T in $){const{scrollX:A,scrollY:O}=$[T];if(T===rh){if(w)continue;scrollTo({top:O,left:A,behavior:c}),D=!0}else{const M=s0(T);M&&(M.scrollLeft=A,M.scrollTop=O,g?.delete(M))}}if(!C){const T={top:0,left:0,behavior:c};if(D||scrollTo(T),g)for(const A of g)A.scrollTo(T)}}!D&&C&&E&&document.getElementById(C)?.scrollIntoView(E)}finally{$f=!1}}))}function uN(t,e=String){const n=new URLSearchParams;for(const r in t){const i=t[r];i!==void 0&&n.set(r,e(i))}return n.toString()}function U4(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function cN(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,i]of e.entries()){const o=n[r];o==null?n[r]=U4(i):Array.isArray(o)?o.push(U4(i)):n[r]=[o,U4(i)]}return n}const dN=hN(JSON.parse),fN=pN(JSON.stringify,JSON.parse);function hN(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=cN(e);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=t(i)}catch{}}return n}}function pN(t,e){const n=typeof e=="function";function r(i){if(typeof i=="object"&&i!==null)try{return t(i)}catch{}else if(n&&typeof i=="string")try{return e(i),t(i)}catch{}return i}return i=>{const o=uN(i,r);return o?`?${o}`:""}}const Is="__root__";function Xk(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function Nn(t){return t instanceof Response&&!!t.options}function mN(t){return{input:({url:e})=>{for(const n of t)e=a0(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=Jk(t[n],e);return e}}}function gN(t){const e=Wk(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:o})=>{const a=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return a===r?o.pathname="/":a.startsWith(i)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=nh(["/",e,o.pathname]),o)}}function a0(t,e){const n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function Jk(t,e){const n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function bN(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:o}=e,a=new Map,u=new Map,c=new Map,f=n(t.status),h=n(t.loadedAt),m=n(t.isLoading),g=n(t.isTransitioning),b=n(t.location),v=n(t.resolvedLocation),C=n(t.statusCode),E=n(t.redirect),D=n([]),w=n([]),$=n([]),T=r(()=>q4(a,D.get())),A=r(()=>q4(u,w.get())),O=r(()=>q4(c,$.get())),M=r(()=>D.get()[0]),P=r(()=>D.get().some(K=>a.get(K)?.get().status==="pending")),I=r(()=>({locationHref:b.get().href,resolvedLocationHref:v.get()?.href,status:f.get()})),G=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:m.get(),isTransitioning:g.get(),matches:T.get(),location:b.get(),resolvedLocation:v.get(),statusCode:C.get(),redirect:E.get()})),J=Cc(64);function U(K){let Y=J.get(K);return Y||(Y=r(()=>{const Z=D.get();for(const j of Z){const L=a.get(j);if(L&&L.routeId===K)return L.get()}}),J.set(K,Y)),Y}const ie={status:f,loadedAt:h,isLoading:m,isTransitioning:g,location:b,resolvedLocation:v,statusCode:C,redirect:E,matchesId:D,pendingIds:w,cachedIds:$,matches:T,pendingMatches:A,cachedMatches:O,firstId:M,hasPending:P,matchRouteDeps:I,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:G,getRouteMatchStore:U,setMatches:F,setPending:te,setCached:N};F(t.matches),o?.(ie);function F(K){G4(K,a,D,n,i)}function te(K){G4(K,u,w,n,i)}function N(K){G4(K,c,$,n,i)}return ie}function q4(t,e){const n=[];for(const r of e){const i=t.get(r);i&&n.push(i.get())}return n}function G4(t,e,n,r,i){const o=t.map(u=>u.id),a=new Set(o);i(()=>{for(const u of e.keys())a.has(u)||e.delete(u);for(const u of t){const c=e.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,e.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}jO(n.get(),o)||n.set(o)})}const l0=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},yN=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),Fp=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),Fs=(t,e,n=!0)=>{const r={...t.router.options.context??{}},i=n?e:e-1;for(let o=0;o<=i;o++){const a=t.matches[o];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},u5=(t,e)=>{if(!t.matches.length)return;const n=e.routeId,r=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),i=r>=0?r:0;let o=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;o<0&&(o=i);for(let a=o;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:i},yo=(t,e,n)=>{if(!(!Nn(n)&&!un(n)))throw Nn(n)&&n.redirectHandled&&!n.options.reloadDocument||(e&&(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0,e._nonReactive.error=n,t.updateMatch(e.id,r=>({...r,status:Nn(n)?"redirected":un(n)?"notFound":r.status==="pending"?"success":r.status,context:Fs(t,e.index),isFetching:!1,error:n})),un(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Nn(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},Zk=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},c5=(t,e,n)=>{const r=Fs(t,n);t.updateMatch(e,i=>({...i,context:r}))},Au=(t,e,n)=>{const{id:r,routeId:i}=t.matches[e],o=t.router.looseRoutesById[i];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,yo(t,t.router.getMatch(r),n);try{o.options.onError?.(n)}catch(a){n=a,yo(t,t.router.getMatch(r),n)}t.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!Nn(n)&&!un(n)&&(t.serialError??=n)},eS=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Fp(t,e)&&(n.options.loader||n.options.beforeLoad||nS(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const o=setTimeout(()=>{l0(t)},i);r._nonReactive.pendingTimeout=o}},vN=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;eS(t,e,n,r);const i=()=>{const o=t.router.getMatch(e);o.preload&&(o.status==="redirected"||o.status==="notFound")&&yo(t,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},xN=(t,e,n,r)=>{const i=t.router.getMatch(e);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=pl(()=>{o?.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&Au(t,n,a),u&&Au(t,n,u),eS(t,e,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,t.updateMatch(e,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:c})))},m=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,T=>({...T,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{h(),m()});return}i._nonReactive.beforeLoadPromise=pl();const g={...Fs(t,n,!1),...i.__routeContext},{search:b,params:v,cause:C}=i,E=Fp(t,e),D={search:b,abortController:c,params:v,preload:E,context:g,location:t.location,navigate:T=>t.router.navigate({...T,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":C,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},w=T=>{if(T===void 0){t.router.batch(()=>{h(),m()});return}(Nn(T)||un(T))&&(h(),Au(t,n,T)),t.router.batch(()=>{h(),t.updateMatch(e,A=>({...A,__beforeLoadContext:T})),m()})};let $;try{if($=r.options.beforeLoad(D),xc($))return h(),$.catch(T=>{Au(t,n,T)}).then(w)}catch(T){h(),Au(t,n,T)}w($)},CN=(t,e)=>{const{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r],o=()=>u(),a=()=>xN(t,n,e,i),u=()=>{if(Zk(t,n))return;const c=vN(t,n,i);return xc(c)?c.then(a):a()};return o()},EN=(t,e,n)=>{const r=t.router.getMatch(e);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:t.router.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([o,a,u])=>({meta:o?.meta,links:o?.links,headScripts:o?.scripts,headers:u,scripts:a,styles:o?.styles}))},tS=(t,e,n,r,i)=>{const o=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),h=Fs(t,r),m=Fp(t,n);return{params:a,deps:u,preload:!!m,parentMatchPromise:o,abortController:c,context:h,location:t.location,navigate:g=>t.router.navigate({...g,_fromLocation:t.location}),cause:m?"preload":f,route:i,...t.router.options.additionalContext}},d5=async(t,e,n,r,i)=>{try{const o=t.router.getMatch(n);try{(!(Kk??t.router.isServer)||o.ssr===!0)&&Ec(i);const a=i.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(tS(t,e,n,r,i)),f=!!u&&xc(c);if((f||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||o._nonReactive.minPendingPromise)&&t.updateMatch(n,m=>({...m,isFetching:"loader"})),u){const m=f?await c:c;yo(t,t.router.getMatch(n),m),m!==void 0&&t.updateMatch(n,g=>({...g,loaderData:m}))}i._lazyPromise&&await i._lazyPromise;const h=o._nonReactive.minPendingPromise;h&&await h,i._componentsPromise&&await i._componentsPromise,t.updateMatch(n,m=>({...m,error:void 0,context:Fs(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Fs(t,r)}));return}const c=o._nonReactive.minPendingPromise;c&&await c,un(a)&&await i.options.notFoundComponent?.preload?.(),yo(t,t.router.getMatch(n),a);try{i.options.onError?.(a)}catch(f){u=f,yo(t,t.router.getMatch(n),f)}!Nn(u)&&!un(u)&&await Ec(i,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:Fs(t,r),status:"error",isFetching:!1}))}}catch(o){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),yo(t,a,o)}},DN=async(t,e,n)=>{async function r(b,v,C,E,D){const w=Date.now()-v.updatedAt,$=b?D.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:D.options.staleTime??t.router.options.defaultStaleTime??0,T=D.options.shouldReload,A=typeof T=="function"?T(tS(t,e,i,n,D)):T,{status:O,invalid:M}=E,P=w>=$&&(!!t.forceStaleReload||E.cause==="enter"||C!==void 0&&C!==E.id);a=O==="success"&&(M||(A??P)),b&&D.options.preload===!1||(a&&!t.sync&&h?(u=!0,(async()=>{try{await d5(t,e,i,n,D);const I=t.router.getMatch(i);I._nonReactive.loaderPromise?.resolve(),I._nonReactive.loadPromise?.resolve(),I._nonReactive.loaderPromise=void 0,I._nonReactive.loadPromise=void 0}catch(I){Nn(I)&&await t.router.navigate(I.options)}})()):O!=="success"||a?await d5(t,e,i,n,D):c5(t,i,n))}const{id:i,routeId:o}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[o],f=c.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Zk(t,i)){if(!t.router.getMatch(i))return t.matches[n];c5(t,i,n)}else{const b=t.router.getMatch(i),v=t.router.stores.matchesId.get()[n],C=(v&&t.router.stores.matchStores.get(v)||null)?.routeId===o?v:t.router.stores.matches.get().find(D=>D.routeId===o)?.id,E=Fp(t,i);if(b._nonReactive.loaderPromise){if(b.status==="success"&&!t.sync&&!b.preload&&h)return b;await b._nonReactive.loaderPromise;const D=t.router.getMatch(i),w=D._nonReactive.error||D.error;w&&yo(t,D,w),D.status==="pending"&&await r(E,b,C,D,c)}else{const D=E&&!t.router.stores.matchStores.has(i),w=t.router.getMatch(i);w._nonReactive.loaderPromise=pl(),D!==w.preload&&t.updateMatch(i,$=>({...$,preload:D})),await r(E,b,C,w,c)}}const m=t.router.getMatch(i);u||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,u||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const g=u?m.isFetching:!1;return g!==m.isFetching||m.invalid!==!1?(t.updateMatch(i,b=>({...b,isFetching:g,invalid:!1})),t.router.getMatch(i)):m};async function f5(t){const e=t,n=[];yN(e.router)&&l0(e);let r;for(let g=0;g<e.matches.length;g++){try{const b=CN(e,g);xc(b)&&await b}catch(b){if(Nn(b))throw b;if(un(b))r=b;else if(!e.preload)throw b;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const i=e.firstBadMatchIndex??e.matches.length,o=r&&!e.preload?u5(e,r):void 0,a=r&&e.preload?0:o!==void 0?Math.min(o+1,i):i;let u,c;for(let g=0;g<a;g++)n.push(DN(e,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const b of g){if(b.status!=="rejected")continue;const v=b.reason;if(Nn(v))throw v;un(v)?u??=v:c??=v}if(c!==void 0)throw c}const f=u??(r&&!e.preload?r:void 0);let h=e.firstBadMatchIndex!==void 0?e.firstBadMatchIndex:e.matches.length-1;if(!f&&r&&e.preload)return e.matches;if(f){const g=u5(e,f);g===void 0&&ki();const b=e.matches[g],v=e.router.looseRoutesById[b.routeId],C=e.router.options?.defaultNotFoundComponent;!v.options.notFoundComponent&&C&&(v.options.notFoundComponent=C),f.routeId=b.routeId;const E=b.routeId===e.router.routeTree.id;e.updateMatch(b.id,D=>({...D,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=g,await Ec(v,["notFoundComponent"])}else if(!e.preload){const g=e.matches[0];g.globalNotFound||e.router.getMatch(g.id)?.globalNotFound&&e.updateMatch(g.id,b=>({...b,globalNotFound:!1,error:void 0}))}if(e.serialError&&e.firstBadMatchIndex!==void 0){const g=e.router.looseRoutesById[e.matches[e.firstBadMatchIndex].routeId];await Ec(g,["errorComponent"])}for(let g=0;g<=h;g++){const{id:b,routeId:v}=e.matches[g],C=e.router.looseRoutesById[v];try{const E=EN(e,b,C);if(E){const D=await E;e.updateMatch(b,w=>({...w,...D}))}}catch(E){console.error(`Error executing head for route ${v}:`,E)}}const m=l0(e);if(xc(m)&&await m,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function h5(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Ec(t,e=ih){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:i,...o}=r.options;Object.assign(t.options,o),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===ih?(()=>{if(t._componentsPromise===void 0){const r=h5(t,ih);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():h5(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function nS(t){for(const e of ih)if(t.options[e]?.preload)return!0;return!1}const ih=["component","errorComponent","pendingComponent","notFoundComponent"];var ko="__TSR_index",p5="popstate",m5="beforeunload";function kN(t){let e=t.getLocation();const n=new Set,r=a=>{e=t.getLocation(),n.forEach(u=>u({location:e,action:a}))},i=a=>{t.notifyOnIndexChange??!0?r(a):e=t.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=t.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const m of f){const g=Eh(c.path,c.state);if(await m.blockerFn({currentLocation:e,nextLocation:g,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=e.state[ko];u=g5(f+1,u),o({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[ko];u=g5(f,u),o({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{t.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{t.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{t.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[ko]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const u=t.getBlockers?.()??[];return t.setBlockers([...u,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r}}function g5(t,e){e||(e={});const n=Ry();return{...e,key:n,__TSR_key:n,[ko]:t}}function SN(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let i=[];const o=()=>i,a=P=>i=P,u=(P=>P),c=(()=>Eh(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const P=Ry();e.history.replaceState({[ko]:0,key:P,__TSR_key:P},"")}let f=c(),h,m=!1,g=!1,b=!1,v=!1;const C=()=>f;let E,D;const w=()=>{E&&(M._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),M._ignoreSubscribers=!1,E=void 0,D=void 0,h=void 0)},$=(P,I,G)=>{const J=u(I);D||(h=f),f=Eh(I,G),E={href:J,state:G,isPush:E?.isPush||P==="push"},D||(D=Promise.resolve().then(()=>w()))},T=P=>{f=c(),M.notify({type:P})},A=async()=>{if(g){g=!1;return}const P=c(),I=P.state[ko]-f.state[ko],G=I===1,J=I===-1,U=!G&&!J||m;m=!1;const ie=U?"GO":J?"BACK":"FORWARD",F=U?{type:"GO",index:I}:{type:J?"BACK":"FORWARD"};if(b)b=!1;else{const te=o();if(typeof document<"u"&&te.length){for(const N of te)if(await N.blockerFn({currentLocation:f,nextLocation:P,action:ie})){g=!0,e.history.go(1),M.notify(F);return}}}f=c(),M.notify(F)},O=P=>{if(v){v=!1;return}let I=!1;const G=o();if(typeof document<"u"&&G.length)for(const J of G){const U=J.enableBeforeUnload??!0;if(U===!0){I=!0;break}if(typeof U=="function"&&U()===!0){I=!0;break}}if(I)return P.preventDefault(),P.returnValue=""},M=kN({getLocation:C,getLength:()=>e.history.length,pushState:(P,I)=>$("push",P,I),replaceState:(P,I)=>$("replace",P,I),back:P=>(P&&(b=!0),v=!0,e.history.back()),forward:P=>{P&&(b=!0),v=!0,e.history.forward()},go:P=>{m=!0,e.history.go(P)},createHref:P=>u(P),flush:w,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(m5,O,{capture:!0}),e.removeEventListener(p5,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(m5,O,{capture:!0}),e.addEventListener(p5,A),e.history.pushState=function(...P){const I=n.apply(e.history,P);return M._ignoreSubscribers||T("PUSH"),I},e.history.replaceState=function(...P){const I=r.apply(e.history,P);return M._ignoreSubscribers||T("REPLACE"),I},M}function $N(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Eh(t,e){const n=$N(t),r=n.indexOf("#"),i=n.indexOf("?"),o=Ry();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:e||{[ko]:0,key:o,__TSR_key:o}}}function Ry(){return(Math.random()+1).toString(36).substring(7)}function al(t,e){const n=e,r=t;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var wN=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,i=this.basepath??r?.basepath??"/",o=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=tN(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=SN()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=Cc(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=bN(AN(this.latestLocation),h),lN(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const h=[],m=Wk(c);m&&m!=="/"&&h.push(gN({basepath:c})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:mN(h),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=QO(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&VO(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:c,search:f,hash:h,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const D=this.options.parseSearch(f),w=this.options.stringifySearch(D);return{href:c+w+h,publicHref:c+w+h,pathname:Tu(c).path,external:!1,searchStr:w,search:bs(r?.search,D),hash:Tu(h.slice(1)).path,state:$s(r?.state,g)}}const b=new URL(m,this.origin),v=a0(this.rewrite,b),C=this.options.parseSearch(v.search),E=this.options.stringifySearch(C);return v.search=E,{href:v.href.replace(v.origin,""),publicHref:m,pathname:Tu(v.pathname).path,external:!!this.rewrite&&v.origin!==this.origin,searchStr:E,search:bs(r?.search,C),hash:Tu(v.hash.slice(1)).path,state:$s(r?.state,g)}},o=i(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>eN({base:n,to:r.includes("//")?My(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>BN({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=o.to?`${o.to}`:void 0,h=u.search,m=Object.assign(Object.create(null),u.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),b=f?this.resolvePathWithBase(g,f):g,v=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?m:Object.assign(m,Ss(o.params,m)),C=this.routesByPath[Ci(b)];let E;if(C)E=this.getRouteBranch(C);else if(b.includes("$"))E=[];else{const J=this.getMatchedRoutes(b);E=J.matchedRoutes,this.options.notFoundRoute&&(!J.foundRoute||J.foundRoute.path!=="/"&&J.routeParams["**"])&&(E=[...E,this.options.notFoundRoute])}if(E.length&&jk(v))for(const J of E){const U=J.options.params?.stringify??J.options.stringifyParams;if(U)try{Object.assign(v,U(v))}catch{}}const D=n.leaveParams?b:Tu(o5({path:b,params:v,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=h;if(n._includeValidateSearch&&this.options.search?.strict){const J={};E.forEach(U=>{if(U.options.validateSearch)try{Object.assign(J,oh(U.options.validateSearch,{...J,...w}))}catch{}}),w=J}w=MN({search:w,dest:o,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),w=bs(h,w);const $=this.options.stringifySearch(w),T=o.hash===!0?a.hash:o.hash?Ss(o.hash,a.hash):void 0,A=T?`#${T}`:"";let O=o.state===!0?a.state:o.state?Ss(o.state,a.state):{};O=$s(a.state,O);const M=`${D}${$}${A}`;let P,I,G=!1;if(this.rewrite){const J=new URL(M,this.origin),U=Jk(this.rewrite,J);P=J.href.replace(J.origin,""),U.origin!==this.origin?(I=U.href,G=!0):I=U.pathname+U.search+U.hash}else P=_O(M),I=P;return{publicHref:I,href:P,pathname:D,search:w,searchStr:$,state:O,hash:T??"",external:G,unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=UO(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:m,params:g,...b}=h.route,v=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,Ss(g,f));a={from:n.from,...b,params:v},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{let o;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{i.state[m]=this.latestLocation.state[m]});const h=zs(i.state,this.latestLocation.state);return f.forEach(m=>{delete i.state[m]}),h},u=Ci(this.latestLocation.href)===Ci(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=pl(()=>{c?.resolve(),c=void 0}),u&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...m}=i;f&&(m={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,o=i.replace?"REPLACE":"PUSH",this.history[o==="REPLACE"?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this._scroll.next=i.resetScroll??!0,this.history.subscribers.size||this.load(o?{action:{type:o}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const m=this.history.location.state.__TSR_index,g=Eh(u,{__TSR_index:n?m:m+1}),b=new URL(g.pathname,this.origin);c.to=a0(this.rewrite,b).pathname,c.search=this.options.parseSearch(g.search),c.hash=g.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:o,...a})=>{let u=!1;if(i)try{new URL(`${i}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!i){const f=this.buildLocation({to:n,...a});i=i??f.publicHref,o=o??f.publicHref}const c=!u&&o?o:i;if(xh(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(o=>o.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let i,o,a;const u=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const h=this.latestLocation,m=al(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await f5({router:this,sync:n?.sync,forceStaleReload:u.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,b=null,v=null,C=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),D=E.length,w=this.stores.matches.get();g=D?w.filter(A=>!this.stores.pendingMatchStores.has(A.id)):null;const $=new Set;for(const A of this.stores.pendingMatchStores.values())A.routeId&&$.add(A.routeId);const T=new Set;for(const A of this.stores.matchStores.values())A.routeId&&T.add(A.routeId);b=D?w.filter(A=>!$.has(A.routeId)):null,v=D?E.filter(A=>!T.has(A.routeId)):null,C=D?E.filter(A=>T.has(A.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),D&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(A=>A.status!=="error"&&A.status!=="notFound"&&A.status!=="redirected")]),this.clearExpiredCache())});for(const[E,D]of[[b,"onLeave"],[v,"onEnter"],[C,"onStay"]])if(E)for(const w of E)this.looseRoutesById[w.routeId].options[D]?.(w)})})}})}catch(h){Nn(h)?(i=h,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):un(h)&&(o=h);const m=i?i.status:o?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(i)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(al(o,a)):r.types;if(u===!1){n();return}i={update:n,types:u}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=i=>n?.filter?.(i)??!0?{...i,invalid:!0,...n?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(i);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&xh(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const a=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=Ec,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=i.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return i=await f5({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(Nn(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});un(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=qO(o.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!zs(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?zs(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??fN,parseSearch:t.parseSearch??dN,protocolAllowlist:t.protocolAllowlist??KO}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=qk(t),this.routeBranchCache.set(t,e)),e}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,e){const n=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:i}=n;let{matchedRoutes:o}=n,a=!1;(r?r.path!=="/"&&i["**"]:Ci(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:a=!0);const u=a?PN(this.options.notFoundMode,o):void 0,c=new Array(o.length),f=new Map;for(const h of this.stores.matchStores.values())h.routeId&&f.set(h.routeId,h.get());for(let h=0;h<o.length;h++){const m=o[h],g=c[h-1];let b,v,C;{const U=g?.search??t.search,ie=g?._strictSearch??void 0;try{const F=oh(m.options.validateSearch,{...U})??void 0;b={...U,...F},v={...ie,...F},C=void 0}catch(F){let te=F;if(F instanceof Dh||(te=new Dh(F.message,{cause:F})),e?.throwOnError)throw te;b=U,v={},C=te}}const E=m.options.loaderDeps?.({search:b})??"",D=E?JSON.stringify(E):"",{interpolatedPath:w,usedParams:$}=o5({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),T=m.id+w+D,A=this.getMatch(T),O=f.get(m.id),M=A?._strictParams??$;let P;if(!A)try{b5(m,M)}catch(U){if(un(U)||Nn(U)?P=U:P=new TN(U.message,{cause:U}),e?.throwOnError)throw P}Object.assign(i,M);const I=O?"stay":"enter";let G;if(A)G={...A,cause:I,params:O?.params??i,_strictParams:M,search:bs(O?O.search:A.search,b),_strictSearch:v};else{const U=m.options.loader||m.options.beforeLoad||m.lazyFn||nS(m)?"pending":"success";G={id:T,ssr:m.options.ssr,index:h,routeId:m.id,params:O?.params??i,_strictParams:M,pathname:w,updatedAt:Date.now(),search:O?bs(O.search,b):b,_strictSearch:v,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:pl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:O?$s(O.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}e?.preload||(G.globalNotFound=u===m.id),G.searchError=C;const J=this.getParentContext(g);G.context={...J,...G.__routeContext,...G.__beforeLoadContext},c[h]=G}for(let h=0;h<c.length;h++){const m=c[h],g=this.looseRoutesById[m.routeId],b=this.getMatch(m.id),v=f.get(m.routeId);if(m.params=v?bs(v.params,i):i,!b){const C=c[h-1],E=this.getParentContext(C);if(g.options.context){const D={deps:m.loaderDeps,params:m.params,context:E??{},location:t,navigate:w=>this.navigate({...w,_fromLocation:t}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:c,routeId:g.id};m.__routeContext=g.options.context(D)??void 0}m.context={...E,...m.__routeContext,...m.__beforeLoadContext}}}return c}matchRoutesLightweight(t){const e=vc(this.stores.matchesId.get()),n=this.lightweightCache.get(t);if(n&&n[0]===e)return n[1];const{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(t.pathname),o=vc(r),a={...t.search};for(const m of r)try{Object.assign(a,oh(m.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===o.id&&u.pathname===t.pathname;let f;if(c)f=u.params;else{const m=Object.assign(Object.create(null),i);for(const g of r)try{b5(g,m)}catch{}f=m}const h={matchedRoutes:r,fullPath:o.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,h]),h}},Dh=class extends Error{},TN=class extends Error{};function AN(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function oh(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Dh("Async validation not supported");if(n.issues)throw new Dh(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function BN({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),i=Ci(t);let o;const a=GO(i,n,!0);return a&&(o=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:o}}function MN({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return RN(n)(t,e,r??!1)}function RN(t){let e,n;const r=[];for(const o of t){const a=o.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const c=({search:f,next:h})=>{const m=h(a.preSearchFilters?a.preSearchFilters.reduce((g,b)=>b(g),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((g,b)=>b(g),m):m};r.push(c)}const u=a.validateSearch;if(u){const c=({search:f,next:h,meta:m})=>{const g=h(f);if(n)try{const b=oh(u,g);if(m&&b)for(const v in b)v in g||(m.defaulted||=new Map).set(v,b[v]);return{...g,...b}}catch{}return g};r.push(c)}}const i=(o,a,u)=>{if(o>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=Ss(e.search,a);return u&&(u.explicit=f),f}const c=(f,h)=>{if(h){const m=u||{};return{search:i(o+1,f,m),meta:m}}return i(o+1,f,u)};return r[o]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,i(0,a)}}function PN(t,e){if(t!=="root")for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.children)return r.id}return Is}function b5(t,e){const n=t.options.params?.parse??t.options.parseParams;if(n){const r=n(e);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(e,r)}}const ON="Error preloading route! ☝️";var rS=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Is:this.parentRoute||ki();let i=r?Is:n?.path;i&&i!=="/"&&(i=Gk(i));const o=n?.id||i;let a=r?Is:nh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=nh(["/",a]));const u=a==="__root__"?"/":nh([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=Ci(u)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Xk({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},NN=class{constructor({id:t}){this.notFound=e=>Qk({routeId:this.id,...e}),this.redirect=e=>Xk({from:this.id,...e}),this.id=t}},LN=class extends rS{constructor(t){super(t)}};function Py(t){const e=t.errorComponent??Oy;return B.jsx(zN,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?k.createElement(e,{error:n,reset:r}):t.children})}var zN=class extends k.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,e){const n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,e){this.props.onCatch&&this.props.onCatch(t,e)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Oy({error:t}){const[e,n]=k.useState(!1);return B.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[B.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[B.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),B.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:e?"Hide Error":"Show Error"})]}),B.jsx("div",{style:{height:".25rem"}}),e?B.jsx("div",{children:B.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?B.jsx("code",{children:t.message}):null})}):null]})}function IN({children:t,fallback:e=null}){return iS()?B.jsx(H.Fragment,{children:t}):B.jsx(H.Fragment,{children:e})}function iS(){return H.useSyncExternalStore(FN,()=>!0,()=>!1)}function FN(){return()=>{}}var oS=k.createContext(null);function yn(t){return k.useContext(oS)}var Kp=k.createContext(void 0),KN=k.createContext(void 0),ft=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(ft||{});function _N({update:t,notify:e,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,m){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const b=g!==void 0?g.nextDep:h.deps;if(b!==void 0&&b.dep===f){b.version=m,h.depsTail=b;return}const v=f.subsTail;if(v!==void 0&&v.version===m&&v.sub===h)return;const C=h.depsTail=f.subsTail={version:m,dep:f,sub:h,prevDep:g,nextDep:b,prevSub:v,nextSub:void 0};b!==void 0&&(b.prevDep=C),g!==void 0?g.nextDep=C:h.deps=C,v!==void 0?v.nextSub=C:f.subs=C}function i(f,h=f.sub){const m=f.dep,g=f.prevDep,b=f.nextDep,v=f.nextSub,C=f.prevSub;return b!==void 0?b.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=b:h.deps=b,v!==void 0?v.prevSub=C:m.subsTail=C,C!==void 0?C.nextSub=v:(m.subs=v)===void 0&&n(m),b}function o(f){let h=f.nextSub,m;e:do{const g=f.sub;let b=g.flags;if(b&60?b&12?b&4?!(b&48)&&c(f,g)?(g.flags=b|40,b&=1):b=0:g.flags=b&-9|32:b=0:g.flags=b|32,b&2&&e(g),b&1){const v=g.subs;if(v!==void 0){const C=(f=v).nextSub;C!==void 0&&(m={value:h,prev:m},h=C);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;m!==void 0;)if(f=m.value,m=m.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let m,g=0,b=!1;e:do{const v=f.dep,C=v.flags;if(h.flags&16)b=!0;else if((C&17)===17){if(t(v)){const E=v.subs;E.nextSub!==void 0&&u(E),b=!0}}else if((C&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=v.deps,h=v,++g;continue}if(!b){const E=f.nextDep;if(E!==void 0){f=E;continue}}for(;g--;){const E=h.subs,D=E.nextSub!==void 0;if(D?(f=m.value,m=m.prev):f=E,b){if(t(h)){D&&u(E),h=f.sub;continue}b=!1}else h.flags&=-33;h=f.sub;const w=f.nextDep;if(w!==void 0){f=w;continue e}}return b}while(!0)}function u(f){do{const h=f.sub,m=h.flags;(m&48)===32&&(h.flags=m|16,(m&6)===2&&e(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let m=h.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function jN(t,e,n){const r=typeof t=="object",i=r?t:void 0;return{next:(r?t.next:t)?.bind(i),error:(r?t.error:e)?.bind(i),complete:(r?t.complete:n)?.bind(i)}}const u0=[];let sh=0;const{link:y5,unlink:HN,propagate:VN,checkDirty:sS,shallowPropagate:v5}=_N({update(t){return t._update()},notify(t){u0[c0++]=t,t.flags&=~ft.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=ft.Mutable|ft.Dirty,kh(t))}});let wf=0,c0=0,_r,d0=0;function aS(t){try{++d0,t()}finally{--d0||lS()}}function kh(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=HN(n,t)}function lS(){if(!(d0>0)){for(;wf<c0;){const t=u0[wf];u0[wf++]=void 0,t.notify()}wf=0,c0=0}}function x5(t,e){const n=typeof t=="function",r=t,i={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?ft.None:ft.Mutable,get(){return _r!==void 0&&y5(i,_r,sh),i._snapshot},subscribe(o){const a=jN(o),u={current:!1},c=UN(()=>{i.get(),u.current?a.next?.(i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=_r,u=e?.compare??Object.is;if(n)_r=i,++sh,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const c=i._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{_r=a,n&&(i.flags&=~ft.RecursedCheck),kh(i)}}};return n?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const o=i.flags;if(o&ft.Dirty||o&ft.Pending&&sS(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&v5(a)}}else o&ft.Pending&&(i.flags=o&~ft.Pending);return _r!==void 0&&y5(i,_r,sh),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(VN(a),v5(a),lS())}},i}function UN(t){const e=()=>{const r=_r;_r=n,++sh,n.depsTail=void 0,n.flags=ft.Watching|ft.RecursedCheck;try{return t()}finally{_r=r,n.flags&=~ft.RecursedCheck,kh(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ft.Watching|ft.RecursedCheck,notify(){const r=this.flags;r&ft.Dirty||r&ft.Pending&&sS(this.deps,this)?e():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,kh(this)}};return e(),n}var W4={exports:{}},Q4={},Y4={exports:{}},X4={};var C5;function qN(){if(C5)return X4;C5=1;var t=jc();function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function u(m,g){var b=g(),v=r({inst:{value:b,getSnapshot:g}}),C=v[0].inst,E=v[1];return o(function(){C.value=b,C.getSnapshot=g,c(C)&&E({inst:C})},[m,b,g]),i(function(){return c(C)&&E({inst:C}),m(function(){c(C)&&E({inst:C})})},[m]),a(b),b}function c(m){var g=m.getSnapshot;m=m.value;try{var b=g();return!n(m,b)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return X4.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,X4}var E5;function uS(){return E5||(E5=1,Y4.exports=qN()),Y4.exports}var D5;function GN(){if(D5)return Q4;D5=1;var t=jc(),e=uS();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,o=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return Q4.useSyncExternalStoreWithSelector=function(f,h,m,g,b){var v=o(null);if(v.current===null){var C={hasValue:!1,value:null};v.current=C}else C=v.current;v=u(function(){function D(O){if(!w){if(w=!0,$=O,O=g(O),b!==void 0&&C.hasValue){var M=C.value;if(b(M,O))return T=M}return T=O}if(M=T,r($,O))return M;var P=g(O);return b!==void 0&&b(M,P)?($=O,M):($=O,T=P)}var w=!1,$,T,A=m===void 0?null:m;return[function(){return D(h())},A===null?void 0:function(){return D(A())}]},[h,m,g,b]);var E=i(f,v[0],v[1]);return a(function(){C.hasValue=!0,C.value=E},[E]),c(E),E},Q4}var k5;function WN(){return k5||(k5=1,W4.exports=GN()),W4.exports}var cS=WN();function QN(t,e){return t===e}function vn(t,e,n=QN){const r=k.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),i=k.useCallback(()=>t?.get(),[t]);return cS.useSyncExternalStoreWithSelector(r,i,i,e,n)}var J4={get(){},subscribe(){return{unsubscribe(){}}}};function YN(t,e){const n=k.useRef();return r=>{const i=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=$s(n.current,i):i}}function Fo(t){const e=yn(),n=k.useContext(t.from?KN:Kp),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),i=YN(t,e),o=vn(r??J4,a=>a?i(a):J4);if(o!==J4)return o;(t.shouldThrow??!0)&&ki()}function Ny(t){return Fo({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function Ly(t){const{select:e,...n}=t;return Fo({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function zy(t){return Fo({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function Vc(t){return Fo({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function ta(t){const e=yn();return k.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function Iy(t){return Fo({...t,select:e=>t.select?t.select(e.context):e.context})}var $l=Ak();const dS=Tk($l);function XN(t,e){const n=yn(),r=NO(e),{activeProps:i,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:m,replace:g,startTransition:b,resetScroll:v,viewTransition:C,children:E,target:D,disabled:w,style:$,className:T,onClick:A,onBlur:O,onFocus:M,onMouseEnter:P,onMouseLeave:I,onTouchStart:G,ignoreBlocker:J,params:U,search:ie,hash:F,state:te,mask:N,reloadDocument:K,unsafeRelative:Y,from:Z,_fromLocation:j,...L}=t,V=iS(),ne=k.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),le=vn(n.stores.location,it=>it,(it,Ut)=>it.href===Ut.href),ue=k.useMemo(()=>{const it={_fromLocation:le,...ne};return n.buildLocation(it)},[n,le,ne]),fe=ue.maskedLocation?ue.maskedLocation.publicHref:ue.publicHref,Ee=ue.maskedLocation?ue.maskedLocation.external:ue.external,Ve=k.useMemo(()=>rL(fe,Ee,n.history,w),[w,Ee,fe,n.history]),Se=k.useMemo(()=>{if(Ve?.external)return xh(Ve.href,n.protocolAllowlist)?void 0:Ve.href;if(!iL(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),xh(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Ve,n.protocolAllowlist]),En=k.useMemo(()=>{if(Se)return!1;if(a?.exact){if(!ZO(le.pathname,ue.pathname,n.basepath))return!1}else{const it=Ch(le.pathname,n.basepath),Ut=Ch(ue.pathname,n.basepath);if(!(it.startsWith(Ut)&&(it.length===Ut.length||it[Ut.length]==="/")))return!1}return(a?.includeSearch??!0)&&!zs(le.search,ue.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?V&&le.hash===ue.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,le,Se,V,ue.hash,ue.pathname,ue.search,n.basepath]),rn=En?Ss(i,{})??JN:Z4,hn=En?Z4:Ss(o,{})??Z4,mr=[T,rn.className,hn.className].filter(Boolean).join(" "),Ft=($||rn.style||hn.style)&&{...$,...rn.style,...hn.style},[Yo,Ie]=k.useState(!1),Oi=k.useRef(!1),Wr=t.reloadDocument||Se?!1:c??n.options.defaultPreload,Xo=f??n.options.defaultPreloadDelay??0,gr=k.useCallback(()=>{n.preloadRoute({...ne,_builtLocation:ue}).catch(it=>{console.warn(it),console.warn(ON)})},[n,ne,ue]);OO(r,k.useCallback(it=>{it?.isIntersecting&&gr()},[gr]),nL,{disabled:!!w||Wr!=="viewport"}),k.useEffect(()=>{Oi.current||!w&&Wr==="render"&&(gr(),Oi.current=!0)},[w,gr,Wr]);const Pl=it=>{const Ut=it.currentTarget.getAttribute("target"),Br=D!==void 0?D:Ut;if(!w&&!oL(it)&&!it.defaultPrevented&&(!Br||Br==="_self")&&it.button===0){it.preventDefault(),$l.flushSync(()=>{Ie(!0)});const da=n.subscribe("onResolved",()=>{da(),Ie(!1)});n.navigate({...ne,replace:g,resetScroll:v,hashScrollIntoView:m,startTransition:b,viewTransition:C,ignoreBlocker:J})}};if(Se)return{...L,ref:r,href:Se,...E&&{children:E},...D&&{target:D},...w&&{disabled:w},...$&&{style:$},...T&&{className:T},...A&&{onClick:A},...O&&{onBlur:O},...M&&{onFocus:M},...P&&{onMouseEnter:P},...I&&{onMouseLeave:I},...G&&{onTouchStart:G}};const od=it=>{if(w||Wr!=="intent")return;if(!Xo){gr();return}const Ut=it.currentTarget;if(Bu.has(Ut))return;const Br=setTimeout(()=>{Bu.delete(Ut),gr()},Xo);Bu.set(Ut,Br)},Em=it=>{w||Wr!=="intent"||gr()},on=it=>{if(w||!Wr||!Xo)return;const Ut=it.currentTarget,Br=Bu.get(Ut);Br&&(clearTimeout(Br),Bu.delete(Ut))};return{...L,...rn,...hn,href:Ve?.href,ref:r,onClick:Ya([A,Pl]),onBlur:Ya([O,on]),onFocus:Ya([M,od]),onMouseEnter:Ya([P,od]),onMouseLeave:Ya([I,on]),onTouchStart:Ya([G,Em]),disabled:!!w,target:D,...Ft&&{style:Ft},...mr&&{className:mr},...w&&ZN,...En&&eL,...V&&Yo&&tL}}var Z4={},JN={className:"active"},ZN={role:"link","aria-disabled":!0},eL={"data-status":"active","aria-current":"page"},tL={"data-transitioning":"transitioning"},Bu=new WeakMap,nL={rootMargin:"100px"},Ya=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function rL(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function iL(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Fy=k.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:i,...o}=XN(r,e),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return k.createElement("a",c,a)}return k.createElement(n,o,a)});function oL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function sL(t){return new aL({id:t})}var aL=class extends NN{constructor({id:t}){super({id:t}),this.useMatch=e=>Fo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Iy({...e,from:this.id}),this.useSearch=e=>Vc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>zy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ly({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Ny({...e,from:this.id,strict:!1}),this.useNavigate=()=>ta({from:yn().routesById[this.id].fullPath}),this.notFound=e=>Qk({routeId:this.id,...e}),this.Link=H.forwardRef((e,n)=>{const r=yn().routesById[this.id].fullPath;return B.jsx(Fy,{ref:n,from:r,...e})})}},lL=class extends rS{constructor(t){super(t),this.useMatch=e=>Fo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Iy({...e,from:this.id}),this.useSearch=e=>Vc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>zy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ly({...e,from:this.id}),this.useLoaderData=e=>Ny({...e,from:this.id}),this.useNavigate=()=>ta({from:this.fullPath}),this.Link=H.forwardRef((e,n)=>B.jsx(Fy,{ref:n,from:this.fullPath,...e}))}};function fS(t){return new lL(t)}var uL=class extends LN{constructor(t){super(t),this.useMatch=e=>Fo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Iy({...e,from:this.id}),this.useSearch=e=>Vc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>zy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ly({...e,from:this.id}),this.useLoaderData=e=>Ny({...e,from:this.id}),this.useNavigate=()=>ta({from:this.fullPath}),this.Link=H.forwardRef((e,n)=>B.jsx(Fy,{ref:n,from:this.fullPath,...e}))}};function cL(t){return new uL(t)}function dL(t){const e=yn(),n=`not-found-${vn(e.stores.location,r=>r.pathname)}-${vn(e.stores.status,r=>r)}`;return B.jsx(Py,{getResetKey:()=>n,onCatch:(r,i)=>{if(un(r))t.onCatch?.(r,i);else throw r},errorComponent:({error:r})=>{if(un(r))return t.fallback?.(r);throw r},children:t.children})}function fL(){return B.jsx("p",{children:"Not Found"})}function nl(t){return B.jsx(B.Fragment,{children:t.children})}function hS(t,e,n){return e.options.notFoundComponent?B.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?B.jsx(t.options.defaultNotFoundComponent,{...n}):B.jsx(fL,{})}function hL(t){return null}function pL(){return hL(yn()),null}var mL=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,gL=(t,e)=>t[0]===e[0]&&t[1]===e[1],pS=k.memo(function({matchId:e}){const n=yn(),r=n.stores.matchStores.get(e);r||ki();const i=vn(n.stores.loadedAt,a=>a),o=vn(r,a=>a,mL);return B.jsx(bL,{router:n,matchId:e,resetKey:i,matchState:k.useMemo(()=>{const a=o.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function bL({router:t,matchId:e,resetKey:n,matchState:r}){const i=t.routesById[r.routeId],o=i.options.pendingComponent??t.options.defaultPendingComponent,a=o?B.jsx(o,{}):null,u=i.options.errorComponent??t.options.defaultErrorComponent,c=i.options.onCatch??t.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??t.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",m=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??o??(i.options.errorComponent?.preload||h))?k.Suspense:nl,g=u?Py:nl,b=f?dL:nl;return B.jsxs(i.isRoot?i.options.shellComponent??nl:nl,{children:[B.jsx(Kp.Provider,{value:e,children:B.jsx(m,{fallback:a,children:B.jsx(g,{getResetKey:()=>n,errorComponent:u||Oy,onCatch:(v,C)=>{if(un(v))throw v.routeId??=r.routeId,v;c?.(v,C)},children:B.jsx(b,{fallback:v=>{if(v.routeId??=r.routeId,!f||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!i.isRoot)throw v;return k.createElement(f,v)},children:h||r._displayPending?B.jsx(IN,{fallback:a,children:B.jsx(S5,{matchId:e})}):B.jsx(S5,{matchId:e})})})})}),r.parentRouteId===Is?B.jsxs(B.Fragment,{children:[B.jsx(yL,{}),t.options.scrollRestoration&&Kk?B.jsx(pL,{}):null]}):null]})}function yL(){const t=yn(),e=k.useRef();return Ku(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...al(t.stores.location.get(),r??n)}),e.current=n},[vn(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var S5=k.memo(function({matchId:e}){const n=yn(),r=(h,m)=>n.getMatch(h.id)?._nonReactive[m]??h._nonReactive[m],i=n.stores.matchStores.get(e);i||ki();const o=vn(i,h=>h),a=o.routeId,u=n.routesById[a],c=k.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=k.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?B.jsx(h,{},c):B.jsx(mS,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const m=n.getMatch(o.id);if(m&&!m._nonReactive.minPendingPromise){const g=pl();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return un(o.error)||ki(),hS(n,u,o.error);if(o.status==="redirected")throw Nn(o.error)||ki(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),mS=k.memo(function(){const e=yn(),n=k.useContext(Kp);let r,i=!1,o;{const f=n?e.stores.matchStores.get(n):void 0;[r,i]=vn(f,h=>[h?.routeId,h?.globalNotFound??!1],gL),o=vn(e.stores.matchesId,h=>h[h.findIndex(m=>m===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?B.jsx(e.options.defaultPendingComponent,{}):null;if(i)return a||ki(),hS(e,a,void 0);if(!o)return null;const c=B.jsx(pS,{matchId:o});return r===Is?B.jsx(k.Suspense,{fallback:u,children:c}):c});function vL(){const t=yn(),e=k.useRef({router:t,mounted:!1}),[n,r]=k.useState(!1),i=vn(t.stores.isLoading,m=>m),o=vn(t.stores.hasPending,m=>m),a=_4(i),u=i||n||o,c=_4(u),f=i||o,h=_4(f);return t.startTransition=m=>{r(!0),k.startTransition(()=>{m(),r(!1)})},k.useEffect(()=>{const m=t.history.subscribe(t.load),g=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ci(t.latestLocation.publicHref)!==Ci(g.publicHref)&&t.commitLocation({...g,replace:!0}),()=>{m()}},[t,t.history]),Ku(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(g){console.error(g)}})()},[t]),Ku(()=>{a&&!i&&t.emit({type:"onLoad",...al(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,i]),Ku(()=>{h&&!f&&t.emit({type:"onBeforeRouteMount",...al(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,h,t]),Ku(()=>{if(c&&!u){const m=al(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...m}),aS(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function xL(){const t=yn(),e=t.routesById[Is].options.pendingComponent??t.options.defaultPendingComponent,n=e?B.jsx(e,{}):null,r=B.jsxs(typeof document<"u"&&t.ssr?nl:k.Suspense,{fallback:n,children:[B.jsx(vL,{}),B.jsx(CL,{})]});return t.options.InnerWrap?B.jsx(t.options.InnerWrap,{children:r}):r}function CL(){const t=yn(),e=vn(t.stores.firstId,i=>i),n=vn(t.stores.loadedAt,i=>i),r=e?B.jsx(pS,{matchId:e}):null;return B.jsx(Kp.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:B.jsx(Py,{getResetKey:()=>n,errorComponent:Oy,onCatch:void 0,children:r})})}function gS(){const t=yn();return vn(t.stores.matchRouteDeps,e=>e),k.useCallback(e=>{const{pending:n,caseSensitive:r,fuzzy:i,includeSearch:o,...a}=e;return t.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:o})},[t])}var EL=t=>({createMutableStore:x5,createReadonlyStore:x5,batch:aS}),DL=t=>new kL(t),kL=class extends wN{constructor(t){super(t,EL)}};function SL({router:t,children:e,...n}){jk(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=B.jsx(oS.Provider,{value:t,children:e});return t.options.Wrap?B.jsx(t.options.Wrap,{children:r}):r}function $L({router:t,...e}){return B.jsx(SL,{router:t,...e,children:B.jsx(xL,{})})}function Ko(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Le=typeof document<"u"?H.useLayoutEffect:()=>{},bS={prefix:String(Math.round(Math.random()*1e10)),current:0},yS=H.createContext(bS),wL=H.createContext(!1);let eb=new WeakMap;function TL(t=!1){let e=k.useContext(yS),n=k.useRef(null);if(n.current===null&&!t){let r=H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(r){let i=eb.get(r);i==null?eb.set(r,{id:e.current,state:r.memoizedState}):r.memoizedState!==i.state&&(e.current=i.id,eb.delete(r))}n.current=++e.current}return n.current}function AL(t){let e=k.useContext(yS),n=TL(!!t),r=`react-aria${e.prefix}`;return t||`${r}-${n}`}function BL(t){let e=H.useId(),[n]=k.useState(_o()),r=n?"react-aria":`react-aria${bS.prefix}`;return t||`${r}-${e}`}const ML=typeof H.useId=="function"?BL:AL;function RL(){return!1}function PL(){return!0}function OL(t){return()=>{}}function _o(){return typeof H.useSyncExternalStore=="function"?H.useSyncExternalStore(OL,RL,PL):k.useContext(wL)}function NL(t){let[e,n]=k.useState(t),r=k.useRef(e),i=k.useRef(null),o=k.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}r.current===u.value?o.current():n(u.value)});Le(()=>{r.current=e,i.current&&o.current()});let a=k.useCallback(u=>{i.current=u(r.current),o.current()},[o]);return[e,a]}let LL=!!(typeof window<"u"&&window.document&&window.document.createElement),ll=new Map,_u;typeof FinalizationRegistry<"u"&&(_u=new FinalizationRegistry(t=>{ll.delete(t)}));function nn(t){let[e,n]=k.useState(t),r=k.useRef(null),i=ML(e),o=k.useRef(null);if(_u&&_u.register(o,i),LL){const a=ll.get(i);a&&!a.includes(r)?a.push(r):ll.set(i,[r])}return Le(()=>{let a=i;return()=>{_u&&_u.unregister(o),ll.delete(a)}},[i]),k.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function zL(t,e){if(t===e)return t;let n=ll.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=ll.get(e);return r?(r.forEach(i=>i.current=t),t):e}function Ks(t=[]){let e=nn(),[n,r]=NL(e),i=k.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return Le(i,[e,i,...t]),n}function Uc(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(i=>{const o=$5(i,e);return n||=typeof o=="function",o});if(n)return()=>{r.forEach((i,o)=>{typeof i=="function"?i():$5(t[o],null)})}}}function $5(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function vS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=vS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ky(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=vS(t))&&(r&&(r+=" "),r+=e);return r}function we(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Ko(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=Ky(o,a):i==="id"&&o&&a?e.id=zL(o,a):i==="ref"&&o&&a?e.ref=Uc(o,a):e[i]=a!==void 0?a:o}}return e}function jo(t){const e=k.useRef(null),n=k.useRef(void 0),r=k.useCallback(i=>{if(typeof t=="function"){const o=t,a=o(i);return()=>{typeof a=="function"?a():o(null)}}else if(t)return t.current=i,()=>{t.current=null}},[t]);return k.useMemo(()=>({get current(){return e.current},set current(i){e.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}const vo=Symbol("default");function Ar({values:t,children:e}){for(let[n,r]of t)e=H.createElement(n.Provider,{value:r},e);return e}function Rt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:u,render:c}=t;return k.useMemo(()=>{let f,h,m;return typeof e=="function"?f=e({...u,defaultClassName:i}):f=e,typeof n=="function"?h=n({...u,defaultStyle:a||{}}):h=n,typeof r=="function"?m=r({...u,defaultChildren:o}):r==null?m=o:m=r,{className:f??i,style:h||a?{...a,...h}:void 0,children:m??o,"data-rac":"",render:c?g=>c(g,u):void 0}},[e,n,r,i,o,a,u,c])}function Dc(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function wl(t,e){let n=k.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||vo;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(a=>`"${a}"`)),o=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${i}.`)}return n.slots[r]}return n}function Ct(t,e,n){let r=wl(n,t.slot)||{},{ref:i,...o}=r,a=jo(k.useMemo(()=>Uc(e,i),[e,i])),u=we(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?u.style=c=>{let f=typeof o.style=="function"?o.style(c):o.style,h={...c.defaultStyle,...f},m=typeof t.style=="function"?t.style({...c,defaultStyle:h}):t.style;return{...h,...m}}:u.style={...o.style,...t.style}),[u,a]}function xS(t=!0){let[e,n]=k.useState(t),r=k.useRef(!1),i=k.useCallback(o=>{r.current=!0,n(!!o)},[]);return Le(()=>{r.current||n(!1)},[]),[i,e]}function CS(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function IL(t,e,n){let{render:r,...i}=e,o=k.useRef(null),a=k.useMemo(()=>Uc(n,o),[n,o]);Le(()=>{},[t,r]);let u={...i,ref:a};return r?r(u,void 0):H.createElement(t,u)}const w5={},at=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=w5[e];return n||(n=k.forwardRef(IL.bind(null,e)),w5[e]=n),n}}),ES="react-aria-clear-focus",f0="react-aria-focus",ze=t=>t?.ownerDocument??document,cn=t=>t&&"window"in t&&t.window===t?t:ze(t).defaultView||window;function FL(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function KL(t){return FL(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let _L=!1;function xi(){return _L}function $e(t,e){if(!xi())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:KL(n)?n=n.host:n=n.parentNode}return!1}const _e=(t=document)=>{if(!xi())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function de(t){if(xi()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function ml(t){if(!t)return!1;let e=t.getRootNode(),n=cn(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}function _y(t){let e=DS(ze(t));e!==t&&(e&&h0(e,t),t&&Sh(t,e))}function h0(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Sh(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function DS(t){let e=_e(t),n=e?.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}function Tr(t){if(jL())t.focus({preventScroll:!0});else{let e=HL(t);t.focus(),VL(e)}}let Tf=null;function jL(){if(Tf==null){Tf=!1;try{document.createElement("div").focus({get preventScroll(){return Tf=!0,!0}})}catch{}}return Tf}function HL(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function VL(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const UL=typeof Element<"u"&&"checkVisibility"in Element.prototype;function qL(t){const e=cn(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=cn(t);let{display:a,visibility:u}=o(t);i=a!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function GL(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function jy(t,e){return UL?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&qL(t)&&GL(t,e)&&(!t.parentElement||jy(t.parentElement,t))}const Hy=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],WL=Hy.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Hy.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const QL=Hy.join(':not([hidden]):not([tabindex="-1"]),');function kS(t,e){return t.matches(WL)&&!SS(t)&&(e?.skipVisibilityCheck||jy(t))}function $h(t){return t.matches(QL)&&jy(t)&&!SS(t)}function SS(t){let e=t;for(;e!=null;){if(e instanceof cn(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function Vy(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function $S(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function wS(t){let e=k.useRef({isFocused:!1,observer:null});return Le(()=>{const n=e.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]),k.useCallback(n=>{let r=de(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r,o=a=>{if(e.current.isFocused=!1,i.disabled){let u=Vy(a);t?.(u)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){e.current.observer?.disconnect();let a=i===_e()?null:_e();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let wh=!1;function YL(t){for(;t&&!kS(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=cn(t),n=e.document.activeElement;if(!n||n===t)return;wh=!0;let r=!1,i=h=>{(de(h)===n||r)&&h.stopImmediatePropagation()},o=h=>{(de(h)===n||r)&&(h.stopImmediatePropagation(),!t&&!r&&(r=!0,Tr(n),c()))},a=h=>{(de(h)===t||r)&&h.stopImmediatePropagation()},u=h=>{(de(h)===t||r)&&(h.stopImmediatePropagation(),r||(r=!0,Tr(n),c()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",o,!0),e.addEventListener("focusin",u,!0),e.addEventListener("focus",a,!0);let c=()=>{cancelAnimationFrame(f),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",o,!0),e.removeEventListener("focusin",u,!0),e.removeEventListener("focus",a,!0),wh=!1,r=!1},f=requestAnimationFrame(c);return c}function _p(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(n=>t.test(n.brand))||t.test(window.navigator.userAgent)}function Uy(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Bi(t){let e=null;return()=>(e==null&&(e=t()),e)}const Mo=Bi(function(){return Uy(/^Mac/i)}),XL=Bi(function(){return Uy(/^iPhone/i)}),qy=Bi(function(){return Uy(/^iPad/i)||Mo()&&navigator.maxTouchPoints>1}),Ti=Bi(function(){return XL()||qy()}),JL=Bi(function(){return Mo()||Ti()}),Gy=Bi(function(){return _p(/AppleWebKit/i)&&!TS()}),TS=Bi(function(){return _p(/Chrome/i)}),jp=Bi(function(){return _p(/Android/i)}),ZL=Bi(function(){return _p(/Firefox/i)});function Hp(t){return t.pointerType===""&&t.isTrusted?!0:jp()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Wy(t){return!jp()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const AS=k.createContext({isNative:!0,open:tz,useHref:t=>t});function ez(t){let{children:e,navigate:n,useHref:r}=t,i=k.useMemo(()=>({isNative:!1,open:(o,a,u,c)=>{MS(o,f=>{BS(f,a)?n(u,c):qr(f,a)})},useHref:r||(o=>o)}),[n,r]);return H.createElement(AS.Provider,{value:i},e)}function Tl(){return k.useContext(AS)}function BS(t,e){let n=t.getAttribute("target");return(!n||n==="_self")&&t.origin===location.origin&&!t.hasAttribute("download")&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function qr(t,e,n=!0){let{metaKey:r,ctrlKey:i,altKey:o,shiftKey:a}=e;ZL()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(Mo()?r=!0:i=!0);let u=Gy()&&Mo()&&!qy()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:o,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:o,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});qr.isOpening=n,Tr(t),t.dispatchEvent(u),qr.isOpening=!1}qr.isOpening=!1;function MS(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function tz(t,e){MS(t,n=>qr(n,e))}function nz(t){const n=Tl().useHref(t.href??"");return{"data-href":t.href?n:void 0,"data-target":t.target,"data-rel":t.rel,"data-download":t.download,"data-ping":t.ping,"data-referrer-policy":t.referrerPolicy}}function RS(t){const n=Tl().useHref(t?.href??"");let r={};if(t)for(let i of["href","target","rel","download","ping","referrerPolicy"])i in t&&(r[i]=i==="href"?n:t[i]);return r}function PS(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&BS(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}let Ai=null,Al="keyboard";const kc=new Set;let Zu=new Map,Ws=!1,p0=!1;const rz={Tab:!0,Escape:!0};function Vp(t,e){for(let n of kc)n(t,e)}function iz(t){return!(t.metaKey||!Mo()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Th(t){Ws=!0,!qr.isOpening&&iz(t)&&(Ai="keyboard",Al="keyboard",Vp("keyboard",t))}function ul(t){Ai="pointer",Al="pointerType"in t?t.pointerType:"mouse",(t.type==="mousedown"||t.type==="pointerdown")&&(Ws=!0,Vp("pointer",t))}function OS(t){!qr.isOpening&&Hp(t)&&(Ws=!0,Ai="virtual",Al="virtual")}function NS(t){let e=cn(de(t)),n=ze(de(t));de(t)===e||de(t)===n||wh||!t.isTrusted||(!Ws&&!p0&&(Ai="virtual",Al="virtual",Vp("virtual",t)),Ws=!1,p0=!1)}function LS(){wh||(Ws=!1,p0=!0)}function Ah(t){if(typeof window>"u"||typeof document>"u")return;const e=cn(t),n=ze(t);if(Zu.get(e))return;let r=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Ws=!0,r.apply(this,arguments)}}),n.addEventListener("keydown",Th,!0),n.addEventListener("keyup",Th,!0),n.addEventListener("click",OS,!0),e.addEventListener("focus",NS,!0),e.addEventListener("blur",LS,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",ul,!0),n.addEventListener("pointermove",ul,!0),n.addEventListener("pointerup",ul,!0)),e.addEventListener("beforeunload",()=>{zS(t)},{once:!0}),Zu.set(e,{focus:r})}const zS=(t,e)=>{const n=cn(t),r=ze(t);e&&r.removeEventListener("DOMContentLoaded",e),Zu.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:Zu.get(n).focus}),r.removeEventListener("keydown",Th,!0),r.removeEventListener("keyup",Th,!0),r.removeEventListener("click",OS,!0),n.removeEventListener("focus",NS,!0),n.removeEventListener("blur",LS,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",ul,!0),r.removeEventListener("pointermove",ul,!0),r.removeEventListener("pointerup",ul,!0)),Zu.delete(n))};function oz(t){const e=ze(t);let n;return e.readyState!=="loading"?Ah(t):(n=()=>{Ah(t)},e.addEventListener("DOMContentLoaded",n)),()=>zS(t,n)}typeof document<"u"&&oz();function gl(){return Ai!=="pointer"}function Qs(){return Ai}function Ts(t){Ai=t,Al=t==="pointer"?"mouse":t,Vp(t,null)}function sz(){return Al}function IS(){Ah();let[t,e]=k.useState(Ai);return k.useEffect(()=>{let n=()=>{e(Ai)};return kc.add(n),()=>{kc.delete(n)}},[]),_o()?null:t}const az=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function lz(t,e,n){let r=n?de(n):void 0,i=ze(r),o=cn(r);const a=typeof o<"u"?o.HTMLInputElement:HTMLInputElement,u=typeof o<"u"?o.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof o<"u"?o.HTMLElement:HTMLElement,f=typeof o<"u"?o.KeyboardEvent:KeyboardEvent;let h=_e(i);return t=t||h instanceof a&&!az.has(h.type)||h instanceof u||h instanceof c&&h.isContentEditable,!(t&&e==="keyboard"&&n instanceof f&&!rz[n.key])}function uz(t,e,n){Ah(),k.useEffect(()=>{if(n?.enabled===!1)return;let r=(i,o)=>{lz(!!n?.isTextInput,i,o)&&t(gl())};return kc.add(r),()=>{kc.delete(r)}},e)}var FS={};FS={collectionLabel:"مقترحات"};var KS={};KS={collectionLabel:"Предложения"};var _S={};_S={collectionLabel:"Návrhy"};var jS={};jS={collectionLabel:"Forslag"};var HS={};HS={collectionLabel:"Empfehlungen"};var VS={};VS={collectionLabel:"Προτάσεις"};var US={};US={collectionLabel:"Suggestions"};var qS={};qS={collectionLabel:"Sugerencias"};var GS={};GS={collectionLabel:"Soovitused"};var WS={};WS={collectionLabel:"Ehdotukset"};var QS={};QS={collectionLabel:"Suggestions"};var YS={};YS={collectionLabel:"הצעות"};var XS={};XS={collectionLabel:"Prijedlozi"};var JS={};JS={collectionLabel:"Javaslatok"};var ZS={};ZS={collectionLabel:"Suggerimenti"};var e$={};e$={collectionLabel:"候補"};var t$={};t$={collectionLabel:"제안"};var n$={};n$={collectionLabel:"Pasiūlymai"};var r$={};r$={collectionLabel:"Ieteikumi"};var i$={};i$={collectionLabel:"Forslag"};var o$={};o$={collectionLabel:"Suggesties"};var s$={};s$={collectionLabel:"Sugestie"};var a$={};a$={collectionLabel:"Sugestões"};var l$={};l$={collectionLabel:"Sugestões"};var u$={};u$={collectionLabel:"Sugestii"};var c$={};c$={collectionLabel:"Предложения"};var d$={};d$={collectionLabel:"Návrhy"};var f$={};f$={collectionLabel:"Predlogi"};var h$={};h$={collectionLabel:"Predlozi"};var p$={};p$={collectionLabel:"Förslag"};var m$={};m$={collectionLabel:"Öneriler"};var g$={};g$={collectionLabel:"Пропозиції"};var b$={};b$={collectionLabel:"建议"};var y$={};y$={collectionLabel:"建議"};var v$={};v$={"ar-AE":FS,"bg-BG":KS,"cs-CZ":_S,"da-DK":jS,"de-DE":HS,"el-GR":VS,"en-US":US,"es-ES":qS,"et-EE":GS,"fi-FI":WS,"fr-FR":QS,"he-IL":YS,"hr-HR":XS,"hu-HU":JS,"it-IT":ZS,"ja-JP":e$,"ko-KR":t$,"lt-LT":n$,"lv-LV":r$,"nb-NO":i$,"nl-NL":o$,"pl-PL":s$,"pt-BR":a$,"pt-PT":l$,"ro-RO":u$,"ru-RU":c$,"sk-SK":d$,"sl-SI":f$,"sr-SP":h$,"sv-SE":p$,"tr-TR":m$,"uk-UA":g$,"zh-CN":b$,"zh-TW":y$};function Cs(t){return Mo()?t.metaKey:t.ctrlKey}const cz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ec(t){return t instanceof HTMLInputElement&&!cz.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const dz=H.useInsertionEffect??Le;function At(t){const e=k.useRef(null);return dz(()=>{e.current=t},[t]),k.useCallback((...n)=>{const r=e.current;return r?.(...n)},[])}function ju(t,e,n,r){let i=At(n),o=n==null;k.useEffect(()=>{if(o||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,o])}function Qy(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=nn(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}const fz=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hz=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function pz(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return fz.has(n.script)}let e=t.split("-")[0];return hz.has(e)}const x$=Symbol.for("react-aria.i18n.locale");function C$(){let t=typeof window<"u"&&window[x$]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:pz(t)?"rtl":"ltr"}}let m0=C$(),Hu=new Set;function T5(){m0=C$();for(let t of Hu)t(m0)}function mz(){let t=_o(),[e,n]=k.useState(m0);return k.useEffect(()=>(Hu.size===0&&window.addEventListener("languagechange",T5),Hu.add(n),()=>{Hu.delete(n),Hu.size===0&&window.removeEventListener("languagechange",T5)}),[]),t?{locale:typeof window<"u"&&window[x$]||"en-US",direction:"ltr"}:e}const gz=H.createContext(null);function Mi(){let t=mz();return k.useContext(gz)||t}const bz=Symbol.for("react-aria.i18n.locale"),yz=Symbol.for("react-aria.i18n.strings");let Af;class Up{constructor(e,n="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,r])=>r)),this.defaultLocale=n}getStringForLocale(e,n){let i=this.getStringsForLocale(n)[e];if(!i)throw new Error(`Could not find intl message ${e} in ${n} locale`);return i}getStringsForLocale(e){let n=this.strings[e];return n||(n=vz(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[bz];if(Af===void 0){let i=window[yz];if(!i)return null;Af={};for(let o in i)Af[o]=new Up({[n]:i[o]},n)}let r=Af?.[e];if(!r)throw new Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function vz(t,e,n="en-US"){if(e[t])return e[t];let r=xz(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function xz(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const A5=new Map,B5=new Map;class Cz{constructor(e,n){this.locale=e,this.strings=n}format(e,n){let r=this.strings.getStringForLocale(e,this.locale);return typeof r=="function"?r(n,this):r}plural(e,n,r="cardinal"){let i=n["="+e];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=A5.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),A5.set(o,a));let u=a.select(e);return i=n[u]||n.other,typeof i=="function"?i():i}number(e){let n=B5.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),B5.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const M5=new WeakMap;function Ez(t){let e=M5.get(t);return e||(e=new Up(t),M5.set(t,e)),e}function Dz(t,e){return e&&Up.getGlobalDictionaryForPackage(e)||Ez(t)}function pr(t,e){let{locale:n}=Mi(),r=Dz(t,e);return k.useMemo(()=>new Cz(n,r),[n,r])}function kz(t){return t&&t.__esModule?t.default:t}function Sz(t,e){let{inputRef:n,collectionRef:r,filter:i,disableAutoFocusFirst:o=!1,disableVirtualFocus:a=!1}=t,u=nn(),c=k.useRef(void 0),f=k.useRef(!1),h=k.useRef(null),m=Qs()==="virtual"&&(Ti()||jp()),[g,b]=k.useState(!m&&!a),[v,C]=k.useState(!1),[E,D]=k.useState(!1);k.useEffect(()=>()=>clearTimeout(c.current),[]);let w=At(V=>{!V.isTrusted&&g&&n.current&&_e(ze(n.current))!==n.current&&sz()!=="touch"&&n.current.focus();let ne=de(V);V.isTrusted||!ne||h.current===ne.id||(clearTimeout(c.current),ne!==r.current?f.current?(h.current=ne.id,c.current=setTimeout(()=>{e.setFocusedNodeId(ne.id)},500)):(h.current=ne.id,e.setFocusedNodeId(ne.id)):h.current&&!document.getElementById(h.current)&&(h.current=null,e.setFocusedNodeId(null)),f.current=!1)}),[$,T]=k.useState(null),A=k.useCallback(V=>{T(V),V!=null?(V.getAttribute("tabindex")!=null&&b(!1),C(!0)):C(!1)},[]);Le(()=>($?.addEventListener("focusin",w),()=>{$?.removeEventListener("focusin",w)}),[$]);let O=jo(k.useMemo(()=>Uc(r,A),[r,A])),M=k.useCallback(()=>{if(!r.current){D(!0);return}f.current=!0,r.current?.dispatchEvent(new CustomEvent(f0,{cancelable:!0,bubbles:!0,detail:{focusStrategy:"first"}}))},[r]),P=k.useCallback(V=>{D(!1),_y(_e()),h.current=null,e.setFocusedNodeId(null);let ne=new CustomEvent(ES,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:V}});clearTimeout(c.current),f.current=!1,r.current?.dispatchEvent(ne)},[r,e]),I=k.useRef("");ju(n,"beforeinput",V=>{let{inputType:ne}=V;I.current=ne});let G=V=>{(I.current==="insertText"||I.current==="insertCompositionText"||I.current==="insertFromComposition")&&!o?M():I.current&&(I.current.includes("insert")||I.current.includes("delete")||I.current.includes("history"))&&(P(!0),DS(document)===n.current&&Sh(n.current,null)),e.setInputValue(V)},J=k.useRef(null),U=V=>{if(J.current=de(V),V.nativeEvent.isComposing)return;let ne=h.current;switch(ne!==null&&ze(n.current).getElementById(ne)==null&&(h.current=null,ne=null),V.key){case"a":if(Cs(V))return;break;case"Escape":if(V.isDefaultPrevented())return;break;case" ":return;case"Tab":"continuePropagation"in V&&V.continuePropagation();return;case"Home":case"End":case"PageDown":case"PageUp":case"ArrowUp":case"ArrowDown":case"ArrowRight":case"ArrowLeft":{if((V.key==="Home"||V.key==="End")&&ne==null&&V.shiftKey)return;if(V.key==="ArrowRight"||V.key==="ArrowLeft"){if(ne==null){V.isPropagationStopped()||V.stopPropagation();return}break}V.preventDefault();let ue=new CustomEvent(f0,{cancelable:!0,bubbles:!0});r.current?.dispatchEvent(ue);break}}V.isPropagationStopped()||V.stopPropagation();let le=!0;if(r.current!==null)if(ne==null)le=r.current?.dispatchEvent(new KeyboardEvent(V.nativeEvent.type,V.nativeEvent))||!1;else{let ue=document.getElementById(ne);ue&&(le=ue?.dispatchEvent(new KeyboardEvent(V.nativeEvent.type,V.nativeEvent))||!1)}if(le)switch(V.key){case"ArrowLeft":case"ArrowRight":P();break;case"Enter":ne!=null&&document.getElementById(ne)?.dispatchEvent(new PointerEvent("click",V.nativeEvent));break}else V.preventDefault()},ie=At(V=>{if(de(V)===J.current){V.stopImmediatePropagation();let ne=h.current;ne==null?r.current?.dispatchEvent(new KeyboardEvent(V.type,V)):document.getElementById(ne)?.dispatchEvent(new KeyboardEvent(V.type,V))}});k.useEffect(()=>(document.addEventListener("keyup",ie,!0),()=>{document.removeEventListener("keyup",ie,!0)}),[]);let F=pr(kz(v$),"@react-aria/autocomplete"),te=Qy({id:u,"aria-label":F.format("collectionLabel")}),N=k.useCallback((V,ne)=>i?i(V,e.inputValue,ne):!0,[e.inputValue,i]),K=V=>{if(!V.isTrusted)return;let ne=h.current?document.getElementById(h.current):null;ne&&h0(ne,V.relatedTarget)},Y=V=>{if(!V.isTrusted)return;if(h.current?document.getElementById(h.current):null){let le=de(V);queueMicrotask(()=>{h0(le,r.current),Sh(r.current,le)})}},Z=V=>{V.button!==0||V.pointerType==="touch"||h.current==null||n.current==null||de(V)===n.current&&P()},j={value:e.inputValue,onChange:G},L={onKeyDown:U,"aria-activedescendant":e.focusedNodeId??void 0,onBlur:K,onFocus:Y,onPointerDown:Z};return j={...j,...g&&v&&L,enterKeyHint:"go","aria-controls":v?u:void 0,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"},{inputProps:j,collectionProps:we(te,{shouldUseVirtualFocus:g,disallowTypeAhead:g,autoFocus:E?"first":!1}),collectionRef:O,filter:i!=null?N:void 0}}const $z=typeof document<"u"?H.useInsertionEffect??H.useLayoutEffect:()=>{};function Ho(t,e,n){let[r,i]=k.useState(t||e),o=k.useRef(r),a=k.useRef(t!==void 0),u=t!==void 0;k.useEffect(()=>{a.current,a.current=u},[u]);let c=u?t:r;$z(()=>{o.current=c});let[,f]=k.useReducer(()=>({}),{}),h=k.useCallback((m,...g)=>{let b=typeof m=="function"?m(o.current):m;Object.is(o.current,b)||(o.current=b,i(b),f(),n?.(b,...g))},[n]);return[c,h]}function wz(t){let{onInputChange:e,inputValue:n,defaultInputValue:r=""}=t,i=f=>{e&&e(f)},[o,a]=k.useState(null),[u,c]=Ho(n,r,i);return{inputValue:u,setInputValue:c,focusedNodeId:o,setFocusedNodeId:a}}const Tz=k.createContext(null),Az=k.createContext(null),Sc=k.createContext(null),qp=k.createContext(null);function Bz(t){let e=wl(Tz,t.slot);t=we(e,t);let{filter:n,disableAutoFocusFirst:r}=t,i=wz(t),o=k.useRef(null),a=k.useRef(null),{inputProps:u,collectionProps:c,collectionRef:f,filter:h}=Sz({...CS(t),filter:n,disableAutoFocusFirst:r,inputRef:o,collectionRef:a},i);return H.createElement(Ar,{values:[[Az,i],[qp,{...u,ref:o}],[Sc,{...c,filter:h,ref:f}]]},t.children)}class na{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,n,r){let i=this.clone();return n.addDescendants(i,e),i}}class E$ extends na{filter(e,n,r){let[i,o]=D$(e,n,this.firstChildKey,r),a=this.clone();return a.firstChildKey=i,a.lastChildKey=o,a}}const A1=class A1 extends na{};A1.type="header";let g0=A1;const B1=class B1 extends na{};B1.type="loader";let Bh=B1;const M1=class M1 extends E${filter(e,n,r){if(r(this.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};M1.type="item";let Mh=M1;const R1=class R1 extends E${filter(e,n,r){let i=super.filter(e,n,r);if(i&&i.lastChildKey!==null){let o=e.getItem(i.lastChildKey);if(o&&o.type!=="header")return i}return null}};R1.type="section";let b0=R1;class Mz{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=r?.firstChildKey!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);return n?.key??null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n.itemCount=this.itemCount,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,n){this.addNode(e);let r=n.getChildren(e.key);for(let i of r)this.addDescendants(i,n)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let n=this.keyMap.get(e);n!=null&&n.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}filter(e){let n=new this.constructor,[r,i]=D$(this,n,this.firstKey,e);return n?.commit(r,i),n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function D$(t,e,n,r){if(n==null)return[null,null];let i=null,o=null,a=t.getItem(n);for(;a!=null;){let u=a.filter(t,e,r);u!=null&&(u.nextKey=null,o&&(u.prevKey=o.key,o.nextKey=u.key),i==null&&(i=u),e.addNode(u),o=u),a=a.nextKey!=null?t.getItem(a.nextKey):null}if(o&&o.type==="separator"){let u=o.prevKey;e.removeNode(o.key),u!=null?(o=e.getItem(u),o.nextKey=null):o=null}return[i?.key??null,o?.key??null]}class k${constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index-1,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class cl extends k${constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof cl?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof cl?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=e?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&e)){let r=(n.colIndex??n.index)+(n.colSpan??1);if(e.node!=null&&r!==e.node.colIndex){let i=e.getMutableNode();i.colIndex=r}}}setProps(e,n,r,i,o){let a,{value:u,textValue:c,id:f,...h}=e;if(this.node==null?(a=new r(f??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),h.ref=n,a.props=h,a.rendered=i,a.render=o,a.value=u,e["aria-label"]&&(a["aria-label"]=e["aria-label"]),a.textValue=c||(typeof h.children=="string"?h.children:"")||e["aria-label"]||"",f!=null&&f!==a.key)throw new Error("Cannot change the id of an item");h.colSpan!=null&&(a.colSpan=h.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let i=e.previousVisibleSibling,o=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),o&&e.ownerDocument.markDirty(o),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Rz extends k${constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new cl(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof cl&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof cl?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function S$(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,a=k.useMemo(()=>{},[e]),u=k.useMemo(()=>new WeakMap,[...o,a]);return k.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let f of n){let h=Pz(f)?f:null,m=h?u.get(h):null;if(!m){m=e(f);let g=m.props.id??f?.key??f?.id;r!=null&&m.props.id==null&&g!=null&&(g=r+":"+g);let b=g??c.length;m=k.cloneElement(m,i?{key:b,id:g,value:f}:{key:b}),h&&u.set(h,m)}c.push(m)}return c}else if(typeof e!="function")return e},[e,n,u,r,i])}function Pz(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let mo=new Map,y0=new Set;function R5(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{let i=de(r);if(!t(r)||!i)return;let o=mo.get(i);o||(o=new Set,mo.set(i,o),i.addEventListener("transitioncancel",n,{once:!0})),o.add(r.propertyName)},n=r=>{let i=de(r);if(!t(r)||!i)return;let o=mo.get(i);if(o&&(o.delete(r.propertyName),o.size===0&&(i.removeEventListener("transitioncancel",n),mo.delete(i)),mo.size===0)){for(let a of y0)a();y0.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?R5():document.addEventListener("DOMContentLoaded",R5));function Oz(){for(const[t]of mo)"isConnected"in t&&!t.isConnected&&mo.delete(t)}function $$(t){requestAnimationFrame(()=>{Oz(),mo.size===0?t():y0.add(t)})}function mn(t){if(!t.isConnected)return;const e=ze(t);if(Qs()==="virtual"){let n=_e(e);$$(()=>{const r=_e(e);(r===n||r===e.body)&&t.isConnected&&Tr(t)})}else Tr(t)}function w$(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const o=k.useCallback(c=>{if(de(c)===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),a=wS(o),u=k.useCallback(c=>{let f=de(c);const h=ze(f),m=h?_e(h):_e();f===c.currentTarget&&f===m&&(n&&n(c),i&&i(!0),a(c))},[i,n,a]);return{focusProps:{onFocus:!e&&(n||i||r)?u:void 0,onBlur:!e&&(r||i)?o:void 0}}}function P5(t){if(!t)return;let e=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){e=!0},continuePropagation(){e=!1,typeof n.continuePropagation=="function"&&n.continuePropagation()},isPropagationStopped(){return e}};t(r),e&&n.stopPropagation()}}function T$(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:P5(t.onKeyDown),onKeyUp:P5(t.onKeyUp)}}}function Yy(t,e){Le(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let v0=H.createContext(null);function Nz(t){let e=k.useContext(v0)||{};Yy(e,t);let{ref:n,...r}=e;return r}function Gp(t,e){let{focusProps:n}=w$(t),{keyboardProps:r}=T$(t),i=we(n,r),o=Nz(e),a=t.isDisabled?{}:o,u=k.useRef(t.autoFocus);k.useEffect(()=>{u.current&&e.current&&mn(e.current),u.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:we({...i,tabIndex:c},a)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Rh=k.createContext(!1);function Lz(t){if(k.useContext(Rh))return H.createElement(H.Fragment,null,t.children);let n=H.createElement(Rh.Provider,{value:!0},t.children);return H.createElement("template",null,n)}function Wp(t){let e=(n,r)=>k.useContext(Rh)?null:t(n,r);return e.displayName=t.displayName||t.name,k.forwardRef(e)}function A$(){return k.useContext(Rh)}var Xy=uS();const B$=k.createContext(!1),$c=k.createContext(null);function Jy(t){if(k.useContext($c))return t.content;let{collection:n,document:r}=Kz(t.createCollection);return H.createElement(H.Fragment,null,H.createElement(Lz,null,H.createElement($c.Provider,{value:r},t.content)),H.createElement(zz,{render:t.children,collection:n}))}function zz({collection:t,render:e}){return e(t)}function Iz(t,e,n){let r=_o(),i=k.useRef(r);i.current=r;let o=k.useCallback(()=>i.current?n():e(),[e,n]);return Xy.useSyncExternalStore(t,o)}const Fz=typeof H.useSyncExternalStore=="function"?H.useSyncExternalStore:Iz;function Kz(t){let[e]=k.useState(()=>new Rz(t?.()||new Mz)),n=k.useCallback(a=>e.subscribe(a),[e]),r=k.useCallback(()=>{let a=e.getCollection();return e.isSSR&&e.resetAfterSSR(),a},[e]),i=k.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:Fz(n,r,i),document:e}}const x0=k.createContext(null);function _z(t){var n;return n=class extends na{},n.type=t,n}function M$(t,e,n,r,i,o){typeof t=="string"&&(t=_z(t));let a=k.useCallback(c=>{c?.setProps(e,n,t,r,o)},[e,n,r,o,t]),u=k.useContext(x0);if(u){let c=u.ownerDocument.nodesByProps.get(e);return c||(c=u.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,o),u.appendChild(c),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,c)),i?H.createElement(x0.Provider,{value:c},i):null}return H.createElement(t.type,{ref:a},i)}function ra(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=k.forwardRef((i,o)=>{let a=k.useContext(v0);if(!k.useContext(B$)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,o)}return M$(t,i,o,"children"in i?i.children:null,null,c=>H.createElement(v0.Provider,{value:a},H.createElement(n,{node:c})))});return r.displayName=e.name,r}function jz(t,e,n=R$){let r=({node:o})=>e(o.props,o.props.ref,o),i=k.forwardRef((o,a)=>{let u=n(o);return M$(t,o,a,null,u,c=>H.createElement(r,{node:c}))??H.createElement(H.Fragment,null)});return i.displayName=e.name,i}function R$(t){return S$({...t,addIdAndValue:!0})}const O5=k.createContext(null);function Qp(t){let e=k.useContext(O5),n=(e?.dependencies||[]).concat(t.dependencies),r=t.idScope??e?.idScope,i=R$({...t,idScope:r,dependencies:n});return k.useContext($c)&&(i=H.createElement(Hz,null,i)),e=k.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),H.createElement(O5.Provider,{value:e},i)}function Hz({children:t}){let e=k.useContext($c),n=k.useMemo(()=>H.createElement($c.Provider,{value:null},H.createElement(B$.Provider,{value:!0},t)),[t]);return _o()?H.createElement(x0.Provider,{value:e},n):$l.createPortal(n,e)}const Vz=k.createContext(null),P$={CollectionRoot({collection:t,renderDropIndicator:e}){return N5(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return N5(t,e,n)}};function N5(t,e,n){return S$({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){if(r.type==="content")return H.createElement(H.Fragment,null);let i=r.render(r);return!n||r.type!=="item"?i:H.createElement(H.Fragment,null,n({type:"item",key:r.key,dropPosition:"before"}),i,Uz(t,r,n))}})}function Uz(t,e,n){let r=e.key,i=t.getKeyAfter(r),o=i!=null?t.getItem(i):null;for(;o!=null&&o.type!=="item";)i=t.getKeyAfter(o.key),o=i!=null?t.getItem(i):null;let a=e.nextKey!=null?t.getItem(e.nextKey):null;for(;a!=null&&a.type!=="item";)a=a.nextKey!=null?t.getItem(a.nextKey):null;let u=[];if(a==null){let c=e;for(;c?.type==="item"&&(!o||c.parentKey!==o.parentKey&&o.level<c.level);){let f=n({type:"item",key:c.key,dropPosition:"after"});k.isValidElement(f)&&u.push(k.cloneElement(f,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return u}const Ro=k.createContext(P$);function qz(t){return k.useMemo(()=>t!=null?new Set([t]):null,[t])}const Gz=new Set(["id"]),Wz=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),Qz=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Yz=new Set(["dir","lang","hidden","inert","translate"]),L5=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),Xz=/^(data-.*)$/;function Je(t,e={}){let{labelable:n,isLink:r,global:i,events:o=i,propNames:a}=e,u={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(Gz.has(c)||n&&Wz.has(c)||r&&Qz.has(c)||i&&Yz.has(c)||o&&(L5.has(c)||c.endsWith("Capture")&&L5.has(c.slice(0,-7)))||a?.has(c)||Xz.test(c))&&(u[c]=t[c]);return u}let sl="default",C0="",ah=new WeakMap;function Jz(t){if(Ti()){if(sl==="default"){const e=ze(t);C0=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}sl="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";ah.set(t,t.style[e]),t.style[e]="none"}}function z5(t){if(Ti()){if(sl!=="disabled")return;sl="restoring",setTimeout(()=>{$$(()=>{if(sl==="restoring"){const e=ze(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=C0||""),C0="",sl="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&ah.has(t)){let e=ah.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),ah.delete(t)}}function I5(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let tb=new WeakMap;function O$(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return I5(e);if(tb.has(e))return tb.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof cn(n).HTMLMetaElement&&(n.nonce||n.content)||I5(e)||void 0;return r!==void 0&&tb.set(e,r),r}const wc=H.createContext({register:()=>{}});wc.displayName="PressResponderContext";function qc(){let t=k.useRef(new Map),e=k.useCallback((i,o,a,u)=>{let c=u?.once?(...f)=>{t.current.delete(a),a(...f)}:a;t.current.set(a,{type:o,eventTarget:i,fn:c,options:u}),i.addEventListener(o,c,u)},[]),n=k.useCallback((i,o,a,u)=>{let c=t.current.get(a)?.fn||a;i.removeEventListener(o,c,u),t.current.delete(a)},[]),r=k.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return k.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Zz(t){let e=k.useContext(wc);if(e){let{register:n,ref:r,...i}=e;t=we(i,t),n()}return Yy(e,t.ref),t}class Bf{#e;constructor(e,n,r,i){this.#e=!0;const a=(i?.target??r.currentTarget)?.getBoundingClientRect();let u,c=0,f,h=null;r.clientX!=null&&r.clientY!=null&&(f=r.clientX,h=r.clientY),a&&(f!=null&&h!=null?(u=f-a.left,c=h-a.top):(u=a.width/2,c=a.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=u,this.y=c,this.key=r.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const F5=Symbol("linkClicked"),K5="react-aria-pressable-style",_5="data-react-aria-pressable";function Gc(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:a,isDisabled:u,isPressed:c,preventFocusOnPress:f,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:m,ref:g,...b}=Zz(t),[v,C]=k.useState(!1),E=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:D,removeAllGlobalListeners:w}=qc(),$=k.useCallback((F,te)=>{let N=E.current;if(u||N.didFirePressStart)return!1;let K=!0;if(N.isTriggeringEvent=!0,r){let Y=new Bf("pressstart",te,F);r(Y),K=Y.shouldStopPropagation}return n&&n(!0),N.isTriggeringEvent=!1,N.didFirePressStart=!0,C(!0),K},[u,r,n]),T=k.useCallback((F,te,N=!0)=>{let K=E.current;if(!K.didFirePressStart)return!1;K.didFirePressStart=!1,K.isTriggeringEvent=!0;let Y=!0;if(i){let Z=new Bf("pressend",te,F);i(Z),Y=Z.shouldStopPropagation}if(n&&n(!1),C(!1),e&&N&&!u){let Z=new Bf("press",te,F);e(Z),Y&&=Z.shouldStopPropagation}return K.isTriggeringEvent=!1,Y},[u,i,n,e]),A=At(T),O=k.useCallback((F,te)=>{let N=E.current;if(u)return!1;if(o){N.isTriggeringEvent=!0;let K=new Bf("pressup",te,F);return o(K),N.isTriggeringEvent=!1,K.shouldStopPropagation}return!0},[u,o]),M=At(O),P=k.useCallback(F=>{let te=E.current;if(te.isPressed&&te.target){te.didFirePressStart&&te.pointerType!=null&&T(ys(te.target,F),te.pointerType,!1),te.isPressed=!1,te.isOverTarget=!1,te.activePointerId=null,te.pointerType=null,w(),m||z5(te.target);for(let N of te.disposables)N();te.disposables=[]}},[m,w,T]),I=At(P);k.useEffect(()=>{u&&E.current.isPressed&&I({currentTarget:E.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[u]);let G=k.useCallback(F=>{h&&P(F)},[h,P]),J=k.useCallback(F=>{u||a?.(F)},[u,a]),U=k.useCallback((F,te)=>{if(!u&&a){let N=new MouseEvent("click",F);$S(N,te),a(Vy(N))}},[u,a]),ie=k.useMemo(()=>{let F=E.current,te={onKeyDown(K){if(nb(K.nativeEvent,K.currentTarget)&&$e(K.currentTarget,de(K))){j5(de(K),K.key)&&K.preventDefault();let Y=!0;!F.isPressed&&!K.repeat&&(F.target=K.currentTarget,F.isPressed=!0,F.pointerType="keyboard",Y=$(K,"keyboard"));let Z=K.currentTarget,j=L=>{nb(L,Z)&&!L.repeat&&$e(Z,de(L))&&F.target&&M(ys(F.target,L),"keyboard")};D(ze(K.currentTarget),"keyup",Ko(j,N),!0),Y&&K.stopPropagation(),K.metaKey&&Mo()&&F.metaKeyEvents?.set(K.key,K.nativeEvent)}else K.key==="Meta"&&(F.metaKeyEvents=new Map)},onClick(K){if(!(K&&!$e(K.currentTarget,de(K)))&&K&&K.button===0&&!F.isTriggeringEvent&&!qr.isOpening){let Y=!0;if(u&&K.preventDefault(),!F.ignoreEmulatedMouseEvents&&!F.isPressed&&(F.pointerType==="virtual"||Hp(K.nativeEvent))){let Z=$(K,"virtual"),j=M(K,"virtual"),L=A(K,"virtual");J(K),Y=Z&&j&&L}else if(F.isPressed&&F.pointerType!=="keyboard"){let Z=F.pointerType||K.nativeEvent.pointerType||"virtual",j=M(ys(K.currentTarget,K),Z),L=A(ys(K.currentTarget,K),Z,!0);Y=j&&L,F.isOverTarget=!1,J(K),I(K)}F.ignoreEmulatedMouseEvents=!1,Y&&K.stopPropagation()}}},N=K=>{if(F.isPressed&&F.target&&nb(K,F.target)){j5(de(K),K.key)&&K.preventDefault();let Y=de(K),Z=$e(F.target,Y);A(ys(F.target,K),"keyboard",Z),Z&&U(K,F.target),w(),K.key!=="Enter"&&Zy(F.target)&&$e(F.target,Y)&&!K[F5]&&(K[F5]=!0,qr(F.target,K,!1)),F.isPressed=!1,F.metaKeyEvents?.delete(K.key)}else if(K.key==="Meta"&&F.metaKeyEvents?.size){let Y=F.metaKeyEvents;F.metaKeyEvents=void 0;for(let Z of Y.values())F.target?.dispatchEvent(new KeyboardEvent("keyup",Z))}};if(typeof PointerEvent<"u"){te.onPointerDown=Z=>{if(Z.button!==0||!$e(Z.currentTarget,de(Z)))return;if(Wy(Z.nativeEvent)){F.pointerType="virtual";return}F.pointerType=Z.pointerType;let j=!0;if(!F.isPressed){F.isPressed=!0,F.isOverTarget=!0,F.activePointerId=Z.pointerId,F.target=Z.currentTarget,m||Jz(F.target),j=$(Z,F.pointerType);let L=de(Z);"releasePointerCapture"in L&&("hasPointerCapture"in L?L.hasPointerCapture(Z.pointerId)&&L.releasePointerCapture(Z.pointerId):L.releasePointerCapture(Z.pointerId)),D(ze(Z.currentTarget),"pointerup",K,!1),D(ze(Z.currentTarget),"pointercancel",Y,!1)}j&&Z.stopPropagation()},te.onMouseDown=Z=>{if($e(Z.currentTarget,de(Z))&&Z.button===0){if(f){let j=YL(Z.target);j&&F.disposables.push(j)}Z.stopPropagation()}},te.onPointerUp=Z=>{!$e(Z.currentTarget,de(Z))||F.pointerType==="virtual"||Z.button===0&&!F.isPressed&&M(Z,F.pointerType||Z.pointerType)},te.onPointerEnter=Z=>{Z.pointerId===F.activePointerId&&F.target&&!F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!0,$(ys(F.target,Z),F.pointerType))},te.onPointerLeave=Z=>{Z.pointerId===F.activePointerId&&F.target&&F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!1,A(ys(F.target,Z),F.pointerType,!1),G(Z))};let K=Z=>{if(Z.pointerId===F.activePointerId&&F.isPressed&&Z.button===0&&F.target){if($e(F.target,de(Z))&&F.pointerType!=null){let j=!1,L=setTimeout(()=>{F.isPressed&&F.target instanceof HTMLElement&&(j?I(Z):(Tr(F.target),F.target.click()))},80);D(Z.currentTarget,"click",()=>j=!0,!0),F.disposables.push(()=>clearTimeout(L))}else I(Z);F.isOverTarget=!1}},Y=Z=>{I(Z)};te.onDragStart=Z=>{$e(Z.currentTarget,de(Z))&&I(Z)}}return te},[D,u,f,w,m,G,$,J,U]);return k.useEffect(()=>{if(!g)return;const F=ze(g.current);if(!F||!F.head||F.getElementById(K5))return;const te=F.createElement("style");te.id=K5;let N=O$(F);N&&(te.nonce=N),te.textContent=`
|
|
10
|
+
@layer {
|
|
11
|
+
[${_5}] {
|
|
12
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`.trim(),F.head.prepend(te)},[g]),k.useEffect(()=>{let F=E.current;return()=>{m||z5(F.target??void 0);for(let te of F.disposables)te();F.disposables=[]}},[m]),{isPressed:c||v,pressProps:we(b,ie,{[_5]:!0})}}function Zy(t){return t.tagName==="A"&&t.hasAttribute("href")}function nb(t,e){const{key:n,code:r}=t,i=e,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof cn(i).HTMLInputElement&&!N$(i,n)||i instanceof cn(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&Zy(i))&&n!=="Enter")}function ys(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r,key:e.key}}function eI(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Zy(t)}function j5(t,e){return t instanceof HTMLInputElement?!N$(t,e):eI(t)}const tI=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function N$(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":tI.has(t.type)}function nI(t,e){let{elementType:n="a",onPress:r,onPressStart:i,onPressEnd:o,onClick:a,isDisabled:u,...c}=t,f={};n!=="a"&&(f={role:"link",tabIndex:u?void 0:0});let{focusableProps:h}=Gp(t,e),{pressProps:m,isPressed:g}=Gc({onPress:r,onPressStart:i,onPressEnd:o,onClick:a,isDisabled:u,ref:e}),b=Je(c,{labelable:!0}),v=we(h,m),C=Tl(),E=RS(t);return{isPressed:g,linkProps:we(b,E,{...v,...f,"aria-disabled":u||void 0,"aria-current":t["aria-current"],onClick:D=>{m.onClick?.(D),PS(D,C,t.href,t.routerOptions)}})}}function e3(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,o=k.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:u}=qc(),c=k.useCallback(m=>{$e(m.currentTarget,de(m))&&o.current.isFocusWithin&&!$e(m.currentTarget,m.relatedTarget)&&(o.current.isFocusWithin=!1,u(),n&&n(m),i&&i(!1))},[n,i,o,u]),f=wS(c),h=k.useCallback(m=>{if(!$e(m.currentTarget,de(m)))return;let g=de(m);const b=ze(g),v=_e(b);if(!o.current.isFocusWithin&&v===g){r&&r(m),i&&i(!0),o.current.isFocusWithin=!0,f(m);let C=m.currentTarget;a(b,"focus",E=>{let D=de(E);if(o.current.isFocusWithin&&!$e(C,D)){let w=new b.defaultView.FocusEvent("blur",{relatedTarget:D});$S(w,C);let $=Vy(w);c($)}},{capture:!0})}},[r,i,f,a,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:h,onBlur:c}}}function Po(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=k.useRef({isFocused:!1,isFocusVisible:e||gl()}),[o,a]=k.useState(!1),[u,c]=k.useState(()=>i.current.isFocused&&i.current.isFocusVisible),f=k.useCallback(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),h=k.useCallback(b=>{i.current.isFocused=b,i.current.isFocusVisible=gl(),a(b),f()},[f]);uz(b=>{i.current.isFocusVisible=b,f()},[n,o],{enabled:o,isTextInput:n});let{focusProps:m}=w$({isDisabled:r,onFocusChange:h}),{focusWithinProps:g}=e3({isDisabled:!r,onFocusWithinChange:h});return{isFocused:o,isFocusVisible:u,focusProps:r?g:m}}let E0=!1,Mf=0;function rI(){E0=!0,setTimeout(()=>{E0=!1},500)}function H5(t){t.pointerType==="touch"&&rI()}function iI(){let t=ze(null);if(!(typeof t>"u"))return Mf===0&&typeof PointerEvent<"u"&&t.addEventListener("pointerup",H5),Mf++,()=>{Mf--,!(Mf>0)&&typeof PointerEvent<"u"&&t.removeEventListener("pointerup",H5)}}function Vo(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[o,a]=k.useState(!1),u=k.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;k.useEffect(iI,[]);let{addGlobalListener:c,removeAllGlobalListeners:f}=qc(),{hoverProps:h,triggerHoverEnd:m}=k.useMemo(()=>{let g=(C,E)=>{if(u.pointerType=E,i||E==="touch"||u.isHovered||!$e(C.currentTarget,de(C)))return;u.isHovered=!0;let D=C.currentTarget;u.target=D,c(ze(de(C)),"pointerover",w=>{u.isHovered&&u.target&&!$e(u.target,de(w))&&b(w,w.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:D,pointerType:E}),n&&n(!0),a(!0)},b=(C,E)=>{let D=u.target;u.pointerType="",u.target=null,!(E==="touch"||!u.isHovered||!D)&&(u.isHovered=!1,f(),r&&r({type:"hoverend",target:D,pointerType:E}),n&&n(!1),a(!1))},v={};return typeof PointerEvent<"u"&&(v.onPointerEnter=C=>{E0&&C.pointerType==="mouse"||g(C,C.pointerType)},v.onPointerLeave=C=>{!i&&$e(C.currentTarget,de(C))&&b(C,C.pointerType)}),{hoverProps:v,triggerHoverEnd:b}},[e,n,r,i,u,c,f]);return k.useEffect(()=>{i&&m({currentTarget:u.target},u.pointerType)},[i]),{hoverProps:h,isHovered:o}}const L$=k.createContext(null),oI=k.forwardRef(function(e,n){[e,n]=Ct(e,n,L$);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:i,isPressed:o}=nI({...e,elementType:r},n),a=at[r],{hoverProps:u,isHovered:c}=Vo(e),{focusProps:f,isFocused:h,isFocusVisible:m}=Po(),g=Rt({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:o,isHovered:c,isFocused:h,isFocusVisible:m}}),b=Je(e,{global:!0});return delete b.onClick,H.createElement(a,{ref:n,slot:e.slot||void 0,...we(b,g,i,u,f),"data-focused":h||void 0,"data-hovered":c||void 0,"data-pressed":o||void 0,"data-focus-visible":m||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},g.children)});var z$={};z$={breadcrumbs:"عناصر الواجهة"};var I$={};I$={breadcrumbs:"Трохи хляб"};var F$={};F$={breadcrumbs:"Popis cesty"};var K$={};K$={breadcrumbs:"Brødkrummer"};var _$={};_$={breadcrumbs:"Breadcrumbs"};var j$={};j$={breadcrumbs:"Πλοηγήσεις breadcrumb"};var H$={};H$={breadcrumbs:"Breadcrumbs"};var V$={};V$={breadcrumbs:"Migas de pan"};var U$={};U$={breadcrumbs:"Lingiread"};var q$={};q$={breadcrumbs:"Navigointilinkit"};var G$={};G$={breadcrumbs:"Chemin de navigation"};var W$={};W$={breadcrumbs:"שבילי ניווט"};var Q$={};Q$={breadcrumbs:"Navigacijski putovi"};var Y$={};Y$={breadcrumbs:"Morzsamenü"};var X$={};X$={breadcrumbs:"Breadcrumb"};var J$={};J$={breadcrumbs:"パンくずリスト"};var Z$={};Z$={breadcrumbs:"탐색 표시"};var e6={};e6={breadcrumbs:"Naršymo kelias"};var t6={};t6={breadcrumbs:"Atpakaļceļi"};var n6={};n6={breadcrumbs:"Navigasjonsstier"};var r6={};r6={breadcrumbs:"Broodkruimels"};var i6={};i6={breadcrumbs:"Struktura nawigacyjna"};var o6={};o6={breadcrumbs:"Caminho detalhado"};var s6={};s6={breadcrumbs:"Categorias"};var a6={};a6={breadcrumbs:"Miez de pâine"};var l6={};l6={breadcrumbs:"Навигация"};var u6={};u6={breadcrumbs:"Navigačné prvky Breadcrumbs"};var c6={};c6={breadcrumbs:"Drobtine"};var d6={};d6={breadcrumbs:"Putanje navigacije"};var f6={};f6={breadcrumbs:"Sökvägar"};var h6={};h6={breadcrumbs:"İçerik haritaları"};var p6={};p6={breadcrumbs:"Навігаційна стежка"};var m6={};m6={breadcrumbs:"导航栏"};var g6={};g6={breadcrumbs:"導覽列"};var b6={};b6={"ar-AE":z$,"bg-BG":I$,"cs-CZ":F$,"da-DK":K$,"de-DE":_$,"el-GR":j$,"en-US":H$,"es-ES":V$,"et-EE":U$,"fi-FI":q$,"fr-FR":G$,"he-IL":W$,"hr-HR":Q$,"hu-HU":Y$,"it-IT":X$,"ja-JP":J$,"ko-KR":Z$,"lt-LT":e6,"lv-LV":t6,"nb-NO":n6,"nl-NL":r6,"pl-PL":i6,"pt-BR":o6,"pt-PT":s6,"ro-RO":a6,"ru-RU":l6,"sk-SK":u6,"sl-SI":c6,"sr-SP":d6,"sv-SE":f6,"tr-TR":h6,"uk-UA":p6,"zh-CN":m6,"zh-TW":g6};function sI(t){return t&&t.__esModule?t.default:t}function aI(t){let{"aria-label":e,...n}=t,r=pr(sI(b6),"@react-aria/breadcrumbs");return{navProps:{...Je(n,{labelable:!0}),"aria-label":e||r.format("breadcrumbs")}}}const D0=k.createContext(null),lI=k.forwardRef(function(e,n){[e,n]=Ct(e,n,D0);let{CollectionRoot:r}=k.useContext(Ro),{navProps:i}=aI(e),o=Je(e,{global:!0,labelable:!0});return H.createElement(Jy,{content:H.createElement(Qp,e)},a=>H.createElement(at.ol,{render:e.render,ref:n,...we(o,i),slot:e.slot||void 0,style:e.style,className:e.className??"react-aria-Breadcrumbs"},H.createElement(D0.Provider,{value:e},H.createElement(r,{collection:a}))))}),P1=class P1 extends na{};P1.type="item";let k0=P1;const uI=ra(k0,function(e,n,r){let i=r.nextKey==null,{isDisabled:o,onAction:a}=wl(D0),u={"aria-current":i?"page":null,isDisabled:o||i,onPress:()=>a?.(r.key)},c=Rt({...r.props,children:r.rendered,values:{isDisabled:o||i,isCurrent:i},defaultClassName:"react-aria-Breadcrumb"}),f=Je(e,{global:!0,labelable:!0});return delete f.id,H.createElement(at.li,{...f,...c,ref:n,"data-disabled":o||i||void 0,"data-current":i||void 0},H.createElement(L$.Provider,{value:u},c.children))}),t3=k.createContext({}),cI=Wp(function(e,n){[e,n]=Ct(e,n,t3);let{elementType:r="label",...i}=e,o=at[r];return H.createElement(o,{className:"react-aria-Label",...i,ref:n})});function dI(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=t;e=nn(e);let a=nn(),u={};n&&(r=r?`${a} ${r}`:a,u={id:a,htmlFor:o==="label"?e:void 0});let c=Qy({id:e,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function S0(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const fI=k.createContext(null),y6=7e3;let Xa=null;function As(t,e="assertive",n=y6){Xa?Xa.announce(t,e,n):(Xa=new hI,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Xa.announce(t,e,n):setTimeout(()=>{Xa?.isAttached()&&Xa?.announce(t,e,n)},100))}class hI{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",e),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,n="assertive",r=y6){if(!this.node)return;let i=document.createElement("div");typeof e=="object"?(i.setAttribute("role","img"),i.setAttribute("aria-labelledby",e["aria-labelledby"])):i.textContent=e,n==="assertive"?this.assertiveLog?.appendChild(i):this.politeLog?.appendChild(i),e!==""&&setTimeout(()=>{i.remove()},r)}clear(e){this.node&&((!e||e==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||e==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}}function v6(t,e){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:a,onPressUp:u,onPressChange:c,preventFocusOnPress:f,allowFocusWhenDisabled:h,onClick:m,href:g,target:b,rel:v,type:C="button"}=t,E;n==="button"?E={type:C,disabled:r,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:E={role:"button",href:n==="a"&&!r?g:void 0,target:n==="a"?b:void 0,type:n==="input"?C:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?v:void 0};let{pressProps:D,isPressed:w}=Gc({onPressStart:o,onPressEnd:a,onPressChange:c,onPress:i,onPressUp:u,onClick:m,isDisabled:r,preventFocusOnPress:f,ref:e}),{focusableProps:$}=Gp(t,e);h&&($.tabIndex=r?-1:$.tabIndex);let T=we($,D,Je(t,{labelable:!0}));return{isPressed:w,buttonProps:we(E,T,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}const Yp=k.createContext({}),x6=Wp(function(e,n){[e,n]=Ct(e,n,Yp);let r=e,{isPending:i}=r,{buttonProps:o,isPressed:a}=v6(e,n);o=mI(o,i);let{focusProps:u,isFocused:c,isFocusVisible:f}=Po(e),{hoverProps:h,isHovered:m}=Vo({...e,isDisabled:e.isDisabled||i}),g={isHovered:m,isPressed:(r.isPressed||a)&&!i,isFocused:c,isFocusVisible:f,isDisabled:e.isDisabled||!1,isPending:i??!1},b=Rt({...e,values:g,defaultClassName:"react-aria-Button"}),v=nn(o.id),C=nn(),E=o["aria-labelledby"];i&&(E?E=`${E} ${C}`:o["aria-label"]&&(E=`${v} ${C}`));let D=k.useRef(i);k.useEffect(()=>{let $={"aria-labelledby":E||v};(!D.current&&c&&i||D.current&&c&&!i)&&As($,"assertive"),D.current=i},[i,c,E,v]);let w=Je(e,{global:!0});return delete w.onClick,H.createElement(at.button,{...we(w,b,o,u,h),type:o.type==="submit"&&i?"button":o.type,id:v,ref:n,"aria-labelledby":E,slot:e.slot||void 0,"aria-disabled":i?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":g.isPressed||void 0,"data-hovered":m||void 0,"data-focused":c||void 0,"data-pending":i||void 0,"data-focus-visible":f||void 0},H.createElement(fI.Provider,{value:{id:C}},b.children))}),pI=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function mI(t,e){if(e){for(const n in t)n.startsWith("on")&&!pI.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const C6=k.createContext({}),gI=k.forwardRef(function(e,n){[e,n]=Ct(e,n,C6);let{children:r,level:i=3,className:o,...a}=e,u=at[`h${i}`];return H.createElement(u,{...a,ref:n,className:o??"react-aria-Heading"},r)}),n3=k.createContext({});function bI(t,e){const n=k.useRef(!0),r=k.useRef(null);let i=At(t);k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),k.useEffect(()=>{let o=r.current;n.current?n.current=!1:(!o||e.some((a,u)=>!Object.is(a,o[u])))&&i(),r.current=e},e)}function Oo(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=document.scrollingElement||document.documentElement,i=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return t===r&&n.overflow!=="hidden"&&(i=!0),i&&e&&(i=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),i}function Hr(t,e){let n=t;for(Oo(n,e)&&(n=n.parentElement);n&&!Oo(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function rb(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(Oo(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function lh(t,e,n={}){let{block:r="nearest",inline:i="nearest"}=n;if(t===e)return;let o=t.scrollTop,a=t.scrollLeft,u=e.getBoundingClientRect(),c=t.getBoundingClientRect(),f=window.getComputedStyle(e),h=window.getComputedStyle(t),m=document.scrollingElement||document.documentElement,g=t===m,b=t===m?0:c.top,v=t===m?t.clientHeight:c.bottom,C=t===m?0:c.left,E=t===m?t.clientWidth:c.right,D=parseFloat(f.scrollMarginTop)||0,w=parseFloat(f.scrollMarginBottom)||0,$=parseFloat(f.scrollMarginLeft)||0,T=parseFloat(f.scrollMarginRight)||0,A=parseFloat(h.scrollPaddingTop)||0,O=parseFloat(h.scrollPaddingBottom)||0,M=parseFloat(h.scrollPaddingLeft)||0,P=parseFloat(h.scrollPaddingRight)||0,I=parseFloat(h.borderTopWidth)||0,G=parseFloat(h.borderBottomWidth)||0,J=parseFloat(h.borderLeftWidth)||0,U=parseFloat(h.borderRightWidth)||0,ie=u.top-D,F=u.bottom+w,te=u.left-$,N=u.right+T,K=t===m?0:J+U,Y=t===m?0:I+G,Z=t===m?0:t.offsetWidth-t.clientWidth-K,j=t===m?0:t.offsetHeight-t.clientHeight-Y,L=b+(g?0:I)+A,V=v-(g?0:G)-O-j,ne=C+(g?0:J)+M,le=E-(g?0:U)-P;h.direction==="rtl"&&!Ti()?ne+=Z:le-=Z;let ue=ie<L||F>V,fe=te<ne||N>le;if(ue&&r==="start")o+=ie-L;else if(ue&&r==="center")o+=(ie+F)/2-(L+V)/2;else if(ue&&r==="end")o+=F-V;else if(ue&&r==="nearest"){let Ee=ie-L,Ve=F-V;o+=Math.abs(Ee)<=Math.abs(Ve)?Ee:Ve}if(fe&&i==="start")a+=te-ne;else if(fe&&i==="center")a+=(te+N)/2-(ne+le)/2;else if(fe&&i==="end")a+=N-le;else if(fe&&i==="nearest"){let Ee=te-ne,Ve=N-le;a+=Math.abs(Ee)<=Math.abs(Ve)?Ee:Ve}t.scrollTo({left:a,top:o})}function co(t,e={}){let{containingElement:n}=e;if(t&&t.isConnected){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let{left:o,top:a}=t.getBoundingClientRect(),u=rb(t,!0);for(let h of u)lh(h,t);let{left:c,top:f}=t.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(a-f)>1){u=n?rb(n,!0):[];for(let h of u)lh(h,n,{block:"center",inline:"center"});for(let h of rb(t,!0))lh(h,t)}}else{let{left:o,top:a}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:u,top:c}=t.getBoundingClientRect();(Math.abs(o-u)>1||Math.abs(a-c)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let yI=0;const ib=new Map;function Wc(t){let[e,n]=k.useState();return Le(()=>{if(!t)return;let r=ib.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${yI++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},ib.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ib.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const V5={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function Xp(t={}){let{style:e,isFocusable:n}=t,[r,i]=k.useState(!1),{focusWithinProps:o}=e3({isDisabled:!n,onFocusWithinChange:u=>i(u)}),a=k.useMemo(()=>r?e:e?{...V5,...e}:V5,[r]);return{visuallyHiddenProps:{...o,style:a}}}function vI(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...o}=t,{visuallyHiddenProps:a}=Xp(t);return H.createElement(n,we(o,a),e)}const xI=k.createContext(null),E6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},D6={...E6,customError:!0,valid:!1},Mu={isInvalid:!1,validationDetails:E6,validationErrors:[]},CI=k.createContext({}),U5="__reactAriaFormValidationState";function EI(t){if(t[U5]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}=t[U5];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:o}}return DI(t)}function DI(t){let{isInvalid:e,validationState:n,name:r,value:i,builtinValidation:o,validate:a,validationBehavior:u="aria"}=t;n&&(e||=n==="invalid");let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:D6}:null,f=k.useMemo(()=>{if(!a||i==null)return null;let G=kI(a,i);return q5(G)},[a,i]);o?.validationDetails.valid&&(o=void 0);let h=k.useContext(CI),m=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(G=>$0(h[G])):$0(h[r]):[],[h,r]),[g,b]=k.useState(h),[v,C]=k.useState(!1);h!==g&&(b(h),C(!1));let E=k.useMemo(()=>q5(v?[]:m),[v,m]),D=k.useRef(Mu),[w,$]=k.useState(Mu),T=k.useRef(Mu),A=()=>{if(!O)return;M(!1);let G=f||o||D.current;ob(G,T.current)||(T.current=G,$(G))},[O,M]=k.useState(!1);return k.useEffect(A),{realtimeValidation:c||E||f||o||Mu,displayValidation:u==="native"?c||E||w:c||E||f||o||w,updateValidation(G){u==="aria"&&!ob(w,G)?$(G):D.current=G},resetValidation(){let G=Mu;ob(G,T.current)||(T.current=G,$(G)),u==="native"&&M(!1),C(!0)},commitValidation(){u==="native"&&M(!0),C(!0)}}}function $0(t){return t?Array.isArray(t)?t:[t]:[]}function kI(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return $0(n)}return[]}function q5(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:D6}:null}function ob(t,e){return t===e?!0:!!t&&!!e&&t.isInvalid===e.isInvalid&&t.validationErrors.length===e.validationErrors.length&&t.validationErrors.every((n,r)=>n===e.validationErrors[r])&&Object.entries(t.validationDetails).every(([n,r])=>e.validationDetails[n]===r)}const SI=k.createContext(null);function $I(t){let{description:e,errorMessage:n,isInvalid:r,validationState:i}=t,{labelProps:o,fieldProps:a}=dI(t),u=Ks([!!e,!!n,r,i]),c=Ks([!!e,!!n,r,i]);return a=we(a,{"aria-describedby":[u,c,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:a,descriptionProps:{id:u},errorMessageProps:{id:c}}}function wI(t,e,n){let r=At(i=>{n&&!i.defaultPrevented&&n(e)});k.useEffect(()=>{let i=t?.current?.form;return i?.addEventListener("reset",r),()=>{i?.removeEventListener("reset",r)}},[t])}function TI(t,e,n){let{validationBehavior:r,focus:i}=t;Le(()=>{if(r==="native"&&n?.current&&"setCustomValidity"in n.current&&!n.current.disabled){let f=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(f),n.current.hasAttribute("title")||(n.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(BI(n.current))}});let o=k.useRef(!1),a=At(()=>{o.current||e.resetValidation()}),u=At(f=>{e.displayValidation.isInvalid||e.commitValidation();let h=n?.current?.form;!f.defaultPrevented&&n&&h&&MI(h)===n.current&&(i?i():n.current?.focus(),Ts("keyboard")),f.preventDefault()}),c=At(()=>{e.commitValidation()});k.useEffect(()=>{let f=n?.current;if(!f)return;let h=f.form,m=h?.reset;return h&&(h.reset=()=>{o.current=!window.event||window.event.type==="message"&&de(window.event)instanceof MessagePort,m?.call(h),o.current=!1}),f.addEventListener("invalid",u),f.addEventListener("change",c),h?.addEventListener("reset",a),()=>{f.removeEventListener("invalid",u),f.removeEventListener("change",c),h?.removeEventListener("reset",a),h&&(h.reset=m)}},[n,r])}function AI(t){let e=t.validity;return{badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function BI(t){return{isInvalid:!t.validity.valid,validationDetails:AI(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function MI(t){for(let e=0;e<t.elements.length;e++){let n=t.elements[e];if(n.validity?.valid===!1)return n}return null}function RI(t={}){let{isReadOnly:e}=t,[n,r]=Ho(t.isSelected,t.defaultSelected||!1,t.onChange),[i]=k.useState(n);function o(u){e||r(u)}function a(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??i,setSelected:o,toggle:a}}const PI=k.createContext(null),OI=k.createContext(null),k6=k.createContext({}),NI=k.forwardRef(function(e,n){[e,n]=Ct(e,n,k6);let{isDisabled:r,isInvalid:i,isReadOnly:o,onHoverStart:a,onHoverChange:u,onHoverEnd:c,...f}=e;r??=!!e["aria-disabled"]&&e["aria-disabled"]!=="false",i??=!!e["aria-invalid"]&&e["aria-invalid"]!=="false";let{hoverProps:h,isHovered:m}=Vo({onHoverStart:a,onHoverChange:u,onHoverEnd:c,isDisabled:r}),{isFocused:g,isFocusVisible:b,focusProps:v}=Po({within:!0}),C=Rt({...e,values:{isHovered:m,isFocusWithin:g,isFocusVisible:b,isDisabled:r,isInvalid:i},defaultClassName:"react-aria-Group"});return H.createElement(at.div,{...we(f,v,h),...C,ref:n,role:e.role??"group",slot:e.slot??void 0,"data-focus-within":g||void 0,"data-hovered":m||void 0,"data-focus-visible":b||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,"data-readonly":o||void 0},C.children)}),S6=k.createContext({});let LI=t=>{let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,...i}=t;return i};const $6=Wp(function(e,n){[e,n]=Ct(e,n,S6);let{hoverProps:r,isHovered:i}=Vo({...e,isDisabled:e.disabled}),{isFocused:o,isFocusVisible:a,focusProps:u}=Po({isTextInput:!0,autoFocus:e.autoFocus}),c=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",f=Rt({...e,values:{isHovered:i,isFocused:o,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:c},defaultClassName:"react-aria-Input"});return H.createElement(at.input,{...we(LI(e),u,r),...f,ref:n,"data-focused":o||void 0,"data-disabled":e.disabled||void 0,"data-hovered":i||void 0,"data-focus-visible":a||void 0,"data-invalid":c||void 0})});function zI(t,e){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:o=!1,type:a="text",validationBehavior:u="aria"}=t,[c,f]=Ho(t.value,t.defaultValue||"",t.onChange),{focusableProps:h}=Gp(t,e),m=EI({...t,value:c}),{isInvalid:g,validationErrors:b,validationDetails:v}=m.displayValidation,{labelProps:C,fieldProps:E,descriptionProps:D,errorMessageProps:w}=$I({...t,isInvalid:g,errorMessage:t.errorMessage||b}),$=Je(t,{labelable:!0});const T={type:a,pattern:t.pattern};let[A]=k.useState(c);return wI(e,t.defaultValue??A,f),TI(t,m,e),{labelProps:C,inputProps:we($,n==="input"?T:void 0,{disabled:r,readOnly:o,required:i&&u==="native","aria-required":i&&u==="aria"||void 0,"aria-invalid":g||void 0,"aria-errormessage":t["aria-errormessage"],"aria-activedescendant":t["aria-activedescendant"],"aria-autocomplete":t["aria-autocomplete"],"aria-haspopup":t["aria-haspopup"],"aria-controls":t["aria-controls"],value:c,onChange:O=>f(de(O).value),autoComplete:t.autoComplete,autoCapitalize:t.autoCapitalize,maxLength:t.maxLength,minLength:t.minLength,name:t.name,form:t.form,placeholder:t.placeholder,inputMode:t.inputMode,autoCorrect:t.autoCorrect,spellCheck:t.spellCheck,[parseInt(H.version,10)>=17?"enterKeyHint":"enterkeyhint"]:t.enterKeyHint,onCopy:t.onCopy,onCut:t.onCut,onPaste:t.onPaste,onCompositionEnd:t.onCompositionEnd,onCompositionStart:t.onCompositionStart,onCompositionUpdate:t.onCompositionUpdate,onSelect:t.onSelect,onBeforeInput:t.onBeforeInput,onInput:t.onInput,...h,...E}),descriptionProps:D,errorMessageProps:w,isInvalid:g,validationErrors:b,validationDetails:v}}const Jp=k.createContext({}),w6=k.createContext(null),T6=k.forwardRef(function(e,n){let{render:r}=k.useContext(w6);return H.createElement(H.Fragment,null,r(e,n))});function II(t,e){let n=t?.renderDropIndicator,r=t?.isVirtualDragging?.(),i=k.useCallback(o=>{if(r||e?.isDropTarget(o))return n?n(o):H.createElement(T6,{target:o})},[e?.target,r,n]);return t?.useDropIndicator?i:void 0}function FI(t,e,n){let r=t.focusedKey,i=null;if(e?.isVirtualDragging?.()&&n?.target?.type==="item"&&(i=n.target.key,n.target.dropPosition==="after")){let o=n.collection.getKeyAfter(i),a=null;if(o!=null){let u=n.collection.getItem(i)?.level??0;for(;o!=null;){let c=n.collection.getItem(o);if(!c)break;if(c.type!=="item"){o=n.collection.getKeyAfter(o);continue}if((c.level??0)<=u)break;a=o,o=n.collection.getKeyAfter(o)}}i=o??a??i}return k.useMemo(()=>new Set([r,i].filter(o=>o!=null)),[r,i])}const A6=k.createContext({}),KI=ra(g0,function(e,n){return[e,n]=Ct(e,n,A6),H.createElement(at.header,{className:"react-aria-Header",...e,ref:n},e.children)}),_I=k.createContext(null);function r3(t){let e=k.useRef({});return H.createElement(_I.Provider,{value:e},t.children)}const i3=k.createContext({isSelected:!1});function jI(t){let e=Je(t,{labelable:!0}),n;return t.orientation==="vertical"&&(n="vertical"),t.elementType!=="hr"?{separatorProps:{...e,role:"separator","aria-orientation":n}}:{separatorProps:e}}const B6=k.createContext({}),O1=class O1 extends na{filter(e,n){let r=n.getItem(this.prevKey);if(r&&r.type!=="separator"){let i=this.clone();return n.addDescendants(i,e),i}return null}};O1.type="separator";let w0=O1;const HI=ra(w0,function(e,n){[e,n]=Ct(e,n,B6);let{elementType:r,orientation:i,style:o,className:a,slot:u,...c}=e,f=r||"hr";f==="hr"&&i==="vertical"&&(f="div");let h=at[f],{separatorProps:m}=jI({...c,elementType:r,orientation:i}),g=Je(e,{global:!0});return H.createElement(h,{render:e.render,...we(g,m),style:o,className:a??"react-aria-Separator",ref:n,slot:u||void 0})});class VI{constructor(e,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=a=>{if(a.nodeType===Node.ELEMENT_NODE){const u=a.shadowRoot;if(u){const c=this._doc.createTreeWalker(u,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(a);if(this.filter?.acceptNode)return this.filter.acceptNode(a);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const o=n.shadowRoot;if(o){const a=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(a)}}get currentNode(){return this._currentNode}set currentNode(e){if(!$e(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=r,u=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});n.push(u),u.currentNode=i,this._currentSetFor.add(u),r=i=a.host}else r=r.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(o),o.currentNode=i,this._currentSetFor.add(o),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return $e(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let r;if(typeof this.filter=="function"?r=this.filter(e):this.filter?.acceptNode&&(r=this.filter.acceptNode(e)),r===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let i=this.nextNode();return i&&(this.currentNode=i),i}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.nextNode();return n&&(this.currentNode=n),n}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){let i;if(typeof this.filter=="function"?i=this.filter(n):this.filter?.acceptNode&&(i=this.filter.acceptNode(n)),i===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let o=this.lastChild();return o&&(this.currentNode=o),o}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.previousNode();return r&&(this.currentNode=r),r}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function M6(t,e,n,r){return xi()?new VI(t,e,n,r):t.createTreeWalker(e,n,r)}const G5=H.createContext(null),T0="react-aria-focus-scope-restore";let ot=null;function o3(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,o=k.useRef(null),a=k.useRef(null),u=k.useRef([]),{parentNode:c}=k.useContext(G5)||{},f=k.useMemo(()=>new B0({scopeRef:u}),[u]);Le(()=>{let g=c||$t.root;if($t.getTreeNode(g.scopeRef)&&ot&&!Ph(ot,g.scopeRef)){let b=$t.getTreeNode(ot);b&&(g=b)}g.addChild(f),$t.addNode(f)},[f,c]),Le(()=>{let g=$t.getTreeNode(u);g&&(g.contain=!!n)},[n]),Le(()=>{let g=o.current?.nextSibling,b=[],v=C=>C.stopPropagation();for(;g&&g!==a.current;)b.push(g),g.addEventListener(T0,v),g=g.nextSibling;return u.current=b,()=>{for(let C of b)C.removeEventListener(T0,v)}},[e]),XI(u,r,n),WI(u,n),JI(u,r,n),YI(u,i),k.useEffect(()=>{const g=_e(ze(u.current?u.current[0]:void 0));let b=null;if(hr(g,u.current)){for(let v of $t.traverse())v.scopeRef&&hr(g,v.scopeRef.current)&&(b=v);b===$t.getTreeNode(u)&&(ot=b.scopeRef)}},[u]),Le(()=>()=>{let g=$t.getTreeNode(u)?.parent?.scopeRef??null;(u===ot||Ph(u,ot))&&(!g||$t.getTreeNode(g))&&(ot=g),$t.removeTreeNode(u)},[u]);let h=k.useMemo(()=>UI(u),[]),m=k.useMemo(()=>({focusManager:h,parentNode:f}),[f,h]);return H.createElement(G5.Provider,{value:m},H.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,H.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function UI(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,u=r||_e(ze(n[0]??void 0)),c=n[0].previousElementSibling,f=Bs(n),h=ln(f,{tabbable:i,accept:a},n);h.currentNode=hr(u,n)?u:c;let m=h.nextNode();return!m&&o&&(h.currentNode=c,m=h.nextNode()),m&&On(m,!0),m},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:o,accept:a}=e,u=r||_e(ze(n[0]??void 0)),c=n[n.length-1].nextElementSibling,f=Bs(n),h=ln(f,{tabbable:i,accept:a},n);h.currentNode=hr(u,n)?u:c;let m=h.previousNode();return!m&&o&&(h.currentNode=c,m=h.previousNode()),m&&On(m,!0),m},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Bs(n),a=ln(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let u=a.nextNode();return u&&On(u,!0),u},focusLast(e={}){let n=t.current,{tabbable:r,accept:i}=e,o=Bs(n),a=ln(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let u=a.previousNode();return u&&On(u,!0),u}}}function Bs(t){return t[0].parentElement}function Vu(t){let e=$t.getTreeNode(ot);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function qI(t){if(!t.form)return Array.from(ze(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(r=>!r.form);const e=t.form.elements.namedItem(t.name);let n=cn(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function GI(t){if(t.checked)return!0;const e=qI(t);return e.length>0&&!e.some(n=>n.checked)}function WI(t,e){let n=k.useRef(void 0),r=k.useRef(void 0);Le(()=>{let i=t.current;if(!e){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=ze(i?i[0]:void 0);let a=f=>{if(f.key!=="Tab"||f.altKey||f.ctrlKey||f.metaKey||!Vu(t)||f.isComposing)return;let h=_e(o),m=t.current;if(!m||!hr(h,m))return;let g=Bs(m),b=ln(g,{tabbable:!0},m);if(!h)return;b.currentNode=h;let v=f.shiftKey?b.previousNode():b.nextNode();v||(b.currentNode=f.shiftKey?m[m.length-1].nextElementSibling:m[0].previousElementSibling,v=f.shiftKey?b.previousNode():b.nextNode()),f.preventDefault(),v&&(On(v,!0),v instanceof cn(v).HTMLInputElement&&v.select())},u=f=>{(!ot||Ph(ot,t))&&hr(de(f),t.current)?(ot=t,n.current=de(f)):Vu(t)&&!xo(de(f),t)?n.current?n.current.focus():ot&&ot.current&&A0(ot.current):Vu(t)&&(n.current=de(f))},c=f=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let h=Qs(),m=(h==="virtual"||h===null)&&jp()&&TS(),g=_e(o);if(!m&&g&&Vu(t)&&!xo(g,t)){ot=t;let b=de(f);b&&b.isConnected?(n.current=b,n.current?.focus()):ot.current&&A0(ot.current)}})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",u,!1),i?.forEach(f=>f.addEventListener("focusin",u,!1)),i?.forEach(f=>f.addEventListener("focusout",c,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",u,!1),i?.forEach(f=>f.removeEventListener("focusin",u,!1)),i?.forEach(f=>f.removeEventListener("focusout",c,!1))}},[t,e]),Le(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function R6(t){return xo(t)}function hr(t,e){return!t||!e?!1:e.some(n=>$e(n,t))}function xo(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of $t.traverse($t.getTreeNode(e)))if(n&&hr(t,n.current))return!0;return!1}function QI(t){return xo(t,ot)}function Ph(t,e){let n=$t.getTreeNode(e)?.parent;for(;n;){if(n.scopeRef===t)return!0;n=n.parent}return!1}function On(t,e=!1){if(t!=null&&!e)try{mn(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function P6(t,e=!0){let n=t[0].previousElementSibling,r=Bs(t),i=ln(r,{tabbable:e},t);i.currentNode=n;let o=i.nextNode();return e&&!o&&(r=Bs(t),i=ln(r,{tabbable:!1},t),i.currentNode=n,o=i.nextNode()),o}function A0(t,e=!0){On(P6(t,e))}function YI(t,e){const n=H.useRef(e);k.useEffect(()=>{if(n.current){ot=t;const r=ze(t.current?t.current[0]:void 0);!hr(_e(r),ot.current)&&t.current&&A0(t.current)}n.current=!1},[t])}function XI(t,e,n){Le(()=>{if(e||n)return;let r=t.current;const i=ze(r?r[0]:void 0);let o=a=>{let u=de(a);hr(u,t.current)?ot=t:R6(u)||(ot=null)};return i.addEventListener("focusin",o,!1),r?.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r?.forEach(a=>a.removeEventListener("focusin",o,!1))}},[t,e,n])}function W5(t){let e=$t.getTreeNode(ot);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function JI(t,e,n){const r=k.useRef(typeof document<"u"?_e(ze(t.current?t.current[0]:void 0)):null);Le(()=>{let i=t.current;const o=ze(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!ot||Ph(ot,t))&&hr(_e(o),t.current)&&(ot=t)};return o.addEventListener("focusin",a,!1),i?.forEach(u=>u.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i?.forEach(u=>u.removeEventListener("focusin",a,!1))}},[t,n]),Le(()=>{const i=ze(t.current?t.current[0]:void 0);if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Vu(t)||a.isComposing)return;let u=i.activeElement;if(!xo(u,t)||!W5(t))return;let c=$t.getTreeNode(t);if(!c)return;let f=c.nodeToRestore,h=ln(i.body,{tabbable:!0});h.currentNode=u;let m=a.shiftKey?h.previousNode():h.nextNode();if((!f||!f.isConnected||f===i.body)&&(f=void 0,c.nodeToRestore=void 0),(!m||!xo(m,t))&&f){h.currentNode=f;do m=a.shiftKey?h.previousNode():h.nextNode();while(xo(m,t));a.preventDefault(),a.stopPropagation(),m?On(m,!0):R6(f)?On(f,!0):u.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[t,e,n]),Le(()=>{const i=ze(t.current?t.current[0]:void 0);if(!e)return;let o=$t.getTreeNode(t);if(o)return o.nodeToRestore=r.current??void 0,()=>{let a=$t.getTreeNode(t);if(!a)return;let u=a.nodeToRestore,c=_e(i);if(e&&u&&(c&&xo(c,t)||c===i.body&&W5(t))){let f=$t.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let h=f.getTreeNode(t);for(;h;){if(h.nodeToRestore&&h.nodeToRestore.isConnected){Q5(h.nodeToRestore);return}h=h.parent}for(h=f.getTreeNode(t);h;){if(h.scopeRef&&h.scopeRef.current&&$t.getTreeNode(h.scopeRef)){let m=P6(h.scopeRef.current,!0);Q5(m);return}h=h.parent}}})}}},[t,e])}function Q5(t){t.dispatchEvent(new CustomEvent(T0,{bubbles:!0,cancelable:!0}))&&On(t)}function ln(t,e,n){let r=e?.tabbable?$h:kS,i=t?.nodeType===Node.ELEMENT_NODE?t:null,o=ze(i),a=M6(o,t||o,NodeFilter.SHOW_ELEMENT,{acceptNode(u){return $e(e?.from,u)||e?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"&&(!GI(u)||a.currentNode.tagName==="INPUT"&&a.currentNode.type==="radio"&&a.currentNode.name===u.name)?NodeFilter.FILTER_REJECT:r(u)&&(!n||hr(u,n))&&(!e?.accept||e.accept(u))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(a.currentNode=e.from),a}function ZI(t,e={}){return{focusNext(n={}){let r=t.current;if(!r)return null;let{from:i,tabbable:o=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(ze(r)),f=ln(r,{tabbable:o,accept:u});$e(r,c)&&(f.currentNode=c);let h=f.nextNode();return!h&&a&&(f.currentNode=r,h=f.nextNode()),h&&On(h,!0),h},focusPrevious(n=e){let r=t.current;if(!r)return null;let{from:i,tabbable:o=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(ze(r)),f=ln(r,{tabbable:o,accept:u});if($e(r,c))f.currentNode=c;else{let m=sb(f);return m&&On(m,!0),m??null}let h=f.previousNode();if(!h&&a){f.currentNode=r;let m=sb(f);if(!m)return null;h=m}return h&&On(h,!0),h??null},focusFirst(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:o=e.accept}=n,u=ln(r,{tabbable:i,accept:o}).nextNode();return u&&On(u,!0),u},focusLast(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:o=e.accept}=n,a=ln(r,{tabbable:i,accept:o}),u=sb(a);return u&&On(u,!0),u??null}}}function sb(t){let e,n;do n=t.lastChild(),n&&(e=n);while(n);return e}class s3{constructor(){this.fastMap=new Map,this.root=new B0({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new B0({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),r&&(o.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&hr(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){let e=new s3;for(let n of this.traverse())e.addTreeNode(n.scopeRef,n.parent?.scopeRef??null,n.nodeToRestore);return e}}class B0{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let $t=new s3;function M0(t){return JL()?t.altKey:t.ctrlKey}function _s(t,e){let n=`[data-key="${CSS.escape(String(e))}"]`,r=t.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),t.current?.querySelector(n)}const O6=new WeakMap;function eF(t){let e=nn();return O6.set(t,e),e}function tF(t){return O6.get(t)}const Y5=1e3;function nF(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=k.useRef({search:"",timeout:void 0}),o=u=>{if(i.current.search.length>0&&u.key===" "){if(u.preventDefault(),(!("continuePropagation"in u)||"continuePropagation"in u&&!u.isPropagationStopped())&&u.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(i.current.search,n.focusedKey);c==null&&(c=e.getKeyForSearch(i.current.search)),c!=null&&(n.setFocusedKey(c),r&&r(c))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},Y5)}},a=u=>{let c=rF(u.key);if(!(!c||u.ctrlKey||u.metaKey||u.altKey||!$e(u.currentTarget,de(u))||i.current.search.length===0&&c===" ")){if(i.current.search+=c,e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,n.focusedKey);if(f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null)n.setFocusedKey(f),r&&r(f),u.preventDefault(),"continuePropagation"in u||u.stopPropagation();else{i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},Y5)}};return k.useEffect(()=>{let u=i.current.timeout;return()=>{clearTimeout(u)}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:void 0,onKeyDown:e.getKeyForSearch?a:void 0}}}function rF(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function X5(t,e){const n=k.useRef(!0),r=k.useRef(null);Le(()=>(n.current=!0,()=>{n.current=!1}),[]),Le(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function iF(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:u=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:f=e.selectionBehavior==="replace",disallowTypeAhead:h=!1,shouldUseVirtualFocus:m,allowsTabNavigation:g=!1,scrollRef:b=r,linkBehavior:v="action",UNSTABLE_focusOnEntry:C}=t,{direction:E}=Mi(),D=Tl(),w=N=>{if(N.altKey&&N.key==="Tab"&&N.preventDefault(),!r.current||!$e(r.current,de(N)))return;const K=(Y,Z)=>{if(Y!=null){if(e.isLink(Y)&&v==="selection"&&f&&!M0(N)){$l.flushSync(()=>{e.setFocusedKey(Y,Z)});let j=_s(r,Y),L=e.getItemProps(Y);j&&D.open(j,N,L.href,L.routerOptions);return}if(e.setFocusedKey(Y,Z),e.isLink(Y)&&v==="override")return;N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(Y):f&&!M0(N)&&e.replaceSelection(Y)}};switch(N.key){case"ArrowDown":if(n.getKeyBelow){let Y=e.focusedKey!=null?n.getKeyBelow?.(e.focusedKey):n.getFirstKey?.();Y==null&&o&&(Y=n.getFirstKey?.(e.focusedKey)),Y!=null&&(N.preventDefault(),K(Y))}break;case"ArrowUp":if(n.getKeyAbove){let Y=e.focusedKey!=null?n.getKeyAbove?.(e.focusedKey):n.getLastKey?.();Y==null&&o&&(Y=n.getLastKey?.(e.focusedKey)),Y!=null&&(N.preventDefault(),K(Y))}break;case"ArrowLeft":if(n.getKeyLeftOf){let Y=e.focusedKey!=null?n.getKeyLeftOf?.(e.focusedKey):n.getFirstKey?.();Y==null&&o&&(Y=E==="rtl"?n.getFirstKey?.(e.focusedKey):n.getLastKey?.(e.focusedKey)),Y!=null&&(N.preventDefault(),K(Y,E==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){let Y=e.focusedKey!=null?n.getKeyRightOf?.(e.focusedKey):n.getFirstKey?.();Y==null&&o&&(Y=E==="rtl"?n.getLastKey?.(e.focusedKey):n.getFirstKey?.(e.focusedKey)),Y!=null&&(N.preventDefault(),K(Y,E==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&N.shiftKey)return;N.preventDefault();let Y=n.getFirstKey(e.focusedKey,Cs(N));e.setFocusedKey(Y),Y!=null&&(Cs(N)&&N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(Y):f&&e.replaceSelection(Y))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&N.shiftKey)return;N.preventDefault();let Y=n.getLastKey(e.focusedKey,Cs(N));e.setFocusedKey(Y),Y!=null&&(Cs(N)&&N.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(Y):f&&e.replaceSelection(Y))}break;case"PageDown":if(n.getKeyPageBelow&&e.focusedKey!=null){let Y=n.getKeyPageBelow(e.focusedKey);Y!=null&&(N.preventDefault(),K(Y))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let Y=n.getKeyPageAbove(e.focusedKey);Y!=null&&(N.preventDefault(),K(Y))}break;case"a":Cs(N)&&e.selectionMode==="multiple"&&u!==!0&&(N.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!a&&e.selectedKeys.size!==0&&(N.stopPropagation(),N.preventDefault(),e.clearSelection());break;case"Tab":if(!g){if(N.shiftKey)r.current.focus();else{let Y=ln(r.current,{tabbable:!0}),Z,j;do j=Y.lastChild(),j&&(Z=j);while(j);let L=_e();Z&&(!ml(Z)||L&&!$h(L))&&Tr(Z)}break}}},$=k.useRef({top:0,left:0});ju(b,"scroll",()=>{$.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let T=N=>{if(e.isFocused){$e(N.currentTarget,de(N))||e.setFocused(!1);return}if(!$e(N.currentTarget,de(N)))return;let K=Qs();e.setFocused(!0);let Y=Z=>{Z!=null&&(e.setFocusedKey(Z),f&&!e.isSelected(Z)&&e.replaceSelection(Z))};if(C&&(K==="keyboard"||K==="virtual"))Y(C==="first"?n.getFirstKey?.():n.getLastKey?.());else if(e.focusedKey==null){let Z=N.relatedTarget;Z&&N.currentTarget.compareDocumentPosition(Z)&Node.DOCUMENT_POSITION_FOLLOWING?Y(e.lastSelectedKey??n.getLastKey?.()):Y(e.firstSelectedKey??n.getFirstKey?.())}else b.current&&(b.current.scrollTop=$.current.top,b.current.scrollLeft=$.current.left);if(e.focusedKey!=null&&b.current){let Z=_s(r,e.focusedKey);Z instanceof HTMLElement&&(!ml(Z)&&!m&&Tr(Z),(K==="keyboard"||C&&K==="virtual")&&co(Z,{containingElement:r.current}))}},A=N=>{$e(N.currentTarget,N.relatedTarget)||e.setFocused(!1)},O=k.useRef(!1);ju(r,f0,m?N=>{let{detail:K}=N;N.stopPropagation(),e.setFocused(!0),K?.focusStrategy==="first"&&(O.current=!0)}:void 0);let M=n.getFirstKey?.()??null;X5(()=>{if(O.current)if(M==null){let N=_e();_y(r.current),Sh(N,null),e.collection.size>0&&(O.current=!1)}else e.setFocusedKey(M),O.current=!1},[M,e.collection.size]),X5(()=>{e.collection.size>0&&(O.current=!1)},[e.focusedKey]),ju(r,ES,m?N=>{N.stopPropagation(),e.setFocused(!1),N.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const P=k.useRef(i),I=k.useRef(!1);k.useEffect(()=>{if(P.current){let N=null;i==="first"&&(N=n.getFirstKey?.()??null),i==="last"&&(N=n.getLastKey?.()??null);let K=e.selectedKeys;if(K.size){for(let Y of K)if(e.canSelectItem(Y)){N=Y;break}}e.setFocused(!0),e.setFocusedKey(N),N==null&&!m&&r.current&&mn(r.current),e.collection.size>0&&(P.current=!1,I.current=!0)}});let G=k.useRef(e.focusedKey),J=k.useRef(null);k.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==G.current||I.current)&&b.current&&r.current){let N=Qs(),K=_s(r,e.focusedKey);if(!(K instanceof HTMLElement))return;(N==="keyboard"||I.current)&&(J.current&&cancelAnimationFrame(J.current),J.current=requestAnimationFrame(()=>{b.current&&(lh(b.current,K),N!=="virtual"&&co(K,{containingElement:r.current}))}))}!m&&e.isFocused&&e.focusedKey==null&&G.current!=null&&r.current&&mn(r.current),G.current=e.focusedKey,I.current=!1}),k.useEffect(()=>()=>{J.current&&cancelAnimationFrame(J.current)},[]),ju(r,"react-aria-focus-scope-restore",N=>{N.preventDefault(),e.setFocused(!0)});let U={onKeyDown:w,onFocus:T,onBlur:A,onMouseDown(N){b.current===de(N)&&N.preventDefault()}},{typeSelectProps:ie}=nF({keyboardDelegate:n,selectionManager:e});h||(U=we(ie,U));let F;m||(F=e.focusedKey==null?0:-1);let te=eF(e.collection);return{collectionProps:we(U,{tabIndex:F,"data-collection":te})}}class J5{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?_s(this.ref,e):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left-n.clientLeft+n.scrollLeft,y:o.top-i.top-n.clientTop+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}}class N6{constructor(...e){if(e.length===1){let n=e[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new J5(n.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new J5(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){return this.disabledBehavior==="all"&&(e.props?.isDisabled||this.disabledKeys.has(e.key))&&e.props?.disabledBehavior!=="selection"}findNextNonDisabled(e,n,r=!1){let i=e;for(;i!=null;){let o=this.collection.getItem(i);if(o?.type==="item"&&(r||!this.isDisabled(o)))return i;i=n(i)}return null}getNextKey(e,n){let r=e;return r=this.collection.getKeyAfter(r),this.findNextNonDisabled(r,i=>this.collection.getKeyAfter(i),n?.includeDisabled)}getPreviousKey(e,n){let r=e;return r=this.collection.getKeyBefore(r),this.findNextNonDisabled(r,i=>this.collection.getKeyBefore(i),n?.includeDisabled)}findKey(e,n,r){let i=e,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(e,n){return e.y===n.y||e.x!==n.x}isSameColumn(e,n){return e.x===n.x||e.y!==n.y}isReversed(e){let n=this.getNextKey(e),r=_s(this.ref,e);if(n!=null){let o=_s(this.ref,n);return!r||!o?!1:r.getBoundingClientRect().top>o.getBoundingClientRect().top}let i=this.getPreviousKey(e);if(i!=null){let o=_s(this.ref,i);return!r||!o?!1:o.getBoundingClientRect().top>r.getBoundingClientRect().top}return!1}getKeyBelow(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getNextKey(r,n),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getPreviousKey(e,n):this.getNextKey(e,n):this.getNextKey(e,n)}getKeyAbove(e,n){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,r=>this.getPreviousKey(r,n),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getNextKey(e,n):this.getPreviousKey(e,n):this.getPreviousKey(e,n)}getNextColumn(e,n,r){return n?this.getPreviousKey(e,r):this.getNextKey(e,r)}getKeyRightOf(e,n){let r=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[r](i),n?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",n):this.findKey(e,i=>this.getNextColumn(i,this.direction==="rtl",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",n):null}getKeyLeftOf(e,n){let r=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[r]?(e=this.layoutDelegate[r](e),this.findNextNonDisabled(e,i=>this.layoutDelegate[r](i),n?.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",n):this.findKey(e,i=>this.getNextColumn(i,this.direction==="ltr",n),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",n):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyAfter(n))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;let i=this.isReversed(e);if(n&&!Oo(n))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let a=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>a&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let a=this.layoutDelegate.getVisibleRect(),u=i?r.y-a.height:Math.max(0,r.y+r.height-a.height);for(;r&&r.y>u&&o!=null;)o=this.getKeyAbove(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??(i?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let n=this.ref.current,r=this.layoutDelegate.getItemRect(e);if(!r)return null;let i=this.isReversed(e);if(n&&!Oo(n))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let a=Math.min(this.layoutDelegate.getContentSize().width,r.x-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<a&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}else{let a=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<a&&o!=null;)o=this.getKeyBelow(o),r=o==null?null:this.layoutDelegate.getItemRect(o)}return o??(i?this.getFirstKey():this.getLastKey())}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}}let ab=new Map;function a3(t){let{locale:e}=Mi(),n=e+(t?Object.entries(t).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(ab.has(n))return ab.get(n);let r=new Intl.Collator(e,t);return ab.set(n,r),r}function L6(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a,orientation:u}=t,c=a3({usage:"search",sensitivity:"base"}),f=e.disabledBehavior,h=k.useMemo(()=>o||new N6({collection:n,disabledKeys:r,disabledBehavior:f,ref:i,collator:c,layoutDelegate:a,orientation:u}),[o,a,n,r,i,c,f,u]),{collectionProps:m}=iF({...t,ref:i,selectionManager:e,keyboardDelegate:h});return{listProps:m}}const oF=500;function z6(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=oF,accessibilityDescription:a}=t;const u=k.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:f}=qc(),{pressProps:h}=Gc({isDisabled:e,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),u.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),ze(g.target).activeElement!==g.target&&Tr(g.target),i&&i({...g,type:"longpress"}),u.current=void 0},o),g.pointerType==="touch")){let b=C=>{C.preventDefault()},v=cn(g.target);c(g.target,"contextmenu",b,{once:!0}),c(v,"pointerup",()=>{setTimeout(()=>{f(g.target,"contextmenu",b)},30)},{once:!0})}},onPressEnd(g){u.current&&clearTimeout(u.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),m=Wc(i&&!e?a:void 0);return{longPressProps:we(h,m)}}function I6(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:u,isDisabled:c,onAction:f,allowsDifferentPressOrigin:h,linkBehavior:m="action"}=t,g=Tl();e=nn(e);let b=j=>{if(j.pointerType==="keyboard"&&M0(j))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(m==="selection"&&i.current){let L=n.getItemProps(r);g.open(i.current,j,L.href,L.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(m==="override"||m==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):j&&j.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||j&&(Cs(j)||j.pointerType==="touch"||j.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};k.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(a?_y(i.current):u?u():_e()!==i.current&&i.current&&mn(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),c=c||n.isDisabled(r);let v={};!a&&!c?v={tabIndex:r===n.focusedKey?0:-1,onFocus(j){de(j)===i.current&&n.setFocusedKey(r)}}:c&&(v.onMouseDown=j=>{j.preventDefault()}),k.useEffect(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let C=n.isLink(r)&&m==="override",E=f&&t.UNSTABLE_itemBehavior==="action",D=n.isLink(r)&&m!=="selection"&&m!=="none",w=!c&&n.canSelectItem(r)&&!C&&!E,$=(f||D)&&!c,T=$&&(n.selectionBehavior==="replace"?!w:!w||n.isEmpty),A=$&&w&&n.selectionBehavior==="replace",O=T||A,M=k.useRef(null),P=O&&w,I=k.useRef(!1),G=k.useRef(!1),J=n.getItemProps(r),U=j=>{f&&(f(),i.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),D&&i.current&&g.open(i.current,j,J.href,J.routerOptions)},ie={ref:i};if(o?(ie.onPressStart=j=>{M.current=j.pointerType,I.current=P,j.pointerType==="keyboard"&&(!O||e2(j.key))&&b(j)},h?(ie.onPressUp=T?void 0:j=>{j.pointerType==="mouse"&&w&&b(j)},ie.onPress=T?U:j=>{j.pointerType!=="keyboard"&&j.pointerType!=="mouse"&&w&&b(j)}):ie.onPress=j=>{if(T||A&&j.pointerType!=="mouse"){if(j.pointerType==="keyboard"&&!Z5(j.key))return;U(j)}else j.pointerType!=="keyboard"&&w&&b(j)}):(ie.onPressStart=j=>{M.current=j.pointerType,I.current=P,G.current=T,w&&(j.pointerType==="mouse"&&!T||j.pointerType==="keyboard"&&(!$||e2(j.key)))&&b(j)},ie.onPress=j=>{(j.pointerType==="touch"||j.pointerType==="pen"||j.pointerType==="virtual"||j.pointerType==="keyboard"&&O&&Z5(j.key)||j.pointerType==="mouse"&&G.current)&&(O?U(j):w&&b(j))}),v["data-collection"]=tF(n.collection),v["data-key"]=r,ie.preventFocusOnPress=a,a&&(ie=we(ie,{onPressStart(j){j.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(j){j.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}})),J)for(let j of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])J[j]&&(ie[j]=Ko(ie[j],J[j]));let{pressProps:F,isPressed:te}=Gc(ie),N=A?j=>{M.current==="mouse"&&(j.stopPropagation(),j.preventDefault(),U(j))}:void 0,{longPressProps:K}=z6({isDisabled:!P,onLongPress(j){j.pointerType==="touch"&&(b(j),n.setSelectionBehavior("toggle"))}}),Y=j=>{M.current==="touch"&&I.current&&j.preventDefault()},Z=m!=="none"&&n.isLink(r)?j=>{qr.isOpening||j.preventDefault()}:void 0;return{itemProps:we(v,w||T||a&&!c?F:{},P?K:{},{onDoubleClick:N,onDragStartCapture:Y,onClick:Z,id:e},a?{onMouseDown:j=>j.preventDefault()}:void 0),isPressed:te,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:w,hasAction:O}}function Z5(t){return t==="Enter"}function e2(t){return t===" "}function F6(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function sF(t){return aF(t)}function aF(t,e){for(let n of t)return n}function lb(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...t2(t,e),e],i=[...t2(t,n),n],o=r.slice(0,i.length).findIndex((a,u)=>a!==i[u]);return o!==-1?(e=r[o],n=i[o],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function t2(t,e){let n=[],r=e;for(;r?.parentKey!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const n2=new WeakMap;function lF(t){let e=n2.get(t);if(e!=null)return e;let n=0,r=i=>{for(let o of i)o.type==="section"?r(F6(o,t)):o.type==="item"&&n++};return r(t),n2.set(t,n),n}function K6(t){const e=k.version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}class r2{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let u of a.childNodes)n(u)};for(let a of e)n(a);let r=null,i=0,o=0;for(let[a,u]of this.keyMap)r?(r.nextKey=a,u.prevKey=r.key):(this.firstKey=a,u.prevKey=void 0),u.type==="item"&&(u.index=i++),(u.type==="section"||u.type==="item")&&o++,r=u,r.nextKey=void 0;this._size=o,this.lastKey=r?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class Cr extends Set{constructor(e,n,r){super(e),e instanceof Cr?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function uF(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function l3(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,a=k.useRef(!1),[,u]=k.useState(!1),c=k.useRef(null),f=k.useRef(null),[,h]=k.useState(null),m=k.useMemo(()=>i2(t.selectedKeys),[t.selectedKeys]),g=k.useMemo(()=>i2(t.defaultSelectedKeys,new Cr),[t.defaultSelectedKeys]),[b,v]=Ho(m,g,t.onSelectionChange),C=k.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[E,D]=k.useState(i);i==="replace"&&E==="toggle"&&typeof b=="object"&&b.size===0&&D("replace");let w=k.useRef(i);return k.useEffect(()=>{i!==w.current&&(D(i),w.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:D,get isFocused(){return a.current},setFocused($){a.current=$,u($)},get focusedKey(){return c.current},get childFocusStrategy(){return f.current},setFocusedKey($,T="first"){c.current=$,f.current=T,h($)},selectedKeys:b,setSelectedKeys($){(r||!uF($,b))&&v($)},disabledKeys:C,disabledBehavior:o}}function i2(t,e){return t?t==="all"?"all":new Cr(t):e}class Qc{constructor(e,n,r){this.collection=e,this.state=n,this.allowsCellSelection=r?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null,this.fullCollection=r?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&lb(this.collection,r,e)<0)&&(e=r)}return e?.key??null}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&lb(this.collection,r,e)>0)&&(e=r)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Cr([n],n,n);else{let i=this.state.selectedKeys,o=i.anchorKey??n;r=new Cr(i,o,n);for(let a of this.getKeyRange(o,i.currentKey??n))r.delete(a);for(let a of this.getKeyRange(n,o))this.canSelectItem(a)&&r.add(a)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?lb(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let r=[],i=e;for(;i!=null;){let o=this.collection.getItem(i);if(o&&(o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===n)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r=new Cr(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Cr([n],n,n):new Cr;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Cr;for(let r of e){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=this.fullCollection??this.collection,n=[],r=i=>{for(;i!=null;){if(this.canSelectItemIn(i,e)){let o=e.getItem(i);o?.type==="item"&&n.push(i),o?.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&r(sF(F6(o,e))?.key??null)}i=e.getKeyAfter(i)}};return r(e.getFirstKey()),n}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Cr)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,n){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=n.getItem(e);return!(!r||r?.props?.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let n=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!n?.props?.isDisabled)&&n?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new Qc(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class cF{build(e,n){return this.context=n,o2(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:n,items:r}=e;if(H.isValidElement(n)&&n.type===H.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];H.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let u=this.getFullNode({element:a,index:o},{});for(let c of u)o++,yield c}}}getKey(e,n,r,i){if(e.key!=null)return e.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){let a=o.key??o.id;if(a==null)throw new Error("No key found for item");return a}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(e,n){return{renderer:n.renderer||e.renderer}}*getFullNode(e,n,r,i){if(H.isValidElement(e.element)&&e.element.type===H.Fragment){let c=[];H.Children.forEach(e.element.props.children,h=>{c.push(h)});let f=e.index??0;for(const h of c)yield*this.getFullNode({element:h,index:f++},n,r,i);return}let o=e.element;if(!o&&e.value&&n&&n.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=i?i.key:null,yield c;return}o=n.renderer(e.value)}if(H.isValidElement(o)){let c=o.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let g=o.type;throw new Error(`Unknown element <${g}> in collection.`)}let f=c.getCollectionNode(o.props,this.context),h=e.index??0,m=f.next();for(;!m.done&&m.value;){let g=m.value;e.index=h;let b=g.key??null;b==null&&(b=g.element?null:this.getKey(o,e,n,r));let C=[...this.getFullNode({...g,key:b,index:h,wrapper:dF(e.wrapper,g.wrapper)},this.getChildState(n,g),r?`${r}${o.key}`:o.key,i)];for(let E of C){if(E.value=g.value??e.value??null,E.value&&this.cache.set(E.value,E),e.type&&E.type!==e.type)throw new Error(`Unsupported type <${ub(E.type)}> in <${ub(i?.type??"unknown parent type")}>. Only <${ub(e.type)}> is supported.`);h++,yield E}m=f.next(C)}return}if(e.key==null||e.type==null)return;let a=this,u={type:e.type,props:e.props,key:e.key,parentKey:i?i.key:null,value:e.value??null,level:(i?.level??0)+(i?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:o2(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let f of e.childNodes()){f.key!=null&&(f.key=`${u.key}${f.key}`);let h=a.getFullNode({...f,index:c},a.getChildState(n,f),u.key,u);for(let m of h)c++,yield m}})};yield u}constructor(){this.cache=new WeakMap}}function o2(t){let e=[],n=null;return{*[Symbol.iterator](){for(let r of e)yield r;n||(n=t());for(let r of n)e.push(r),yield r}}}function dF(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function ub(t){return t[0].toUpperCase()+t.slice(1)}function _6(t,e,n){let r=k.useMemo(()=>new cF,[]),{children:i,items:o,collection:a}=t;return k.useMemo(()=>{if(a)return a;let c=r.build({children:i,items:o},n);return e(c)},[r,i,o,a,n,e])}function fF(t){let{filter:e,layoutDelegate:n}=t,r=l3(t),i=k.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=k.useCallback(f=>e?new r2(e(f)):new r2(f),[e]),a=k.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=_6(t,o,a),c=k.useMemo(()=>new Qc(u,r,{layoutDelegate:n}),[u,r,n]);return j6(u,c),{collection:u,disabledKeys:i,selectionManager:c}}function hF(t,e){let n=k.useMemo(()=>e?t.collection.filter(e):t.collection,[t.collection,e]),r=t.selectionManager.withCollection(n);return j6(n,r),{collection:n,selectionManager:r,disabledKeys:t.disabledKeys}}function j6(t,e){const n=k.useRef(null);k.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&n.current){let r=n.current.getKeyAfter(e.focusedKey),i=null;for(;r!=null;){let o=t.getItem(r);if(o&&o.type==="item"&&!e.isDisabled(r)){i=r;break}r=n.current.getKeyAfter(r)}if(i==null)for(r=n.current.getKeyBefore(e.focusedKey);r!=null;){let o=t.getItem(r);if(o&&o.type==="item"&&!e.isDisabled(r)){i=r;break}r=n.current.getKeyBefore(r)}e.setFocusedKey(i)}n.current=t},[t,e])}function H6(t,e){let{collection:n,onLoadMore:r,scrollOffset:i=1}=t,o=k.useRef(null),a=At(u=>{for(let c of u)c.isIntersecting&&r&&r()});Le(()=>(e.current&&(o.current=new IntersectionObserver(a,{root:Hr(e?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),o.current.observe(e.current)),()=>{o.current&&o.current.disconnect()}),[n,e,i])}const Tc=k.createContext(null);ra(Bh,function(e,n,r){let i=k.useContext(Tc),{isLoading:o,onLoadMore:a,scrollOffset:u,...c}=e,f=k.useRef(null),h=k.useMemo(()=>({onLoadMore:a,collection:i?.collection,sentinelRef:f,scrollOffset:u}),[a,u,i?.collection]);H6(h,f);let m=Rt({...c,id:void 0,children:r.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),g={tabIndex:-1};return H.createElement(H.Fragment,null,H.createElement("div",{style:{position:"relative",width:0,height:0},inert:K6(!0)},H.createElement("div",{"data-testid":"loadMoreSentinel",ref:f,style:{position:"absolute",height:1,width:1}})),o&&m.children&&H.createElement(H.Fragment,null,H.createElement(at.div,{...we(Je(e,{global:!0}),g),...m,role:"option",ref:n},m.children)))});const pF=k.createContext({placement:"bottom"}),mF=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function s2(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Ru=new WeakMap,Bn=[];function u3(t,e){let n=cn(t?.[0]),r=e instanceof n.Element?{root:e}:e,i=r?.root??document.body,o=r?.shouldUseInert&&mF,a=new Set(t),u=new Set,c=E=>o&&E instanceof n.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",f=(E,D)=>{o&&E instanceof n.HTMLElement?E.inert=D:D?E.setAttribute("aria-hidden","true"):(E.removeAttribute("aria-hidden"),E instanceof n.HTMLElement&&(E.inert=!1))},h=new Set;if(xi())for(let E of t){let D=E;for(;D&&D!==i;){let w=D.getRootNode();"shadowRoot"in w&&h.add(w.shadowRoot),D=w.parentNode}}let m=E=>{for(let T of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))a.add(T);let D=T=>{if(u.has(T)||a.has(T)||T.parentElement&&u.has(T.parentElement)&&T.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let A of a)if($e(T,A))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},w=M6(ze(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:D}),$=D(E);if($===NodeFilter.FILTER_ACCEPT&&g(E),$!==NodeFilter.FILTER_REJECT){let T=w.nextNode();for(;T!=null;)g(T),T=w.nextNode()}},g=E=>{let D=Ru.get(E)??0;c(E)&&D===0||(D===0&&f(E,!0),u.add(E),Ru.set(E,D+1))};Bn.length&&Bn[Bn.length-1].disconnect(),m(i);let b=new MutationObserver(E=>{for(let D of E)if(D.type==="childList"){if(D.target.isConnected&&![...a,...u].some(w=>$e(w,D.target)))for(let w of D.addedNodes)(w instanceof HTMLElement||w instanceof SVGElement)&&s2(w)?a.add(w):w instanceof Element&&m(w);if(xi()){for(let w of h)if(!w.isConnected){b.disconnect();break}}}});b.observe(i,{childList:!0,subtree:!0});let v=new Set;if(xi())for(let E of h){let D=new MutationObserver(w=>{for(let $ of w)if($.type==="childList"){if($.target.isConnected&&![...a,...u].some(T=>$e(T,$.target)))for(let T of $.addedNodes)(T instanceof HTMLElement||T instanceof SVGElement)&&s2(T)?a.add(T):T instanceof Element&&m(T);if(xi()){for(let T of h)if(!T.isConnected){b.disconnect();break}}}});D.observe(E,{childList:!0,subtree:!0}),v.add(D)}let C={visibleNodes:a,hiddenNodes:u,observe(){b.observe(i,{childList:!0,subtree:!0})},disconnect(){b.disconnect()}};return Bn.push(C),()=>{if(b.disconnect(),xi())for(let E of v)E.disconnect();for(let E of u){let D=Ru.get(E);D!=null&&(D===1?(f(E,!1),Ru.delete(E)):Ru.set(E,D-1))}C===Bn[Bn.length-1]?(Bn.pop(),Bn.length&&Bn[Bn.length-1].observe()):Bn.splice(Bn.indexOf(C),1)}}function gF(t){let e=Bn[Bn.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const ur={top:"top",bottom:"top",left:"left",right:"left"},Oh={top:"bottom",bottom:"top",left:"right",right:"left"},bF={top:"left",left:"top"},R0={top:"height",left:"width"},V6={width:"totalWidth",height:"totalHeight"},Rf={};let yF=()=>typeof document<"u"?window.visualViewport:null;function a2(t,e){let n=0,r=0,i=0,o=0,a=0,u=0,c={},f=(e?.scale??1)>1;if(t.tagName==="BODY"||t.tagName==="HTML"){let h=document.documentElement;i=h.clientWidth,o=h.clientHeight,n=e?.width??i,r=e?.height??o,c.top=h.scrollTop||t.scrollTop,c.left=h.scrollLeft||t.scrollLeft,e&&(a=e.offsetTop,u=e.offsetLeft)}else({width:n,height:r,top:a,left:u}=Ac(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,i=n,o=r;return Gy()&&(t.tagName==="BODY"||t.tagName==="HTML")&&f&&(c.top=0,c.left=0,a=e?.pageTop??0,u=e?.pageLeft??0),{width:n,height:r,totalWidth:i,totalHeight:o,scroll:c,top:a,left:u}}function vF(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function l2(t,e,n,r,i,o,a){let u=i.scroll[t]??0,c=r[R0[t]],f=a[t]+r.scroll[ur[t]]+o,h=a[t]+r.scroll[ur[t]]+c-o,m=e-u+r.scroll[ur[t]]+a[t]-r[ur[t]],g=e-u+n+r.scroll[ur[t]]+a[t]-r[ur[t]];return m<f?f-m:g>h?Math.max(h-g,f-m):0}function xF(t){let e=window.getComputedStyle(t);return{top:parseInt(e.marginTop,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0,right:parseInt(e.marginRight,10)||0}}function u2(t){if(Rf[t])return Rf[t];let[e,n]=t.split(" "),r=ur[e]||"right",i=bF[r];ur[n]||(n="center");let o=R0[r],a=R0[i];return Rf[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},Rf[t]}function cb(t,e,n,r,i,o,a,u,c,f,h){let{placement:m,crossPlacement:g,axis:b,crossAxis:v,size:C,crossSize:E}=r,D={};D[v]=t[v]??0,g==="center"?D[v]+=((t[E]??0)-(n[E]??0))/2:g!==v&&(D[v]+=(t[E]??0)-(n[E]??0)),D[v]+=o;const w=t[v]-n[E]+c+f,$=t[v]+t[E]-c-f;if(D[v]=S0(D[v],w,$),m===b){let T=u?h[C]:h[V6[C]];D[Oh[b]]=Math.floor(T-t[b]+i)}else D[b]=Math.floor(t[b]+t[C]+i);return D}function CF(t,e,n,r,i,o,a,u,c,f,h){let m=(t.top!=null?t.top:c[V6.height]-(t.bottom??0)-a)-(c.scroll.top??0),g=f?n.top:0,b={top:Math.max(e.top+g,(h?.offsetTop??e.top)+g),bottom:Math.min(e.top+e.height+g,(h?.offsetTop??0)+(h?.height??0))};return u!=="top"?Math.max(0,b.bottom-m-((i.top??0)+(i.bottom??0)+o)):Math.max(0,m+a-b.top-((i.top??0)+(i.bottom??0)+o))}function c2(t,e,n,r,i,o,a,u){let{placement:c,axis:f,size:h}=o;return c===f?Math.max(0,n[f]-(a.scroll[f]??0)-(t[f]+(u?e[f]:0))-(r[f]??0)-r[Oh[f]]-i):Math.max(0,t[h]+t[f]+(u?e[f]:0)-n[f]-n[h]+(a.scroll[f]??0)-(r[f]??0)-r[Oh[f]]-i)}function EF(t,e,n,r,i,o,a,u,c,f,h,m,g,b,v,C,E,D){let w=u2(t),{size:$,crossAxis:T,crossSize:A,placement:O,crossPlacement:M}=w,P=cb(e,u,n,w,h,m,f,g,v,C,c),I=h,G=c2(u,f,e,i,o+h,w,c,E);if(a&&n[$]>G){let ue=u2(`${Oh[O]} ${M}`),fe=cb(e,u,n,ue,h,m,f,g,v,C,c);c2(u,f,e,i,o+h,ue,c,E)>G&&(w=ue,P=fe,I=h)}let J="bottom";w.axis==="top"?w.placement==="top"?J="top":w.placement==="bottom"&&(J="bottom"):w.crossAxis==="top"&&(w.crossPlacement==="top"?J="bottom":w.crossPlacement==="bottom"&&(J="top"));let U=l2(T,P[T],n[A],u,c,o,f);P[T]+=U;let ie=CF(P,u,f,g,i,o,n.height,J,c,E,D);b&&b<ie&&(ie=b),n.height=Math.min(n.height,ie),P=cb(e,u,n,w,I,m,f,g,v,C,c),U=l2(T,P[T],n[A],u,c,o,f),P[T]+=U;let F={},te=e[T]-P[T]-i[ur[T]],N=te+.5*e[A];const K=v/2+C,Y=ur[T]==="left"?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),Z=n[A]-Y-v/2-C,j=e[T]+v/2-(P[T]+i[ur[T]]),L=e[T]+e[A]-v/2-(P[T]+i[ur[T]]),V=S0(N,j,L);F[T]=S0(V,K,Z),{placement:O,crossPlacement:M}=w,v?te=F[T]:M==="right"?te+=e[A]:M==="center"&&(te+=e[A]/2);let ne=O==="left"||O==="top"?n[$]:0,le={x:O==="top"||O==="bottom"?te:ne,y:O==="left"||O==="right"?te:ne};return{position:P,maxHeight:ie,arrowOffsetLeft:F.left,arrowOffsetTop:F.top,placement:O,triggerAnchorPoint:le}}function DF(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:u,offset:c,crossOffset:f,maxHeight:h,arrowSize:m=0,arrowBoundaryOffset:g=0,targetRect:b}=t,v=yF(),C=r instanceof HTMLElement?kF(r):document.documentElement,E=C===document.documentElement;const D=window.getComputedStyle(C).position;let w=!!D&&D!=="static",$=E?Ac(n,!1,b):d2(n,C,!1,b);if(!E){let{marginTop:J,marginLeft:U}=window.getComputedStyle(n);$.top+=parseInt(J,10)||0,$.left+=parseInt(U,10)||0}let T=Ac(r,!0),A=xF(r);T.width+=(A.left??0)+(A.right??0),T.height+=(A.top??0)+(A.bottom??0);let O=vF(i),M=a2(u,v),P=a2(C,v),I;if((u.tagName==="BODY"||u.tagName==="HTML")&&!E){let J=Zp(C,!1);I={top:-(J.top-M.top),left:-(J.left-M.left),width:0,height:0}}else(u.tagName==="BODY"||u.tagName==="HTML")&&E?I={top:0,left:0,width:0,height:0}:I=d2(u,C,!1);let G=$e(u,C);return EF(e,$,T,O,A,o,a,M,P,I,c,f,w,h,m,g,G,v)}function Zp(t,e){let{top:n,left:r,width:i,height:o}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(i=t.offsetWidth,o=t.offsetHeight),{top:n,left:r,width:i,height:o}}function Ac(t,e,n){let{top:r,left:i,width:o,height:a}=n||Zp(t,e),{scrollTop:u,scrollLeft:c,clientTop:f,clientLeft:h}=document.documentElement;return{top:r+u-f,left:i+c-h,width:o,height:a}}function d2(t,e,n,r){let i=window.getComputedStyle(t),o;if(i.position==="fixed")o=r||Zp(t,n);else{o=Ac(t,n,r);let a=Ac(e,n),u=window.getComputedStyle(e);a.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,a.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,o.top-=a.top,o.left-=a.left}return o.top-=parseInt(i.marginTop,10)||0,o.left-=parseInt(i.marginLeft,10)||0,o}function kF(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!f2(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!f2(e);)e=e.parentElement;return e||document.documentElement}function f2(t){let e=window.getComputedStyle(t);return e.transform!=="none"||/transform|perspective/.test(e.willChange)||e.filter!=="none"||e.contain==="paint"||"backdropFilter"in e&&e.backdropFilter!=="none"||"WebkitBackdropFilter"in e&&e.WebkitBackdropFilter!=="none"}const U6=new WeakMap;function SF(t){let{triggerRef:e,isOpen:n,onClose:r}=t;k.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=de(o);if(!e.current||a instanceof Node&&!$e(a,e.current)||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement)return;let u=r||U6.get(e.current);u&&u()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}function $F(){return typeof window.ResizeObserver<"u"}function P0(t){const{ref:e,box:n,onResize:r}=t;let i=At(r);k.useEffect(()=>{let o=e?.current;if(o)if($F()){const a=new window.ResizeObserver(u=>{u.length&&i()});return a.observe(o,{box:n}),()=>{o&&a.unobserve(o)}}else return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)}},[e,n])}let vs=typeof document<"u"?window.visualViewport:null;function wF(t){let{direction:e}=Mi(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:o,scrollRef:a=i,placement:u="bottom",containerPadding:c=12,shouldFlip:f=!0,boundaryElement:h=typeof document<"u"?document.body:null,offset:m=0,crossOffset:g=0,shouldUpdatePosition:b=!0,isOpen:v=!0,onClose:C,maxHeight:E,arrowBoundaryOffset:D=0,getTargetRect:w}=t,[$,T]=k.useState(null),A=[b,u,i.current,r.current,o?.current,a.current,c,f,h,m,g,v,e,E,D,n],O=k.useRef(vs?.scale);k.useEffect(()=>{v&&(O.current=vs?.scale)},[v]);let M=k.useCallback(()=>{if(b===!1||!v||!i.current||!r.current||!h||vs?.scale!==O.current)return;let G=null;if(a.current&&ml(a.current)){let F=_e()?.getBoundingClientRect(),te=a.current.getBoundingClientRect();G={type:"top",offset:(F?.top??0)-te.top},G.offset>te.height/2&&(G.type="bottom",G.offset=(F?.bottom??0)-te.bottom)}let J=i.current;!E&&i.current&&(J.style.top="0px",J.style.bottom="",J.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let U=DF({placement:AF(u,e),overlayNode:i.current,targetNode:r.current,scrollNode:a.current||i.current,padding:c,shouldFlip:f,boundaryElement:h,offset:m,crossOffset:g,maxHeight:E,arrowSize:n??(o?.current?Zp(o.current,!0).width:0),arrowBoundaryOffset:D,targetRect:w?.(r.current)});if(!U.position)return;J.style.top="",J.style.bottom="",J.style.left="",J.style.right="",Object.keys(U.position).forEach(F=>J.style[F]=U.position[F]+"px"),J.style.maxHeight=U.maxHeight!=null?U.maxHeight+"px":"";let ie=_e();if(G&&ie&&a.current){let F=ie.getBoundingClientRect(),te=a.current.getBoundingClientRect(),N=F[G.type]-te[G.type];a.current.scrollTop+=N-G.offset}T(U)},A);Le(M,A),TF(M),P0({ref:i,onResize:M}),P0({ref:r,onResize:M});let P=k.useRef(!1);Le(()=>{let G,J=()=>{P.current=!0,clearTimeout(G),G=setTimeout(()=>{P.current=!1},500),M()},U=()=>{P.current&&J()};return vs?.addEventListener("resize",J),vs?.addEventListener("scroll",U),()=>{vs?.removeEventListener("resize",J),vs?.removeEventListener("scroll",U)}},[M]);let I=k.useCallback(()=>{P.current||C?.()},[C,P]);return SF({triggerRef:r,isOpen:v,onClose:C&&I}),{overlayProps:{style:{position:$?"absolute":"fixed",top:$?void 0:0,left:$?void 0:0,zIndex:1e5,...$?.position,maxHeight:$?.maxHeight??"100vh"}},placement:$?.placement??null,triggerAnchorPoint:$?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$?.arrowOffsetLeft,top:$?.arrowOffsetTop}},updatePosition:M}}function TF(t){Le(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function AF(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}function BF(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,o=k.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=At(c=>{n&&h2(c,e)&&(i&&i(c),o.current.isPointerDown=!0)}),u=At(c=>{n&&n(c)});k.useEffect(()=>{let c=o.current;if(r)return;const f=e.current,h=ze(f);if(typeof PointerEvent<"u"){let m=g=>{c.isPointerDown&&h2(g,e)&&u(g),c.isPointerDown=!1};return h.addEventListener("pointerdown",a,!0),h.addEventListener("click",m,!0),()=>{h.removeEventListener("pointerdown",a,!0),h.removeEventListener("click",m,!0)}}},[e,r])}function h2(t,e){if(t.button>0)return!1;let n=de(t);if(n){const r=n.ownerDocument;if(!r||!$e(r.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return e.current?!t.composedPath().includes(e.current):!1}const Nr=[];function q6(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:u}=t,c=k.useRef(void 0);k.useEffect(()=>{if(i&&!Nr.includes(e))return Nr.push(e),()=>{let v=Nr.indexOf(e);v>=0&&Nr.splice(v,1)}},[i,e]);let f=()=>{Nr[Nr.length-1]===e&&n&&n()},h=v=>{const C=Nr[Nr.length-1];c.current=C,(!u||u(de(v)))&&C===e&&v.stopPropagation()},m=v=>{(!u||u(de(v)))&&(Nr[Nr.length-1]===e&&v.stopPropagation(),c.current===e&&f()),c.current=void 0},g=v=>{v.key==="Escape"&&!a&&!v.nativeEvent.isComposing&&(v.stopPropagation(),v.preventDefault(),f())};BF({ref:e,onInteractOutside:o&&i?m:void 0,onInteractOutsideStart:h});let{focusWithinProps:b}=e3({isDisabled:!r,onBlurWithin:v=>{!v.relatedTarget||QI(v.relatedTarget)||(!u||u(v.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:g,...b},underlayProps:{}}}const tc=typeof document<"u"&&window.visualViewport;let Pf=0,db;function G6(t={}){let{isDisabled:e}=t;Le(()=>{if(!e)return Pf++,Pf===1&&(Ti()?db=RF():db=MF()),()=>{Pf--,Pf===0&&db()}},[e])}function MF(){let t=window.innerWidth-document.documentElement.clientWidth;return Ko(t>0&&("scrollbarGutter"in document.documentElement.style?uh(document.documentElement,"scrollbarGutter","stable"):uh(document.documentElement,"paddingRight",`${t}px`)),uh(document.documentElement,"overflow","hidden"))}function RF(){let t=uh(document.documentElement,"overflow","hidden"),e,n=!1,r=h=>{let m=de(h);e=Oo(m)?m:Hr(m,!0),n=!1;let g=m.ownerDocument.defaultView.getSelection();g&&!g.isCollapsed&&g.containsNode(m,!0)&&(n=!0),h.composedPath().some(b=>b instanceof HTMLInputElement&&b.type==="range")&&(n=!0),"selectionStart"in m&&"selectionEnd"in m&&m.selectionStart<m.selectionEnd&&m.ownerDocument.activeElement===m&&(n=!0)},i=document.createElement("style"),o=O$();o&&(i.nonce=o),i.textContent=`
|
|
16
|
+
@layer {
|
|
17
|
+
* {
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
}
|
|
20
|
+
}`.trim(),document.head.prepend(i);let a=h=>{if(!(h.touches.length===2||n)){if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()}},u=h=>{let m=de(h),g=h.relatedTarget;g&&ec(g)?(g.focus({preventScroll:!0}),p2(g,ec(m))):g||m.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(h){let m=_e(),g=m!=null&&ec(m);c.call(this,{...h,preventScroll:!0}),(!h||!h.preventScroll)&&p2(this,g)};let f=Ko(fb(document,"touchstart",r,{passive:!1,capture:!0}),fb(document,"touchmove",a,{passive:!1,capture:!0}),fb(document,"blur",u,!0));return()=>{t(),f(),i.remove(),HTMLElement.prototype.focus=c}}function uh(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function fb(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function p2(t,e){e||!tc?m2(t):tc.addEventListener("resize",()=>m2(t),{once:!0})}function m2(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Hr(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect(),o=n.getBoundingClientRect();if(o.top<i.top||o.bottom>i.top+n.clientHeight){let a=i.bottom;tc&&(a=Math.min(a,tc.offsetTop+tc.height));let u=o.top-i.top-((a-i.top)/2-o.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+u)),behavior:"smooth"})}}n=r.parentElement}}function PF(t,e){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:o,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u,...c}=t,f=c.trigger==="SubmenuTrigger",{overlayProps:h,underlayProps:m}=q6({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!o||f,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u},i??r),{overlayProps:g,arrowProps:b,placement:v,triggerAnchorPoint:C}=wF({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:o&&!f?e.close:null});return G6({isDisabled:o||!e.isOpen}),k.useEffect(()=>{if(e.isOpen&&r.current)return o?gF(i?.current??r.current):u3([i?.current??r.current],{shouldUseInert:!0})},[o,e.isOpen,r,i]),{popoverProps:we(h,g),arrowProps:b,underlayProps:m,placement:v,triggerAnchorPoint:C}}var W6={};W6={dismiss:"تجاهل"};var Q6={};Q6={dismiss:"Отхвърляне"};var Y6={};Y6={dismiss:"Odstranit"};var X6={};X6={dismiss:"Luk"};var J6={};J6={dismiss:"Schließen"};var Z6={};Z6={dismiss:"Απόρριψη"};var ew={};ew={dismiss:"Dismiss"};var tw={};tw={dismiss:"Descartar"};var nw={};nw={dismiss:"Lõpeta"};var rw={};rw={dismiss:"Hylkää"};var iw={};iw={dismiss:"Rejeter"};var ow={};ow={dismiss:"התעלם"};var sw={};sw={dismiss:"Odbaci"};var aw={};aw={dismiss:"Elutasítás"};var lw={};lw={dismiss:"Ignora"};var uw={};uw={dismiss:"閉じる"};var cw={};cw={dismiss:"무시"};var dw={};dw={dismiss:"Atmesti"};var fw={};fw={dismiss:"Nerādīt"};var hw={};hw={dismiss:"Lukk"};var pw={};pw={dismiss:"Negeren"};var mw={};mw={dismiss:"Zignoruj"};var gw={};gw={dismiss:"Descartar"};var bw={};bw={dismiss:"Dispensar"};var yw={};yw={dismiss:"Revocare"};var vw={};vw={dismiss:"Пропустить"};var xw={};xw={dismiss:"Zrušiť"};var Cw={};Cw={dismiss:"Opusti"};var Ew={};Ew={dismiss:"Odbaci"};var Dw={};Dw={dismiss:"Avvisa"};var kw={};kw={dismiss:"Kapat"};var Sw={};Sw={dismiss:"Скасувати"};var $w={};$w={dismiss:"取消"};var ww={};ww={dismiss:"關閉"};var Tw={};Tw={"ar-AE":W6,"bg-BG":Q6,"cs-CZ":Y6,"da-DK":X6,"de-DE":J6,"el-GR":Z6,"en-US":ew,"es-ES":tw,"et-EE":nw,"fi-FI":rw,"fr-FR":iw,"he-IL":ow,"hr-HR":sw,"hu-HU":aw,"it-IT":lw,"ja-JP":uw,"ko-KR":cw,"lt-LT":dw,"lv-LV":fw,"nb-NO":hw,"nl-NL":pw,"pl-PL":mw,"pt-BR":gw,"pt-PT":bw,"ro-RO":yw,"ru-RU":vw,"sk-SK":xw,"sl-SI":Cw,"sr-SP":Ew,"sv-SE":Dw,"tr-TR":kw,"uk-UA":Sw,"zh-CN":$w,"zh-TW":ww};function OF(t){return t&&t.__esModule?t.default:t}function O0(t){let{onDismiss:e,...n}=t,r=pr(OF(Tw),"@react-aria/overlays"),i=Qy(n,r.format("dismiss")),o=()=>{e&&e()};return H.createElement(vI,null,H.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}const Aw=H.forwardRef(({children:t,...e},n)=>{let r=k.useRef(!1),i=k.useContext(wc),o=we(i||{},{...e,register(){r.current=!0,i&&i.register()}});return o.ref=jo(n||i?.ref),Yy(i,o.ref),k.useEffect(()=>{r.current||(r.current=!0)},[]),H.createElement(wc.Provider,{value:o},t)});function NF({children:t}){let e=k.useMemo(()=>({register:()=>{}}),[]);return H.createElement(wc.Provider,{value:e},t)}const LF=k.createContext({});function zF(){return k.useContext(LF)??{}}const Bw=H.createContext(null);function N0(t){let e=_o(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,o]=k.useState(!1),a=k.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:u}=zF();if(!t.portalContainer&&u&&(n=u()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=H.createElement(o3,{restoreFocus:!0,contain:(t.shouldContainFocus||i)&&!r},c)),c=H.createElement(Bw.Provider,{value:a},H.createElement(NF,null,c)),dS.createPortal(c,n)}function Mw(){let e=k.useContext(Bw)?.setContain;Le(()=>{e?.(!0)},[e])}function c3(t){let[e,n]=Ho(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=k.useCallback(()=>{n(!0)},[n]),i=k.useCallback(()=>{n(!1)},[n]),o=k.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:o}}function d3(t,e=!0){let[n,r]=k.useState(!0),i=n&&e;return Le(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Rw(t,i,k.useCallback(()=>r(!1),[])),i}function L0(t,e){let[n,r]=k.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Rw(t,i,k.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Rw(t,e,n){Le(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.allSettled(r.map(o=>o.finished)).then(()=>{i||$l.flushSync(()=>{n()})}),()=>{i=!0}}},[t,e,n])}const f3=k.createContext(null),g2=k.createContext(null),h3=k.forwardRef(function(e,n){[e,n]=Ct(e,n,f3);let r=k.useContext(ia),i=c3(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=L0(n,o.isOpen)||e.isExiting||!1,u=A$(),{direction:c}=Mi();if(u){let f=e.children;return typeof f=="function"&&(f=f({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),H.createElement(H.Fragment,null,f)}return o&&!o.isOpen&&!a?null:H.createElement(IF,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:a,dir:c})});function IF({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let o=k.useRef(null),a=k.useRef(null),u=k.useContext(g2),c=u&&i.trigger==="SubmenuTrigger",{popoverProps:f,underlayProps:h,arrowProps:m,placement:g,triggerAnchorPoint:b}=PF({...i,offset:i.offset??8,arrowRef:o,groupRef:c?u:a},t),v=i.popoverRef,C=d3(v,!!g)||i.isEntering||!1,E=Rt({...i,defaultClassName:"react-aria-Popover",values:{trigger:i.trigger||null,placement:g,isEntering:C,isExiting:e}}),D=!i.isNonModal||i.trigger==="SubmenuTrigger",[w,$]=k.useState(!1);Le(()=>{v.current&&$(D&&!v.current.querySelector("[role=dialog]"))},[v,D]),k.useEffect(()=>{w&&(i.trigger!=="SubmenuTrigger"||Qs()!=="pointer")&&v.current&&!ml(v.current)&&mn(v.current)},[w,v,i.trigger]);let T=k.useMemo(()=>{let G=E.children;if(r)for(let J of r)G=H.createElement(J.Provider,{value:null},G);return G},[E.children,r]),[A,O]=k.useState(null),M=k.useCallback(()=>{i.triggerRef.current&&O(i.triggerRef.current.getBoundingClientRect().width+"px")},[i.triggerRef]);Le(M,[M]),P0({ref:E.style?.["--trigger-width"]?void 0:i.triggerRef,onResize:M});let P={...f.style,"--trigger-anchor-point":b?`${b.x}px ${b.y}px`:void 0,...E.style,"--trigger-width":E.style?.["--trigger-width"]||A},I=H.createElement(at.div,{...we(Je(i,{global:!0}),f),...E,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],ref:v,slot:i.slot||void 0,style:P,dir:i.dir,"data-trigger":i.trigger,"data-placement":g,"data-entering":C||void 0,"data-exiting":e||void 0},!i.isNonModal&&H.createElement(O0,{onDismiss:t.close}),H.createElement(pF.Provider,{value:{...m,placement:g,ref:o}},T),H.createElement(O0,{onDismiss:t.close}));return c?H.createElement(N0,{...i,shouldContainFocus:w,isExiting:e,portalContainer:n??u?.current??void 0},I):H.createElement(N0,{...i,shouldContainFocus:w,isExiting:e,portalContainer:n},!i.isNonModal&&t.isOpen&&H.createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),H.createElement("div",{ref:a,style:{display:"contents"}},H.createElement(g2.Provider,{value:a},I)))}const FF=k.createContext({});var Pw={};Pw={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Ow={};Ow={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Nw={};Nw={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Lw={};Lw={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var zw={};zw={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Iw={};Iw={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var Fw={};Fw={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Kw={};Kw={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var _w={};_w={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var jw={};jw={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Hw={};Hw={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Vw={};Vw={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Uw={};Uw={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var qw={};qw={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Gw={};Gw={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var Ww={};Ww={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var Qw={};Qw={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Yw={};Yw={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Xw={};Xw={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Jw={};Jw={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Zw={};Zw={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var eT={};eT={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var tT={};tT={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var nT={};nT={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var rT={};rT={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var iT={};iT={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var oT={};oT={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var sT={};sT={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var aT={};aT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var lT={};lT={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var uT={};uT={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var cT={};cT={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var dT={};dT={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var fT={};fT={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var hT={};hT={"ar-AE":Pw,"bg-BG":Ow,"cs-CZ":Nw,"da-DK":Lw,"de-DE":zw,"el-GR":Iw,"en-US":Fw,"es-ES":Kw,"et-EE":_w,"fi-FI":jw,"fr-FR":Hw,"he-IL":Vw,"hr-HR":Uw,"hu-HU":qw,"it-IT":Gw,"ja-JP":Ww,"ko-KR":Qw,"lt-LT":Yw,"lv-LV":Xw,"nb-NO":Jw,"nl-NL":Zw,"pl-PL":eT,"pt-BR":tT,"pt-PT":nT,"ro-RO":rT,"ru-RU":iT,"sk-SK":oT,"sl-SI":sT,"sr-SP":aT,"sv-SE":lT,"tr-TR":uT,"uk-UA":cT,"zh-CN":dT,"zh-TW":fT};function pT(t,e,n){let{type:r}=t,{isOpen:i}=e;k.useEffect(()=>{n&&n.current&&U6.set(n.current,e.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let a=nn();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?a:void 0,onPress:e.toggle},overlayProps:{id:a}}}function KF(t){return t&&t.__esModule?t.default:t}function _F(t,e,n){let{type:r="menu",isDisabled:i,trigger:o="press"}=t,a=nn(),{triggerProps:u,overlayProps:c}=pT({type:r},e,n),f=b=>{if(!i&&!(o==="longPress"&&!b.altKey)&&n&&n.current)switch(b.key){case"Enter":case" ":if(o==="longPress"||b.isDefaultPrevented())return;case"ArrowDown":"continuePropagation"in b||b.stopPropagation(),b.preventDefault(),e.toggle("first");break;case"ArrowUp":"continuePropagation"in b||b.stopPropagation(),b.preventDefault(),e.toggle("last");break;default:"continuePropagation"in b&&b.continuePropagation()}},h=pr(KF(hT),"@react-aria/menu"),{longPressProps:m}=z6({isDisabled:i||o!=="longPress",accessibilityDescription:h.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),g={preventFocusOnPress:!0,onPressStart(b){b.pointerType!=="touch"&&b.pointerType!=="keyboard"&&!i&&(Tr(b.target),e.open(b.pointerType==="virtual"?"first":null))},onPress(b){b.pointerType==="touch"&&!i&&(Tr(b.target),e.toggle())}};return delete u.onPress,{menuTriggerProps:{...u,...o==="press"?g:m,id:a,onKeyDown:f},menuProps:{...c,"aria-labelledby":a,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const mT=new WeakMap;function jF(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=t;!t["aria-label"]&&t["aria-labelledby"];let u=Je(t,{labelable:!0}),{listProps:c}=L6({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return mT.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:we(u,{onKeyDown:i,onKeyUp:o},{role:"menu",...c,onKeyDown:f=>{(f.key!=="Escape"||t.shouldUseVirtualFocus)&&c.onKeyDown?.(f)}})}}function HF(t,e,n){let{id:r,key:i,closeOnSelect:o,shouldCloseOnSelect:a,isVirtualized:u,"aria-haspopup":c,onPressStart:f,onPressUp:h,onPress:m,onPressChange:g,onPressEnd:b,onClick:v,onHoverStart:C,onHoverChange:E,onHoverEnd:D,onKeyDown:w,onKeyUp:$,onFocus:T,onFocusChange:A,onBlur:O,selectionManager:M=e.selectionManager}=t,P=!!c,I=P&&t["aria-expanded"]==="true",G=t.isDisabled??M.isDisabled(i),J=t.isSelected??M.isSelected(i),U=mT.get(e),ie=e.collection.getItem(i),F=t.onClose||U.onClose,te=Tl(),N=()=>{if(!P&&(ie?.props?.onAction?ie.props.onAction():t.onAction&&t.onAction(i),U.onAction)){let Ie=U.onAction;Ie(i,ie?.value)}},K="menuitem";P||(M.selectionMode==="single"?K="menuitemradio":M.selectionMode==="multiple"&&(K="menuitemcheckbox"));let Y=Ks(),Z=Ks(),j=Ks(),L={id:r,"aria-disabled":G||void 0,role:K,"aria-label":t["aria-label"],"aria-labelledby":Y,"aria-describedby":[t["aria-describedby"],Z,j].filter(Boolean).join(" ")||void 0,"aria-controls":t["aria-controls"],"aria-haspopup":c,"aria-expanded":t["aria-expanded"]};if(M.selectionMode!=="none"&&!P&&(L["aria-checked"]=J),u){let Ie=Number(ie?.index);L["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,L["aria-setsize"]=lF(e.collection)}let V=k.useRef(!1),ne=Ie=>{g?.(Ie),V.current=Ie},le=k.useRef(null),ue=Ie=>{Ie.pointerType!=="keyboard"&&(le.current={pointerType:Ie.pointerType}),Ie.pointerType==="mouse"&&(V.current||Ie.target.click()),h?.(Ie)},fe=Ie=>{v?.(Ie),N(),PS(Ie,te,ie.props.href,ie?.props.routerOptions);let Oi=le.current?.pointerType==="keyboard"?le.current?.key==="Enter"||M.selectionMode==="none"||M.isLink(i):M.selectionMode!=="multiple"||M.isLink(i);Oi=a??o??Oi,F&&!P&&Oi&&F(),le.current=null},{itemProps:Ee,isFocused:Ve}=I6({id:r,selectionManager:M,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:U.shouldUseVirtualFocus}),{pressProps:Se,isPressed:En}=Gc({onPressStart:f,onPress:m,onPressUp:ue,onPressChange:ne,onPressEnd:b,isDisabled:G}),{hoverProps:rn}=Vo({isDisabled:G,onHoverStart(Ie){!gl()&&!(I&&c)&&(M.setFocused(!0),M.setFocusedKey(i)),C?.(Ie)},onHoverChange:E,onHoverEnd:D}),{keyboardProps:hn}=T$({onKeyDown:Ie=>{if(Ie.repeat){Ie.continuePropagation();return}switch(Ie.key){case" ":le.current={pointerType:"keyboard",key:" "},de(Ie).click(),Ts("keyboard");break;case"Enter":le.current={pointerType:"keyboard",key:"Enter"},de(Ie).tagName!=="A"&&de(Ie).click(),Ts("keyboard");break;default:P||Ie.continuePropagation(),w?.(Ie);break}},onKeyUp:$}),{focusableProps:mr}=Gp({onBlur:O,onFocus:T,onFocusChange:A},n),Ft=Je(ie?.props);delete Ft.id;let Yo=RS(ie?.props);return{menuItemProps:{...L,...we(Ft,Yo,P?{onFocus:Ee.onFocus,"data-collection":Ee["data-collection"],"data-key":Ee["data-key"]}:Ee,Se,rn,hn,mr,U.shouldUseVirtualFocus||P?{onMouseDown:Ie=>Ie.preventDefault()}:void 0,G?void 0:{onClick:fe}),tabIndex:Ee.tabIndex!=null&&I&&!U.shouldUseVirtualFocus?-1:Ee.tabIndex},labelProps:{id:Y},descriptionProps:{id:Z},keyboardShortcutProps:{id:j},isFocused:Ve,isFocusVisible:Ve&&M.isFocused&&gl()&&!I,isSelected:J,isPressed:En,isDisabled:G}}function VF(t){let{heading:e,"aria-label":n}=t,r=nn();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function p3(t){let e=c3(t),[n,r]=k.useState(null),[i,o]=k.useState([]),a=()=>{o([]),e.close()};return{focusStrategy:n,...e,open(f=null){r(f),e.open()},toggle(f=null){r(f),e.toggle()},close(){a()},expandedKeysStack:i,openSubmenu:(f,h)=>{o(m=>h>m.length?m:[...m.slice(0,h),f])},closeSubmenu:(f,h)=>{o(m=>m[h]===f?m.slice(0,h):m)}}}class UF{constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&(a.type==="section"||n.has(a.key)))for(let u of a.childNodes)r(u)};for(let a of e)r(a);let i=null,o=0;for(let[a,u]of this.keyMap)i?(i.nextKey=a,u.prevKey=i.key):(this.firstKey=a,u.prevKey=void 0),u.type==="item"&&(u.index=o++),i=u,i.nextKey=void 0;this.lastKey=i?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey??null:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}function qF(t){let{onExpandedChange:e}=t,[n,r]=Ho(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=l3(t),o=k.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=_6(t,k.useCallback(c=>new UF(c,{expandedKeys:n}),[n]),null);return k.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:c=>{r(GF(n,c))},setExpandedKeys:r,selectionManager:new Qc(a,i)}}function GF(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const gT=k.createContext(null),m3=k.createContext(null),Nh=k.createContext(null),Lh=k.createContext(null);function bT(t){let e=p3(t),n=k.useRef(null),{menuTriggerProps:r,menuProps:i}=_F({...t,type:"menu"},e,n),o=k.useRef(null);return A$()?null:H.createElement(Ar,{values:[[gT,{...i,ref:o}],[ia,e],[Nh,e],[f3,{trigger:"MenuTrigger",triggerRef:n,scrollRef:o,placement:"bottom start","aria-labelledby":i["aria-labelledby"]}]]},H.createElement(Aw,{...r,ref:n,isPressed:e.isOpen},t.children))}const WF=k.createContext(null),N1=class N1 extends na{filter(e,n,r){let i=e.getItem(this.firstChildKey);if(i&&r(i.textValue,this)){let o=this.clone();return n.addDescendants(o,e),o}return null}};N1.type="submenutrigger";let b2=N1;const yT=k.forwardRef(function(e,n){return[e,n]=Ct(e,n,gT),H.createElement(Jy,{content:H.createElement(Qp,e)},r=>H.createElement(QF,{props:e,collection:r,menuRef:n}))});function QF({props:t,collection:e,menuRef:n}){[t,n]=Ct(t,n,Sc);let{filter:r,...i}=t,o=k.useMemo(()=>r?e.filter(r):e,[e,r]),a=qF({...t,collection:o,children:void 0}),u=k.useContext(Nh),{isVirtualized:c,CollectionRoot:f}=k.useContext(Ro),{menuProps:h}=jF({...t,isVirtualized:c,onClose:t.onClose||u?.close},a,n),m=Rt({...t,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:a.collection.size===0}}),g=null;a.collection.size===0&&t.renderEmptyState&&(g=H.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState()));let b=Je(t,{global:!0});return H.createElement(o3,null,H.createElement(at.div,{...we(b,m,h),ref:n,slot:t.slot||void 0,"data-empty":a.collection.size===0||void 0,onScroll:t.onScroll},H.createElement(Ar,{values:[[m3,a],[B6,{elementType:"div"}],[Vz,{name:"MenuSection",render:vT}],[WF,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[Bc,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[Sc,null],[qp,null],[Lh,a.selectionManager],[Nh,u??p3({})]]},H.createElement(r3,null,H.createElement(f,{collection:a.collection,persistedKeys:qz(a.selectionManager.focusedKey),scrollRef:n}))),g))}class YF extends Qc{constructor(e,n){super(e.collection,n),this.parent=e}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}}function vT(t,e,n,r="react-aria-MenuSection"){let i=k.useContext(m3),{CollectionBranch:o}=k.useContext(Ro),[a,u]=xS(),{headingProps:c,groupProps:f}=VF({heading:u,"aria-label":n.props["aria-label"]??void 0}),h=Rt({...t,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),m=k.useContext(Lh),g=l3(t),b=t.selectionMode!=null?new YF(m,g):m,v=wl(Bc)?.shouldCloseOnSelect,C=Je(t,{global:!0});return delete C.id,H.createElement(at.section,{...we(C,h,f),ref:e},H.createElement(Ar,{values:[[A6,{...c,ref:a}],[Lh,b],[Bc,{shouldCloseOnSelect:t.shouldCloseOnSelect??v}]]},H.createElement(o,{collection:i.collection,parent:n})))}const XF=jz(b0,vT),Bc=k.createContext(null),xT=ra(Mh,function(e,n,r){[e,n]=Ct(e,n,Bc);let i=wl(Bc)?.id,o=k.useContext(m3),a=jo(n),u=k.useContext(Lh),{isVirtualized:c}=k.useContext(Ro),{menuItemProps:f,labelProps:h,descriptionProps:m,keyboardShortcutProps:g,...b}=HF({...e,id:i,key:r.key,selectionManager:u,isVirtualized:c},o,a),{hoverProps:v,isHovered:C}=Vo({isDisabled:b.isDisabled}),E=Rt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...b,isHovered:C,isFocusVisible:b.isFocusVisible,selectionMode:u.selectionMode,selectionBehavior:u.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),D=e.href?at.a:at.div,w=Je(e,{global:!0});return delete w.id,delete w.onClick,H.createElement(D,{...we(w,E,f,v),ref:a,"data-disabled":b.isDisabled||void 0,"data-hovered":C||void 0,"data-focused":b.isFocused||void 0,"data-focus-visible":b.isFocusVisible||void 0,"data-pressed":b.isPressed||void 0,"data-selected":b.isSelected||void 0,"data-selection-mode":u.selectionMode==="none"?void 0:u.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},H.createElement(Ar,{values:[[n3,{slots:{[vo]:h,label:h,description:m}}],[FF,g],[i3,{isSelected:b.isSelected}]]},E.children))});function JF(t,e){let{role:n="dialog"}=t,r=Ks();r=t["aria-label"]?void 0:r;let i=k.useRef(!1);return k.useEffect(()=>{if(e.current&&!ml(e.current)){mn(e.current);let o=setTimeout(()=>{(_e()===e.current||_e()===document.body)&&(i.current=!0,e.current&&(e.current.blur(),mn(e.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[e]),Mw(),k.useRef(!1),k.useEffect(()=>{}),{dialogProps:{...Je(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}},titleProps:{id:r}}}const CT=k.createContext(null),ia=k.createContext(null);function ZF(t){let e=p3(t),n=k.useRef(null),{triggerProps:r,overlayProps:i}=pT({type:"dialog"},e,n);return r.id=nn(),i["aria-labelledby"]=r.id,H.createElement(Ar,{values:[[ia,e],[Nh,e],[CT,i],[f3,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"]}]]},H.createElement(Aw,{...r,ref:n,isPressed:e.isOpen},t.children))}const eK=k.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Ct(e,n,CT);let{dialogProps:i,titleProps:o}=JF({...e,"aria-labelledby":r},n),a=k.useContext(ia);!i["aria-label"]&&!i["aria-labelledby"]&&e["aria-labelledby"]&&(i["aria-labelledby"]=e["aria-labelledby"]);let u=Rt({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),c=Je(e,{global:!0});return H.createElement(at.section,{...we(c,u,i),render:e.render,ref:n,slot:e.slot||void 0},H.createElement(Ar,{values:[[C6,{slots:{[vo]:{},title:{...o,level:2}}}],[Yp,{slots:{[vo]:{},close:{onPress:()=>a?.close()}}}]]},u.children))});function tK(t){let e=a3({usage:"search",...t}),n=k.useCallback((o,a)=>a.length===0?!0:(o=o.normalize("NFC"),a=a.normalize("NFC"),e.compare(o.slice(0,a.length),a)===0),[e]),r=k.useCallback((o,a)=>a.length===0?!0:(o=o.normalize("NFC"),a=a.normalize("NFC"),e.compare(o.slice(-a.length),a)===0),[e]),i=k.useCallback((o,a)=>{if(a.length===0)return!0;o=o.normalize("NFC"),a=a.normalize("NFC");let u=0,c=a.length;for(;u+c<=o.length;u++){let f=o.slice(u,u+c);if(e.compare(a,f)===0)return!0}return!1},[e]);return k.useMemo(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}var wt=(function(t){return t[t.none=0]="none",t[t.cancel=0]="cancel",t[t.move=1]="move",t[t.copy=2]="copy",t[t.link=4]="link",t[t.all=7]="all",t})({});const ET={...wt,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},DT=kT(ET);DT[7]="all";const nc={none:"cancel",link:"link",copy:"copy",move:"move"},hb=kT(nc);function kT(t){let e={};for(let n in t)e[t[n]]=n;return e}const nK=new Set(["text/plain","text/uri-list","text/html"]),zh="application/vnd.react-aria.items+json",Ih="application/octet-stream",g3=new WeakMap,ST=Symbol();function rK(t){let{id:e}=g3.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function iK(t){let{ref:e}=g3.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function js(t){let e=new Set;for(let n of t)for(let r of Object.keys(n))e.add(r);return e}function $T(t){return t||(t="virtual"),t==="pointer"&&(t="virtual"),t==="virtual"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(pointer: coarse)").matches&&(t="touch"),t}function b3(){return $T(IS())}function wT(){return $T(Qs())}function oK(t,e){let n=new Map,r=!1,i=[];for(let o of e){let a=Object.keys(o);a.length>1&&(r=!0);let u={};for(let c of a){let f=n.get(c);f?r=!0:(f=[],n.set(c,f));let h=o[c];u[c]=h,f.push(h)}i.push(u)}for(let[o,a]of n)if(nK.has(o)){let u=a.join(`
|
|
21
|
+
`);t.items.add(u,o)}else t.items.add(a[0],o);if(r){let o=JSON.stringify(i);t.items.add(o,zh)}}class Of{constructor(e){this.types=new Set;let n=!1;for(let r of e.items)r.type!==zh&&(r.kind==="file"&&(n=!0),r.type?this.types.add(r.type):this.types.add(Ih));this.includesUnknownTypes=!n&&e.types.includes("Files")}has(e){if(Array.isArray(e))return e.some(n=>this.has(n));if(this.includesUnknownTypes||e===ST&&this.types.has(Ih)||e==="*/*")return!0;if(typeof e=="string"){if(e.endsWith("/*")){for(let n of this.types)if(n.startsWith(e.slice(0,-2)))return!0;return!1}return this.types.has(e)}return!1}}function sK(t){let e=[];if(!t)return e;let n=!1;if(t.types.includes(zh))try{let r=t.getData(zh),i=JSON.parse(r);for(let o of i)e.push({kind:"text",types:new Set(Object.keys(o)),getText:a=>Promise.resolve(o[a])});n=!0}catch{}if(!n){let r=new Map;for(let i of t.items)if(i.kind==="string")r.set(i.type||Ih,t.getData(i.type));else if(i.kind==="file")if(typeof i.webkitGetAsEntry=="function"){let o=i.webkitGetAsEntry();if(!o)continue;o.isFile?e.push(z0(i.getAsFile())):o.isDirectory&&e.push(TT(o))}else e.push(z0(i.getAsFile()));r.size>0&&e.push({kind:"text",types:new Set(r.keys()),getText:i=>Promise.resolve(r.get(i))})}return e}function aK(t){return typeof t.text=="function"?t.text():new Promise((e,n)=>{let r=new FileReader;r.onload=()=>{e(r.result)},r.onerror=n,r.readAsText(t)})}function z0(t){if(!t)throw new Error("No file provided");return{kind:"file",type:t.type||Ih,name:t.name,getText:()=>aK(t),getFile:()=>Promise.resolve(t)}}function TT(t){return{kind:"directory",name:t.name,getEntries:()=>lK(t)}}async function*lK(t){let e=t.createReader(),n;do{n=await new Promise((r,i)=>{e.readEntries(r,i)});for(let r of n)if(r.isFile){let i=await uK(r);yield z0(i)}else r.isDirectory&&(yield TT(r))}while(n.length>0)}function uK(t){return new Promise((e,n)=>t.file(e,n))}let Nt={draggingKeys:new Set};function cK(t){Nt.draggingCollectionRef=t}function dK(t){Nt.draggingKeys=t}function Ja(t){Nt.dropCollectionRef=t}function AT(){Nt={draggingKeys:new Set}}function fK(t){Nt=t}function jr(t){let{draggingCollectionRef:e,dropCollectionRef:n}=Nt;return e?.current!=null&&e.current===(t?.current||n?.current)}let ch;function Fh(t){ch=t}let I0=wt.none;function pb(t){I0=t}let F0=new Map,rc=new Map,kr=null,Kh=new Set;function BT(t){return F0.set(t.element,t),kr?.updateValidDropTargets(),()=>{F0.delete(t.element),kr?.updateValidDropTargets()}}function hK(t){return rc.set(t.element,t),()=>{rc.delete(t.element)}}function pK(t,e){if(kr)throw new Error("Cannot begin dragging while already dragging");kr=new vK(t,e),requestAnimationFrame(()=>{kr&&(kr.setup(),wT()==="keyboard"&&kr.next())});for(let n of Kh)n()}function y3(){let[t,e]=k.useState(kr);return k.useEffect(()=>{let n=()=>e(kr);return Kh.add(n),()=>{Kh.delete(n)}},[]),t}function mK(){return!!kr}function gK(){kr=null;for(let t of Kh)t()}const y2=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],bK=["pointerup","mouseup","touchend"],yK={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class vK{constructor(e,n){this.validDropTargets=[],this.currentDropTarget=null,this.currentDropItem=null,this.dropOperation=null,this.mutationObserver=null,this.restoreAriaHidden=null,this.isVirtualClick=!1,this.dragTarget=e,this.stringFormatter=n,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}setup(){document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keyup",this.onKeyUp,!0),window.addEventListener("focus",this.onFocus,!0),window.addEventListener("blur",this.onBlur,!0),document.addEventListener("click",this.onClick,!0),document.addEventListener("pointerdown",this.onPointerDown,!0);for(let e of y2)document.addEventListener(e,this.cancelEvent,!0);this.mutationObserver=new MutationObserver(()=>this.updateValidDropTargets()),this.updateValidDropTargets(),As(this.stringFormatter.format(yK[wT()]))}teardown(){document.removeEventListener("keydown",this.onKeyDown,!0),document.removeEventListener("keyup",this.onKeyUp,!0),window.removeEventListener("focus",this.onFocus,!0),window.removeEventListener("blur",this.onBlur,!0),document.removeEventListener("click",this.onClick,!0),document.removeEventListener("pointerdown",this.onPointerDown,!0);for(let e of y2)document.removeEventListener(e,this.cancelEvent,!0);this.mutationObserver?.disconnect(),this.restoreAriaHidden?.()}onKeyDown(e){if(this.cancelEvent(e),e.key==="Escape"){this.cancel();return}e.key==="Tab"&&!(e.metaKey||e.altKey||e.ctrlKey)&&(e.shiftKey?this.previous():this.next()),typeof this.currentDropTarget?.onKeyDown=="function"&&this.currentDropTarget.onKeyDown(e,this.dragTarget)}onKeyUp(e){this.cancelEvent(e),e.key==="Enter"&&(e.altKey||$e(this.getCurrentActivateButton(),de(e))?this.activate(this.currentDropTarget,this.currentDropItem):this.drop())}getCurrentActivateButton(){return this.currentDropItem?.activateButtonRef?.current??this.currentDropTarget?.activateButtonRef?.current??null}onFocus(e){let n=this.getCurrentActivateButton(),r=de(e);if(r===n){this.cancelEvent(e);return}if(r!==this.dragTarget.element&&this.cancelEvent(e),!(r instanceof HTMLElement)||r===this.dragTarget.element)return;let i=this.validDropTargets.find(a=>a.element===r)||this.validDropTargets.find(a=>$e(a.element,r));if(!i){this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus();return}let o=rc.get(r);i&&this.setCurrentDropTarget(i,o)}onBlur(e){let n=this.getCurrentActivateButton();if(n&&e.relatedTarget===n){this.cancelEvent(e);return}de(e)!==this.dragTarget.element&&this.cancelEvent(e),(!e.relatedTarget||!(e.relatedTarget instanceof HTMLElement))&&(this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus())}onClick(e){if(this.cancelEvent(e),Hp(e)||this.isVirtualClick){let n=rc.values(),r=de(e),i=[...n].find(u=>u.element===r||$e(u.activateButtonRef?.current,r)),o=this.validDropTargets.find(u=>$e(u.element,r)),a=i?.activateButtonRef?.current??o?.activateButtonRef?.current;if($e(a,r)&&o){this.activate(o,i);return}if(de(e)===this.dragTarget.element){this.cancel();return}o&&(this.setCurrentDropTarget(o,i),this.drop(i))}}onPointerDown(e){this.cancelEvent(e),this.isVirtualClick=Wy(e)}cancelEvent(e){let n=de(e);(e.type==="focusin"||e.type==="focusout")&&(n===this.dragTarget?.element||n===this.getCurrentActivateButton())||(bK.includes(e.type)||e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}updateValidDropTargets(){if(!this.mutationObserver)return;if(this.mutationObserver.disconnect(),this.restoreAriaHidden&&this.restoreAriaHidden(),this.validDropTargets=xK(this.dragTarget),this.validDropTargets.length>0){let i=this.findNearestDropTarget();this.validDropTargets=[...this.validDropTargets.slice(i),...this.validDropTargets.slice(0,i)]}this.currentDropTarget&&!this.validDropTargets.includes(this.currentDropTarget)&&this.setCurrentDropTarget(this.validDropTargets[0]);let e=js(this.dragTarget.items),n=[...rc.values()].filter(i=>typeof i.getDropOperation=="function"?i.getDropOperation(e,this.dragTarget.allowedDropOperations)!=="cancel":!0),r=this.validDropTargets.filter(i=>!n.some(o=>$e(i.element,o.element)));this.restoreAriaHidden=u3([this.dragTarget.element,...n.flatMap(i=>i.activateButtonRef?.current?[i.element,i.activateButtonRef?.current]:[i.element]),...r.flatMap(i=>i.activateButtonRef?.current?[i.element,i.activateButtonRef?.current]:[i.element])],{shouldUseInert:!0}),this.mutationObserver.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:["aria-hidden","inert"]})}next(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[0]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[0]);return}e===this.validDropTargets.length-1?this.dragTarget.element.closest('[aria-hidden="true"], [inert]')?this.setCurrentDropTarget(this.validDropTargets[0]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e+1])}previous(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}e===0?this.dragTarget.element.closest('[aria-hidden="true"], [inert]')?this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e-1])}findNearestDropTarget(){let e=this.dragTarget.element.getBoundingClientRect(),n=1/0,r=-1;for(let i=0;i<this.validDropTargets.length;i++){let a=this.validDropTargets[i].element.getBoundingClientRect(),u=a.left-e.left,c=a.top-e.top,f=u*u+c*c;f<n&&(n=f,r=i)}return r}setCurrentDropTarget(e,n){if(e!==this.currentDropTarget){if(this.currentDropTarget&&typeof this.currentDropTarget.onDropExit=="function"){let r=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDropExit({type:"dropexit",x:r.left+r.width/2,y:r.top+r.height/2})}if(this.currentDropTarget=e,e){if(typeof e.onDropEnter=="function"){let r=e.element.getBoundingClientRect();e.onDropEnter({type:"dropenter",x:r.left+r.width/2,y:r.top+r.height/2},this.dragTarget)}n||e?.element.focus()}}if(n!=null&&n!==this.currentDropItem&&(this.currentDropTarget&&typeof this.currentDropTarget.onDropTargetEnter=="function"&&this.currentDropTarget.onDropTargetEnter(n.target),n.element.focus(),this.currentDropItem=n,!this.initialFocused)){let r=n?.element.getAttribute("aria-label");r&&As(r,"polite"),this.initialFocused=!0}}end(){if(this.teardown(),gK(),typeof this.dragTarget.onDragEnd=="function"){let n=(this.currentDropTarget&&this.dropOperation!=="cancel"?this.currentDropTarget:this.dragTarget).element.getBoundingClientRect();this.dragTarget.onDragEnd({type:"dragend",x:n.x+n.width/2,y:n.y+n.height/2,dropOperation:this.dropOperation||"cancel"})}this.currentDropTarget&&!this.currentDropTarget.preventFocusOnDrop&&_e()?.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),this.setCurrentDropTarget(null)}cancel(){this.setCurrentDropTarget(null),this.end(),this.dragTarget.element.closest('[aria-hidden="true"], [inert]')||this.dragTarget.element.focus(),_e()?.dispatchEvent(new FocusEvent("focusin",{bubbles:!0})),As(this.stringFormatter.format("dropCanceled"))}drop(e){if(!this.currentDropTarget){this.cancel();return}if(typeof e?.getDropOperation=="function"){let n=js(this.dragTarget.items);this.dropOperation=e.getDropOperation(n,this.dragTarget.allowedDropOperations)}else if(typeof this.currentDropTarget.getDropOperation=="function"){let n=js(this.dragTarget.items);this.dropOperation=this.currentDropTarget.getDropOperation(n,this.dragTarget.allowedDropOperations)}else this.dropOperation=this.dragTarget.allowedDropOperations[0];if(typeof this.currentDropTarget.onDrop=="function"){let n=this.dragTarget.items.map(i=>({kind:"text",types:new Set(Object.keys(i)),getText:o=>Promise.resolve(i[o])})),r=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDrop({type:"drop",x:r.left+r.width/2,y:r.top+r.height/2,items:n,dropOperation:this.dropOperation},e?.target??null)}this.end(),As(this.stringFormatter.format("dropComplete"))}activate(e,n){if(e&&typeof e.onDropActivate=="function"){let r=n?.target??null,i=e.element.getBoundingClientRect();e.onDropActivate({type:"dropactivate",x:i.left+i.width/2,y:i.top+i.height/2},r)}}}function xK(t){let e=js(t.items);return[...F0.values()].filter(n=>n.element.closest('[aria-hidden="true"], [inert]')?!1:typeof n.getDropOperation=="function"?n.getDropOperation(e,t.allowedDropOperations)!=="cancel":!0)}var MT={};MT={dragDescriptionKeyboard:"اضغط Enter لبدء السحب.",dragDescriptionKeyboardAlt:"اضغط على Alt + Enter لبدء السحب.",dragDescriptionLongPress:"اضغط باستمرار لبدء السحب.",dragDescriptionTouch:"اضغط مرتين لبدء السحب.",dragDescriptionVirtual:"انقر لبدء السحب.",dragItem:t=>`اسحب ${t.itemText}`,dragSelectedItems:(t,e)=>`اسحب ${e.plural(t.count,{one:()=>`${e.number(t.count)} عنصر محدد`,other:()=>`${e.number(t.count)} عناصر محددة`})}`,dragSelectedKeyboard:(t,e)=>`اضغط على Enter للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedKeyboardAlt:(t,e)=>`اضغط على مفتاحي Alt + Enter للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragSelectedLongPress:(t,e)=>`اضغط باستمرار للسحب ${e.plural(t.count,{one:"عدد العناصر المختارة",other:"عدد العناصر المختارة"})}.`,dragStartedKeyboard:"بدأ السحب. اضغط Tab للانتقال إلى موضع الإفلات، ثم اضغط Enter للإفلات، أو اضغط Escape للإلغاء.",dragStartedTouch:"بدأ السحب. انتقل إلى موضع الإفلات، ثم اضغط مرتين للإفلات.",dragStartedVirtual:"بدأ السحب. انتقل إلى مكان الإفلات، ثم انقر أو اضغط Enter للإفلات.",dropCanceled:"تم إلغاء الإفلات.",dropComplete:"اكتمل الإفلات.",dropDescriptionKeyboard:"اضغط Enter للإفلات. اضغط Escape لإلغاء السحب.",dropDescriptionTouch:"اضغط مرتين للإفلات.",dropDescriptionVirtual:"انقر للإفلات.",dropIndicator:"مؤشر الإفلات",dropOnItem:t=>`إفلات ${t.itemText}`,dropOnRoot:"الإفلات",endDragKeyboard:"السحب. اضغط Enter لإلغاء السحب.",endDragTouch:"السحب. اضغط مرتين لإلغاء السحب.",endDragVirtual:"السحب. انقر لإلغاء السحب.",insertAfter:t=>`أدخل بعد ${t.itemText}`,insertBefore:t=>`أدخل قبل ${t.itemText}`,insertBetween:t=>`أدخل بين ${t.beforeItemText} و ${t.afterItemText}`};var RT={};RT={dragDescriptionKeyboard:"Натиснете „Enter“, за да започнете да плъзгате.",dragDescriptionKeyboardAlt:"Натиснете Alt + Enter, за да започнете да плъзгате.",dragDescriptionLongPress:"Натиснете продължително, за да започнете да плъзгате.",dragDescriptionTouch:"Натиснете двукратно, за да започнете да плъзгате.",dragDescriptionVirtual:"Щракнете, за да започнете да плъзгате.",dragItem:t=>`Плъзни ${t.itemText}`,dragSelectedItems:(t,e)=>`Плъзни ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елемента`})}`,dragSelectedKeyboard:(t,e)=>`Натиснете Enter, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Натиснете Alt и Enter, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragSelectedLongPress:(t,e)=>`Натиснете продължително, за да плъзнете ${e.plural(t.count,{one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,dragStartedKeyboard:"Започна плъзгане. Натиснете „Tab“, за да се придвижите до целта, след което натиснете „Enter“ за пускане или натиснете „Escape“ за отмяна.",dragStartedTouch:"Започна плъзгане. Придвижете се до целта, след което натиснете двукратно, за да пуснете.",dragStartedVirtual:"Започна плъзгане. Придвижете се до целта, след което щракнете или натиснете „Enter“ за пускане.",dropCanceled:"Пускането е отменено.",dropComplete:"Пускането е завършено.",dropDescriptionKeyboard:"Натиснете „Enter“ за пускане. Натиснете „Escape“ за отмяна на плъзгането.",dropDescriptionTouch:"Натиснете двукратно за пускане.",dropDescriptionVirtual:"Щракнете за пускане.",dropIndicator:"индикатор за пускане",dropOnItem:t=>`Пусни върху ${t.itemText}`,dropOnRoot:"Пусни върху",endDragKeyboard:"Плъзгане. Натиснете „Enter“ за отмяна на плъзгането.",endDragTouch:"Плъзгане. Натиснете двукратно за отмяна на плъзгането.",endDragVirtual:"Плъзгане. Щракнете за отмяна.",insertAfter:t=>`Вмъкни след ${t.itemText}`,insertBefore:t=>`Вмъкни преди ${t.itemText}`,insertBetween:t=>`Вмъкни между ${t.beforeItemText} и ${t.afterItemText}`};var PT={};PT={dragDescriptionKeyboard:"Stisknutím klávesy Enter začnete s přetahováním.",dragDescriptionKeyboardAlt:"Stisknutím Alt + Enter zahájíte přetahování.",dragDescriptionLongPress:"Dlouhým stisknutím zahájíte přetahování.",dragDescriptionTouch:"Poklepáním začnete s přetahováním.",dragDescriptionVirtual:"Kliknutím začnete s přetahováním.",dragItem:t=>`Přetáhnout ${t.itemText}`,dragSelectedItems:(t,e)=>`Přetáhnout ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,few:()=>`${e.number(t.count)} vybrané položky`,other:()=>`${e.number(t.count)} vybraných položek`})}`,dragSelectedKeyboard:(t,e)=>`Stisknutím klávesy Enter přetáhněte ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Stisknutím Alt + Enter přetáhněte ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragSelectedLongPress:(t,e)=>`Dlouhým stisknutím přetáhnete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybranou položku`,other:()=>`${e.number(t.count)} vybrané položky`})}.`,dragStartedKeyboard:"Začněte s přetahováním. Po stisknutí klávesy Tab najděte požadovaný cíl a stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dragStartedTouch:"Začněte s přetahováním. Najděte požadovaný cíl a poklepáním přetažení dokončete.",dragStartedVirtual:"Začněte s přetahováním. Najděte požadovaný cíl a kliknutím nebo stisknutím klávesy Enter přetažení dokončete.",dropCanceled:"Přetažení bylo zrušeno.",dropComplete:"Přetažení bylo dokončeno.",dropDescriptionKeyboard:"Stisknutím klávesy Enter přetažení dokončete nebo stisknutím klávesy Esc akci zrušte.",dropDescriptionTouch:"Poklepáním přetažení dokončete.",dropDescriptionVirtual:"Kliknutím objekt přetáhněte.",dropIndicator:"indikátor přetažení",dropOnItem:t=>`Přetáhnout na ${t.itemText}`,dropOnRoot:"Přetáhnout na",endDragKeyboard:"Probíhá přetahování. Stisknutím klávesy Enter přetažení zrušíte.",endDragTouch:"Probíhá přetahování. Poklepáním přetažení zrušíte.",endDragVirtual:"Probíhá přetahování. Kliknutím přetažení zrušíte.",insertAfter:t=>`Vložit za ${t.itemText}`,insertBefore:t=>`Vložit před ${t.itemText}`,insertBetween:t=>`Vložit mezi ${t.beforeItemText} a ${t.afterItemText}`};var OT={};OT={dragDescriptionKeyboard:"Tryk på Enter for at starte med at trække.",dragDescriptionKeyboardAlt:"Tryk på Alt + Enter for at starte med at trække.",dragDescriptionLongPress:"Tryk længe for at starte med at trække.",dragDescriptionTouch:"Dobbelttryk for at starte med at trække.",dragDescriptionVirtual:"Klik for at starte med at trække.",dragItem:t=>`Træk ${t.itemText}`,dragSelectedItems:(t,e)=>`Træk ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}`,dragSelectedKeyboard:(t,e)=>`Tryk på Enter for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Tryk på Alt + Enter for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedLongPress:(t,e)=>`Tryk længe for at trække ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgte element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragStartedKeyboard:"Startet med at trække. Tryk på Tab for at gå til et slip-mål, tryk derefter på Enter for at slippe, eller tryk på Escape for at annullere.",dragStartedTouch:"Startet med at trække. Gå til et slip-mål, og dobbelttryk derefter for at slippe.",dragStartedVirtual:"Startet med at trække. Gå til et slip-mål, og klik eller tryk derefter på enter for at slippe.",dropCanceled:"Slip annulleret.",dropComplete:"Slip fuldført.",dropDescriptionKeyboard:"Tryk på Enter for at slippe. Tryk på Escape for at annullere trækning.",dropDescriptionTouch:"Dobbelttryk for at slippe.",dropDescriptionVirtual:"Klik for at slippe.",dropIndicator:"slip-indikator",dropOnItem:t=>`Slip på ${t.itemText}`,dropOnRoot:"Slip på",endDragKeyboard:"Trækning. Tryk på enter for at annullere træk.",endDragTouch:"Trækning. Dobbelttryk for at annullere træk.",endDragVirtual:"Trækning. Klik for at annullere trækning.",insertAfter:t=>`Indsæt efter ${t.itemText}`,insertBefore:t=>`Indsæt før ${t.itemText}`,insertBetween:t=>`Indsæt mellem ${t.beforeItemText} og ${t.afterItemText}`};var NT={};NT={dragDescriptionKeyboard:"Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.",dragDescriptionKeyboardAlt:"Alt + Eingabe drücken, um den Ziehvorgang zu starten.",dragDescriptionLongPress:"Lang drücken, um mit dem Ziehen zu beginnen.",dragDescriptionTouch:"Tippen Sie doppelt, um den Ziehvorgang zu starten.",dragDescriptionVirtual:"Zum Starten des Ziehvorgangs klicken.",dragItem:t=>`${t.itemText} ziehen`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Objekt`,other:()=>`${e.number(t.count)} ausgewählte Objekte`})} ziehen`,dragSelectedKeyboard:(t,e)=>`Eingabetaste drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedKeyboardAlt:(t,e)=>`Alt + Eingabetaste drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragSelectedLongPress:(t,e)=>`Lang drücken, um ${e.plural(t.count,{one:()=>`${e.number(t.count)} ausgewähltes Element`,other:()=>`${e.number(t.count)} ausgewählte Elemente`})} zu ziehen.`,dragStartedKeyboard:"Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.",dragStartedTouch:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.",dragStartedVirtual:"Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.",dropCanceled:"Ablegen abgebrochen.",dropComplete:"Ablegen abgeschlossen.",dropDescriptionKeyboard:"Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.",dropDescriptionTouch:"Tippen Sie doppelt, um das Objekt abzulegen.",dropDescriptionVirtual:"Zum Ablegen klicken.",dropIndicator:"Ablegeanzeiger",dropOnItem:t=>`Auf ${t.itemText} ablegen`,dropOnRoot:"Ablegen auf",endDragKeyboard:"Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.",endDragTouch:"Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.",endDragVirtual:"Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.",insertAfter:t=>`Nach ${t.itemText} einfügen`,insertBefore:t=>`Vor ${t.itemText} einfügen`,insertBetween:t=>`Zwischen ${t.beforeItemText} und ${t.afterItemText} einfügen`};var LT={};LT={dragDescriptionKeyboard:"Πατήστε Enter για έναρξη της μεταφοράς.",dragDescriptionKeyboardAlt:"Πατήστε Alt + Enter για έναρξη της μεταφοράς.",dragDescriptionLongPress:"Πατήστε παρατεταμένα για να ξεκινήσετε τη μεταφορά.",dragDescriptionTouch:"Πατήστε δύο φορές για έναρξη της μεταφοράς.",dragDescriptionVirtual:"Κάντε κλικ για να ξεκινήσετε τη μεταφορά.",dragItem:t=>`Μεταφορά ${t.itemText}`,dragSelectedItems:(t,e)=>`Μεταφορά σε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}`,dragSelectedKeyboard:(t,e)=>`Πατήστε Enter για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Πατήστε Alt + Enter για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragSelectedLongPress:(t,e)=>`Πατήστε παρατεταμένα για να σύρετε ${e.plural(t.count,{one:()=>`${e.number(t.count)} επιλεγμένο στοιχείο`,other:()=>`${e.number(t.count)} επιλεγμένα στοιχεία`})}.`,dragStartedKeyboard:"Η μεταφορά ξεκίνησε. Πατήστε το πλήκτρο Tab για να μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε Enter για απόθεση ή πατήστε Escape για ακύρωση.",dragStartedTouch:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, πατήστε δύο φορές για απόθεση.",dragStartedVirtual:"Η μεταφορά ξεκίνησε. Μεταβείτε σε έναν προορισμό απόθεσης και, στη συνέχεια, κάντε κλικ ή πατήστε Enter για απόθεση.",dropCanceled:"Η απόθεση ακυρώθηκε.",dropComplete:"Η απόθεση ολοκληρώθηκε.",dropDescriptionKeyboard:"Πατήστε Enter για απόθεση. Πατήστε Escape για ακύρωση της μεταφοράς.",dropDescriptionTouch:"Πατήστε δύο φορές για απόθεση.",dropDescriptionVirtual:"Κάντε κλικ για απόθεση.",dropIndicator:"δείκτης απόθεσης",dropOnItem:t=>`Απόθεση σε ${t.itemText}`,dropOnRoot:"Απόθεση σε",endDragKeyboard:"Μεταφορά σε εξέλιξη. Πατήστε Enter για ακύρωση της μεταφοράς.",endDragTouch:"Μεταφορά σε εξέλιξη. Πατήστε δύο φορές για ακύρωση της μεταφοράς.",endDragVirtual:"Μεταφορά σε εξέλιξη. Κάντε κλικ για ακύρωση της μεταφοράς.",insertAfter:t=>`Εισαγωγή μετά από ${t.itemText}`,insertBefore:t=>`Εισαγωγή πριν από ${t.itemText}`,insertBetween:t=>`Εισαγωγή μεταξύ ${t.beforeItemText} και ${t.afterItemText}`};var zT={};zT={dragItem:t=>`Drag ${t.itemText}`,dragSelectedItems:(t,e)=>`Drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}`,dragDescriptionKeyboard:"Press Enter to start dragging.",dragDescriptionKeyboardAlt:"Press Alt + Enter to start dragging.",dragDescriptionTouch:"Double tap to start dragging.",dragDescriptionVirtual:"Click to start dragging.",dragDescriptionLongPress:"Long press to start dragging.",dragSelectedKeyboard:(t,e)=>`Press Enter to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Press Alt + Enter to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragSelectedLongPress:(t,e)=>`Long press to drag ${e.plural(t.count,{one:()=>`${e.number(t.count)} selected item`,other:()=>`${e.number(t.count)} selected items`})}.`,dragStartedKeyboard:"Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.",dragStartedTouch:"Started dragging. Navigate to a drop target, then double tap to drop.",dragStartedVirtual:"Started dragging. Navigate to a drop target, then click or press Enter to drop.",endDragKeyboard:"Dragging. Press Enter to cancel drag.",endDragTouch:"Dragging. Double tap to cancel drag.",endDragVirtual:"Dragging. Click to cancel drag.",dropDescriptionKeyboard:"Press Enter to drop. Press Escape to cancel drag.",dropDescriptionTouch:"Double tap to drop.",dropDescriptionVirtual:"Click to drop.",dropCanceled:"Drop canceled.",dropComplete:"Drop complete.",dropIndicator:"drop indicator",dropOnRoot:"Drop on",dropOnItem:t=>`Drop on ${t.itemText}`,insertBefore:t=>`Insert before ${t.itemText}`,insertBetween:t=>`Insert between ${t.beforeItemText} and ${t.afterItemText}`,insertAfter:t=>`Insert after ${t.itemText}`};var IT={};IT={dragDescriptionKeyboard:"Pulse Intro para empezar a arrastrar.",dragDescriptionKeyboardAlt:"Pulse Intro para empezar a arrastrar.",dragDescriptionLongPress:"Mantenga pulsado para comenzar a arrastrar.",dragDescriptionTouch:"Pulse dos veces para iniciar el arrastre.",dragDescriptionVirtual:"Haga clic para iniciar el arrastre.",dragItem:t=>`Arrastrar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}`,dragSelectedKeyboard:(t,e)=>`Pulse Intro para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pulse Alt + Intro para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragSelectedLongPress:(t,e)=>`Mantenga pulsado para arrastrar ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,dragStartedKeyboard:"Se ha empezado a arrastrar. Pulse el tabulador para ir al destino donde se vaya a colocar y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.",dragStartedTouch:"Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, pulse dos veces para soltar.",dragStartedVirtual:"Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, haga clic o pulse Intro para soltar.",dropCanceled:"Se ha cancelado la colocación.",dropComplete:"Colocación finalizada.",dropDescriptionKeyboard:"Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.",dropDescriptionTouch:"Pulse dos veces para soltar.",dropDescriptionVirtual:"Haga clic para soltar.",dropIndicator:"indicador de colocación",dropOnItem:t=>`Soltar en ${t.itemText}`,dropOnRoot:"Soltar en",endDragKeyboard:"Arrastrando. Pulse Intro para cancelar el arrastre.",endDragTouch:"Arrastrando. Pulse dos veces para cancelar el arrastre.",endDragVirtual:"Arrastrando. Haga clic para cancelar el arrastre.",insertAfter:t=>`Insertar después de ${t.itemText}`,insertBefore:t=>`Insertar antes de ${t.itemText}`,insertBetween:t=>`Insertar entre ${t.beforeItemText} y ${t.afterItemText}`};var FT={};FT={dragDescriptionKeyboard:"Lohistamise alustamiseks vajutage klahvi Enter.",dragDescriptionKeyboardAlt:"Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.",dragDescriptionLongPress:"Vajutage pikalt lohistamise alustamiseks.",dragDescriptionTouch:"Topeltpuudutage lohistamise alustamiseks.",dragDescriptionVirtual:"Klõpsake lohistamise alustamiseks.",dragItem:t=>`Lohista ${t.itemText}`,dragSelectedItems:(t,e)=>`Lohista ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksust`,other:()=>`${e.number(t.count)} valitud üksust`})}`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} lohistamiseks vajutage sisestusklahvi Enter.`,dragSelectedKeyboardAlt:(t,e)=>`Lohistamiseks vajutage klahvikombinatsiooni Alt + Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} jaoks.`,dragSelectedLongPress:(t,e)=>`Pikk vajutus ${e.plural(t.count,{one:()=>`${e.number(t.count)} valitud üksuse`,other:()=>`${e.number(t.count)} valitud üksuse`})} lohistamiseks.`,dragStartedKeyboard:"Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.",dragStartedTouch:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.",dragStartedVirtual:"Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.",dropCanceled:"Lohistamisest loobuti.",dropComplete:"Lohistamine on tehtud.",dropDescriptionKeyboard:"Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.",dropDescriptionTouch:"Kukutamiseks topeltpuudutage.",dropDescriptionVirtual:"Kukutamiseks klõpsake.",dropIndicator:"lohistamise indikaator",dropOnItem:t=>`Kukuta asukohta ${t.itemText}`,dropOnRoot:"Kukuta asukohta",endDragKeyboard:"Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.",endDragTouch:"Lohistamine. Lohistamisest loobumiseks topeltpuudutage.",endDragVirtual:"Lohistamine. Lohistamisest loobumiseks klõpsake.",insertAfter:t=>`Sisesta ${t.itemText} järele`,insertBefore:t=>`Sisesta ${t.itemText} ette`,insertBetween:t=>`Sisesta ${t.beforeItemText} ja ${t.afterItemText} vahele`};var KT={};KT={dragDescriptionKeyboard:"Aloita vetäminen painamalla Enter-näppäintä.",dragDescriptionKeyboardAlt:"Aloita vetäminen painamalla Alt + Enter -näppäinyhdistelmää.",dragDescriptionLongPress:"Aloita vetäminen pitämällä painettuna.",dragDescriptionTouch:"Aloita vetäminen kaksoisnapauttamalla.",dragDescriptionVirtual:"Aloita vetäminen napsauttamalla.",dragItem:t=>`Vedä kohdetta ${t.itemText}`,dragSelectedItems:(t,e)=>`Vedä ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittua kohdetta`,other:()=>`${e.number(t.count)} valittua kohdetta`})}`,dragSelectedKeyboard:(t,e)=>`Vedä painamalla Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Vedä painamalla Alt + Enter ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragSelectedLongPress:(t,e)=>`Vedä pitämällä painettuna ${e.plural(t.count,{one:()=>`${e.number(t.count)} valittu kohde`,other:()=>`${e.number(t.count)} valittua kohdetta`})}.`,dragStartedKeyboard:"Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.",dragStartedTouch:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.",dragStartedVirtual:"Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.",dropCanceled:"Pudotus peruutettu.",dropComplete:"Pudotus suoritettu.",dropDescriptionKeyboard:"Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.",dropDescriptionTouch:"Pudota kaksoisnapauttamalla.",dropDescriptionVirtual:"Pudota napsauttamalla.",dropIndicator:"pudotuksen ilmaisin",dropOnItem:t=>`Pudota kohteeseen ${t.itemText}`,dropOnRoot:"Pudota kohteeseen",endDragKeyboard:"Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.",endDragTouch:"Vedetään. Peruuta vetäminen kaksoisnapauttamalla.",endDragVirtual:"Vedetään. Peruuta vetäminen napsauttamalla.",insertAfter:t=>`Lisää kohteen ${t.itemText} jälkeen`,insertBefore:t=>`Lisää ennen kohdetta ${t.itemText}`,insertBetween:t=>`Lisää kohteiden ${t.beforeItemText} ja ${t.afterItemText} väliin`};var _T={};_T={dragDescriptionKeyboard:"Appuyez sur Entrée pour commencer le déplacement.",dragDescriptionKeyboardAlt:"Appuyez sur Alt + Entrée pour commencer à faire glisser.",dragDescriptionLongPress:"Appuyez de manière prolongée pour commencer à faire glisser.",dragDescriptionTouch:"Touchez deux fois pour commencer le déplacement.",dragDescriptionVirtual:"Cliquez pour commencer le déplacement.",dragItem:t=>`Déplacer ${t.itemText}`,dragSelectedItems:(t,e)=>`Déplacer ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}`,dragSelectedKeyboard:(t,e)=>`Appuyez sur Entrée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Appuyez sur Alt + Entrée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragSelectedLongPress:(t,e)=>`Appuyez de manière prolongée pour faire glisser ${e.plural(t.count,{one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,dragStartedKeyboard:"Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Échap pour annuler.",dragStartedTouch:"Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.",dragStartedVirtual:"Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.",dropCanceled:"Dépôt annulé.",dropComplete:"Dépôt terminé.",dropDescriptionKeyboard:"Appuyez sur Entrée pour déposer. Appuyez sur Échap pour annuler le déplacement.",dropDescriptionTouch:"Touchez deux fois pour déposer.",dropDescriptionVirtual:"Cliquez pour déposer.",dropIndicator:"indicateur de dépôt",dropOnItem:t=>`Déposer sur ${t.itemText}`,dropOnRoot:"Déposer sur",endDragKeyboard:"Déplacement. Appuyez sur Entrée pour annuler le déplacement.",endDragTouch:"Déplacement. Touchez deux fois pour annuler le déplacement.",endDragVirtual:"Déplacement. Cliquez pour annuler le déplacement.",insertAfter:t=>`Insérer après ${t.itemText}`,insertBefore:t=>`Insérer avant ${t.itemText}`,insertBetween:t=>`Insérer entre ${t.beforeItemText} et ${t.afterItemText}`};var jT={};jT={dragDescriptionKeyboard:"הקש על Enter כדי להתחיל לגרור.",dragDescriptionKeyboardAlt:"הקש Alt + Enter כדי להתחיל לגרור.",dragDescriptionLongPress:"לחץ לחיצה ארוכה כדי להתחיל לגרור.",dragDescriptionTouch:"הקש פעמיים כדי להתחיל בגרירה.",dragDescriptionVirtual:"לחץ כדי להתחיל לגרור.",dragItem:t=>`גרור את ${t.itemText}`,dragSelectedItems:(t,e)=>`גרור ${e.plural(t.count,{one:()=>`פריט נבחר ${e.number(t.count)}`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}`,dragSelectedKeyboard:(t,e)=>`הקש על Enter כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragSelectedKeyboardAlt:(t,e)=>`הקש Alt + Enter כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragSelectedLongPress:(t,e)=>`לחץ לחיצה ארוכה כדי לגרור ${e.plural(t.count,{one:()=>`${e.number(t.count)} פריט שנבחר`,other:()=>`${e.number(t.count)} פריטים שנבחרו`})}.`,dragStartedKeyboard:"התחלת לגרור. הקש על Tab כדי לנווט לנקודת הגרירה ולאחר מכן הקש על Enter כדי לשחרר או על Escape כדי לבטל.",dragStartedTouch:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן הקש פעמיים כדי לשחרר.",dragStartedVirtual:"התחלת לגרור. נווט לנקודת השחרור ולאחר מכן לחץ או הקש על Enter כדי לשחרר.",dropCanceled:"השחרור בוטל.",dropComplete:"השחרור הושלם.",dropDescriptionKeyboard:"הקש על Enter כדי לשחרר. הקש על Escape כדי לבטל את הגרירה.",dropDescriptionTouch:"הקש פעמיים כדי לשחרר.",dropDescriptionVirtual:"לחץ כדי לשחרר.",dropIndicator:"מחוון שחרור",dropOnItem:t=>`שחרר על ${t.itemText}`,dropOnRoot:"שחרר על",endDragKeyboard:"גורר. הקש על Enter כדי לבטל את הגרירה.",endDragTouch:"גורר. הקש פעמיים כדי לבטל את הגרירה.",endDragVirtual:"גורר. לחץ כדי לבטל את הגרירה.",insertAfter:t=>`הוסף אחרי ${t.itemText}`,insertBefore:t=>`הוסף לפני ${t.itemText}`,insertBetween:t=>`הוסף בין ${t.beforeItemText} לבין ${t.afterItemText}`};var HT={};HT={dragDescriptionKeyboard:"Pritisnite Enter da biste počeli povlačiti.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter za početak povlačenja.",dragDescriptionLongPress:"Dugo pritisnite za početak povlačenja.",dragDescriptionTouch:"Dvaput dodirnite da biste počeli povlačiti.",dragDescriptionVirtual:"Kliknite da biste počeli povlačiti.",dragItem:t=>`Povucite stavku ${t.itemText}`,dragSelectedItems:(t,e)=>`Povucite ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabranu stavku`,other:()=>`ovoliko odabranih stavki: ${e.number(t.count)}`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite Enter za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite Alt + Enter za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragSelectedLongPress:(t,e)=>`Dugo pritisnite za povlačenje ${e.plural(t.count,{one:()=>`${e.number(t.count)} odabrana stavka`,other:()=>`${e.number(t.count)} odabrane stavke`})}.`,dragStartedKeyboard:"Počeli ste povlačiti. Pritisnite tipku tabulatora da biste došli do cilja ispuštanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlačenje.",dragStartedTouch:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim dvaput dodirnite da biste ispustili stavku.",dragStartedVirtual:"Počeli ste povlačiti. Dođite do cilja ispuštanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.",dropCanceled:"Povlačenje je prekinuto.",dropComplete:"Ispuštanje je dovršeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlačenje.",dropDescriptionTouch:"Dvaput dodirnite da biste ispustili stavku.",dropDescriptionVirtual:"Kliknite da biste ispustili stavku.",dropIndicator:"pokazatelj ispuštanja",dropOnItem:t=>`Ispustite na stavku ${t.itemText}`,dropOnRoot:"Ispustite na",endDragKeyboard:"Povlačenje. Pritisnite Enter da biste prekinuli povlačenje.",endDragTouch:"Povlačenje. Dvaput dodirnite da biste prekinuli povlačenje.",endDragVirtual:"Povlačenje. Kliknite da biste prekinuli povlačenje.",insertAfter:t=>`Umetnite iza stavke ${t.itemText}`,insertBefore:t=>`Ispustite ispred stavke ${t.itemText}`,insertBetween:t=>`Umetnite između stavki ${t.beforeItemText} i ${t.afterItemText}`};var VT={};VT={dragDescriptionKeyboard:"Nyomja le az Enter billentyűt a húzás megkezdéséhez.",dragDescriptionKeyboardAlt:"Nyomja le az Alt + Enter billentyűket a húzás megkezdéséhez.",dragDescriptionLongPress:"Hosszan nyomja meg a húzás elindításához.",dragDescriptionTouch:"Koppintson duplán a húzás megkezdéséhez.",dragDescriptionVirtual:"Kattintson a húzás megkezdéséhez.",dragItem:t=>`${t.itemText} húzása`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzása`,dragSelectedKeyboard:(t,e)=>`Nyomja meg az Entert ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragSelectedKeyboardAlt:(t,e)=>`Nyomja meg az Alt + Enter billentyűket ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragSelectedLongPress:(t,e)=>`Tartsa lenyomva hosszan ${e.plural(t.count,{one:()=>`${e.number(t.count)} kijelölt elem`,other:()=>`${e.number(t.count)} kijelölt elem`})} húzásához.`,dragStartedKeyboard:"Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakításhoz.",dragStartedTouch:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.",dragStartedVirtual:"Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.",dropCanceled:"Elengedés megszakítva.",dropComplete:"Elengedés teljesítve.",dropDescriptionKeyboard:"Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakításához.",dropDescriptionTouch:"Koppintson duplán az elengedéshez.",dropDescriptionVirtual:"Kattintson az elengedéshez.",dropIndicator:"elengedésjelző",dropOnItem:t=>`Elengedés erre: ${t.itemText}`,dropOnRoot:"Elengedés erre:",endDragKeyboard:"Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakításához.",endDragTouch:"Húzás folyamatban. Koppintson duplán a húzás megszakításához.",endDragVirtual:"Húzás folyamatban. Kattintson a húzás megszakításához.",insertAfter:t=>`Beszúrás ${t.itemText} után`,insertBefore:t=>`Beszúrás ${t.itemText} elé`,insertBetween:t=>`Beszúrás ${t.beforeItemText} és ${t.afterItemText} közé`};var UT={};UT={dragDescriptionKeyboard:"Premi Invio per iniziare a trascinare.",dragDescriptionKeyboardAlt:"Premi Alt + Invio per iniziare a trascinare.",dragDescriptionLongPress:"Premi a lungo per iniziare a trascinare.",dragDescriptionTouch:"Tocca due volte per iniziare a trascinare.",dragDescriptionVirtual:"Fai clic per iniziare a trascinare.",dragItem:t=>`Trascina ${t.itemText}`,dragSelectedItems:(t,e)=>`Trascina ${e.plural(t.count,{one:()=>`${e.number(t.count)} altro elemento selezionato`,other:()=>`${e.number(t.count)} altri elementi selezionati`})}`,dragSelectedKeyboard:(t,e)=>`Premi Invio per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Premi Alt + Invio per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragSelectedLongPress:(t,e)=>`Premi a lungo per trascinare ${e.plural(t.count,{one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,dragStartedKeyboard:"Hai iniziato a trascinare. Premi Tab per arrivare sull’area di destinazione, quindi premi Invio per rilasciare o Esc per annullare.",dragStartedTouch:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi tocca due volte per rilasciare.",dragStartedVirtual:"Hai iniziato a trascinare. Arriva sull’area di destinazione, quindi fai clic o premi Invio per rilasciare.",dropCanceled:"Rilascio annullato.",dropComplete:"Rilascio completato.",dropDescriptionKeyboard:"Premi Invio per rilasciare. Premi Esc per annullare.",dropDescriptionTouch:"Tocca due volte per rilasciare.",dropDescriptionVirtual:"Fai clic per rilasciare.",dropIndicator:"indicatore di rilascio",dropOnItem:t=>`Rilascia su ${t.itemText}`,dropOnRoot:"Rilascia su",endDragKeyboard:"Trascinamento. Premi Invio per annullare.",endDragTouch:"Trascinamento. Tocca due volte per annullare.",endDragVirtual:"Trascinamento. Fai clic per annullare.",insertAfter:t=>`Inserisci dopo ${t.itemText}`,insertBefore:t=>`Inserisci prima di ${t.itemText}`,insertBetween:t=>`Inserisci tra ${t.beforeItemText} e ${t.afterItemText}`};var qT={};qT={dragDescriptionKeyboard:"Enter キーを押してドラッグを開始してください。",dragDescriptionKeyboardAlt:"Alt+Enter キーを押してドラッグを開始します。",dragDescriptionLongPress:"長押ししてドラッグを開始します。",dragDescriptionTouch:"ダブルタップしてドラッグを開始します。",dragDescriptionVirtual:"クリックしてドラッグを開始します。",dragItem:t=>`${t.itemText} をドラッグ`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} 個の選択項目`,other:()=>`${e.number(t.count)} 個の選択項目`})} をドラッグ`,dragSelectedKeyboard:(t,e)=>`Enter キーを押して、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragSelectedKeyboardAlt:(t,e)=>`Alt+Enter キーを押して、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragSelectedLongPress:(t,e)=>`長押しして、${e.plural(t.count,{one:()=>`${e.number(t.count)} 選択した項目`,other:()=>`${e.number(t.count)} 選択した項目`})}をドラッグします。`,dragStartedKeyboard:"ドラッグを開始します。Tab キーを押してドロップターゲットにいどうし、Enter キーを押してドロップするか、Esc キーを押してキャンセルします。",dragStartedTouch:"ドラッグを開始しました。ドロップのターゲットに移動し、ダブルタップしてドロップします。",dragStartedVirtual:"ドラッグを開始しました。ドロップのターゲットに移動し、クリックまたは Enter キーを押してドロップします。",dropCanceled:"ドロップがキャンセルされました。",dropComplete:"ドロップが完了しました。",dropDescriptionKeyboard:"Enter キーを押してドロップします。Esc キーを押してドラッグをキャンセルします。",dropDescriptionTouch:"ダブルタップしてドロップします。",dropDescriptionVirtual:"クリックしてドロップします。",dropIndicator:"ドロップインジケーター",dropOnItem:t=>`${t.itemText} にドロップ`,dropOnRoot:"ドロップ場所",endDragKeyboard:"ドラッグしています。Enter キーを押してドラッグをキャンセルします。",endDragTouch:"ドラッグしています。ダブルタップしてドラッグをキャンセルします。",endDragVirtual:"ドラッグしています。クリックしてドラッグをキャンセルします。",insertAfter:t=>`${t.itemText} の後に挿入`,insertBefore:t=>`${t.itemText} の前に挿入`,insertBetween:t=>`${t.beforeItemText} と ${t.afterItemText} の間に挿入`};var GT={};GT={dragDescriptionKeyboard:"드래그를 시작하려면 Enter를 누르세요.",dragDescriptionKeyboardAlt:"드래그를 시작하려면 Alt + Enter를 누르십시오.",dragDescriptionLongPress:"드래그를 시작하려면 길게 누르십시오.",dragDescriptionTouch:"드래그를 시작하려면 더블 탭하세요.",dragDescriptionVirtual:"드래그를 시작하려면 클릭하세요.",dragItem:t=>`${t.itemText} 드래그`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})} 드래그`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 Enter를 누르십시오.`,dragSelectedKeyboardAlt:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 Alt + Enter를 누르십시오.`,dragSelectedLongPress:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}개 선택 항목`,other:()=>`${e.number(t.count)}개 선택 항목`})}을 드래그하려면 길게 누르십시오.`,dragStartedKeyboard:"드래그가 시작되었습니다. Tab을 눌러 드롭 대상으로 이동한 다음 Enter를 눌러 드롭하거나 Esc를 눌러 취소하세요.",dragStartedTouch:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 더블 탭하여 드롭하세요.",dragStartedVirtual:"드래그가 시작되었습니다. 드롭 대상으로 이동한 다음 클릭하거나 Enter를 눌러 드롭하세요.",dropCanceled:"드롭이 취소되었습니다.",dropComplete:"드롭이 완료되었습니다.",dropDescriptionKeyboard:"드롭하려면 Enter를 누르세요. 드래그를 취소하려면 Esc를 누르세요.",dropDescriptionTouch:"더블 탭하여 드롭하세요.",dropDescriptionVirtual:"드롭하려면 클릭하세요.",dropIndicator:"드롭 표시기",dropOnItem:t=>`${t.itemText}에 드롭`,dropOnRoot:"드롭 대상",endDragKeyboard:"드래그 중입니다. 드래그를 취소하려면 Enter를 누르세요.",endDragTouch:"드래그 중입니다. 드래그를 취소하려면 더블 탭하세요.",endDragVirtual:"드래그 중입니다. 드래그를 취소하려면 클릭하세요.",insertAfter:t=>`${t.itemText} 이후에 삽입`,insertBefore:t=>`${t.itemText} 이전에 삽입`,insertBetween:t=>`${t.beforeItemText} 및 ${t.afterItemText} 사이에 삽입`};var WT={};WT={dragDescriptionKeyboard:"Paspauskite „Enter“, kad pradėtumėte vilkti.",dragDescriptionKeyboardAlt:"Paspauskite „Alt + Enter“, kad pradėtumėte vilkti.",dragDescriptionLongPress:"Palaikykite nuspaudę, kad pradėtumėte vilkti.",dragDescriptionTouch:"Palieskite dukart, kad pradėtumėte vilkti.",dragDescriptionVirtual:"Spustelėkite, kad pradėtumėte vilkti.",dragItem:t=>`Vilkti ${t.itemText}`,dragSelectedItems:(t,e)=>`Vilkti ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}`,dragSelectedKeyboard:(t,e)=>`Paspauskite „Enter“, jei norite nuvilkti ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Paspauskite „Alt + Enter“, kad nuvilktumėte ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragSelectedLongPress:(t,e)=>`Nuspaudę palaikykite, kad nuvilktumėte ${e.plural(t.count,{one:()=>`${e.number(t.count)} pasirinktą elementą`,other:()=>`${e.number(t.count)} pasirinktus elementus`})}.`,dragStartedKeyboard:"Pradėta vilkti. Paspauskite „Tab“, kad pereitumėte į tiesioginę paskirties vietą, tada paspauskite „Enter“, kad numestumėte, arba „Escape“, kad atšauktumėte.",dragStartedTouch:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą, tada palieskite dukart, kad numestumėte.",dragStartedVirtual:"Pradėta vilkti. Eikite į tiesioginę paskirties vietą ir spustelėkite arba paspauskite „Enter“, kad numestumėte.",dropCanceled:"Numetimas atšauktas.",dropComplete:"Numesta.",dropDescriptionKeyboard:"Paspauskite „Enter“, kad numestumėte. Paspauskite „Escape“, kad atšauktumėte vilkimą.",dropDescriptionTouch:"Palieskite dukart, kad numestumėte.",dropDescriptionVirtual:"Spustelėkite, kad numestumėte.",dropIndicator:"numetimo indikatorius",dropOnItem:t=>`Numesti ant ${t.itemText}`,dropOnRoot:"Numesti ant",endDragKeyboard:"Velkama. Paspauskite „Enter“, kad atšauktumėte vilkimą.",endDragTouch:"Velkama. Spustelėkite dukart, kad atšauktumėte vilkimą.",endDragVirtual:"Velkama. Spustelėkite, kad atšauktumėte vilkimą.",insertAfter:t=>`Įterpti po ${t.itemText}`,insertBefore:t=>`Įterpti prieš ${t.itemText}`,insertBetween:t=>`Įterpti tarp ${t.beforeItemText} ir ${t.afterItemText}`};var QT={};QT={dragDescriptionKeyboard:"Nospiediet Enter, lai sāktu vilkšanu.",dragDescriptionKeyboardAlt:"Nospiediet taustiņu kombināciju Alt+Enter, lai sāktu vilkšanu.",dragDescriptionLongPress:"Turiet nospiestu, lai sāktu vilkšanu.",dragDescriptionTouch:"Veiciet dubultskārienu, lai sāktu vilkšanu.",dragDescriptionVirtual:"Noklikšķiniet, lai sāktu vilkšanu.",dragItem:t=>`Velciet ${t.itemText}`,dragSelectedItems:(t,e)=>`Velciet ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}`,dragSelectedKeyboard:(t,e)=>`Nospiediet taustiņu Enter, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Nospiediet taustiņu kombināciju Alt+Enter, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragSelectedLongPress:(t,e)=>`Turiet nospiestu, lai vilktu ${e.plural(t.count,{one:()=>`${e.number(t.count)} atlasīto vienumu`,other:()=>`${e.number(t.count)} atlasītos vienumus`})}.`,dragStartedKeyboard:"Uzsākta vilkšana. Nospiediet taustiņu Tab, lai pārietu uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.",dragStartedTouch:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam veiciet dubultskārienu, lai nomestu.",dragStartedVirtual:"Uzsākta vilkšana. Pārejiet uz nomešanas mērķi, pēc tam nospiediet Enter, lai nomestu.",dropCanceled:"Nomešana atcelta.",dropComplete:"Nomešana pabeigta.",dropDescriptionKeyboard:"Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkšanu.",dropDescriptionTouch:"Veiciet dubultskārienu, lai nomestu.",dropDescriptionVirtual:"Noklikšķiniet, lai nomestu.",dropIndicator:"nomešanas indikators",dropOnItem:t=>`Nometiet uz ${t.itemText}`,dropOnRoot:"Nometiet uz",endDragKeyboard:"Notiek vilkšana. Nospiediet Enter, lai atceltu vilkšanu.",endDragTouch:"Notiek vilkšana. Veiciet dubultskārienu, lai atceltu vilkšanu.",endDragVirtual:"Notiek vilkšana. Noklikšķiniet, lai atceltu vilkšanu.",insertAfter:t=>`Ievietojiet pēc ${t.itemText}`,insertBefore:t=>`Ievietojiet pirms ${t.itemText}`,insertBetween:t=>`Ievietojiet starp ${t.beforeItemText} un ${t.afterItemText}`};var YT={};YT={dragDescriptionKeyboard:"Trykk på Enter for å begynne å dra.",dragDescriptionKeyboardAlt:"Trykk på Alt + Enter for å begynne å dra.",dragDescriptionLongPress:"Trykk lenge for å begynne å dra.",dragDescriptionTouch:"Dobbelttrykk for å begynne å dra.",dragDescriptionVirtual:"Klikk for å begynne å dra.",dragItem:t=>`Dra ${t.itemText}`,dragSelectedItems:(t,e)=>`Dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} merket element`,other:()=>`${e.number(t.count)} merkede elementer`})}`,dragSelectedKeyboard:(t,e)=>`Trykk Enter for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Trykk på Alt + Enter for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragSelectedLongPress:(t,e)=>`Trykk lenge for å dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valgt element`,other:()=>`${e.number(t.count)} valgte elementer`})}.`,dragStartedKeyboard:"Begynte å dra. Trykk på Tab for å navigere til et mål, og trykk deretter på Enter for å slippe eller på Esc for å avbryte.",dragStartedTouch:"Begynte å dra. Naviger til et mål, og dobbelttrykk for å slippe.",dragStartedVirtual:"Begynte å dra. Naviger til et mål, og klikk eller trykk på Enter for å slippe.",dropCanceled:"Avbrøt slipping.",dropComplete:"Slippingen er fullført.",dropDescriptionKeyboard:"Trykk på Enter for å slippe. Trykk på Esc hvis du vil avbryte draingen.",dropDescriptionTouch:"Dobbelttrykk for å slippe.",dropDescriptionVirtual:"Klikk for å slippe.",dropIndicator:"slippeindikator",dropOnItem:t=>`Slipp på ${t.itemText}`,dropOnRoot:"Slipp på",endDragKeyboard:"Drar. Trykk på Enter hvis du vil avbryte.",endDragTouch:"Drar. Dobbelttrykk hvis du vil avbryte.",endDragVirtual:"Drar. Klikk hvis du vil avbryte.",insertAfter:t=>`Sett inn etter ${t.itemText}`,insertBefore:t=>`Sett inn før ${t.itemText}`,insertBetween:t=>`Sett inn mellom ${t.beforeItemText} og ${t.afterItemText}`};var XT={};XT={dragDescriptionKeyboard:"Druk op Enter om te slepen.",dragDescriptionKeyboardAlt:"Druk op Alt + Enter om te slepen.",dragDescriptionLongPress:"Houd lang ingedrukt om te slepen.",dragDescriptionTouch:"Dubbeltik om te slepen.",dragDescriptionVirtual:"Klik om met slepen te starten.",dragItem:t=>`${t.itemText} slepen`,dragSelectedItems:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} slepen`,dragSelectedKeyboard:(t,e)=>`Druk op Enter om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragSelectedKeyboardAlt:(t,e)=>`Druk op Alt + Enter om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragSelectedLongPress:(t,e)=>`Houd lang ingedrukt om ${e.plural(t.count,{one:()=>`${e.number(t.count)} geselecteerd item`,other:()=>`${e.number(t.count)} geselecteerde items`})} te slepen.`,dragStartedKeyboard:"Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.",dragStartedTouch:"Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.",dragStartedVirtual:"Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.",dropCanceled:"Neerzetten geannuleerd.",dropComplete:"Neerzetten voltooid.",dropDescriptionKeyboard:"Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.",dropDescriptionTouch:"Dubbeltik om neer te zetten.",dropDescriptionVirtual:"Klik om neer te zetten.",dropIndicator:"aanwijzer voor neerzetten",dropOnItem:t=>`Neerzetten op ${t.itemText}`,dropOnRoot:"Neerzetten op",endDragKeyboard:"Bezig met slepen. Druk op Enter om te annuleren.",endDragTouch:"Bezig met slepen. Dubbeltik om te annuleren.",endDragVirtual:"Bezig met slepen. Klik om te annuleren.",insertAfter:t=>`Plaatsen na ${t.itemText}`,insertBefore:t=>`Plaatsen vóór ${t.itemText}`,insertBetween:t=>`Plaatsen tussen ${t.beforeItemText} en ${t.afterItemText}`};var JT={};JT={dragDescriptionKeyboard:"Naciśnij Enter, aby rozpocząć przeciąganie.",dragDescriptionKeyboardAlt:"Naciśnij Alt + Enter, aby rozpocząć przeciąganie.",dragDescriptionLongPress:"Naciśnij i przytrzymaj, aby rozpocząć przeciąganie.",dragDescriptionTouch:"Dotknij dwukrotnie, aby rozpocząć przeciąganie.",dragDescriptionVirtual:"Kliknij, aby rozpocząć przeciąganie.",dragItem:t=>`Przeciągnij ${t.itemText}`,dragSelectedItems:(t,e)=>`Przeciągnij ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybranych elementów`})}`,dragSelectedKeyboard:(t,e)=>`Naciśnij Enter, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Naciśnij Alt + Enter, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragSelectedLongPress:(t,e)=>`Naciśnij i przytrzymaj, aby przeciągnąć ${e.plural(t.count,{one:()=>`${e.number(t.count)} wybrany element`,other:()=>`${e.number(t.count)} wybrane(-ych) elementy(-ów)`})}.`,dragStartedKeyboard:"Rozpoczęto przeciąganie. Naciśnij Tab, aby wybrać miejsce docelowe, a następnie naciśnij Enter, aby upuścić, lub Escape, aby anulować.",dragStartedTouch:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie dotknij dwukrotnie, aby upuścić.F",dragStartedVirtual:"Rozpoczęto przeciąganie. Wybierz miejsce, w którym chcesz upuścić element, a następnie kliknij lub naciśnij Enter, aby upuścić.",dropCanceled:"Anulowano upuszczenie.",dropComplete:"Zakończono upuszczanie.",dropDescriptionKeyboard:"Naciśnij Enter, aby upuścić. Naciśnij Escape, aby anulować przeciągnięcie.",dropDescriptionTouch:"Dotknij dwukrotnie, aby upuścić.",dropDescriptionVirtual:"Kliknij, aby upuścić.",dropIndicator:"wskaźnik upuszczenia",dropOnItem:t=>`Upuść na ${t.itemText}`,dropOnRoot:"Upuść",endDragKeyboard:"Przeciąganie. Naciśnij Enter, aby anulować przeciągnięcie.",endDragTouch:"Przeciąganie. Kliknij dwukrotnie, aby anulować przeciągnięcie.",endDragVirtual:"Przeciąganie. Kliknij, aby anulować przeciąganie.",insertAfter:t=>`Umieść za ${t.itemText}`,insertBefore:t=>`Umieść przed ${t.itemText}`,insertBetween:t=>`Umieść między ${t.beforeItemText} i ${t.afterItemText}`};var ZT={};ZT={dragDescriptionKeyboard:"Pressione Enter para começar a arrastar.",dragDescriptionKeyboardAlt:"Pressione Alt + Enter para começar a arrastar.",dragDescriptionLongPress:"Pressione e segure para começar a arrastar.",dragDescriptionTouch:"Toque duas vezes para começar a arrastar.",dragDescriptionVirtual:"Clique para começar a arrastar.",dragItem:t=>`Arrastar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}`,dragSelectedKeyboard:(t,e)=>`Pressione Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pressione Alt + Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedLongPress:(t,e)=>`Pressione e segure para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.",dragStartedTouch:"Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.",dragStartedVirtual:"Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.",dropCanceled:"Liberação cancelada.",dropComplete:"Liberação concluída.",dropDescriptionKeyboard:"Pressione Enter para soltar. Pressione Escape para cancelar.",dropDescriptionTouch:"Toque duas vezes para soltar.",dropDescriptionVirtual:"Clique para soltar.",dropIndicator:"indicador de liberação",dropOnItem:t=>`Soltar em ${t.itemText}`,dropOnRoot:"Soltar",endDragKeyboard:"Arrastando. Pressione Enter para cancelar.",endDragTouch:"Arrastando. Toque duas vezes para cancelar.",endDragVirtual:"Arrastando. Clique para cancelar.",insertAfter:t=>`Inserir após ${t.itemText}`,insertBefore:t=>`Inserir antes de ${t.itemText}`,insertBetween:t=>`Inserir entre ${t.beforeItemText} e ${t.afterItemText}`};var eA={};eA={dragDescriptionKeyboard:"Prima Enter para iniciar o arrasto.",dragDescriptionKeyboardAlt:"Prima Alt + Enter para iniciar o arrasto.",dragDescriptionLongPress:"Prima longamente para começar a arrastar.",dragDescriptionTouch:"Faça duplo toque para começar a arrastar.",dragDescriptionVirtual:"Clique para iniciar o arrasto.",dragItem:t=>`Arrastar ${t.itemText}`,dragSelectedItems:(t,e)=>`Arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}`,dragSelectedKeyboard:(t,e)=>`Prima Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Prima Alt + Enter para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragSelectedLongPress:(t,e)=>`Prima longamente para arrastar ${e.plural(t.count,{one:()=>`${e.number(t.count)} o item selecionado`,other:()=>`${e.number(t.count)} os itens selecionados`})}.`,dragStartedKeyboard:"Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.",dragStartedTouch:"Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.",dragStartedVirtual:"Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.",dropCanceled:"Largar cancelado.",dropComplete:"Largar completo.",dropDescriptionKeyboard:"Prima Enter para largar. Prima Escape para cancelar o arrasto.",dropDescriptionTouch:"Faça duplo toque para largar.",dropDescriptionVirtual:"Clique para largar.",dropIndicator:"Indicador de largar",dropOnItem:t=>`Largar em ${t.itemText}`,dropOnRoot:"Largar em",endDragKeyboard:"A arrastar. Prima Enter para cancelar o arrasto.",endDragTouch:"A arrastar. Faça duplo toque para cancelar o arrasto.",endDragVirtual:"A arrastar. Clique para cancelar o arrasto.",insertAfter:t=>`Inserir depois de ${t.itemText}`,insertBefore:t=>`Inserir antes de ${t.itemText}`,insertBetween:t=>`Inserir entre ${t.beforeItemText} e ${t.afterItemText}`};var tA={};tA={dragDescriptionKeyboard:"Apăsați pe Enter pentru a începe glisarea.",dragDescriptionKeyboardAlt:"Apăsați pe Alt + Enter pentru a începe glisarea.",dragDescriptionLongPress:"Apăsați lung pentru a începe glisarea.",dragDescriptionTouch:"Atingeți de două ori pentru a începe să glisați.",dragDescriptionVirtual:"Faceți clic pentru a începe glisarea.",dragItem:t=>`Glisați ${t.itemText}`,dragSelectedItems:(t,e)=>`Glisați ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}`,dragSelectedKeyboard:(t,e)=>`Apăsați pe Enter pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Apăsați pe Alt + Enter pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragSelectedLongPress:(t,e)=>`Apăsați lung pentru a glisa ${e.plural(t.count,{one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,dragStartedKeyboard:"A început glisarea. Apăsați pe Tab pentru a naviga la o țintă de fixare, apoi apăsați pe Enter pentru a fixa sau apăsați pe Escape pentru a anula glisarea.",dragStartedTouch:"A început glisarea. Navigați la o țintă de fixare, apoi atingeți de două ori pentru a fixa.",dragStartedVirtual:"A început glisarea. Navigați la o țintă de fixare, apoi faceți clic sau apăsați pe Enter pentru a fixa.",dropCanceled:"Fixare anulată.",dropComplete:"Fixare finalizată.",dropDescriptionKeyboard:"Apăsați pe Enter pentru a fixa. Apăsați pe Escape pentru a anula glisarea.",dropDescriptionTouch:"Atingeți de două ori pentru a fixa.",dropDescriptionVirtual:"Faceți clic pentru a fixa.",dropIndicator:"indicator de fixare",dropOnItem:t=>`Fixați pe ${t.itemText}`,dropOnRoot:"Fixare pe",endDragKeyboard:"Se glisează. Apăsați pe Enter pentru a anula glisarea.",endDragTouch:"Se glisează. Atingeți de două ori pentru a anula glisarea.",endDragVirtual:"Se glisează. Faceți clic pentru a anula glisarea.",insertAfter:t=>`Inserați după ${t.itemText}`,insertBefore:t=>`Inserați înainte de ${t.itemText}`,insertBetween:t=>`Inserați între ${t.beforeItemText} și ${t.afterItemText}`};var nA={};nA={dragDescriptionKeyboard:"Нажмите клавишу Enter для начала перетаскивания.",dragDescriptionKeyboardAlt:"Нажмите Alt + Enter, чтобы начать перетаскивать.",dragDescriptionLongPress:"Нажмите и удерживайте, чтобы начать перетаскивать.",dragDescriptionTouch:"Дважды нажмите для начала перетаскивания.",dragDescriptionVirtual:"Щелкните для начала перетаскивания.",dragItem:t=>`Перетащить ${t.itemText}`,dragSelectedItems:(t,e)=>`Перетащить ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранный элемент`,other:()=>`${e.number(t.count)} выбранных элем`})}`,dragSelectedKeyboard:(t,e)=>`Нажмите Enter для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Нажмите Alt + Enter для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragSelectedLongPress:(t,e)=>`Нажмите и удерживайте для перетаскивания ${e.plural(t.count,{one:()=>`${e.number(t.count)} выбранного элемента`,other:()=>`${e.number(t.count)} выбранных элементов`})}.`,dragStartedKeyboard:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание, или клавишу Escape для отмены действия.",dragStartedTouch:"Начато перетаскивание. Выберите цель, затем дважды нажмите, чтобы применить перетаскивание.",dragStartedVirtual:"Начато перетаскивание. Нажмите клавишу Tab для выбора цели, затем нажмите клавишу Enter, чтобы применить перетаскивание.",dropCanceled:"Перетаскивание отменено.",dropComplete:"Перетаскивание завершено.",dropDescriptionKeyboard:"Нажмите клавишу Enter, чтобы применить перетаскивание. Нажмите клавишу Escape для отмены.",dropDescriptionTouch:"Дважды нажмите, чтобы применить перетаскивание.",dropDescriptionVirtual:"Щелкните, чтобы применить перетаскивание.",dropIndicator:"индикатор перетаскивания",dropOnItem:t=>`Перетащить на ${t.itemText}`,dropOnRoot:"Перетащить на",endDragKeyboard:"Перетаскивание. Нажмите клавишу Enter для отмены.",endDragTouch:"Перетаскивание. Дважды нажмите для отмены.",endDragVirtual:"Перетаскивание. Щелкните для отмены.",insertAfter:t=>`Вставить после ${t.itemText}`,insertBefore:t=>`Вставить перед ${t.itemText}`,insertBetween:t=>`Вставить между ${t.beforeItemText} и ${t.afterItemText}`};var rA={};rA={dragDescriptionKeyboard:"Stlačením klávesu Enter začnete presúvanie.",dragDescriptionKeyboardAlt:"Stlačením klávesov Alt + Enter začnete presúvanie.",dragDescriptionLongPress:"Dlhým stlačením začnete presúvanie.",dragDescriptionTouch:"Dvojitým kliknutím začnete presúvanie.",dragDescriptionVirtual:"Kliknutím začnete presúvanie.",dragItem:t=>`Presunúť položku ${t.itemText}`,dragSelectedItems:(t,e)=>`Presunúť ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybraté položky`})}`,dragSelectedKeyboard:(t,e)=>`Stlačením klávesu Enter presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Stlačením klávesov Alt + Enter presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragSelectedLongPress:(t,e)=>`Dlhým stlačením presuniete ${e.plural(t.count,{one:()=>`${e.number(t.count)} vybratú položku`,other:()=>`${e.number(t.count)} vybratých položiek`})}.`,dragStartedKeyboard:"Presúvanie sa začalo. Do cieľového umiestnenia prejdete stlačením klávesu Tab. Ak chcete položku umiestniť, stlačte kláves Enter alebo stlačte kláves Esc, ak chcete presúvanie zrušiť.",dragStartedTouch:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a dvojitým kliknutím umiestnite položku.",dragStartedVirtual:"Presúvanie sa začalo. Prejdite na cieľové umiestnenie a kliknutím alebo stlačením klávesu Enter umiestnite položku.",dropCanceled:"Umiestnenie zrušené.",dropComplete:"Umiestnenie dokončené.",dropDescriptionKeyboard:"Stlačením klávesu Enter umiestnite položku. Stlačením klávesu Esc zrušíte presúvanie.",dropDescriptionTouch:"Dvojitým kliknutím umiestnite položku.",dropDescriptionVirtual:"Kliknutím umiestnite položku.",dropIndicator:"indikátor umiestnenia",dropOnItem:t=>`Umiestniť na položku ${t.itemText}`,dropOnRoot:"Umiestniť na",endDragKeyboard:"Prebieha presúvanie. Ak ho chcete zrušiť, stlačte kláves Enter.",endDragTouch:"Prebieha presúvanie. Dvojitým kliknutím ho môžete zrušiť.",endDragVirtual:"Prebieha presúvanie.",insertAfter:t=>`Vložiť za položku ${t.itemText}`,insertBefore:t=>`Vložiť pred položku ${t.itemText}`,insertBetween:t=>`Vložiť medzi položky ${t.beforeItemText} a ${t.afterItemText}`};var iA={};iA={dragDescriptionKeyboard:"Pritisnite tipko Enter za začetek vlečenja.",dragDescriptionKeyboardAlt:"Pritisnite tipki Alt + Enter za začetek vlečenja.",dragDescriptionLongPress:"Pritisnite in zadržite za začetek vlečenja.",dragDescriptionTouch:"Dvotapnite za začetek vlečenja.",dragDescriptionVirtual:"Kliknite za začetek vlečenja.",dragItem:t=>`Povleci ${t.itemText}`,dragSelectedItems:(t,e)=>`Povlecite ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbran element`,other:()=>`izbrane elemente (${e.number(t.count)})`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite tipko Enter, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite tipki Alt + Enter, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragSelectedLongPress:(t,e)=>`Pritisnite in zadržite, da povlečete ${e.plural(t.count,{one:()=>`${e.number(t.count)} izbrani element`,other:()=>`${e.number(t.count)} izbranih elementov`})}.`,dragStartedKeyboard:"Vlečenje se je začelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekličete postopek.",dragStartedTouch:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.",dragStartedVirtual:"Vlečenje se je začelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.",dropCanceled:"Spust je preklican.",dropComplete:"Spust je končan.",dropDescriptionKeyboard:"Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekličete vlečenje.",dropDescriptionTouch:"Dvotapnite, da spustite.",dropDescriptionVirtual:"Kliknite, da spustite.",dropIndicator:"indikator spusta",dropOnItem:t=>`Spusti na mesto ${t.itemText}`,dropOnRoot:"Spusti na mesto",endDragKeyboard:"Vlečenje. Pritisnite tipko Enter za preklic vlečenja.",endDragTouch:"Vlečenje. Dvotapnite za preklic vlečenja.",endDragVirtual:"Vlečenje. Kliknite, da prekličete vlečenje.",insertAfter:t=>`Vstavi za ${t.itemText}`,insertBefore:t=>`Vstavi pred ${t.itemText}`,insertBetween:t=>`Vstavi med ${t.beforeItemText} in ${t.afterItemText}`};var oA={};oA={dragDescriptionKeyboard:"Pritisnite Enter da biste započeli prevlačenje.",dragDescriptionKeyboardAlt:"Pritisnite Alt + Enter da biste započeli prevlačenje.",dragDescriptionLongPress:"Pritisnite dugo da biste započeli prevlačenje.",dragDescriptionTouch:"Dvaput dodirnite da biste započeli prevlačenje.",dragDescriptionVirtual:"Kliknite da biste započeli prevlačenje.",dragItem:t=>`Prevucite ${t.itemText}`,dragSelectedItems:(t,e)=>`Prevucite ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabrane stavke`})}`,dragSelectedKeyboard:(t,e)=>`Pritisnite Enter da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Pritisnite Alt + Enter da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragSelectedLongPress:(t,e)=>`Pritisnite dugo da biste prevukli ${e.plural(t.count,{one:()=>`${e.number(t.count)} izabranu stavku`,other:()=>`${e.number(t.count)} izabranih stavki`})}.`,dragStartedKeyboard:"Prevlačenje je započeto. Pritisnite Tab da biste otišli do cilja za otpuštanje, zatim pritisnite Enter za ispuštanje ili pritisnite Escape za otkazivanje.",dragStartedTouch:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim dvaput dodirnite za otpuštanje.",dragStartedVirtual:"Prevlačenje je započeto. Idite do cilja za otpuštanje, a zatim kliknite ili pritinite Enter za otpuštanje.",dropCanceled:"Otpuštanje je otkazano.",dropComplete:"Prevlačenje je završeno.",dropDescriptionKeyboard:"Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlačenje.",dropDescriptionTouch:"Dvaput dodirnite za otpuštanje.",dropDescriptionVirtual:"Kliknite za otpuštanje.",dropIndicator:"Indikator otpuštanja",dropOnItem:t=>`Otpusti na ${t.itemText}`,dropOnRoot:"Otpusti na",endDragKeyboard:"Prevlačenje u toku. Pritisnite Enter da biste otkazali prevlačenje.",endDragTouch:"Prevlačenje u toku. Dvaput dodirnite da biste otkazali prevlačenje.",endDragVirtual:"Prevlačenje u toku. Kliknite da biste otkazali prevlačenje.",insertAfter:t=>`Umetnite posle ${t.itemText}`,insertBefore:t=>`Umetnite ispred ${t.itemText}`,insertBetween:t=>`Umetnite između ${t.beforeItemText} i ${t.afterItemText}`};var sA={};sA={dragDescriptionKeyboard:"Tryck på enter för att börja dra.",dragDescriptionKeyboardAlt:"Tryck på Alt + Retur för att börja dra.",dragDescriptionLongPress:"Tryck länge för att börja dra.",dragDescriptionTouch:"Dubbeltryck för att börja dra.",dragDescriptionVirtual:"Klicka för att börja dra.",dragItem:t=>`Dra ${t.itemText}`,dragSelectedItems:(t,e)=>`Dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} valt objekt`,other:()=>`${e.number(t.count)} valda objekt`})}`,dragSelectedKeyboard:(t,e)=>`Tryck på Retur för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Tryck på Alt + Retur för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragSelectedLongPress:(t,e)=>`Tryck länge för att dra ${e.plural(t.count,{one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,dragStartedKeyboard:"Börja dra. Tryck på tabb för att navigera till målet, tryck på enter för att släppa eller på escape för att avbryta.",dragStartedTouch:"Börja dra. Navigera till ett mål och dubbeltryck för att släppa.",dragStartedVirtual:"Börja dra. Navigera till ett mål och klicka eller tryck på enter för att släppa.",dropCanceled:"Släppåtgärd avbröts.",dropComplete:"Släppåtgärd klar.",dropDescriptionKeyboard:"Tryck på enter för att släppa. Tryck på escape för att avbryta dragåtgärd.",dropDescriptionTouch:"Dubbeltryck för att släppa.",dropDescriptionVirtual:"Klicka för att släppa.",dropIndicator:"släppindikator",dropOnItem:t=>`Släpp på ${t.itemText}`,dropOnRoot:"Släpp på",endDragKeyboard:"Drar. Tryck på enter för att avbryta dragåtgärd.",endDragTouch:"Drar. Dubbeltryck för att avbryta dragåtgärd.",endDragVirtual:"Drar. Klicka för att avbryta dragåtgärd.",insertAfter:t=>`Infoga efter ${t.itemText}`,insertBefore:t=>`Infoga före ${t.itemText}`,insertBetween:t=>`Infoga mellan ${t.beforeItemText} och ${t.afterItemText}`};var aA={};aA={dragDescriptionKeyboard:"Sürüklemeyi başlatmak için Enter'a basın.",dragDescriptionKeyboardAlt:"Sürüklemeyi başlatmak için Alt + Enter'a basın.",dragDescriptionLongPress:"Sürüklemeye başlamak için uzun basın.",dragDescriptionTouch:"Sürüklemeyi başlatmak için çift tıklayın.",dragDescriptionVirtual:"Sürüklemeyi başlatmak için tıklayın.",dragItem:t=>`${t.itemText}’i sürükle`,dragSelectedItems:(t,e)=>`Sürükle ${e.plural(t.count,{one:()=>`${e.number(t.count)} seçili öge`,other:()=>`${e.number(t.count)} seçili öge`})}`,dragSelectedKeyboard:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için Enter'a basın.`,dragSelectedKeyboardAlt:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için Alt + Enter tuşuna basın.`,dragSelectedLongPress:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} seçilmiş öğe`,other:()=>`${e.number(t.count)} seçilmiş öğe`})} öğesini sürüklemek için uzun basın.`,dragStartedKeyboard:"Sürükleme başlatıldı. Bir bırakma hedefine gitmek için Tab’a basın, ardından bırakmak için Enter’a basın veya iptal etmek için Escape’e basın.",dragStartedTouch:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.",dragStartedVirtual:"Sürükleme başlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enter’a tıklayın veya basın.",dropCanceled:"Bırakma iptal edildi.",dropComplete:"Bırakma tamamlandı.",dropDescriptionKeyboard:"Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.",dropDescriptionTouch:"Bırakmak için çift tıklayın.",dropDescriptionVirtual:"Bırakmak için tıklayın.",dropIndicator:"bırakma göstergesi",dropOnItem:t=>`${t.itemText} üzerine bırak`,dropOnRoot:"Bırakın",endDragKeyboard:"Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.",endDragTouch:"Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.",endDragVirtual:"Sürükleme. Sürüklemeyi iptal etmek için tıklayın.",insertAfter:t=>`${t.itemText}’den sonra gir`,insertBefore:t=>`${t.itemText}’den önce gir`,insertBetween:t=>`${t.beforeItemText} ve ${t.afterItemText} arasına gir`};var lA={};lA={dragDescriptionKeyboard:"Натисніть Enter, щоб почати перетягування.",dragDescriptionKeyboardAlt:"Натисніть Alt + Enter, щоб почати перетягування.",dragDescriptionLongPress:"Натисніть і утримуйте, щоб почати перетягування.",dragDescriptionTouch:"Натисніть двічі, щоб почати перетягування.",dragDescriptionVirtual:"Натисніть, щоб почати перетягування.",dragItem:t=>`Перетягнути ${t.itemText}`,dragSelectedItems:(t,e)=>`Перетягніть ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елем`})}`,dragSelectedKeyboard:(t,e)=>`Натисніть Enter, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragSelectedKeyboardAlt:(t,e)=>`Натисніть Alt + Enter, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragSelectedLongPress:(t,e)=>`Утримуйте, щоб перетягнути ${e.plural(t.count,{one:()=>`${e.number(t.count)} вибраний елемент`,other:()=>`${e.number(t.count)} вибраних елементи(-ів)`})}.`,dragStartedKeyboard:"Перетягування почалося. Натисніть Tab, щоб перейти до цілі перетягування, потім натисніть Enter, щоб перетягнути, або Escape, щоб скасувати.",dragStartedTouch:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть двічі, щоб перетягнути.",dragStartedVirtual:"Перетягування почалося. Перейдіть до цілі перетягування, потім натисніть Enter, щоб перетягнути.",dropCanceled:"Перетягування скасовано.",dropComplete:"Перетягування завершено.",dropDescriptionKeyboard:"Натисніть Enter, щоб перетягнути. Натисніть Escape, щоб скасувати перетягування.",dropDescriptionTouch:"Натисніть двічі, щоб перетягнути.",dropDescriptionVirtual:"Натисніть, щоб перетягнути.",dropIndicator:"індикатор перетягування",dropOnItem:t=>`Перетягнути на ${t.itemText}`,dropOnRoot:"Перетягнути на",endDragKeyboard:"Триває перетягування. Натисніть Enter, щоб скасувати перетягування.",endDragTouch:"Триває перетягування. Натисніть двічі, щоб скасувати перетягування.",endDragVirtual:"Триває перетягування. Натисніть, щоб скасувати перетягування.",insertAfter:t=>`Вставити після ${t.itemText}`,insertBefore:t=>`Вставити перед ${t.itemText}`,insertBetween:t=>`Вставити між ${t.beforeItemText} і ${t.afterItemText}`};var uA={};uA={dragDescriptionKeyboard:"按 Enter 开始拖动。",dragDescriptionKeyboardAlt:"按 Alt + Enter 开始拖动。",dragDescriptionLongPress:"长按以开始拖动。",dragDescriptionTouch:"双击开始拖动。",dragDescriptionVirtual:"单击开始拖动。",dragItem:t=>`拖动 ${t.itemText}`,dragSelectedItems:(t,e)=>`拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 选中项目`,other:()=>`${e.number(t.count)} 选中项目`})}`,dragSelectedKeyboard:(t,e)=>`按 Enter 以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragSelectedKeyboardAlt:(t,e)=>`按 Alt + Enter 以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragSelectedLongPress:(t,e)=>`长按以拖动 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 个选定项`,other:()=>`${e.number(t.count)} 个选定项`})}。`,dragStartedKeyboard:"已开始拖动。按 Tab 导航到放置目标,然后按 Enter 放置或按 Escape 取消。",dragStartedTouch:"已开始拖动。导航到放置目标,然后双击放置。",dragStartedVirtual:"已开始拖动。导航到放置目标,然后单击或按 Enter 放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 放置。按 Escape 取消拖动。",dropDescriptionTouch:"双击放置。",dropDescriptionVirtual:"单击放置。",dropIndicator:"放置标记",dropOnItem:t=>`放置于 ${t.itemText}`,dropOnRoot:"放置于",endDragKeyboard:"正在拖动。按 Enter 取消拖动。",endDragTouch:"正在拖动。双击取消拖动。",endDragVirtual:"正在拖动。单击取消拖动。",insertAfter:t=>`插入到 ${t.itemText} 之后`,insertBefore:t=>`插入到 ${t.itemText} 之前`,insertBetween:t=>`插入到 ${t.beforeItemText} 和 ${t.afterItemText} 之间`};var cA={};cA={dragDescriptionKeyboard:"按 Enter 鍵以開始拖曳。",dragDescriptionKeyboardAlt:"按 Alt+Enter 鍵以開始拖曳。",dragDescriptionLongPress:"長按以開始拖曳。",dragDescriptionTouch:"輕點兩下以開始拖曳。",dragDescriptionVirtual:"按一下滑鼠以開始拖曳。",dragItem:t=>`拖曳「${t.itemText}」`,dragSelectedItems:(t,e)=>`拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}`,dragSelectedKeyboard:(t,e)=>`按 Enter 鍵以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragSelectedKeyboardAlt:(t,e)=>`按 Alt+Enter 鍵以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragSelectedLongPress:(t,e)=>`長按以拖曳 ${e.plural(t.count,{one:()=>`${e.number(t.count)} 個選定項目`,other:()=>`${e.number(t.count)} 個選定項目`})}。`,dragStartedKeyboard:"已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。",dragStartedTouch:"已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。",dragStartedVirtual:"已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。",dropCanceled:"放置已取消。",dropComplete:"放置已完成。",dropDescriptionKeyboard:"按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。",dropDescriptionTouch:"輕點兩下以放置。",dropDescriptionVirtual:"按一下滑鼠以放置。",dropIndicator:"放置指示器",dropOnItem:t=>`放置在「${t.itemText}」上`,dropOnRoot:"放置在",endDragKeyboard:"拖曳中。按 Enter 鍵以取消拖曳。",endDragTouch:"拖曳中。輕點兩下以取消拖曳。",endDragVirtual:"拖曳中。按一下滑鼠以取消拖曳。",insertAfter:t=>`插入至「${t.itemText}」之後`,insertBefore:t=>`插入至「${t.itemText}」之前`,insertBetween:t=>`插入至「${t.beforeItemText}」和「${t.afterItemText}」之間`};var Yc={};Yc={"ar-AE":MT,"bg-BG":RT,"cs-CZ":PT,"da-DK":OT,"de-DE":NT,"el-GR":LT,"en-US":zT,"es-ES":IT,"et-EE":FT,"fi-FI":KT,"fr-FR":_T,"he-IL":jT,"hr-HR":HT,"hu-HU":VT,"it-IT":UT,"ja-JP":qT,"ko-KR":GT,"lt-LT":WT,"lv-LV":QT,"nb-NO":YT,"nl-NL":XT,"pl-PL":JT,"pt-BR":ZT,"pt-PT":eA,"ro-RO":tA,"ru-RU":nA,"sk-SK":rA,"sl-SI":iA,"sr-SP":oA,"sv-SE":sA,"tr-TR":aA,"uk-UA":lA,"zh-CN":uA,"zh-TW":cA};function CK(t){return t&&t.__esModule?t.default:t}const EK={keyboard:"dropDescriptionKeyboard",touch:"dropDescriptionTouch",virtual:"dropDescriptionVirtual"};function dA(){let t=pr(CK(Yc),"@react-aria/dnd"),e=b3(),n=y3();return{dropProps:{...Wc(n?t.format(EK[e]):""),onClick:()=>{}}}}const DK=800;function kK(t){let{hasDropButton:e,isDisabled:n}=t,[r,i]=k.useState(!1),o=k.useRef({x:0,y:0,dragOverElements:new Set,dropEffect:"none",allowedOperations:wt.all,dropActivateTimer:void 0}).current,a=$=>{if(i(!0),typeof t.onDropEnter=="function"){let T=$.currentTarget.getBoundingClientRect();t.onDropEnter({type:"dropenter",x:$.clientX-T.x,y:$.clientY-T.y})}},u=$=>{if(i(!1),typeof t.onDropExit=="function"){let T=$.currentTarget.getBoundingClientRect();t.onDropExit({type:"dropexit",x:$.clientX-T.x,y:$.clientY-T.y})}},c=$=>{$.preventDefault(),$.stopPropagation();let T=v2($);if($.clientX===o.x&&$.clientY===o.y&&T===o.allowedOperations){$.dataTransfer.dropEffect=o.dropEffect;return}o.x=$.clientX,o.y=$.clientY;let A=o.dropEffect;if(T!==o.allowedOperations){let O=mb(T),M=O[0];if(typeof t.getDropOperation=="function"){let P=new Of($.dataTransfer);M=Nf(T,t.getDropOperation(P,O))}o.dropEffect=hb[M]||"none"}if(typeof t.getDropOperationForPoint=="function"){let O=new Of($.dataTransfer),M=$.currentTarget.getBoundingClientRect(),P=Nf(T,t.getDropOperationForPoint(O,mb(T),o.x-M.x,o.y-M.y));o.dropEffect=hb[P]||"none"}if(o.allowedOperations=T,$.dataTransfer.dropEffect=o.dropEffect,o.dropEffect==="none"&&A!=="none"?u($):o.dropEffect!=="none"&&A==="none"&&a($),typeof t.onDropMove=="function"&&o.dropEffect!=="none"){let O=$.currentTarget.getBoundingClientRect();t.onDropMove({type:"dropmove",x:o.x-O.x,y:o.y-O.y})}if(clearTimeout(o.dropActivateTimer),t.onDropActivate&&typeof t.onDropActivate=="function"&&o.dropEffect!=="none"){let O=t.onDropActivate,M=$.currentTarget.getBoundingClientRect();o.dropActivateTimer=setTimeout(()=>{O({type:"dropactivate",x:o.x-M.x,y:o.y-M.y})},DK)}},f=$=>{if($.preventDefault(),$.stopPropagation(),o.dragOverElements.add(de($)),o.dragOverElements.size>1)return;let T=v2($),A=mb(T),O=A[0];if(typeof t.getDropOperation=="function"){let M=new Of($.dataTransfer);O=Nf(T,t.getDropOperation(M,A))}if(typeof t.getDropOperationForPoint=="function"){let M=new Of($.dataTransfer),P=$.currentTarget.getBoundingClientRect();O=Nf(T,t.getDropOperationForPoint(M,A,$.clientX-P.x,$.clientY-P.y))}o.x=$.clientX,o.y=$.clientY,o.allowedOperations=T,o.dropEffect=hb[O]||"none",$.dataTransfer.dropEffect=o.dropEffect,O!=="cancel"&&a($)},h=$=>{$.preventDefault(),$.stopPropagation();let T=de($);if(o.dragOverElements.delete(T),T===$.currentTarget)for(let A of o.dragOverElements)$e($.currentTarget,A)||o.dragOverElements.delete(A);o.dragOverElements.size>0||(o.dropEffect!=="none"&&u($),clearTimeout(o.dropActivateTimer))},m=$=>{if($.preventDefault(),$.stopPropagation(),Fh(o.dropEffect),typeof t.onDrop=="function"){let A=nc[o.dropEffect],O=sK($.dataTransfer),M=$.currentTarget.getBoundingClientRect(),P={type:"drop",x:$.clientX-M.x,y:$.clientY-M.y,items:O,dropOperation:A};t.onDrop(P)}let T={...Nt};o.dragOverElements.clear(),u($),clearTimeout(o.dropActivateTimer),T.draggingCollectionRef==null?Fh(void 0):fK(T)},g=At($=>{typeof t.onDropEnter=="function"&&t.onDropEnter($)}),b=At($=>{typeof t.onDropExit=="function"&&t.onDropExit($)}),v=At($=>{typeof t.onDropActivate=="function"&&t.onDropActivate($)}),C=At($=>{typeof t.onDrop=="function"&&t.onDrop($)}),E=At(($,T)=>t.getDropOperation?t.getDropOperation($,T):T[0]),{ref:D}=t;Le(()=>{if(!(n||!D.current))return BT({element:D.current,getDropOperation:E,onDropEnter($){i(!0),g($)},onDropExit($){i(!1),b($)},onDrop:C,onDropActivate:v})},[n,D]);let{dropProps:w}=dA();return n?{dropProps:{},dropButtonProps:{isDisabled:!0},isDropTarget:!1}:{dropProps:{...!e&&w,onDragEnter:f,onDragOver:c,onDragLeave:h,onDrop:m},dropButtonProps:{...e&&w},isDropTarget:r}}function v2(t){let e=ET[t.dataTransfer.effectAllowed];I0&&(e&=I0);let n=wt.none;return Mo()?(t.altKey&&(n|=wt.copy),t.ctrlKey&&!qy()&&(n|=wt.link),t.metaKey&&(n|=wt.move)):(t.altKey&&(n|=wt.link),t.shiftKey&&(n|=wt.move),t.ctrlKey&&(n|=wt.copy)),n?e&n:e}function mb(t){let e=[];return t&wt.move&&e.push("move"),t&wt.copy&&e.push("copy"),t&wt.link&&e.push("link"),e}function Nf(t,e){let n=wt[e];return t&n?e:"cancel"}const v3=new WeakMap;function K0(t,e){let{id:n}=v3.get(t)??{};if(!n)throw new Error("Unknown list");return`${n}-${SK(e)}`}function SK(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}var fA={};fA={deselectedItem:t=>`${t.item} غير المحدد`,longPressToSelect:"اضغط مطولًا للدخول إلى وضع التحديد.",select:"تحديد",selectedAll:"جميع العناصر المحددة.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"لم يتم تحديد عناصر",one:()=>`${e.number(t.count)} عنصر محدد`,other:()=>`${e.number(t.count)} عنصر محدد`})}.`,selectedItem:t=>`${t.item} المحدد`};var hA={};hA={deselectedItem:t=>`${t.item} не е избран.`,longPressToSelect:"Натиснете и задръжте за да влезете в избирателен режим.",select:"Изберете",selectedAll:"Всички елементи са избрани.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Няма избрани елементи",one:()=>`${e.number(t.count)} избран елемент`,other:()=>`${e.number(t.count)} избрани елементи`})}.`,selectedItem:t=>`${t.item} избран.`};var pA={};pA={deselectedItem:t=>`Položka ${t.item} není vybrána.`,longPressToSelect:"Dlouhým stisknutím přejdete do režimu výběru.",select:"Vybrat",selectedAll:"Vybrány všechny položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nevybrány žádné položky",one:()=>`Vybrána ${e.number(t.count)} položka`,other:()=>`Vybráno ${e.number(t.count)} položek`})}.`,selectedItem:t=>`Vybrána položka ${t.item}.`};var mA={};mA={deselectedItem:t=>`${t.item} ikke valgt.`,longPressToSelect:"Lav et langt tryk for at aktivere valgtilstand.",select:"Vælg",selectedAll:"Alle elementer valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer valgt",one:()=>`${e.number(t.count)} element valgt`,other:()=>`${e.number(t.count)} elementer valgt`})}.`,selectedItem:t=>`${t.item} valgt.`};var gA={};gA={deselectedItem:t=>`${t.item} nicht ausgewählt.`,longPressToSelect:"Gedrückt halten, um Auswahlmodus zu öffnen.",select:"Auswählen",selectedAll:"Alle Elemente ausgewählt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Keine Elemente ausgewählt",one:()=>`${e.number(t.count)} Element ausgewählt`,other:()=>`${e.number(t.count)} Elemente ausgewählt`})}.`,selectedItem:t=>`${t.item} ausgewählt.`};var bA={};bA={deselectedItem:t=>`Δεν επιλέχθηκε το στοιχείο ${t.item}.`,longPressToSelect:"Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.",select:"Επιλογή",selectedAll:"Επιλέχθηκαν όλα τα στοιχεία.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Δεν επιλέχθηκαν στοιχεία",one:()=>`Επιλέχθηκε ${e.number(t.count)} στοιχείο`,other:()=>`Επιλέχθηκαν ${e.number(t.count)} στοιχεία`})}.`,selectedItem:t=>`Επιλέχθηκε το στοιχείο ${t.item}.`};var yA={};yA={deselectedItem:t=>`${t.item} not selected.`,select:"Select",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"No items selected",one:()=>`${e.number(t.count)} item selected`,other:()=>`${e.number(t.count)} items selected`})}.`,selectedAll:"All items selected.",selectedItem:t=>`${t.item} selected.`,longPressToSelect:"Long press to enter selection mode."};var vA={};vA={deselectedItem:t=>`${t.item} no seleccionado.`,longPressToSelect:"Mantenga pulsado para abrir el modo de selección.",select:"Seleccionar",selectedAll:"Todos los elementos seleccionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ningún elemento seleccionado",one:()=>`${e.number(t.count)} elemento seleccionado`,other:()=>`${e.number(t.count)} elementos seleccionados`})}.`,selectedItem:t=>`${t.item} seleccionado.`};var xA={};xA={deselectedItem:t=>`${t.item} pole valitud.`,longPressToSelect:"Valikurežiimi sisenemiseks vajutage pikalt.",select:"Vali",selectedAll:"Kõik üksused valitud.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Üksusi pole valitud",one:()=>`${e.number(t.count)} üksus valitud`,other:()=>`${e.number(t.count)} üksust valitud`})}.`,selectedItem:t=>`${t.item} valitud.`};var CA={};CA={deselectedItem:t=>`Kohdetta ${t.item} ei valittu.`,longPressToSelect:"Siirry valintatilaan painamalla pitkään.",select:"Valitse",selectedAll:"Kaikki kohteet valittu.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ei yhtään kohdetta valittu",one:()=>`${e.number(t.count)} kohde valittu`,other:()=>`${e.number(t.count)} kohdetta valittu`})}.`,selectedItem:t=>`${t.item} valittu.`};var EA={};EA={deselectedItem:t=>`${t.item} non sélectionné.`,longPressToSelect:"Appuyez de manière prolongée pour passer en mode de sélection.",select:"Sélectionner",selectedAll:"Tous les éléments sélectionnés.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Aucun élément sélectionné",one:()=>`${e.number(t.count)} élément sélectionné`,other:()=>`${e.number(t.count)} éléments sélectionnés`})}.`,selectedItem:t=>`${t.item} sélectionné.`};var DA={};DA={deselectedItem:t=>`${t.item} לא נבחר.`,longPressToSelect:"הקשה ארוכה לכניסה למצב בחירה.",select:"בחר",selectedAll:"כל הפריטים נבחרו.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"לא נבחרו פריטים",one:()=>`פריט ${e.number(t.count)} נבחר`,other:()=>`${e.number(t.count)} פריטים נבחרו`})}.`,selectedItem:t=>`${t.item} נבחר.`};var kA={};kA={deselectedItem:t=>`Stavka ${t.item} nije odabrana.`,longPressToSelect:"Dugo pritisnite za ulazak u način odabira.",select:"Odaberite",selectedAll:"Odabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije odabrana nijedna stavka",one:()=>`Odabrana je ${e.number(t.count)} stavka`,other:()=>`Odabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`Stavka ${t.item} je odabrana.`};var SA={};SA={deselectedItem:t=>`${t.item} nincs kijelölve.`,longPressToSelect:"Nyomja hosszan a kijelöléshez.",select:"Kijelölés",selectedAll:"Az összes elem kijelölve.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Egy elem sincs kijelölve",one:()=>`${e.number(t.count)} elem kijelölve`,other:()=>`${e.number(t.count)} elem kijelölve`})}.`,selectedItem:t=>`${t.item} kijelölve.`};var $A={};$A={deselectedItem:t=>`${t.item} non selezionato.`,longPressToSelect:"Premi a lungo per passare alla modalità di selezione.",select:"Seleziona",selectedAll:"Tutti gli elementi selezionati.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nessun elemento selezionato",one:()=>`${e.number(t.count)} elemento selezionato`,other:()=>`${e.number(t.count)} elementi selezionati`})}.`,selectedItem:t=>`${t.item} selezionato.`};var wA={};wA={deselectedItem:t=>`${t.item} が選択されていません。`,longPressToSelect:"長押しして選択モードを開きます。",select:"選択",selectedAll:"すべての項目を選択しました。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"項目が選択されていません",one:()=>`${e.number(t.count)} 項目を選択しました`,other:()=>`${e.number(t.count)} 項目を選択しました`})}。`,selectedItem:t=>`${t.item} を選択しました。`};var TA={};TA={deselectedItem:t=>`${t.item}이(가) 선택되지 않았습니다.`,longPressToSelect:"선택 모드로 들어가려면 길게 누르십시오.",select:"선택",selectedAll:"모든 항목이 선택되었습니다.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"선택된 항목이 없습니다",one:()=>`${e.number(t.count)}개 항목이 선택되었습니다`,other:()=>`${e.number(t.count)}개 항목이 선택되었습니다`})}.`,selectedItem:t=>`${t.item}이(가) 선택되었습니다.`};var AA={};AA={deselectedItem:t=>`${t.item} nepasirinkta.`,longPressToSelect:"Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",select:"Pasirinkti",selectedAll:"Pasirinkti visi elementai.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nepasirinktas nė vienas elementas",one:()=>`Pasirinktas ${e.number(t.count)} elementas`,other:()=>`Pasirinkta elementų: ${e.number(t.count)}`})}.`,selectedItem:t=>`Pasirinkta: ${t.item}.`};var BA={};BA={deselectedItem:t=>`Vienums ${t.item} nav atlasīts.`,longPressToSelect:"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",select:"Atlasīt",selectedAll:"Atlasīti visi vienumi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nav atlasīts neviens vienums",one:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`,other:()=>`Atlasīto vienumu skaits: ${e.number(t.count)}`})}.`,selectedItem:t=>`Atlasīts vienums ${t.item}.`};var MA={};MA={deselectedItem:t=>`${t.item} er ikke valgt.`,longPressToSelect:"Bruk et langt trykk for å gå inn i valgmodus.",select:"Velg",selectedAll:"Alle elementer er valgt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Ingen elementer er valgt",one:()=>`${e.number(t.count)} element er valgt`,other:()=>`${e.number(t.count)} elementer er valgt`})}.`,selectedItem:t=>`${t.item} er valgt.`};var RA={};RA={deselectedItem:t=>`${t.item} niet geselecteerd.`,longPressToSelect:"Druk lang om de selectiemodus te openen.",select:"Selecteren",selectedAll:"Alle items geselecteerd.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Geen items geselecteerd",one:()=>`${e.number(t.count)} item geselecteerd`,other:()=>`${e.number(t.count)} items geselecteerd`})}.`,selectedItem:t=>`${t.item} geselecteerd.`};var PA={};PA={deselectedItem:t=>`Nie zaznaczono ${t.item}.`,longPressToSelect:"Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",select:"Zaznacz",selectedAll:"Wszystkie zaznaczone elementy.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nie zaznaczono żadnych elementów",one:()=>`${e.number(t.count)} zaznaczony element`,other:()=>`${e.number(t.count)} zaznaczonych elementów`})}.`,selectedItem:t=>`Zaznaczono ${t.item}.`};var OA={};OA={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Mantenha pressionado para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var NA={};NA={deselectedItem:t=>`${t.item} não selecionado.`,longPressToSelect:"Prima continuamente para entrar no modo de seleção.",select:"Selecionar",selectedAll:"Todos os itens selecionados.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nenhum item selecionado",one:()=>`${e.number(t.count)} item selecionado`,other:()=>`${e.number(t.count)} itens selecionados`})}.`,selectedItem:t=>`${t.item} selecionado.`};var LA={};LA={deselectedItem:t=>`${t.item} neselectat.`,longPressToSelect:"Apăsați lung pentru a intra în modul de selectare.",select:"Selectare",selectedAll:"Toate elementele selectate.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Niciun element selectat",one:()=>`${e.number(t.count)} element selectat`,other:()=>`${e.number(t.count)} elemente selectate`})}.`,selectedItem:t=>`${t.item} selectat.`};var zA={};zA={deselectedItem:t=>`${t.item} не выбрано.`,longPressToSelect:"Нажмите и удерживайте для входа в режим выбора.",select:"Выбрать",selectedAll:"Выбраны все элементы.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Нет выбранных элементов",one:()=>`${e.number(t.count)} элемент выбран`,other:()=>`${e.number(t.count)} элементов выбрано`})}.`,selectedItem:t=>`${t.item} выбрано.`};var IA={};IA={deselectedItem:t=>`Nevybraté položky: ${t.item}.`,longPressToSelect:"Dlhším stlačením prejdite do režimu výberu.",select:"Vybrať",selectedAll:"Všetky vybraté položky.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Žiadne vybraté položky",one:()=>`${e.number(t.count)} vybratá položka`,other:()=>`Počet vybratých položiek:${e.number(t.count)}`})}.`,selectedItem:t=>`Vybraté položky: ${t.item}.`};var FA={};FA={deselectedItem:t=>`Element ${t.item} ni izbran.`,longPressToSelect:"Za izbirni način pritisnite in dlje časa držite.",select:"Izberite",selectedAll:"Vsi elementi so izbrani.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Noben element ni izbran",one:()=>`${e.number(t.count)} element je izbran`,other:()=>`${e.number(t.count)} elementov je izbranih`})}.`,selectedItem:t=>`Element ${t.item} je izbran.`};var KA={};KA={deselectedItem:t=>`${t.item} nije izabrano.`,longPressToSelect:"Dugo pritisnite za ulazak u režim biranja.",select:"Izaberite",selectedAll:"Izabrane su sve stavke.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Nije izabrana nijedna stavka",one:()=>`Izabrana je ${e.number(t.count)} stavka`,other:()=>`Izabrano je ${e.number(t.count)} stavki`})}.`,selectedItem:t=>`${t.item} je izabrano.`};var _A={};_A={deselectedItem:t=>`${t.item} ej markerat.`,longPressToSelect:"Tryck länge när du vill öppna väljarläge.",select:"Markera",selectedAll:"Alla markerade objekt.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Inga markerade objekt",one:()=>`${e.number(t.count)} markerat objekt`,other:()=>`${e.number(t.count)} markerade objekt`})}.`,selectedItem:t=>`${t.item} markerat.`};var jA={};jA={deselectedItem:t=>`${t.item} seçilmedi.`,longPressToSelect:"Seçim moduna girmek için uzun basın.",select:"Seç",selectedAll:"Tüm ögeler seçildi.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Hiçbir öge seçilmedi",one:()=>`${e.number(t.count)} öge seçildi`,other:()=>`${e.number(t.count)} öge seçildi`})}.`,selectedItem:t=>`${t.item} seçildi.`};var HA={};HA={deselectedItem:t=>`${t.item} не вибрано.`,longPressToSelect:"Виконайте довге натиснення, щоб перейти в режим вибору.",select:"Вибрати",selectedAll:"Усі елементи вибрано.",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"Жодних елементів не вибрано",one:()=>`${e.number(t.count)} елемент вибрано`,other:()=>`Вибрано елементів: ${e.number(t.count)}`})}.`,selectedItem:t=>`${t.item} вибрано.`};var VA={};VA={deselectedItem:t=>`未选择 ${t.item}。`,longPressToSelect:"长按以进入选择模式。",select:"选择",selectedAll:"已选择所有项目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未选择项目",one:()=>`已选择 ${e.number(t.count)} 个项目`,other:()=>`已选择 ${e.number(t.count)} 个项目`})}。`,selectedItem:t=>`已选择 ${t.item}。`};var UA={};UA={deselectedItem:t=>`未選取「${t.item}」。`,longPressToSelect:"長按以進入選擇模式。",select:"選取",selectedAll:"已選取所有項目。",selectedCount:(t,e)=>`${e.plural(t.count,{"=0":"未選取任何項目",one:()=>`已選取 ${e.number(t.count)} 個項目`,other:()=>`已選取 ${e.number(t.count)} 個項目`})}。`,selectedItem:t=>`已選取「${t.item}」。`};var em={};em={"ar-AE":fA,"bg-BG":hA,"cs-CZ":pA,"da-DK":mA,"de-DE":gA,"el-GR":bA,"en-US":yA,"es-ES":vA,"et-EE":xA,"fi-FI":CA,"fr-FR":EA,"he-IL":DA,"hr-HR":kA,"hu-HU":SA,"it-IT":$A,"ja-JP":wA,"ko-KR":TA,"lt-LT":AA,"lv-LV":BA,"nb-NO":MA,"nl-NL":RA,"pl-PL":PA,"pt-BR":OA,"pt-PT":NA,"ro-RO":LA,"ru-RU":zA,"sk-SK":IA,"sl-SI":FA,"sr-SP":KA,"sv-SE":_A,"tr-TR":jA,"uk-UA":HA,"zh-CN":VA,"zh-TW":UA};function $K(t){return t&&t.__esModule?t.default:t}function wK(t,e){let{getRowText:n=u=>e.collection.getTextValue?.(u)??e.collection.getItem(u)?.textValue}=t,r=pr($K(em),"@react-aria/grid"),i=e.selectionManager.rawSelection,o=k.useRef(i),a=k.useCallback(()=>{if(!e.selectionManager.isFocused||i===o.current){o.current=i;return}let u=x2(i,o.current),c=x2(o.current,i),f=e.selectionManager.selectionBehavior==="replace",h=[];if(e.selectionManager.selectedKeys.size===1&&f){let m=e.selectionManager.selectedKeys.keys().next().value;if(m!=null&&e.collection.getItem(m)){let g=n(m);g&&h.push(r.format("selectedItem",{item:g}))}}else if(u.size===1&&c.size===0){let m=u.keys().next().value;if(m!=null){let g=n(m);g&&h.push(r.format("selectedItem",{item:g}))}}else if(c.size===1&&u.size===0){let m=c.keys().next().value;if(m!=null&&e.collection.getItem(m)){let g=n(m);g&&h.push(r.format("deselectedItem",{item:g}))}}e.selectionManager.selectionMode==="multiple"&&(h.length===0||i==="all"||i.size>1||o.current==="all"||o.current?.size>1)&&h.push(i==="all"?r.format("selectedAll"):r.format("selectedCount",{count:i.size})),h.length>0&&As(h.join(" ")),o.current=i},[i,e.selectionManager.selectedKeys,e.selectionManager.isFocused,e.selectionManager.selectionBehavior,e.selectionManager.selectionMode,e.collection,n,r]);bI(()=>{if(e.selectionManager.isFocused)a();else{let u=requestAnimationFrame(a);return()=>cancelAnimationFrame(u)}},[i,e.selectionManager.isFocused])}function x2(t,e){let n=new Set;if(t==="all"||e==="all")return n;for(let r of t.keys())e.has(r)||n.add(r);return n}function TK(t,e){let n=e?.isDisabled,[r,i]=k.useState(!1);return Le(()=>{if(t?.current&&!n){let o=()=>{if(t.current){let u=ln(t.current,{tabbable:!0});i(!!u.nextNode())}};o();let a=new MutationObserver(o);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}function AK(t){return t&&t.__esModule?t.default:t}function BK(t){let e=pr(AK(em),"@react-aria/grid"),n=IS(),r=(n==="pointer"||n==="virtual"||n==null)&&typeof window<"u"&&"ontouchstart"in window,i=k.useMemo(()=>{let a=t.selectionManager.selectionMode,u=t.selectionManager.selectionBehavior,c;return r&&(c=e.format("longPressToSelect")),u==="replace"&&a!=="none"&&t.hasItemActions?c:void 0},[t.selectionManager.selectionMode,t.selectionManager.selectionBehavior,t.hasItemActions,e,r]);return Wc(i)}function MK(t,e,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:o,onAction:a,disallowTypeAhead:u,linkBehavior:c="action",keyboardNavigationBehavior:f="arrow",escapeKeyBehavior:h="clearSelection",shouldSelectOnPressUp:m}=t;!t["aria-label"]&&!t["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:g}=L6({selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:o,isVirtualized:r,selectOnFocus:e.selectionManager.selectionBehavior==="replace",shouldFocusWrap:t.shouldFocusWrap,linkBehavior:c,disallowTypeAhead:u,autoFocus:t.autoFocus,escapeKeyBehavior:h,UNSTABLE_focusOnEntry:t.UNSTABLE_focusOnEntry}),b=nn(t.id);v3.set(e,{id:b,onAction:a,linkBehavior:c,keyboardNavigationBehavior:f,shouldSelectOnPressUp:m});let v=BK({selectionManager:e.selectionManager,hasItemActions:!!a}),C=TK(n,{isDisabled:e.collection.size!==0}),E=Je(t,{labelable:!0}),D=we(E,{role:"grid",id:b,"aria-multiselectable":e.selectionManager.selectionMode==="multiple"?"true":void 0},e.collection.size===0?{tabIndex:C?-1:0}:g,v);return r&&(D["aria-rowcount"]=e.collection.size,D["aria-colcount"]=1),wK({},e),{gridProps:D}}const C2={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function RK(t,e,n){let{node:r,isVirtualized:i}=t,{direction:o}=Mi(),{onAction:a,linkBehavior:u,keyboardNavigationBehavior:c,shouldSelectOnPressUp:f}=v3.get(e),h=Ks(),m=k.useRef(null),g=()=>{n.current!==null&&(m.current!=null&&r.key!==m.current||!ml(n.current))&&mn(n.current)},b={},v=t.hasChildItems,C=e.selectionManager.isLink(r.key);if(r!=null&&"expandedKeys"in e){let U=e.collection.getChildren?.(r.key);v=v||[...U??[]].length>1,a==null&&!C&&e.selectionManager.selectionMode==="none"&&v&&(a=()=>e.toggleKey(r.key));let ie=v?e.expandedKeys.has(r.key):void 0,F=1,te=r.index;if(r.level>=0&&r?.parentKey!=null){let N=e.collection.getItem(r.parentKey);if(N){let K=PK(N,e.collection);F=[...K].filter(Y=>Y.type==="item").length,te>0&&K[0].type!=="item"&&(te-=1)}}else F=[...e.collection].filter(N=>N.level===0&&N.type==="item").length;b={"aria-expanded":ie,"aria-level":r.level+1,"aria-posinset":te+1,"aria-setsize":F}}let{itemProps:E,...D}=I6({selectionManager:e.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:t.shouldSelectOnPressUp||f,onAction:a||r.props?.onAction?Ko(r.props?.onAction,a?()=>a(r.key):void 0):void 0,focus:g,linkBehavior:u}),w=U=>{let ie=_e();if(!$e(U.currentTarget,de(U))||!n.current||!ie)return;let F=ln(n.current);if(F.currentNode=ie,!E2(U,e,r,v,o,ie,n.current))switch(U.key){case"ArrowLeft":if(c==="arrow"){let te=o==="rtl"?F.nextNode():F.previousNode();if(te)U.preventDefault(),U.stopPropagation(),mn(te),co(te,{containingElement:Hr(n.current)});else if(U.preventDefault(),U.stopPropagation(),o==="rtl")mn(n.current),co(n.current,{containingElement:Hr(n.current)});else{F.currentNode=n.current;let N=D2(F);N&&(mn(N),co(N,{containingElement:Hr(n.current)}))}}break;case"ArrowRight":if(c==="arrow"){let te=o==="rtl"?F.previousNode():F.nextNode();if(te)U.preventDefault(),U.stopPropagation(),mn(te),co(te,{containingElement:Hr(n.current)});else if(U.preventDefault(),U.stopPropagation(),o==="ltr")mn(n.current),co(n.current,{containingElement:Hr(n.current)});else{F.currentNode=n.current;let N=D2(F);N&&(mn(N),co(N,{containingElement:Hr(n.current)}))}}break;case"ArrowUp":case"ArrowDown":!U.altKey&&$e(n.current,de(U))&&(U.stopPropagation(),U.preventDefault(),n.current.parentElement?.dispatchEvent(new KeyboardEvent(U.nativeEvent.type,U.nativeEvent)));break}},$=U=>{if(m.current=r.key,de(U)!==n.current){gl()||e.selectionManager.setFocusedKey(r.key);return}},T=U=>{let ie=_e();if(!(!$e(U.currentTarget,de(U))||!n.current||!ie)){if(c==="tab"){if(de(U)!==n.current&&U.key!=="Tab"){U.stopPropagation();return}if(E2(U,e,r,v,o,ie,n.current))return}switch(U.key){case"Tab":if(c==="tab"){let F=ln(n.current,{tabbable:!0});F.currentNode=ie,(U.shiftKey?F.previousNode():F.nextNode())&&U.stopPropagation()}}}},A=nz(r.props),O=D.hasAction?A:{},M=we(E,O,{role:"row",onKeyDownCapture:c==="arrow"?w:void 0,onFocus:$,"aria-label":r["aria-label"]||r.textValue||void 0,"aria-selected":e.selectionManager.canSelectItem(r.key)?e.selectionManager.isSelected(r.key):void 0,"aria-disabled":e.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":h&&(r["aria-label"]||r.textValue)?`${K0(e,r.key)} ${h}`:void 0,id:K0(e,r.key)}),P=M.onKeyDown;M.onKeyDown=U=>{T(U),U.isPropagationStopped()||P?.(U)};let I=M.onPointerDown;M.onPointerDown=U=>{let ie=de(U);if(ie&&ie!==n.current&&$h(ie)){U.stopPropagation();return}I?.(U)};let G=M.onMouseDown;if(M.onMouseDown=U=>{let ie=de(U);if(ie&&ie!==n.current&&$h(ie)){U.stopPropagation();return}G?.(U)},i){let{collection:U}=e,ie=[...U];M["aria-rowindex"]=ie.find(F=>F.type==="section")?[...U.getKeys()].filter(F=>U.getItem(F)?.type!=="section").findIndex(F=>F===r.key)+1:r.index+1}let J={role:"gridcell","aria-colindex":1};return{rowProps:{...we(M,b)},gridCellProps:J,descriptionProps:{id:h},...D}}function E2(t,e,n,r,i,o,a){if(!("expandedKeys"in e)||o!==a)return!1;if(t.key===C2.expand[i]&&e.selectionManager.focusedKey===n.key&&r&&!e.expandedKeys.has(n.key))return e.toggleKey(n.key),t.stopPropagation(),!0;if(t.key===C2.collapse[i]&&e.selectionManager.focusedKey===n.key){if(r&&e.expandedKeys.has(n.key))return e.toggleKey(n.key),t.stopPropagation(),!0;if(!e.expandedKeys.has(n.key)&&n.parentKey&&e.collection.getItem(n.parentKey)?.type==="item")return e.selectionManager.setFocusedKey(n.parentKey),t.stopPropagation(),!0}return!1}function D2(t){let e=null,n=null;do n=t.lastChild(),n&&(e=n);while(n);return e}function PK(t,e){let n=e.getChildren?.(t.key),r=n?Array.from(n):[],i=r.length>0?r[0]:null,o=[];for(;i;)o.push(i),i=i.nextKey!=null?e.getItem(i.nextKey):null;return o}function OK(t){return t&&t.__esModule?t.default:t}function NK(t,e){let{key:n}=t,r=e.selectionManager,i=nn(),o=!e.selectionManager.canSelectItem(n),a=e.selectionManager.isSelected(n),u=()=>r.toggleSelection(n);const c=pr(OK(em),"@react-aria/grid");return{checkboxProps:{id:i,"aria-label":c.format("select"),isSelected:a,isDisabled:o,onChange:u}}}function LK(t,e){let{key:n}=t;const{checkboxProps:r}=NK(t,e);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${K0(e,n)}`}}}const zK=k.createContext(null),IK=k.forwardRef(function(e,n){return[e,n]=Ct(e,n,zK),H.createElement(Jy,{content:H.createElement(Qp,e)},r=>H.createElement(FK,{props:e,collection:r,gridListRef:n}))});function FK({props:t,collection:e,gridListRef:n}){[t,n]=Ct(t,n,Sc);let{shouldUseVirtualFocus:r,filter:i,disallowTypeAhead:o,UNSTABLE_focusOnEntry:a,...u}=t,{dragAndDropHooks:c,keyboardNavigationBehavior:f="arrow",layout:h="stack",orientation:m="vertical"}=t,{CollectionRoot:g,isVirtualized:b,layoutDelegate:v,dropTargetDelegate:C}=k.useContext(Ro),E=fF({...u,collection:e,children:void 0,layoutDelegate:v}),D=hF(E,i),w=a3({usage:"search",sensitivity:"base"}),{disabledBehavior:$,disabledKeys:T}=D.selectionManager,{direction:A}=Mi(),O=k.useMemo(()=>new N6({collection:D.collection,collator:w,ref:n,disabledKeys:T,disabledBehavior:$,layoutDelegate:v,layout:h,orientation:m,direction:A}),[D.collection,n,h,m,T,$,v,w,A]),{gridProps:M}=MK({...u,keyboardDelegate:O,keyboardNavigationBehavior:h==="grid"?"tab":f,isVirtualized:b,shouldSelectOnPressUp:t.shouldSelectOnPressUp,disallowTypeAhead:o,UNSTABLE_focusOnEntry:a},D,n),P=D.selectionManager,I=!!c?.useDraggableCollectionState,G=!!c?.useDroppableCollectionState;k.useRef(I),k.useRef(G),k.useEffect(()=>{},[I,G]);let J,U,ie,F=!1,te=null,N=k.useRef(null);if(I&&c){J=c.useDraggableCollectionState({collection:D.collection,selectionManager:P,preview:c.renderDragPreview?N:void 0}),c.useDraggableCollection({},J,n);let fe=c.DragPreview;te=c.renderDragPreview?H.createElement(fe,{ref:N},c.renderDragPreview):null}if(G&&c){U=c.useDroppableCollectionState({collection:D.collection,selectionManager:P});let fe=c.dropTargetDelegate||C||new c.ListDropTargetDelegate(e,n,{layout:h,direction:A,orientation:m});ie=c.useDroppableCollection({keyboardDelegate:O,dropTargetDelegate:fe},U,n),F=U.isDropTarget({type:"root"})}let{focusProps:K,isFocused:Y,isFocusVisible:Z}=Po(),j=D.collection.size===0,L={isDropTarget:F,orientation:m,isEmpty:j,isFocused:Y,isFocusVisible:Z,layout:h,state:D},V=Rt({...t,children:void 0,defaultClassName:"react-aria-GridList",values:L}),ne=null,le=null;if(j&&t.renderEmptyState){let fe=t.renderEmptyState(L);ne=H.createElement("div",{role:"row","aria-rowindex":1,style:{display:"contents"}},H.createElement("div",{role:"gridcell",style:{display:"contents"}},fe))}let ue=Je(t,{global:!0});return H.createElement(o3,null,H.createElement(at.div,{...we(ue,V,M,K,ie?.collectionProps,le),ref:n,slot:t.slot||void 0,onScroll:t.onScroll,"data-drop-target":F||void 0,"data-empty":j||void 0,"data-focused":Y||void 0,"data-focus-visible":Z||void 0,"data-layout":h,"data-orientation":m},H.createElement(Ar,{values:[[Tc,D],[Jp,{dragAndDropHooks:c,dragState:J,dropState:U}],[w6,{render:_K}]]},G&&H.createElement(VK,null),H.createElement(r3,null,H.createElement(g,{collection:D.collection,scrollRef:n,persistedKeys:FI(P,c,U),renderDropIndicator:II(c,U)}))),ne,te))}const KK=ra(Mh,function(e,n,r){let i=k.useContext(Tc),{dragAndDropHooks:o,dragState:a,dropState:u}=k.useContext(Jp),c=jo(n),{isVirtualized:f}=k.useContext(Ro),h=a&&!(a.isDisabled||a.selectionManager.isDisabled(r.key)),{rowProps:m,gridCellProps:g,descriptionProps:b,...v}=RK({node:r,shouldSelectOnPressUp:!!a,isVirtualized:f},i,c),{hoverProps:C,isHovered:E}=Vo({isDisabled:!v.allowsSelection&&!v.hasAction&&!h,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{isFocusVisible:D,focusProps:w}=Po(),{isFocusVisible:$,focusProps:T}=Po({within:!0}),{checkboxProps:A}=LK({key:r.key},i),O=i.selectionManager.disabledBehavior==="all"&&v.isDisabled?{isDisabled:!0}:{},M=null;a&&o&&(M=o.useDraggableItem({key:r.key,hasDragButton:!0},a));let P=null,I=k.useRef(null),{visuallyHiddenProps:G}=Xp();u&&o&&(P=o.useDropIndicator({target:{type:"item",key:r.key,dropPosition:"on"}},u,I));let J=a&&a.isDragging(r.key),U=Rt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-GridListItem",values:{...v,isHovered:E,isFocusVisible:D,isFocusVisibleWithin:$,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:J,isDropTarget:P?.isDropTarget,id:r.key,state:i}}),ie=k.useRef(null);k.useEffect(()=>{a&&!ie.current&&console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.')},[]),k.useEffect(()=>{r.textValue},[r.textValue]);let F=Je(e,{global:!0});return delete F.id,delete F.onClick,H.createElement(H.Fragment,null,P&&!P.isHidden&&H.createElement("div",{role:"row",style:{position:"absolute"}},H.createElement("div",{role:"gridcell"},H.createElement("div",{role:"button",...G,...P?.dropIndicatorProps,ref:I}))),H.createElement(at.div,{...we(F,U,m,w,T,C,M?.dragProps),ref:c,"data-selected":v.isSelected||void 0,"data-disabled":v.isDisabled||void 0,"data-hovered":E||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":D||void 0,"data-focus-visible-within":$||void 0,"data-pressed":v.isPressed||void 0,"data-allows-dragging":!!a||void 0,"data-dragging":J||void 0,"data-drop-target":P?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},H.createElement("div",{...g,style:{display:"contents"}},H.createElement(Ar,{values:[[PI,{slots:{[vo]:{},selection:A}}],[OI,{slots:{[vo]:{},selection:A}}],[Yp,{slots:{[vo]:O,drag:{...M?.dragButtonProps,ref:ie,style:{pointerEvents:"none"}}}}],[n3,{slots:{[vo]:{},description:b}}],[Ro,P$],[Tc,null],[Sc,null],[qp,null],[i3,{isSelected:v.isSelected}]]},U.children))))});function _K(t,e){e=jo(e);let{dragAndDropHooks:n,dropState:r}=k.useContext(Jp),i=k.useRef(null),{dropIndicatorProps:o,isHidden:a,isDropTarget:u}=n.useDropIndicator(t,r,i);return a?null:H.createElement(HK,{...t,dropIndicatorProps:o,isDropTarget:u,buttonRef:i,ref:e})}function jK(t,e){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,...o}=t,{visuallyHiddenProps:a}=Xp(),u=Rt({...o,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:r}});return H.createElement(at.div,{...u,role:"row",ref:e,"data-drop-target":r||void 0},H.createElement("div",{role:"gridcell"},H.createElement("div",{...a,role:"button",...n,ref:i}),u.children))}const HK=k.forwardRef(jK);function VK(){let{dragAndDropHooks:t,dropState:e}=k.useContext(Jp),n=k.useRef(null),{dropIndicatorProps:r}=t.useDropIndicator({target:{type:"root"}},e,n),i=e.isDropTarget({type:"root"}),{visuallyHiddenProps:o}=Xp();return!i&&r["aria-hidden"]?null:H.createElement("div",{role:"row","aria-hidden":r["aria-hidden"],style:{position:"absolute"}},H.createElement("div",{role:"gridcell"},H.createElement("div",{role:"button",...o,...r,ref:n})))}ra(Bh,function(e,n,r){let i=k.useContext(Tc),{isVirtualized:o}=k.useContext(Ro),{isLoading:a,onLoadMore:u,scrollOffset:c,...f}=e,h=k.useRef(null),m=k.useMemo(()=>({onLoadMore:u,collection:i?.collection,sentinelRef:h,scrollOffset:c}),[u,c,i?.collection]);H6(m,h);let g=Rt({...f,id:void 0,children:r.rendered,defaultClassName:"react-aria-GridListLoadingIndicator",values:void 0});return H.createElement(H.Fragment,null,H.createElement("div",{style:{position:"relative",width:0,height:0},inert:K6(!0)},H.createElement("div",{"data-testid":"loadMoreSentinel",ref:h,style:{position:"absolute",height:1,width:1}})),a&&g.children&&H.createElement(at.div,{...g,...Je(e,{global:!0}),role:"row",ref:n},H.createElement("div",{"aria-colindex":o?1:void 0,role:"gridcell"},g.children)))});function UK(t,e,n){let{overlayProps:r,underlayProps:i}=q6({...t,isOpen:e.isOpen,onClose:e.close},n);return G6({isDisabled:!e.isOpen}),Mw(),k.useEffect(()=>{if(e.isOpen&&n.current)return u3([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:we(r),underlayProps:i}}let Rn=typeof document<"u"&&window.visualViewport;function qK(){let t=_o(),[e,n]=k.useState(()=>t?{width:0,height:0}:gb());return k.useEffect(()=>{let r=u=>{n(c=>u.width===c.width&&u.height===c.height?c:u)},i=()=>{Rn&&Rn.scale>1||r(gb())},o,a=u=>{Rn&&Rn.scale>1||ec(de(u))&&(o=requestAnimationFrame(()=>{let c=_e();(!c||!ec(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(gb()),Ti()&&window.addEventListener("blur",a,!0),Rn?Rn.addEventListener("resize",i):window.addEventListener("resize",i),()=>{cancelAnimationFrame(o),Ti()&&window.removeEventListener("blur",a,!0),Rn?Rn.removeEventListener("resize",i):window.removeEventListener("resize",i)}},[]),e}function gb(){return{width:Rn?Math.min(Rn.width*Rn.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:Rn?Rn.height*Rn.scale:document.documentElement.clientHeight}}const GK=k.createContext(null),x3=k.createContext(null),WK=k.forwardRef(function(e,n){if(k.useContext(x3))return H.createElement(k2,{...e,modalRef:n},e.children);let{isDismissable:i,isKeyboardDismissDisabled:o,isOpen:a,defaultOpen:u,onOpenChange:c,children:f,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b,...v}=e;return H.createElement(qA,{isDismissable:i,isKeyboardDismissDisabled:o,isOpen:a,defaultOpen:u,onOpenChange:c,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b},H.createElement(k2,{...v,modalRef:n},f))});function QK(t,e){[t,e]=Ct(t,e,GK);let n=k.useContext(ia),r=c3(t),i=t.isOpen!=null||t.defaultOpen!=null||!n?r:n,o=jo(e),a=k.useRef(null),u=L0(o,i.isOpen),c=L0(a,i.isOpen),f=u||c||t.isExiting||!1,h=_o();return!i.isOpen&&!f||h?null:H.createElement(YK,{...t,state:i,isExiting:f,overlayRef:o,modalRef:a})}const qA=k.forwardRef(QK);function YK({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:i,underlayProps:o}=UK(e,r,n),a=d3(e.overlayRef)||e.isEntering||!1,u=Rt({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:e.isExiting,state:r}}),c=qK(),f,h;if(typeof document<"u"){let g=Oo(document.body)?document.body:document.scrollingElement||document.documentElement,b=g.getBoundingClientRect().width%1,v=g.getBoundingClientRect().height%1;f=g.scrollWidth-b,h=g.scrollHeight-v}let m={...u.style,"--visual-viewport-width":c.width+"px","--visual-viewport-height":c.height+"px","--page-width":f!==void 0?f+"px":void 0,"--page-height":h!==void 0?h+"px":void 0};return H.createElement(N0,{isExiting:e.isExiting,portalContainer:t},H.createElement(at.div,{...we(Je(e,{global:!0}),o),...u,style:m,ref:e.overlayRef,"data-entering":a||void 0,"data-exiting":e.isExiting||void 0},H.createElement(Ar,{values:[[x3,{modalProps:i,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[ia,r]]},u.children)))}function k2(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:i}=k.useContext(x3),o=k.useContext(ia),a=k.useMemo(()=>Uc(t.modalRef,n),[t.modalRef,n]),u=jo(a),c=d3(u),f=Rt({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:o}});return H.createElement(at.div,{...we(Je(t,{global:!0}),e),...f,ref:u,"data-entering":c||void 0,"data-exiting":r||void 0},i&&H.createElement(O0,{onDismiss:o.close}),f.children)}var GA={};GA={"Clear search":"مسح البحث"};var WA={};WA={"Clear search":"Изчистване на търсене"};var QA={};QA={"Clear search":"Vymazat hledání"};var YA={};YA={"Clear search":"Ryd søgning"};var XA={};XA={"Clear search":"Suche zurücksetzen"};var JA={};JA={"Clear search":"Απαλοιφή αναζήτησης"};var ZA={};ZA={"Clear search":"Clear search"};var eB={};eB={"Clear search":"Borrar búsqueda"};var tB={};tB={"Clear search":"Tühjenda otsing"};var nB={};nB={"Clear search":"Tyhjennä haku"};var rB={};rB={"Clear search":"Effacer la recherche"};var iB={};iB={"Clear search":"נקה חיפוש"};var oB={};oB={"Clear search":"Obriši pretragu"};var sB={};sB={"Clear search":"Keresés törlése"};var aB={};aB={"Clear search":"Cancella ricerca"};var lB={};lB={"Clear search":"検索をクリア"};var uB={};uB={"Clear search":"검색 지우기"};var cB={};cB={"Clear search":"Išvalyti iešką"};var dB={};dB={"Clear search":"Notīrīt meklēšanu"};var fB={};fB={"Clear search":"Tøm søk"};var hB={};hB={"Clear search":"Zoekactie wissen"};var pB={};pB={"Clear search":"Wyczyść zawartość wyszukiwania"};var mB={};mB={"Clear search":"Limpar pesquisa"};var gB={};gB={"Clear search":"Limpar pesquisa"};var bB={};bB={"Clear search":"Ştergeţi căutarea"};var yB={};yB={"Clear search":"Очистить поиск"};var vB={};vB={"Clear search":"Vymazať vyhľadávanie"};var xB={};xB={"Clear search":"Počisti iskanje"};var CB={};CB={"Clear search":"Obriši pretragu"};var EB={};EB={"Clear search":"Rensa sökning"};var DB={};DB={"Clear search":"Aramayı temizle"};var kB={};kB={"Clear search":"Очистити пошук"};var SB={};SB={"Clear search":"清除搜索"};var $B={};$B={"Clear search":"清除搜尋條件"};var wB={};wB={"ar-AE":GA,"bg-BG":WA,"cs-CZ":QA,"da-DK":YA,"de-DE":XA,"el-GR":JA,"en-US":ZA,"es-ES":eB,"et-EE":tB,"fi-FI":nB,"fr-FR":rB,"he-IL":iB,"hr-HR":oB,"hu-HU":sB,"it-IT":aB,"ja-JP":lB,"ko-KR":uB,"lt-LT":cB,"lv-LV":dB,"nb-NO":fB,"nl-NL":hB,"pl-PL":pB,"pt-BR":mB,"pt-PT":gB,"ro-RO":bB,"ru-RU":yB,"sk-SK":vB,"sl-SI":xB,"sr-SP":CB,"sv-SE":EB,"tr-TR":DB,"uk-UA":kB,"zh-CN":SB,"zh-TW":$B};function XK(t){return t&&t.__esModule?t.default:t}function JK(t,e,n){let r=pr(XK(wB),"@react-aria/searchfield"),{isDisabled:i,isReadOnly:o,onSubmit:a,onClear:u,type:c="search"}=t,f=D=>{const w=D.key;w==="Enter"&&(i||o)&&D.preventDefault(),!(i||o)&&(w==="Enter"&&a&&(D.preventDefault(),a(e.value)),w==="Escape"&&(e.value===""&&(!n.current||n.current.value==="")?D.continuePropagation():(D.preventDefault(),e.setValue(""),u&&u())))},h=()=>{e.setValue(""),u&&u()},m=()=>{n.current?.focus()},{labelProps:g,inputProps:b,descriptionProps:v,errorMessageProps:C,...E}=zI({...t,value:e.value,onChange:e.setValue,onKeyDown:o?t.onKeyDown:Ko(f,t.onKeyDown),type:c},n);return{labelProps:g,inputProps:{...b,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:i||o,onPress:h,onPressStart:m},descriptionProps:v,errorMessageProps:C,...E}}function ZK(t){let[e,n]=Ho(S2(t.value),S2(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function S2(t){if(t!=null)return t.toString()}const e_=k.createContext(null),t_=Wp(function(e,n){[e,n]=Ct(e,n,e_);let{validationBehavior:r}=wl(SI)||{},i=e.validationBehavior??r??"native",o=k.useRef(null);[e,o]=Ct(e,o,qp);let[a,u]=xS(!e["aria-label"]&&!e["aria-labelledby"]),c=ZK({...e,validationBehavior:i}),{labelProps:f,inputProps:h,clearButtonProps:m,descriptionProps:g,errorMessageProps:b,...v}=JK({...CS(e),label:u,validationBehavior:i},c,o),C=Rt({...e,values:{isEmpty:c.value==="",isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,state:c},defaultClassName:"react-aria-SearchField"}),E=Je(e,{global:!0});return delete E.id,H.createElement(at.div,{...E,...C,ref:n,slot:e.slot||void 0,"data-empty":c.value===""||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":v.isInvalid||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0},H.createElement(Ar,{values:[[t3,{...f,ref:a}],[S6,{...h,ref:o}],[Yp,m],[n3,{slots:{description:g,errorMessage:b}}],[k6,{isInvalid:v.isInvalid,isDisabled:e.isDisabled||!1}],[xI,v]]},C.children))});function TB(t,e,n){const{isSelected:r}=e,{isPressed:i,buttonProps:o}=v6({...t,onPress:Ko(e.toggle,t.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:t.isDisabled||!1,buttonProps:we(o,{"aria-pressed":r})}}function n_(t,e){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=t;let[o,a]=k.useState(!1);Le(()=>{a(!!(e.current&&e.current.parentElement?.closest('[role="toolbar"]')))});const{direction:u}=Mi(),c=u==="rtl"&&i==="horizontal";let f=ZI(e);const h=v=>{if($e(v.currentTarget,de(v))){if(i==="horizontal"&&v.key==="ArrowRight"||i==="vertical"&&v.key==="ArrowDown")c?f.focusPrevious():f.focusNext();else if(i==="horizontal"&&v.key==="ArrowLeft"||i==="vertical"&&v.key==="ArrowUp")c?f.focusNext():f.focusPrevious();else if(v.key==="Tab"){m.current=_e(),v.shiftKey?f.focusFirst():f.focusLast();return}else return;v.stopPropagation(),v.preventDefault()}},m=k.useRef(null),g=v=>{!$e(v.currentTarget,v.relatedTarget)&&!m.current&&(m.current=de(v))},b=v=>{m.current&&!$e(v.currentTarget,v.relatedTarget)&&$e(e.current,de(v))&&(m.current?.focus(),m.current=null)};return{toolbarProps:{...Je(t,{labelable:!0}),role:o?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:o?void 0:h,onFocusCapture:o?void 0:b,onBlurCapture:o?void 0:g}}}function r_(t,e,n){let{isDisabled:r}=t,{toolbarProps:i}=n_(t,n);return{groupProps:{...i,role:e.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function i_(t,e,n){let r={isSelected:e.selectedKeys.has(t.id),defaultSelected:!1,setSelected(c){e.setSelected(t.id,c)},toggle(){e.toggleKey(t.id)}},{isPressed:i,isSelected:o,isDisabled:a,buttonProps:u}=TB({...t,id:void 0,isDisabled:t.isDisabled||e.isDisabled},r,n);return e.selectionMode==="single"&&(u.role="radio",u["aria-checked"]=r.isSelected,delete u["aria-pressed"]),{isPressed:i,isSelected:o,isDisabled:a,buttonProps:u}}function o_(t){let{selectionMode:e="single",disallowEmptySelection:n,isDisabled:r=!1}=t,[i,o]=Ho(k.useMemo(()=>t.selectedKeys?new Set(t.selectedKeys):void 0,[t.selectedKeys]),k.useMemo(()=>t.defaultSelectedKeys?new Set(t.defaultSelectedKeys):new Set,[t.defaultSelectedKeys]),t.onSelectionChange);return{selectionMode:e,isDisabled:r,selectedKeys:i,setSelectedKeys:o,toggleKey(a){let u;e==="multiple"?(u=new Set(i),u.has(a)&&(!n||u.size>1)?u.delete(a):u.add(a)):u=new Set(i.has(a)&&!n?[]:[a]),o(u)},setSelected(a,u){u!==i.has(a)&&this.toggleKey(a)}}}const s_=k.createContext({}),AB=k.createContext(null),a_=k.forwardRef(function(e,n){[e,n]=Ct(e,n,s_);let r=o_(e),{groupProps:i}=r_(e,r,n),o=Rt({...e,values:{orientation:e.orientation||"horizontal",isDisabled:r.isDisabled,state:r},defaultClassName:"react-aria-ToggleButtonGroup"}),a=Je(e,{global:!0});return H.createElement(at.div,{...we(a,o,i),ref:n,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},H.createElement(AB.Provider,{value:r},H.createElement(r3,null,o.children)))}),l_=k.createContext({}),u_=k.forwardRef(function(e,n){[e,n]=Ct(e,n,l_);let r=k.useContext(AB),i=RI(r&&e.id!=null?{isSelected:r.selectedKeys.has(e.id),onChange(E){r.setSelected(e.id,E)}}:e),{buttonProps:o,isPressed:a,isSelected:u,isDisabled:c}=r&&e.id!=null?i_({...e,id:e.id},r,n):TB({...e,id:e.id!=null?String(e.id):void 0},i,n),{focusProps:f,isFocused:h,isFocusVisible:m}=Po(e),{hoverProps:g,isHovered:b}=Vo({...e,isDisabled:c}),v=Rt({...e,id:void 0,values:{isHovered:b,isPressed:a,isFocused:h,isSelected:i.isSelected,isFocusVisible:m,isDisabled:c,state:i},defaultClassName:"react-aria-ToggleButton"}),C=Je(e,{global:!0});return delete C.id,delete C.onClick,H.createElement(at.button,{...we(C,v,o,f,g),ref:n,slot:e.slot||void 0,"data-focused":h||void 0,"data-disabled":c||void 0,"data-pressed":a||void 0,"data-selected":u||void 0,"data-hovered":b||void 0,"data-focus-visible":m||void 0},H.createElement(i3.Provider,{value:{isSelected:u}},v.children))});function c_(t,e,n,r,i=!1,o=!1){switch(r){case"left":return i?bb(t,e,n,o,"left"):yb(t,e,n,o,"left");case"right":return i?yb(t,e,n,o,"right"):bb(t,e,n,o,"right");case"up":return yb(t,e,n,o);case"down":return bb(t,e,n,o)}}function bb(t,e,n,r=!1,i=null){if(!n)return{type:"root"};if(n.type==="root"){let o=t.getFirstKey?.()??null;return o!=null?{type:"item",key:o,dropPosition:"before"}:null}if(n.type==="item"){let o=null;i?o=i==="right"?t.getKeyRightOf?.(n.key,{includeDisabled:!0}):t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):o=t.getKeyBelow?.(n.key,{includeDisabled:!0});let a=C3(e,n.key,u=>e.getKeyAfter(u));if(o!=null&&o!==a)return{type:"item",key:o,dropPosition:n.dropPosition};switch(n.dropPosition){case"before":return{type:"item",key:n.key,dropPosition:"on"};case"on":{let u=e.getItem(n.key),c=o!=null?e.getItem(o):null;return u&&c&&c.level>=u.level?{type:"item",key:c.key,dropPosition:"before"}:{type:"item",key:n.key,dropPosition:"after"}}case"after":{let u=e.getItem(n.key),c=u?.nextKey!=null?e.getItem(u.nextKey):null;for(;c!=null&&c.type!=="item";)c=c.nextKey!=null?e.getItem(c.nextKey):null;if(u&&c==null&&u.parentKey!=null){let f=e.getItem(u.parentKey);const h=f?.nextKey!=null?e.getItem(f.nextKey):null;if(h?.type==="item")return{type:"item",key:h.key,dropPosition:"before"};if(f?.type==="item")return{type:"item",key:f.key,dropPosition:"after"}}if(c)return{type:"item",key:c.key,dropPosition:"on"}}}}return r?{type:"root"}:null}function yb(t,e,n,r=!1,i=null){if(!n||r&&n.type==="root"){let o=null,a=t.getLastKey?.();for(;a!=null;){let u=e.getItem(a);if(u?.type!=="item")break;o=a,a=u?.parentKey}return o!=null?{type:"item",key:o,dropPosition:"after"}:null}if(n.type==="item"){let o=null;i?o=i==="left"?t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):t.getKeyRightOf?.(n.key,{includeDisabled:!0}):o=t.getKeyAbove?.(n.key,{includeDisabled:!0});let a=C3(e,n.key,u=>e.getKeyBefore(u));if(o!=null&&o!==a)return{type:"item",key:o,dropPosition:n.dropPosition};switch(n.dropPosition){case"before":{let u=e.getItem(n.key);if(u&&u.prevKey!=null){let c=$2(e,u.prevKey);if(c)return c}return o!=null?{type:"item",key:o,dropPosition:"on"}:{type:"root"}}case"on":return{type:"item",key:n.key,dropPosition:"before"};case"after":{let u=$2(e,n.key);return u||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function $2(t,e){let n=t.getItem(e),r=C3(t,e,o=>t.getKeyAfter(o)),i=r!=null?t.getItem(r):null;if(n&&i&&i.level>n.level){let o=null;if("lastChildKey"in n)for(o=n.lastChildKey!=null?t.getItem(n.lastChildKey):null;o&&o.type!=="item"&&o.prevKey!=null;)o=t.getItem(o.prevKey);else o=Array.from(n.childNodes).findLast(a=>a.type==="item")||null;if(o)return{type:"item",key:o.key,dropPosition:"after"}}return null}function C3(t,e,n){let r=n(e),i=r!=null?t.getItem(r):null;for(;i&&i.type!=="item";)r=n(i.key),i=r!=null?t.getItem(r):null;return r}const Lf=20;function d_(t){let e=k.useRef(null),n=k.useRef(!0),r=k.useRef(!0);k.useEffect(()=>{if(t.current){e.current=Oo(t.current)?t.current:Hr(t.current);let a=window.getComputedStyle(e.current);n.current=/(auto|scroll)/.test(a.overflowX),r.current=/(auto|scroll)/.test(a.overflowY)}},[t]);let i=k.useRef({timer:void 0,dx:0,dy:0}).current;k.useEffect(()=>()=>{i.timer&&(cancelAnimationFrame(i.timer),i.timer=void 0)},[i]);let o=k.useCallback(()=>{n.current&&e.current&&(e.current.scrollLeft+=i.dx),r.current&&e.current&&(e.current.scrollTop+=i.dy),i.timer&&(i.timer=requestAnimationFrame(o))},[e,i]);return{move(a,u){if(!Gy()||Ti()||!e.current)return;let c=e.current.getBoundingClientRect(),f=Lf,h=Lf,m=c.height-Lf,g=c.width-Lf;a<f||a>g||u<h||u>m?(a<f?i.dx=a-f:a>g&&(i.dx=a-g),u<h?i.dy=u-h:u>m&&(i.dy=u-m),i.timer||(i.timer=requestAnimationFrame(o))):this.stop()},stop(){i.timer&&(cancelAnimationFrame(i.timer),i.timer=void 0)}}}function f_(t,e,n){let r=k.useRef({props:t,state:e,nextTarget:null,dropOperation:null}).current;r.props=t,r.state=e;let i=k.useCallback(async g=>{let{onInsert:b,onRootDrop:v,onItemDrop:C,onReorder:E,onMove:D,acceptedDragTypes:w="all",shouldAcceptItemDrop:$}=r.props,{draggingKeys:T}=Nt,A=jr(n),{target:O,dropOperation:M,items:P}=g,I=P;(w!=="all"||$)&&(I=P.filter(G=>{let J;return G.kind==="directory"?J=new Set([ST]):J=G.kind==="file"?new Set([G.type]):G.types,w==="all"||w.some(U=>J.has(U))?O.type==="item"&&O.dropPosition==="on"&&$?$(O,J):!0:!1})),I.length>0&&(O.type==="root"&&v&&await v({items:I,dropOperation:M}),O.type==="item"&&(O.dropPosition==="on"&&C&&await C({items:I,dropOperation:M,isInternal:A,target:O}),D&&A&&await D({keys:T,dropOperation:M,target:O}),O.dropPosition!=="on"&&(!A&&b&&await b({items:I,dropOperation:M,target:O}),A&&E&&await E({keys:T,dropOperation:M,target:O}))))},[r,n]),o=d_(n),{dropProps:a}=kK({ref:n,onDropEnter(){r.nextTarget!=null&&e.setTarget(r.nextTarget)},onDropMove(g){r.nextTarget!=null&&e.setTarget(r.nextTarget),o.move(g.x,g.y)},getDropOperationForPoint(g,b,v,C){let{draggingKeys:E,dropCollectionRef:D}=Nt,w=jr(n),$=A=>e.getDropOperation({target:A,types:g,allowedOperations:b,isInternal:w,draggingKeys:E})!=="cancel",T=t.dropTargetDelegate.getDropTargetFromPoint(v,C,$);if(!T)return r.dropOperation="cancel",r.nextTarget=null,"cancel";if(r.dropOperation=e.getDropOperation({target:T,types:g,allowedOperations:b,isInternal:w,draggingKeys:E}),r.dropOperation==="cancel"){let A={type:"root"},O=e.getDropOperation({target:A,types:g,allowedOperations:b,isInternal:w,draggingKeys:E});O!=="cancel"&&(T=A,r.dropOperation=O)}return T&&r.dropOperation!=="cancel"&&n?.current!==D?.current&&Ja(n),r.nextTarget=r.dropOperation==="cancel"?null:T,r.dropOperation},onDropExit(){Ja(void 0),e.setTarget(null),o.stop()},onDropActivate(g){e.target?.type==="item"&&typeof t.onDropActivate=="function"&&t.onDropActivate({type:"dropactivate",x:g.x,y:g.y,target:e.target})},onDrop(g){Ja(n),e.target&&f(g,e.target);let{draggingCollectionRef:b}=Nt;b==null&&AT()}}),u=k.useRef(null),c=k.useCallback(()=>{let{state:g}=r;if(u.current){let{target:b,collection:v,selectedKeys:C,focusedKey:E,isInternal:D,draggingKeys:w}=u.current;if(g.collection.size>v.size&&g.selectionManager.isSelectionEqual(C)){let $=new Set,T=g.collection.getFirstKey();for(;T!=null;){let A=g.collection.getItem(T);A?.type==="item"&&!v.getItem(A.key)&&$.add(A.key),A?.hasChildNodes&&g.collection.getItem(A.lastChildKey)?.type==="item"?T=A.firstChildKey:T=g.collection.getKeyAfter(T)}if(g.selectionManager.setSelectedKeys($),g.selectionManager.focusedKey===E){let A=$.keys().next().value;if(A!=null){let O=g.collection.getItem(A),M=u.current.target,P=g.collection.expandedKeys?g.collection.expandedKeys.has(O?.parentKey):!1;O&&(O?.type==="cell"||M.type==="item"&&M.dropPosition==="on"&&!P)&&(A=O.parentKey),A!=null&&g.selectionManager.setFocusedKey(A),g.selectionManager.selectionMode==="none"&&Ts("keyboard")}}}else E!=null&&g.selectionManager.focusedKey===E&&D&&b.type==="item"&&b.dropPosition!=="on"&&w.has(g.collection.getItem(E)?.parentKey)?(g.selectionManager.setFocusedKey(g.collection.getItem(E)?.parentKey??null),Ts("keyboard")):g.selectionManager.focusedKey===E&&b.type==="item"&&b.dropPosition==="on"&&g.collection.getItem(b.key)!=null?(g.selectionManager.setFocusedKey(b.key),Ts("keyboard")):g.selectionManager.focusedKey!=null&&!g.selectionManager.isSelected(g.selectionManager.focusedKey)&&Ts("keyboard");g.selectionManager.setFocused(!0)}},[r]),f=k.useCallback((g,b)=>{let{state:v}=r;u.current={timeout:void 0,focusedKey:v.selectionManager.focusedKey,collection:v.collection,selectedKeys:v.selectionManager.selectedKeys,draggingKeys:Nt.draggingKeys,isInternal:jr(n),target:b},(r.props.onDrop||i)({type:"drop",x:g.x,y:g.y,target:b,items:g.items,dropOperation:g.dropOperation}),u.current.timeout=setTimeout(()=>{c(),u.current=null},50)},[r,i,n,c]);k.useEffect(()=>()=>{u.current&&clearTimeout(u.current.timeout)},[]),Le(()=>{u.current&&e.collection!==u.current.collection&&c()});let{direction:h}=Mi();k.useEffect(()=>{if(!n.current)return;let g=(C,E=!0,D="down")=>c_(r.props.keyboardDelegate,r.state.collection,C,D,h==="rtl",E),b=(C,E=!0)=>g(C,E,"up"),v=(C,E,D,w,$=!0)=>{let T=0,A,{draggingKeys:O}=Nt,M=jr(n);do{let P=w(C,$);if(!P)return null;C=P,A=r.state.getDropOperation({target:P,types:E,allowedOperations:D,isInternal:M,draggingKeys:O}),C.type==="root"&&T++}while(A==="cancel"&&!r.state.isDropTarget(C)&&T<2);return A==="cancel"?null:C};return BT({element:n.current,preventFocusOnDrop:!0,getDropOperation(C,E){if(r.state.target){let{draggingKeys:w}=Nt,$=jr(n);return r.state.getDropOperation({target:r.state.target,types:C,allowedOperations:E,isInternal:$,draggingKeys:w})}return v(null,C,E,g)?"move":"cancel"},onDropEnter(C,E){let D=js(E.items),w=r.state.selectionManager,$=null;Ja(n);let T=w.focusedKey,A="after",O=T!=null?r.state.collection.getItem(T):null;if(O?.type==="cell"&&(T=O.parentKey),T!=null&&w.isSelected(T)&&(w.selectedKeys.size>1&&w.firstSelectedKey===T?A="before":T=w.lastSelectedKey),T!=null){$={type:"item",key:T,dropPosition:A};let{draggingKeys:M}=Nt,P=jr(n);r.state.getDropOperation({target:$,types:D,allowedOperations:E.allowedDropOperations,isInternal:P,draggingKeys:M})==="cancel"&&($=v($,D,E.allowedDropOperations,g,!1)??v($,D,E.allowedDropOperations,b,!1))}$||($=v(null,D,E.allowedDropOperations,g)),r.state.setTarget($)},onDropExit(){Ja(void 0),r.state.setTarget(null)},onDropTargetEnter(C){r.state.setTarget(C)},onDropActivate(C,E){E?.type==="item"&&E?.dropPosition==="on"&&typeof r.props.onDropActivate=="function"&&r.props.onDropActivate({type:"dropactivate",x:C.x,y:C.y,target:E})},onDrop(C,E){Ja(n),r.state.target&&f(C,E||r.state.target)},onKeyDown(C,E){let{keyboardDelegate:D}=r.props,w=js(E.items);switch(C.key){case"ArrowDown":if(D.getKeyBelow){let $=v(r.state.target,w,E.allowedDropOperations,(T,A)=>g(T,A,"down"));r.state.setTarget($)}break;case"ArrowUp":if(D.getKeyAbove){let $=v(r.state.target,w,E.allowedDropOperations,(T,A)=>g(T,A,"up"));r.state.setTarget($)}break;case"ArrowLeft":if(D.getKeyLeftOf){let $=v(r.state.target,w,E.allowedDropOperations,(T,A)=>g(T,A,"left"));r.state.setTarget($)}break;case"ArrowRight":if(D.getKeyRightOf){let $=v(r.state.target,w,E.allowedDropOperations,(T,A)=>g(T,A,"right"));r.state.setTarget($)}break;case"Home":if(D.getFirstKey){let $=v(null,w,E.allowedDropOperations,g);r.state.setTarget($)}break;case"End":if(D.getLastKey){let $=v(null,w,E.allowedDropOperations,b);r.state.setTarget($)}break;case"PageDown":if(D.getKeyPageBelow){let $=r.state.target;if(!$)$=v(null,w,E.allowedDropOperations,g);else{let T=D.getFirstKey?.();$.type==="item"&&(T=$.key);let A=null;T!=null&&(A=D.getKeyPageBelow(T));let O=$.type==="item"?$.dropPosition:"after";if((A==null||$.type==="item"&&$.key===D.getLastKey?.())&&(A=D.getLastKey?.()??null,O="after"),A==null)break;$={type:"item",key:A,dropPosition:O};let{draggingCollectionRef:M,draggingKeys:P}=Nt,I=M?.current===n?.current;r.state.getDropOperation({target:$,types:w,allowedOperations:E.allowedDropOperations,isInternal:I,draggingKeys:P})==="cancel"&&($=v($,w,E.allowedDropOperations,g,!1)??v($,w,E.allowedDropOperations,b,!1))}r.state.setTarget($??r.state.target)}break;case"PageUp":{if(!D.getKeyPageAbove)break;let $=r.state.target;if(!$)$=v(null,w,E.allowedDropOperations,b);else if($.type==="item"){if($.key===D.getFirstKey?.())$={type:"root"};else{let M=D.getKeyPageAbove($.key),P=$.dropPosition;if(M==null&&(M=D.getFirstKey?.(),P="before"),M==null)break;$={type:"item",key:M,dropPosition:P}}let{draggingKeys:T}=Nt,A=jr(n);r.state.getDropOperation({target:$,types:w,allowedOperations:E.allowedDropOperations,isInternal:A,draggingKeys:T})==="cancel"&&($=v($,w,E.allowedDropOperations,b,!1)??v($,w,E.allowedDropOperations,g,!1))}r.state.setTarget($??r.state.target);break}}r.props.onKeyDown?.(C)}})},[r,n,f,h]);let m=nn();return g3.set(e,{id:m,ref:n}),{collectionProps:we(a,{id:m,"aria-describedby":null})}}function BB(t,e,n){let{dropProps:r}=dA(),i=iK(e);k.useEffect(()=>{if(n.current)return hK({element:n.current,target:t.target,getDropOperation(h,m){let{draggingKeys:g}=Nt,b=jr(i);return e.getDropOperation({target:t.target,types:h,allowedOperations:m,isInternal:b,draggingKeys:g})},activateButtonRef:t.activateButtonRef})},[n,t.target,e,i,t.activateButtonRef]);let o=y3(),{draggingKeys:a}=Nt,u=jr(i),c=o&&e.getDropOperation({target:t.target,types:js(o.dragTarget.items),allowedOperations:o.dragTarget.allowedDropOperations,isInternal:u,draggingKeys:a})!=="cancel",f=e.isDropTarget(t.target);return k.useEffect(()=>{o&&f&&n.current&&n.current.focus()},[f,o,n]),{dropProps:{...r,"aria-hidden":!o||c?void 0:"true"},isDropTarget:f}}function h_(t){return t&&t.__esModule?t.default:t}function p_(t,e,n){let{target:r}=t,{collection:i}=e,o=pr(h_(Yc),"@react-aria/dnd"),a=y3(),{dropProps:u}=BB(t,e,n),c=nn(),f=v=>v==null?"":i.getTextValue?.(v)??i.getItem(v)?.textValue??"",h="",m;if(r.type==="root")h=o.format("dropOnRoot"),m=`${c} ${rK(e)}`;else if(r.dropPosition==="on")h=o.format("dropOnItem",{itemText:f(r.key)});else{let v,C;if(r.dropPosition==="before"){let E=i.getItem(r.key)?.prevKey,D=E!=null?i.getItem(E):null;v=D?.type==="item"?D.key:null}else v=r.key;if(r.dropPosition==="after"){let E=i.getItem(r.key)?.nextKey,D=E!=null?i.getItem(E):null;C=D?.type==="item"?D.key:null}else C=r.key;v!=null&&C!=null?h=o.format("insertBetween",{beforeItemText:f(v),afterItemText:f(C)}):v!=null?h=o.format("insertAfter",{itemText:f(v)}):C!=null&&(h=o.format("insertBefore",{itemText:f(C)}))}let g=e.isDropTarget(r),b=a?u["aria-hidden"]:"true";return{dropIndicatorProps:{...u,id:c,"aria-roledescription":o.format("dropIndicator"),"aria-label":h,"aria-labelledby":m,"aria-hidden":b,tabIndex:-1},isDropTarget:g,isHidden:!g&&!!b}}function m_(t){return t&&t.__esModule?t.default:t}const w2={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function g_(t){let{hasDragButton:e,isDisabled:n}=t,r=pr(m_(Yc),"@react-aria/dnd"),i=k.useRef({options:t,x:0,y:0}).current;i.options=t;let o=k.useRef(null),[a,u]=k.useState(!1),c=A=>{o.current=A,u(!!A)},{addGlobalListener:f,removeAllGlobalListeners:h}=qc(),m=k.useRef(null),g=A=>{if(A.defaultPrevented)return;if(A.stopPropagation(),m.current==="virtual"){A.preventDefault(),E(de(A)),m.current=null;return}typeof t.onDragStart=="function"&&t.onDragStart({type:"dragstart",x:A.clientX,y:A.clientY});let O=t.getItems();A.dataTransfer.clearData?.(),oK(A.dataTransfer,O);let M=wt.all;if(typeof t.getAllowedDropOperations=="function"){let G=t.getAllowedDropOperations();M=wt.none;for(let J of G)M|=wt[J]||wt.none}pb(M);let P=DT[M]||"none";A.dataTransfer.effectAllowed=P==="cancel"?"none":P,typeof t.preview?.current=="function"&&t.preview.current(O,(G,J,U)=>{if(!G)return;let ie=G.getBoundingClientRect(),F=A.currentTarget.getBoundingClientRect(),te=A.clientX-F.x,N=A.clientY-F.y;(te>ie.width||N>ie.height)&&(te=ie.width/2,N=ie.height/2);let K=te,Y=N;typeof J=="number"&&typeof U=="number"&&(K=J,Y=U),K=Math.max(0,Math.min(K,ie.width)),Y=Math.max(0,Math.min(Y,ie.height));let Z=2*Math.round(ie.height/2);G.style.height=`${Z}px`,A.dataTransfer.setDragImage(G,K,Y)}),f(window,"drop",G=>{G.preventDefault(),G.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.")},{once:!0}),i.x=A.clientX,i.y=A.clientY;let I=de(A);requestAnimationFrame(()=>{c(I)})},b=A=>{A.stopPropagation(),!(A.clientX===i.x&&A.clientY===i.y)&&(typeof t.onDragMove=="function"&&t.onDragMove({type:"dragmove",x:A.clientX,y:A.clientY}),i.x=A.clientX,i.y=A.clientY)},v=A=>{if(A.stopPropagation(),typeof t.onDragEnd=="function"){let O={type:"dragend",x:A.clientX,y:A.clientY,dropOperation:nc[A.dataTransfer.dropEffect]};ch&&(O.dropOperation=nc[ch]),t.onDragEnd(O)}c(null),h(),pb(wt.none),Fh(void 0)};k.useEffect(()=>()=>{if(o.current&&(!o.current.isConnected||parseInt(k.version,10)<17)){if(typeof i.options.onDragEnd=="function"){let A={type:"dragend",x:0,y:0,dropOperation:nc[ch||"none"]};i.options.onDragEnd(A)}c(null),pb(wt.none),Fh(void 0)}},[i]);let C=A=>{A.pointerType!=="keyboard"&&A.pointerType!=="virtual"||E(A.target)},E=A=>{if(typeof i.options.onDragStart=="function"){let O=A.getBoundingClientRect();i.options.onDragStart({type:"dragstart",x:O.x+O.width/2,y:O.y+O.height/2})}pK({element:A,items:i.options.getItems(),allowedDropOperations:typeof i.options.getAllowedDropOperations=="function"?i.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(O){c(null),typeof i.options.onDragEnd=="function"&&i.options.onDragEnd(O)}},r),c(A)},D=b3(),w=a?w2[D].end:w2[D].start,$=Wc(r.format(w)),T={};return e||(T={...$,onPointerDown(A){if(m.current=Wy(A.nativeEvent)?"virtual":A.pointerType,A.width<1&&A.height<1)m.current="virtual";else{let O=A.currentTarget.getBoundingClientRect(),M=A.clientX-O.x,P=A.clientY-O.y,I=O.width/2,G=O.height/2;Math.abs(M-I)<=.5&&Math.abs(P-G)<=.5?m.current="virtual":m.current=A.pointerType}},onKeyDownCapture(A){de(A)===A.currentTarget&&A.key==="Enter"&&(A.preventDefault(),A.stopPropagation())},onKeyUpCapture(A){de(A)===A.currentTarget&&A.key==="Enter"&&(A.preventDefault(),A.stopPropagation(),E(de(A)))},onClick(A){(Hp(A.nativeEvent)||m.current==="virtual")&&(A.preventDefault(),A.stopPropagation(),E(de(A)))}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:!1}:{dragProps:{...T,draggable:"true",onDragStart:g,onDrag:b,onDragEnd:v},dragButtonProps:{...$,onPress:C},isDragging:a}}function b_(t){return t&&t.__esModule?t.default:t}const y_={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function v_(t,e){let n=pr(b_(Yc),"@react-aria/dnd"),r=e.isDisabled||e.selectionManager.isDisabled(t.key),{dragProps:i,dragButtonProps:o}=g_({getItems(){return e.getItems(t.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:t.hasDragButton,onDragStart(b){e.startDrag(t.key,b),dK(e.draggingKeys)},onDragMove(b){e.moveDrag(b)},onDragEnd(b){let{dropOperation:v}=b,C=v==="cancel"?!1:jr();e.endDrag({...b,keys:e.draggingKeys,isInternal:C}),AT()}}),a=e.collection.getItem(t.key),u=e.getKeysForDrag(t.key).size,c=u>1&&e.selectionManager.isSelected(t.key),f,h,m=b3();if(!t.hasDragButton&&e.selectionManager.selectionMode!=="none"){let b=y_[m][c?"selected":"notSelected"];t.hasAction&&m==="keyboard"&&(b+="Alt"),c?h=n.format(b,{count:u}):h=n.format(b),delete i.onClick}else if(c)f=n.format("dragSelectedItems",{count:u});else{let b=e.collection.getTextValue?.(t.key)??a?.textValue??"";f=n.format("dragItem",{itemText:b})}let g=Wc(h);if(h&&Object.assign(i,g),!t.hasDragButton&&t.hasAction){let{onKeyDownCapture:b,onKeyUpCapture:v}=i;m==="touch"&&delete i["aria-describedby"],i.onKeyDownCapture=C=>{C.altKey&&b?.(C)},i.onKeyUpCapture=C=>{C.altKey&&v?.(C)}}return{dragProps:r?{}:i,dragButtonProps:{...o,isDisabled:r,"aria-label":f}}}function x_(t,e,n){let{draggingCollectionRef:r}=Nt;e.draggingKeys.size>0&&r?.current!==n.current&&cK(n)}const C_=H.forwardRef(function(e,n){let r=e.children,[i,o]=k.useState(null),a=k.useRef(null),u=k.useRef(void 0);return k.useImperativeHandle(n,()=>(c,f)=>{let h=r(c),m,g,b;h&&typeof h=="object"&&"element"in h?(m=h.element,g=h.x,b=h.y):m=h,$l.flushSync(()=>{o(m)}),f(a.current,g,b),u.current=requestAnimationFrame(()=>{o(null)})},[r]),k.useEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[]),i?H.createElement("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:a},i):null});function E_(t){let{getItems:e,isDisabled:n,collection:r,selectionManager:i,onDragStart:o,onDragMove:a,onDragEnd:u,preview:c,getAllowedDropOperations:f}=t,[,h]=k.useState(!1),m=k.useRef(new Set),g=k.useRef(null),b=v=>{let C=new Set;if(i.isSelected(v))for(let E of i.selectedKeys){let D=r.getItem(E);if(D){let w=!1,$=D.parentKey;for(;$!=null;){if(i.selectedKeys.has($)){w=!0;break}let T=r.getItem($);$=T?T.parentKey:null}w||C.add(E)}}else C.add(v);return C};return{collection:r,selectionManager:i,get draggedKey(){return g.current},get draggingKeys(){return m.current},isDragging(v){return m.current.has(v)},getKeysForDrag:b,getItems(v){let C=b(v),E=[];for(let D of C){let w=r.getItem(D)?.value;w!=null&&E.push(w)}return e(b(v),E)},isDisabled:n,preview:c,getAllowedDropOperations:f,startDrag(v,C){let E=b(v);m.current=E,g.current=v,i.setFocused(!1),h(!0),typeof o=="function"&&o({...C,keys:E})},moveDrag(v){typeof a=="function"&&a({...v,keys:m.current})},endDrag(v){let{isInternal:C}=v;typeof u=="function"&&u({...v,keys:m.current,isInternal:C}),m.current=new Set,g.current=null,h(!1)}}}function D_(t){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:r,onRootDrop:i,onItemDrop:o,onReorder:a,onMove:u,shouldAcceptItemDrop:c,collection:f,selectionManager:h,onDropEnter:m,getDropOperation:g,onDrop:b}=t,[v,C]=k.useState(null),E=k.useRef(null),D=$=>{if($.dropPosition==="before"){let T=f.getItem($.key);return T&&T.prevKey!=null?{type:"item",key:T.prevKey,dropPosition:"after"}:null}else if($.dropPosition==="after"){let T=f.getItem($.key);return T&&T.nextKey!=null?{type:"item",key:T.nextKey,dropPosition:"before"}:null}return null},w=k.useCallback($=>{let{target:T,types:A,allowedOperations:O,isInternal:M,draggingKeys:P}=$;if(n||!T)return"cancel";if(e==="all"||e.some(I=>A.has(I))){let I=r&&T.type==="item"&&!M&&(T.dropPosition==="before"||T.dropPosition==="after"),G=a&&T.type==="item"&&M&&(T.dropPosition==="before"||T.dropPosition==="after")&&k_(f,T,P),J=T.type!=="item"||T.dropPosition!=="on"||!c||c(T,A),U=u&&T.type==="item"&&M&&J,ie=i&&T.type==="root"&&!M,F=o&&T.type==="item"&&T.dropPosition==="on"&&!(M&&T.key!=null&&P.has(T.key))&&J;if(b||I||G||U||ie||F)return g?g(T,A,O):O[0]}return"cancel"},[n,f,e,g,r,i,o,c,a,u,b]);return{collection:f,selectionManager:h,isDisabled:n,target:v,setTarget($){if(this.isDropTarget($))return;let T=E.current;T&&typeof t.onDropExit=="function"&&t.onDropExit({type:"dropexit",x:0,y:0,target:T}),$&&typeof m=="function"&&m({type:"dropenter",x:0,y:0,target:$}),E.current=$??null,C($??null)},isDropTarget($){let T=E.current;return!T||!$?!1:vb($,T)?!0:$?.type==="item"&&T?.type==="item"&&$.key!==T.key&&$.dropPosition!==T.dropPosition&&$.dropPosition!=="on"&&T.dropPosition!=="on"?vb(D($),T)||vb($,D(T)):!1},getDropOperation($){let{target:T,isInternal:A,draggingKeys:O}=$;if(A&&T.type==="item"&&O.size>0){if(O.has(T.key)&&T.dropPosition==="on")return"cancel";let M=T.key;for(;M!=null;){let I=f.getItem(M)?.parentKey;if(I!=null&&O.has(I))return"cancel";M=I??null}}return w($)}}}function vb(t,e){if(!t)return!e;switch(t.type){case"root":return e?.type==="root";case"item":return e?.type==="item"&&e?.key===t.key&&e?.dropPosition===t.dropPosition}}function k_(t,e,n){let r=t.getItem(e.key);for(let i of n)if(t.getItem(i)?.parentKey!==r?.parentKey)return!1;return!0}class S_{constructor(e,n,r){this.collection=e,this.ref=n,this.layout=r?.layout||"stack",this.orientation=r?.orientation||"vertical",this.direction=r?.direction||"ltr"}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,n,r){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return{type:"root"};let i=this.ref.current.getBoundingClientRect(),o=this.orientation==="horizontal"?e:n,a=this.orientation==="horizontal"?n:e;o+=this.getPrimaryStart(i),a+=this.getSecondaryStart(i);let u=this.layout==="stack"?o:a,c=this.orientation==="horizontal"&&this.direction==="rtl",f=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",h=this.layout==="stack"?c:f,m=this.ref.current?.dataset.collection,g=this.ref.current.querySelectorAll(m?`[data-collection="${CSS.escape(m)}"]`:"[data-key]"),b=new Map;for(let $ of g)$ instanceof HTMLElement&&$.dataset.key!=null&&b.set($.dataset.key,$);let v=[...this.collection].filter($=>$.type==="item");if(v.length<1)return{type:"root"};let C=0,E=v.length;for(;C<E;){let $=Math.floor((C+E)/2),T=v[$],A=b.get(String(T.key));if(!A)break;let O=A.getBoundingClientRect(),M=P=>{P?C=$+1:E=$};if(o<this.getPrimaryStart(O))M(c);else if(o>this.getPrimaryEnd(O))M(!c);else if(a<this.getSecondaryStart(O))M(f);else if(a>this.getSecondaryEnd(O))M(!f);else{let P={type:"item",key:T.key,dropPosition:"on"};if(r(P))u<=this.getFlowStart(O)+5&&r({...P,dropPosition:"before"})?P.dropPosition=h?"after":"before":u>=this.getFlowEnd(O)-5&&r({...P,dropPosition:"after"})&&(P.dropPosition=h?"before":"after");else{let I=this.getFlowStart(O)+this.getFlowSize(O)/2;u<=I&&r({...P,dropPosition:"before"})?P.dropPosition=h?"after":"before":u>=I&&r({...P,dropPosition:"after"})&&(P.dropPosition=h?"before":"after")}return P}}let D=v[Math.min(C,v.length-1)];return i=b.get(String(D.key))?.getBoundingClientRect(),i&&(o<this.getPrimaryStart(i)||Math.abs(u-this.getFlowStart(i))<Math.abs(u-this.getFlowEnd(i)))?{type:"item",key:D.key,dropPosition:h?"after":"before"}:{type:"item",key:D.key,dropPosition:h?"before":"after"}}}function $_(t){return{dragAndDropHooks:k.useMemo(()=>{let{onDrop:n,onInsert:r,onItemDrop:i,onReorder:o,onMove:a,onRootDrop:u,getItems:c,renderDragPreview:f,renderDropIndicator:h,dropTargetDelegate:m}=t,g=!!c,b=!!(n||r||i||o||a||u),v={};return g&&(v.useDraggableCollectionState=function(E){return E_({...E,...t})},v.useDraggableCollection=x_,v.useDraggableItem=v_,v.DragPreview=C_,v.renderDragPreview=f,v.isVirtualDragging=mK),b&&(v.useDroppableCollectionState=function(E){return D_({...E,...t})},v.useDroppableItem=BB,v.useDroppableCollection=function(E,D,w){return f_({...E,...t},D,w)},v.useDropIndicator=p_,v.renderDropIndicator=h,v.dropTargetDelegate=m,v.ListDropTargetDelegate=S_),v},[t])}}const No=["backlog","todo","in_progress","done","canceled"],So={backlog:"Backlog",todo:"Todo",in_progress:"In Progress",done:"Done",canceled:"Canceled"};async function Ri(t,e){const n=await fetch(t,{headers:e?.body?{"Content-Type":"application/json"}:void 0,...e}),r=await n.json();if(!n.ok)throw new Error(r.error??`${n.status}`);return r}function MB(){return new URLSearchParams(location.search).get("board")}function Uo(t){const e=MB();return e?`${t}${t.includes("?")?"&":"?"}board=${encodeURIComponent(e)}`:t}function w_(t){return Ri(Uo("/api/tasks"),{method:"POST",body:JSON.stringify(t)})}function RB(t,e){return Ri(Uo(`/api/tasks/${t}`),{method:"PATCH",body:JSON.stringify(e)})}function T_(t){return Ri(Uo(`/api/tasks/${t}`),{method:"DELETE"})}function A_(t){return Ri(Uo(`/api/tasks/${t}`))}function B_(t,e){return Ri(Uo(`/api/tasks/${t}/comments`),{method:"POST",body:JSON.stringify({body:e})})}function M_(t,e){return Ri(Uo(`/api/tasks/${t}/comments/${e}`),{method:"DELETE"})}function R_(){return zp({queryKey:["boards"],queryFn:()=>Ri("/api/boards").then(t=>t.boards)})}function P_(t){return zp({queryKey:["project",t],queryFn:()=>Ri(Uo("/api/project"))})}function O_(t){return zp({queryKey:["tasks",t],queryFn:()=>Ri(Uo("/api/tasks")).then(e=>e.tasks)})}function N_(t,e){return zp({queryKey:["task",t,e],queryFn:()=>A_(e),enabled:Number.isFinite(e)})}const T2=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,A2=Ky,Bl=(t,e)=>n=>{var r;if(e?.variants==null)return A2(t,n?.class,n?.className);const{variants:i,defaultVariants:o}=e,a=Object.keys(i).map(f=>{const h=n?.[f],m=o?.[f];if(h===null)return null;const g=T2(h)||T2(m);return i[f][g]}),u=n&&Object.entries(n).reduce((f,h)=>{let[m,g]=h;return g===void 0||(f[m]=g),f},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:m,className:g,...b}=h;return Object.entries(b).every(v=>{let[C,E]=v;return Array.isArray(E)?E.includes({...o,...u}[C]):{...o,...u}[C]===E})?[...f,m,g]:f},[]);return A2(t,a,c,n?.class,n?.className)},L_=(t,e)=>{const n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},z_=(t,e)=>({classGroupId:t,validator:e}),PB=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),_h="-",B2=[],I_="arbitrary..",F_=t=>{const e=__(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return K_(a);const u=a.split(_h),c=u[0]===""&&u.length>1?1:0;return OB(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?L_(f,c):c:f||B2}return n[a]||B2}}},OB=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const f=OB(t,e+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=e===0?t.join(_h):t.slice(e).join(_h),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},K_=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?I_+r:void 0})(),__=t=>{const{theme:e,classGroups:n}=t;return j_(n,e)},j_=(t,e)=>{const n=PB();for(const r in t){const i=t[r];E3(i,n,r,e)}return n},E3=(t,e,n,r)=>{const i=t.length;for(let o=0;o<i;o++){const a=t[o];H_(a,e,n,r)}},H_=(t,e,n,r)=>{if(typeof t=="string"){V_(t,e,n);return}if(typeof t=="function"){U_(t,e,n,r);return}q_(t,e,n,r)},V_=(t,e,n)=>{const r=t===""?e:NB(e,t);r.classGroupId=n},U_=(t,e,n,r)=>{if(G_(t)){E3(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(z_(n,t))},q_=(t,e,n,r)=>{const i=Object.entries(t),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];E3(c,NB(e,u),n,r)}},NB=(t,e)=>{let n=t;const r=e.split(_h),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=PB(),n.nextPart.set(a,u)),n=u}return n},G_=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,W_=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},_0="!",M2=":",Q_=[],R2=(t,e,n,r,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Y_=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=i=>{const o=[];let a=0,u=0,c=0,f;const h=i.length;for(let C=0;C<h;C++){const E=i[C];if(a===0&&u===0){if(E===M2){o.push(i.slice(c,C)),c=C+1;continue}if(E==="/"){f=C;continue}}E==="["?a++:E==="]"?a--:E==="("?u++:E===")"&&u--}const m=o.length===0?i:i.slice(c);let g=m,b=!1;m.endsWith(_0)?(g=m.slice(0,-1),b=!0):m.startsWith(_0)&&(g=m.slice(1),b=!0);const v=f&&f>c?f-c:void 0;return R2(o,b,g,v)};if(e){const i=e+M2,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):R2(Q_,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},X_=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],u=a[0]==="[",c=e.has(a);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},J_=t=>({cache:W_(t.cacheSize),parseClassName:Y_(t),sortModifiers:X_(t),postfixLookupClassGroupIds:Z_(t),...F_(t)}),Z_=t=>{const e=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)e[n[r]]=!0;return e},ej=/\s+/,tj=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split(ej);let f="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:v,baseClassName:C,maybePostfixModifierPosition:E}=n(m);if(g){f=m+(f.length>0?" "+f:f);continue}let D=!!E,w;if(D){const M=C.substring(0,E);w=r(M);const P=w&&a[w]?r(C):void 0;P&&P!==w&&(w=P,D=!1)}else w=r(C);if(!w){if(!D){f=m+(f.length>0?" "+f:f);continue}if(w=r(C),!w){f=m+(f.length>0?" "+f:f);continue}D=!1}const $=b.length===0?"":b.length===1?b[0]:o(b).join(":"),T=v?$+_0:$,A=T+w;if(u.indexOf(A)>-1)continue;u.push(A);const O=i(w,D);for(let M=0;M<O.length;++M){const P=O[M];u.push(T+P)}f=m+(f.length>0?" "+f:f)}return f},nj=(...t)=>{let e=0,n,r,i="";for(;e<t.length;)(n=t[e++])&&(r=LB(n))&&(i&&(i+=" "),i+=r);return i},LB=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=LB(t[r]))&&(n&&(n+=" "),n+=e);return n},rj=(t,...e)=>{let n,r,i,o;const a=c=>{const f=e.reduce((h,m)=>m(h),t());return n=J_(f),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=tj(c,n);return i(c,h),h};return o=a,(...c)=>o(nj(...c))},ij=[],Ot=t=>{const e=n=>n[t]||ij;return e.isThemeGetter=!0,e},zB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,aj=/\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$/,lj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,so=t=>oj.test(t),Pe=t=>!!t&&!Number.isNaN(Number(t)),Lr=t=>!!t&&Number.isInteger(Number(t)),xb=t=>t.endsWith("%")&&Pe(t.slice(0,-1)),hi=t=>sj.test(t),FB=()=>!0,dj=t=>aj.test(t)&&!lj.test(t),D3=()=>!1,fj=t=>uj.test(t),hj=t=>cj.test(t),pj=t=>!pe(t)&&!me(t),mj=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),gj=t=>qo(t,jB,D3),pe=t=>zB.test(t),xs=t=>qo(t,HB,dj),P2=t=>qo(t,kj,Pe),bj=t=>qo(t,UB,FB),yj=t=>qo(t,VB,D3),O2=t=>qo(t,KB,D3),vj=t=>qo(t,_B,hj),zf=t=>qo(t,qB,fj),me=t=>IB.test(t),Pu=t=>oa(t,HB),xj=t=>oa(t,VB),N2=t=>oa(t,KB),Cj=t=>oa(t,jB),Ej=t=>oa(t,_B),If=t=>oa(t,qB,!0),Dj=t=>oa(t,UB,!0),qo=(t,e,n)=>{const r=zB.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},oa=(t,e,n=!1)=>{const r=IB.exec(t);return r?r[1]?e(r[1]):n:!1},KB=t=>t==="position"||t==="percentage",_B=t=>t==="image"||t==="url",jB=t=>t==="length"||t==="size"||t==="bg-size",HB=t=>t==="length",kj=t=>t==="number",VB=t=>t==="family-name",UB=t=>t==="number"||t==="weight",qB=t=>t==="shadow",Sj=()=>{const t=Ot("color"),e=Ot("font"),n=Ot("text"),r=Ot("font-weight"),i=Ot("tracking"),o=Ot("leading"),a=Ot("breakpoint"),u=Ot("container"),c=Ot("spacing"),f=Ot("radius"),h=Ot("shadow"),m=Ot("inset-shadow"),g=Ot("text-shadow"),b=Ot("drop-shadow"),v=Ot("blur"),C=Ot("perspective"),E=Ot("aspect"),D=Ot("ease"),w=Ot("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),me,pe],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],P=()=>[me,pe,c],I=()=>[so,"full","auto",...P()],G=()=>[Lr,"none","subgrid",me,pe],J=()=>["auto",{span:["full",Lr,me,pe]},Lr,me,pe],U=()=>[Lr,"auto",me,pe],ie=()=>["auto","min","max","fr",me,pe],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...P()],K=()=>[so,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],Y=()=>[so,"screen","full","dvw","lvw","svw","min","max","fit",...P()],Z=()=>[so,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],j=()=>[t,me,pe],L=()=>[...T(),N2,O2,{position:[me,pe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",Cj,gj,{size:[me,pe]}],le=()=>[xb,Pu,xs],ue=()=>["","none","full",f,me,pe],fe=()=>["",Pe,Pu,xs],Ee=()=>["solid","dashed","dotted","double"],Ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Se=()=>[Pe,xb,N2,O2],En=()=>["","none",v,me,pe],rn=()=>["none",Pe,me,pe],hn=()=>["none",Pe,me,pe],mr=()=>[Pe,me,pe],Ft=()=>[so,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[FB],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[pj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hi],shadow:[hi],spacing:["px",Pe],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",so,pe,me,E]}],container:["container"],"container-type":[{"@container":["","normal","size",me,pe]}],"container-named":[mj],columns:[{columns:[Pe,pe,me,u]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Lr,"auto",me,pe]}],basis:[{basis:[so,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,so,"auto","initial","none",pe]}],grow:[{grow:["",Pe,me,pe]}],shrink:[{shrink:["",Pe,me,pe]}],order:[{order:[Lr,"first","last","none",me,pe]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...Z()]}],"min-block-size":[{"min-block":["auto",...Z()]}],"max-block-size":[{"max-block":["none",...Z()]}],w:[{w:[u,"screen",...K()]}],"min-w":[{"min-w":[u,"screen","none",...K()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",n,Pu,xs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Dj,bj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xb,pe]}],"font-family":[{font:[xj,yj,e]}],"font-features":[{"font-features":[pe]}],"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-fractions"],tracking:[{tracking:[i,me,pe]}],"line-clamp":[{"line-clamp":[Pe,"none",me,P2]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",me,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",me,xs]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Pe,"auto",me,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"tab-size":[{tab:[Lr,me,pe]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Lr,me,pe],radial:["",me,pe],conic:[Lr,me,pe]},Ej,vj]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,me,pe]}],"outline-w":[{outline:["",Pe,Pu,xs]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",h,If,zf]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",m,If,zf]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Pe,xs]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",g,If,zf]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Pe,me,pe]}],"mix-blend":[{"mix-blend":[...Ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Se()}],"mask-image-linear-to-pos":[{"mask-linear-to":Se()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":Se()}],"mask-image-t-to-pos":[{"mask-t-to":Se()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":Se()}],"mask-image-r-to-pos":[{"mask-r-to":Se()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":Se()}],"mask-image-b-to-pos":[{"mask-b-to":Se()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":Se()}],"mask-image-l-to-pos":[{"mask-l-to":Se()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":Se()}],"mask-image-x-to-pos":[{"mask-x-to":Se()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":Se()}],"mask-image-y-to-pos":[{"mask-y-to":Se()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[me,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Se()}],"mask-image-radial-to-pos":[{"mask-radial-to":Se()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Se()}],"mask-image-conic-to-pos":[{"mask-conic-to":Se()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,pe]}],filter:[{filter:["","none",me,pe]}],blur:[{blur:En()}],brightness:[{brightness:[Pe,me,pe]}],contrast:[{contrast:[Pe,me,pe]}],"drop-shadow":[{"drop-shadow":["","none",b,If,zf]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Pe,me,pe]}],"hue-rotate":[{"hue-rotate":[Pe,me,pe]}],invert:[{invert:["",Pe,me,pe]}],saturate:[{saturate:[Pe,me,pe]}],sepia:[{sepia:["",Pe,me,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,pe]}],"backdrop-blur":[{"backdrop-blur":En()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,me,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,me,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,me,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,me,pe]}],"backdrop-invert":[{"backdrop-invert":["",Pe,me,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,me,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,me,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,me,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",me,pe]}],ease:[{ease:["linear","initial",D,me,pe]}],delay:[{delay:[Pe,me,pe]}],animate:[{animate:["none",w,me,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,me,pe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:rn()}],"rotate-x":[{"rotate-x":rn()}],"rotate-y":[{"rotate-y":rn()}],"rotate-z":[{"rotate-z":rn()}],scale:[{scale:hn()}],"scale-x":[{"scale-x":hn()}],"scale-y":[{"scale-y":hn()}],"scale-z":[{"scale-z":hn()}],"scale-3d":["scale-3d"],skew:[{skew:mr()}],"skew-x":[{"skew-x":mr()}],"skew-y":[{"skew-y":mr()}],transform:[{transform:[me,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ft()}],"translate-x":[{"translate-x":Ft()}],"translate-y":[{"translate-y":Ft()}],"translate-z":[{"translate-z":Ft()}],"translate-none":["translate-none"],zoom:[{zoom:[Lr,me,pe]}],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",me,pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",me,pe]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Pe,Pu,xs,P2]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"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"],"line-clamp":["display","overflow"],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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$j=rj(Sj);function Ce(...t){return $j(Ky(t))}const wj=Bl("group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-transparent dark:hover:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",xs:"h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Lt({className:t,variant:e="default",size:n="default",...r}){return B.jsx(x6,{"data-slot":"button","data-variant":e,"data-size":n,className:Ce(wj({variant:e,size:n,className:t})),...r})}const GB=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const Tj=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Aj=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const L2=t=>{const e=Aj(t);return e.charAt(0).toUpperCase()+e.slice(1)};var Cb={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 Bj=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},Mj=k.createContext({}),Rj=()=>k.useContext(Mj),Pj=k.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:b=""}=Rj()??{},v=r??m?Number(n??h)*24/Number(e??f):n??h;return k.createElement("svg",{ref:c,...Cb,width:e??f??Cb.width,height:e??f??Cb.height,stroke:t??g,strokeWidth:v,className:GB("lucide",b,i),...!o&&!Bj(u)&&{"aria-hidden":"true"},...u},[...a.map(([C,E])=>k.createElement(C,E)),...Array.isArray(o)?o:[o]])});const Vt=(t,e)=>{const n=k.forwardRef(({className:r,...i},o)=>k.createElement(Pj,{ref:o,iconNode:e,className:GB(`lucide-${Tj(L2(t))}`,`lucide-${t}`,r),...i}));return n.displayName=L2(t),n};const Oj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],k3=Vt("check",Oj);const Nj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],WB=Vt("chevron-down",Nj);const Lj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zj=Vt("chevron-right",Lj);const Ij=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Fj=Vt("columns-3",Ij);const Kj=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],_j=Vt("diamond",Kj);const jj=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Hj=Vt("ellipsis",jj);const Vj=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Uj=Vt("grip-vertical",Vj);const qj=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Gj=Vt("layout-grid",qj);const Wj=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],Qj=Vt("list-filter",Wj);const Yj=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Xj=Vt("list",Yj);const Jj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],Zj=Vt("message-square-plus",Jj);const eH=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],tH=Vt("message-square",eH);const nH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],QB=Vt("plus",nH);const rH=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iH=Vt("search",rH);const oH=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],sH=Vt("sliders-horizontal",oH);const aH=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],YB=Vt("tag",aH);const lH=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],tm=Vt("user-round",lH);const uH=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],XB=Vt("x",uH);function cH({className:t,...e}){return B.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:Ce(t),...e})}function dH({className:t,...e}){return B.jsx(lI,{"data-slot":"breadcrumb-list",className:Ce("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground sm:gap-2.5",t),...e})}function z2({className:t,children:e,separatorClassName:n,...r}){return B.jsx(uI,{"data-slot":"breadcrumb-item",className:Ce("inline-flex items-center gap-1.5",t),...r,children:Dc(e,(i,{isCurrent:o})=>B.jsxs(B.Fragment,{children:[i,!o&&B.jsx("span",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ce("[&>svg]:size-3.5",n),children:B.jsx(zj,{})})]}))})}function fH({className:t,render:e,...n}){return B.jsx(oI,{"data-slot":"breadcrumb-link",className:Ce("transition-colors hover:text-foreground",t),render:e,...n})}function I2({className:t,...e}){return B.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ce("font-normal text-foreground",t),...e})}function S3({className:t,variant:e="outline",size:n="default",...r}){return B.jsx(Lt,{slot:"close","data-slot":"dialog-close",variant:e,size:n,className:Ce(t),...r})}function hH({className:t,children:e,...n}){return B.jsx(qA,{"data-slot":"dialog-overlay",className:Ce("fixed inset-0 isolate z-50 bg-black/30 duration-100 data-entering:animate-in data-entering:fade-in-0 data-exiting:animate-out data-exiting:fade-out-0 supports-backdrop-filter:backdrop-blur-sm",t),...n,children:e})}function pH({className:t,children:e,showCloseButton:n=!0,isDismissable:r=!0,...i}){return B.jsx(hH,{isDismissable:r,...i,children:B.jsx(WK,{"data-slot":"dialog-content",className:Ce("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 overflow-y-auto overscroll-contain rounded-4xl bg-popover p-6 text-sm text-popover-foreground shadow-xl ring-1 ring-foreground/5 duration-100 outline-none data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 sm:max-w-md dark:ring-foreground/10",t),children:B.jsxs(eK,{"data-slot":"dialog",className:"[display:inherit] [gap:inherit] outline-none",children:[e,n&&B.jsxs(S3,{variant:"ghost",className:"absolute top-4 right-4 bg-secondary",size:"icon-sm",children:[B.jsx(XB,{}),B.jsx("span",{className:"sr-only",children:"Close"})]})]})})})}function mH({className:t,...e}){return B.jsx("div",{"data-slot":"dialog-header",className:Ce("flex flex-col gap-1.5",t),...e})}function gH({className:t,showCloseButton:e=!1,children:n,...r}){return B.jsxs("div",{"data-slot":"dialog-footer",className:Ce("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...r,children:[n,e&&B.jsx(S3,{variant:"outline",children:"Close"})]})}function bH({className:t,...e}){return B.jsx(gI,{slot:"title","data-slot":"dialog-title",className:Ce("font-heading text-base leading-none font-medium",t),...e})}function JB({className:t,type:e,...n}){return B.jsx($6,{type:e,"data-slot":"input",className:Dc(t,r=>Ce("h-9 w-full min-w-0 rounded-3xl border border-transparent bg-input/50 px-3 py-1 text-base transition-[color,box-shadow,background-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r)),...n})}function yH({className:t,...e}){return B.jsx(NI,{"data-slot":"input-group",className:Ce("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-4xl border border-transparent bg-input/50 transition-[color,box-shadow,background-color] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-data-[align=block-end]:rounded-3xl has-data-[align=block-start]:rounded-3xl has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/30 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[textarea]:rounded-2xl has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",t),...e})}const vH=Bl("flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-3xl **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:-ml-1 has-[>kbd]:-ml-1","inline-end":"order-last pr-3 has-[>button]:-mr-1 has-[>kbd]:-mr-1","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"}},defaultVariants:{align:"inline-start"}});function xH({className:t,align:e="inline-start",...n}){return B.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:Ce(vH({align:e}),t),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function $3({className:t,dir:e,style:n,...r}){const{contains:i}=tK({sensitivity:"base"});return B.jsx("div",{"data-slot":"command",dir:e,className:Ce("flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground",t),style:n,children:B.jsx(Bz,{...r,filter:r.filter||i,children:r.children})})}function w3({...t}){return B.jsx(bT,{"data-slot":"command-popover-trigger",...t})}function T3({className:t,placement:e="bottom start",offset:n=4,crossOffset:r=0,...i}){return B.jsx(h3,{"data-slot":"command-popover",placement:e,offset:n,crossOffset:r,className:Ce("relative isolate z-50 w-(--trigger-width) min-w-64 origin-(--trigger-anchor-point) overflow-hidden rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 dark:ring-foreground/10","*:data-[slot=command]:rounded-none *:data-[slot=command]:bg-transparent *:data-[slot=command]:p-0",t),...i})}function A3({className:t,flush:e=!1,...n}){return B.jsx(t_,{autoFocus:!0,"aria-label":n.placeholder||"Search","data-slot":"command-input-wrapper",className:e?"border-b border-border/60":"p-1 pb-0",children:B.jsxs(yH,{className:e?"h-10 rounded-none bg-transparent":"h-9 bg-input/50",children:[B.jsx($6,{...n,"data-slot":"command-input",className:Ce("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-search-cancel-button]:hidden",t)}),B.jsx(xH,{children:B.jsx(iH,{className:"size-4 shrink-0 opacity-50"})})]})})}function B3({className:t,...e}){return B.jsx(yT,{...e,"data-slot":"command-list",className:Ce("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",t)})}function jh({className:t,children:e,items:n,heading:r,...i}){return B.jsxs(XF,{"data-slot":"command-group",className:Ce("overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",t),...i,children:[r&&B.jsx(KI,{"cmdk-group-heading":"",children:r}),B.jsx(Qp,{items:n,children:e})]})}function CH({className:t,...e}){return B.jsx(HI,{"data-slot":"command-separator",className:Ce("my-1.5 h-px bg-border/50",t),...e})}function ic({className:t,children:e,textValue:n,...r}){return B.jsx(xT,{...r,"data-slot":"command-item",className:Ce("group/command-item relative flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none in-data-[slot=dialog-content]:rounded-3xl data-focused:bg-muted data-focused:text-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-focused:*:[svg]:text-foreground data-selected:*:[svg]:text-foreground",t),textValue:n||(typeof e=="string"?e:void 0),children:Dc(e,i=>B.jsxs(B.Fragment,{children:[i,B.jsx(k3,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100"})]}))})}const ZB=k.createContext(null);function sa(){const t=k.useContext(ZB);if(!t)throw new Error("useTasksContext must be used inside the app shell");return t}function EH(){const{project:t,boards:e,board:n,tasks:r}=sa(),o=gS()({to:"/task/$number"}),a=o?Number(o.number):null,u=a!=null?r.find(h=>h.number===a):null,c=t?.name??"…",f=n&&n!==e[0]?.id?`/?board=${encodeURIComponent(n)}`:"/";return B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx(DH,{}),B.jsx(cH,{children:B.jsxs(dH,{children:[B.jsx(z2,{children:o?B.jsx(fH,{href:f,className:"font-medium text-foreground",children:c}):B.jsx(I2,{className:"font-medium",children:c})}),o&&B.jsx(z2,{children:B.jsx(I2,{children:u?.id??(t?`${t.prefix}-${a}`:`#${a}`)})})]})})]})}function DH(){const{boards:t,board:e,switchBoard:n}=sa(),[r,i]=k.useState(!1),o=new Map;for(const u of t)o.set(u.name,(o.get(u.name)??0)+1);const a=u=>(o.get(u.name)??0)>1?`${u.name} — ${u.id}`:u.name;return B.jsxs(w3,{isOpen:r,onOpenChange:i,children:[B.jsx(Lt,{variant:"ghost",size:"icon-sm","aria-label":"Switch board",className:"text-muted-foreground",children:B.jsx(Gj,{})}),B.jsx(T3,{className:"w-60",children:B.jsxs($3,{children:[B.jsx(A3,{flush:!0,placeholder:"Switch board"}),B.jsx(B3,{selectionMode:"single",selectedKeys:e?[e]:[],onAction:u=>{i(!1),n(String(u))},children:B.jsx(jh,{children:t.map(u=>B.jsx(ic,{id:u.id,textValue:a(u),children:a(u)},u.id))})})]})})]})}const kH={backlog:"text-muted-foreground/60",todo:"text-muted-foreground",in_progress:"text-foreground/80",done:"text-foreground/80",canceled:"text-muted-foreground/60"};function bl({status:t,className:e}){const n={viewBox:"0 0 14 14",className:Ce("size-3.5 shrink-0",kH[t],e),"aria-hidden":!0};switch(t){case"backlog":return B.jsx("svg",{...n,children:B.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeDasharray:"2.5 2.2"})});case"todo":return B.jsx("svg",{...n,children:B.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})});case"in_progress":return B.jsxs("svg",{...n,children:[B.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),B.jsx("path",{d:"M7 3.4 A3.6 3.6 0 0 1 7 10.6 Z",fill:"currentColor"})]});case"done":return B.jsxs("svg",{...n,children:[B.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),B.jsx("path",{d:"M4.4 7.2l1.8 1.8 3.4-3.9",fill:"none",stroke:"var(--background)",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]});case"canceled":return B.jsxs("svg",{...n,children:[B.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),B.jsx("path",{d:"M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",stroke:"var(--background)",strokeWidth:"1.5",strokeLinecap:"round"})]})}}function eM({className:t}){return B.jsxs("span",{title:"Needs a human","aria-label":"Needs a human",className:Ce("inline-flex shrink-0 items-center gap-1 rounded-full bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-700 dark:text-amber-400",t),children:[B.jsx(tm,{className:"size-3","aria-hidden":!0}),"Human"]})}function Vr({className:t,htmlFor:e,slot:n,...r}){const i=B.jsx(cI,{"data-slot":"label",className:Ce("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-data-disabled:opacity-50",t),...r,htmlFor:e,slot:n});return e&&n===void 0?B.jsx(t3.Provider,{value:null,children:i}):i}function tM({children:t,...e}){return B.jsx(ZF,{"data-slot":"popover-trigger",...e,children:t})}function nM({className:t,placement:e="bottom",offset:n=4,crossOffset:r=0,...i}){return B.jsx(h3,{"data-slot":"popover-content",placement:e,offset:n,crossOffset:r,className:Ce("z-50 flex w-72 origin-(--trigger-anchor-point) flex-col gap-4 rounded-3xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/5 outline-hidden duration-100 data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 dark:ring-foreground/10",t),...i})}const SH=Bl("group/toggle inline-flex items-center justify-center gap-1 rounded-3xl text-sm font-medium whitespace-nowrap transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 data-selected:bg-muted [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-9 min-w-9 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",sm:"h-8 min-w-8 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",lg:"h-10 min-w-10 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3"}},defaultVariants:{variant:"default",size:"default"}}),rM=k.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function $H({className:t,variant:e,size:n,spacing:r=2,orientation:i="horizontal",children:o,...a}){return B.jsx(a_,{"data-slot":"toggle-group","data-variant":e,"data-size":n,"data-spacing":r,orientation:i,style:{"--gap":`calc(var(--spacing) * ${r})`},className:Ce("group/toggle-group flex w-fit flex-row items-center gap-(--gap) data-[spacing=0]:data-[variant=outline]:rounded-3xl data-vertical:flex-col data-vertical:items-stretch",t),...a,children:B.jsx(rM.Provider,{value:{variant:e,size:n,spacing:r,orientation:i},children:o})})}function F2({className:t,children:e,variant:n="default",size:r="default",...i}){const o=k.useContext(rM);return B.jsx(u_,{"data-slot":"toggle-group-item","data-variant":o.variant||n,"data-size":o.size||r,"data-spacing":o.spacing,className:Ce("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-3 group-data-[spacing=0]/toggle-group:shadow-none focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-2.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-2.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-3xl group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-3xl group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-3xl group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-3xl data-[state=on]:bg-muted group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",SH({variant:o.variant||n,size:o.size||r}),t),...i,children:e})}function wH(){const{settings:t,setSettings:e}=sa();return B.jsxs(tM,{children:[B.jsx(Lt,{variant:"ghost",size:"icon-sm","aria-label":"Display options",children:B.jsx(sH,{})}),B.jsxs(nM,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[B.jsxs($H,{variant:"outline",spacing:0,selectionMode:"single",disallowEmptySelection:!0,selectedKeys:[t.view],onSelectionChange:n=>{const r=[...n][0];(r==="board"||r==="list")&&e({...t,view:r})},"aria-label":"View",className:"w-full",children:[B.jsxs(F2,{id:"list",className:"flex-1",children:[B.jsx(Xj,{"data-icon":"inline-start"}),"List"]}),B.jsxs(F2,{id:"board",className:"flex-1",children:[B.jsx(Fj,{"data-icon":"inline-start"}),"Board"]})]}),t.view==="board"&&B.jsxs("div",{className:"flex flex-col gap-1",children:[B.jsx(Vr,{className:"px-1 pb-1 text-xs text-muted-foreground",children:"Columns"}),No.map(n=>{const r=t.boardColumns.includes(n);return B.jsxs(Lt,{variant:"ghost",size:"sm","aria-pressed":r,onPress:()=>e({...t,boardColumns:No.filter(i=>i===n?!r:t.boardColumns.includes(i))}),className:"w-full justify-start gap-2 font-normal",children:[B.jsx(bl,{status:n}),So[n],B.jsx(k3,{"data-icon":"inline-end",className:r?"ml-auto":"ml-auto opacity-0"})]},n)})]})]})]})}const TH=Bl("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[>[data-variant=outline]]:*:data-[slot=input-group]:border-border has-[>[data-variant=outline]]:*:data-[slot=select-trigger]:border-border has-[>[data-variant=outline]]:[&>[data-slot=input-group]:has(:focus-visible)]:border-ring has-[>[data-variant=outline]]:[&>[data-slot=select-trigger]:focus-visible]:border-ring has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-4xl [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[>[data-variant=outline]]:[&>input]:border-border has-[>[data-variant=outline]]:[&>input:focus-visible]:border-ring",{variants:{orientation:{horizontal:"**:data-slot:rounded-r-none [&_[data-slot]~[data-slot]]:rounded-l-none [&_[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-4xl!",vertical:"flex-col **:data-slot:rounded-b-none [&_[data-slot]~[data-slot]]:rounded-t-none [&_[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-4xl!"}},defaultVariants:{orientation:"horizontal"}});function AH({className:t,orientation:e,...n}){return B.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:Ce(TH({orientation:e}),t),...n})}function K2({className:t,render:e,...n}){if(e){const r={"data-slot":"button-group-text",className:Ce("flex items-center gap-2 rounded-4xl border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",t),...n};return e(r)}return B.jsx("div",{"data-slot":"button-group-text",className:Ce("flex items-center gap-2 rounded-4xl border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",t),...n})}const Eb="__none__",_2="__create__";function Ur({label:t,options:e,value:n,onChange:r,mode:i,placeholder:o,allowCreate:a=!0,renderValue:u,size:c="sm",variant:f="outline",chevron:h=!0,className:m}){const[g,b]=k.useState(!1),[v,C]=k.useState(""),E=[...new Set([...e,...n])].sort(),D=v.trim(),w=a&&D.length>0&&!E.some(O=>O.toLowerCase()===D.toLowerCase());function $(O){const M=String(O);if(M===_2){r(i==="single"?[D]:[...n,D]),C(""),i==="single"&&T();return}if(M===Eb){r([]),T();return}if(i==="single"){r([M]),T();return}r(n.includes(M)?n.filter(P=>P!==M):[...n,M])}function T(){b(!1),C("")}const A=u?.(n)??B.jsx("span",{className:"truncate",children:n.length>0?n.join(", "):o});return B.jsxs(w3,{isOpen:g,onOpenChange:O=>O?b(!0):T(),children:[B.jsxs(Lt,{variant:f,size:c,"aria-label":t,className:Ce("justify-between gap-1.5 font-normal",m),children:[A,h&&B.jsx(WB,{className:"text-muted-foreground"})]}),B.jsx(T3,{className:"w-60",children:B.jsxs($3,{inputValue:v,onInputChange:C,children:[B.jsx(A3,{flush:!0,placeholder:`Search ${t.toLowerCase()}`}),B.jsxs(B3,{selectionMode:i,selectedKeys:i==="single"?[n[0]??Eb]:n,onAction:$,disallowEmptySelection:i==="single",renderEmptyState:()=>w?null:B.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nothing here yet"}),children:[B.jsxs(jh,{children:[i==="single"?B.jsx(ic,{id:Eb,textValue:o,children:o}):null,E.map(O=>B.jsx(ic,{id:O,textValue:O,children:O},O))]}),w?B.jsx(CH,{}):null,w?B.jsx(jh,{children:B.jsxs(ic,{id:_2,textValue:v,children:[B.jsx(QB,{}),B.jsx("span",{className:"truncate",children:D})]})}):null]})]})})]})}const iM={statuses:[],tags:[],milestone:null,needsHuman:!1};function BH(t,e){return t.filter(n=>!(e.statuses.length>0&&!e.statuses.includes(n.status)||e.tags.length>0&&!n.tags.some(r=>e.tags.includes(r))||e.milestone!==null&&n.milestone!==e.milestone||e.needsHuman&&!n.needsHuman))}function oM(t){return t.statuses.length>0||t.tags.length>0||t.milestone!==null||t.needsHuman}function nm(t){return[...new Set(t.flatMap(e=>e.tags))].sort()}function rm(t){return[...new Set(t.map(e=>e.milestone).filter(e=>!!e))].sort()}function MH(){const{tasks:t,filters:e,setFilters:n}=sa();return B.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2",children:[e.statuses.length>0&&B.jsx(Ff,{icon:B.jsx(bl,{status:e.statuses[0],className:"size-3.5"}),name:"Status",operator:e.statuses.length>1?"is any of":"is",onRemove:()=>n({...e,statuses:[]}),children:B.jsx(Ur,{label:"Status",mode:"multiple",allowCreate:!1,options:[...No],value:e.statuses,onChange:r=>n({...e,statuses:r}),placeholder:"Status",renderValue:r=>B.jsx("span",{className:"truncate",children:r.map(i=>So[i]).join(", ")}),size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.tags.length>0&&B.jsx(Ff,{icon:B.jsx(YB,{className:"size-3.5"}),name:"Tag",operator:e.tags.length>1?"is any of":"is",onRemove:()=>n({...e,tags:[]}),children:B.jsx(Ur,{label:"Tags",mode:"multiple",allowCreate:!1,options:nm(t),value:e.tags,onChange:r=>n({...e,tags:r}),placeholder:"Tags",size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.milestone!==null&&B.jsx(Ff,{name:"Milestone",operator:"is",onRemove:()=>n({...e,milestone:null}),children:B.jsx(Ur,{label:"Milestone",mode:"single",allowCreate:!1,options:rm(t),value:[e.milestone],onChange:r=>n({...e,milestone:r[0]??null}),placeholder:"Milestone",size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.needsHuman&&B.jsx(Ff,{icon:B.jsx(tm,{className:"size-3.5"}),name:"Needs a human",onRemove:()=>n({...e,needsHuman:!1})}),B.jsx(Lt,{size:"sm",variant:"ghost",onPress:()=>n(iM),children:"Clear"})]})}function Ff({icon:t,name:e,operator:n,onRemove:r,children:i}){return B.jsxs(AH,{children:[B.jsxs(K2,{className:"h-8 gap-1.5 bg-transparent text-sm font-normal",children:[t,e]}),n&&B.jsx(K2,{className:"h-8 border-l-0 bg-transparent text-sm font-normal text-muted-foreground",children:n}),i,B.jsx(Lt,{variant:"outline",size:"icon-sm","aria-label":`Remove ${e.toLowerCase()} filter`,onPress:r,className:"border-l-0 text-muted-foreground",children:B.jsx(XB,{})})]})}function RH(){const{tasks:t,filters:e,setFilters:n}=sa(),r=oM(e);return B.jsxs(tM,{children:[B.jsxs(Lt,{variant:"ghost",size:"icon-sm","aria-label":"Filter",className:"relative",children:[B.jsx(Qj,{}),r&&B.jsx("span",{className:"absolute top-1 right-1 size-1.5 rounded-full bg-primary"})]}),B.jsxs(nM,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{className:"px-1 text-xs text-muted-foreground",children:"Status"}),B.jsx(Ur,{label:"Status",mode:"multiple",allowCreate:!1,options:[...No],value:e.statuses,onChange:i=>n({...e,statuses:i}),placeholder:"Any status",renderValue:i=>B.jsx("span",{className:"truncate",children:i.length===0?"Any status":i.map(o=>So[o]).join(", ")}),className:"w-full"})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{className:"px-1 text-xs text-muted-foreground",children:"Tags"}),B.jsx(Ur,{label:"Tags",mode:"multiple",allowCreate:!1,options:nm(t),value:e.tags,onChange:i=>n({...e,tags:i}),placeholder:"Any tag",className:"w-full"})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{className:"px-1 text-xs text-muted-foreground",children:"Milestone"}),B.jsx(Ur,{label:"Milestone",mode:"single",allowCreate:!1,options:rm(t),value:e.milestone?[e.milestone]:[],onChange:i=>n({...e,milestone:i[0]??null}),placeholder:"Any milestone",className:"w-full"})]}),B.jsxs(Lt,{size:"sm",variant:e.needsHuman?"secondary":"outline","aria-pressed":e.needsHuman,onPress:()=>n({...e,needsHuman:!e.needsHuman}),className:Ce("justify-start font-normal",e.needsHuman&&"text-amber-700 dark:text-amber-400"),children:[B.jsx(tm,{"data-icon":"inline-start"}),"Needs a human"]})]})]})}function Xt(t){this.content=t}Xt.prototype={constructor:Xt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Xt(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Xt(n)},addToStart:function(t,e){return new Xt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Xt(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Xt(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Xt.from(t),t.size?new Xt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Xt.from(t),t.size?new Xt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Xt.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Xt.from=function(t){if(t instanceof Xt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Xt(e)};function sM(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){let a=i.text,u=o.text,c=0;for(;a[c]==u[c];c++)n++;return c&&c<a.length&&c<u.length&&uM(a.charCodeAt(c-1))&&lM(a.charCodeAt(c))&&n--,n}if(i.content.size||o.content.size){let a=sM(i.content,o.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function aM(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let a=t.child(--i),u=e.child(--o),c=a.nodeSize;if(a==u){n-=c,r-=c;continue}if(!a.sameMarkup(u))return{a:n,b:r};if(a.isText&&a.text!=u.text){let f=a.text,h=u.text,m=f.length,g=h.length;for(;m>0&&g>0&&f[m-1]==h[g-1];)m--,g--,n--,r--;return m&&g&&m<f.length&&uM(f.charCodeAt(m-1))&&lM(f.charCodeAt(m))&&(n++,r++),{a:n,b:r}}if(a.content.size||u.content.size){let f=aM(a.content,u.content,n-1,r-1);if(f)return f}n-=c,r-=c}}function lM(t){return t>=56320&&t<57344}function uM(t){return t>=55296&&t<56320}class ae{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let a=0,u=0;u<n;a++){let c=this.content[a],f=u+c.nodeSize;if(f>e&&r(c,i+u,o||null,a)!==!1&&c.content.size){let h=u+1;c.nodesBetween(Math.max(0,e-h),Math.min(c.content.size,n-h),r,i+h)}u=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",a=!0;return this.nodesBetween(e,n,(u,c)=>{let f=u.isText?u.text.slice(Math.max(e,c)-c,n-c):u.isLeaf?i?typeof i=="function"?i(u):i:u.type.spec.leafText?u.type.spec.leafText(u):"":"";u.isBlock&&(u.isLeaf&&f||u.isTextblock)&&r&&(a?a=!1:o+=r),o+=f},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new ae(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,a=0;a<n;o++){let u=this.content[o],c=a+u.nodeSize;c>e&&((a<e||c>n)&&(u.isText?u=u.cut(Math.max(0,e-a),Math.min(u.text.length,n-a)):u=u.cut(Math.max(0,e-a-1),Math.min(u.content.size,n-a-1))),r.push(u),i+=u.nodeSize),a=c}return new ae(r,i)}cutByIndex(e,n){return e==n?ae.empty:e==0&&n==this.content.length?this:new ae(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new ae(i,o)}addToStart(e){return new ae([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ae(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return sM(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return aM(this,e,n,r)}findIndex(e){if(e==0)return Kf(0,e);if(e==this.size)return Kf(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?Kf(n+1,o):Kf(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ae.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return ae.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ae.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new ae(n||e,r)}static from(e){if(!e)return ae.empty;if(e instanceof ae)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ae([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ae.empty=new ae([],0);const Db={index:0,offset:0};function Kf(t,e){return Db.index=t,Db.offset=e,Db}function Hh(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hh(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hh(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let rt=class j0{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hh(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return j0.none;if(e instanceof j0)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};rt.none=[];class Mc extends Error{}class he{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=dM(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new he(r,this.openStart,this.openEnd)}removeBetween(e,n){return new he(cM(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return he.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new he(ae.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new he(e,r,i)}}he.empty=new he(ae.empty,0,0);function cM(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:a,offset:u}=t.findIndex(n);if(i==e||o.isText){if(u!=n&&!t.child(a).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(cM(o.content,e-i-1,n-i-1)))}function dM(t,e,n,r,i,o){let{index:a,offset:u}=t.findIndex(e),c=t.maybeChild(a);if(u==e||c.isText)return o&&r<=0&&i<=0&&!o.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let f=dM(c.content,e-u-1,n,a==0?r-1:0,a==t.childCount-1?i-1:0,c);return f&&t.replaceChild(a,c.copy(f))}function PH(t,e,n){if(n.openStart>t.depth)throw new Mc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Mc("Inconsistent open depths");return fM(t,e,n,0)}function fM(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let a=fM(t,e,n,r+1);return o.copy(o.content.replaceChild(i,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let a=t.parent,u=a.content;return Vs(a,u.cut(0,t.parentOffset).append(n.content).append(u.cut(e.parentOffset)))}else{let{start:a,end:u}=OH(n,t);return Vs(o,pM(t,a,u,e,r))}else return Vs(o,Vh(t,e,r))}function hM(t,e){if(!e.type.compatibleContent(t.type))throw new Mc("Cannot join "+e.type.name+" onto "+t.type.name)}function H0(t,e,n){let r=t.node(n);return hM(r,e.node(n)),r}function Hs(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function oc(t,e,n,r){let i=(e||t).node(n),o=0,a=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Hs(t.nodeAfter,r),o++));for(let u=o;u<a;u++)Hs(i.child(u),r);e&&e.depth==n&&e.textOffset&&Hs(e.nodeBefore,r)}function Vs(t,e){if(!t.type.validContent(e))throw new Mc("Invalid content for node "+t.type.name);return t.copy(e)}function pM(t,e,n,r,i){let o=t.depth>i&&H0(t,e,i+1),a=r.depth>i&&H0(n,r,i+1),u=[];return oc(null,t,i,u),o&&a&&e.index(i)==n.index(i)?(hM(o,a),Hs(Vs(o,pM(t,e,n,r,i+1)),u)):(o&&Hs(Vs(o,Vh(t,e,i+1)),u),oc(e,n,i,u),a&&Hs(Vs(a,Vh(n,r,i+1)),u)),oc(r,null,i,u),new ae(u)}function Vh(t,e,n){let r=[];if(oc(null,t,n,r),t.depth>n){let i=H0(t,e,n+1);Hs(Vs(i,Vh(t,e,n+1)),r)}return oc(e,null,n,r),new ae(r)}function OH(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(ae.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Rc{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return rt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let u=r;r=i,i=u}let o=r.marks;for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!i||!o[a].isInSet(i.marks))&&(o=o[a--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Uh(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let a=e;;){let{index:u,offset:c}=a.content.findIndex(o),f=o-c;if(r.push(a,u,i+c),!f||(a=a.child(u),a.isText))break;o=f-1,i+=c+1}return new Rc(n,r,o)}static resolveCached(e,n){let r=j2.get(e);if(r)for(let o=0;o<r.elts.length;o++){let a=r.elts[o];if(a.pos==n)return a}else j2.set(e,r=new NH);let i=r.elts[r.i]=Rc.resolve(e,n);return r.i=(r.i+1)%LH,i}}class NH{constructor(){this.elts=[],this.i=0}}const LH=12,j2=new WeakMap;class Uh{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const zH=Object.create(null);let $o=class V0{constructor(e,n,r,i=rt.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||ae.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hh(this.attrs,n||e.defaultAttrs||zH)&&rt.sameSet(this.marks,r||rt.none)}copy(e=null){return e==this.content?this:new V0(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new V0(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return he.empty;let i=this.resolve(e),o=this.resolve(n),a=r?0:i.sharedDepth(n),u=i.start(a),f=i.node(a).content.cut(i.pos-u,o.pos-u);return new he(f,i.depth-a,o.depth-a)}replace(e,n,r){return PH(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Rc.resolveCached(this,e)}resolveNoCache(e){return Rc.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),mM(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ae.empty,i=0,o=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,i,o),u=a&&a.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),a=o&&o.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=rt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!rt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=ae.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};$o.prototype.text=void 0;class qh extends $o{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):mM(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new qh(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new qh(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function mM(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Ys{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new IH(e,n);if(r.next==null)return Ys.empty;let i=gM(r);r.next&&r.err("Unexpected trailing text");let o=UH(VH(i));return qH(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(a,u){let c=a.matchFragment(e,r);if(c&&(!n||c.validEnd))return ae.from(u.map(f=>f.createAndFill()));for(let f=0;f<a.next.length;f++){let{type:h,next:m}=a.next[f];if(!(h.isText||h.hasRequiredAttrs())&&i.indexOf(m)==-1){i.push(m);let g=o(m,u.concat(h));if(g)return g}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let a=[];for(let u=i;u.type;u=u.via)a.push(u.type);return a.reverse()}for(let a=0;a<o.next.length;a++){let{type:u,next:c}=o.next[a];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||c.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)o+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return o}).join(`
|
|
22
|
+
`)}}Ys.empty=new Ys(!0);class IH{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function gM(t){let e=[];do e.push(FH(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function FH(t){let e=[];do e.push(KH(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function KH(t){let e=HH(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=_H(t,e);else break;return e}function H2(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function _H(t,e){let n=H2(t),r=n;return t.eat(",")&&(t.next!="}"?r=H2(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function jH(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.isInGroup(e)&&i.push(a)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function HH(t){if(t.eat("(")){let e=gM(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=jH(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function VH(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(a,u,c){let f={term:c,to:u};return e[a].push(f),f}function i(a,u){a.forEach(c=>c.to=u)}function o(a,u){if(a.type=="choice")return a.exprs.reduce((c,f)=>c.concat(o(f,u)),[]);if(a.type=="seq")for(let c=0;;c++){let f=o(a.exprs[c],u);if(c==a.exprs.length-1)return f;i(f,u=n())}else if(a.type=="star"){let c=n();return r(u,c),i(o(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return i(o(a.expr,u),c),i(o(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(u)].concat(o(a.expr,u));if(a.type=="range"){let c=u;for(let f=0;f<a.min;f++){let h=n();i(o(a.expr,c),h),c=h}if(a.max==-1)i(o(a.expr,c),c);else for(let f=a.min;f<a.max;f++){let h=n();r(c,h),i(o(a.expr,c),h),c=h}return[r(c)]}else{if(a.type=="name")return[r(u,void 0,a.value)];throw new Error("Unknown expr type")}}}}function bM(t,e){return e-t}function V2(t,e){let n=[];return r(e),n.sort(bM);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:u,to:c}=o[a];!u&&n.indexOf(c)==-1&&r(c)}}}function UH(t){let e=Object.create(null);return n(V2(t,0));function n(r){let i=[];r.forEach(a=>{t[a].forEach(({term:u,to:c})=>{if(!u)return;let f;for(let h=0;h<i.length;h++)i[h][0]==u&&(f=i[h][1]);V2(t,c).forEach(h=>{f||i.push([u,f=[]]),f.indexOf(h)==-1&&f.push(h)})})});let o=e[r.join(",")]=new Ys(r.indexOf(t.length-1)>-1);for(let a=0;a<i.length;a++){let u=i[a][1].sort(bM);o.next.push({type:i[a][0],next:e[u.join(",")]||n(u)})}return o}}function qH(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:c,next:f}=i.next[u];a.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(f)==-1&&r.push(f)}o&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function yM(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function vM(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function xM(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let i in t)t[i].validate&&t[i].validate(e[i])}function CM(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new WH(t,r,e[r]);return n}let U2=class EM{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=CM(e,r.attrs),this.defaultAttrs=yM(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ys.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:vM(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $o(this,this.computeAttrs(e),ae.from(n),rt.setFrom(r))}createChecked(e=null,n,r){return n=ae.from(n),this.checkContent(n),new $o(this,this.computeAttrs(e),n,rt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=ae.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(ae.empty,!0);return o?new $o(this,e,n.append(o),rt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){xM(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:rt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,a)=>r[o]=new EM(o,n,a));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function GH(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class WH{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?GH(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class im{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=CM(e,i.attrs),this.excluded=null;let o=yM(this.attrs);this.instance=o?new rt(this,o):null}create(e=null){return!e&&this.instance?this.instance:new rt(this,vM(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,a)=>r[o]=new im(o,i++,n,a)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){xM(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class DM{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Xt.from(e.nodes),n.marks=Xt.from(e.marks||{}),this.nodes=U2.compile(this.spec.nodes,this),this.marks=im.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],a=o.spec.content||"",u=o.spec.marks;if(o.contentMatch=r[a]||(r[a]=Ys.parse(a,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=u=="_"?null:u?q2(this,u.split(" ")):u==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],a=o.spec.excludes;o.excluded=a==null?[o]:a==""?[]:q2(this,a.split(" "))}this.nodeFromJSON=i=>$o.fromJSON(this,i),this.markFromJSON=i=>rt.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof U2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new qh(r,r.defaultAttrs,e,rt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function q2(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],a=o;if(o)n.push(o);else for(let u in t.marks){let c=t.marks[u];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function QH(t){return t.tag!=null}function YH(t){return t.style!=null}class Si{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(QH(i))this.tags.push(i);else if(YH(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new W2(this,n,!1);return r.addAll(e,rt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new W2(this,n,!0);return r.addAll(e,rt.none,n.from,n.to),he.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(ZH(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let a=o.getAttrs(e);if(a===!1)continue;o.attrs=a||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let a=this.styles[o],u=a.style;if(!(u.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||u.length>e.length&&(u.charCodeAt(e.length)!=61||u.slice(e.length+1)!=n))){if(a.getAttrs){let c=a.getAttrs(n);if(c===!1)continue;a.attrs=c||void 0}return a}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let u=n[a];if((u.priority==null?50:u.priority)<o)break}n.splice(a,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(a=>{r(a=Q2(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(a=>{r(a=Q2(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Si(e,Si.schemaRules(e)))}}const kM={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},XH={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},SM={ol:!0,ul:!0},Pc=1,U0=2,sc=4;function G2(t,e,n){return e!=null?(e?Pc:0)|(e==="full"?U0:0):t&&t.whitespace=="pre"?Pc|U0:n&~sc}class _f{constructor(e,n,r,i,o,a){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=rt.none,this.match=o||(a&sc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ae.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Pc)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=ae.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(ae.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!kM.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class W2{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,a=G2(null,n.preserveWhitespace,0)|(r?sc:0);i?o=new _f(i.type,i.attrs,rt.none,!0,n.topMatch||i.type.contentMatch,a):r?o=new _f(null,null,rt.none,!0,null,a):o=new _f(e.schema.topNodeType,null,rt.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=i.options&U0?"full":this.localPreserveWS||(i.options&Pc)>0,{schema:a}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
23
|
+
`);else if(a.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(a.linebreakReplacement.create())){let u=r.split(/\r?\n|\r/);for(let c=0;c<u.length;c++)c&&this.insertNode(a.linebreakReplacement.create(),n,!0),u[c]&&this.insertNode(a.text(u[c]),n,!/\S/.test(u[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let u=i.content[i.content.length-1],c=e.previousSibling;(!u||c&&c.nodeName=="BR"||u.isText&&/[ \t\r\n\u000c]$/.test(u.text))&&(r=r.slice(1))}r&&this.insertNode(a.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),u;SM.hasOwnProperty(a)&&this.parser.normalizeLists&&JH(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(u=this.parser.matchTag(e,this,r));e:if(c?c.ignore:XH.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let f,h=this.needsBlock;if(kM.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),f=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let m=c&&c.skip?n:this.readStyles(e,n);m&&this.addAll(e,m),f&&this.sync(o),this.needsBlock=h}else{let f=this.readStyles(e,n);f&&this.addElementByRule(e,c,f,c.consuming===!1?u:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
24
|
+
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],a=r.getPropertyValue(o);if(a)for(let u=void 0;;){let c=this.parser.matchStyle(o,a,this,u);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(f=>!c.clearMark(f)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)u=c;else break}}return n}addElementByRule(e,n,r,i){let o,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let c=this.enter(a,n.attrs||null,r,n.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let u=this.top;if(a&&a.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r,!1));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}o&&this.sync(u)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let a=r?e.childNodes[r]:e.firstChild,u=i==null?null:e.childNodes[i];a!=u;a=a.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(a,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let a=this.open,u=0;a>=0;a--){let c=this.nodes[a],f=c.findWrapping(e);if(f&&(!i||i.length>f.length+u)&&(i=f,o=c,!f.length))break;if(c.solid){if(r)break;u+=2}}if(!i)return null;this.sync(o);for(let a=0;a<i.length;a++)n=this.enterInner(i[a],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let a=rt.none;for(let u of i.concat(e.marks))(o.type?o.type.allowsMarkType(u.type):Y2(u.type,e.type))&&(a=u.addToSet(a));return o.content.push(e.mark(a)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let u=G2(e,o,a.options);a.options&sc&&a.content.length==0&&(u|=sc);let c=rt.none;return r=r.filter(f=>(a.type?a.type.allowsMarkType(f.type):Y2(f.type,e))?(c=f.addToSet(c),!1):!0),this.nodes.push(new _f(e,n,c,i,null,u)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Pc)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(u,c)=>{for(;u>=0;u--){let f=n[u];if(f==""){if(u==n.length-1||u==0)continue;for(;c>=o;c--)if(a(u-1,c))return!0;return!1}else{let h=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!h||h.name!=f&&!h.isInGroup(f))return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function JH(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&SM.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ZH(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Q2(t){let e={};for(let n in t)e[n]=t[n];return e}function Y2(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],a=u=>{o.push(u);for(let c=0;c<u.edgeCount;c++){let{type:f,next:h}=u.edge(c);if(f==e||o.indexOf(h)<0&&a(h))return!0}};if(a(i.contentMatch))return!0}}class aa{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=jf(n).createDocumentFragment());let i=r,o=[];return e.forEach(a=>{if(o.length||a.marks.length){let u=0,c=0;for(;u<o.length&&c<a.marks.length;){let f=a.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(o[u][0])||f.type.spec.spanning===!1)break;u++,c++}for(;u<o.length;)i=o.pop()[1];for(;c<a.marks.length;){let f=a.marks[c++],h=this.serializeMark(f,a.isInline,n);h&&(o.push([f,i]),i.appendChild(h.dom),i=h.contentDOM||h.dom)}}i.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(e,n){if(e.isText)return jf(n).createTextNode(e.text);let{dom:r,contentDOM:i}=dh(jf(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&dh(jf(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:dh(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new aa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=X2(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return X2(e.marks)}}function X2(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function jf(t){return t.document||window.document}const J2=new WeakMap;function eV(t){let e=J2.get(t);return e===void 0&&J2.set(t,e=tV(t)),e}function tV(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function dh(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=eV(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=i.indexOf(" ");a>0&&(n=i.slice(0,a),i=i.slice(a+1));let u,c=n?t.createElementNS(n,i):t.createElement(i),f=e[1],h=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){h=2;for(let m in f)if(f[m]!=null){let g=m.indexOf(" ");g>0?c.setAttributeNS(m.slice(0,g),m.slice(g+1),f[m]):m=="style"&&c.style?c.style.cssText=f[m]:c.setAttribute(m,f[m])}}for(let m=h;m<e.length;m++){let g=e[m];if(g===0){if(m<e.length-1||m>h)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else if(typeof g=="string")c.appendChild(t.createTextNode(g));else{let{dom:b,contentDOM:v}=dh(t,g,n,r);if(c.appendChild(b),v){if(u)throw new RangeError("Multiple content holes");u=v}}}return{dom:c,contentDOM:u}}const $M=65535,wM=Math.pow(2,16);function nV(t,e){return t+e*wM}function Z2(t){return t&$M}function rV(t){return(t-(t&$M))/wM}const TM=1,AM=2,fh=4,BM=8;class q0{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&BM)>0}get deletedBefore(){return(this.delInfo&(TM|fh))>0}get deletedAfter(){return(this.delInfo&(AM|fh))>0}get deletedAcross(){return(this.delInfo&fh)>0}}class Gn{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Gn.empty)return Gn.empty}recover(e){let n=0,r=Z2(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+rV(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let c=this.ranges[u]-(this.inverted?i:0);if(c>e)break;let f=this.ranges[u+o],h=this.ranges[u+a],m=c+f;if(e<=m){let g=f?e==c?-1:e==m?1:n:n,b=c+i+(g<0?0:h);if(r)return b;let v=e==(n<0?c:m)?null:nV(u/3,e-c),C=e==c?AM:e==m?TM:fh;return(n<0?e!=c:e!=m)&&(C|=BM),new q0(b,C,v)}i+=h-f}return r?e+i:new q0(e+i,0,null)}touches(e,n){let r=0,i=Z2(n),o=this.inverted?2:1,a=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let c=this.ranges[u]-(this.inverted?r:0);if(c>e)break;let f=this.ranges[u+o],h=c+f;if(e<=h&&u==i*3)return!0;r+=this.ranges[u+a]-f}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let a=this.ranges[i],u=a-(this.inverted?o:0),c=a+(this.inverted?0:o),f=this.ranges[i+n],h=this.ranges[i+r];e(u,u+f,c,c+h),o+=h-f}}invert(){return new Gn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Gn.empty:new Gn(e<0?[0,-e,0]:[0,0,e])}}Gn.empty=new Gn([]);class Oc{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Oc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Oc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let a=this._maps[o],u=a.mapResult(e,n);if(u.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,e=this._maps[c].recover(u.recover);continue}}i|=u.delInfo,e=u.pos}return r?e:new q0(e,i,null)}}const kb=Object.create(null);class fn{getMap(){return Gn.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=kb[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in kb)throw new RangeError("Duplicate use of step JSON ID "+e);return kb[e]=n,n.prototype.jsonID=e,n}}class Bt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Bt(e,null)}static fail(e){return new Bt(null,e)}static fromReplace(e,n,r,i){try{return Bt.ok(e.replace(n,r,i))}catch(o){if(o instanceof Mc)return Bt.fail(o.message);throw o}}}function M3(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(M3(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return ae.fromArray(r)}class Co extends fn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new he(M3(n.content,(a,u)=>!a.isAtom||!u.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),i),n.openStart,n.openEnd);return Bt.fromReplace(e,this.from,this.to,o)}invert(){return new $r(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Co(n.pos,r.pos,this.mark)}merge(e){return e instanceof Co&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Co(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Co(n.from,n.to,e.markFromJSON(n.mark))}}fn.jsonID("addMark",Co);class $r extends fn{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new he(M3(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Bt.fromReplace(e,this.from,this.to,r)}invert(){return new Co(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new $r(n.pos,r.pos,this.mark)}merge(e){return e instanceof $r&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new $r(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $r(n.from,n.to,e.markFromJSON(n.mark))}}fn.jsonID("removeMark",$r);class Eo extends fn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Bt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Bt.fromReplace(e,this.pos,this.pos+1,new he(ae.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Eo(this.pos,n.marks[i]);return new Eo(this.pos,this.mark)}}return new Xs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Eo(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Eo(n.pos,e.markFromJSON(n.mark))}}fn.jsonID("addNodeMark",Eo);class Xs extends fn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Bt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Bt.fromReplace(e,this.pos,this.pos+1,new he(ae.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Eo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Xs(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Xs(n.pos,e.markFromJSON(n.mark))}}fn.jsonID("removeNodeMark",Xs);class Tt extends fn{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&G0(e,this.from,this.to)?Bt.fail("Structure replace would overwrite content"):Bt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Gn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Tt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&Tt.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Tt(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Tt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?he.empty:new he(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Tt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?he.empty:new he(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Tt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Tt(n.from,n.to,he.fromJSON(e,n.slice),!!n.structure)}}Tt.MAP_BIAS=1;fn.jsonID("replace",Tt);class jt extends fn{constructor(e,n,r,i,o,a,u=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=u}apply(e){if(this.structure&&(G0(e,this.from,this.gapFrom)||G0(e,this.gapTo,this.to)))return Bt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Bt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Bt.fromReplace(e,this.from,this.to,r):Bt.fail("Content does not fit in gap")}getMap(){return new Gn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new jt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new jt(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new jt(n.from,n.to,n.gapFrom,n.gapTo,he.fromJSON(e,n.slice),n.insert,!!n.structure)}}fn.jsonID("replaceAround",jt);function G0(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let a=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function iV(t,e,n,r){let i=[],o=[],a,u;t.doc.nodesBetween(e,n,(c,f,h)=>{if(!c.isInline)return;let m=c.marks;if(!r.isInSet(m)&&h.type.allowsMarkType(r.type)){let g=Math.max(f,e),b=Math.min(f+c.nodeSize,n),v=r.addToSet(m);for(let C=0;C<m.length;C++)m[C].isInSet(v)||(a&&a.to==g&&a.mark.eq(m[C])?a.to=b:i.push(a=new $r(g,b,m[C])));u&&u.to==g?u.to=b:o.push(u=new Co(g,b,r))}}),i.forEach(c=>t.step(c)),o.forEach(c=>t.step(c))}function oV(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(a,u)=>{if(!a.isInline)return;o++;let c=null;if(r instanceof im){let f=a.marks,h;for(;h=r.isInSet(f);)(c||(c=[])).push(h),f=h.removeFromSet(f)}else r?r.isInSet(a.marks)&&(c=[r]):c=a.marks;if(c&&c.length){let f=Math.min(u+a.nodeSize,n);for(let h=0;h<c.length;h++){let m=c[h],g;for(let b=0;b<i.length;b++){let v=i[b];v.step==o-1&&m.eq(i[b].style)&&(g=v)}g?(g.to=f,g.step=o):i.push({style:m,from:Math.max(u,e),to:f,step:o})}}}),i.forEach(a=>t.step(new $r(a.from,a.to,a.style)))}function R3(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),a=[],u=e+1;for(let c=0;c<o.childCount;c++){let f=o.child(c),h=u+f.nodeSize,m=r.matchType(f.type);if(!m)a.push(new Tt(u,h,he.empty));else{r=m;for(let g=0;g<f.marks.length;g++)n.allowsMarkType(f.marks[g].type)||t.step(new $r(u,h,f.marks[g]));if(i&&f.isText&&n.whitespace!="pre"){let g,b=/\r?\n|\r/g,v;for(;g=b.exec(f.text);)v||(v=new he(ae.from(n.schema.text(" ",n.allowedMarks(f.marks))),0,0)),a.push(new Tt(u+g.index,u+g.index+g[0].length,v))}}u=h}if(!r.validEnd){let c=r.fillBefore(ae.empty,!0);t.replace(u,u,new he(c,0,0))}for(let c=a.length-1;c>=0;c--)t.step(a[c])}function sV(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ml(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,o=0;;--r){let a=t.$from.node(r),u=t.$from.index(r)+i,c=t.$to.indexAfter(r)-o;if(r<t.depth&&a.canReplace(u,c,n))return r;if(r==0||a.type.spec.isolating||!sV(a,u,c))break;u&&(i=1),c<a.childCount&&(o=1)}return null}function aV(t,e,n){let{$from:r,$to:i,depth:o}=e,a=r.before(o+1),u=i.after(o+1),c=a,f=u,h=ae.empty,m=0;for(let v=o,C=!1;v>n;v--)C||r.index(v)>0?(C=!0,h=ae.from(r.node(v).copy(h)),m++):c--;let g=ae.empty,b=0;for(let v=o,C=!1;v>n;v--)C||i.after(v+1)<i.end(v)?(C=!0,g=ae.from(i.node(v).copy(g)),b++):f++;t.step(new jt(c,f,a,u,new he(h.append(g),m,b),h.size-m,!0))}function P3(t,e,n=null,r=t){let i=lV(t,e),o=i&&uV(r,e);return o?i.map(eD).concat({type:e,attrs:n}).concat(o.map(eD)):null}function eD(t){return{type:t,attrs:null}}function lV(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let a=o.length?o[0]:e;return n.canReplaceWith(r,i,a)?o:null}function uV(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),a=e.contentMatch.findWrapping(o.type);if(!a)return null;let c=(a.length?a[a.length-1]:e).contentMatch;for(let f=r;c&&f<i;f++)c=c.matchType(n.child(f).type);return!c||!c.validEnd?null:a}function cV(t,e,n){let r=ae.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let u=n[a].type.contentMatch.matchFragment(r);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ae.from(n[a].type.create(n[a].attrs,r))}let i=e.start,o=e.end;t.step(new jt(i,o,i,o,new he(r,0,0),n.length,!0))}function dV(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(a,u)=>{let c=typeof i=="function"?i(a):i;if(a.isTextblock&&!a.hasMarkup(r,c)&&fV(t.doc,t.mapping.slice(o).map(u),r)){let f=null;if(r.schema.linebreakReplacement){let b=r.whitespace=="pre",v=!!r.contentMatch.matchType(r.schema.linebreakReplacement);b&&!v?f=!1:!b&&v&&(f=!0)}f===!1&&RM(t,a,u,o),R3(t,t.mapping.slice(o).map(u,1),r,void 0,f===null);let h=t.mapping.slice(o),m=h.map(u,1),g=h.map(u+a.nodeSize,1);return t.step(new jt(m,g,m+1,g-1,new he(ae.from(r.create(c,null,a.marks)),0,0),1,!0)),f===!0&&MM(t,a,u,o),!1}})}function MM(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let a,u=/\r?\n|\r/g;for(;a=u.exec(i.text);){let c=t.mapping.slice(r).map(n+1+o+a.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function RM(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+o);t.replaceWith(a,a+1,e.type.schema.text(`
|
|
25
|
+
`))}})}function fV(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function hV(t,e,n,r,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let a=n.create(r,null,i||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,a);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new jt(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new he(ae.from(a),0,0),1,!0))}function $i(t,e,n=1,r){let i=t.resolve(e),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,h=n-2;f>o;f--,h--){let m=i.node(f),g=i.index(f);if(m.type.spec.isolating)return!1;let b=m.content.cutByIndex(g,m.childCount),v=r&&r[h+1];v&&(b=b.replaceChild(0,v.type.create(v.attrs)));let C=r&&r[h]||m;if(!m.canReplace(g+1,m.childCount)||!C.type.validContent(b))return!1}let u=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(u,u,c?c.type:i.node(o+1).type)}function pV(t,e,n=1,r){let i=t.doc.resolve(e),o=ae.empty,a=ae.empty;for(let u=i.depth,c=i.depth-n,f=n-1;u>c;u--,f--){o=ae.from(i.node(u).copy(o));let h=r&&r[f];a=ae.from(h?h.type.create(h.attrs,a):i.node(u).copy(a))}t.step(new Tt(e,e,new he(o.append(a),n,n),!0))}function Go(t,e){let n=t.resolve(e),r=n.index();return PM(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function mV(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let o=e.child(i),a=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}function PM(t,e){return!!(t&&e&&!t.isLeaf&&mV(t,e))}function om(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let o,a,u=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(o=r.node(i).maybeChild(u-1),a=r.node(i+1)),o&&!o.isTextblock&&PM(o,a)&&r.node(i).canReplace(u,u+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function gV(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,o=t.doc.resolve(e-n),a=o.node().type;if(i&&a.inlineContent){let h=a.whitespace=="pre",m=!!a.contentMatch.matchType(i);h&&!m?r=!1:!h&&m&&(r=!0)}let u=t.steps.length;if(r===!1){let h=t.doc.resolve(e+n);RM(t,h.node(),h.before(),u)}a.inlineContent&&R3(t,e+n-1,a,o.node().contentMatchAt(o.index()),r==null);let c=t.mapping.slice(u),f=c.map(e-n);if(t.step(new Tt(f,c.map(e+n,-1),he.empty,!0)),r===!0){let h=t.doc.resolve(f);MM(t,h.node(),h.before(),t.steps.length)}return t}function bV(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function OM(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let u=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(u>0?1:0),f=r.node(a),h=!1;if(o==1)h=f.canReplace(c,c,i);else{let m=f.contentMatchAt(c).findWrapping(i.firstChild.type);h=m&&f.canReplaceWith(c,c,m[0])}if(h)return u==0?r.pos:u<0?r.before(a+1):r.after(a+1)}return null}function sm(t,e,n=e,r=he.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),o=t.resolve(n);return NM(i,o,r)?new Tt(e,n,r):new yV(i,o,r).fit()}function NM(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class yV{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ae.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=ae.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,a=r.depth,u=i.depth;for(;a&&u&&o.childCount==1;)o=o.firstChild.content,a--,u--;let c=new he(o,a,u);return e>-1?new jt(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new Tt(r.pos,i.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Sb(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let u=this.depth;u>=0;u--){let{type:c,match:f}=this.frontier[u],h,m=null;if(n==1&&(a?f.matchType(a.type)||(m=f.fillBefore(ae.from(a),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:u,parent:o,inject:m};if(n==2&&a&&(h=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:u,parent:o,wrap:h};if(o&&f.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Sb(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new he(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Sb(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new he(Uu(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new he(Uu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let C=0;C<o.length;C++)this.openFrontierNode(o[C]);let a=this.unplaced,u=r?r.content:a.content,c=a.openStart-e,f=0,h=[],{match:m,type:g}=this.frontier[n];if(i){for(let C=0;C<i.childCount;C++)h.push(i.child(C));m=m.matchFragment(i)}let b=u.size+e-(a.content.size-a.openEnd);for(;f<u.childCount;){let C=u.child(f),E=m.matchType(C.type);if(!E)break;f++,(f>1||c==0||C.content.size)&&(m=E,h.push(LM(C.mark(g.allowedMarks(C.marks)),f==1?c:0,f==u.childCount?b:-1)))}let v=f==u.childCount;v||(b=-1),this.placed=qu(this.placed,n,ae.from(h)),this.frontier[n].match=m,v&&b<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let C=0,E=u;C<b;C++){let D=E.lastChild;this.frontier.push({type:D.type,match:D.contentMatchAt(D.childCount)}),E=D.content}this.unplaced=v?e==0?he.empty:new he(Uu(a.content,e-1,1),e-1,b<0?a.openEnd:e-1):new he(Uu(a.content,e,f),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!$b(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=$b(e,n,i,r,o);if(a){for(let u=n-1;u>=0;u--){let{match:c,type:f}=this.frontier[u],h=$b(e,u,f,c,!0);if(!h||h.childCount)continue e}return{depth:n,fit:a,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=qu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=qu(this.placed,this.depth,ae.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ae.empty,!0);n.childCount&&(this.placed=qu(this.placed,this.frontier.length,n))}}function Uu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Uu(t.firstChild.content,e-1,n)))}function qu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(qu(t.lastChild.content,e-1,n)))}function Sb(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function LM(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,LM(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ae.empty,!0)))),t.copy(r)}function $b(t,e,n,r,i){let o=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==o.childCount&&!n.compatibleContent(o.type))return null;let u=r.fillBefore(o.content,!0,a);return u&&!vV(n,o.content,a)?u:null}function vV(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function xV(t){return t.spec.defining||t.spec.definingForContent}function CV(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(NM(i,o,r))return t.step(new Tt(e,n,r));let a=IM(i,o);a[a.length-1]==0&&a.pop();let u=-(i.depth+1);a.unshift(u);for(let g=i.depth,b=i.pos-1;g>0;g--,b--){let v=i.node(g).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;a.indexOf(g)>-1?u=g:i.before(g)==b&&a.splice(1,0,-g)}let c=a.indexOf(u),f=[],h=r.openStart;for(let g=r.content,b=0;;b++){let v=g.firstChild;if(f.push(v),b==r.openStart)break;g=v.content}for(let g=h-1;g>=0;g--){let b=f[g],v=xV(b.type);if(v&&!b.sameMarkup(i.node(Math.abs(u)-1)))h=g;else if(v||!b.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let b=(g+h+1)%(r.openStart+1),v=f[b];if(v)for(let C=0;C<a.length;C++){let E=a[(C+c)%a.length],D=!0;E<0&&(D=!1,E=-E);let w=i.node(E-1),$=i.index(E-1);if(w.canReplaceWith($,$,v.type,v.marks))return t.replace(i.before(E),D?o.after(E):n,new he(zM(r.content,0,r.openStart,b),b,r.openEnd))}}let m=t.steps.length;for(let g=a.length-1;g>=0&&(t.replace(e,n,r),!(t.steps.length>m));g--){let b=a[g];b<0||(e=i.before(b),n=o.after(b))}}function zM(t,e,n,r,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(zM(o.content,e+1,n,r,o)))}if(e>r){let o=i.contentMatchAt(0),a=o.fillBefore(t).append(t);t=a.append(o.matchFragment(a).fillBefore(ae.empty,!0))}return t}function EV(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=bV(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new he(ae.from(r),0,0))}function DV(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),u=!1;for(let c=r.depth;c>a;c--)r.node(c).type.spec.isolating&&(u=!0);for(let c=i.depth;c>a;c--)i.node(c).type.spec.isolating&&(u=!0);if(!u){for(let c=r.depth;c>0&&e==r.start(c);c--)e=r.before(c);for(let c=i.depth;c>0&&n==i.start(c);c--)n=i.before(c);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let o=IM(r,i);for(let a=0;a<o.length;a++){let u=o[a],c=a==o.length-1;if(c&&u==0||r.node(u).type.contentMatch.validEnd)return t.delete(r.start(u),i.end(u));if(u>0&&(c||r.node(u-1).canReplace(r.index(u-1),i.indexAfter(u-1))))return t.delete(r.before(u),i.after(u))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(e-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return t.delete(r.before(a),n);t.delete(e,n)}function IM(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class dl extends fn{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Bt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Bt.fromReplace(e,this.pos,this.pos+1,new he(ae.from(i),0,n.isLeaf?0:1))}getMap(){return Gn.empty}invert(e){return new dl(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new dl(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new dl(n.pos,n.attr,n.value)}}fn.jsonID("attr",dl);class Nc extends fn{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Bt.ok(r)}getMap(){return Gn.empty}invert(e){return new Nc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Nc(n.attr,n.value)}}fn.jsonID("docAttr",Nc);let yl=class extends Error{};yl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};yl.prototype=Object.create(Error.prototype);yl.prototype.constructor=yl;yl.prototype.name="TransformError";class FM{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Oc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new yl(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(e=i.map(e,1),n=i.map(n,-1)),i.forEach((o,a,u,c)=>{e=Math.min(e,u),n=Math.max(n,c)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=he.empty){let i=sm(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new he(ae.from(r),0,0))}delete(e,n){return this.replace(e,n,he.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return CV(this,e,n,r),this}replaceRangeWith(e,n,r){return EV(this,e,n,r),this}deleteRange(e,n){return DV(this,e,n),this}lift(e,n){return aV(this,e,n),this}join(e,n=1){return gV(this,e,n),this}wrap(e,n){return cV(this,e,n),this}setBlockType(e,n=e,r,i=null){return dV(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return hV(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new dl(e,n,r)),this}setDocAttribute(e,n){return this.step(new Nc(e,n)),this}addNodeMark(e,n){return this.step(new Eo(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof rt)n.isInSet(r.marks)&&this.step(new Xs(e,n));else{let i=r.marks,o,a=[];for(;o=n.isInSet(i);)a.push(new Xs(e,o)),i=o.removeFromSet(i);for(let u=a.length-1;u>=0;u--)this.step(a[u])}return this}split(e,n=1,r){return pV(this,e,n,r),this}addMark(e,n,r){return iV(this,e,n,r),this}removeMark(e,n,r){return oV(this,e,n,r),this}clearIncompatible(e,n,r){return R3(this,e,n,r),this}}const wb=Object.create(null);class Me{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new kV(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=he.empty){let r=n.content.lastChild,i=null;for(let u=0;u<n.openEnd;u++)i=r,r=r.lastChild;let o=e.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:c,$to:f}=a[u],h=e.mapping.slice(o);e.replaceRange(h.map(c.pos),h.map(f.pos),u?he.empty:n),u==0&&rD(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:a,$to:u}=i[o],c=e.mapping.slice(r),f=c.map(a.pos),h=c.map(u.pos);o?e.deleteRange(f,h):(e.replaceRangeWith(f,h,n),rD(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new ke(e):rl(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let a=n<0?rl(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):rl(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Wn(e.node(0))}static atStart(e){return rl(e,e,0,0,1)||new Wn(e)}static atEnd(e){return rl(e,e,e.content.size,e.childCount,-1)||new Wn(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=wb[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in wb)throw new RangeError("Duplicate use of selection JSON ID "+e);return wb[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}Me.prototype.visible=!0;class kV{constructor(e,n){this.$from=e,this.$to=n}}let tD=!1;function nD(t){!tD&&!t.parent.inlineContent&&(tD=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ke extends Me{constructor(e,n=e){nD(e),nD(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Me.near(r);let i=e.resolve(n.map(this.anchor));return new ke(i.parent.inlineContent?i:r,r)}replace(e,n=he.empty){if(super.replace(e,n),n==he.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ke&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new am(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ke(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Me.findFrom(n,r,!0)||Me.findFrom(n,-r,!0);if(o)n=o.$head;else return Me.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(Me.findFrom(e,-r,!0)||Me.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new ke(e,n)}}Me.jsonID("text",ke);class am{constructor(e,n){this.anchor=e,this.head=n}map(e){return new am(e.map(this.anchor),e.map(this.head))}resolve(e){return ke.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Me{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return r?Me.near(o):new xe(o)}content(){return new he(ae.from(this.node),0,0)}eq(e){return e instanceof xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new O3(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new xe(e.resolve(n.anchor))}static create(e,n){return new xe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}xe.prototype.visible=!1;Me.jsonID("node",xe);class O3{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new am(r,r):new O3(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&xe.isSelectable(r)?new xe(n):Me.near(n)}}class Wn extends Me{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=he.empty){if(n==he.empty){e.delete(0,e.doc.content.size);let r=Me.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wn(e)}map(e){return new Wn(e)}eq(e){return e instanceof Wn}getBookmark(){return SV}}Me.jsonID("all",Wn);const SV={map(){return this},resolve(t){return new Wn(t)}};function rl(t,e,n,r,i,o=!1){if(e.inlineContent)return ke.create(t,n);for(let a=r-(i>0?0:1);i>0?a<e.childCount:a>=0;a+=i){let u=e.child(a);if(u.isAtom){if(!o&&xe.isSelectable(u))return xe.create(t,n-(i<0?u.nodeSize:0))}else{let c=rl(t,u,n+i,i<0?u.childCount:0,i,o);if(c)return c}n+=u.nodeSize*i}return null}function rD(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof Tt||i instanceof jt))return;let o=t.mapping.maps[r],a;o.forEach((u,c,f,h)=>{a==null&&(a=h)}),t.setSelection(Me.near(t.doc.resolve(a),n))}const iD=1,Hf=2,oD=4;class $V extends FM{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|iD)&~Hf,this.storedMarks=null,this}get selectionSet(){return(this.updated&iD)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Hf,this}ensureMarks(e){return rt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Hf)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Hf,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||rt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let a=this.doc.resolve(n);o=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,o)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Me.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=oD,this}get scrolledIntoView(){return(this.updated&oD)>0}}function sD(t,e){return!e||!t?t:t.bind(e)}class Gu{constructor(e,n,r){this.name=e,this.init=sD(n.init,r),this.apply=sD(n.apply,r)}}const wV=[new Gu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Gu("selection",{init(t,e){return t.selection||Me.atStart(e.doc)},apply(t){return t.selection}}),new Gu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Gu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Tb{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=wV.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Gu(r.key,r.spec.state,r))})}}class Ms{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let a=0;a<this.config.plugins.length;a++){let u=this.config.plugins[a];if(u.spec.appendTransaction){let c=i?i[a].n:0,f=i?i[a].state:this,h=c<n.length&&u.spec.appendTransaction.call(u,c?n.slice(c):n,f,r);if(h&&r.filterTransaction(h,a)){if(h.setMeta("appendedTransaction",e),!i){i=[];for(let m=0;m<this.config.plugins.length;m++)i.push(m<a?{state:r,n:n.length}:{state:this,n:0})}n.push(h),r=r.applyInner(h),o=!0}i&&(i[a]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ms(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new $V(this)}static create(e){let n=new Tb(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ms(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new Tb(this.schema,e.plugins),r=n.fields,i=new Ms(n);for(let o=0;o<r.length;o++){let a=r[o].name;i[a]=this.hasOwnProperty(a)?this[a]:r[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new Tb(e.schema,e.plugins),o=new Ms(i);return i.fields.forEach(a=>{if(a.name=="doc")o.doc=$o.fromJSON(e.schema,n.doc);else if(a.name=="selection")o.selection=Me.fromJSON(o.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let u in r){let c=r[u],f=c.spec.state;if(c.key==a.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(n,u)){o[a.name]=f.fromJSON.call(c,e,n[u],o);return}}o[a.name]=a.init(e,o)}}),o}}function KM(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=KM(i,e,{})),n[r]=i}return n}class ht{constructor(e){this.spec=e,this.props={},e.props&&KM(e.props,this,this.props),this.key=e.key?e.key.key:_M("plugin")}getState(e){return e[this.key]}}const Ab=Object.create(null);function _M(t){return t in Ab?t+"$"+ ++Ab[t]:(Ab[t]=0,t+"$")}class It{constructor(e="key"){this.key=_M(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const jM=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function HM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const VM=(t,e,n)=>{let r=HM(t,n);if(!r)return!1;let i=N3(r);if(!i){let a=r.blockRange(),u=a&&Ml(a);return u==null?!1:(e&&e(t.tr.lift(a,u).scrollIntoView()),!0)}let o=i.nodeBefore;if(ZM(t,i,e,-1))return!0;if(r.parent.content.size==0&&(vl(o,"end")||xe.isSelectable(o)))for(let a=r.depth;;a--){let u=sm(t.doc,r.before(a),r.after(a),he.empty);if(u&&u.slice.size<u.to-u.from){if(e){let c=t.tr.step(u);c.setSelection(vl(o,"end")?Me.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):xe.create(c.doc,i.pos-o.nodeSize)),e(c.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},TV=(t,e,n)=>{let r=HM(t,n);if(!r)return!1;let i=N3(r);return i?UM(t,i,e):!1},AV=(t,e,n)=>{let r=GM(t,n);if(!r)return!1;let i=L3(r);return i?UM(t,i,e):!1};function UM(t,e,n){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let h=i.lastChild;if(!h)return!1;i=h}let a=e.nodeAfter,u=a,c=e.pos+1;for(;!u.isTextblock;c++){if(u.type.spec.isolating)return!1;let h=u.firstChild;if(!h)return!1;u=h}let f=sm(t.doc,o,c,he.empty);if(!f||f.from!=o||f instanceof Tt&&f.slice.size>=c-o)return!1;if(n){let h=t.tr.step(f);h.setSelection(ke.create(h.doc,o)),n(h.scrollIntoView())}return!0}function vl(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const qM=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=N3(r)}let a=o&&o.nodeBefore;return!a||!xe.isSelectable(a)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function N3(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function GM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const WM=(t,e,n)=>{let r=GM(t,n);if(!r)return!1;let i=L3(r);if(!i)return!1;let o=i.nodeAfter;if(ZM(t,i,e,1))return!0;if(r.parent.content.size==0&&(vl(o,"start")||xe.isSelectable(o))){let a=sm(t.doc,r.before(),r.after(),he.empty);if(a&&a.slice.size<a.to-a.from){if(e){let u=t.tr.step(a);u.setSelection(vl(o,"start")?Me.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):xe.create(u.doc,u.mapping.map(i.pos))),e(u.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},QM=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=L3(r)}let a=o&&o.nodeAfter;return!a||!xe.isSelectable(a)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,o.pos)).scrollIntoView()),!0)};function L3(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const BV=(t,e)=>{let n=t.selection,r=n instanceof xe,i;if(r){if(n.node.isTextblock||!Go(t.doc,n.from))return!1;i=n.from}else if(i=om(t.doc,n.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);r&&o.setSelection(xe.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},MV=(t,e)=>{let n=t.selection,r;if(n instanceof xe){if(n.node.isTextblock||!Go(t.doc,n.to))return!1;r=n.to}else if(r=om(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},RV=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&Ml(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},YM=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
26
|
+
`).scrollIntoView()),!0)};function z3(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const PV=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=z3(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(e){let u=n.after(),c=t.tr.replaceWith(u,u,a.createAndFill());c.setSelection(Me.near(c.doc.resolve(u),1)),e(c.scrollIntoView())}return!0},XM=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Wn||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=z3(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,u=t.tr.insert(a,o.createAndFill());u.setSelection(ke.create(u.doc,a+1)),e(u.scrollIntoView())}return!0},JM=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if($i(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Ml(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function OV(t){return(e,n)=>{if(e.selection instanceof xe&&e.selection.node.isBlock){let{$from:b}=e.selection;return!b.parentOffset||!$i(e.doc,b.pos)?!1:(n&&n(e.tr.split(b.pos).scrollIntoView()),!0)}if(!e.selection.$from.depth)return!1;let r=e.tr;!e.selection.empty&&(e.selection instanceof ke||e.selection instanceof Wn)&&r.deleteSelection();let{$from:i}=r.selection,o=r.steps.length,a=[],u,c,f=!1,h=!1;for(let b=i.depth;;b--)if(i.node(b).isBlock){f=i.end(b)==i.pos+(i.depth-b),h=i.start(b)==i.pos-(i.depth-b),c=z3(i.node(b-1).contentMatchAt(i.indexAfter(b-1))),a.unshift(f&&c?{type:c}:null),u=b;break}else{if(b==1)return!1;a.unshift(null)}let m=i.pos,g=$i(r.doc,m,a.length,a);if(g||(a[0]=c?{type:c}:null,g=$i(r.doc,m,a.length,a)),!g)return!1;if(r.split(m,a.length,a),!f&&h&&i.node(u).type!=c){let b=r.mapping.slice(o),v=b.map(i.before(u)),C=r.doc.resolve(v);c&&i.node(u-1).canReplaceWith(C.index(),C.index()+1,c)&&r.setNodeMarkup(b.map(i.before(u)),c)}return n&&n(r.scrollIntoView()),!0}}const NV=OV(),LV=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),e&&e(t.tr.setSelection(xe.create(t.doc,i))),!0)};function zV(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||Go(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function ZM(t,e,n,r){let i=e.nodeBefore,o=e.nodeAfter,a,u,c=i.type.spec.isolating||o.type.spec.isolating;if(!c&&zV(t,e,n))return!0;let f=!c&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(a=(u=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&u.matchType(a[0]||o.type).validEnd){if(n){let b=e.pos+o.nodeSize,v=ae.empty;for(let D=a.length-1;D>=0;D--)v=ae.from(a[D].create(null,v));v=ae.from(i.copy(v));let C=t.tr.step(new jt(e.pos-1,b,e.pos,b,new he(v,1,0),a.length,!0)),E=C.doc.resolve(b+2*a.length);E.nodeAfter&&E.nodeAfter.type==i.type&&Go(C.doc,E.pos)&&C.join(E.pos),n(C.scrollIntoView())}return!0}let h=o.type.spec.isolating||r>0&&c?null:Me.findFrom(e,1),m=h&&h.$from.blockRange(h.$to),g=m&&Ml(m);if(g!=null&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(f&&vl(o,"start",!0)&&vl(i,"end")){let b=i,v=[];for(;v.push(b),!b.isTextblock;)b=b.lastChild;let C=o,E=1;for(;!C.isTextblock;C=C.firstChild)E++;if(b.canReplace(b.childCount,b.childCount,C.content)){if(n){let D=ae.empty;for(let $=v.length-1;$>=0;$--)D=ae.from(v[$].copy(D));let w=t.tr.step(new jt(e.pos-v.length,e.pos+o.nodeSize,e.pos+E,e.pos+o.nodeSize-E,new he(D,v.length,0),0,!0));n(w.scrollIntoView())}return!0}}return!1}function e9(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(ke.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const IV=e9(-1),FV=e9(1);function KV(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),u=a&&P3(a,t,e);return u?(r&&r(n.tr.wrap(a,u).scrollIntoView()),!0):!1}}function aD(t,e=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:u}}=n.selection.ranges[o];n.doc.nodesBetween(a,u,(c,f)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)i=!0;else{let h=n.doc.resolve(f),m=h.index();i=h.parent.canReplaceWith(m,m+1,t)}})}if(!i)return!1;if(r){let o=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:u},$to:{pos:c}}=n.selection.ranges[a];o.setBlockType(u,c,t,e)}r(o.scrollIntoView())}return!0}}function I3(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}I3(jM,VM,qM);I3(jM,WM,QM);I3(YM,XM,JM,NV);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function _V(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o);if(!a)return!1;let u=r?n.tr:null;return jV(u,a,t,e)?(r&&r(u.scrollIntoView()),!0):!1}}function jV(t,e,n,r=null){let i=!1,o=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let c=a.resolve(e.start-2);o=new Uh(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new Uh(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let u=P3(o,n,r,e);return u?(t&&HV(t,e,u,i,n),!0):!1}function HV(t,e,n,r,i){let o=ae.empty;for(let h=n.length-1;h>=0;h--)o=ae.from(n[h].type.create(n[h].attrs,o));t.step(new jt(e.start-(r?2:0),e.end,e.start,e.end,new he(o,0,0),n.length,!0));let a=0;for(let h=0;h<n.length;h++)n[h].type==i&&(a=h+1);let u=n.length-a,c=e.start+n.length-(r?2:0),f=e.parent;for(let h=e.startIndex,m=e.endIndex,g=!0;h<m;h++,g=!1)!g&&$i(t.doc,c,u)&&(t.split(c,u),c+=2*u),c+=f.child(h).nodeSize;return t}function VV(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?UV(e,n,t,o):qV(e,n,o):!0:!1}}function UV(t,e,n,r){let i=t.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i.step(new jt(o-1,a,o,a,new he(ae.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Uh(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));const u=Ml(r);if(u==null)return!1;i.lift(r,u);let c=i.doc.resolve(i.mapping.map(o,-1)-1);return Go(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),e(i.scrollIntoView()),!0}function qV(t,e,n){let r=t.tr,i=n.parent;for(let b=n.end,v=n.endIndex-1,C=n.startIndex;v>C;v--)b-=i.child(v).nodeSize,r.delete(b-1,b+1);let o=r.doc.resolve(n.start),a=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,c=n.endIndex==i.childCount,f=o.node(-1),h=o.index(-1);if(!f.canReplace(h+(u?0:1),h+1,a.content.append(c?ae.empty:ae.from(i))))return!1;let m=o.pos,g=m+a.nodeSize;return r.step(new jt(m-(u?1:0),g+(c?1:0),m+1,g-1,new he((u?ae.empty:ae.from(i.copy(ae.empty))).append(c?ae.empty:ae.from(i.copy(ae.empty))),u?0:1,c?0:1),u?0:1)),e(r.scrollIntoView()),!0}function GV(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,f=>f.childCount>0&&f.firstChild.type==t);if(!o)return!1;let a=o.startIndex;if(a==0)return!1;let u=o.parent,c=u.child(a-1);if(c.type!=t)return!1;if(n){let f=c.lastChild&&c.lastChild.type==u.type,h=ae.from(f?t.create():null),m=new he(ae.from(t.create(null,ae.from(u.type.create(null,h)))),f?3:1,0),g=o.start,b=o.end;n(e.tr.step(new jt(g-(f?3:1),b,g,b,m,1,!0)).scrollIntoView())}return!0}}const Zt=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},xl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let W0=null;const vi=function(t,e,n){let r=W0||(W0=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},WV=function(){W0=null},Js=function(t,e,n,r){return n&&(lD(t,e,n,r,-1)||lD(t,e,n,r,1))},QV=/^(img|br|input|textarea|hr)$/i;function lD(t,e,n,r,i){for(var o;;){if(t==n&&e==r)return!0;if(e==(i<0?0:cr(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Xc(t)||QV.test(t.nodeName)||t.contentEditable=="false")return!1;e=Zt(t)+(i<0?0:1),t=a}else if(t.nodeType==1){let a=t.childNodes[e+(i<0?-1:0)];if(a.nodeType==1&&a.contentEditable=="false")if(!((o=a.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)e+=i;else return!1;else t=a,e=i<0?cr(t):0}else return!1}}function cr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function YV(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=cr(t)}else if(t.parentNode&&!Xc(t))e=Zt(t),t=t.parentNode;else return null}}function XV(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Xc(t))e=Zt(t)+1,t=t.parentNode;else return null}}function JV(t,e,n){for(let r=e==0,i=e==cr(t);r||i;){if(t==n)return!0;let o=Zt(t);if(t=t.parentNode,!t)return!1;r=r&&o==0,i=i&&o==cr(t)}}function Xc(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const lm=function(t){return t.focusNode&&Js(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Es(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function ZV(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function eU(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(cr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(cr(r.startContainer),r.startOffset)}}}const Gr=typeof navigator<"u"?navigator:null,uD=typeof document<"u"?document:null,Wo=Gr&&Gr.userAgent||"",Q0=/Edge\/(\d+)/.exec(Wo),t9=/MSIE \d/.exec(Wo),Y0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wo),Ln=!!(t9||Y0||Q0),wo=t9?document.documentMode:Y0?+Y0[1]:Q0?+Q0[1]:0,dr=!Ln&&/gecko\/(\d+)/i.test(Wo);dr&&+(/Firefox\/(\d+)/.exec(Wo)||[0,0])[1];const X0=!Ln&&/Chrome\/(\d+)/.exec(Wo),tn=!!X0,n9=X0?+X0[1]:0,dn=!Ln&&!!Gr&&/Apple Computer/.test(Gr.vendor),Cl=dn&&(/Mobile\/\w+/.test(Wo)||!!Gr&&Gr.maxTouchPoints>2),lr=Cl||(Gr?/Mac/.test(Gr.platform):!1),r9=Gr?/Win/.test(Gr.platform):!1,Ei=/Android \d/.test(Wo),Jc=!!uD&&"webkitFontSmoothing"in uD.documentElement.style,tU=Jc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function nU(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function pi(t,e){return typeof t=="number"?t:t[e]}function rU(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function cD(t,e,n){if(!J0(e)&&e.left==0)return;let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=xl(a);continue}let u=a,c=u==o.body,f=c?nU(o):rU(u),h=0,m=0;if(e.top<f.top+pi(r,"top")?m=-(f.top-e.top+pi(i,"top")):e.bottom>f.bottom-pi(r,"bottom")&&(m=e.bottom-e.top>f.bottom-f.top?e.top+pi(i,"top")-f.top:e.bottom-f.bottom+pi(i,"bottom")),e.left<f.left+pi(r,"left")?h=-(f.left-e.left+pi(i,"left")):e.right>f.right-pi(r,"right")&&(h=e.right-f.right+pi(i,"right")),h||m)if(c)o.defaultView.scrollBy(h,m);else{let b=u.scrollLeft,v=u.scrollTop;m&&(u.scrollTop+=m),h&&(u.scrollLeft+=h);let C=u.scrollLeft-b,E=u.scrollTop-v;e={left:e.left-C,top:e.top-E,right:e.right-C,bottom:e.bottom-E}}let g=c?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(g))break;a=g=="absolute"?a.offsetParent:xl(a)}}function iU(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let u=t.root.elementFromPoint(o,a);if(!u||u==t.dom||!t.dom.contains(u))continue;let c=u.getBoundingClientRect();if(c.top>=n-20){r=u,i=c.top;break}}return{refDOM:r,refTop:i,stack:i9(t.dom)}}function i9(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=xl(r));return e}function oU({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;o9(n,r==0?0:r-e)}function o9(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:o}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Za=null;function sU(t){if(t.setActive)return t.setActive();if(Za)return t.focus(Za);let e=i9(t);t.focus(Za==null?{get preventScroll(){return Za={preventScroll:!0},!0}}:void 0),Za||(Za=!1,o9(e,0))}function s9(t,e){let n,r=2e8,i,o=0,a=e.top,u=e.top,c,f;for(let h=t.firstChild,m=0;h;h=h.nextSibling,m++){let g;if(h.nodeType==1)g=h.getClientRects();else if(h.nodeType==3)g=vi(h).getClientRects();else continue;for(let b=0;b<g.length;b++){let v=g[b];if(v.top<=a&&v.bottom>=u){a=Math.max(v.bottom,a),u=Math.min(v.top,u);let C=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(C<r){n=h,r=C,i=C&&n.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,h.nodeType==1&&C&&(o=m+(e.left>=(v.left+v.right)/2?1:0));continue}}else v.top>e.top&&!c&&v.left<=e.left&&v.right>=e.left&&(c=h,f={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!n&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(o=m+1)}}return!n&&c&&(n=c,i=f,r=0),n&&n.nodeType==3?aU(n,i):!n||r&&n.nodeType==1?{node:t,offset:o}:s9(n,i)}function aU(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let a=lo(r,1);if(a.top!=a.bottom&&F3(e,a)){i={node:t,offset:o+(e.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function F3(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function lU(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function uU(t,e,n){let{node:r,offset:i}=s9(e,n),o=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();o=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,i,o)}function cU(t,e,n,r){let i=-1;for(let o=e,a=!1;o!=t.dom;){let u=t.docView.nearestDesc(o,!0),c;if(!u)return null;if(u.dom.nodeType==1&&(u.node.isBlock&&u.parent||!u.contentDOM)&&((c=u.dom.getBoundingClientRect()).width||c.height)&&(u.node.isBlock&&u.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(u.dom.nodeName)&&(!a&&c.left>r.left||c.top>r.top?i=u.posBefore:(!a&&c.right<r.left||c.bottom<r.top)&&(i=u.posAfter),a=!0),!u.contentDOM&&i<0&&!u.node.isText))return(u.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?u.posBefore:u.posAfter;o=u.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function a9(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let a=t.childNodes[o];if(a.nodeType==1){let u=a.getClientRects();for(let c=0;c<u.length;c++){let f=u[c];if(F3(e,f))return a9(a,e,f)}}if((o=(o+1)%r)==i)break}return t}function dU(t,e){let n=t.dom.ownerDocument,r,i=0,o=eU(n,e.left,e.top);o&&({node:r,offset:i}=o);let a=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),u;if(!a||!t.dom.contains(a.nodeType!=1?a.parentNode:a)){let f=t.dom.getBoundingClientRect();if(!F3(e,f)||(a=a9(t.dom,e,f),!a))return null}if(dn)for(let f=a;r&&f;f=xl(f))f.draggable&&(r=void 0);if(a=lU(a,e),r){if(dr&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let h=r.childNodes[i],m;h.nodeName=="IMG"&&(m=h.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&i++}let f;Jc&&i&&r.nodeType==1&&(f=r.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?u=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(u=cU(t,r,i,e))}u==null&&(u=uU(t,a,e));let c=t.docView.nearestDesc(a,!0);return{pos:u,inside:c?c.posAtStart-c.border:-1}}function J0(t){return t.top<t.bottom||t.left<t.right}function lo(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(J0(r))return r}return Array.prototype.find.call(n,J0)||t.getBoundingClientRect()}const fU=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function l9(t,e,n){let{node:r,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),a=Jc||dr;if(r.nodeType==3)if(a&&(fU.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let c=lo(vi(r,i,i),n);if(dr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let f=lo(vi(r,i-1,i-1),-1);if(f.top==c.top){let h=lo(vi(r,i,i+1),-1);if(h.top!=c.top)return Ou(h,h.left<f.left)}}return c}else{let c=i,f=i,h=n<0?1:-1;return n<0&&!i?(f++,h=-1):n>=0&&i==r.nodeValue.length?(c--,h=1):n<0?c--:f++,Ou(lo(vi(r,c,f),h),h<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==cr(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return Bb(c.getBoundingClientRect(),!1)}if(o==null&&i<cr(r)){let c=r.childNodes[i];if(c.nodeType==1)return Bb(c.getBoundingClientRect(),!0)}return Bb(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==cr(r))){let c=r.childNodes[i-1],f=c.nodeType==3?vi(c,cr(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return Ou(lo(f,1),!1)}if(o==null&&i<cr(r)){let c=r.childNodes[i];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let f=c?c.nodeType==3?vi(c,0,a?0:1):c.nodeType==1?c:null:null;if(f)return Ou(lo(f,-1),!0)}return Ou(lo(r.nodeType==3?vi(r):r,-n),n>=0)}function Ou(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Bb(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function u9(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function hU(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return u9(t,e,()=>{let{node:o}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let u=t.docView.nearestDesc(o,!0);if(!u)break;if(u.node.isBlock){o=u.contentDOM||u.dom;break}o=u.dom.parentNode}let a=l9(t,i.pos,1);for(let u=o.firstChild;u;u=u.nextSibling){let c;if(u.nodeType==1)c=u.getClientRects();else if(u.nodeType==3)c=vi(u,0,u.nodeValue.length).getClientRects();else continue;for(let f=0;f<c.length;f++){let h=c[f];if(h.bottom>h.top+1&&(n=="up"?a.top-h.top>(h.bottom-a.top)*2:h.bottom-a.bottom>(a.bottom-h.top)*2))return!1}}return!0})}const pU=/[\u0590-\u08ac]/;function mU(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,a=i==r.parent.content.size,u=t.domSelection();return u?!pU.test(r.parent.textContent)||!u.modify?n=="left"||n=="backward"?o:a:u9(t,e,()=>{let{focusNode:c,focusOffset:f,anchorNode:h,anchorOffset:m}=t.domSelectionRange(),g=u.caretBidiLevel;u.modify("move",n,"character");let b=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:v,focusOffset:C}=t.domSelectionRange(),E=v&&!b.contains(v.nodeType==1?v:v.parentNode)||c==v&&f==C;try{u.collapse(h,m),c&&(c!=h||f!=m)&&u.extend&&u.extend(c,f)}catch{}return g!=null&&(u.caretBidiLevel=g),E}):r.pos==r.start()||r.pos==r.end()}let dD=null,fD=null,hD=!1;function gU(t,e,n){return dD==e&&fD==n?hD:(dD=e,fD=n,hD=n=="up"||n=="down"?hU(t,e,n):mU(t,e,n))}const fr=0,pD=1,Rs=2,wr=3;class Zc{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=fr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,a;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((a=o.pmViewDesc)&&a.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(a)+a.size:this.posAtStart}else{let o,a;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((a=o.pmViewDesc)&&a.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(a):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>Zt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),a;if(o&&(!n||o.node))if(r&&(a=o.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)for(let a=0;a<i.children.length;a++){let u=i.children[a];if(u.size){i=u;break}}return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let a=this.children[r],u=o+a.size;if(u>e||a instanceof d9){i=e-o;break}o=u}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof c9&&o.side>=0;r--);if(n<=0){let o,a=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,a=!1);return o&&n&&a&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Zt(o.dom)+1:0}}else{let o,a=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,a=!1);return o&&a&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Zt(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let a=r,u=0;;u++){let c=this.children[u],f=a+c.size;if(i==-1&&e<=f){let h=a+c.border;if(e>=h&&n<=f-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,n,h);e=a;for(let m=u;m>0;m--){let g=this.children[m-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){i=Zt(g.dom)+1;break}e-=g.size}i==-1&&(i=0)}if(i>-1&&(f>n||u==this.children.length-1)){n=f;for(let h=u+1;h<this.children.length;h++){let m=this.children[h];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){o=Zt(m.dom);break}n+=m.size}o==-1&&(o=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let o=Math.min(e,n),a=Math.max(e,n);for(let b=0,v=0;b<this.children.length;b++){let C=this.children[b],E=v+C.size;if(o>v&&a<E)return C.setSelection(e-v-C.border,n-v-C.border,r,i);v=E}let u=this.domFromPos(e,e?-1:1),c=n==e?u:this.domFromPos(n,n?-1:1),f=r.root.getSelection(),h=r.domSelectionRange(),m=!1;if((dr||dn)&&e==n){let{node:b,offset:v}=u;if(b.nodeType==3){if(m=!!(v&&b.nodeValue[v-1]==`
|
|
27
|
+
`),m&&v==b.nodeValue.length)for(let C=b,E;C;C=C.parentNode){if(E=C.nextSibling){E.nodeName=="BR"&&(u=c={node:E.parentNode,offset:Zt(E)+1});break}let D=C.pmViewDesc;if(D&&D.node&&D.node.isBlock)break}}else{let C=b.childNodes[v-1];m=C&&(C.nodeName=="BR"||C.contentEditable=="false")}}if(dr&&h.focusNode&&h.focusNode!=c.node&&h.focusNode.nodeType==1){let b=h.focusNode.childNodes[h.focusOffset];b&&b.contentEditable=="false"&&(i=!0)}if(!(i||m&&dn)&&Js(u.node,u.offset,h.anchorNode,h.anchorOffset)&&Js(c.node,c.offset,h.focusNode,h.focusOffset))return;let g=!1;if((f.extend||e==n)&&!(m&&dr)){f.collapse(u.node,u.offset);try{e!=n&&f.extend(c.node,c.offset),g=!0}catch{}}if(!g){if(e>n){let v=u;u=c,c=v}let b=document.createRange();b.setEnd(c.node,c.offset),b.setStart(u.node,u.offset),f.removeAllRanges(),f.addRange(b)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],a=r+o.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let u=r+o.border,c=a-o.border;if(e>=u&&n<=c){this.dirty=e==r||n==a?Rs:pD,e==u&&n==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=wr:o.markDirty(e-u,n-u);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Rs:wr}r=a}this.dirty=Rs}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Rs:pD;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class c9 extends Zc{constructor(e,n,r,i){let o,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(a.nodeType!=1){let u=document.createElement("span");u.appendChild(a),a=u}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==fr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class bU extends Zc{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class To extends Zc{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],a=o&&o(n,i,r);return(!a||!a.dom)&&(a=aa.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new To(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&wr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=wr&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=fr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=fr}}slice(e,n,r){let i=To.create(this.parent,this.mark,!0,r),o=this.children,a=this.size;n<a&&(o=ey(o,n,a,r)),e>0&&(o=ey(o,0,e,r));for(let u=0;u<o.length;u++)o[u].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ao extends Zc{constructor(e,n,r,i,o,a,u){super(e,[],o,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=u}static create(e,n,r,i,o,a){let u=o.nodeViews[n.type.name],c,f=u&&u(n,o,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,i),h=f&&f.dom,m=f&&f.contentDOM;if(n.isText){if(!h)h=document.createTextNode(n.text);else if(h.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else h||({dom:h,contentDOM:m}=aa.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!m&&!n.isText&&h.nodeName!="BR"&&(h.hasAttribute("contenteditable")||(h.contentEditable="false"),n.type.spec.draggable&&(h.draggable=!0));let g=h;return h=p9(h,r,n),f?c=new yU(e,n,r,i,h,m||null,g,f):n.isText?new um(e,n,r,i,h,g):new Ao(e,n,r,i,h,m||null,g)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let n={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(n.preserveWhitespace="full"),!this.contentDOM)n.getContent=()=>this.node.content;else if(!this.contentLost)n.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let i=this.children[r];if(this.dom.contains(i.dom.parentNode)){n.contentElement=i.dom.parentNode;break}}if(!n.contentElement){let r=e&&e.find(i=>i.nodeType==1&&e.indexOf(i.parentNode)<0&&this.dom.contains(i));r?n.contentElement=r:n.getContent=()=>ae.empty}}return n}matchesNode(e,n,r){return this.dirty==fr&&e.eq(this.node)&&Gh(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,a=o&&o.pos>-1?o:null,u=o&&o.pos<0,c=new xU(this,a&&a.node,e);DU(this.node,this.innerDeco,(f,h,m)=>{f.spec.marks?c.syncToMarks(f.spec.marks,r,e,h):f.type.side>=0&&!m&&c.syncToMarks(h==this.node.childCount?rt.none:this.node.child(h).marks,r,e,h),c.placeWidget(f,e,i)},(f,h,m,g)=>{c.syncToMarks(f.marks,r,e,g);let b;c.findNodeMatch(f,h,m,g)||u&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(b=c.findIndexWithChild(o.node))>-1&&c.updateNodeAt(f,h,m,b,e)||c.updateNextNode(f,h,m,e,g,i)||c.addNode(f,h,m,e,i),i+=f.nodeSize}),c.syncToMarks([],r,e,0),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==Rs)&&(a&&this.protectLocalComposition(e,a),f9(this.contentDOM,this.children,e),Cl&&kU(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ke)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let a=o.nodeValue,u=SU(this.node.content,a,r-n,i-n);return u<0?null:{node:o,pos:u,text:a}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let a=new bU(this,o,n,i);e.input.compositionNodes.push(a),this.children=ey(this.children,r,r+i.length,e,a)}update(e,n,r,i){return this.dirty==wr||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=fr}updateOuterDeco(e){if(Gh(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=h9(this.dom,this.nodeDOM,Z0(this.outerDeco,this.node,n),Z0(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function mD(t,e,n,r,i){p9(r,e,t);let o=new Ao(void 0,t,e,n,r,r,r);return o.contentDOM&&o.updateChildren(i,0),o}class um extends Ao{constructor(e,n,r,i,o,a){super(e,n,r,i,o,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==wr||this.dirty!=fr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=fr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=fr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new um(this.parent,i,this.outerDeco,this.innerDeco,o,o)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=wr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class d9 extends Zc{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==fr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class yU extends Ao{constructor(e,n,r,i,o,a,u,c){super(e,n,r,i,o,a,u),this.spec=c}update(e,n,r,i){if(this.dirty==wr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function f9(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let a=e[o],u=a.dom;if(u.parentNode==t){for(;u!=r;)r=gD(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(u,r);if(a instanceof To){let c=r?r.previousSibling:t.lastChild;f9(a.contentDOM,a.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=gD(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const ac=function(t){t&&(this.nodeName=t)};ac.prototype=Object.create(null);const Ps=[new ac];function Z0(t,e,n){if(t.length==0)return Ps;let r=n?Ps[0]:new ac,i=[r];for(let o=0;o<t.length;o++){let a=t[o].type.attrs;if(a){a.nodeName&&i.push(r=new ac(a.nodeName));for(let u in a){let c=a[u];c!=null&&(n&&i.length==1&&i.push(r=new ac(e.isInline?"span":"div")),u=="class"?r.class=(r.class?r.class+" ":"")+c:u=="style"?r.style=(r.style?r.style+";":"")+c:u!="nodeName"&&(r[u]=c))}}}return i}function h9(t,e,n,r){if(n==Ps&&r==Ps)return e;let i=e;for(let o=0;o<r.length;o++){let a=r[o],u=n[o];if(o){let c;u&&u.nodeName==a.nodeName&&i!=t&&(c=i.parentNode)&&c.nodeName.toLowerCase()==a.nodeName||(c=document.createElement(a.nodeName),c.pmIsDeco=!0,c.appendChild(i),u=Ps[0]),i=c}vU(i,u||Ps[0],a)}return i}function vU(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function p9(t,e,n){return h9(t,t,Ps,Z0(e,n,t.nodeType!=1))}function Gh(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function gD(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class xU{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=CU(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let o=0,a=this.stack.length>>1,u=Math.min(a,e.length);for(;o<u&&(o==a-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<a;)this.destroyRest(),this.top.dirty=fr,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let c=-1,f=this.top.children.length;i<this.preMatch.index&&(f=Math.min(this.index+3,f));for(let h=this.index;h<f;h++){let m=this.top.children[h];if(m.matchesMark(e[a])&&!this.isLocked(m.dom)){c=h;break}}if(c<0&&this.index<this.top.children.length){let h=this.top.children[this.index];h instanceof To&&h.dirty!=wr&&h.mark.type==e[a].type&&h.spec.update&&!this.isLocked(h.dom)&&h.spec.update(e[a])&&(h.mark=e[a],c=this.index,this.changed=!0)}if(c>-1)c>this.index&&(this.changed=!0,this.destroyBetween(this.index,c)),this.top=this.top.children[this.index];else{let h=To.create(this.top,e[a],n,r);this.top.children.splice(this.index,0,h),this.top=h,this.changed=!0}this.index=0,a++}}findNodeMatch(e,n,r,i){let o=-1,a;if(i>=this.preMatch.index&&(a=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))o=this.top.children.indexOf(a,this.index);else for(let u=this.index,c=Math.min(this.top.children.length,u+5);u<c;u++){let f=this.top.children[u];if(f.matchesNode(e,n,r)&&!this.preMatch.matched.has(f)){o=u;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,i,o){let a=this.top.children[i];return a.dirty==wr&&a.dom==a.contentDOM&&(a.dirty=Rs),a.update(e,n,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,a){for(let u=this.index;u<this.top.children.length;u++){let c=this.top.children[u];if(c instanceof Ao){let f=this.preMatch.matched.get(c);if(f!=null&&f!=o)return!1;let h=c.dom,m,g=this.isLocked(h)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=wr&&Gh(n,c.outerDeco));if(!g&&c.update(e,n,r,i))return this.destroyBetween(this.index,u),c.dom!=h&&(this.changed=!0),this.index++,!0;if(!g&&(m=this.recreateWrapper(c,e,n,r,i,a)))return this.destroyBetween(this.index,u),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Rs,m.updateChildren(i,a+1),m.dirty=fr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Gh(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let u=Ao.create(this.top,n,r,i,o,a);if(u.contentDOM){u.children=e.children,e.children=[];for(let c of u.children)c.parent=u}return e.destroy(),u}addNode(e,n,r,i,o){let a=Ao.create(this.top,e,n,r,i,o);a.contentDOM&&a.updateChildren(i,o+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new c9(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof To;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof um)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((dn||tn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new d9(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function CU(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,a=[];e:for(;i>0;){let u;for(;;)if(r){let f=n.children[r-1];if(f instanceof To)n=f,r=f.children.length;else{u=f,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=u.node;if(c){if(c!=t.child(i-1))break;--i,o.set(u,i),a.push(u)}}return{index:i,matched:o,matches:a.reverse()}}function EU(t,e){return t.type.side-e.type.side}function DU(t,e,n,r){let i=e.locals(t),o=0;if(i.length==0){for(let f=0;f<t.childCount;f++){let h=t.child(f);r(h,i,e.forChild(o,h),f),o+=h.nodeSize}return}let a=0,u=[],c=null;for(let f=0;;){let h,m;for(;a<i.length&&i[a].to==o;){let E=i[a++];E.widget&&(h?(m||(m=[h])).push(E):h=E)}if(h)if(m){m.sort(EU);for(let E=0;E<m.length;E++)n(m[E],f,!!c)}else n(h,f,!!c);let g,b;if(c)b=-1,g=c,c=null;else if(f<t.childCount)b=f,g=t.child(f++);else break;for(let E=0;E<u.length;E++)u[E].to<=o&&u.splice(E--,1);for(;a<i.length&&i[a].from<=o&&i[a].to>o;)u.push(i[a++]);let v=o+g.nodeSize;if(g.isText){let E=v;a<i.length&&i[a].from<E&&(E=i[a].from);for(let D=0;D<u.length;D++)u[D].to<E&&(E=u[D].to);E<v&&(c=g.cut(E-o),g=g.cut(0,E-o),v=E,b=-1)}else for(;a<i.length&&i[a].to<v;)a++;let C=g.isInline&&!g.isLeaf?u.filter(E=>!E.inline):u.slice();r(g,C,e.forChild(o,g),b),o=v}}function kU(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function SU(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let a=t.child(i++),u=o;if(o+=a.nodeSize,!a.isText)continue;let c=a.text;for(;i<t.childCount;){let f=t.child(i++);if(o+=f.nodeSize,!f.isText)break;c+=f.text}if(o>=n){if(o>=r&&c.slice(r-e.length-u,r-u)==e)return r-e.length;let f=u<r?c.lastIndexOf(e,r-u-1):-1;if(f>=0&&f+e.length+u>=n)return u+f;if(n==r&&c.length>=r+e.length-u&&c.slice(r-u,r-u+e.length)==e)return r}}return-1}function ey(t,e,n,r,i){let o=[];for(let a=0,u=0;a<t.length;a++){let c=t[a],f=u,h=u+=c.size;f>=n||h<=e?o.push(c):(f<e&&o.push(c.slice(0,e-f,r)),i&&(o.push(i),i=void 0),h>n&&o.push(c.slice(n-f,c.size,r)))}return o}function K3(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let u=r.resolve(a),c,f;if(lm(n)){for(c=a;i&&!i.node;)i=i.parent;let m=i.node;if(i&&m.isAtom&&xe.isSelectable(m)&&i.parent&&!(m.isInline&&JV(n.focusNode,n.focusOffset,i.dom))){let g=i.posBefore;f=new xe(a==g?u:r.resolve(g))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let m=a,g=a;for(let b=0;b<n.rangeCount;b++){let v=n.getRangeAt(b);m=Math.min(m,t.docView.posFromDOM(v.startContainer,v.startOffset,1)),g=Math.max(g,t.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(m<0)return null;[c,a]=g==t.state.selection.anchor?[g,m]:[m,g],u=r.resolve(a)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let h=r.resolve(c);if(!f){let m=e=="pointer"||t.state.selection.head<u.pos&&!o?1:-1;f=_3(t,h,u,m)}return f}function m9(t){return t.editable?t.hasFocus():b9(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function wi(t,e=!1){let n=t.state.selection;if(g9(t,n),!m9(t))return;let r=t.input.mouseDown;if(!e&&tn&&r){let i=t.domSelectionRange(),o=t.domObserver.currentSelection;if(i.anchorNode&&o.anchorNode&&Js(i.anchorNode,i.anchorOffset,o.anchorNode,o.anchorOffset)&&r.delaySelUpdate()){t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)wU(t);else{let{anchor:i,head:o}=n,a,u;bD&&!(n instanceof ke)&&(n.$from.parent.inlineContent||(a=yD(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(u=yD(t,n.to))),t.docView.setSelection(i,o,t,e),bD&&(a&&vD(a),u&&vD(u)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&$U(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const bD=dn||tn&&n9<63;function yD(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(dn&&i&&i.contentEditable=="false")return Mb(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Mb(i);if(o)return Mb(o)}}function Mb(t){return t.contentEditable="true",dn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function vD(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function $U(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!m9(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function wU(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Zt(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Ln&&wo<=11&&(n.disabled=!0,n.disabled=!1)}function g9(t,e){if(e instanceof xe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(xD(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else xD(t)}function xD(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function _3(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||ke.between(e,n,r)}function CD(t){return t.editable&&!t.hasFocus()?!1:b9(t)}function b9(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function TU(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Js(e.node,e.offset,n.anchorNode,n.anchorOffset)}function ty(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&Me.findFrom(o,e)}function fo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function ED(t,e,n){let r=t.state.selection;if(r instanceof ke)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return fo(t,new ke(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=ty(t.state,e);return i&&i instanceof xe?fo(t,i):!1}else if(!(lr&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,a;if(!o||o.isText)return!1;let u=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(a=t.docView.descAt(u))&&!a.contentDOM?xe.isSelectable(o)?fo(t,new xe(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):Jc?fo(t,new ke(t.state.doc.resolve(e<0?u:u+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof xe&&r.node.isInline)return fo(t,new ke(e>0?r.$to:r.$from));{let i=ty(t.state,e);return i?fo(t,i):!1}}}function Wh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function lc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function el(t,e){return e<0?AU(t):BU(t)}function AU(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,a=!1;for(dr&&n.nodeType==1&&r<Wh(n)&&lc(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let u=n.childNodes[r-1];if(lc(u,-1))i=n,o=--r;else if(u.nodeType==3)n=u,r=n.nodeValue.length;else break}}else{if(y9(n))break;{let u=n.previousSibling;for(;u&&lc(u,-1);)i=n.parentNode,o=Zt(u),u=u.previousSibling;if(u)n=u,r=Wh(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?ny(t,n,r):i&&ny(t,i,o)}function BU(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=Wh(n),o,a;for(;;)if(r<i){if(n.nodeType!=1)break;let u=n.childNodes[r];if(lc(u,1))o=n,a=++r;else break}else{if(y9(n))break;{let u=n.nextSibling;for(;u&&lc(u,1);)o=u.parentNode,a=Zt(u)+1,u=u.nextSibling;if(u)n=u,r=0,i=Wh(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}o&&ny(t,o,a)}function y9(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function MU(t,e){for(;t&&e==t.childNodes.length&&!Xc(t);)e=Zt(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function RU(t,e){for(;t&&!e&&!Xc(t);)e=Zt(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function ny(t,e,n){if(e.nodeType!=3){let o,a;(a=MU(e,n))?(e=a,n=0):(o=RU(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(lm(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&wi(t)},50)}function DD(t,e){let n=t.state.doc.resolve(e);if(!(tn||r9)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),a=(o.top+o.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function kD(t,e,n){let r=t.state.selection;if(r instanceof ke&&!r.empty||n.indexOf("s")>-1||lr&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=ty(t.state,e);if(a&&a instanceof xe)return fo(t,a)}if(!i.parent.inlineContent){let a=e<0?i:o,u=r instanceof Wn?Me.near(a,e):Me.findFrom(a,e);return u?fo(t,u):!1}return!1}function SD(t,e){if(!(t.state.selection instanceof ke))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let a=t.state.tr;return e<0?a.delete(n.pos-o.nodeSize,n.pos):a.delete(n.pos,n.pos+o.nodeSize),t.dispatch(a),!0}return!1}function $D(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function PU(t){if(!dn||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;$D(t,r,"true"),setTimeout(()=>$D(t,r,"false"),20)}return!1}function OU(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function NU(t,e){let n=e.keyCode,r=OU(e);if(n==8||lr&&n==72&&r=="c")return SD(t,-1)||el(t,-1);if(n==46&&!e.shiftKey||lr&&n==68&&r=="c")return SD(t,1)||el(t,1);if(n==13||n==27)return!0;if(n==37||lr&&n==66&&r=="c"){let i=n==37?DD(t,t.state.selection.from)=="ltr"?-1:1:-1;return ED(t,i,r)||el(t,i)}else if(n==39||lr&&n==70&&r=="c"){let i=n==39?DD(t,t.state.selection.from)=="ltr"?1:-1:1;return ED(t,i,r)||el(t,i)}else{if(n==38||lr&&n==80&&r=="c")return kD(t,-1,r)||el(t,-1);if(n==40||lr&&n==78&&r=="c")return PU(t)||kD(t,1,r)||el(t,1);if(r==(lr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function j3(t,e){t.someProp("transformCopied",b=>{e=b(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let b=r.firstChild;n.push(b.type.name,b.attrs!=b.type.defaultAttrs?b.attrs:null),r=b.content}let a=t.someProp("clipboardSerializer")||aa.fromSchema(t.state.schema),u=k9(),c=u.createElement("div");c.appendChild(a.serializeFragment(r,{document:u}));let f=c.firstChild,h,m=0;for(;f&&f.nodeType==1&&(h=D9[f.nodeName.toLowerCase()]);){for(let b=h.length-1;b>=0;b--){let v=u.createElement(h[b]);for(;c.firstChild;)v.appendChild(c.firstChild);c.appendChild(v),m++}f=c.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${o}${m?` -${m}`:""} ${JSON.stringify(n)}`);let g=t.someProp("clipboardTextSerializer",b=>b(e,t))||e.content.textBetween(0,e.content.size,`
|
|
28
|
+
|
|
29
|
+
`);return{dom:c,text:g,slice:e}}function v9(t,e,n,r,i){let o=i.parent.type.spec.code,a,u;if(!n&&!e)return null;let c=!!e&&(r||o||!n);if(c){if(t.someProp("transformPastedText",g=>{e=g(e,o||r,t)}),o)return u=new he(ae.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
30
|
+
`))),0,0),t.someProp("transformPasted",g=>{u=g(u,t,!0)}),u;let m=t.someProp("clipboardTextParser",g=>g(e,i,r,t));if(m)u=m;else{let g=i.marks(),{schema:b}=t.state,v=aa.fromSchema(b);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(C=>{let E=a.appendChild(document.createElement("p"));C&&E.appendChild(v.serializeNode(b.text(C,g)))})}}else t.someProp("transformPastedHTML",m=>{n=m(n,t)}),a=FU(n),Jc&&KU(a);let f=a&&a.querySelector("[data-pm-slice]"),h=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let m=+h[3];m>0;m--){let g=a.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;a=g}if(u||(u=(t.someProp("clipboardParser")||t.someProp("domParser")||Si.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||h),context:i,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!LU.test(g.parentNode.nodeName)?{ignore:!0}:null}})),h)u=_U(wD(u,+h[1],+h[2]),h[4]);else if(u=he.maxOpen(zU(u.content,i),!0),u.openStart||u.openEnd){let m=0,g=0;for(let b=u.content.firstChild;m<u.openStart&&!b.type.spec.isolating;m++,b=b.firstChild);for(let b=u.content.lastChild;g<u.openEnd&&!b.type.spec.isolating;g++,b=b.lastChild);u=wD(u,m,g)}return t.someProp("transformPasted",m=>{u=m(u,t,c)}),u}const LU=/^(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 zU(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,a=[];if(t.forEach(u=>{if(!a)return;let c=i.findWrapping(u.type),f;if(!c)return a=null;if(f=a.length&&o.length&&C9(c,o,u,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=E9(a[a.length-1],o.length));let h=x9(u,c);a.push(h),i=i.matchType(h.type),o=c}}),a)return ae.from(a)}return t}function x9(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ae.from(t));return t}function C9(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=C9(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(ae.from(x9(n,t,i+1))))}}function E9(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,E9(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ae.empty,!0);return t.copy(n.append(r))}function ry(t,e,n,r,i,o){let a=e<0?t.firstChild:t.lastChild,u=a.content;return t.childCount>1&&(o=0),i<r-1&&(u=ry(u,e,n,r,i+1,o)),i>=n&&(u=e<0?a.contentMatchAt(0).fillBefore(u,o<=i).append(u):u.append(a.contentMatchAt(a.childCount).fillBefore(ae.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(u))}function wD(t,e,n){return e<t.openStart&&(t=new he(ry(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new he(ry(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const D9={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function k9(){return document.implementation.createHTMLDocument("title")}let Rb=null;function IU(t){let e=window.trustedTypes;return e?(Rb||(Rb=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Rb.createHTML(t)):t}function FU(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=k9(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(t),o;if((o=i&&D9[i[1].toLowerCase()])&&(t=o.map(a=>"<"+a+">").join("")+t+o.map(a=>"</"+a+">").reverse().join("")),r.innerHTML=IU(t),o)for(let a=0;a<o.length;a++)r=r.querySelector(o[a])||r;for(let a=0;a<n.styleSheets.length;a++){let u=n.styleSheets[a];for(let c=0;c<u.rules.length;c++){let f=u.rules[c];if(f instanceof CSSStyleRule){let h=r.querySelectorAll(f.selectorText);for(let m=0;m<h.length;m++)h[m].style.cssText+=f.style.cssText}}}return r}function KU(t){let e=t.querySelectorAll(tn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function _U(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:a}=t;for(let u=r.length-2;u>=0;u-=2){let c=n.nodes[r[u]];if(!c||c.hasRequiredAttrs())break;i=ae.from(c.create(r[u+1],i)),o++,a++}return new he(i,o,a)}const xn={},Cn={},jU={touchstart:!0,touchmove:!0};class HU{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function VU(t){for(let e in xn){let n=xn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{qU(t,r)&&!H3(t,r)&&(t.editable||!(r.type in Cn))&&n(t,r)},jU[e]?{passive:!0}:void 0)}dn&&t.dom.addEventListener("input",()=>null),iy(t)}function Di(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function UU(t){t.input.mouseDown&&t.input.mouseDown.done(),t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function iy(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>H3(t,r))})}function H3(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function qU(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function GU(t,e){!H3(t,e)&&xn[e.type]&&(t.editable||!(e.type in Cn))&&xn[e.type](t,e)}Cn.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!T9(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ei&&tn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Cl&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,Es(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||NU(t,n)?n.preventDefault():Di(t,"key")};Cn.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Cn.keypress=(t,e)=>{let n=e;if(T9(t)||!n.charCode||n.ctrlKey&&!n.altKey||lr&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",a=>a(t,r.$from.pos,r.$to.pos,i,o))&&t.dispatch(o()),n.preventDefault()}};function ed(t){return{left:t.clientX,top:t.clientY}}function WU(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function V3(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let a=o.depth+1;a>0;a--)if(t.someProp(e,u=>a>o.depth?u(t,n,o.nodeAfter,o.before(a),i,!0):u(t,n,o.node(a),o.before(a),i,!1)))return!0;return!1}function td(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function QU(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&xe.isSelectable(r)?(td(t,new xe(n)),!0):!1}function YU(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof xe&&(r=n.node);let o=t.state.doc.resolve(e);for(let a=o.depth+1;a>0;a--){let u=a>o.depth?o.nodeAfter:o.node(a);if(xe.isSelectable(u)){r&&n.$from.depth>0&&a>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(a);break}}return i!=null?(td(t,xe.create(t.state.doc,i)),!0):!1}function XU(t,e,n,r,i){return V3(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?YU(t,n):QU(t,n))}function JU(t,e,n,r){return V3(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function ZU(t,e,n,r){return V3(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||eq(t,n,r)}function eq(t,e,n){if(n.button!=0)return!1;let r=S9(t,e,!0),i=t.state.doc;return r?(td(t,r),r instanceof ke&&i.eq(t.state.doc)&&(t.input.mouseDown=new nq(t,r)),!0):!1}function S9(t,e,n){let r=t.state.doc;if(e==-1)return r.inlineContent?ke.create(r,0,r.content.size):null;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o),u=i.before(o);if(a.inlineContent)return ke.create(r,u+1,u+1+a.content.size);if(n&&xe.isSelectable(a))return xe.create(r,u)}return null}function U3(t){return Qh(t)}const $9=lr?"metaKey":"ctrlKey";xn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=U3(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&WU(n,t.input.lastClick)&&!n[$9]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let a=t.posAtCoords(ed(n));a&&(o=="singleClick"?t.input.mouseDown=new tq(t,a,n,!!r):(o=="doubleClick"?JU:ZU)(t,a.pos,a.inside,n)?n.preventDefault():Di(t,"pointer"))};class w9{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class tq extends w9{constructor(e,n,r,i){super(e),this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!r[$9],this.allowDefault=r.shiftKey;let o,a;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),a=n.inside;else{let h=e.state.doc.resolve(n.pos);o=h.parent,a=h.depth?h.before():0}const u=i?null:r.target,c=u?e.docView.nearestDesc(u,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:f}=e.state;r.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||f instanceof xe&&f.from<=a&&f.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&dr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Di(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||wi(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ed(e))),this.updateAllowDefault(e),this.allowDefault||!n?Di(this.view,"pointer"):XU(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||dn&&this.mightDrag&&!this.mightDrag.node.isAtom||tn&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(td(this.view,Me.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Di(this.view,"pointer")}move(e){this.updateAllowDefault(e),Di(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class nq extends w9{constructor(e,n){super(e),this.startSelection=n,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Di(this.view,"pointer");let n=this.view.posAtCoords(ed(e)),r=n&&S9(this.view,n.inside,!1);if(!r)return;let{doc:i}=this.view.state,o=this.startSelection,[a,u]=r.from<o.from?[o.to,r.from]:[o.from,r.to];td(this.view,ke.create(i,a,u))}}xn.touchstart=t=>{t.input.lastTouch=Date.now(),U3(t),Di(t,"pointer")};xn.touchmove=t=>{t.input.lastTouch=Date.now(),Di(t,"pointer")};xn.contextmenu=t=>U3(t);function T9(t,e){return t.composing?!0:dn&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const rq=Ei?5e3:-1;Cn.compositionstart=Cn.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ke&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||tn&&r9&&iq(t)))t.markCursor=t.state.storedMarks||n.marks(),Qh(t,!0),t.markCursor=null;else if(Qh(t,!e.selection.empty),dr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let a=o<0?i.lastChild:i.childNodes[o-1];if(!a)break;if(a.nodeType==3){let u=t.domSelection();u&&u.collapse(a,a.nodeValue.length);break}else i=a,o=-1}}t.input.composing=!0}A9(t,rq)};function iq(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Cn.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,A9(t,20))};function A9(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Qh(t),e))}function B9(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function oq(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=YV(e.focusNode,e.focusOffset),r=XV(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function Qh(t,e=!1){if(!(Ei&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),B9(t),e||t.docView&&t.docView.dirty){let n=K3(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function sq(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Lc=Ln&&wo<15||Cl&&tU<604;xn.copy=Cn.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=Lc?null:n.clipboardData,a=r.content(),{dom:u,text:c}=j3(t,a);o?(n.preventDefault(),o.clearData(),o.setData("text/html",u.innerHTML),o.setData("text/plain",c)):sq(t,u),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function aq(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function lq(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?zc(t,r.value,null,i,e):zc(t,r.textContent,r.innerHTML,i,e)},50)}function zc(t,e,n,r,i){let o=v9(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,i,o||he.empty)))return!0;if(!o)return!1;let a=aq(o),u=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(o);return t.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function M9(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Cn.paste=(t,e)=>{let n=e;if(t.composing&&!Ei)return;let r=Lc?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&zc(t,M9(r),r.getData("text/html"),i,n)?n.preventDefault():lq(t,n)};class R9{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const uq=lr?"altKey":"ctrlKey";function P9(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[uq]}xn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(ed(n)),a;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof xe?i.to-1:i.to))){if(r&&r.mightDrag)a=xe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let m=t.docView.nearestDesc(n.target,!0);m&&m.node.type.spec.draggable&&m!=t.docView&&(a=xe.create(t.state.doc,m.posBefore))}}let u=(a||t.state.selection).content(),{dom:c,text:f,slice:h}=j3(t,u);(!n.dataTransfer.files.length||!tn||n9>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Lc?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",Lc||n.dataTransfer.setData("text/plain",f),t.dragging=new R9(h,P9(t,n),a)};xn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Cn.dragover=Cn.dragenter=(t,e)=>e.preventDefault();Cn.drop=(t,e)=>{try{cq(t,e,t.dragging)}finally{t.dragging=null}};function cq(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(ed(e));if(!r)return;let i=t.state.doc.resolve(r.pos),o=n&&n.slice;o?t.someProp("transformPasted",b=>{o=b(o,t,!1)}):o=v9(t,M9(e.dataTransfer),Lc?null:e.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&P9(t,e));if(t.someProp("handleDrop",b=>b(t,e,o||he.empty,a))){e.preventDefault();return}if(!o)return;e.preventDefault();let u=o?OM(t.state.doc,i.pos,o):i.pos;u==null&&(u=i.pos);let c=t.state.tr;if(a){let{node:b}=n;b?b.replace(c):c.deleteSelection()}let f=c.mapping.map(u),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,m=c.doc;if(h?c.replaceRangeWith(f,f,o.content.firstChild):c.replaceRange(f,f,o),c.doc.eq(m))return;let g=c.doc.resolve(f);if(h&&xe.isSelectable(o.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new xe(g));else{let b=c.mapping.map(u);c.mapping.maps[c.mapping.maps.length-1].forEach((v,C,E,D)=>b=D),c.setSelection(_3(t,g,c.doc.resolve(b)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}xn.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&wi(t)},20))};xn.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};xn.beforeinput=(t,e)=>{if(Ei&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Es(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Cn)xn[t]=Cn[t];function Ic(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Yh{constructor(e,n){this.toDOM=e,this.spec=n||Us,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:a}=e.mapResult(n.from+i,this.side<0?-1:1);return a?null:new gn(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Yh&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ic(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Bo{constructor(e,n){this.attrs=e,this.spec=n||Us}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=a?null:new gn(o,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Bo&&Ic(this.attrs,e.attrs)&&Ic(this.spec,e.spec)}static is(e){return e.type instanceof Bo}destroy(){}}class q3{constructor(e,n){this.attrs=e,this.spec=n||Us}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let a=e.mapResult(n.to+i,-1);return a.deleted||a.pos<=o.pos?null:new gn(o.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof q3&&Ic(this.attrs,e.attrs)&&Ic(this.spec,e.spec)}destroy(){}}class gn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new gn(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new gn(e,e,new Yh(n,r))}static inline(e,n,r,i){return new gn(e,n,new Bo(r,i))}static node(e,n,r,i){return new gn(e,n,new q3(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bo}get widget(){return this.type instanceof Yh}}const il=[],Us={};class st{constructor(e,n){this.local=e.length?e:il,this.children=n.length?n:il}static create(e,n){return n.length?Xh(n,e,0,Us):an}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let a=0;a<this.local.length;a++){let u=this.local[a];u.from<=n&&u.to>=e&&(!o||o(u.spec))&&r.push(u.copy(u.from+i,u.to+i))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>e){let u=this.children[a]+1;this.children[a+2].findInner(e-u,n-u,r,i+u,o)}}map(e,n,r){return this==an||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Us)}mapInner(e,n,r,i,o){let a;for(let u=0;u<this.local.length;u++){let c=this.local[u].map(e,r,i);c&&c.type.valid(n,c)?(a||(a=[])).push(c):o.onRemove&&o.onRemove(this.local[u].spec)}return this.children.length?dq(this.children,a||[],e,n,r,i,o):a?new st(a.sort(qs),il):an}add(e,n){return n.length?this==an?st.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((u,c)=>{let f=c+r,h;if(h=N9(n,u,f)){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(u,h,f+1):i.splice(o,0,c,c+u.nodeSize,Xh(h,u,f+1,Us)),o+=3}});let a=O9(o?L9(n):n,-r);for(let u=0;u<a.length;u++)a[u].type.valid(e,a[u])||a.splice(u--,1);return new st(a.length?this.local.concat(a).sort(qs):this.local,i||this.children)}remove(e){return e.length==0||this==an?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let a,u=r[o]+n,c=r[o+1]+n;for(let h=0,m;h<e.length;h++)(m=e[h])&&m.from>u&&m.to<c&&(e[h]=null,(a||(a=[])).push(m));if(!a)continue;r==this.children&&(r=this.children.slice());let f=r[o+2].removeInner(a,u+1);f!=an?r[o+2]=f:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,a;o<e.length;o++)if(a=e[o])for(let u=0;u<i.length;u++)i[u].eq(a,n)&&(i==this.local&&(i=this.local.slice()),i.splice(u--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new st(i,r):an}forChild(e,n){if(this==an)return this;if(n.isLeaf)return st.empty;let r,i;for(let u=0;u<this.children.length;u+=3)if(this.children[u]>=e){this.children[u]==e&&(r=this.children[u+2]);break}let o=e+1,a=o+n.content.size;for(let u=0;u<this.local.length;u++){let c=this.local[u];if(c.from<a&&c.to>o&&c.type instanceof Bo){let f=Math.max(o,c.from)-o,h=Math.min(a,c.to)-o;f<h&&(i||(i=[])).push(c.copy(f,h))}}if(i){let u=new st(i.sort(qs),il);return r?new go([u,r]):u}return r||an}eq(e){if(this==e)return!0;if(!(e instanceof st)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return G3(this.localsInner(e))}localsInner(e){if(this==an)return il;if(e.inlineContent||!this.local.some(Bo.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Bo||n.push(this.local[r]);return n}forEachSet(e){e(this)}}st.empty=new st([],[]);st.removeOverlap=G3;const an=st.empty;class go{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Us));return go.from(r)}forChild(e,n){if(n.isLeaf)return st.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=an&&(o instanceof go?r=r.concat(o.members):r.push(o))}return go.from(r)}eq(e){if(!(e instanceof go)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let a=0;a<o.length;a++)n.push(o[a])}}return n?G3(r?n:n.sort(qs)):il}static from(e){switch(e.length){case 0:return an;case 1:return e[0];default:return new go(e.every(n=>n instanceof st)?e:e.reduce((n,r)=>n.concat(r instanceof st?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function dq(t,e,n,r,i,o,a){let u=t.slice();for(let f=0,h=o;f<n.maps.length;f++){let m=0;n.maps[f].forEach((g,b,v,C)=>{let E=C-v-(b-g);for(let D=0;D<u.length;D+=3){let w=u[D+1];if(w<0||g>w+h-m)continue;let $=u[D]+h-m;b>=$?u[D+1]=g<=$?-2:-1:g>=h&&E&&(u[D]+=E,u[D+1]+=E)}m+=E}),h=n.maps[f].map(h,-1)}let c=!1;for(let f=0;f<u.length;f+=3)if(u[f+1]<0){if(u[f+1]==-2){c=!0,u[f+1]=-1;continue}let h=n.map(t[f]+o),m=h-i;if(m<0||m>=r.content.size){c=!0;continue}let g=n.map(t[f+1]+o,-1),b=g-i,{index:v,offset:C}=r.content.findIndex(m),E=r.maybeChild(v);if(E&&C==m&&C+E.nodeSize==b){let D=u[f+2].mapInner(n,E,h+1,t[f]+o+1,a);D!=an?(u[f]=m,u[f+1]=b,u[f+2]=D):(u[f+1]=-2,c=!0)}else c=!0}if(c){let f=fq(u,t,e,n,i,o,a),h=Xh(f,r,0,a);e=h.local;for(let m=0;m<u.length;m+=3)u[m+1]<0&&(u.splice(m,3),m-=3);for(let m=0,g=0;m<h.children.length;m+=3){let b=h.children[m];for(;g<u.length&&u[g]<b;)g+=3;u.splice(g,0,h.children[m],h.children[m+1],h.children[m+2])}}return new st(e.sort(qs),u)}function O9(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new gn(i.from+e,i.to+e,i.type))}return n}function fq(t,e,n,r,i,o,a){function u(c,f){for(let h=0;h<c.local.length;h++){let m=c.local[h].map(r,i,f);m?n.push(m):a.onRemove&&a.onRemove(c.local[h].spec)}for(let h=0;h<c.children.length;h+=3)u(c.children[h+2],c.children[h]+f+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&u(t[c+2],e[c]+o+1);return n}function N9(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,a;o<t.length;o++)(a=t[o])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),t[o]=null);return i}function L9(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Xh(t,e,n,r){let i=[],o=!1;e.forEach((u,c)=>{let f=N9(t,u,c+n);if(f){o=!0;let h=Xh(f,u,n+c+1,r);h!=an&&i.push(c,c+u.nodeSize,h)}});let a=O9(o?L9(t):t,-n).sort(qs);for(let u=0;u<a.length;u++)a[u].type.valid(e,a[u])||(r.onRemove&&r.onRemove(a[u].spec),a.splice(u--,1));return a.length||i.length?new st(a,i):an}function qs(t,e){return t.from-e.from||t.to-e.to}function G3(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),TD(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),TD(e,i,r.copy(o.from,r.to)));break}}}return e}function TD(t,e,n){for(;e<t.length&&qs(n,t[e])>0;)e++;t.splice(e,0,n)}function Pb(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=an&&e.push(r)}),t.cursorWrapper&&e.push(st.create(t.state.doc,[t.cursorWrapper.deco])),go.from(e)}const hq={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},pq=Ln&&wo<=11;class mq{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class gq{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new mq,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ln&&wo<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():dn&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),pq&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,hq)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(CD(this.view)){if(this.suppressingSelectionUpdates)return wi(this.view);if(Ln&&wo<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Js(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let o=e.focusNode;o;o=xl(o))n.add(o);for(let o=e.anchorNode;o;o=xl(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&CD(e)&&!this.ignoreSelectionChange(r),o=-1,a=-1,u=!1,c=[];if(e.editable)for(let h=0;h<n.length;h++){let m=this.registerMutation(n[h],c);m&&(o=o<0?m.from:Math.min(m.from,o),a=a<0?m.to:Math.max(m.to,a),m.typeOver&&(u=!0))}if(c.some(h=>h.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||tn&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&n.some(h=>h.type=="childList"&&h.removedNodes.length))){for(let h of c)if(h.nodeName=="BR"&&h.parentNode){let m=h.nextSibling;for(;m&&m.nodeType==1;){if(m.contentEditable=="false"){h.parentNode.removeChild(h);break}m=m.firstChild}}}else if(dr&&c.length){let h=c.filter(m=>m.nodeName=="BR");if(h.length==2){let[m,g]=h;m.parentNode&&m.parentNode.parentNode==g.parentNode?g.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let g of h){let b=g.parentNode;b&&b.nodeName=="LI"&&(!m||vq(e,m)!=b)&&g.remove()}}}let f=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&lm(r)&&(f=K3(e))&&f.eq(Me.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,wi(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,a),bq(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,xq(e,c)),this.handleDOMChange(o,a,u,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||wi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let h=0;h<e.addedNodes.length;h++){let m=e.addedNodes[h];n.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Ln&&wo<=11&&e.addedNodes.length)for(let h=0;h<e.addedNodes.length;h++){let{previousSibling:m,nextSibling:g}=e.addedNodes[h];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m),(!g||Array.prototype.indexOf.call(e.addedNodes,g)<0)&&(o=g)}let a=i&&i.parentNode==e.target?Zt(i)+1:0,u=r.localPosFromDOM(e.target,a,-1),c=o&&o.parentNode==e.target?Zt(o):e.target.childNodes.length,f=r.localPosFromDOM(e.target,c,1);return{from:u,to:f}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let AD=new WeakMap,BD=!1;function bq(t){if(!AD.has(t)&&(AD.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=dr,BD)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),BD=!0}}function MD(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return Js(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function yq(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return MD(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?MD(t,n):null}function vq(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function xq(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let o of e)if(((n=o.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=o.nextSibling;for(;a&&a.nodeName!="TD"&&a.nodeName!="TH";)a=a.nextSibling;if(a){let u=a;for(;;){let c=u.firstChild;if(!c||c.nodeType!=1||c.contentEditable=="false"||/^(BR|IMG)$/.test(c.nodeName))break;u=c}u.insertBefore(o,u.firstChild),r==o&&t.domSelection().collapse(o,i)}else o.parentNode.removeChild(o)}}function Cq(t,e,n,r){let{node:i,fromOffset:o,toOffset:a,from:u,to:c}=t.docView.parseRange(e,n),f=t.domSelectionRange(),h,m=f.anchorNode;if(m&&t.dom.contains(m.nodeType==1?m:m.parentNode)&&(h=[{node:m,offset:f.anchorOffset}],lm(f)||h.push({node:f.focusNode,offset:f.focusOffset})),tn&&t.input.lastKeyCode===8)for(let D=a;D>o;D--){let w=i.childNodes[D-1],$=w.pmViewDesc;if(w.nodeName=="BR"&&!$){a=D;break}if(!$||$.size)break}let g=t.state.doc,b=t.someProp("domParser")||Si.fromSchema(t.state.schema),v=g.resolve(u),C=null,E=b.parse(i,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:o,to:a,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:Eq(r),context:v});if(h&&h[0].pos!=null){let D=h[0].pos,w=h[1]&&h[1].pos;w==null&&(w=D),C={anchor:D+u,head:w+u}}return{doc:E,sel:C,from:u,to:c}}const Eq=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(dn&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||dn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},Dq=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function kq(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let M=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,P=K3(t,M);if(P&&!t.state.selection.eq(P)){if(tn&&Ei&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",G=>G(t,Es(13,"Enter"))))return;let I=t.state.tr.setSelection(P);M=="pointer"?I.setMeta("pointer",!0):M=="key"&&I.scrollIntoView(),o&&I.setMeta("composition",o),t.dispatch(I)}return}let a=t.state.doc.resolve(e),u=a.sharedDepth(n);e=a.before(u+1),n=t.state.doc.resolve(n).after(u+1);let c=t.state.selection,f=Cq(t,e,n,i),h=t.state.doc,m=h.slice(f.from,f.to),g,b;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(g=t.state.selection.to,b="end"):(g=t.state.selection.from,b="start"),t.input.lastKeyCode=null;let v=wq(m.content,f.doc.content,f.from,g,b);if(v&&t.input.domChangeCount++,(Cl&&t.input.lastIOSEnter>Date.now()-225||Ei)&&i.some(M=>M.nodeType==1&&!Dq.test(M.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",M=>M(t,Es(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!v)if(r&&c instanceof ke&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))v={start:c.from,endA:c.to,endB:c.to};else{if(f.sel){let M=RD(t,t.state.doc,f.sel);if(M&&!M.eq(t.state.selection)){let P=t.state.tr.setSelection(M);o&&P.setMeta("composition",o),t.dispatch(P)}}return}t.state.selection.from<t.state.selection.to&&v.start==v.endB&&t.state.selection instanceof ke&&(v.start>t.state.selection.from&&v.start<=t.state.selection.from+2&&t.state.selection.from>=f.from?v.start=t.state.selection.from:v.endA<t.state.selection.to&&v.endA>=t.state.selection.to-2&&t.state.selection.to<=f.to&&(v.endB+=t.state.selection.to-v.endA,v.endA=t.state.selection.to)),Ln&&wo<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>f.from&&f.doc.textBetween(v.start-f.from-1,v.start-f.from+1)==" "&&(v.start--,v.endA--,v.endB--);let C=f.doc.resolveNoCache(v.start-f.from),E=f.doc.resolveNoCache(v.endB-f.from),D=h.resolve(v.start),w=C.sameParent(E)&&C.parent.inlineContent&&D.end()>=v.endA;if((Cl&&t.input.lastIOSEnter>Date.now()-225&&(!w||i.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!w&&C.pos<f.doc.content.size&&(!C.sameParent(E)||!C.parent.inlineContent)&&C.pos<E.pos&&!/\S/.test(f.doc.textBetween(C.pos,E.pos,"","")))&&t.someProp("handleKeyDown",M=>M(t,Es(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&$q(h,v.start,v.endA,C,E)&&t.someProp("handleKeyDown",M=>M(t,Es(8,"Backspace")))){Ei&&tn&&t.domObserver.suppressSelectionUpdates();return}tn&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),Ei&&!w&&C.start()!=E.start()&&E.parentOffset==0&&C.depth==E.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==v.endA&&(v.endB-=2,E=f.doc.resolveNoCache(v.endB-f.from),setTimeout(()=>{t.someProp("handleKeyDown",function(M){return M(t,Es(13,"Enter"))})},20));let $=v.start,T=v.endA,A=M=>{let P=M||t.state.tr.replace($,T,f.doc.slice(v.start-f.from,v.endB-f.from));if(f.sel){let I=RD(t,P.doc,f.sel);I&&!(tn&&t.composing&&I.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(I.head==$||I.head==P.mapping.map(T)-1)||Ln&&I.empty&&I.head==$)&&P.setSelection(I)}return o&&P.setMeta("composition",o),P.scrollIntoView()},O;if(w)if(C.pos==E.pos){Ln&&wo<=11&&C.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>wi(t),20));let M=A(t.state.tr.delete($,T)),P=h.resolve(v.start).marksAcross(h.resolve(v.endA));P&&M.ensureMarks(P),t.dispatch(M)}else if(v.endA==v.endB&&(O=Sq(C.parent.content.cut(C.parentOffset,E.parentOffset),D.parent.content.cut(D.parentOffset,v.endA-D.start())))){let M=A(t.state.tr);O.type=="add"?M.addMark($,T,O.mark):M.removeMark($,T,O.mark),t.dispatch(M)}else if(C.parent.child(C.index()).isText&&C.index()==E.index()-(E.textOffset?0:1)){let M=C.parent.textBetween(C.parentOffset,E.parentOffset),P=()=>A(t.state.tr.insertText(M,$,T));t.someProp("handleTextInput",I=>I(t,$,T,M,P))||t.dispatch(P())}else t.dispatch(A());else t.dispatch(A())}function RD(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:_3(t,e.resolve(n.anchor),e.resolve(n.head))}function Sq(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,a,u,c;for(let h=0;h<r.length;h++)i=r[h].removeFromSet(i);for(let h=0;h<n.length;h++)o=n[h].removeFromSet(o);if(i.length==1&&o.length==0)u=i[0],a="add",c=h=>h.mark(u.addToSet(h.marks));else if(i.length==0&&o.length==1)u=o[0],a="remove",c=h=>h.mark(u.removeFromSet(h.marks));else return null;let f=[];for(let h=0;h<e.childCount;h++)f.push(c(e.child(h)));if(ae.from(f).eq(t))return{mark:u,type:a}}function $q(t,e,n,r,i){if(n-e<=i.pos-r.pos||Ob(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let u=o.nodeAfter;return u!=null&&n==e+u.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let a=t.resolve(Ob(o,!0,!0));return!a.parent.isTextblock||a.pos>n||Ob(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function Ob(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function wq(t,e,n,r,i){let o=t.findDiffStart(e,n),a=n+t.size,u=n+e.size;if(o==null)return null;let{a:c,b:f}=t.findDiffEnd(e,a,u);if(i=="end"){let h=Math.max(0,o-Math.min(c,f));r-=c+h-o}if(c<o&&a<u){let h=r<=o&&r>=c?o-r:0;o-=h,f=o+(f-c),c=o}else if(f<o){let h=r<=o&&r>=f?o-r:0;o-=h,c=o+(c-f),f=o}return{start:o,endA:c,endB:f}}class z9{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new HU,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(zD),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ND(this),OD(this),this.nodeViews=LD(this),this.docView=mD(this.state.doc,PD(this),Pb(this),this.dom,this),this.domObserver=new gq(this,(r,i,o,a)=>kq(this,r,i,o,a)),this.domObserver.start(),VU(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&iy(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(zD),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,o=!1,a=!1;e.storedMarks&&this.composing&&(B9(this),a=!0),this.state=e;let u=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(u||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let b=LD(this);Aq(b,this.nodeViews)&&(this.nodeViews=b,o=!0)}(u||n.handleDOMEvents!=this._props.handleDOMEvents)&&iy(this),this.editable=ND(this),OD(this);let c=Pb(this),f=PD(this),h=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",m=o||!this.docView.matchesNode(e.doc,f,c);(m||!e.selection.eq(i.selection))&&(a=!0);let g=h=="preserve"&&a&&this.dom.style.overflowAnchor==null&&iU(this);if(a){this.domObserver.stop();let b=m&&(Ln||tn)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Tq(i.selection,e.selection);if(m){let C=tn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=oq(this)),(o||!this.docView.update(e.doc,f,c,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=mD(e.doc,f,c,this.dom,this)),C&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(b=!0)}let v=this.input.mouseDown;b||!(v&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&TU(this)&&v.delaySelUpdate())?wi(this,b):(g9(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),h=="reset"?this.dom.scrollTop=0:h=="to selection"?this.scrollToSelection():g&&oU(g)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof xe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&cD(this,n.getBoundingClientRect(),e)}else cD(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&o<this.state.doc.content.size&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new R9(e.slice,e.move,i<0?void 0:xe.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let a=0;a<this.directPlugins.length;a++){let u=this.directPlugins[a].props[e];if(u!=null&&(i=n?n(u):u))return i}let o=this.state.plugins;if(o)for(let a=0;a<o.length;a++){let u=o[a].props[e];if(u!=null&&(i=n?n(u):u))return i}}hasFocus(){if(Ln){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&sU(this.dom),wi(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return dU(this,e)}coordsAtPos(e,n=1){return l9(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return gU(this,n||this.state,e)}pasteHTML(e,n){return zc(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return zc(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return j3(this,e)}destroy(){this.docView&&(UU(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Pb(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,WV())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return GU(this,e)}domSelectionRange(){let e=this.domSelection();return e?dn&&this.root.nodeType===11&&ZV(this.dom.ownerDocument)==this.dom&&yq(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}z9.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function PD(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[gn.node(0,t.state.doc.content.size,e)]}function OD(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:gn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function ND(t){return!t.someProp("editable",e=>e(t.state)===!1)}function Tq(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function LD(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Aq(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function zD(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Lo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Jh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Bq=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mq=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var en=0;en<10;en++)Lo[48+en]=Lo[96+en]=String(en);for(var en=1;en<=24;en++)Lo[en+111]="F"+en;for(var en=65;en<=90;en++)Lo[en]=String.fromCharCode(en+32),Jh[en]=String.fromCharCode(en);for(var Nb in Lo)Jh.hasOwnProperty(Nb)||(Jh[Nb]=Lo[Nb]);function Rq(t){var e=Bq&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Mq&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Jh:Lo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const Pq=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Oq=typeof navigator<"u"&&/Win/.test(navigator.platform);function Nq(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,a;for(let u=0;u<e.length-1;u++){let c=e[u];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))Pq?a=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),a&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function Lq(t){let e=Object.create(null);for(let n in t)e[Nq(n)]=t[n];return e}function Lb(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function zq(t){return new ht({props:{handleKeyDown:I9(t)}})}function I9(t){let e=Lq(t);return function(n,r){let i=Rq(r),o,a=e[Lb(i,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let u=e[Lb(i,r,!1)];if(u&&u(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(Oq&&r.ctrlKey&&r.altKey)&&(o=Lo[r.keyCode])&&o!=i){let u=e[Lb(o,r)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}var Iq=Object.defineProperty,W3=(t,e)=>{for(var n in e)Iq(t,n,{get:e[n],enumerable:!0})};function cm(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}var dm=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...f)=>{const h=u(...f)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a=[],u=!!t,c=t||i.tr,f=()=>(!u&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),a.every(m=>m===!0)),h={...Object.fromEntries(Object.entries(n).map(([m,g])=>[m,(...v)=>{const C=this.buildProps(c,e),E=g(...v)(C);return a.push(E),h}])),run:f};return h}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,o=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([u,c])=>[u,(...f)=>c(...f)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,a={tr:t,editor:r,view:o,state:cm({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([u,c])=>[u,(...f)=>c(...f)(a)]))}};return a}},xr={};W3(xr,{blur:()=>Fq,clearContent:()=>Kq,clearNodes:()=>_q,command:()=>jq,createParagraphNear:()=>Hq,cut:()=>Vq,deleteCurrentNode:()=>Uq,deleteNode:()=>qq,deleteRange:()=>Gq,deleteSelection:()=>Yq,enter:()=>Xq,exitCode:()=>Jq,extendMarkRange:()=>Zq,first:()=>eG,focus:()=>nG,forEach:()=>rG,insertContent:()=>iG,insertContentAt:()=>sG,insertDefaultBlock:()=>aG,joinBackward:()=>cG,joinDown:()=>uG,joinForward:()=>dG,joinItemBackward:()=>fG,joinItemForward:()=>hG,joinTextblockBackward:()=>pG,joinTextblockForward:()=>mG,joinUp:()=>lG,keyboardShortcut:()=>bG,lift:()=>yG,liftEmptyBlock:()=>vG,liftListItem:()=>xG,newlineInCode:()=>CG,resetAttributes:()=>EG,scrollIntoView:()=>DG,selectAll:()=>kG,selectNodeBackward:()=>SG,selectNodeForward:()=>$G,selectParentNode:()=>wG,selectTextblockEnd:()=>TG,selectTextblockStart:()=>AG,setContent:()=>BG,setMark:()=>YG,setMeta:()=>XG,setNode:()=>JG,setNodeSelection:()=>ZG,setTextDirection:()=>eW,setTextSelection:()=>tW,sinkListItem:()=>nW,splitBlock:()=>rW,splitListItem:()=>iW,toggleList:()=>sW,toggleMark:()=>aW,toggleNode:()=>lW,toggleWrap:()=>uW,undoInputRule:()=>cW,unsetAllMarks:()=>dW,unsetMark:()=>fW,unsetTextDirection:()=>hW,updateAttributes:()=>pW,wrapIn:()=>mW,wrapInList:()=>gW});var Fq=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),Kq=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),_q=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:a})=>{t.doc.nodesBetween(o.pos,a.pos,(u,c)=>{if(u.type.isText)return;const{doc:f,mapping:h}=e,m=f.resolve(h.map(c)),g=f.resolve(h.map(c+u.nodeSize)),b=m.blockRange(g);if(!b)return;const v=Ml(b);if(u.type.isTextblock){const{defaultType:C}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(b.start,C)}(v||v===0)&&e.lift(b,v)})}),!0},jq=t=>e=>t(e),Hq=()=>({state:t,dispatch:e})=>XM(t,e),Vq=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,o.content),r.setSelection(new ke(r.doc.resolve(Math.max(a-1,0)))),!0},Uq=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(e){const u=i.before(o),c=i.after(o);t.delete(u,c).scrollIntoView()}return!0}return!1};function Mt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var qq=t=>({tr:e,state:n,dispatch:r})=>{const i=Mt(t,n.schema),o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){const c=o.before(a),f=o.after(a);e.delete(c,f).scrollIntoView()}return!0}return!1},Gq=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},Wq=t=>t.content?/^text(\*|\+)/.test(t.content):!1,ID=(t,e,n)=>{if(!t.parent.isInline||n==="left"&&t.pos>t.start()||n==="right"&&t.pos<t.end())return t.pos;const r=e.nodes[t.parent.type.name].spec;return Wq(r)?n==="left"?t.start()-1:t.end()+1:t.pos},Qq=(t,e,n)=>{const r=ID(t,n,"left"),i=ID(e,n,"right");return{from:r,to:i}},Yq=()=>({state:t,dispatch:e})=>{if(t.selection.empty)return!1;if(e){const n=t.tr,{ranges:r}=t.selection,i=n.steps.length;r.forEach(o=>{const a=n.mapping.slice(i),u=n.doc.resolve(a.map(o.$from.pos)),c=n.doc.resolve(a.map(o.$to.pos)),{from:f,to:h}=Qq(u,c,t.schema);n.deleteRange(f,h)}),n.selection.empty||n.setSelection(ke.near(n.doc.resolve(n.selection.from))),n.scrollIntoView(),e(n)}return!0},Xq=()=>({commands:t})=>t.keyboardShortcut("Enter"),Jq=()=>({state:t,dispatch:e})=>PV(t,e);function Q3(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Zh(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:Q3(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function F9(t,e,n={}){return t.find(r=>r.type===e&&Zh(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function FD(t,e,n={}){return!!F9(t,e,n)}function Y3(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(f=>f.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(f=>f.type===e))return;if(!n){const f=r.node.marks.find(h=>h.type===e);f&&(n=f.attrs)}if(!F9([...r.node.marks],e,n))return;let o=r.index,a=t.start()+r.offset,u=o+1,c=a+r.node.nodeSize;for(;o>0&&FD([...t.parent.child(o-1).marks],e,n);)o-=1,a-=t.parent.child(o).nodeSize;for(;u<t.parent.childCount&&FD([...t.parent.child(u).marks],e,n);)c+=t.parent.child(u).nodeSize,u+=1;return{from:a,to:c}}function Pi(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var Zq=(t,e)=>({tr:n,state:r,dispatch:i})=>{const o=Pi(t,r.schema),{doc:a,selection:u}=n,{$from:c,from:f,to:h}=u;if(i){const m=Y3(c,o,e);if(m&&m.from<=f&&m.to>=h){const g=ke.create(a,m.from,m.to);n.setSelection(g)}}return!0},eG=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function K9(t){return t instanceof ke}function Os(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function oy(t,e=null){if(!e)return null;const n=Me.atStart(t),r=Me.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,o=r.to;return e==="all"?ke.create(t,Os(0,i,o),Os(t.content.size,i,o)):ke.create(t,Os(e,i,o),Os(e,i,o))}function KD(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function ep(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function tG(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var nG=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const a=()=>{(ep()||KD())&&r.dom.focus(),tG()&&!ep()&&!KD()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(o&&t===null&&!K9(n.state.selection))return a(),!0;const u=oy(i.doc,t)||n.state.selection,c=n.state.selection.eq(u);return o&&(c||i.setSelection(u),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},rG=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),iG=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),_9=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&_9(r)}return t};function Wu(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return _9(n)}function El(t,e,n){if(t instanceof $o||t instanceof ae)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return ae.fromArray(t.map(u=>e.nodeFromJSON(u)));const a=e.nodeFromJSON(t);return n.errorOnInvalidContent&&a.check(),a}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),El("",e,n)}if(i){if(n.errorOnInvalidContent){let a=!1,u="";const c=new DM({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:f=>(a=!0,u=typeof f=="string"?f:f.outerHTML,null)}]}})});if(n.slice?Si.fromSchema(c).parseSlice(Wu(t),n.parseOptions):Si.fromSchema(c).parse(Wu(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${u}`)})}const o=Si.fromSchema(e);return n.slice?o.parseSlice(Wu(t),n.parseOptions).content:o.parse(Wu(t),n.parseOptions)}return El("",e,n)}function j9(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof Tt||i instanceof jt))return;const o=t.mapping.maps[r];let a=0;o.forEach((u,c,f,h)=>{a===0&&(a=h)}),t.setSelection(Me.near(t.doc.resolve(a),n))}var oG=t=>!("type"in t),sG=(t,e,n)=>({tr:r,dispatch:i,editor:o})=>{var a;if(i){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let u;const c=E=>{o.emit("contentError",{editor:o,error:E,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},f={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{El(e,o.schema,{parseOptions:f,errorOnInvalidContent:!0})}catch(E){c(E)}try{u=El(e,o.schema,{parseOptions:f,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:o.options.enableContentCheck})}catch(E){return c(E),!1}let{from:h,to:m}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},g=!0,b=!0;if((oG(u)?u:[u]).forEach(E=>{E.check(),g=g?E.isText&&E.marks.length===0:!1,b=b?E.isBlock:!1}),h===m&&b){const{parent:E}=r.doc.resolve(h);E.isTextblock&&!E.type.spec.code&&!E.childCount&&(h-=1,m+=1)}let C;if(g){if(Array.isArray(e))C=e.map(E=>E.text||"").join("");else if(e instanceof ae){let E="";e.forEach(D=>{D.text&&(E+=D.text)}),C=E}else typeof e=="object"&&e&&e.text?C=e.text:C=e;r.insertText(C,h,m)}else{C=u;const E=r.doc.resolve(h),D=E.node(),w=E.parentOffset===0,$=D.isText||D.isTextblock,T=D.content.size>0;w&&$&&T&&b&&(h=Math.max(0,h-1)),r.replaceWith(h,m,C)}n.updateSelection&&j9(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:h,text:C}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:h,text:C})}return!0};function H9(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var aG=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{pos:i,attrs:o,content:a,updateSelection:u=!0}=t;let c;typeof i=="number"?c=e.doc.resolve(i):i?c=i:c=e.selection.$from;const f=H9(c.parent.contentMatchAt(c.index()));if(!f)return!1;const h=Object.keys(f.spec.attrs||{}),m=o?Object.fromEntries(Object.entries(o).filter(([b])=>h.includes(b))):{};let g;if(a){const b=El(a,r.schema);g=f.createAndFill(m,b)}else g=f.createAndFill(m);return g?(n&&(e.insert(c.pos,g),u&&j9(e,e.steps.length-1,-1)),!0):!1},lG=()=>({state:t,dispatch:e})=>BV(t,e),uG=()=>({state:t,dispatch:e})=>MV(t,e),cG=()=>({state:t,dispatch:e})=>VM(t,e),dG=()=>({state:t,dispatch:e})=>WM(t,e),fG=()=>({state:t,dispatch:e,tr:n})=>{try{const r=om(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},hG=()=>({state:t,dispatch:e,tr:n})=>{try{const r=om(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},pG=()=>({state:t,dispatch:e})=>TV(t,e),mG=()=>({state:t,dispatch:e})=>AV(t,e);function V9(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function gG(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,o,a;for(let u=0;u<e.length-1;u+=1){const c=e[u];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))ep()||V9()?a=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var bG=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const o=gG(t).split(/-(?!$)/),a=o.find(f=>!["Alt","Ctrl","Meta","Shift"].includes(f)),u=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction(()=>{n.someProp("handleKeyDown",f=>f(n,u))});return c?.steps.forEach(f=>{const h=f.map(r.mapping);h&&i&&r.maybeStep(h)}),!0};function zo(t,e,n={}){const{from:r,to:i,empty:o}=t.selection,a=e?Mt(e,t.schema):null,u=[];t.doc.nodesBetween(r,i,(m,g)=>{if(m.isText)return;const b=Math.max(r,g),v=Math.min(i,g+m.nodeSize);u.push({node:m,from:b,to:v})});const c=i-r,f=u.filter(m=>a?a.name===m.node.type.name:!0).filter(m=>Zh(m.node.attrs,n,{strict:!1}));return o?!!f.length:f.reduce((m,g)=>m+g.to-g.from,0)>=c}var yG=(t,e={})=>({state:n,dispatch:r})=>{const i=Mt(t,n.schema);return zo(n,i,e)?RV(n,r):!1},vG=()=>({state:t,dispatch:e})=>JM(t,e),xG=t=>({state:e,dispatch:n})=>{const r=Mt(t,e.schema);return VV(r)(e,n)},CG=()=>({state:t,dispatch:e})=>YM(t,e);function fm(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function _D(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var EG=(t,e)=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const u=fm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(o=Mt(t,r.schema)),u==="mark"&&(a=Pi(t,r.schema));let c=!1;return n.selection.ranges.forEach(f=>{r.doc.nodesBetween(f.$from.pos,f.$to.pos,(h,m)=>{o&&o===h.type&&(c=!0,i&&n.setNodeMarkup(m,void 0,_D(h.attrs,e))),a&&h.marks.length&&h.marks.forEach(g=>{a===g.type&&(c=!0,i&&n.addMark(m,m+h.nodeSize,a.create(_D(g.attrs,e))))})})}),c},DG=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),kG=()=>({tr:t,dispatch:e})=>{if(e){const n=new Wn(t.doc);t.setSelection(n)}return!0},SG=()=>({state:t,dispatch:e})=>qM(t,e),$G=()=>({state:t,dispatch:e})=>QM(t,e),wG=()=>({state:t,dispatch:e})=>LV(t,e),TG=()=>({state:t,dispatch:e})=>FV(t,e),AG=()=>({state:t,dispatch:e})=>IV(t,e);function sy(t,e,n={},r={}){return El(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var BG=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:o,dispatch:a,commands:u})=>{const{doc:c}=o;if(r.preserveWhitespace!=="full"){const f=sy(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return a&&o.replaceWith(0,c.content.size,f).setMeta("preventUpdate",!n),!0}return a&&o.setMeta("preventUpdate",!n),u.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function U9(t,e){const n=Pi(e,t.schema),{from:r,to:i,empty:o}=t.selection,a=[];o?(t.storedMarks&&a.push(...t.storedMarks),a.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,c=>{a.push(...c.marks)});const u=a.find(c=>c.type.name===n.name);return u?{...u.attrs}:{}}function q9(t,e){const n=new FM(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function MG(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function RG(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function hm(t){return e=>RG(e.$from,t)}function be(t,e,n){return t.config[e]===void 0&&t.parent?be(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?be(t.parent,e,n):null}):t.config[e]}function pm(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=be(e,"addExtensions",n);return r?[e,...pm(r())]:e}).flat(10)}function X3(t,e){const n=aa.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function G9(t){return typeof t=="function"}function We(t,e=void 0,...n){return G9(t)?e?t.bind(e)(...n):t(...n):t}function PG(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Dl(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function W9(t){const e=[],{nodeExtensions:n,markExtensions:r}=Dl(t),i=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},a=n.filter(f=>f.name!=="text").map(f=>f.name),u=r.map(f=>f.name),c=[...a,...u];return t.forEach(f=>{const h={name:f.name,options:f.options,storage:f.storage,extensions:i},m=be(f,"addGlobalAttributes",h);if(!m)return;m().forEach(b=>{let v;Array.isArray(b.types)?v=b.types:b.types==="*"?v=c:b.types==="nodes"?v=a:b.types==="marks"?v=u:v=[],v.forEach(C=>{Object.entries(b.attributes).forEach(([E,D])=>{e.push({type:C,name:E,attribute:{...o,...D}})})})})}),i.forEach(f=>{const h={name:f.name,options:f.options,storage:f.storage},m=be(f,"addAttributes",h);if(!m)return;const g=m();Object.entries(g).forEach(([b,v])=>{const C={...o,...v};typeof C?.default=="function"&&(C.default=C.default()),C?.isRequired&&C?.default===void 0&&delete C.default,e.push({type:f.name,name:b,attribute:C})})}),e}function OG(t){const e=[];let n="",r=!1,i=!1,o=0;const a=t.length;for(let u=0;u<a;u+=1){const c=t[u];if(c==="'"&&!i){r=!r,n+=c;continue}if(c==='"'&&!r){i=!i,n+=c;continue}if(!r&&!i){if(c==="("){o+=1,n+=c;continue}if(c===")"&&o>0){o-=1,n+=c;continue}if(c===";"&&o===0){e.push(n),n="";continue}}n+=c}return n&&e.push(n),e}function jD(t){const e=[],n=OG(t||""),r=n.length;for(let i=0;i<r;i+=1){const o=n[i],a=o.indexOf(":");if(a===-1)continue;const u=o.slice(0,a).trim(),c=o.slice(a+1).trim();u&&c&&e.push([u,c])}return e}function zt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const u=o?String(o).split(" "):[],c=r[i]?r[i].split(" "):[],f=u.filter(h=>!c.includes(h));r[i]=[...c,...f].join(" ")}else if(i==="style"){const u=new Map([...jD(r[i]),...jD(o)]);r[i]=Array.from(u.entries()).map(([c,f])=>`${c}: ${f}`).join("; ")}else r[i]=o}),r},{})}function Fc(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>zt(n,r),{})}function NG(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function HD(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((o,a)=>{const u=a.attribute.parseHTML?a.attribute.parseHTML(n):NG(n.getAttribute(a.name));return u==null?o:{...o,[a.name]:u}},{});return{...r,...i}}}}function VD(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&PG(n)?!1:n!=null))}function UD(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function Q9(t,e){var n;const r=W9(t),{nodeExtensions:i,markExtensions:o}=Dl(t),a=(n=i.find(f=>be(f,"topNode")))==null?void 0:n.name,u=Object.fromEntries(i.map(f=>{const h=r.filter(D=>D.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},g=t.reduce((D,w)=>{const $=be(w,"extendNodeSchema",m);return{...D,...$?$(f):{}}},{}),b=VD({...g,content:We(be(f,"content",m)),marks:We(be(f,"marks",m)),group:We(be(f,"group",m)),inline:We(be(f,"inline",m)),atom:We(be(f,"atom",m)),selectable:We(be(f,"selectable",m)),draggable:We(be(f,"draggable",m)),code:We(be(f,"code",m)),whitespace:We(be(f,"whitespace",m)),linebreakReplacement:We(be(f,"linebreakReplacement",m)),defining:We(be(f,"defining",m)),isolating:We(be(f,"isolating",m)),attrs:Object.fromEntries(h.map(UD))}),v=We(be(f,"parseHTML",m));v&&(b.parseDOM=v.map(D=>HD(D,h)));const C=be(f,"renderHTML",m);C&&(b.toDOM=D=>C({node:D,HTMLAttributes:Fc(D,h)}));const E=be(f,"renderText",m);return E&&(b.toText=E),[f.name,b]})),c=Object.fromEntries(o.map(f=>{const h=r.filter(E=>E.type===f.name),m={name:f.name,options:f.options,storage:f.storage,editor:e},g=t.reduce((E,D)=>{const w=be(D,"extendMarkSchema",m);return{...E,...w?w(f):{}}},{}),b=VD({...g,inclusive:We(be(f,"inclusive",m)),excludes:We(be(f,"excludes",m)),group:We(be(f,"group",m)),spanning:We(be(f,"spanning",m)),code:We(be(f,"code",m)),attrs:Object.fromEntries(h.map(UD))}),v=We(be(f,"parseHTML",m));v&&(b.parseDOM=v.map(E=>HD(E,h)));const C=be(f,"renderHTML",m);return C&&(b.toDOM=E=>C({mark:E,HTMLAttributes:Fc(E,h)})),[f.name,b]}));return new DM({topNode:a,nodes:u,marks:c})}function LG(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function fl(t){return t.sort((n,r)=>{const i=be(n,"priority")||100,o=be(r,"priority")||100;return i>o?-1:i<o?1:0})}function J3(t){const e=fl(pm(t)),n=LG(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function Y9(t,e){const n=J3(t);return Q9(n,e)}function zG(t,e){const n=Y9(e),r=Wu(t);return Si.fromSchema(n).parse(r).toJSON()}function X9(t,e,n){const{from:r,to:i}=e,{blockSeparator:o=`
|
|
31
|
+
|
|
32
|
+
`,textSerializers:a={}}=n||{};let u="";return t.nodesBetween(r,i,(c,f,h,m)=>{var g;c.isBlock&&f>r&&(u+=o);const b=a?.[c.type.name];if(b)return h&&(u+=b({node:c,pos:f,parent:h,index:m,range:e})),!1;c.isText&&(u+=(g=c?.text)==null?void 0:g.slice(Math.max(r,f)-f,i-f))}),u}function IG(t,e){const n={from:0,to:t.content.size};return X9(t,n,e)}function J9(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function FG(t,e){const n=Mt(e,t.schema),{from:r,to:i}=t.selection,o=[];t.doc.nodesBetween(r,i,u=>{o.push(u)});const a=o.reverse().find(u=>u.type.name===n.name);return a?{...a.attrs}:{}}function Z9(t,e){const n=fm(typeof e=="string"?e:e.name,t.schema);return n==="node"?FG(t,e):n==="mark"?U9(t,e):{}}function KG(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function _G(t){const e=KG(t);return e.length===1?e:e.filter((n,r)=>!e.filter((o,a)=>a!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Z3(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,o)=>{const a=[];if(i.ranges.length)i.forEach((u,c)=>{a.push({from:u,to:c})});else{const{from:u,to:c}=n[o];if(u===void 0||c===void 0)return;a.push({from:u,to:c})}a.forEach(({from:u,to:c})=>{const f=e.slice(o).map(u,-1),h=e.slice(o).map(c),m=e.invert().map(f,-1),g=e.invert().map(h);r.push({oldRange:{from:m,to:g},newRange:{from:f,to:h}})})}),_G(r)}function e1(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const o=n.resolve(t),a=Y3(o,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(t,e,(i,o)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(a=>({from:o,to:o+i.nodeSize,mark:a})))}),r}var jG=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let o=r,a=null;for(;o>0&&a===null;){const u=i.node(o);u?.type.name===e?a=u:o-=1}return[a,o]};function Nu(t,e){return e.nodes[t]||e.marks[t]||null}function hh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(o=>o.type===e&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}var HG=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,o,a,u)=>{var c,f;const h=((f=(c=i.type.spec).toText)==null?void 0:f.call(c,{node:i,pos:o,parent:a,index:u}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?h:h.slice(0,Math.max(0,r-o))}),n};function ay(t,e,n={}){const{empty:r,ranges:i}=t.selection,o=e?Pi(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(m=>o?o.name===m.type.name:!0).find(m=>Zh(m.attrs,n,{strict:!1}));let a=0;const u=[];if(i.forEach(({$from:m,$to:g})=>{const b=m.pos,v=g.pos;t.doc.nodesBetween(b,v,(C,E)=>{if(o&&C.inlineContent&&!C.type.allowsMarkType(o))return!1;if(!C.isText&&!C.marks.length)return;const D=Math.max(b,E),w=Math.min(v,E+C.nodeSize),$=w-D;a+=$,u.push(...C.marks.map(T=>({mark:T,from:D,to:w})))})}),a===0)return!1;const c=u.filter(m=>o?o.name===m.mark.type.name:!0).filter(m=>Zh(m.mark.attrs,n,{strict:!1})).reduce((m,g)=>m+g.to-g.from,0),f=u.filter(m=>o?m.mark.type!==o&&m.mark.type.excludes(o):!0).reduce((m,g)=>m+g.to-g.from,0);return(c>0?c+f:c)>=a}function VG(t,e,n={}){if(!e)return zo(t,null,n)||ay(t,null,n);const r=fm(e,t.schema);return r==="node"?zo(t,e,n):r==="mark"?ay(t,e,n):!1}var UG=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const o=hm(u=>u.type.name===e)(t.selection);if(!o)return!1;const a=t.doc.resolve(o.pos+1);return i.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},qG=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function qD(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function zb(t,e){const{nodeExtensions:n}=Dl(e),r=n.find(a=>a.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=We(be(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function nd(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(o=>{i!==!1&&(nd(o,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function e7(t){return t instanceof xe}var t7=class n7{constructor(e){this.position=e}static fromJSON(e){return new n7(e.position)}toJSON(){return{position:this.position}}};function GG(t,e){const n=e.mapping.mapResult(t.position);return{position:new t7(n.pos),mapResult:n}}function WG(t){return new t7(t)}function QG(t,e,n){var r;const{selection:i}=e;let o=null;if(K9(i)&&(o=i.$cursor),o){const u=(r=t.storedMarks)!=null?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(u)||!u.some(f=>f.type.excludes(n)))}const{ranges:a}=i;return a.some(({$from:u,$to:c})=>{let f=u.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(u.pos,c.pos,(h,m,g)=>{if(f)return!1;if(h.isInline){const b=!g||g.type.allowsMarkType(n),v=!!n.isInSet(h.marks)||!h.marks.some(C=>C.type.excludes(n));f=b&&v}return!f}),f})}var YG=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:a,ranges:u}=o,c=Pi(t,r.schema);if(i)if(a){const f=U9(r,c);n.addStoredMark(c.create({...f,...e}))}else u.forEach(f=>{const h=f.$from.pos,m=f.$to.pos;r.doc.nodesBetween(h,m,(g,b)=>{const v=Math.max(b,h),C=Math.min(b+g.nodeSize,m);g.marks.find(D=>D.type===c)?g.marks.forEach(D=>{c===D.type&&n.addMark(v,C,c.create({...D.attrs,...e}))}):n.addMark(v,C,c.create(e))})});return QG(r,n,c)},XG=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),JG=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const o=Mt(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),o.isTextblock?i().command(({commands:u})=>aD(o,{...a,...e})(n)?!0:u.clearNodes()).command(({state:u})=>aD(o,{...a,...e})(u,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ZG=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=Os(t,0,r.content.size),o=xe.create(r,i);e.setSelection(o)}return!0},eW=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=r;let a,u;return typeof e=="number"?(a=e,u=e):e&&"from"in e&&"to"in e?(a=e.from,u=e.to):(a=o.from,u=o.to),i&&n.doc.nodesBetween(a,u,(c,f)=>{c.isText||n.setNodeMarkup(f,void 0,{...c.attrs,dir:t})}),!0},tW=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:o}=typeof t=="number"?{from:t,to:t}:t,a=ke.atStart(r).from,u=ke.atEnd(r).to,c=Os(i,a,u),f=Os(o,a,u),h=ke.create(r,c,f);e.setSelection(h)}return!0},nW=t=>({state:e,dispatch:n})=>{const r=Mt(t,e.schema);return GV(r)(e,n)};function GD(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e?.includes(i.type.name));t.tr.ensureMarks(r)}}var rW=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:a}=e,{$from:u,$to:c}=o,f=i.extensionManager.attributes,h=hh(f,u.node().type.name,u.node().attrs);if(o instanceof xe&&o.node.isBlock)return!u.parentOffset||!$i(a,u.pos)?!1:(r&&(t&&GD(n,i.extensionManager.splittableMarks),e.split(u.pos).scrollIntoView()),!0);if(!u.parent.isBlock)return!1;const m=c.parentOffset===c.parent.content.size,g=u.depth===0?void 0:H9(u.node(-1).contentMatchAt(u.indexAfter(-1)));let b=m&&g?[{type:g,attrs:h}]:void 0,v=$i(e.doc,e.mapping.map(u.pos),1,b);if(!b&&!v&&$i(e.doc,e.mapping.map(u.pos),1,g?[{type:g}]:void 0)&&(v=!0,b=g?[{type:g,attrs:h}]:void 0),r){if(v&&(o instanceof ke&&e.deleteSelection(),e.split(e.mapping.map(u.pos),1,b),g&&!m&&!u.parentOffset&&u.parent.type!==g)){const C=e.mapping.map(u.before()),E=e.doc.resolve(C);u.node(-1).canReplaceWith(E.index(),E.index()+1,g)&&e.setNodeMarkup(e.mapping.map(u.before()),g)}t&&GD(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return v},iW=(t,e={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var a;const u=Mt(t,r.schema),{$from:c,$to:f}=r.selection,h=r.selection.node;if(h&&h.isBlock||c.depth<2||!c.sameParent(f))return!1;const m=c.node(-1);if(m.type!==u)return!1;const g=o.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==u||c.index(-2)!==c.node(-2).childCount-1)return!1;if(i){let D=ae.empty;const w=c.index(-1)?1:c.index(-2)?2:3;for(let P=c.depth-w;P>=c.depth-3;P-=1)D=ae.from(c.node(P).copy(D));const $=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,T={...hh(g,c.node().type.name,c.node().attrs),...e},A=((a=u.contentMatch.defaultType)==null?void 0:a.createAndFill(T))||void 0;D=D.append(ae.from(u.createAndFill(null,A)||void 0));const O=c.before(c.depth-(w-1));n.replace(O,c.after(-$),new he(D,4-w,0));let M=-1;n.doc.nodesBetween(O,n.doc.content.size,(P,I)=>{if(M>-1)return!1;P.isTextblock&&P.content.size===0&&(M=I+1)}),M>-1&&n.setSelection(ke.near(n.doc.resolve(M))),n.scrollIntoView()}return!0}const b=f.pos===c.end()?m.contentMatchAt(0).defaultType:null,v={...hh(g,m.type.name,m.attrs),...e},C={...hh(g,c.node().type.name,c.node().attrs),...e};n.delete(c.pos,f.pos);const E=b?[{type:u,attrs:v},{type:b,attrs:C}]:[{type:u,attrs:v}];if(!$i(n.doc,c.pos,2))return!1;if(i){const{selection:D,storedMarks:w}=r,{splittableMarks:$}=o.extensionManager,T=w||D.$to.parentOffset&&D.$from.marks();if(n.split(c.pos,2,E).scrollIntoView(),!T||!i)return!0;const A=T.filter(O=>$.includes(O.type.name));n.ensureMarks(A)}return!0};function WD(t){return!t||t==="1"?null:t}function r7(t,e){return WD(t)===WD(e)}var Ib=(t,e)=>{const n=hm(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return!(n.node.type===i?.type&&Go(t.doc,n.pos))||!r7(n.node.attrs.type,i?.attrs.type)||t.join(n.pos),!0},Fb=(t,e)=>{const n=hm(a=>a.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return!(n.node.type===i?.type&&Go(t.doc,r))||!r7(n.node.attrs.type,i?.attrs.type)||t.join(r),!0};function oW(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),i=e.resolve(n.nodeSize-1);return ke.between(r,i)}var sW=(t,e,n,r={})=>({editor:i,tr:o,state:a,dispatch:u,chain:c,commands:f,can:h})=>{const{extensions:m,splittableMarks:g}=i.extensionManager,b=Mt(t,a.schema),v=Mt(e,a.schema),{selection:C,storedMarks:E}=a,{$from:D,$to:w}=C,$=D.blockRange(w),T=E||C.$to.parentOffset&&C.$from.marks();if(!$)return!1;const A=hm(ie=>zb(ie.type.name,m))(C),O=C.from===0&&C.to===a.doc.content.size,M=a.doc.content.content,P=M.length===1?M[0]:null,I=O&&P&&zb(P.type.name,m)?{node:P,pos:0}:null,G=A??I,J=!!A&&$.depth>=1&&$.depth-A.depth<=1,U=!!I;if((J||U)&&G){if(G.node.type===b)return O&&U?c().command(({tr:ie,dispatch:F})=>{const te=oW(ie);return te?(ie.setSelection(te),F&&F(ie),!0):!1}).liftListItem(v).run():f.liftListItem(v);if(zb(G.node.type.name,m)&&b.validContent(G.node.content))return c().command(()=>(o.setNodeMarkup(G.pos,b),!0)).command(()=>Ib(o,b)).command(()=>Fb(o,b)).run()}return!n||!T||!u?c().command(()=>h().wrapInList(b,r)?!0:f.clearNodes()).wrapInList(b,r).command(()=>Ib(o,b)).command(()=>Fb(o,b)).run():c().command(()=>{const ie=h().wrapInList(b,r),F=T.filter(te=>g.includes(te.type.name));return o.ensureMarks(F),ie?!0:f.clearNodes()}).wrapInList(b,r).command(()=>Ib(o,b)).command(()=>Fb(o,b)).run()},aW=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,a=Pi(t,r.schema);return ay(r,a,e)?i.unsetMark(a,{extendEmptyMarkRange:o}):i.setMark(a,e)},lW=(t,e,n={})=>({state:r,commands:i})=>{const o=Mt(t,r.schema),a=Mt(e,r.schema),u=zo(r,o,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),u?i.setNode(a,c):i.setNode(o,{...c,...n})},uW=(t,e={})=>({state:n,commands:r})=>{const i=Mt(t,n.schema);return zo(n,i,e)?r.lift(i):r.wrapIn(i,e)},cW=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(t))){if(e){const a=t.tr,u=o.transform;for(let c=u.steps.length-1;c>=0;c-=1)a.step(u.steps[c].invert(u.docs[c]));if(o.text){const c=a.doc.resolve(o.from).marks();a.replaceWith(o.from,o.to,t.schema.text(o.text,c))}else a.delete(o.from,o.to)}return!0}}return!1},dW=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{ignoreClearable:i=!1}=t,{selection:o}=e,{empty:a,ranges:u}=o;if(a)return!0;const{nonClearableMarks:c}=r.extensionManager;if(n){const f=Object.values(r.schema.marks).filter(h=>i||!c.includes(h.name));u.forEach(h=>{for(const m of f)e.removeMark(h.$from.pos,h.$to.pos,m)})}return!0},fW=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:a=!1}=e,{selection:u}=n,c=Pi(t,r.schema),{$from:f,empty:h,ranges:m}=u;if(!i)return!0;if(h&&a){let{from:g,to:b}=u;const v=(o=f.marks().find(E=>E.type===c))==null?void 0:o.attrs,C=Y3(f,c,v);C&&(g=C.from,b=C.to),n.removeMark(g,b,c)}else m.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},hW=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let o,a;return typeof t=="number"?(o=t,a=t):t&&"from"in t&&"to"in t?(o=t.from,a=t.to):(o=i.from,a=i.to),r&&e.doc.nodesBetween(o,a,(u,c)=>{if(u.isText)return;const f={...u.attrs};delete f.dir,e.setNodeMarkup(c,void 0,f)}),!0},pW=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let o=null,a=null;const u=fm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(o=Mt(t,r.schema)),u==="mark"&&(a=Pi(t,r.schema));let c=!1;return n.selection.ranges.forEach(f=>{const h=f.$from.pos,m=f.$to.pos;let g,b,v,C;n.selection.empty?r.doc.nodesBetween(h,m,(E,D)=>{o&&o===E.type&&(c=!0,v=Math.max(D,h),C=Math.min(D+E.nodeSize,m),g=D,b=E)}):r.doc.nodesBetween(h,m,(E,D)=>{D<h&&o&&o===E.type&&(c=!0,v=Math.max(D,h),C=Math.min(D+E.nodeSize,m),g=D,b=E),D>=h&&D<=m&&(o&&o===E.type&&(c=!0,i&&n.setNodeMarkup(D,void 0,{...E.attrs,...e})),a&&E.marks.length&&E.marks.forEach(w=>{if(a===w.type&&(c=!0,i)){const $=Math.max(D,h),T=Math.min(D+E.nodeSize,m);n.addMark($,T,a.create({...w.attrs,...e}))}}))}),b&&(g!==void 0&&i&&n.setNodeMarkup(g,void 0,{...b.attrs,...e}),a&&b.marks.length&&b.marks.forEach(E=>{a===E.type&&i&&n.addMark(v,C,a.create({...E.attrs,...e}))}))}),c},mW=(t,e={})=>({state:n,dispatch:r})=>{const i=Mt(t,n.schema);return KV(i,e)(n,r)},gW=(t,e={})=>({state:n,dispatch:r})=>{const i=Mt(t,n.schema);return _V(i,e)(n,r)},bW=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}};function kl(t,e){if(t===e)return!0;if(!t||!e)return!1;const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>Object.prototype.hasOwnProperty.call(e,i)&&Object.is(t[i],e[i]))}function yW(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof xe){const o=r.index();return r.parent.canReplaceWith(o,o+1,e)}let i=r.depth;for(;i>=0;){const o=r.index(i);if(r.node(i).contentMatchAt(o).matchType(e))return!0;i-=1}return!1}function vW(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}function QD(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&/g,"&")}function xW(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function CW(t){return typeof t=="number"}function EW(t){return Object.prototype.toString.call(t).slice(8,-1)}function Vf(t){return EW(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}var DW={};W3(DW,{createAtomBlockMarkdownSpec:()=>kW,createBlockMarkdownSpec:()=>SW,createInlineMarkdownSpec:()=>TW,parseAttributes:()=>t1,parseIndentedBlocks:()=>ly,renderNestedMarkdownContent:()=>r1,serializeAttributes:()=>n1});function t1(t){if(!t?.trim())return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,f=>(n.push(f),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([\w-]+)/g);if(i){const f=i.map(h=>h.trim().slice(1));e.class=f.join(" ")}const o=r.match(/(?:^|\s)#([\w-]+)/);o&&(e.id=o[1]);const a=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(a)).forEach(([,f,h])=>{var m;const g=parseInt(((m=h.match(/__QUOTED_(\d+)__/))==null?void 0:m[1])||"0",10),b=n[g];b&&(e[f]=b.slice(1,-1))});const c=r.replace(/(?:^|\s)\.([\w-]+)/g,"").replace(/(?:^|\s)#([\w-]+)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return c&&c.split(/\s+/).filter(Boolean).forEach(h=>{h.match(/^[a-zA-Z][\w-]*$/)&&(e[h]=!0)}),e}function n1(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function kW(t){const{nodeName:e,name:n,parseAttributes:r=t1,serializeAttributes:i=n1,defaultAttributes:o={},requiredAttributes:a=[],allowedAttributes:u}=t,c=n||e,f=h=>{if(!u)return h;const m={};return u.forEach(g=>{g in h&&(m[g]=h[g])}),m};return{parseMarkdown:(h,m)=>{const g={...o,...h.attributes};return m.createNode(e,g,[])},markdownTokenizer:{name:e,level:"block",start(h){var m;const g=new RegExp(`^:::${c}(?:\\s|$)`,"m"),b=(m=h.match(g))==null?void 0:m.index;return b!==void 0?b:-1},tokenize(h,m,g){const b=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),v=h.match(b);if(!v)return;const C=v[1]||"",E=r(C);if(!a.find(w=>!(w in E)))return{type:e,raw:v[0],attributes:E}}},renderMarkdown:h=>{const m=f(h.attrs||{}),g=i(m),b=g?` {${g}}`:"";return`:::${c}${b} :::`}}}function SW(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=t1,serializeAttributes:o=n1,defaultAttributes:a={},content:u="block",allowedAttributes:c}=t,f=n||e,h=m=>{if(!c)return m;const g={};return c.forEach(b=>{b in m&&(g[b]=m[b])}),g};return{parseMarkdown:(m,g)=>{let b;if(r){const C=r(m);b=typeof C=="string"?[{type:"text",text:C}]:C}else u==="block"?b=g.parseChildren(m.tokens||[]):b=g.parseInline(m.tokens||[]);const v={...a,...m.attributes};return g.createNode(e,v,b)},markdownTokenizer:{name:e,level:"block",start(m){var g;const b=new RegExp(`^:::${f}`,"m"),v=(g=m.match(b))==null?void 0:g.index;return v!==void 0?v:-1},tokenize(m,g,b){var v;const C=new RegExp(`^:::${f}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),E=m.match(C);if(!E)return;const[D,w=""]=E,$=i(w);let T=1;const A=D.length;let O="";const M=/^:::([\w-]*)(\s.*)?/gm,P=m.slice(A);for(M.lastIndex=0;;){const I=M.exec(P);if(I===null)break;const G=I.index,J=I[1];if(!((v=I[2])!=null&&v.endsWith(":::"))){if(J)T+=1;else if(T-=1,T===0){const U=P.slice(0,G);O=U.trim();const ie=m.slice(0,A+G+I[0].length);let F=[];if(O)if(u==="block")for(F=b.blockTokens(U),F.forEach(te=>{te.text&&(!te.tokens||te.tokens.length===0)&&(te.tokens=b.inlineTokens(te.text))});F.length>0;){const te=F[F.length-1];if(te.type==="paragraph"&&(!te.text||te.text.trim()===""))F.pop();else break}else F=b.inlineTokens(O);return{type:e,raw:ie,attributes:$,content:O,tokens:F}}}}}},renderMarkdown:(m,g)=>{const b=h(m.attrs||{}),v=o(b),C=v?` {${v}}`:"",E=g.renderChildren(m.content||[],`
|
|
33
|
+
|
|
34
|
+
`);return`:::${f}${C}
|
|
35
|
+
|
|
36
|
+
${E}
|
|
37
|
+
|
|
38
|
+
:::`}}}function $W(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,o,a]=r;e[i]=o||a,r=n.exec(t)}return e}function wW(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function TW(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=$W,serializeAttributes:o=wW,defaultAttributes:a={},selfClosing:u=!1,allowedAttributes:c}=t,f=n||e,h=g=>{if(!c)return g;const b={};return c.forEach(v=>{const C=typeof v=="string"?v:v.name,E=typeof v=="string"?void 0:v.skipIfDefault;if(C in g){const D=g[C];if(E!==void 0&&D===E)return;b[C]=D}}),b},m=f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(g,b)=>{const v={...a,...g.attributes};if(u)return b.createNode(e,v);const C=r?r(g):g.content||"";return C?b.createNode(e,v,[b.createTextNode(C)]):b.createNode(e,v,[])},markdownTokenizer:{name:e,level:"inline",start(g){const b=u?new RegExp(`\\[${m}\\s*[^\\]]*\\]`):new RegExp(`\\[${m}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${m}\\]`),v=g.match(b),C=v?.index;return C!==void 0?C:-1},tokenize(g,b,v){const C=u?new RegExp(`^\\[${m}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${m}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${m}\\]`),E=g.match(C);if(!E)return;let D="",w="";if(u){const[,T]=E;w=T}else{const[,T,A]=E;w=T,D=A||""}const $=i(w.trim());return{type:e,raw:E[0],content:D.trim(),attributes:$}}},renderMarkdown:g=>{let b="";r?b=r(g):g.content&&g.content.length>0&&(b=g.content.filter(D=>D.type==="text").map(D=>D.text).join(""));const v=h(g.attrs||{}),C=o(v),E=C?` ${C}`:"";return u?`[${f}${E}]`:`[${f}${E}]${b}[/${f}]`}}}function ly(t,e,n){var r,i,o,a;const u=t.split(`
|
|
39
|
+
`),c=[];let f="",h=0;const m=e.baseIndentSize||2;for(;h<u.length;){const g=u[h],b=g.match(e.itemPattern);if(!b){if(c.length>0)break;if(g.trim()===""){h+=1,f=`${f}${g}
|
|
40
|
+
`;continue}else return}const v=e.extractItemData(b),{indentLevel:C,mainContent:E}=v;f=`${f}${g}
|
|
41
|
+
`;const D=[E];for(h+=1;h<u.length;){const A=u[h];if(A.trim()===""){const M=u.slice(h+1).findIndex(G=>G.trim()!=="");if(M===-1)break;if((((i=(r=u[h+1+M].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>C){D.push(A),f=`${f}${A}
|
|
42
|
+
`,h+=1;continue}else break}if((((a=(o=A.match(/^(\s*)/))==null?void 0:o[1])==null?void 0:a.length)||0)>C)D.push(A),f=`${f}${A}
|
|
43
|
+
`,h+=1;else break}let w;const $=D.slice(1);if($.length>0){const A=$.map(O=>O.slice(C+m)).join(`
|
|
44
|
+
`);A.trim()&&(e.customNestedParser?w=e.customNestedParser(A):w=n.blockTokens(A))}const T=e.createToken(v,w);c.push(T)}if(c.length!==0)return{items:c,raw:f}}function r1(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[o,...a]=t.content,u=e.renderChildren([o]);let c=`${i}${u}`;return a&&a.length>0&&a.forEach((f,h)=>{var m,g;const b=(g=(m=e.renderChild)==null?void 0:m.call(e,f,h+1))!=null?g:e.renderChildren([f]);if(b!=null){const v=b.split(`
|
|
45
|
+
`).map(C=>C?e.indent(C):e.indent("")).join(`
|
|
46
|
+
`);c+=f.type==="paragraph"?`
|
|
47
|
+
|
|
48
|
+
${v}`:`
|
|
49
|
+
${v}`}}),c}function YD(t){return typeof t.type=="string"?t.type:t.type.name}function AW(t,e){if(t.length!==e.length)return!1;const n=Array.from({length:e.length},()=>!1);return t.every(r=>{const i=YD(r),o=e.findIndex((a,u)=>!n[u]&&i===YD(a)&&kl(r.attrs,a.attrs));return o===-1?!1:(n[o]=!0,!0)})}function i7(t,e){const n={...t};return Vf(t)&&Vf(e)&&Object.keys(e).forEach(r=>{Vf(e[r])&&Vf(t[r])?n[r]=i7(t[r],e[r]):n[r]=e[r]}),n}function BW(t,e,n={}){const{state:r}=e,{doc:i,tr:o}=r,a=t;i.descendants((u,c)=>{const f=o.mapping.map(c),h=o.mapping.map(c)+u.nodeSize;let m=null;if(u.marks.forEach(b=>{if(b!==a)return!1;m=b}),!m)return;let g=!1;if(Object.keys(n).forEach(b=>{n[b]!==m.attrs[b]&&(g=!0)}),g){const b=t.type.create({...t.attrs,...n});o.removeMark(f,h,t.type),o.addMark(f,h,b)}}),o.docChanged&&e.view.dispatch(o)}var rd=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},MW=(t,e)=>{if(Q3(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Uf(t){var e;const{editor:n,from:r,to:i,text:o,rules:a,plugin:u}=t,{view:c}=n;if(c.composing)return!1;const f=c.state.doc.resolve(r);if(f.parent.type.spec.code||(e=f.nodeBefore||f.nodeAfter)!=null&&e.marks.find(g=>g.type.spec.code))return!1;let h=!1;const m=HG(f)+o;return a.forEach(g=>{if(h)return;const b=MW(m,g.find);if(!b)return;const v=b[0].length-o.length;if(v>0){const O=f.parentOffset-v;if(O<0||f.parent.textBetween(O,f.parentOffset)!==b[0].slice(0,v))return}const C=c.state.tr,E=cm({state:c.state,transaction:C}),D={from:r-(b[0].length-o.length),to:i},{commands:w,chain:$,can:T}=new dm({editor:n,state:E});g.handler({state:E,range:D,match:b,commands:w,chain:$,can:T})===null||!C.steps.length||(g.undoable&&C.setMeta(u,{transform:C,from:r,to:i,text:o}),c.dispatch(C),h=!0)}),h}function RW(t){const{editor:e,rules:n}=t,r=new ht({state:{init(){return null},apply(i,o,a){const u=i.getMeta(r);if(u)return u;const c=i.getMeta("applyInputRules");return c&&setTimeout(()=>{let{text:h}=c;typeof h=="string"?h=h:h=X3(ae.from(h),a.schema);const{from:m}=c,g=m+h.length;Uf({editor:e,from:m,to:g,text:h,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,a,u){return Uf({editor:e,from:o,to:a,text:u,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Uf({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:a}=i.state.selection;return a?Uf({editor:e,from:a.pos,to:a.pos,text:`
|
|
50
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var i1=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...We(be(this,"addOptions",{name:this.name}))}}get storage(){return{...We(be(this,"addStorage",{name:this.name,options:this.options}))}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>i7(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},la=class o7 extends i1{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new o7(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(f=>f?.type.name===n.name))return!1;const c=a.find(f=>f?.type.name===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},s7=class{constructor(t){this.find=t.find,this.handler=t.handler}},PW=(t,e,n)=>{if(Q3(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=t,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function OW(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:u}=t,{commands:c,chain:f,can:h}=new dm({editor:e,state:n}),m=[];return n.doc.nodesBetween(r,i,(b,v)=>{var C,E,D,w,$;if((E=(C=b.type)==null?void 0:C.spec)!=null&&E.code||!(b.isText||b.isTextblock||b.isInline))return;const T=($=(w=(D=b.content)==null?void 0:D.size)!=null?w:b.nodeSize)!=null?$:0,A=Math.max(r,v),O=Math.min(i,v+T);if(A>=O)return;const M=b.isText?b.text||"":b.textBetween(A-v,O-v,void 0,"");PW(M,o.find,a).forEach(I=>{if(I.index===void 0)return;const G=A+I.index+1,J=G+I[0].length,U={from:n.tr.mapping.map(G),to:n.tr.mapping.map(J)},ie=o.handler({state:n,range:U,match:I,commands:c,chain:f,can:h,pasteEvent:a,dropEvent:u});m.push(ie)})}),m.every(b=>b!==null)}var qf=null,NW=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function LW(t){const{editor:e,rules:n}=t;let r=null,i=!1,o=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,u;try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}const c=({state:h,from:m,to:g,rule:b,pasteEvt:v})=>{const C=h.tr,E=cm({state:h,transaction:C});if(!(!OW({editor:e,state:E,from:Math.max(m-1,0),to:g.b-1,rule:b,pasteEvent:v,dropEvent:u})||!C.steps.length)){try{u=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{u=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,C}};return n.map(h=>new ht({view(m){const g=v=>{var C;r=(C=m.dom.parentElement)!=null&&C.contains(v.target)?m.dom.parentElement:null,r&&(qf=e)},b=()=>{qf&&(qf=null)};return window.addEventListener("dragstart",g),window.addEventListener("dragend",b),{destroy(){window.removeEventListener("dragstart",g),window.removeEventListener("dragend",b)}}},props:{handleDOMEvents:{drop:(m,g)=>{if(o=r===m.dom.parentElement,u=g,!o){const b=qf;b?.isEditable&&setTimeout(()=>{const v=b.state.selection;v&&b.commands.deleteRange({from:v.from,to:v.to})},10)}return!1},paste:(m,g)=>{var b;const v=(b=g.clipboardData)==null?void 0:b.getData("text/html");return a=g,i=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(m,g,b)=>{const v=m[0],C=v.getMeta("uiEvent")==="paste"&&!i,E=v.getMeta("uiEvent")==="drop"&&!o,D=v.getMeta("applyPasteRules"),w=!!D;if(!C&&!E&&!w)return;if(w){let{text:A}=D;typeof A=="string"?A=A:A=X3(ae.from(A),b.schema);const{from:O}=D,M=O+A.length,P=NW(A);return c({rule:h,state:b,from:O,to:{b:M},pasteEvt:P})}const $=g.doc.content.findDiffStart(b.doc.content),T=g.doc.content.findDiffEnd(b.doc.content);if(!(!CW($)||!T||$===T.b))return c({rule:h,state:b,from:$,to:T,pasteEvt:a})}}))}var mm=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=J3(t),this.schema=Q9(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Nu(e.name,this.schema)},r=be(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return fl([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:Nu(r.name,this.schema)},o=[],a=be(r,"addKeyboardShortcuts",i);let u={};if(r.type==="mark"&&be(r,"exitable",i)&&(u.ArrowRight=()=>la.handleExit({editor:t,mark:r})),a){const g=Object.fromEntries(Object.entries(a()).map(([b,v])=>[b,()=>v({editor:t})]));u={...u,...g}}const c=zq(u);o.push(c);const f=be(r,"addInputRules",i);if(qD(r,t.options.enableInputRules)&&f){const g=f();if(g&&g.length){const b=RW({editor:t,rules:g}),v=Array.isArray(b)?b:[b];o.push(...v)}}const h=be(r,"addPasteRules",i);if(qD(r,t.options.enablePasteRules)&&h){const g=h();if(g&&g.length){const b=LW({editor:t,rules:g});o.push(...b)}}const m=be(r,"addProseMirrorPlugins",i);if(m){const g=m();o.push(...g)}return o})}get attributes(){return W9(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Dl(this.extensions);return Object.fromEntries(e.filter(n=>!!be(n,"addNodeView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Mt(n.name,this.schema)},o=be(n,"addNodeView",i);if(!o)return[];const a=o();if(!a)return[];const u=(c,f,h,m,g)=>{const b=Fc(c,r);return a({node:c,view:f,getPos:h,decorations:m,innerDecorations:g,editor:t,extension:n,HTMLAttributes:b})};return[n.name,u]}))}dispatchTransaction(t){const{editor:e}=this;return fl([...this.extensions].reverse()).reduceRight((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Nu(i.name,this.schema)},a=be(i,"dispatchTransaction",o);return a?u=>{a.call(o,{transaction:u,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return fl([...this.extensions]).reduce((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:Nu(i.name,this.schema)},a=be(i,"transformPastedHTML",o);return a?(u,c)=>{const f=r(u,c);return a.call(o,f)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Dl(this.extensions);return Object.fromEntries(e.filter(n=>!!be(n,"addMarkView")).map(n=>{const r=this.attributes.filter(u=>u.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Pi(n.name,this.schema)},o=be(n,"addMarkView",i);if(!o)return[];const a=(u,c,f)=>{const h=Fc(u,r);return o()({mark:u,view:c,inline:f,editor:t,extension:n,HTMLAttributes:h,updateAttributes:m=>{BW(u,t,m)}})};return[n.name,a]}))}destroy(){this.extensions.forEach(t=>{let e=t;for(;e.parent;){const n=e.parent;n.child===e&&(n.child=null),e=n}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n,r;const i={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Nu(e.name,this.schema)};e.type==="mark"&&(((n=We(be(e,"keepOnSplit",i)))==null||n)&&this.splittableMarks.push(e.name),(r=We(be(e,"clearable",i)))==null||r||this.nonClearableMarks.push(e.name));const o=be(e,"onBeforeCreate",i),a=be(e,"onCreate",i),u=be(e,"onUpdate",i),c=be(e,"onSelectionUpdate",i),f=be(e,"onTransaction",i),h=be(e,"onFocus",i),m=be(e,"onBlur",i),g=be(e,"onDestroy",i);o&&this.editor.on("beforeCreate",o),a&&this.editor.on("create",a),u&&this.editor.on("update",u),c&&this.editor.on("selectionUpdate",c),f&&this.editor.on("transaction",f),h&&this.editor.on("focus",h),m&&this.editor.on("blur",m),g&&this.editor.on("destroy",g)})}};mm.resolve=J3;mm.sort=fl;mm.flatten=pm;var zW={};W3(zW,{ClipboardTextSerializer:()=>l7,Commands:()=>u7,Delete:()=>c7,Drop:()=>d7,Editable:()=>f7,FocusEvents:()=>p7,Keymap:()=>m7,Paste:()=>g7,Tabindex:()=>b7,TextDirection:()=>y7,focusEventsPluginKey:()=>h7});var pt=class a7 extends i1{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new a7(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},l7=pt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ht({key:new It("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,o=J9(n),{blockSeparator:a}=this.options,u={...a!==void 0?{blockSeparator:a}:{},textSerializers:o};return[...i.ranges].sort((f,h)=>f.$from.pos-h.$from.pos).map(({$from:f,$to:h})=>X9(r,{from:f.pos,to:h.pos},u)).join(a??`
|
|
51
|
+
|
|
52
|
+
`)}}})]}}),u7=pt.create({name:"commands",addCommands(){return{...xr}}}),c7=pt.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const o=()=>{var a,u,c,f;if((f=(c=(u=(a=this.editor.options.coreExtensionOptions)==null?void 0:a.delete)==null?void 0:u.filterTransaction)==null?void 0:c.call(u,t))!=null?f:t.getMeta("y-sync$"))return;const h=q9(t.before,[t,...e]);Z3(h).forEach(b=>{h.mapping.mapResult(b.oldRange.from).deletedAfter&&h.mapping.mapResult(b.oldRange.to).deletedBefore&&h.before.nodesBetween(b.oldRange.from,b.oldRange.to,(v,C)=>{const E=C+v.nodeSize-2,D=b.oldRange.from<=C&&E<=b.oldRange.to;this.editor.emit("delete",{type:"node",node:v,from:C,to:E,newFrom:h.mapping.map(C),newTo:h.mapping.map(E),deletedRange:b.oldRange,newRange:b.newRange,partial:!D,editor:this.editor,transaction:t,combinedTransform:h})})});const g=h.mapping;h.steps.forEach((b,v)=>{var C,E;if(b instanceof $r){const D=g.slice(v).map(b.from,-1),w=g.slice(v).map(b.to),$=g.invert().map(D,-1),T=g.invert().map(w),A=D>0?(C=h.doc.nodeAt(D-1))==null?void 0:C.marks.some(M=>M.eq(b.mark)):!1,O=(E=h.doc.nodeAt(w))==null?void 0:E.marks.some(M=>M.eq(b.mark));this.editor.emit("delete",{type:"mark",mark:b.mark,from:b.from,to:b.to,deletedRange:{from:$,to:T},newRange:{from:D,to:w},partial:!!(O||A),editor:this.editor,transaction:t,combinedTransform:h})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(o,0):o()}}),d7=pt.create({name:"drop",addProseMirrorPlugins(){return[new ht({key:new It("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),f7=pt.create({name:"editable",addProseMirrorPlugins(){return[new ht({key:new It("editable"),props:{editable:()=>this.editor.options.editable}})]}}),h7=new It("focusEvents"),p7=pt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ht({key:h7,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),m7=pt.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:u})=>{const{selection:c,doc:f}=u,{empty:h,$anchor:m}=c,{pos:g,parent:b}=m,v=m.parent.isTextblock&&g>0?u.doc.resolve(g-1):m,C=v.parent.type.spec.isolating,E=m.pos-m.parentOffset,D=C&&v.parent.childCount===1?E===m.pos:Me.atStart(f).from===g;return!h||!b.type.isTextblock||b.textContent.length||!D||D&&m.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ep()||V9()?o:i},addProseMirrorPlugins(){return[new ht({key:new It("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(C=>C.getMeta("composition")))return;const r=t.some(C=>C.docChanged)&&!e.doc.eq(n.doc),i=t.some(C=>C.getMeta("preventClearDocument"));if(!r||i)return;const{empty:o,from:a,to:u}=e.selection,c=Me.atStart(e.doc).from,f=Me.atEnd(e.doc).to;if(o||!(a===c&&u===f)||!nd(n.doc))return;const g=n.tr,b=cm({state:n,transaction:g}),{commands:v}=new dm({editor:this.editor,state:b});if(v.clearNodes(),!!g.steps.length)return g}})]}}),g7=pt.create({name:"paste",addProseMirrorPlugins(){return[new ht({key:new It("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),b7=pt.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new ht({key:new It("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!=null?t:"0"}}}})]}}),y7=pt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Dl(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ht({key:new It("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),IW=class Qu{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Qu(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Qu(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Qu(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,a=n.isInline,u=this.pos+r+(o?0:1);if(u<0||u>this.resolvedPos.doc.nodeSize-2)return;const c=this.resolvedPos.doc.resolve(u);if(!i&&!a&&c.depth<=this.depth)return;const f=new Qu(c,this.editor,i,i||a?n:null);i&&(f.actualDepth=this.depth+1),e.push(f)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const o=i.node.attrs,a=Object.keys(n);for(let u=0;u<a.length;u+=1){const c=a[u];if(o[c]!==n[c])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const o=Object.keys(n);return this.children.forEach(a=>{r&&i.length>0||(a.node.type.name===e&&o.every(c=>n[c]===a.node.attrs[c])&&i.push(a),!(r&&i.length>0)&&(i=i.concat(a.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},FW=`.ProseMirror {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ProseMirror {
|
|
57
|
+
word-wrap: break-word;
|
|
58
|
+
white-space: pre-wrap;
|
|
59
|
+
white-space: break-spaces;
|
|
60
|
+
-webkit-font-variant-ligatures: none;
|
|
61
|
+
font-variant-ligatures: none;
|
|
62
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ProseMirror [contenteditable="false"] {
|
|
66
|
+
white-space: normal;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
70
|
+
white-space: pre-wrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ProseMirror pre {
|
|
74
|
+
white-space: pre-wrap;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
img.ProseMirror-separator {
|
|
78
|
+
display: inline !important;
|
|
79
|
+
border: none !important;
|
|
80
|
+
margin: 0 !important;
|
|
81
|
+
width: 0 !important;
|
|
82
|
+
height: 0 !important;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ProseMirror-gapcursor {
|
|
86
|
+
display: none;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
position: absolute;
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ProseMirror-gapcursor:after {
|
|
93
|
+
content: "";
|
|
94
|
+
display: block;
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: -2px;
|
|
97
|
+
width: 20px;
|
|
98
|
+
border-top: 1px solid black;
|
|
99
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes ProseMirror-cursor-blink {
|
|
103
|
+
to {
|
|
104
|
+
visibility: hidden;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ProseMirror-hideselection *::selection {
|
|
109
|
+
background: transparent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
113
|
+
background: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ProseMirror-hideselection * {
|
|
117
|
+
caret-color: transparent;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
121
|
+
display: block;
|
|
122
|
+
}`,KW=class extends bW{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:GG,createMappablePosition:WG},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),this.on("delete",this.options.onDelete);const e=this.createDoc();if(!this.editorState){const n=oy(e,this.options.autofocus);this.editorState=Ms.create({doc:e,schema:this.schema,selection:n||void 0})}this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t?.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=vW(FW,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=G9(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;n=n.filter(a=>!a.key.startsWith(o))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e,n,r;const o=[...this.options.enableCoreExtensions?[f7,l7.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),u7,p7,m7,b7.configure({value:(r=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:r.value}),d7,g7,c7,y7.configure({direction:this.options.textDirection})].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a?.type));this.extensionManager=new mm(o,this)}createCommandManager(){this.commandManager=new dm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=sy(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;const n=sy(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=Ms.create({doc:n,schema:this.schema,selection:oy(n,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,o=e.transformPastedHTML,a=this.extensionManager.transformPastedHTML(o);this.editorView=new z9(t,{...e,attributes:{role:"textbox",...e?.attributes},dispatchTransaction:i,transformPastedHTML:a,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const u=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(u),this.prependClass(),this.injectCSS();const c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(f=>{var h;return(h=this.capturedTransaction)==null?void 0:h.step(f)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const a=n.findLast(f=>f.getMeta("focus")||f.getMeta("blur")),u=a?.getMeta("focus"),c=a?.getMeta("blur");u&&this.emit("focus",{editor:this,event:u.event,transaction:a}),c&&this.emit("blur",{editor:this,event:c.event,transaction:a}),!(t.getMeta("preventUpdate")||!n.some(f=>f.docChanged)||o.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return Z9(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return VG(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return X3(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
|
|
123
|
+
|
|
124
|
+
`,textSerializers:n={}}=t||{};return IG(this.state.doc,{blockSeparator:e,textSerializers:{...J9(this.schema),...n}})}get isEmpty(){return nd(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new IW(e,this,!1,n)}get $doc(){return this.$pos(0)}};function Zs(t){return new rd({find:t.find,handler:({state:e,range:n,match:r})=>{const i=We(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,a=r[r.length-1],u=r[0];if(a){const c=u.search(/\S/),f=n.from+u.indexOf(a),h=f+a.length;if(e1(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(C=>C===t.type&&C!==b.mark.type)).filter(b=>b.to>f).length)return null;h<n.to&&o.delete(h,n.to),f>n.from&&o.delete(n.from+c,f);const g=n.from+c+a.length;o.addMark(n.from+c,g,t.type.create(i||{})),o.removeStoredMark(t.type)}},undoable:t.undoable})}function _W(t){return new rd({find:t.find,handler:({state:e,range:n,match:r})=>{const i=We(t.getAttributes,void 0,r)||{},{tr:o}=e,a=n.from;let u=n.to;const c=t.type.create(i);if(r[1]){const f=r[0].lastIndexOf(r[1]);let h=a+f;h>u?h=u:u=h+r[1].length;const m=r[0][r[0].length-1];o.insertText(m,a+r[0].length-1),o.replaceWith(h,u,c)}else if(r[0]){const f=t.type.isInline?a:a-1;o.insert(f,t.type.create(i)).delete(o.mapping.map(a),o.mapping.map(u))}o.scrollIntoView()},undoable:t.undoable})}function uy(t){return new rd({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=We(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)},undoable:t.undoable})}function Sl(t){return new rd({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=We(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),f=c&&P3(c,t.type,o);if(!f)return null;if(a.wrap(c,f),t.keepMarks&&t.editor){const{selection:m,storedMarks:g}=e,{splittableMarks:b}=t.editor.extensionManager,v=g||m.$to.parentOffset&&m.$from.marks();if(v){const C=v.filter(E=>b.includes(E.type.name));a.ensureMarks(C)}}if(t.keepAttributes){const m=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(m,o).run()}const h=a.doc.resolve(n.from-1).nodeBefore;h&&h.type===t.type&&Go(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,h))&&a.join(n.from-1)},undoable:t.undoable})}var Qn=class v7 extends i1{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new v7(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Io(t){return new s7({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=We(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:a}=e,u=r[r.length-1],c=r[0];let f=n.to;if(u){const h=c.search(/\S/),m=n.from+c.indexOf(u),g=m+u.length;if(e1(n.from,n.to,e.doc).filter(C=>C.mark.type.excluded.find(D=>D===t.type&&D!==C.mark.type)).filter(C=>C.to>m).length)return null;g<n.to&&a.delete(g,n.to),m>n.from&&a.delete(n.from+h,m),f=n.from+h+u.length,a.addMark(n.from+h,f,t.type.create(o||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||a.removeStoredMark(t.type)}}})}var jW=Object.defineProperty,HW=(t,e)=>{for(var n in e)jW(t,n,{get:e[n],enumerable:!0})},VW="listItem",XD="textStyle",JD=/^\s*([-+*])\s$/,x7=Qn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",zt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
125
|
+
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(VW,this.editor.getAttributes(XD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Sl({find:JD,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Sl({find:JD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(XD),editor:this.editor})),[t]}}),UW=(t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let o=-1;for(let b=i.depth;b>0;b-=1)if(i.node(b).type.name===e){o=b;break}if(o<0)return null;const a=i.node(o),u=i.index(o);if(u+1>=a.childCount)return null;const c=a.child(u+1);if(!n.includes(c.type.name))return null;const f=t.schema.nodes[e];let h=!1;if(c.forEach(b=>{b.type===f&&b.childCount>1&&(h=!0)}),!h)return null;const m=t.doc.resolve(i.after()).nodeAfter;if(!m||!n.includes(m.type.name))return null;const g=[];return m.forEach(b=>{g.push(b)}),g.length===0?null:{listItemDepth:o,nestedList:m,nestedListPos:i.after(),insertPos:i.after(o),items:g}},qW=(t,e,n,r)=>{const i=UW(t,n,r);if(!i)return!1;const{selection:o}=t,{nestedList:a,nestedListPos:u,insertPos:c,items:f}=i,h=t.tr;h.delete(u,u+a.nodeSize);const m=h.mapping.map(c);return h.insert(m,ae.from(f)),h.setSelection(o.map(h.doc,h.mapping)),e&&e(h),!0},GW=(t,e,n)=>qW(t.state,t.view.dispatch,e,n),C7=(t,e)=>pt.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>GW(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),E7=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Gf="abcdefghijklmnopqrstuvwxyz",WW="[a-zA-Z]{1,2}",D7=String.raw`\d+|[ivxlcdmIVXLCDM]+|${WW}`;function gm(t){let e=t,n="";for(const[r,i]of E7)for(;e>=r;)n+=i,e-=r;return n}function o1(t){return gm(t).toUpperCase()}function k7(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let i=!1;for(const[o,a]of E7)if(e.startsWith(a,n)){r+=o,n+=a.length,i=!0;break}if(!i)return 0}return r}function QW(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=k7(t);return e<=0?!1:(t===t.toLowerCase()?gm(e):o1(e))===t}function YW(t){const e=t.toLowerCase();if(e.length===1)return e.charCodeAt(0)-97+1;if(e.length===2){const n=e.charCodeAt(0)-97,r=e.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function tp(t){if(t<=26)return Gf[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?Gf[n]:Gf[e]+Gf[n]}function bm(t){if(!(!t||/^\d+$/.test(t))){if(QW(t))return t===t.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(t))return"a";if(/^[A-Z]{1,2}$/.test(t))return"A"}}function s1(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=bm(t);if(e==="i"||e==="I")return k7(t);if(e==="a"||e==="A"){const r=YW(t);return r>0?r:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function XW(t,e){if(t==="numeric")return String(e);switch(t){case"a":return tp(e);case"A":return tp(e).toUpperCase();case"i":return gm(e);case"I":return o1(e);default:return String(e)}}function JW(t){var e;if(t.length===0)return!1;const n=(e=bm(t[0]))!=null?e:"numeric",r=s1(t[0]);if(r<1)return!1;for(let i=0;i<t.length;i++){const o=XW(n,r+i);if(t[i]!==o)return!1}return!0}function ZW(t){return{type:bm(t),start:s1(t)}}function eQ(t){const{type:e,start:n}=ZW(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function tQ(t,e,n=". "){const r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${tp(r)}${n}`;case"A":return`${tp(r).toUpperCase()}${n}`;case"i":return`${gm(r)}${n}`;case"I":return`${o1(r)}${n}`;default:return`${r}${n}`}}function nQ(t){var e,n;const r=(e=t.tokens)==null?void 0:e[0];return!!(t.text&&((n=t.tokens)==null?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===t.text)}function rQ(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var S7=Qn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",zt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let i=[];if(t.tokens&&t.tokens.length>0){if(nQ(t))return{type:"listItem",content:[{type:"paragraph",content:rQ(t.text||"",e)}]};if(t.tokens.some(a=>a.type==="paragraph"))i=r(t.tokens);else{const a=t.tokens[0];if(a&&a.type==="text"&&a.tokens&&a.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(a.tokens)}],t.tokens.length>1){const c=t.tokens.slice(1),f=r(c);i.push(...f)}}else i=r(t.tokens)}}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(t,e,n)=>r1(t,e,r=>{var i,o,a,u;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){const c=((o=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:o.start)||1,f=(u=(a=r.meta)==null?void 0:a.parentAttrs)==null?void 0:u.type,h=c-1+(r.index||0);return tQ(f,h,". ")}return"- "},n),addExtensions(){return[C7(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),iQ={};HW(iQ,{findListItemPos:()=>ym,getNextListDepth:()=>a1,handleBackspace:()=>cy,handleDelete:()=>dy,hasListBefore:()=>$7,hasListItemAfter:()=>oQ,hasListItemBefore:()=>sQ,listItemHasSubList:()=>aQ,nextListIsDeeper:()=>w7,nextListIsHigher:()=>T7});var ym=(t,e)=>{const{$from:n}=e.selection,r=Mt(t,e.schema);let i=null,o=n.depth,a=n.pos,u=null;for(;o>0&&u===null;)i=n.node(o),i.type===r?u=o:(o-=1,a-=1);return u===null?null:{$pos:e.doc.resolve(a),depth:u}},a1=(t,e)=>{const n=ym(t,e);if(!n)return!1;const[,r]=jG(e,t,n.$pos.pos+4);return r},$7=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),o=t.doc.resolve(i).node();return!(!o||!n.includes(o.type.name))},cy=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!zo(t.state,e)&&$7(t.state,e,n)){const{$anchor:r}=t.state.selection,i=t.state.doc.resolve(r.before()-1),o=[];i.node().descendants((c,f)=>{c.type.name===e&&o.push({node:c,pos:f})});const a=o.at(-1);if(!a)return!1;const u=t.state.doc.resolve(i.start()+a.pos+1);return t.chain().cut({from:r.start()-1,to:r.end()+1},u.end()).joinForward().run()}return!zo(t.state,e)||!qG(t.state)?!1:t.chain().liftListItem(e).run()},w7=(t,e)=>{const n=a1(t,e),r=ym(t,e);return!r||!n?!1:n>r.depth},T7=(t,e)=>{const n=a1(t,e),r=ym(t,e);return!r||!n?!1:n<r.depth},dy=(t,e)=>{if(!zo(t.state,e)||!UG(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:w7(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():T7(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},oQ=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},sQ=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},aQ=(t,e,n)=>{if(!n)return!1;const r=Mt(t,e.schema);let i=!1;return n.descendants(o=>{o.type===r&&(i=!0)}),i},A7=pt.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&dy(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&dy(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&cy(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&cy(t,n,r)&&(e=!0)}),e}}}}),fy=new RegExp(`^(\\s*)(${D7})([.)])\\s+(.*)$`),lQ=/^\s/,Yu={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function uQ(t){return fy.test(t.trimStart())}function cQ(t){const e=t.trimStart();return Yu.bulletItem.test(e)||uQ(e)||Yu.heading.test(e)||Yu.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||Yu.codeFence.test(e)}function dQ(t){return Object.values(Yu).some(e=>e.test(t))}function fQ(t){const e=[],n=[];let r=!1;return t.forEach(i=>{if(r){n.push(i);return}if(i.trim()===""){r=!0,n.push(i);return}if(e.length>0&&cQ(i)){r=!0,n.push(i);return}e.push(i)}),{paragraphLines:e,blockLines:n}}function hQ(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],o=i.match(fy);if(!o)break;const[,a,u,c,f]=o,h=a.length,m=parseInt(u,10),g=isNaN(m)?bm(u):void 0,b=isNaN(m)?s1(u):m,v=[f];let C=n+1;const E=[i];let D=!1;for(;C<t.length;){const w=t[C];if(w.match(fy))break;if(w.trim()==="")E.push(w),v.push(""),D=!0,C+=1;else if(w.match(lQ)){const T=w.length-w.trimStart().length,A=h+u.length+1;E.push(w),v.push(w.slice(Math.min(T,A))),C+=1}else{if(D||dQ(w))break;E.push(w),v.push(w),C+=1}}e.push({indent:h,number:b,type:g,content:v.join(`
|
|
126
|
+
`).trim(),contentLines:v,raw:E.join(`
|
|
127
|
+
`)}),r=C,n=C}return[e,r]}var pQ=new RegExp(`^(${D7})([.)])\\s+(.+)$`);function mQ(t){const e=t.split(`
|
|
128
|
+
`).filter(o=>o.trim().length>0);if(e.length===0)return null;const n=[];for(const o of e){const a=o.trim().match(pQ);if(!a)return null;n.push({marker:a[1],content:a[3]})}const r=n.map(o=>o.marker);return JW(r)?{type:"orderedList",attrs:eQ(n[0].marker),content:n.map(o=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:o.content}]}]}))}:null}function B7(t,e,n){const r=[];let i=0;for(;i<t.length;){const o=t[i];if(o.indent===e){const{paragraphLines:a,blockLines:u}=fQ(o.contentLines),c=a.join(`
|
|
129
|
+
`).trim(),f=[];c&&f.push({type:"paragraph",raw:c,tokens:n.inlineTokens(c)});const h=u.join(`
|
|
130
|
+
`).trim();if(h){const b=n.blockTokens(h);f.push(...b)}let m=i+1;const g=[];for(;m<t.length&&t[m].indent>e;)g.push(t[m]),m+=1;if(g.length>0){const b=Math.min(...g.map(C=>C.indent)),v=B7(g,b,n);f.push({type:"list",ordered:!0,start:g[0].number,typeMarker:g[0].type,items:v,raw:g.map(C=>C.raw).join(`
|
|
131
|
+
`)})}r.push({type:"list_item",raw:o.raw,tokens:f}),i=m}else i+=1}return r}function gQ(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const o=e.parseChildren([i]);r.push({type:"paragraph",content:o})}else{const o=e.parseChildren([i]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}var bQ="listItem",ZD="textStyle",ek=/^(\d+)\.\s$/;function tk(t){const e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}var M7=Qn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>{const e=t.getAttribute("type");if(e)return e;const n=t.getAttribute("style");if(n){const i=tk(n);if(i)return i}const r=t.querySelector("li");if(r){const i=r.getAttribute("style");if(i){const o=tk(i);if(o)return o}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,type:n,...r}=t,i=zt(this.options.HTMLAttributes,r);return e!==1&&(i.start=e),n&&n!=="1"&&(i.type=n),["ol",i,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.typeMarker,i=t.items?gQ(t.items,e):[],o={};return n!==1&&(o.start=n),r&&(o.type=r),Object.keys(o).length>0?{type:"orderedList",attrs:o,content:i}:{type:"orderedList",content:i}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
132
|
+
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,i;const o=t.split(`
|
|
133
|
+
`),[a,u]=hQ(o);if(a.length===0)return;const c=B7(a,a[0].indent,n);if(c.length===0)return;const f=((r=a[0])==null?void 0:r.number)||1,h=(i=a[0])==null?void 0:i.type;return{type:"list",ordered:!0,start:f,typeMarker:h,items:c,raw:o.slice(0,u).join(`
|
|
134
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bQ,this.editor.getAttributes(ZD)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new ht({props:{handlePaste:(t,e)=>{var n,r;const i=(n=e.clipboardData)==null?void 0:n.getData("text/html");if(i?.trim())return!1;const o=(r=e.clipboardData)==null?void 0:r.getData("text/plain");if(!o)return!1;const a=mQ(o);if(!a)return!1;try{const u=t.state.schema.nodeFromJSON(a),c=t.state.tr.replaceSelectionWith(u);return t.dispatch(c),!0}catch{return!1}}}})]},addInputRules(){const t=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1];let e=Sl({find:ek,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Sl({find:ek,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(ZD)}),joinPredicate:t,editor:this.editor})),[e]}}),yQ=/^\s*(\[([( |x])?\])\s$/,R7=Qn.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",zt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const i=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return r1(t,e,i)},addExtensions(){return this.options.nested?[C7(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),u=document.createElement("input"),c=document.createElement("div"),f=m=>{var g,b;u.ariaLabel=((b=(g=this.options.a11y)==null?void 0:g.checkboxLabel)==null?void 0:b.call(g,m,u.checked))||`Task item checkbox for ${m.textContent||"empty task item"}`};f(t),o.contentEditable="false",u.type="checkbox",u.addEventListener("mousedown",m=>m.preventDefault()),u.addEventListener("change",m=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){u.checked=!u.checked;return}const{checked:g}=m.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:b})=>{const v=n();if(typeof v!="number")return!1;const C=b.doc.nodeAt(v);return b.setNodeMarkup(v,void 0,{...C?.attrs,checked:g}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,g)||(u.checked=!u.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([m,g])=>{i.setAttribute(m,g)}),i.dataset.checked=t.attrs.checked,u.checked=t.attrs.checked,o.append(u,a),i.append(o,c),Object.entries(e).forEach(([m,g])=>{i.setAttribute(m,g)});let h=new Set(Object.keys(e));return{dom:i,contentDOM:c,update:m=>{if(m.type!==this.type)return!1;i.dataset.checked=m.attrs.checked,u.checked=m.attrs.checked,f(m);const g=r.extensionManager.attributes,b=Fc(m,g),v=new Set(Object.keys(b)),C=this.options.HTMLAttributes;return h.forEach(E=>{v.has(E)||(E in C?i.setAttribute(E,C[E]):i.removeAttribute(E))}),Object.entries(b).forEach(([E,D])=>{D==null?E in C?i.setAttribute(E,C[E]):i.removeAttribute(E):i.setAttribute(E,D)}),h=v,!0}}}},addInputRules(){return[Sl({find:yQ,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),P7=Qn.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",zt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
135
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=o=>{const a=ly(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:u=>({indentLevel:u[1].length,mainContent:u[4],checked:u[3].toLowerCase()==="x"}),createToken:(u,c)=>({type:"taskItem",raw:"",mainContent:u.mainContent,indentLevel:u.indentLevel,checked:u.checked,text:u.mainContent,tokens:n.inlineTokens(u.mainContent),nestedTokens:c}),customNestedParser:r},n);if(a){const u={type:"taskList",raw:a.raw,items:a.items},c=o.slice(a.raw.length);return c.trim()?[u,...n.blockTokens(c)]:[u]}return n.blockTokens(o)},i=ly(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,a)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:a}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});pt.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(x7.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(S7.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(A7.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(M7.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(R7.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(P7.configure(this.options.taskList)),t}});function vQ(t={}){return new ht({view(e){return new xQ(e,t)}})}class xQ{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=a=>{this[i](a)};return e.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){if(this.cursorPos!=null&&n.doc!=e.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,o=i.getBoundingClientRect(),a=o.width/i.offsetWidth,u=o.height/i.offsetHeight;if(n){let m=e.nodeBefore,g=e.nodeAfter;if(m||g){let b=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(b){let v=b.getBoundingClientRect(),C=m?v.bottom:v.top;m&&g&&(C=(C+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let E=this.width/2*u;r={left:v.left,right:v.right,top:C-E,bottom:C+E}}}}if(!r){let m=this.editorView.coordsAtPos(this.cursorPos),g=this.width/2*a;r={left:m.left-g,right:m.left+g,top:m.top,bottom:m.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let f,h;if(!c||c==document.body&&getComputedStyle(c).position=="static")f=-pageXOffset,h=-pageYOffset;else{let m=c.getBoundingClientRect(),g=m.width/c.offsetWidth,b=m.height/c.offsetHeight;f=m.left-c.scrollLeft*g,h=m.top-c.scrollTop*b}this.element.style.left=(r.left-f)/a+"px",this.element.style.top=(r.top-h)/u+"px",this.element.style.width=(r.right-r.left)/a+"px",this.element.style.height=(r.bottom-r.top)/u+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,e):i;if(!n||o)return null;let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let u=OM(this.editorView.state.doc,a,this.editorView.dragging.slice);u!=null&&(a=u)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let n=this.computeTarget(e);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class yt extends Me{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yt.valid(r)?new yt(r):Me.near(r)}content(){return he.empty}eq(e){return e instanceof yt&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yt(e.resolve(n.pos))}getBookmark(){return new l1(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!CQ(e)||!EQ(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yt.valid(e))return e;let i=e.pos,o=null;for(let a=e.depth;;a--){let u=e.node(a);if(n>0?e.indexAfter(a)<u.childCount:e.index(a)>0){o=u.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=n;let c=e.doc.resolve(i);if(yt.valid(c))return c}for(;;){let a=n>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!xe.isSelectable(o)){e=e.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=a,i+=n;let u=e.doc.resolve(i);if(yt.valid(u))return u}return null}}}yt.prototype.visible=!1;yt.findFrom=yt.findGapCursorFrom;Me.jsonID("gapcursor",yt);class l1{constructor(e){this.pos=e}map(e){return new l1(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yt.valid(n)?new yt(n):Me.near(n)}}function O7(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function CQ(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||O7(i.type))return!0;if(i.inlineContent)return!1}}return!0}function EQ(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||O7(i.type))return!0;if(i.inlineContent)return!1}}return!0}function DQ(){return new ht({props:{decorations:wQ,createSelectionBetween(t,e,n){return e.pos==n.pos&&yt.valid(n)?new yt(n):null},handleClick:SQ,handleKeyDown:kQ,handleDOMEvents:{beforeinput:$Q}}})}const kQ=I9({ArrowLeft:Wf("horiz",-1),ArrowRight:Wf("horiz",1),ArrowUp:Wf("vert",-1),ArrowDown:Wf("vert",1)});function Wf(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,o){let a=r.selection,u=e>0?a.$to:a.$from,c=a.empty;if(a instanceof ke){if(!o.endOfTextblock(n)||u.depth==0)return!1;c=!1,u=r.doc.resolve(e>0?u.after():u.before())}let f=yt.findGapCursorFrom(u,e,c);return f?(i&&i(r.tr.setSelection(new yt(f))),!0):!1}}function SQ(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yt.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&xe.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yt(r))),!0)}function $Q(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yt))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=ae.empty;for(let a=r.length-1;a>=0;a--)i=ae.from(r[a].createAndFill(null,i));let o=t.state.tr.replace(n.pos,n.pos,new he(i,0,0));return o.setSelection(ke.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function wQ(t){if(!(t.selection instanceof yt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",st.create(t.doc,[gn.widget(t.selection.head,e,{key:"gapcursor"})])}var np=200,Ht=function(){};Ht.prototype.append=function(e){return e.length?(e=Ht.from(e),!this.length&&e||e.length<np&&this.leafAppend(e)||this.length<np&&e.leafPrepend(this)||this.appendInner(e)):this};Ht.prototype.prepend=function(e){return e.length?Ht.from(e).append(this):this};Ht.prototype.appendInner=function(e){return new TQ(this,e)};Ht.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ht.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ht.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ht.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Ht.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,a){return i.push(e(o,a))},n,r),i};Ht.from=function(e){return e instanceof Ht?e:e&&e.length?new N7(e):Ht.empty};var N7=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,a,u){for(var c=o;c<a;c++)if(i(this.values[c],u+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,a,u){for(var c=o-1;c>=a;c--)if(i(this.values[c],u+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=np)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=np)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Ht);Ht.empty=new N7([]);var TQ=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,a){var u=this.left.length;if(i<u&&this.left.forEachInner(r,i,Math.min(o,u),a)===!1||o>u&&this.right.forEachInner(r,Math.max(i-u,0),Math.min(this.length,o)-u,a+u)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,a){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(r,i-u,Math.max(o,u)-u,a+u)===!1||o<u&&this.left.forEachInvertedInner(r,Math.min(i,u),o,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Ht);const AQ=500;class Sr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let a=e.tr,u,c,f=[],h=[];return this.items.forEach((m,g)=>{if(!m.step){i||(i=this.remapping(r,g+1),o=i.maps.length),o--,h.push(m);return}if(i){h.push(new Ir(m.map));let b=m.step.map(i.slice(o)),v;b&&a.maybeStep(b).doc&&(v=a.mapping.maps[a.mapping.maps.length-1],f.push(new Ir(v,void 0,void 0,f.length+h.length))),o--,v&&i.appendMap(v,o)}else a.maybeStep(m.step);if(m.selection)return u=i?m.selection.map(i.slice(o)):m.selection,c=new Sr(this.items.slice(0,r).append(h.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:a,selection:u}}addTransform(e,n,r,i){let o=[],a=this.eventCount,u=this.items,c=!i&&u.length?u.get(u.length-1):null;for(let h=0;h<e.steps.length;h++){let m=e.steps[h].invert(e.docs[h]),g=new Ir(e.mapping.maps[h],m,n),b;(b=c&&c.merge(g))&&(g=b,h?o.pop():u=u.slice(0,u.length-1)),o.push(g),n&&(a++,n=void 0),i||(c=g)}let f=a-r.depth;return f>MQ&&(u=BQ(u,f),a-=f),new Sr(u.append(o),a)}remapping(e,n){let r=new Oc;return this.items.forEach((i,o)=>{let a=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new Sr(this.items.append(e.map(n=>new Ir(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,a=e.steps.length,u=this.eventCount;this.items.forEach(g=>{g.selection&&u--},i);let c=n;this.items.forEach(g=>{let b=o.getMirror(--c);if(b==null)return;a=Math.min(a,b);let v=o.maps[b];if(g.step){let C=e.steps[b].invert(e.docs[b]),E=g.selection&&g.selection.map(o.slice(c+1,b));E&&u++,r.push(new Ir(v,C,E))}else r.push(new Ir(v))},i);let f=[];for(let g=n;g<a;g++)f.push(new Ir(o.maps[g]));let h=this.items.slice(0,i).append(f).append(r),m=new Sr(h,u);return m.emptyItemCount()>AQ&&(m=m.compress(this.items.length-r.length)),m}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((a,u)=>{if(u>=e)i.push(a),a.selection&&o++;else if(a.step){let c=a.step.map(n.slice(r)),f=c&&c.getMap();if(r--,f&&n.appendMap(f,r),c){let h=a.selection&&a.selection.map(n.slice(r));h&&o++;let m=new Ir(f.invert(),c,h),g,b=i.length-1;(g=i.length&&i[b].merge(m))?i[b]=g:i.push(m)}}else a.map&&r--},this.items.length,0),new Sr(Ht.from(i.reverse()),o)}}Sr.empty=new Sr(Ht.empty,0);function BQ(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Ir{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ir(n.getMap().invert(),n,this.selection)}}}class ho{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const MQ=20;function RQ(t,e,n,r){let i=n.getMeta(Gs),o;if(i)return i.historyState;n.getMeta(NQ)&&(t=new ho(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Gs))return a.getMeta(Gs).redo?new ho(t.done.addTransform(n,void 0,r,ph(e)),t.undone,nk(n.mapping.maps),t.prevTime,t.prevComposition):new ho(t.done,t.undone.addTransform(n,void 0,r,ph(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let u=n.getMeta("composition"),c=t.prevTime==0||!a&&t.prevComposition!=u&&(t.prevTime<(n.time||0)-r.newGroupDelay||!PQ(n,t.prevRanges)),f=a?Kb(t.prevRanges,n.mapping):nk(n.mapping.maps);return new ho(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,ph(e)),Sr.empty,f,n.time,u??t.prevComposition)}else return(o=n.getMeta("rebased"))?new ho(t.done.rebased(n,o),t.undone.rebased(n,o),Kb(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ho(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Kb(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function PQ(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function nk(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,a)=>e.push(o,a));return e}function Kb(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function OQ(t,e,n){let r=ph(e),i=Gs.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let a=o.selection.resolve(o.transform.doc),u=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),c=new ho(n?u:o.remaining,n?o.remaining:u,null,0,-1);return o.transform.setSelection(a).setMeta(Gs,{redo:n,historyState:c})}let _b=!1,rk=null;function ph(t){let e=t.plugins;if(rk!=e){_b=!1,rk=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){_b=!0;break}}return _b}const Gs=new It("history"),NQ=new It("closeHistory");function LQ(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ht({key:Gs,state:{init(){return new ho(Sr.empty,Sr.empty,null,0,-1)},apply(e,n,r){return RQ(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?z7:r=="historyRedo"?I7:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function L7(t,e){return(n,r)=>{let i=Gs.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=OQ(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const z7=L7(!1,!0),I7=L7(!0,!0);pt.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=t?.node||this.editor.state.doc;if((t?.mode||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=t?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ht({key:new It("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit,o=this.options.autoTrim;if(i==null||i===0||o===!1){t=!0;return}const a=this.storage.characters({node:r.doc});if(a>i){const u=a-i,c=0,f=u;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const h=r.tr.deleteRange(c,f);return t=!0,h}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;if(i>r&&o>r&&o>i||!e.getMeta("paste"))return!1;const u=e.selection.$head.pos,c=o-r,f=u-c,h=u;return e.deleteRange(f,h),!(this.storage.characters({node:e.doc})>r)}})]}});var zQ=pt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[vQ(this.options)]}});pt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ht({key:new It("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,o=[];if(!n||!r)return st.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((c,f)=>{if(c.isText)return;if(!(i>=f&&i<=f+c.nodeSize-1))return!1;a+=1});let u=0;return t.descendants((c,f)=>{if(c.isText||!(i>=f&&i<=f+c.nodeSize-1))return!1;if(u+=1,this.options.mode==="deepest"&&a-u>0||this.options.mode==="shallowest"&&u>1)return this.options.mode==="deepest";o.push(gn.node(f,f+c.nodeSize,{class:this.options.className}))}),st.create(t,o)}}})]}});var IQ=pt.create({name:"gapCursor",addProseMirrorPlugins(){return[DQ()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=We(be(t,"allowGapCursor",n)))!=null?e:null}}}),F7="placeholder",ik=new It("tiptap__placeholder");function K7(t){const{editor:e,placeholder:n,dataAttribute:r,pos:i,node:o,isEmptyDoc:a,hasAnchor:u,classes:{emptyNode:c,emptyEditor:f}}=t,h=[c];return a&&h.push(f),gn.node(i,i+o.nodeSize,{class:h.join(" "),[r]:typeof n=="function"?n({editor:e,node:o,pos:i,hasAnchor:u}):n})}function _7(t,e){return typeof t=="function"?t(e):t}function j7({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:o,to:a}){const{anchor:u}=i,c=[],f=t.isEmpty;return r.nodesBetween(o,a,(h,m)=>{const g=u>=m&&u<=m+h.nodeSize,b=!h.isLeaf&&nd(h);return h.type.isTextblock&&(g||!e.showOnlyCurrent)&&b&&c.push(K7({editor:t,isEmptyDoc:f,dataAttribute:n,hasAnchor:g,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:_7(e.emptyNodeClass,{editor:t,node:h,pos:m,hasAnchor:g})},node:h,pos:m})),e.includeChildren}),c}function H7({editor:t,options:e,dataAttribute:n,doc:r,selection:i}){if(!(t.isEditable||!e.showOnlyWhenEditable))return null;const{anchor:a}=i,u=[],c=t.isEmpty;if(e.showOnlyCurrent&&!e.includeChildren){const h=r.resolve(a),m=h.depth>0?h.node(1):h.nodeAfter,g=h.depth>0?h.before(1):a;if(m&&m.type.isTextblock&&nd(m)){const b=a>=g&&a<=g+m.nodeSize;u.push(K7({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:b,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:_7(e.emptyNodeClass,{editor:t,node:m,pos:g,hasAnchor:b})},node:m,pos:g}))}}else u.push(...j7({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return st.create(r,u)}function uc(t,e){var n;const r=t.resolve(e);if(r.depth===0){const a=(n=r.nodeAfter)!=null?n:r.nodeBefore;if(!a)return{from:e,to:e};const u=r.nodeAfter?e:e-a.nodeSize;return{from:u,to:u+a.nodeSize}}const i=r.before(1),o=r.node(1);return{from:i,to:i+o.nodeSize}}function cc(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function FQ(t,e,n){const r=[];return t.forEach((i,o)=>{const a=o,u=a+i.nodeSize,c=a+1,f=u+1;c<n&&f>e&&r.push({from:a,to:u})}),r}function KQ(t){if(t.length===0)return[];const e=[...t].sort((r,i)=>r.from-i.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){const i=n[n.length-1],o=e[r];o.from<=i.to?i.to=Math.max(i.to,o.to):n.push({...o})}return n}function _Q(t,e){const n=FQ(t,e.from,e.to);return n.push(cc(t,uc(t,e.from))),e.to>e.from?n.push(cc(t,uc(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(cc(t,uc(t,Math.min(e.from+1,t.content.size)))),n}function jQ(t,e,n){const r=[];if(t.docChanged){const i=Z3(t);for(const o of i)r.push(..._Q(n.doc,o.newRange))}return t.selectionSet&&(r.push(cc(n.doc,uc(n.doc,t.mapping.map(e.selection.anchor)))),r.push(cc(n.doc,uc(n.doc,n.selection.anchor)))),KQ(r)}function HQ(t,e,n){const r=Math.max(0,Math.min(t,n.content.size)),i=Math.max(r,Math.min(e,n.content.size));return{from:r,to:i}}function VQ({decorations:t,ranges:e,editor:n,options:r,dataAttribute:i,doc:o,selection:a}){let u=t;for(const c of e){const{from:f,to:h}=HQ(c.from,c.to,o),m=u.find(f,h).filter(b=>b.from>=f&&b.to<=h);m.length&&(u=u.remove(m));const g=j7({editor:n,options:r,dataAttribute:i,doc:o,selection:a,from:f,to:h});g.length&&(u=u.add(o,g))}return u}function UQ({editor:t,options:e,dataAttribute:n}){return{init(r,i){const o=H7({editor:t,options:e,dataAttribute:n,doc:i.doc,selection:i.selection});return o??st.empty},apply(r,i,o,a){if(!r.docChanged&&!r.selectionSet)return i;const u=i.map(r.mapping,r.doc),c=jQ(r,o,a);return VQ({decorations:u,ranges:c,editor:t,options:e,dataAttribute:n,doc:a.doc,selection:a.selection})}}}function qQ(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function GQ({editor:t,options:e}){const n=e.dataAttribute?`data-${qQ(e.dataAttribute)}`:`data-${F7}`,r=e.showOnlyCurrent&&!e.includeChildren;return new ht({key:ik,...r?{}:{state:UQ({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:i,selection:o})=>H7({editor:t,options:e,dataAttribute:n,doc:i,selection:o}):i=>{var o;return e.showOnlyWhenEditable&&!t.isEditable?st.empty:(o=ik.getState(i))!=null?o:st.empty}}})}var WQ=pt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:F7,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[GQ({editor:this.editor,options:this.options})]}});function hy(t,e){return!t.selection.empty&&!e7(t.selection)&&e.isEditable}function QQ(t,e){return hy(t,e)&&!e.isFocused&&!e.view.dragging}function YQ(){var t;(t=window.getSelection())==null||t.removeAllRanges()}function XQ(t){t.focus()}pt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ht({key:new It("selection"),props:{decorations(n){return QQ(n,t)?st.create(n.doc,[gn.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return hy(n.state,t)&&YQ(),!1},focus(n){return hy(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&XQ(n)}),!1}}}})]}});var JQ="skipTrailingNode";function ok({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var ZQ=pt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new It(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new ht({key:e,appendTransaction:(i,o,a)=>{const{doc:u,tr:c,schema:f}=a,h=e.getState(a),m=u.content.size,g=f.nodes[n];if(!i.some(b=>b.getMeta(JQ))&&h)return c.insert(m,g.create())},state:{init:(i,o)=>{const a=o.tr.doc.lastChild;return!ok({node:a,types:r})},apply:(i,o)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return o;const a=i.doc.lastChild;return!ok({node:a,types:r})}}})]}}),eY=pt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>z7(t,e),redo:()=>({state:t,dispatch:e})=>I7(t,e)}},addProseMirrorPlugins(){return[LQ(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function u1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ua=u1();function V7(t){ua=t}var Ds={exec:()=>null};function He(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(bn.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var tY=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),bn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},nY=/^(?:[ \t]*(?:\n|$))+/,rY=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,iY=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,id=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oY=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,c1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,U7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,q7=He(U7).replace(/bull/g,c1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),sY=He(U7).replace(/bull/g,c1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,aY=/^[^\n]+/,f1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lY=He(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",f1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uY=He(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c1).getRegex(),vm="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",h1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,cY=He("^ {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|$))","i").replace("comment",h1).replace("tag",vm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G7=He(d1).replace("hr",id).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vm).getRegex(),dY=He(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",G7).getRegex(),p1={blockquote:dY,code:rY,def:lY,fences:iY,heading:oY,hr:id,html:cY,lheading:q7,list:uY,newline:nY,paragraph:G7,table:Ds,text:aY},sk=He("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",id).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vm).getRegex(),fY={...p1,lheading:sY,table:sk,paragraph:He(d1).replace("hr",id).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sk).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",vm).getRegex()},hY={...p1,html:He(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",h1).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:Ds,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:He(d1).replace("hr",id).replace("heading",` *#{1,6} *[^
|
|
136
|
+
]`).replace("lheading",q7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pY=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,mY=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,W7=/^( {2,}|\\)\n(?!\s*$)/,gY=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rl=/[\p{P}\p{S}]/u,xm=/[\s\p{P}\p{S}]/u,m1=/[^\s\p{P}\p{S}]/u,bY=He(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,xm).getRegex(),Q7=/(?!~)[\p{P}\p{S}]/u,yY=/(?!~)[\s\p{P}\p{S}]/u,vY=/(?:[^\s\p{P}\p{S}]|~)/u,xY=He(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tY?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Y7=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,CY=He(Y7,"u").replace(/punct/g,Rl).getRegex(),EY=He(Y7,"u").replace(/punct/g,Q7).getRegex(),X7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",DY=He(X7,"gu").replace(/notPunctSpace/g,m1).replace(/punctSpace/g,xm).replace(/punct/g,Rl).getRegex(),kY=He(X7,"gu").replace(/notPunctSpace/g,vY).replace(/punctSpace/g,yY).replace(/punct/g,Q7).getRegex(),SY=He("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,m1).replace(/punctSpace/g,xm).replace(/punct/g,Rl).getRegex(),$Y=He(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Rl).getRegex(),wY="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",TY=He(wY,"gu").replace(/notPunctSpace/g,m1).replace(/punctSpace/g,xm).replace(/punct/g,Rl).getRegex(),AY=He(/\\(punct)/,"gu").replace(/punct/g,Rl).getRegex(),BY=He(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),MY=He(h1).replace("(?:-->|$)","-->").getRegex(),RY=He("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",MY).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,PY=He(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",rp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J7=He(/^!?\[(label)\]\[(ref)\]/).replace("label",rp).replace("ref",f1).getRegex(),Z7=He(/^!?\[(ref)\](?:\[\])?/).replace("ref",f1).getRegex(),OY=He("reflink|nolink(?!\\()","g").replace("reflink",J7).replace("nolink",Z7).getRegex(),ak=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,g1={_backpedal:Ds,anyPunctuation:AY,autolink:BY,blockSkip:xY,br:W7,code:mY,del:Ds,delLDelim:Ds,delRDelim:Ds,emStrongLDelim:CY,emStrongRDelimAst:DY,emStrongRDelimUnd:SY,escape:pY,link:PY,nolink:Z7,punctuation:bY,reflink:J7,reflinkSearch:OY,tag:RY,text:gY,url:Ds},NY={...g1,link:He(/^!?\[(label)\]\((.*?)\)/).replace("label",rp).getRegex(),reflink:He(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rp).getRegex()},py={...g1,emStrongRDelimAst:kY,emStrongLDelim:EY,delLDelim:$Y,delRDelim:TY,url:He(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ak).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:He(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ak).getRegex()},LY={...py,br:He(W7).replace("{2,}","*").getRegex(),text:He(py.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Qf={normal:p1,gfm:fY,pedantic:hY},Lu={normal:g1,gfm:py,breaks:LY,pedantic:NY},zY={"&":"&","<":"<",">":">",'"':""","'":"'"},lk=t=>zY[t];function zr(t,e){if(e){if(bn.escapeTest.test(t))return t.replace(bn.escapeReplace,lk)}else if(bn.escapeTestNoEncode.test(t))return t.replace(bn.escapeReplaceNoEncode,lk);return t}function uk(t){try{t=encodeURI(t).replace(bn.percentDecode,"%")}catch{return null}return t}function ck(t,e){let n=t.replace(bn.findPipe,(o,a,u)=>{let c=!1,f=a;for(;--f>=0&&u[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(bn.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-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(bn.slashPipe,"|");return r}function zu(t,e,n){let r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function IY(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 n>0?-2:-1}function FY(t,e=0){let n=e,r="";for(let i of t)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function dk(t,e,n,r,i){let o=e.href,a=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,c}function KY(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
|
|
137
|
+
`).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[u]=a;return u.length>=i.length?o.slice(i.length):o}).join(`
|
|
138
|
+
`)}var ip=class{options;rules;lexer;constructor(t){this.options=t||ua}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:zu(n,`
|
|
139
|
+
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=KY(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=zu(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:zu(e[0],`
|
|
140
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=zu(e[0],`
|
|
141
|
+
`).split(`
|
|
142
|
+
`),r="",i="",o=[];for(;n.length>0;){let a=!1,u=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))u.push(n[c]),a=!0;else if(!a)u.push(n[c]);else break;n=n.slice(c);let f=u.join(`
|
|
143
|
+
`),h=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
144
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
145
|
+
${f}`:f,i=i?`${i}
|
|
146
|
+
${h}`:h;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,o,!0),this.lexer.state.top=m,n.length===0)break;let g=o.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let b=g,v=b.raw+`
|
|
147
|
+
`+n.join(`
|
|
148
|
+
`),C=this.blockquote(v);o[o.length-1]=C,r=r.substring(0,r.length-b.raw.length)+C.raw,i=i.substring(0,i.length-b.text.length)+C.text;break}else if(g?.type==="list"){let b=g,v=b.raw+`
|
|
149
|
+
`+n.join(`
|
|
150
|
+
`),C=this.list(v);o[o.length-1]=C,r=r.substring(0,r.length-g.raw.length)+C.raw,i=i.substring(0,i.length-b.raw.length)+C.raw,n=v.substring(o.at(-1).raw.length).split(`
|
|
151
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:o,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,f="",h="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let m=FY(e[2].split(`
|
|
152
|
+
`,1)[0],e[1].length),g=t.split(`
|
|
153
|
+
`,1)[0],b=!m.trim(),v=0;if(this.options.pedantic?(v=2,h=m.trimStart()):b?v=e[1].length+1:(v=m.search(this.rules.other.nonSpaceChar),v=v>4?1:v,h=m.slice(v),v+=e[1].length),b&&this.rules.other.blankLine.test(g)&&(f+=g+`
|
|
154
|
+
`,t=t.substring(g.length+1),c=!0),!c){let C=this.rules.other.nextBulletRegex(v),E=this.rules.other.hrRegex(v),D=this.rules.other.fencesBeginRegex(v),w=this.rules.other.headingBeginRegex(v),$=this.rules.other.htmlBeginRegex(v),T=this.rules.other.blockquoteBeginRegex(v);for(;t;){let A=t.split(`
|
|
155
|
+
`,1)[0],O;if(g=A,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),O=g):O=g.replace(this.rules.other.tabCharGlobal," "),D.test(g)||w.test(g)||$.test(g)||T.test(g)||C.test(g)||E.test(g))break;if(O.search(this.rules.other.nonSpaceChar)>=v||!g.trim())h+=`
|
|
156
|
+
`+O.slice(v);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(m)||w.test(m)||E.test(m))break;h+=`
|
|
157
|
+
`+g}b=!g.trim(),f+=A+`
|
|
158
|
+
`,t=t.substring(A.length+1),m=O.slice(v)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(a=!0)),i.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=f}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(c.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};c.checked=h.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}if(!i.loose){let f=c.tokens.filter(m=>m.type==="space"),h=f.length>0&&f.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=h}}if(i.loose)for(let c of i.items){c.loose=!0;for(let f of c.tokens)f.type==="text"&&(f.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=ck(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
159
|
+
`):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of i)o.rows.push(ck(a,o.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[c]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
160
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=zu(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=IY(e[2],"()");if(o===-2)return;if(o>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),dk(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[r.toLowerCase()];if(!i){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return dk(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,u=i,c=0,f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+i);(r=f.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(a=[...o].length,r[3]||r[4]){u+=a;continue}else if((r[5]||r[6])&&i%3&&!((i+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);let h=[...r[0]][0].length,m=t.slice(0,i+r.index+h+a);if(Math.min(i,a)%2){let b=m.slice(1,-1);return{type:"em",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}let g=m.slice(2,-2);return{type:"strong",raw:m,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,o,a,u=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(r=c.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(a=[...o].length,a!==i))continue;if(r[3]||r[4]){u+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u);let f=[...r[0]][0].length,h=t.slice(0,i+r.index+f+a),m=h.slice(i,-i);return{type:"del",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},Er=class my{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ua,this.options.tokenizer=this.options.tokenizer||new ip,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:bn,block:Qf.normal,inline:Lu.normal};this.options.pedantic?(n.block=Qf.pedantic,n.inline=Lu.pedantic):this.options.gfm&&(n.block=Qf.gfm,this.options.breaks?n.inline=Lu.breaks:n.inline=Lu.gfm),this.tokenizer.rules=n}static get rules(){return{block:Qf,inline:Lu}}static lex(e,n){return new my(n).lex(e)}static lexInline(e,n){return new my(n).inlineTokens(e)}lex(e){e=e.replace(bn.carriageReturn,`
|
|
161
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(bn.tabCharGlobal," ").replace(bn.spaceLine,""));e;){let i;if(this.options.extensions?.block?.some(a=>(i=a.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let a=n.at(-1);i.raw.length===1&&a!==void 0?a.raw+=`
|
|
162
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
163
|
+
`)?"":`
|
|
164
|
+
`)+i.raw,a.text+=`
|
|
165
|
+
`+i.text,this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
166
|
+
`)?"":`
|
|
167
|
+
`)+i.raw,a.text+=`
|
|
168
|
+
`+i.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let o=e;if(this.options.extensions?.startBlock){let a=1/0,u=e.slice(1),c;this.options.extensions.startBlock.forEach(f=>{c=f.call({lexer:this},u),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(o=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
169
|
+
`)?"":`
|
|
170
|
+
`)+i.raw,a.text+=`
|
|
171
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i),r=o.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
172
|
+
`)?"":`
|
|
173
|
+
`)+i.raw,a.text+=`
|
|
174
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(i);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let r=e,i=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)c.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,u="";for(;e;){a||(u=""),a=!1;let c;if(this.options.extensions?.inline?.some(h=>(c=h.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let h=n.at(-1);c.type==="text"&&h?.type==="text"?(h.raw+=c.raw,h.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(e,r,u)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(e,r,u)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),n.push(c);continue}let f=e;if(this.options.extensions?.startInline){let h=1/0,m=e.slice(1),g;this.options.extensions.startInline.forEach(b=>{g=b.call({lexer:this},m),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(f=e.substring(0,h+1))}if(c=this.tokenizer.inlineText(f)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(u=c.raw.slice(-1)),a=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=c.raw,h.text+=c.text):n.push(c);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},op=class{options;parser;constructor(t){this.options=t||ua}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(bn.notSpaceStart)?.[0],i=t.replace(bn.endingNewline,"")+`
|
|
175
|
+
`;return r?'<pre><code class="language-'+zr(r)+'">'+(n?i:zr(i,!0))+`</code></pre>
|
|
176
|
+
`:"<pre><code>"+(n?i:zr(i,!0))+`</code></pre>
|
|
177
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
178
|
+
${this.parser.parse(t)}</blockquote>
|
|
179
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
180
|
+
`}hr(t){return`<hr>
|
|
181
|
+
`}list(t){let e=t.ordered,n=t.start,r="";for(let a=0;a<t.items.length;a++){let u=t.items[a];r+=this.listitem(u)}let i=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+i+o+`>
|
|
182
|
+
`+r+"</"+i+`>
|
|
183
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
184
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
185
|
+
`}table(t){let e="",n="";for(let i=0;i<t.header.length;i++)n+=this.tablecell(t.header[i]);e+=this.tablerow({text:n});let r="";for(let i=0;i<t.rows.length;i++){let o=t.rows[i];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
186
|
+
<thead>
|
|
187
|
+
`+e+`</thead>
|
|
188
|
+
`+r+`</table>
|
|
189
|
+
`}tablerow({text:t}){return`<tr>
|
|
190
|
+
${t}</tr>
|
|
191
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
192
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${zr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),i=uk(t);if(i===null)return r;t=i;let o='<a href="'+t+'"';return e&&(o+=' title="'+zr(e)+'"'),o+=">"+r+"</a>",o}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=uk(t);if(i===null)return zr(n);t=i;let o=`<img src="${t}" alt="${zr(n)}"`;return e&&(o+=` title="${zr(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:zr(t.text)}},b1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Dr=class gy{options;renderer;textRenderer;constructor(e){this.options=e||ua,this.options.renderer=this.options.renderer||new op,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new b1}static parse(e,n){return new gy(n).parse(e)}static parseInline(e,n){return new gy(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let a=i,u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=u||"";continue}}let o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<e.length;i++){let o=e[i];if(this.options.extensions?.renderers?.[o.type]){let u=this.options.extensions.renderers[o.type].call({parser:this},o);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=u||"";continue}}let a=o;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let u='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Xu=class{options;block;constructor(t){this.options=t||ua}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Er.lex:Er.lexInline}provideParser(t=this.block){return t?Dr.parse:Dr.parseInline}},_Y=class{defaults=u1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Dr;Renderer=op;TextRenderer=b1;Lexer=Er;Tokenizer=ip;Hooks=Xu;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let i=r;for(let o of i.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of i.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=r;n=n.concat(this.walkTokens(i.items,e));break}default:{let i=r;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(o=>{let a=i[o].flat(1/0);n=n.concat(this.walkTokens(a,e))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let o=e.renderers[i.name];o?e.renderers[i.name]=function(...a){let u=i.renderer.apply(this,a);return u===!1&&(u=o.apply(this,a)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[i.level];o?o.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),r.extensions=e),n.renderer){let i=this.defaults.renderer||new op(this.defaults);for(let o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,u=n.renderer[a],c=i[a];i[a]=(...f)=>{let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new ip(this.defaults);for(let o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,u=n.tokenizer[a],c=i[a];i[a]=(...f)=>{let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new Xu;for(let o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,u=n.hooks[a],c=i[a];Xu.passThroughHooks.has(o)?i[a]=f=>{if(this.defaults.async&&Xu.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await u.call(i,f);return c.call(i,m)})();let h=u.call(i,f);return c.call(i,h)}:i[a]=(...f)=>{if(this.defaults.async)return(async()=>{let m=await u.apply(i,f);return m===!1&&(m=await c.apply(i,f)),m})();let h=u.apply(i,f);return h===!1&&(h=c.apply(i,f)),h}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(a){let u=[];return u.push(o.call(this,a)),i&&(u=u.concat(i.call(this,a))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Er.lex(t,e??this.defaults)}parser(t,e){return Dr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},o=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,u=await(i.hooks?await i.hooks.provideLexer(t):t?Er.lex:Er.lexInline)(a,i),c=i.hooks?await i.hooks.processAllTokens(u):u;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let f=await(i.hooks?await i.hooks.provideParser(t):t?Dr.parse:Dr.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(o);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(t):t?Er.lex:Er.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let u=(i.hooks?i.hooks.provideParser(t):t?Dr.parse:Dr.parseInline)(a,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(a){return o(a)}}}onError(t,e){return n=>{if(n.message+=`
|
|
193
|
+
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+zr(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},ea=new _Y;function Xe(t,e){return ea.parse(t,e)}Xe.options=Xe.setOptions=function(t){return ea.setOptions(t),Xe.defaults=ea.defaults,V7(Xe.defaults),Xe};Xe.getDefaults=u1;Xe.defaults=ua;Xe.use=function(...t){return ea.use(...t),Xe.defaults=ea.defaults,V7(Xe.defaults),Xe};Xe.walkTokens=function(t,e){return ea.walkTokens(t,e)};Xe.parseInline=ea.parseInline;Xe.Parser=Dr;Xe.parser=Dr.parse;Xe.Renderer=op;Xe.TextRenderer=b1;Xe.Lexer=Er;Xe.lexer=Er.lex;Xe.Tokenizer=ip;Xe.Hooks=Xu;Xe.parse=Xe;Xe.options;Xe.setOptions;Xe.use;Xe.walkTokens;Xe.parseInline;Dr.parse;Er.lex;var jY=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function HY(t){return t.flatMap((e,n)=>{var r;if(e.type==="space"||((r=t[n+1])==null?void 0:r.type)==="space")return[e];const i=(e.raw||"").match(jY);return i?[{...e,raw:(e.raw||"").slice(0,-i[0].length)},{type:"space",raw:i[0]}]:[e]})}function VY(t,e){const r=e.split(`
|
|
194
|
+
`).flatMap(i=>[i,""]).map(i=>`${t}${i}`).join(`
|
|
195
|
+
`);return r.slice(0,r.length-1)}function UY(t,e){const n=[];return Array.from(t.entries()).forEach(([r,i])=>{if(!e){n.push(r);return}(e.marks||[]).find(a=>a.type===r&&kl(a.attrs,i.attrs))||n.push(r)}),n}function qY(t,e){const n=[];return Array.from(e.entries()).forEach(([r,i])=>{const o=t.get(r);(!o||!kl(o.attrs,i.attrs))&&n.push({type:r,mark:i})}),n}function GY(t,e,n,r){const i=!n,o=n&&(!n.marks||n.marks.length===0),a=n&&n.marks&&!r(e,new Map(n.marks.map(c=>[c.type,c]))),u=[];return(i||o||a)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([c,f])=>{n.marks.find(m=>m.type===c&&kl(m.attrs,f.attrs))||u.push(c)}):(i||o)&&u.push(...Array.from(t.keys()).reverse())),u}function WY(t,e){let n="";return Array.from(t.keys()).reverse().forEach(r=>{const i=t.get(r),o=e(r,i);o&&(n=o+n)}),t.clear(),n}function QY(t,e,n){let r="";return Array.from(t.entries()).forEach(([i,o])=>{const a=n(i,o);a&&(r+=a),e.set(i,o)}),r}function jb(t){const n=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return n?{isTask:!0,checked:n[2].toLowerCase()==="x",indentLevel:n[1].length}:{isTask:!1,indentLevel:0}}function Yf(t,e){return typeof t!="string"?"json":e}var YY=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),XY=/<\/?([a-zA-Z][\w-]*)/g;function JY(t){const e=[];let n;for(;(n=XY.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function ZY(t){const e=t.toLowerCase();return e.includes("-")?!1:!YY.has(e)}function eX(t,e){return JY(t).some(r=>ZY(r)?!e.has(r):!1)}var tX=class{constructor(t){this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.lastParseResult=null;var e,n,r,i,o;this.markedInstance=(e=t?.marked)!=null?e:Xe,this.indentStyle=(r=(n=t?.indentation)==null?void 0:n.style)!=null?r:"space",this.indentSize=(o=(i=t?.indentation)==null?void 0:i.size)!=null?o:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,fl(pm(t.extensions)).forEach(u=>this.registerExtension(u)))}get instance(){return this.markedInstance}get indentCharacter(){return this.indentStyle==="space"?" ":" "}get indentString(){return this.indentCharacter.repeat(this.indentSize)}hasMarked(){return!!this.markedInstance}registerExtension(t){var e,n;this.extensions.push(t);const r=We(be(t,"code")),i=t.name;r&&this.codeTypes.add(i),this.extensionRanks.has(i)||this.extensionRanks.set(i,this.extensionRanks.size);const o=be(t,"markdownTokenName")||i,a=be(t,"parseMarkdown"),u=be(t,"renderMarkdown"),c=be(t,"markdownTokenizer"),f=(e=be(t,"markdownOptions"))!=null?e:null,h=(n=f?.indentsContent)!=null?n:!1,m=f?.htmlReopen,g={tokenName:o,nodeName:i,parseMarkdown:a,renderMarkdown:u,isIndenting:h,htmlReopen:m,tokenizer:c};if(o&&a){const b=this.registry.get(o)||[];b.push(g),this.registry.set(o,b)}if(u){const b=this.nodeTypeRegistry.get(i)||[];b.push(g),this.nodeTypeRegistry.set(i,b)}c&&this.hasMarked()&&this.registerTokenizer(c)}createLexer(){return new this.markedInstance.Lexer(this.markedInstance.defaults)}createTokenizerHelpers(t){return{inlineTokens:e=>t.inlineTokens(e),blockTokens:e=>t.blockTokens(e)}}tokenizeInline(t){var e;return((e=this.activeParseLexer)!=null?e:this.createLexer()).inlineTokens(t)}registerTokenizer(t){if(!this.hasMarked())return;const{name:e,start:n,level:r="inline",tokenize:i}=t,o=this.createTokenizerHelpers.bind(this),a=this.createLexer.bind(this);let u;n?u=typeof n=="function"?n:f=>f.indexOf(n):u=f=>{const h=i(f,[],this.createTokenizerHelpers(this.createLexer()));return h&&h.raw?f.indexOf(h.raw):-1};const c={name:e,level:r,start:u,tokenizer(f,h){const m=this.lexer?o(this.lexer):o(a()),g=i(f,h,m);if(g&&g.type)return{...g,type:g.type||e,raw:g.raw||"",tokens:g.tokens||[]}},childTokens:[]};this.markedInstance.use({extensions:[c]})}getHandlersForToken(t){try{return this.registry.get(t)||[]}catch{return[]}}getHandlerForToken(t){const e=this.getHandlersForToken(t);if(e.length>0)return e[0];const n=this.getHandlersForNodeType(t);return n.length>0?n[0]:void 0}getHandlersForNodeType(t){try{return this.nodeTypeRegistry.get(t)||[]}catch{return[]}}serialize(t){if(!t)return"";const e=this.renderNodes(t,t);return this.isEmptyOutput(e)?"":e}isEmptyOutput(t){return!t||t.trim()===""?!0:t.replace(/ /g,"").replace(/\u00A0/g,"").trim()===""}parse(t){if(!this.hasMarked())throw new Error("No marked instance available for parsing");const e=this.activeParseLexer,n=this.createLexer();this.activeParseLexer=n;try{const r=n.lex(t);return{type:"doc",content:this.parseTokens(r,!0)}}finally{this.activeParseLexer=e}}parseTokens(t,e=!1){const n=e?HY(t):t,r=n.reduce((a,u,c)=>(u.type!=="space"&&a.push(c),a),[]);let i=-1,o=0;return n.flatMap((a,u)=>{for(var c;o<r.length&&r[o]<u;)i=r[o],o+=1;if(e&&a.type==="space"){const h=(c=r[o])!=null?c:-1;return this.createImplicitEmptyParagraphsFromSpace(a,i,h)}const f=this.parseToken(a,e);return f===null?[]:Array.isArray(f)?f:[f]})}createImplicitEmptyParagraphsFromSpace(t,e,n){const r=this.countParagraphSeparators(t.raw||"");if(r===0)return[];const o=Math.max(r-(e===-1||n===-1?0:1),0);return Array.from({length:o},()=>({type:"paragraph",content:[]}))}countParagraphSeparators(t){return(t.replace(/\r\n/g,`
|
|
196
|
+
`).match(/\n\n/g)||[]).length}parseToken(t,e=!1){if(!t.type)return null;if(t.type==="list")return this.parseListToken(t);const n=this.getHandlersForToken(t.type),r=this.createParseHelpers();if(n.find(o=>{if(!o.parseMarkdown)return!1;const a=o.parseMarkdown(t,r),u=this.normalizeParseResult(a);return u&&(!Array.isArray(u)||u.length>0)?(this.lastParseResult=u,!0):!1})&&this.lastParseResult){const o=this.lastParseResult;return this.lastParseResult=null,o}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(u=>jb(u).isTask),n=t.items.some(u=>!jb(u).isTask);if(!e||!n||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const r=[];let i=[],o=null;for(let u=0;u<t.items.length;u+=1){const c=t.items[u],{isTask:f,checked:h,indentLevel:m}=jb(c);let g=c;if(f){const C=(c.raw||c.text||"").split(`
|
|
197
|
+
`),E=C[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),D=E?E[2]:"";let w=[];if(C.length>1&&C.slice(1).join(`
|
|
198
|
+
`).trim()){const T=C.slice(1),A=T.filter(O=>O.trim());if(A.length>0){const O=Math.min(...A.map(I=>I.length-I.trimStart().length)),P=T.map(I=>I.trim()?I.slice(O):"").join(`
|
|
199
|
+
`).trim();P&&(w=this.markedInstance.lexer(`${P}
|
|
200
|
+
`))}}g={type:"taskItem",raw:"",mainContent:D,indentLevel:m,checked:h??!1,text:D,tokens:this.tokenizeInline(D),nestedTokens:w}}const b=f?"taskList":"list";o!==b?(i.length>0&&r.push({type:o,items:i}),i=[g],o=b):i.push(g)}i.length>0&&r.push({type:o,items:i});const a=[];for(let u=0;u<r.length;u+=1){const c=r[u],f={...t,type:c.type,items:c.items},h=this.parseToken(f);h&&(Array.isArray(h)?a.push(...h):a.push(h))}return a.length>0?a:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),n=this.createParseHelpers();if(e.find(i=>{if(!i.parseMarkdown)return!1;const o=i.parseMarkdown(t,n),a=this.normalizeParseResult(o);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const i=this.lastParseResult;return this.lastParseResult=null,i}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,n)=>{const r={type:t,attrs:e||void 0,content:n||void 0};return(!e||Object.keys(e).length===0)&&delete r.attrs,r},applyMark:(t,e,n)=>({mark:t,content:e,attrs:n&&Object.keys(n).length>0?n:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){var e,n,r,i;const o=[];for(let a=0;a<t.length;a+=1){const u=t[a];if(u.type==="text")o.push({type:"text",text:QD(u.text||"")});else if(u.type==="escape")o.push({type:"text",text:u.text||""});else if(u.type==="html"){const c=((n=(e=u.raw)!=null?e:u.text)!=null?n:"").toString(),f=/^<\/[\s]*[\w-]+/i.test(c),h=c.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!f&&h&&!/\/>$/.test(c)){const g=h[1],b=this.escapeRegex(g),v=new RegExp(`^<\\/\\s*${b}\\b`,"i");let C=-1;const E=[c];for(let D=a+1;D<t.length;D+=1){const w=t[D],$=((i=(r=w.raw)!=null?r:w.text)!=null?i:"").toString();if(E.push($),w.type==="html"&&v.test($)){C=D;break}}if(C!==-1){const D=E.join(""),w={type:"html",raw:D,text:D,block:!1},$=this.parseHTMLToken(w);if($){const T=this.normalizeParseResult($);Array.isArray(T)?o.push(...T):T&&o.push(T)}a=C;continue}}const m=this.parseHTMLToken(u);if(m){const g=this.normalizeParseResult(m);Array.isArray(g)?o.push(...g):g&&o.push(g)}}else if(u.type){const c=this.getHandlerForToken(u.type);if(c&&c.parseMarkdown){const f=this.createParseHelpers(),h=c.parseMarkdown(u,f);if(this.isMarkResult(h)){const m=this.applyMarkToContent(h.mark,h.content,h.attrs);o.push(...m)}else{const m=this.normalizeParseResult(h);Array.isArray(m)?o.push(...m):m&&o.push(m)}}else u.tokens&&o.push(...this.parseInlineTokens(u.tokens))}}for(let a=o.length-1;a>0;a-=1){const u=o[a],c=o[a-1];if(u.type==="text"&&c.type==="text"){const f=u.marks||[],h=c.marks||[];AW(f,h)&&(c.text=(c.text||"")+(u.text||""),o.splice(a,1))}}return o}applyMarkToContent(t,e,n){return e.map(r=>{if(r.type==="text"){const i=r.marks||[],o=n?{type:t,attrs:n}:{type:t};return{...r,marks:[...i,o]}}return{...r,content:r.content?this.applyMarkToContent(t,r.content,n):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:QD(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const n=zG(e,this.baseExtensions);return n.type==="doc"&&n.content?t.block?n.content:n.content.length===1&&n.content[0].type==="paragraph"&&n.content[0].content?n.content[0].content:n.content:n}catch(n){throw new Error(`Failed to parse HTML in markdown: ${n}`)}}isUnrecognizedHtml(t){return eX(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=Y9(this.baseExtensions),n=r=>{const i=r?.parseDOM;Array.isArray(i)&&i.forEach(o=>{if(typeof o?.tag=="string"){const a=o.tag.match(/^[a-zA-Z][\w-]*/);a&&t.add(a[0].toLowerCase())}})};Object.values(e.nodes).forEach(r=>n(r.spec)),Object.values(e.marks).forEach(r=>n(r.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const n=t.replace(/\s+$/,"");return n?e?{type:"paragraph",content:[{type:"text",text:n}]}:{type:"text",text:n}:null}encodeTextForMarkdown(t,e,n){return n?.type!=null&&this.codeTypes.has(n.type)||(e.marks||[]).some(i=>this.codeTypes.has(typeof i=="string"?i:i.type))?t:this.escapeMarkdownSyntax(xW(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,r=0,i={}){var o;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const a=this.getHandlerForToken(t.type);if(!a)return"";const u=Array.isArray(e?.content)&&n>0?e.content[n-1]:void 0,c={renderChildren:(m,g)=>{const b=a.isIndenting?r+1:r;return!Array.isArray(m)&&m.content?this.renderNodes(m.content,t,g||"",n,b):this.renderNodes(m,t,g||"",n,b)},renderChild:(m,g)=>{const b=a.isIndenting?r+1:r;return this.renderNodeToMarkdown(m,t,g,b)},indent:m=>this.indentString+m,wrapInBlock:VY},f={index:n,level:r,parentType:e?.type,previousNode:u,meta:{parentAttrs:e?.attrs,...i}};return((o=a.renderMarkdown)==null?void 0:o.call(a,t,c,f))||""}renderNodes(t,e,n="",r=0,i=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,n,i):t.type?this.renderNodeToMarkdown(t,e,r,i):""}renderNodesWithMarkBoundaries(t,e,n="",r=0){const i=[],o=new Map,a=new Set,u=new Map;return t.forEach((c,f)=>{const h=f<t.length-1?t[f+1]:null;if(c.type)if(c.type==="text"){let m=this.encodeTextForMarkdown(c.text||"",c,e);const g=new Map((c.marks||[]).map(A=>[A.type,A])),b=this.getMarksToOpenForSerialization(o,g,h),v=UY(g,h),C=v.filter(A=>o.has(A)),E=C.length>0&&b.length>0;let D="";if(v.length>0&&!E){const A=m.match(/(\s+)$/);A&&(D=A[1],m=m.slice(0,-D.length))}E||v.slice().reverse().forEach(A=>{if(!o.has(A))return;const O=g.get(A),M=this.getMarkClosing(A,O,u.get(A));M&&(m+=M),o.has(A)&&(o.delete(A),u.delete(A))});let w="";if(b.length>0){const A=m.match(/^(\s+)/);A&&(w=A[1],m=m.slice(w.length))}b.forEach(({type:A,mark:O})=>{const M=a.has(A)?"html":"markdown",P=this.getMarkOpening(A,O,M);P&&(m=P+m),u.set(A,M),a.delete(A)}),E||b.slice().reverse().forEach(({type:A,mark:O})=>{o.set(A,O)}),m=w+m;let $;if(E){const A=new Set((h?.marks||[]).map(P=>P.type));b.forEach(({type:P})=>{A.has(P)&&this.getHtmlReopenTags(P)&&a.add(P)});const O=Array.from(o.keys()),M=C.slice().sort((P,I)=>O.indexOf(I)-O.indexOf(P));$=[...b.map(P=>P.type),...M]}else $=GY(o,g,h,this.markSetsEqual.bind(this));let T="";if($.length>0){const A=m.match(/(\s+)$/);A&&(T=A[1],m=m.slice(0,-T.length))}$.forEach(A=>{var O;const M=(O=o.get(A))!=null?O:g.get(A),P=this.getMarkClosing(A,M,u.get(A));P&&(m+=P),o.delete(A),u.delete(A)}),m+=T,m+=D,i.push(m)}else{const m=new Set((c.marks||[]).map(D=>D.type)),g=new Map,b=new Map;o.forEach((D,w)=>{var $;m.has(w)&&(g.set(w,D),b.set(w,($=u.get(w))!=null?$:"markdown"))});const v=WY(o,(D,w)=>this.getMarkClosing(D,w,u.get(D)));u.clear();const C=this.renderNodeToMarkdown(c,e,f,r),E=c.type==="hardBreak"?"":QY(g,o,(D,w)=>{var $;const T=($=b.get(D))!=null?$:"markdown";return u.set(D,T),this.getMarkOpening(D,w,T)});i.push(v+C+E)}}),i.join(n)}getMarkOpening(t,e,n="markdown"){var r;if(n==="html")return((r=this.getHtmlReopenTags(t))==null?void 0:r.open)||"";const i=this.getHandlersForNodeType(t),o=i.length>0?i[0]:void 0;if(!o||!o.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=o.renderMarkdown(u,{renderChildren:()=>a,renderChild:()=>a,indent:h=>h,wrapInBlock:(h,m)=>h+m},{index:0,level:0,parentType:"text",meta:{}}),f=c.indexOf(a);return f>=0?c.substring(0,f):""}catch(c){throw new Error(`Failed to get mark opening for ${t}: ${c}`)}}getMarkClosing(t,e,n="markdown"){var r;if(n==="html")return((r=this.getHtmlReopenTags(t))==null?void 0:r.close)||"";const i=this.getHandlersForNodeType(t),o=i.length>0?i[0]:void 0;if(!o||!o.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=o.renderMarkdown(u,{renderChildren:()=>a,renderChild:()=>a,indent:m=>m,wrapInBlock:(m,g)=>m+g},{index:0,level:0,parentType:"text",meta:{}}),f=c.indexOf(a),h=f+a.length;return f>=0?c.substring(h):""}catch(c){throw new Error(`Failed to get mark closing for ${t}: ${c}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),n=e.length>0?e[0]:void 0;return n?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([n,r])=>{const i=e.get(n);return i&&kl(r.attrs,i.attrs)})}getMarksToOpenForSerialization(t,e,n){const r=qY(t,e);if(r.length<=1)return r;const i=n?.marks||[],o=(f,h)=>i.some(m=>m.type===f&&kl(m.attrs,h)),a=(f,h)=>{var m,g;const b=(m=this.extensionRanks.get(f.type))!=null?m:Number.MAX_SAFE_INTEGER,v=(g=this.extensionRanks.get(h.type))!=null?g:Number.MAX_SAFE_INTEGER;return b!==v?v-b:f.type.localeCompare(h.type)},u=r.filter(f=>!o(f.type,f.mark.attrs)).sort(a),c=r.filter(f=>o(f.type,f.mark.attrs)).sort(a);return[...u,...c]}},fk=tX,nX=pt.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType||Yf(t,e?.contentType)!=="markdown"||!this.editor.markdown)return xr.setContent(t,e);const r=this.editor.markdown.parse(t);return xr.setContent(r,e)},insertContent:(t,e)=>{if(!e?.contentType||Yf(t,e?.contentType)!=="markdown"||!this.editor.markdown)return xr.insertContent(t,e);const r=this.editor.markdown.parse(t);return xr.insertContent(r,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType||Yf(e,n?.contentType)!=="markdown"||!this.editor.markdown)return xr.insertContentAt(t,e,n);const i=this.editor.markdown.parse(e);return xr.insertContentAt(t,i,n)}}},addStorage(){return{manager:new fk({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new fk({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||Yf(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const n=this.editor.markdown.parse(this.editor.options.content);(t=n.content)!=null&&t.length&&(this.editor.options.content=n)}});const{getOwnPropertyNames:rX,getOwnPropertySymbols:iX}=Object,{hasOwnProperty:oX}=Object.prototype;function Hb(t,e){return function(r,i,o){return t(r,i,o)&&e(r,i,o)}}function Xf(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:o}=i,a=o.get(n),u=o.get(r);if(a&&u)return a===r&&u===n;o.set(n,r),o.set(r,n);const c=t(n,r,i);return o.delete(n),o.delete(r),c}}function sX(t){return t?.[Symbol.toStringTag]}function hk(t){return rX(t).concat(iX(t))}const aX=Object.hasOwn||((t,e)=>oX.call(t,e));function ca(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const lX="__v",uX="__o",cX="_owner",{getOwnPropertyDescriptor:pk,keys:mk}=Object;function dX(t,e){return t.byteLength===e.byteLength&&sp(new Uint8Array(t),new Uint8Array(e))}function fX(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function hX(t,e){return t.byteLength===e.byteLength&&sp(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function pX(t,e){return ca(t.getTime(),e.getTime())}function mX(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function gX(t,e){return t===e}function gk(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=t.entries();let a,u,c=0;for(;(a=o.next())&&!a.done;){const f=e.entries();let h=!1,m=0;for(;(u=f.next())&&!u.done;){if(i[m]){m++;continue}const g=a.value,b=u.value;if(n.equals(g[0],b[0],c,m,t,e,n)&&n.equals(g[1],b[1],g[0],b[0],t,e,n)){h=i[m]=!0;break}m++}if(!h)return!1;c++}return!0}const bX=ca;function yX(t,e,n){const r=mk(t);let i=r.length;if(mk(e).length!==i)return!1;for(;i-- >0;)if(!e8(t,e,n,r[i]))return!1;return!0}function Iu(t,e,n){const r=hk(t);let i=r.length;if(hk(e).length!==i)return!1;let o,a,u;for(;i-- >0;)if(o=r[i],!e8(t,e,n,o)||(a=pk(t,o),u=pk(e,o),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function vX(t,e){return ca(t.valueOf(),e.valueOf())}function xX(t,e){return t.source===e.source&&t.flags===e.flags}function bk(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=t.values();let a,u;for(;(a=o.next())&&!a.done;){const c=e.values();let f=!1,h=0;for(;(u=c.next())&&!u.done;){if(!i[h]&&n.equals(a.value,u.value,a.value,u.value,t,e,n)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function sp(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function CX(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function e8(t,e,n,r){return(r===cX||r===uX||r===lX)&&(t.$$typeof||e.$$typeof)?!0:aX(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const EX="[object ArrayBuffer]",DX="[object Arguments]",kX="[object Boolean]",SX="[object DataView]",$X="[object Date]",wX="[object Error]",TX="[object Map]",AX="[object Number]",BX="[object Object]",MX="[object RegExp]",RX="[object Set]",PX="[object String]",OX={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},NX="[object URL]",LX=Object.prototype.toString;function zX({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:a,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:b,unknownTagComparators:v}){return function(E,D,w){if(E===D)return!0;if(E==null||D==null)return!1;const $=typeof E;if($!==typeof D)return!1;if($!=="object")return $==="number"?u(E,D,w):$==="function"?o(E,D,w):!1;const T=E.constructor;if(T!==D.constructor)return!1;if(T===Object)return c(E,D,w);if(Array.isArray(E))return e(E,D,w);if(T===Date)return r(E,D,w);if(T===RegExp)return h(E,D,w);if(T===Map)return a(E,D,w);if(T===Set)return m(E,D,w);const A=LX.call(E);if(A===$X)return r(E,D,w);if(A===MX)return h(E,D,w);if(A===TX)return a(E,D,w);if(A===RX)return m(E,D,w);if(A===BX)return typeof E.then!="function"&&typeof D.then!="function"&&c(E,D,w);if(A===NX)return b(E,D,w);if(A===wX)return i(E,D,w);if(A===DX)return c(E,D,w);if(OX[A])return g(E,D,w);if(A===EX)return t(E,D,w);if(A===SX)return n(E,D,w);if(A===kX||A===AX||A===PX)return f(E,D,w);if(v){let O=v[A];if(!O){const M=sX(E);M&&(O=v[M])}if(O)return O(E,D,w)}return!1}}function IX({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:dX,areArraysEqual:n?Iu:fX,areDataViewsEqual:hX,areDatesEqual:pX,areErrorsEqual:mX,areFunctionsEqual:gX,areMapsEqual:n?Hb(gk,Iu):gk,areNumbersEqual:bX,areObjectsEqual:n?Iu:yX,arePrimitiveWrappersEqual:vX,areRegExpsEqual:xX,areSetsEqual:n?Hb(bk,Iu):bk,areTypedArraysEqual:n?Hb(sp,Iu):sp,areUrlsEqual:CX,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=Xf(r.areArraysEqual),o=Xf(r.areMapsEqual),a=Xf(r.areObjectsEqual),u=Xf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:u})}return r}function FX(t){return function(e,n,r,i,o,a,u){return t(e,n,u)}}function KX({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(u,c){const{cache:f=t?new WeakMap:void 0,meta:h}=n();return e(u,c,{cache:f,equals:r,meta:h,strict:i})};if(t)return function(u,c){return e(u,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,c){return e(u,c,o)}}const _X=Qo();Qo({strict:!0});Qo({circular:!0});Qo({circular:!0,strict:!0});Qo({createInternalComparator:()=>ca});Qo({strict:!0,createInternalComparator:()=>ca});Qo({circular:!0,createInternalComparator:()=>ca});Qo({circular:!0,createInternalComparator:()=>ca,strict:!0});function Qo(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,o=IX(t),a=zX(o),u=n?n(a):FX(a);return KX({circular:e,comparator:a,createState:r,equals:u,strict:i})}var jX=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},HX=({contentComponent:t})=>{const e=Xy.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return B.jsx(B.Fragment,{children:Object.values(e)})};function VX(){const t=new Set;let e={},n=!1;const r=()=>{n||!t.size||(n=!0,queueMicrotask(()=>{n=!1,t.forEach(i=>i())}))};return{subscribe(i){return t.add(i),()=>{t.delete(i)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(i,o){e={...e,[i]:dS.createPortal(o.reactElement,o.element,i)},r()},removeRenderer(i){const o={...e};delete o[i],e=o,r()}}}var UX=class extends H.Component{constructor(t){super(t),this.editorContentRef=H.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=VX(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return B.jsxs(B.Fragment,{children:[B.jsx("div",{ref:jX(e,this.editorContentRef),...n}),t?.contentComponent&&B.jsx(HX,{contentComponent:t.contentComponent})]})}},qX=k.forwardRef((t,e)=>{const n=H.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return H.createElement(UX,{key:n,innerRef:e,...t})}),t8=H.memo(qX),GX=typeof window<"u"?k.useLayoutEffect:k.useEffect,WX=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e;const n=i=>{i?.transaction!==void 0&&i.transaction===e||(e=i?.transaction,this.transactionNumber+=1,this.subscribers.forEach(o=>o()))},r=this.editor;return r.on("transaction",n),r.on("update",n),()=>{r.off("transaction",n),r.off("update",n)}}}};function QX(t){var e;const[n]=k.useState(()=>new WX(t.editor)),r=cS.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:_X);return GX(()=>n.watch(t.editor),[t.editor,n]),k.useDebugValue(r),r}var YX=!1,n8=typeof window>"u",XX=n8||!!(typeof window<"u"&&window.next),JX=class r8{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){const e=this.options.current.immediatelyRender;let n=e??!0;return n8?(n&&YX&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):XX&&e===void 0&&(n=!1),n?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...r)},onDelete:(...r)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...r)},onMount:(...r)=>{var i,o;return(o=(i=this.options.current).onMount)==null?void 0:o.call(i,...r)},onUnmount:(...r)=>{var i,o;return(o=(i=this.options.current).onUnmount)==null?void 0:o.call(i,...r)}};return new KW(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,o)=>{var a;return i===((a=n.extensions)==null?void 0:a[o])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?r8.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function ZX(t={},e=[]){const n=k.useRef(t);n.current=t;const[r]=k.useState(()=>new JX(n)),i=Xy.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return k.useDebugValue(i),k.useEffect(r.onRender(e)),QX({editor:i,selector:({transactionNumber:o})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&o===0?0:o+1}),i}var i8=k.createContext({editor:null});i8.Consumer;var eJ=k.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),tJ=()=>k.useContext(eJ);H.forwardRef((t,e)=>{const{onDragStart:n}=tJ(),r=t.as||"div";return B.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});H.createContext({markViewContentRef:()=>{}});var y1=k.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});y1.displayName="TiptapContext";var nJ=()=>k.useContext(y1);function o8({children:t,...e}){const n="editor"in e?e.editor:e.instance;if(!n)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const r=k.useMemo(()=>({editor:n}),[n]),i=k.useMemo(()=>({editor:n}),[n]);return B.jsx(i8.Provider,{value:i,children:B.jsx(y1.Provider,{value:r,children:t})})}o8.displayName="Tiptap";function s8({...t}){const{editor:e}=nJ();return B.jsx(t8,{editor:e,...t})}s8.displayName="Tiptap.Content";Object.assign(o8,{Content:s8});var ap=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},rJ=(t,e)=>{var n;const{state:r,view:i}=t,{selection:o}=r;if(!o.empty)return!1;const{$from:a}=o;if(a.parentOffset!==0)return!1;const u=a.depth-1;if(u<0)return!1;const c=a.node(u),f=a.index(u);if(f===0)return!1;if(c.type===e)return t.commands.lift(e.name);const h=c.child(f-1);if(h.type!==e||!((n=h.lastChild)!=null&&n.isTextblock))return!1;const m=a.before(),b=m-1-1,{tr:v}=r;return v.delete(m,a.after()).insert(b,a.parent.content),v.setSelection(ke.create(v.doc,b)),i.dispatch(v.scrollIntoView()),!0},iJ=/^\s*>\s$/,oJ=Qn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return ap("blockquote",{...zt(this.options.HTMLAttributes,t),children:ap("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((i,o)=>{var a,u;const h=((u=(a=e.renderChild)==null?void 0:a.call(e,i,o))!=null?u:e.renderChildren([i])).split(`
|
|
201
|
+
`).map(m=>m.trim()===""?n:`${n} ${m}`);r.push(h.join(`
|
|
202
|
+
`))}),r.join(`
|
|
203
|
+
${n}
|
|
204
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>rJ(this.editor,this.type)}},addInputRules(){return[Sl({find:iJ,type:this.type})]}}),sJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,aJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,lJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,uJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,cJ=la.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return ap("strong",{...zt(this.options.HTMLAttributes,t),children:ap("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Zs({find:sJ,type:this.type}),Zs({find:lJ,type:this.type})]},addPasteRules(){return[Io({find:aJ,type:this.type}),Io({find:uJ,type:this.type})]}}),dJ=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},fJ=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=e.exec(t))!==null;)r.index>0&&t[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},hJ=la.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",zt(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Zs({find:dJ,type:this.type})]},addPasteRules(){return[Io({find:fJ,type:this.type})]}}),Vb=4,pJ=/^```([a-z]+)?[\s\n]$/,mJ=/^~~~([a-z]+)?[\s\n]$/,gJ=Qn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:Vb,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const o=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",zt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(`
|
|
205
|
+
`):r=`\`\`\`${i}
|
|
206
|
+
|
|
207
|
+
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Vb,{state:r}=t,{selection:i}=r,{$from:o,empty:a}=i;if(o.parent.type!==this.type)return!1;const u=" ".repeat(n);return a?t.commands.insertContent(u):t.commands.command(({tr:c})=>{const{from:f,to:h}=i,b=r.doc.textBetween(f,h,`
|
|
208
|
+
`,`
|
|
209
|
+
`).split(`
|
|
210
|
+
`).map(v=>u+v).join(`
|
|
211
|
+
`);return c.replaceWith(f,h,r.schema.text(b)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:Vb,{state:r}=t,{selection:i}=r,{$from:o,empty:a}=i;return o.parent.type!==this.type?!1:a?t.commands.command(({tr:u})=>{var c;const{pos:f}=o,h=o.start(),m=o.end(),b=r.doc.textBetween(h,m,`
|
|
212
|
+
`,`
|
|
213
|
+
`).split(`
|
|
214
|
+
`);let v=0,C=0;const E=f-h;for(let O=0;O<b.length;O+=1){if(C+b[O].length>=E){v=O;break}C+=b[O].length+1}const w=((c=b[v].match(/^ */))==null?void 0:c[0])||"",$=Math.min(w.length,n);if($===0)return!0;let T=h;for(let O=0;O<v;O+=1)T+=b[O].length+1;return u.delete(T,T+$),f-T<=$&&u.setSelection(ke.create(u.doc,T)),!0}):t.commands.command(({tr:u})=>{const{from:c,to:f}=i,g=r.doc.textBetween(c,f,`
|
|
215
|
+
`,`
|
|
216
|
+
`).split(`
|
|
217
|
+
`).map(b=>{var v;const C=((v=b.match(/^ */))==null?void 0:v[0])||"",E=Math.min(C.length,n);return b.slice(E)}).join(`
|
|
218
|
+
`);return u.replaceWith(c,f,r.schema.text(g)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
|
|
219
|
+
|
|
220
|
+
`);return!o||!a?!1:t.chain().command(({tr:u})=>(u.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:t})=>{if(!this.options.exitOnArrowUp)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||r.parentOffset!==0)return!1;const o=r.before();return o>0?!1:t.commands.insertDefaultBlock({pos:o})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const u=i.after();return u===void 0?!1:r.nodeAt(u)?t.commands.command(({tr:f})=>(f.setSelection(Me.near(r.resolve(u))),!0)):t.commands.exitCode()}}},addInputRules(){return[uy({find:pJ,type:this.type,getAttributes:t=>({language:t[1]})}),uy({find:mJ,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ht({key:new It("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i?.mode;if(!n||!o)return!1;const{tr:a,schema:u}=t.state,c=u.text(n.replace(/\r\n?/g,`
|
|
221
|
+
`));return a.replaceSelectionWith(this.type.create({language:o},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(ke.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),bJ=Qn.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
222
|
+
|
|
223
|
+
`):""}),yJ=Qn.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",zt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
224
|
+
`},renderMarkdown:()=>`
|
|
225
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:u}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:f,dispatch:h})=>{if(h&&c&&a){const m=c.filter(g=>u.includes(g.type.name));f.ensureMarks(m)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),vJ=Qn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,zt(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>uy({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),xJ=Qn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",zt(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!yW(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return e7(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:o,tr:a,dispatch:u})=>{if(u){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(ke.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(xe.create(a.doc,c.pos)):a.setSelection(ke.create(a.doc,c.pos));else{const h=o.schema.nodes[this.options.nextNodeType]||c.parent.type.contentMatch.defaultType,m=h?.create();m&&(a.insert(f,m),a.setSelection(ke.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[_W({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),CJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,EJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,DJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,kJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,SJ=la.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",zt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Zs({find:CJ,type:this.type}),Zs({find:DJ,type:this.type})]},addPasteRules(){return[Io({find:EJ,type:this.type}),Io({find:kJ,type:this.type})]}});const $J="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",wJ="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",by="numeric",yy="ascii",vy="alpha",dc="asciinumeric",Ju="alphanumeric",xy="domain",a8="emoji",TJ="scheme",AJ="slashscheme",Ub="whitespace";function BJ(t,e){return t in e||(e[t]=[]),e[t]}function Ns(t,e,n){e[by]&&(e[dc]=!0,e[Ju]=!0),e[yy]&&(e[dc]=!0,e[vy]=!0),e[dc]&&(e[Ju]=!0),e[vy]&&(e[Ju]=!0),e[Ju]&&(e[xy]=!0),e[a8]&&(e[xy]=!0);for(const r in e){const i=BJ(r,n);i.indexOf(t)<0&&i.push(t)}}function MJ(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Pn(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Pn.groups={};Pn.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||Pn.groups;let i;return e&&e.j?i=e:(i=new Pn(e),n&&r&&Ns(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const o=t.length;if(!o)return i;for(let a=0;a<o-1;a++)i=i.tt(t[a]);return i.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||Pn.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const o=e;let a,u=i.go(t);if(u?(a=new Pn,Object.assign(a.j,u.j),a.jr.push.apply(a.jr,u.jr),a.jd=u.jd,a.t=u.t):a=new Pn,o){if(r)if(a.t&&typeof a.t=="string"){const c=Object.assign(MJ(a.t,r),n);Ns(o,c,r)}else n&&Ns(o,n,r);a.t=o}return i.j[t]=a,a}};const Re=(t,e,n,r,i)=>t.ta(e,n,r,i),bt=(t,e,n,r,i)=>t.tr(e,n,r,i),yk=(t,e,n,r,i)=>t.ts(e,n,r,i),ce=(t,e,n,r,i)=>t.tt(e,n,r,i),yi="WORD",Cy="UWORD",l8="ASCIINUMERICAL",u8="ALPHANUMERICAL",Kc="LOCALHOST",Ey="TLD",Dy="UTLD",mh="SCHEME",ol="SLASH_SCHEME",v1="NUM",ky="WS",x1="NL",fc="OPENBRACE",hc="CLOSEBRACE",lp="OPENBRACKET",up="CLOSEBRACKET",cp="OPENPAREN",dp="CLOSEPAREN",fp="OPENANGLEBRACKET",hp="CLOSEANGLEBRACKET",pp="FULLWIDTHLEFTPAREN",mp="FULLWIDTHRIGHTPAREN",gp="LEFTCORNERBRACKET",bp="RIGHTCORNERBRACKET",yp="LEFTWHITECORNERBRACKET",vp="RIGHTWHITECORNERBRACKET",xp="FULLWIDTHLESSTHAN",Cp="FULLWIDTHGREATERTHAN",Ep="AMPERSAND",Dp="APOSTROPHE",kp="ASTERISK",po="AT",Sp="BACKSLASH",$p="BACKTICK",wp="CARET",Ls="COLON",C1="COMMA",Tp="DOLLAR",Fr="DOT",Ap="EQUALS",E1="EXCLAMATION",ar="HYPHEN",pc="PERCENT",Bp="PIPE",Mp="PLUS",Rp="POUND",mc="QUERY",D1="QUOTE",c8="FULLWIDTHMIDDLEDOT",k1="SEMI",Kr="SLASH",gc="TILDE",Pp="UNDERSCORE",d8="EMOJI",Op="SYM";var f8=Object.freeze({__proto__:null,ALPHANUMERICAL:u8,AMPERSAND:Ep,APOSTROPHE:Dp,ASCIINUMERICAL:l8,ASTERISK:kp,AT:po,BACKSLASH:Sp,BACKTICK:$p,CARET:wp,CLOSEANGLEBRACKET:hp,CLOSEBRACE:hc,CLOSEBRACKET:up,CLOSEPAREN:dp,COLON:Ls,COMMA:C1,DOLLAR:Tp,DOT:Fr,EMOJI:d8,EQUALS:Ap,EXCLAMATION:E1,FULLWIDTHGREATERTHAN:Cp,FULLWIDTHLEFTPAREN:pp,FULLWIDTHLESSTHAN:xp,FULLWIDTHMIDDLEDOT:c8,FULLWIDTHRIGHTPAREN:mp,HYPHEN:ar,LEFTCORNERBRACKET:gp,LEFTWHITECORNERBRACKET:yp,LOCALHOST:Kc,NL:x1,NUM:v1,OPENANGLEBRACKET:fp,OPENBRACE:fc,OPENBRACKET:lp,OPENPAREN:cp,PERCENT:pc,PIPE:Bp,PLUS:Mp,POUND:Rp,QUERY:mc,QUOTE:D1,RIGHTCORNERBRACKET:bp,RIGHTWHITECORNERBRACKET:vp,SCHEME:mh,SEMI:k1,SLASH:Kr,SLASH_SCHEME:ol,SYM:Op,TILDE:gc,TLD:Ey,UNDERSCORE:Pp,UTLD:Dy,UWORD:Cy,WORD:yi,WS:ky});const mi=/[a-z]/,Fu=new RegExp("\\p{L}","u"),qb=new RegExp("\\p{Emoji}","u"),gi=/\d/,Gb=/\s/,vk="\r",Wb=`
|
|
226
|
+
`,RJ="️",PJ="",Qb="";let Jf=null,Zf=null;function OJ(t=[]){const e={};Pn.groups=e;const n=new Pn;Jf==null&&(Jf=xk($J)),Zf==null&&(Zf=xk(wJ)),ce(n,"'",Dp),ce(n,"{",fc),ce(n,"}",hc),ce(n,"[",lp),ce(n,"]",up),ce(n,"(",cp),ce(n,")",dp),ce(n,"<",fp),ce(n,">",hp),ce(n,"(",pp),ce(n,")",mp),ce(n,"「",gp),ce(n,"」",bp),ce(n,"『",yp),ce(n,"』",vp),ce(n,"<",xp),ce(n,">",Cp),ce(n,"&",Ep),ce(n,"*",kp),ce(n,"@",po),ce(n,"`",$p),ce(n,"^",wp),ce(n,":",Ls),ce(n,",",C1),ce(n,"$",Tp),ce(n,".",Fr),ce(n,"=",Ap),ce(n,"!",E1),ce(n,"-",ar),ce(n,"%",pc),ce(n,"|",Bp),ce(n,"+",Mp),ce(n,"#",Rp),ce(n,"?",mc),ce(n,'"',D1),ce(n,"/",Kr),ce(n,";",k1),ce(n,"~",gc),ce(n,"_",Pp),ce(n,"\\",Sp),ce(n,"・",c8);const r=bt(n,gi,v1,{[by]:!0});bt(r,gi,r);const i=bt(r,mi,l8,{[dc]:!0}),o=bt(r,Fu,u8,{[Ju]:!0}),a=bt(n,mi,yi,{[yy]:!0});bt(a,gi,i),bt(a,mi,a),bt(i,gi,i),bt(i,mi,i);const u=bt(n,Fu,Cy,{[vy]:!0});bt(u,mi),bt(u,gi,o),bt(u,Fu,u),bt(o,gi,o),bt(o,mi),bt(o,Fu,o);const c=ce(n,Wb,x1,{[Ub]:!0}),f=ce(n,vk,ky,{[Ub]:!0}),h=bt(n,Gb,ky,{[Ub]:!0});ce(n,Qb,h),ce(f,Wb,c),ce(f,Qb,h),bt(f,Gb,h),ce(h,vk),ce(h,Wb),bt(h,Gb,h),ce(h,Qb,h);const m=bt(n,qb,d8,{[a8]:!0});ce(m,"#"),bt(m,qb,m),ce(m,RJ,m);const g=ce(m,PJ);ce(g,"#"),bt(g,qb,m);const b=[[mi,a],[gi,i]],v=[[mi,null],[Fu,u],[gi,o]];for(let C=0;C<Jf.length;C++)ao(n,Jf[C],Ey,yi,b);for(let C=0;C<Zf.length;C++)ao(n,Zf[C],Dy,Cy,v);Ns(Ey,{tld:!0,ascii:!0},e),Ns(Dy,{utld:!0,alpha:!0},e),ao(n,"file",mh,yi,b),ao(n,"mailto",mh,yi,b),ao(n,"http",ol,yi,b),ao(n,"https",ol,yi,b),ao(n,"ftp",ol,yi,b),ao(n,"ftps",ol,yi,b),Ns(mh,{scheme:!0,ascii:!0},e),Ns(ol,{slashscheme:!0,ascii:!0},e),t=t.sort((C,E)=>C[0]>E[0]?1:-1);for(let C=0;C<t.length;C++){const E=t[C][0],w=t[C][1]?{[TJ]:!0}:{[AJ]:!0};E.indexOf("-")>=0?w[xy]=!0:mi.test(E)?gi.test(E)?w[dc]=!0:w[yy]=!0:w[by]=!0,yk(n,E,E,w)}return yk(n,"localhost",Kc,{ascii:!0}),n.jd=new Pn(Op),{start:n,tokens:Object.assign({groups:e},f8)}}function h8(t,e){const n=NJ(e.replace(/[A-Z]/g,u=>u.toLowerCase())),r=n.length,i=[];let o=0,a=0;for(;a<r;){let u=t,c=null,f=0,h=null,m=-1,g=-1;for(;a<r&&(c=u.go(n[a]));)u=c,u.accepts()?(m=0,g=0,h=u):m>=0&&(m+=n[a].length,g++),f+=n[a].length,o+=n[a].length,a++;o-=m,a-=g,f-=m,i.push({t:h.t,v:e.slice(o-f,o),s:o-f,e:o})}return i}function NJ(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),o,a=i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function ao(t,e,n,r,i){let o;const a=e.length;for(let u=0;u<a-1;u++){const c=e[u];t.j[c]?o=t.j[c]:(o=new Pn(r),o.jr=i.slice(),t.j[c]=o),t=o}return o=new Pn(n),o.jr=i.slice(),t.j[e[a-1]]=o,o}function xk(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let o=0;for(;i.indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+o),10);a>0;a--)n.pop();r+=o}else n.push(t[r]),r++}return e}const _c={defaultProtocol:"http",events:null,format:Ck,formatHref:Ck,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function S1(t,e=null){let n=Object.assign({},_c);t&&(n=Object.assign(n,t instanceof S1?t.o:t));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}S1.prototype={o:_c,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:_c[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Ck(t){return t}function p8(t,e){this.t="token",this.v=t,this.tk=e}p8.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=_c.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),o=this.toFormattedString(t),a={},u=t.get("className",n,e),c=t.get("target",n,e),f=t.get("rel",n,e),h=t.getObj("attributes",n,e),m=t.getObj("events",n,e);return a.href=r,u&&(a.class=u),c&&(a.target=c),f&&(a.rel=f),h&&Object.assign(a,h),{tagName:i,attributes:a,content:o,eventListeners:m}}};function Cm(t,e){class n extends p8{constructor(i,o){super(i,o),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const LJ=Cm("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ek=Cm("text"),zJ=Cm("nl"),eh=Cm("url",{isLink:!0,toHref(t=_c.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Kc&&t[1].t===Ls}}),sr=t=>new Pn(t);function IJ({groups:t}){const e=t.domain.concat([Ep,kp,po,Sp,$p,wp,Tp,Ap,ar,v1,pc,Bp,Mp,Rp,Kr,Op,gc,Pp]),n=[Dp,Ls,C1,Fr,E1,pc,mc,D1,k1,fp,hp,fc,hc,up,lp,cp,dp,pp,mp,gp,bp,yp,vp,xp,Cp],r=[Ep,Dp,kp,Sp,$p,wp,Tp,Ap,ar,fc,hc,pc,Bp,Mp,Rp,mc,Kr,Op,gc,Pp],i=sr(),o=ce(i,gc);Re(o,r,o),Re(o,t.domain,o);const a=sr(),u=sr(),c=sr();Re(i,t.domain,a),Re(i,t.scheme,u),Re(i,t.slashscheme,c),Re(a,r,o),Re(a,t.domain,a);const f=ce(a,po);ce(o,po,f),ce(u,po,f),ce(c,po,f);const h=ce(o,Fr);Re(h,r,o),Re(h,t.domain,o);const m=sr();Re(f,t.domain,m),Re(m,t.domain,m);const g=ce(m,Fr);Re(g,t.domain,m);const b=sr(LJ);Re(g,t.tld,b),Re(g,t.utld,b),ce(f,Kc,b);const v=ce(m,ar);ce(v,ar,v),Re(v,t.domain,m),Re(b,t.domain,m),ce(b,Fr,g),ce(b,ar,v);const C=ce(a,ar),E=ce(a,Fr);ce(C,ar,C),Re(C,t.domain,a),Re(E,r,o),Re(E,t.domain,a);const D=sr(eh);Re(E,t.tld,D),Re(E,t.utld,D),Re(D,t.domain,a),Re(D,r,o),ce(D,Fr,E),ce(D,ar,C),ce(D,po,f);const w=ce(D,Ls),$=sr(eh);Re(w,t.numeric,$);const T=sr(eh),A=sr();Re(T,e,T),Re(T,n,A),Re(A,e,T),Re(A,n,A),ce(D,Kr,T),ce($,Kr,T);const O=ce(u,Ls),M=ce(c,Ls),P=ce(M,Kr),I=ce(P,Kr);Re(u,t.domain,a),ce(u,Fr,E),ce(u,ar,C),Re(c,t.domain,a),ce(c,Fr,E),ce(c,ar,C),Re(O,t.domain,T),ce(O,Kr,T),ce(O,mc,T),Re(I,t.domain,T),Re(I,e,T),ce(I,Kr,T);const G=[[fc,hc],[lp,up],[cp,dp],[fp,hp],[pp,mp],[gp,bp],[yp,vp],[xp,Cp]];for(let J=0;J<G.length;J++){const[U,ie]=G[J],F=ce(T,U);ce(A,U,F);const te=sr(eh);Re(F,e,te);const N=sr();Re(F,n,N),ce(F,ie,T),Re(te,e,te),Re(te,n,N),Re(N,e,te),Re(N,n,N),ce(te,ie,T),ce(N,ie,T)}return ce(i,Kc,D),ce(i,x1,zJ),{start:i,tokens:f8}}function FJ(t,e,n){let r=n.length,i=0,o=[],a=[];for(;i<r;){let u=t,c=null,f=null,h=0,m=null,g=-1;for(;i<r&&!(c=u.go(n[i].t));)a.push(n[i++]);for(;i<r&&(f=c||u.go(n[i].t));)c=null,u=f,u.accepts()?(g=0,m=u):g>=0&&g++,i++,h++;if(g<0)i-=h,i<r&&(a.push(n[i]),i++);else{a.length>0&&(o.push(Yb(Ek,e,a)),a=[]),i-=g,h-=g;const b=m.t,v=n.slice(i-h,i);o.push(Yb(b,e,v))}}return a.length>0&&o.push(Yb(Ek,e,a)),o}function Yb(t,e,n){const r=n[0].s,i=n[n.length-1].e,o=e.slice(r,i);return new t(o,n)}const KJ=typeof console<"u"&&console&&console.warn||(()=>{}),_J="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ct={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jJ(){return Pn.groups={},ct.scanner=null,ct.parser=null,ct.tokenQueue=[],ct.pluginQueue=[],ct.customSchemes=[],ct.initialized=!1,ct}function Dk(t,e=!1){if(ct.initialized&&KJ(`linkifyjs: already initialized - will not register custom scheme "${t}" ${_J}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
227
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
228
|
+
2. Cannot start or end with "-"
|
|
229
|
+
3. "-" cannot repeat`);ct.customSchemes.push([t,e])}function HJ(){ct.scanner=OJ(ct.customSchemes);for(let t=0;t<ct.tokenQueue.length;t++)ct.tokenQueue[t][1]({scanner:ct.scanner});ct.parser=IJ(ct.scanner.tokens);for(let t=0;t<ct.pluginQueue.length;t++)ct.pluginQueue[t][1]({scanner:ct.scanner,parser:ct.parser});return ct.initialized=!0,ct}function $1(t){return ct.initialized||HJ(),FJ(ct.parser.start,t,h8(ct.scanner.start,t))}$1.scan=h8;function m8(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new S1(n),i=$1(t),o=[];for(let a=0;a<i.length;a++){const u=i[a];u.isLink&&(!e||u.t===e)&&r.check(u)&&o.push(u.toFormattedObject(r))}return o}var w1="[\0- -\u2029 ]",VJ=new RegExp(w1),UJ=new RegExp(`${w1}$`),qJ=new RegExp(w1,"g");function GJ(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function WJ(t){return new ht({key:new It("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(f=>f.docChanged)&&!n.doc.eq(r.doc),o=e.some(f=>f.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=r,u=q9(n.doc,[...e]);if(Z3(u).forEach(({newRange:f})=>{const h=MG(r.doc,f,b=>b.isTextblock);let m,g;if(h.length>1)m=h[0],g=r.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(h.length){const b=r.doc.textBetween(f.from,f.to," "," ");if(!UJ.test(b))return;m=h[0],g=r.doc.textBetween(m.pos,f.to,void 0," ")}if(m&&g){const b=g.split(VJ).filter(Boolean);if(b.length<=0)return!1;const v=b[b.length-1],C=m.pos+g.lastIndexOf(v);if(!v)return!1;const E=$1(v).map(D=>D.toObject(t.defaultProtocol));if(!GJ(E))return!1;E.filter(D=>D.isLink).map(D=>({...D,from:C+D.start+1,to:C+D.end+1})).filter(D=>r.schema.marks.code?!r.doc.rangeHasMark(D.from,D.to,r.schema.marks.code):!0).filter(D=>t.validate(D.value)).filter(D=>t.shouldAutoLink(D.value)).forEach(D=>{e1(D.from,D.to,r.doc).some(w=>w.mark.type===t.type)||a.addMark(D.from,D.to,t.type.create({href:D.href}))})}}),!!a.steps.length)return a}})}function QJ(t){return new ht({key:new It("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,o;if(r.button!==0||!e.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const c=r.target;if(!c)return!1;const f=t.editor.view.dom;a=c.closest("a"),a&&!f.contains(a)&&(a=null)}if(!a)return!1;let u=!1;if(t.enableClickSelection&&(u=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const c=Z9(e.state,t.type.name),f=(i=a.href)!=null?i:c.href,h=(o=a.target)!=null?o:c.target;f&&(window.open(f,h),u=!0)}return u}}})}var YJ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,XJ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function g8(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function JJ(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&g8(t,r)){r+=1;continue}let i=0;for(;r<e&&t[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function b8(t,e,n){var r,i;const[,o,a]=e;return(e.index?t[e.index-1]:void 0)==="!"||g8(t,(r=e.index)!=null?r:0)||JJ(t,(i=e.index)!=null?i:0)?!1:!!o.trim()&&n(a)}function y8(t){var e,n;const[r,i,o,,a,u,c]=t,f=(e=a??u)!=null?e:c;return{index:(n=t.index)!=null?n:0,text:r,replaceWith:i,data:{href:o,title:f||null,markdown:!0}}}function ZJ(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function v8(t){var e,n,r;return{href:(e=t.data)==null?void 0:e.href,title:(r=(n=t.data)==null?void 0:n.title)!=null?r:null}}function eZ(t){const e=Zs({find:n=>{const r=YJ.exec(n);return!r||!b8(n,r,t.isAllowedHref)?null:y8(r)},type:t.type,getAttributes:v8});return new rd({find:e.find,handler:n=>{const r=e.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function tZ(t){const e=Io({find:n=>{var r,i;const o=[];for(const u of n.matchAll(XJ))b8(n,u,t.isAllowedHref)&&o.push(y8(u));const a=((i=(r=t.findPlainUrls)==null?void 0:r.call(t,n))!=null?i:[]).filter(u=>!o.some(c=>ZJ(c,u)));return[...o,...a]},type:t.type,getAttributes:v8});return new s7({find:e.find,handler:n=>{var r;const i=e.handler(n);return i!==null&&n.state.tr.steps.length&&((r=n.match.data)!=null&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),i}})}function nZ(t){return new ht({key:new It("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:o}=e,{selection:a}=o,{empty:u}=a;if(u)return!1;let c="";r.content.forEach(h=>{c+=h.textContent});const f=m8(c,{defaultProtocol:t.defaultProtocol}).find(h=>h.isLink&&h.value===c);return!c||!f||i!==void 0&&!i(f.value)?!1:t.editor.commands.setMark(t.type,{href:f.href})}}})}function bi(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(qJ,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var rZ=la.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Dk(t);return}Dk(t.scheme,t.optionalSlashes)})},onDestroy(){jJ()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!bi(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){var t,e,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(t=this.options.HTMLAttributes.target)!=null?t:null},rel:{default:(e=this.options.HTMLAttributes.rel)!=null?e:null},class:{default:(n=this.options.HTMLAttributes.class)!=null?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!bi(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!bi(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",zt(this.options.HTMLAttributes,t),0]:["a",zt(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,o;const a=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",u=(o=(i=t.attrs)==null?void 0:i.title)!=null?o:"",c=e.renderChildren(t);return u?`[${c}](${a} "${u}")`:`[${c}](${a})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!bi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!bi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[eZ({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:e=>!!bi(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const t=e=>{const n=[];if(e){const{protocols:r,defaultProtocol:i}=this.options;m8(e).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:u=>!!bi(u,r),protocols:r,defaultProtocol:i})).forEach(a=>{this.options.shouldAutoLink(a.value)&&n.push({text:a.value,data:{href:a.href},index:a.start})})}return n};return this.options.markdownLinks?[tZ({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:n=>!!bi(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[Io({find:t,type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)==null?void 0:n.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(WJ({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!bi(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(QJ({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(nZ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),th=" ",Xb=" ",iZ=Qn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",zt(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===th||n[0].text===th||n[0].raw===Xb||n[0].text===Xb)&&r.length===1&&r[0].type==="text"&&(r[0].text===th||r[0].text===Xb)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const o=Array.isArray(t.content)?t.content:[];if(o.length===0){const a=Array.isArray((r=n?.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n?.previousNode)==null?void 0:i.type)==="paragraph"&&a.length===0?th:""}return e.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),oZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,sZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,aZ=la.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",zt(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Zs({find:oZ,type:this.type})]},addPasteRules(){return[Io({find:sZ,type:this.type})]}}),lZ=Qn.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),uZ=la.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",zt(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const o=i[2].trim();return{type:"underline",raw:i[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),cZ=pt.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(cJ.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(oJ.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(x7.configure(this.options.bulletList)),this.options.code!==!1&&i.push(hJ.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(gJ.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(bJ.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(zQ.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(IQ.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(yJ.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(vJ.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(eY.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(xJ.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(SJ.configure(this.options.italic)),this.options.listItem!==!1&&i.push(S7.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(A7.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(rZ.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(M7.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(iZ.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(aZ.configure(this.options.strike)),this.options.text!==!1&&i.push(lZ.configure(this.options.text)),this.options.underline!==!1&&i.push(uZ.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(ZQ.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),dZ=cZ;function gh({defaultValue:t="",editable:e=!0,placeholder:n="",ariaLabel:r,autoFocus:i=!1,className:o,onBlur:a,onChange:u,onSubmit:c,ref:f}){const h=k.useRef({onBlur:a,onChange:u,onSubmit:c});h.current={onBlur:a,onChange:u,onSubmit:c};const m=k.useRef(""),[g]=k.useState(()=>[dZ.configure({underline:!1,link:{openOnClick:!1}}),P7,R7.configure({nested:!0}),nX,WQ.configure({placeholder:n}),pt.create({name:"submitKeymap",addKeyboardShortcuts(){return{"Mod-Enter":()=>h.current.onSubmit?(h.current.onSubmit(),!0):!1}}})]),b=ZX({extensions:g,content:t,contentType:"markdown",editable:e,autofocus:i,editorProps:{attributes:{class:Ce("typeset min-w-0 [--typeset-size:0.875rem]",o),...r?{"aria-label":r}:{}}},onCreate({editor:v}){m.current=v.getMarkdown()},onUpdate({editor:v}){h.current.onChange?.(v.getMarkdown())},onBlur({editor:v}){const C=v.getMarkdown();C!==m.current&&(m.current=C,h.current.onBlur?.(C))}});return k.useImperativeHandle(f,()=>({getMarkdown:()=>b?.getMarkdown()??"",clear:()=>{b?.commands.clearContent(!0),m.current=b?.getMarkdown()??""},focus:()=>b?.commands.focus()}),[b]),B.jsx(t8,{editor:b,"data-slot":"rich-text-editor"})}function fZ({className:t,size:e="default",...n}){return B.jsxs("div",{className:Ce("group/native-select relative w-fit has-[select:disabled]:opacity-50",t),"data-slot":"native-select-wrapper","data-size":e,children:[B.jsx("select",{"data-slot":"native-select","data-size":e,className:"h-9 w-full min-w-0 appearance-none rounded-3xl border border-transparent bg-input/50 py-1 pr-8 pl-3 text-sm transition-[color,box-shadow,background-color] outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-8 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",...n}),B.jsx(WB,{className:"pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none","aria-hidden":"true","data-slot":"native-select-icon"})]})}function hZ({className:t,...e}){return B.jsx("option",{"data-slot":"native-select-option",className:Ce("bg-[Canvas] text-[CanvasText]",t),...e})}function pZ({open:t,onOpenChange:e,onCreated:n,allTasks:r}){const[i,o]=k.useState(""),[a,u]=k.useState(""),c=k.useRef(null),[f,h]=k.useState("todo"),[m,g]=k.useState(null),[b,v]=k.useState([]),[C,E]=k.useState(!1),D=()=>{const w=i.trim();w&&w_({title:w,description:a.trim(),status:f,milestone:m,tags:b,needsHuman:C}).then(()=>{o(""),u(""),c.current?.clear(),h("todo"),g(null),v([]),E(!1),e(!1),n()})};return B.jsxs(pH,{isOpen:t,onOpenChange:e,className:"sm:max-w-lg","aria-label":"New task",children:[B.jsx(mH,{children:B.jsx(bH,{children:"New task"})}),B.jsxs("div",{className:"grid gap-3",children:[B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{htmlFor:"new-title",children:"Title"}),B.jsx(JB,{id:"new-title",autoFocus:!0,value:i,onChange:w=>o(w.target.value),onKeyDown:w=>{w.key==="Enter"&&D()},placeholder:"What needs doing?"})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{children:"Description"}),B.jsx(gh,{ref:c,ariaLabel:"Description",defaultValue:a,onChange:u,placeholder:"Optional context, constraints, links…",className:"min-h-16 rounded-2xl border border-transparent bg-input/50 px-3 py-3 transition-[color,box-shadow,background-color] focus:border-ring focus:ring-3 focus:ring-ring/30"})]}),B.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{htmlFor:"new-status",children:"Status"}),B.jsx(fZ,{className:"w-full",id:"new-status",value:f,onChange:w=>h(w.target.value),children:No.map(w=>B.jsx(hZ,{value:w,children:So[w]},w))})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{children:"Milestone"}),B.jsx(Ur,{label:"Milestone",mode:"single",options:rm(r),value:m?[m]:[],onChange:w=>g(w[0]??null),placeholder:"No milestone",size:"default",className:"w-full"})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{children:"Tags"}),B.jsx(Ur,{label:"Tags",mode:"multiple",options:nm(r),value:b,onChange:v,placeholder:"No tags",size:"default",className:"w-full"})]}),B.jsxs("div",{className:"grid gap-1.5",children:[B.jsx(Vr,{children:"Needs a human"}),B.jsx(Lt,{variant:C?"secondary":"outline","aria-pressed":C,onPress:()=>E(!C),className:"w-full font-normal",children:C?"Yes — blocked on a person":"No"})]})]})]}),B.jsxs(gH,{children:[B.jsx(S3,{children:"Cancel"}),B.jsx(Lt,{onPress:D,isDisabled:!i.trim(),children:"Create task"})]})]})}const mZ={view:"board",boardColumns:["backlog","todo","in_progress","done"]};function kk(t,e,n){const r=()=>{try{const u=localStorage.getItem(t);return u==null?e:n(JSON.parse(u))??e}catch{return e}},[i,o]=k.useState(()=>({key:t,value:r()}));i.key!==t&&o({key:t,value:r()});const a=u=>{o({key:t,value:u});try{localStorage.setItem(t,JSON.stringify(u))}catch{}};return[i.value,a]}function x8(t){return typeof t=="string"&&No.includes(t)}function gZ(t){if(typeof t!="object"||t===null)return null;const{view:e,boardColumns:n}=t;return e!=="board"&&e!=="list"||!Array.isArray(n)?null:{view:e,boardColumns:n.filter(x8)}}function bZ(t){if(typeof t!="object"||t===null)return null;const{statuses:e,tags:n,milestone:r,needsHuman:i}=t;return!Array.isArray(e)||!Array.isArray(n)||r!==null&&typeof r!="string"||typeof i!="boolean"?null:{statuses:e.filter(x8),tags:n.filter(o=>typeof o=="string"),milestone:r,needsHuman:i}}function yZ(){const t=ta(),e=Lp(),n=Vc({strict:!1}),i=gS()({to:"/"})!==!1,o=R_().data,a=o??[],u=n.board??a[0]?.id??null,c=P_(u).data??null,f=O_(u).data??[],[h,m]=kk("task-ui:view",mZ,gZ),[g,b]=kk(`task-ui:filters:${u??""}`,iM,bZ),[v,C]=k.useState(!1);k.useEffect(()=>{const D=new EventSource("/api/events");return D.onmessage=w=>{let $;try{$=JSON.parse(w.data).board}catch{}const T=MB()??void 0;($===void 0||T===void 0||$===T)&&(e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["task"]}))},()=>D.close()},[e]),k.useEffect(()=>{!o||!n.board||o.some(D=>D.id===n.board)||t({to:"/",search:{},replace:!0})},[o,n.board,t]);const E=D=>{D!==u&&t({to:"/",search:D===a[0]?.id?{}:{board:D}})};return B.jsxs(ZB.Provider,{value:{project:c,tasks:f,boards:a,board:u,switchBoard:E,filters:g,setFilters:b,settings:h,setSettings:m},children:[B.jsxs("div",{className:"flex h-dvh flex-col bg-background",children:[B.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-4 border-b px-4",children:[B.jsx(EH,{}),B.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[i&&B.jsxs(B.Fragment,{children:[B.jsx(RH,{}),B.jsx(wH,{})]}),B.jsxs(Lt,{size:"sm",className:"ml-1.5",onPress:()=>C(!0),children:[B.jsx(QB,{"data-icon":"inline-start"}),"New task"]})]})]}),i&&oM(g)&&B.jsx(MH,{}),B.jsx(mS,{})]}),B.jsx(pZ,{open:v,onOpenChange:C,onCreated:()=>{e.invalidateQueries({queryKey:["tasks"]})},allTasks:f})]})}const Sk=Bl("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Np({className:t,variant:e="default",render:n,...r}){if(n){const i={"data-slot":"badge","data-variant":e,className:Ce(Sk({variant:e}),t),...r};return n(i)}return B.jsx("span",{"data-slot":"badge","data-variant":e,className:Ce(Sk({variant:e}),t),...r})}const Jb=1024;function C8(t,e){return t!==void 0&&e!==void 0?(t+e)/2:t!==void 0?t+Jb:e!==void 0?e-Jb:Jb}function vZ(t){const e=new Date(t),n={month:"short",day:"numeric"};return e.getFullYear()!==new Date().getFullYear()&&(n.year="numeric"),e.toLocaleDateString("en-US",n)}function Sy(t){const e=Math.max(0,(Date.now()-Date.parse(t))/1e3);return e<60?"now":e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h`:`${Math.floor(e/86400)}d`}function xZ({tasks:t,visibleStatuses:e,onOpen:n,onMove:r}){const[i,o]=k.useState(null),a=k.useRef(null),u=No.filter(h=>e.includes(h)).map(h=>({status:h,tasks:t.filter(m=>m.status===h)}));function c(h,m){const g=Array.from(h.currentTarget.closest("[data-column]").querySelectorAll("[data-card]"));let b=g.length;for(let v=0;v<g.length;v++){const C=g[v].getBoundingClientRect();if(h.clientY<C.top+C.height/2){b=v;break}}return{status:m,index:b}}function f(h,m){h.preventDefault();const g=a.current??Number(h.dataTransfer.getData("text/plain")),b=i?.status===m.status?i:c(h,m.status);if(o(null),a.current=null,!g)return;let v=b.index;const C=m.tasks.findIndex(w=>w.number===g);C>=0&&v>C&&(v-=1);const E=m.tasks.filter(w=>w.number!==g),D=C8(E[v-1]?.position,E[v]?.position);r(g,m.status,D)}return B.jsx("div",{className:"flex flex-1 gap-3 overflow-x-auto p-4",onDragEnd:()=>o(null),children:u.map(h=>B.jsxs("section",{"data-column":!0,className:Ce("flex w-72 shrink-0 flex-col rounded-3xl bg-muted/50 transition-colors",i?.status===h.status&&"bg-muted"),onDragOver:m=>{m.preventDefault(),m.dataTransfer.dropEffect="move",o(c(m,h.status))},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||o(null)},onDrop:m=>f(m,h),children:[B.jsxs("header",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[B.jsx(bl,{status:h.status}),B.jsx("h2",{className:"text-sm font-medium",children:So[h.status]}),B.jsx("span",{className:"text-xs text-muted-foreground",children:h.tasks.length})]}),B.jsxs("div",{className:"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2",children:[h.tasks.map((m,g)=>B.jsxs("div",{children:[B.jsx($k,{visible:i?.status===h.status&&i.index===g}),B.jsx(CZ,{task:m,onOpen:n,onDragStart:b=>{a.current=m.number,b.dataTransfer.effectAllowed="move",b.dataTransfer.setData("text/plain",String(m.number))}})]},m.number)),B.jsx($k,{visible:i?.status===h.status&&i.index===h.tasks.length}),h.tasks.length===0&&B.jsx("p",{className:"px-2 pt-1 text-xs text-muted-foreground/70",children:"No tasks"})]})]},h.status))})}function $k({visible:t}){return B.jsx("div",{className:Ce("mx-1 h-0.5 rounded-full bg-primary/60 opacity-0 transition-opacity",t&&"opacity-100")})}function CZ({task:t,onOpen:e,onDragStart:n}){return B.jsxs("article",{"data-card":!0,draggable:!0,onDragStart:n,onClick:()=>e(t),className:"cursor-pointer rounded-2xl bg-card p-3 shadow-xs ring-1 ring-foreground/5 transition-shadow select-none hover:shadow-sm active:cursor-grabbing dark:ring-foreground/10",children:[B.jsxs("div",{className:"flex items-center justify-between gap-2",children:[B.jsx("span",{className:"text-xs text-muted-foreground",children:t.id}),t.needsHuman&&B.jsx(eM,{})]}),B.jsx("p",{className:"mt-1 text-sm leading-snug font-medium",children:t.title}),(t.tags.length>0||t.milestone||t.commentCount>0)&&B.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[t.tags.map(r=>B.jsx(Np,{variant:"outline",children:r},r)),t.milestone&&B.jsx(Np,{variant:"secondary",className:"max-w-32 truncate",children:t.milestone}),t.commentCount>0&&B.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[B.jsx(tH,{className:"size-3"}),t.commentCount]}),B.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground/70",children:Sy(t.updatedAt)})]})]})}function EZ({className:t,...e}){return B.jsx(IK,{"data-slot":"grid-list",className:Ce("flex w-full flex-col outline-none","data-empty:items-center data-empty:justify-center data-empty:py-10 data-empty:text-sm data-empty:text-muted-foreground","data-drop-target:bg-muted/40",t),...e})}function DZ({className:t,...e}){return B.jsx(KK,{"data-slot":"grid-list-item",className:Ce("relative flex items-center gap-2 border-b px-3 py-2 text-sm outline-none transition-colors","data-hovered:bg-muted/50 data-selected:bg-muted","data-focus-visible:z-10 data-focus-visible:ring-2 data-focus-visible:ring-ring data-focus-visible:ring-inset","data-disabled:pointer-events-none data-disabled:opacity-50","data-dragging:opacity-50","data-drop-target:bg-primary/5","data-href:cursor-pointer",t),...e})}function kZ({className:t,...e}){return B.jsx(T6,{"data-slot":"grid-list-drop-indicator",className:Ce("relative z-10 h-0 w-full outline-none data-drop-target:outline-1 data-drop-target:outline-primary",t),...e})}function SZ({tasks:t,taskHref:e,onReorder:n}){const{dragAndDropHooks:r}=$_({getItems:i=>[...i].map(o=>({"text/plain":String(o)})),onReorder(i){const o=Number([...i.keys][0]),a=t.filter(c=>c.number!==o);let u=a.findIndex(c=>c.number===i.target.key);u<0||(i.target.dropPosition==="after"&&(u+=1),n(o,C8(a[u-1]?.position,a[u]?.position)))},renderDropIndicator:i=>B.jsx(kZ,{target:i})});return B.jsx(EZ,{"aria-label":"Tasks",items:t,dragAndDropHooks:r,renderEmptyState:()=>"No tasks yet — press New task, or `task add` in a terminal.",className:"flex-1 overflow-y-auto px-2.5 pb-4",children:i=>B.jsxs(DZ,{id:i.number,textValue:i.title,href:e(i),className:"group gap-2.5 rounded-lg border-0 px-6 py-2.5",children:[B.jsx(x6,{slot:"drag","aria-label":`Reorder ${i.id}`,className:"absolute top-1/2 left-0.5 flex size-5 -translate-y-1/2 cursor-grab items-center justify-center rounded-sm text-muted-foreground/60 opacity-0 outline-none transition-opacity group-hover:opacity-100 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring",children:B.jsx(Uj,{className:"size-3.5"})}),B.jsx("span",{className:"w-16 shrink-0 text-xs text-muted-foreground",children:i.id}),B.jsx(bl,{status:i.status}),B.jsx("span",{className:"truncate font-medium",children:i.title}),i.needsHuman&&B.jsx(eM,{}),B.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:[i.tags.map(o=>B.jsx(Np,{variant:"outline",children:o},o)),i.milestone&&B.jsx(Np,{variant:"secondary",className:"max-w-32 truncate",children:i.milestone}),B.jsx("span",{className:"w-12 text-right text-xs text-muted-foreground",children:vZ(i.createdAt)})]})]})})}function $Z(){const{tasks:t,board:e,filters:n,settings:r}=sa(),i=ta(),o=Lp(),a=Vc({strict:!1}),u=BH(t,n),c=m=>{i({to:"/task/$number",params:{number:String(m.number)},search:g=>g})},f=(m,g,b)=>{o.setQueryData(["tasks",e],v=>v?.map(C=>C.number===m?{...C,status:g,position:b}:C)),RB(m,{status:g,position:b}).then(()=>o.invalidateQueries({queryKey:["tasks",e]}))},h=m=>`/task/${m.number}${a.board?`?board=${encodeURIComponent(a.board)}`:""}`;return B.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r.view==="board"?B.jsx(xZ,{tasks:u,visibleStatuses:r.boardColumns,onOpen:c,onMove:f}):B.jsx("div",{className:"flex min-h-0 flex-1 flex-col pt-2",children:B.jsx(SZ,{tasks:u,taskHref:h,onReorder:(m,g)=>{const b=t.find(v=>v.number===m);b&&f(m,b.status,g)}})})})}function wZ({...t}){return B.jsx(bT,{"data-slot":"dropdown-menu-trigger",...t})}function TZ({"data-slot":t="dropdown-menu-content",placement:e="bottom start",offset:n=4,crossOffset:r=0,className:i,children:o,...a}){return B.jsx(h3,{"data-slot":t,placement:e,offset:n,crossOffset:r,className:Ce("z-50 w-(--trigger-width) min-w-48 origin-(--trigger-anchor-point) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 outline-none data-entering:animate-in data-entering:fade-in-0 data-entering:zoom-in-95 data-exiting:animate-out data-exiting:overflow-hidden data-exiting:fade-out-0 data-exiting:zoom-out-95 data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2 **:data-[slot$=-item]:data-focused:bg-foreground/10 dark:ring-foreground/10",i),children:B.jsx(yT,{className:"max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",...a,children:o})})}const AZ=Bl("group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{selectionMode:{none:"gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",single:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4",multiple:"gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 [&_svg:not([class*='size-'])]:size-4"}}});function BZ({className:t,inset:e,variant:n="default",children:r,...i}){return B.jsx(xT,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,textValue:typeof r=="string"?r:i.textValue,className:Dc(t,(o,{selectionMode:a})=>Ce(AZ({selectionMode:a}),o)),...i,children:Dc(r,(o,{isSelected:a,selectionMode:u})=>B.jsxs(B.Fragment,{children:[u!=="none"?B.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":u==="single"?"dropdown-menu-radio-item-indicator":"dropdown-menu-checkbox-item-indicator",children:a?B.jsx(k3,{}):null}):null,o]}))})}function MZ({className:t,...e}){return B.jsx("div",{"data-slot":"empty",className:Ce("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-2xl border-dashed p-12 text-center text-balance",t),...e})}function RZ({className:t,...e}){return B.jsx("div",{"data-slot":"empty-header",className:Ce("flex max-w-sm flex-col items-center gap-2",t),...e})}function PZ({className:t,...e}){return B.jsx("div",{"data-slot":"empty-title",className:Ce("font-heading text-lg font-medium tracking-tight",t),...e})}function OZ({className:t,...e}){return B.jsx("div",{"data-slot":"empty-description",className:Ce("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",t),...e})}const bh="h-7 gap-1.5 self-start rounded-full pr-2.5 pl-1.5 font-normal",NZ=sL("/task/$number");function LZ(){const{number:t}=NZ.useParams(),e=Number(t),{tasks:n,project:r,board:i}=sa(),o=ta(),a=Lp(),u=n.find(M=>M.number===e)??null,c=N_(i,e),f=c.data?.comments??[],[h,m]=k.useState(""),g=k.useRef(null),[b,v]=k.useState(!0),[C,E]=k.useState(!1),[D,w]=k.useState(null),$=c.data?.task;if($&&D!==e&&(w(e),m($.title),E(!1)),!Number.isFinite(e)||c.isError)return B.jsx(IZ,{});if(!u)return B.jsx("div",{className:"flex flex-1 items-center justify-center text-sm text-muted-foreground",children:"Loading…"});const T=()=>{a.invalidateQueries({queryKey:["tasks",i]}),a.invalidateQueries({queryKey:["task",i,e]})},A=M=>{RB(u.number,M).then(T)},O=()=>{const M=g.current?.getMarkdown().trim()??"";M&&(g.current?.clear(),v(!0),B_(u.number,M).then(T))};return B.jsx("main",{className:"min-w-0 flex-1 overflow-y-auto",children:B.jsxs("div",{className:"mx-auto flex w-full max-w-6xl items-start gap-20 px-8 pt-16 pb-10",children:[B.jsxs("div",{className:"flex min-w-0 max-w-3xl flex-1 flex-col gap-6",children:[B.jsx(JB,{"aria-label":"Title",value:h,onChange:M=>m(M.target.value),onBlur:()=>h.trim()&&h!==u.title&&A({title:h.trim()}),className:"h-auto border-transparent bg-transparent px-0 py-1 text-2xl font-semibold shadow-none focus-visible:border-transparent focus-visible:ring-0 md:text-2xl"}),B.jsx(gh,{ariaLabel:"Description",placeholder:"Add a description…",defaultValue:u.description,onBlur:M=>A({description:M}),className:"min-h-32"},u.number),B.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[f.length>0&&B.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[f.length," comment",f.length===1?"":"s"]}),f.map(M=>B.jsxs("div",{className:"group/comment relative rounded-2xl bg-muted/60 p-4",children:[B.jsxs("p",{className:"text-xs text-muted-foreground",children:[M.author||"anonymous"," · ",Sy(M.createdAt)," ago"]}),B.jsx(gh,{editable:!1,defaultValue:M.body,className:"mt-1.5"},M.id),M.author===r?.author&&B.jsxs(wZ,{children:[B.jsx(Lt,{variant:"ghost",size:"icon-xs","aria-label":"Comment actions",className:"absolute top-2.5 right-2.5 text-muted-foreground opacity-0 group-hover/comment:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100",children:B.jsx(Hj,{})}),B.jsx(TZ,{placement:"bottom end",children:B.jsx(BZ,{variant:"destructive",onAction:()=>{M_(u.number,M.id).then(T)},children:"Delete"})})]})]},M.id)),f.length===0&&!C?B.jsxs(Lt,{variant:"ghost",size:"sm",onPress:()=>E(!0),className:"h-7 gap-1.5 self-start rounded-full px-2.5 font-normal text-muted-foreground",children:[B.jsx(Zj,{className:"size-3.5"}),"Add comment"]}):B.jsxs("div",{className:"flex flex-col gap-2",children:[B.jsx(gh,{ref:g,ariaLabel:"Add a comment",placeholder:"Leave a comment… (⌘↵ to post)",autoFocus:C,onChange:M=>v(!M.trim()),onSubmit:O,className:"min-h-16 rounded-2xl border border-transparent bg-input/50 p-4 transition-[color,box-shadow,background-color] focus:border-ring focus:ring-3 focus:ring-ring/30"}),B.jsx(Lt,{variant:"secondary",className:"self-end",onPress:O,isDisabled:b,children:"Post"})]})]})]}),B.jsxs("aside",{className:"sticky top-6 flex w-64 shrink-0 flex-col gap-6 pt-2 max-lg:hidden",children:[B.jsxs("div",{className:"flex flex-col gap-1.5",children:[B.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Properties"}),B.jsx(zZ,{status:u.status,onChange:M=>A({status:M})}),B.jsxs(Lt,{variant:"ghost",size:"sm","aria-pressed":u.needsHuman,onPress:()=>A({needsHuman:!u.needsHuman}),className:bh,children:[B.jsx(tm,{className:Ce("size-3.5",u.needsHuman?"text-amber-500":"text-muted-foreground")}),B.jsx("span",{className:u.needsHuman?void 0:"text-muted-foreground",children:u.needsHuman?"Needs a human":"No human needed"})]})]}),B.jsxs("div",{className:"flex flex-col gap-1.5",children:[B.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Milestone"}),B.jsx(Ur,{label:"Milestone",mode:"single",options:rm(n),value:u.milestone?[u.milestone]:[],onChange:M=>A({milestone:M[0]??null}),placeholder:"Set milestone",variant:"ghost",chevron:!1,className:bh,renderValue:M=>B.jsxs(B.Fragment,{children:[B.jsx(_j,{className:"size-3.5 text-muted-foreground"}),B.jsx("span",{className:Ce("truncate",M.length===0&&"text-muted-foreground"),children:M[0]??"Set milestone"})]})})]}),B.jsxs("div",{className:"flex flex-col gap-1.5",children:[B.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Tags"}),B.jsx(Ur,{label:"Tags",mode:"multiple",options:nm(n),value:u.tags,onChange:M=>A({tags:M}),placeholder:"Add tags",variant:"ghost",chevron:!1,className:bh,renderValue:M=>B.jsxs(B.Fragment,{children:[B.jsx(YB,{className:"size-3.5 text-muted-foreground"}),B.jsx("span",{className:Ce("truncate",M.length===0&&"text-muted-foreground"),children:M.length>0?M.join(", "):"Add tags"})]})})]}),B.jsxs("div",{className:"flex flex-col gap-1.5",children:[B.jsxs("p",{className:"text-[11px] text-muted-foreground/70",children:["created ",Sy(u.createdAt)," ago"]}),B.jsx(Lt,{variant:"ghost",size:"sm",className:"-ml-2.5 h-7 self-start rounded-full px-2.5 font-normal text-destructive hover:text-destructive",onPress:()=>{T_(u.number).then(()=>{a.invalidateQueries({queryKey:["tasks",i]}),o({to:"/",search:M=>M})})},children:"Delete"})]})]})]})})}function zZ({status:t,onChange:e}){const[n,r]=k.useState(!1);return B.jsxs(w3,{isOpen:n,onOpenChange:r,children:[B.jsxs(Lt,{variant:"ghost",size:"sm","aria-label":"Status",className:bh,children:[B.jsx(bl,{status:t,className:"size-3.5"}),So[t]]}),B.jsx(T3,{className:"w-56",children:B.jsxs($3,{children:[B.jsx(A3,{flush:!0,placeholder:"Change status"}),B.jsx(B3,{selectionMode:"single",selectedKeys:[t],onAction:i=>{r(!1),e(i)},children:B.jsx(jh,{children:No.map(i=>B.jsxs(ic,{id:i,textValue:So[i],children:[B.jsx(bl,{status:i,className:"size-3.5"}),So[i]]},i))})})]})})]})}function IZ(){const t=ta();return B.jsxs(MZ,{className:"flex-1",children:[B.jsxs(RZ,{children:[B.jsx(PZ,{children:"Task not found"}),B.jsx(OZ,{children:"It may have been deleted, or it lives on another board."})]}),B.jsx(Lt,{variant:"outline",size:"sm",onPress:()=>{t({to:"/",search:e=>e})},children:"Back to the board"})]})}function FZ(t){const e=t.board;return e==null?{}:{board:String(e)}}const T1=cL({component:yZ,validateSearch:FZ}),KZ=fS({getParentRoute:()=>T1,path:"/",component:$Z}),_Z=fS({getParentRoute:()=>T1,path:"/task/$number",component:LZ}),wk=DL({routeTree:T1.addChildren([KZ,_Z]),defaultPreload:"intent"});window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{document.documentElement.classList.toggle("dark",t.matches)});const jZ=new CO({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0}}});QP.createRoot(document.getElementById("root")).render(B.jsx(k.StrictMode,{children:B.jsx(EO,{client:jZ,children:B.jsx(ez,{navigate:t=>wk.history.push(t),children:B.jsx($L,{router:wk})})})}));
|