@nickmeriano/task 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,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 s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Pk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var F4={exports:{}},Tu={};var IE;function QN(){if(IE)return Tu;IE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,s){var a=null;if(s!==void 0&&(a=""+s),i.key!==void 0&&(a=""+i.key),"key"in i){s={};for(var u in i)u!=="key"&&(s[u]=i[u])}else s=i;return i=s.ref,{$$typeof:t,type:r,key:a,ref:i!==void 0?i:null,props:s}}return Tu.Fragment=e,Tu.jsx=n,Tu.jsxs=n,Tu}var FE;function YN(){return FE||(FE=1,F4.exports=QN()),F4.exports}var w=YN(),K4={exports:{}},Te={};var KE;function XN(){if(KE)return Te;KE=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"),s=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 T(){}T.prototype=D.prototype;function $(L,V,ne){this.props=L,this.context=V,this.refs=E,this.updater=ne||v}var A=$.prototype=new T;A.constructor=$,C(A,D.prototype),A.isPureReactComponent=!0;var B=Array.isArray;function P(){}var R={H:null,A:null,T:null,S:null},M=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(P,P):(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 O(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,O(Ee(L._payload),V,ne,le,ue)}}if(Ee)return ue=ue(L),Ee=le===""?"."+F(L,0):le,B(ue)?(ne="",Ee!=null&&(ne=Ee.replace(ie,"$&/")+"/"),O(ue,V,ne,"",function(Dn){return Dn})):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(B(L))for(var Se=0;Se<L.length;Se++)le=L[Se],fe=Ve+F(le,Se),Ee+=O(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+=O(le,V,ne,fe,ue);else if(fe==="object"){if(typeof L.then=="function")return O(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 O(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=R,Te.__COMPILER_RUNTIME={__proto__:null,c:function(L){return R.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)!M.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:s,_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)M.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=R.T,ne={};R.T=ne;try{var le=L(),ue=R.S;ue!==null&&ue(ne,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(P,Z)}catch(fe){Z(fe)}finally{V!==null&&ne.types!==null&&(V.types=ne.types),R.T=V}},Te.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Te.use=function(L){return R.H.use(L)},Te.useActionState=function(L,V,ne){return R.H.useActionState(L,V,ne)},Te.useCallback=function(L,V){return R.H.useCallback(L,V)},Te.useContext=function(L){return R.H.useContext(L)},Te.useDebugValue=function(){},Te.useDeferredValue=function(L,V){return R.H.useDeferredValue(L,V)},Te.useEffect=function(L,V){return R.H.useEffect(L,V)},Te.useEffectEvent=function(L){return R.H.useEffectEvent(L)},Te.useId=function(){return R.H.useId()},Te.useImperativeHandle=function(L,V,ne){return R.H.useImperativeHandle(L,V,ne)},Te.useInsertionEffect=function(L,V){return R.H.useInsertionEffect(L,V)},Te.useLayoutEffect=function(L,V){return R.H.useLayoutEffect(L,V)},Te.useMemo=function(L,V){return R.H.useMemo(L,V)},Te.useOptimistic=function(L,V){return R.H.useOptimistic(L,V)},Te.useReducer=function(L,V,ne){return R.H.useReducer(L,V,ne)},Te.useRef=function(L){return R.H.useRef(L)},Te.useState=function(L){return R.H.useState(L)},Te.useSyncExternalStore=function(L,V,ne){return R.H.useSyncExternalStore(L,V,ne)},Te.useTransition=function(){return R.H.useTransition()},Te.version="19.2.4",Te}var _E;function Vc(){return _E||(_E=1,K4.exports=XN()),K4.exports}var k=Vc();const H=Pk(k);var _4={exports:{}},Au={},j4={exports:{}},H4={};var jE;function JN(){return jE||(jE=1,(function(t){function e(O,K){var Y=O.length;O.push(K);e:for(;0<Y;){var Z=Y-1>>>1,j=O[Z];if(0<i(j,K))O[Z]=K,O[Y]=j,Y=Z;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var K=O[0],Y=O.pop();if(Y!==K){O[0]=Y;e:for(var Z=0,j=O.length,L=j>>>1;Z<L;){var V=2*(Z+1)-1,ne=O[V],le=V+1,ue=O[le];if(0>i(ne,Y))le<j&&0>i(ue,ne)?(O[Z]=ue,O[le]=Y,Z=le):(O[Z]=ne,O[V]=Y,Z=V);else if(le<j&&0>i(ue,Y))O[Z]=ue,O[le]=Y,Z=le;else break e}}return K}function i(O,K){var Y=O.sortIndex-K.sortIndex;return Y!==0?Y:O.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.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,T=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function A(O){for(var K=n(f);K!==null;){if(K.callback===null)r(f);else if(K.startTime<=O)r(f),K.sortIndex=K.expirationTime,e(c,K);else break;K=n(f)}}function B(O){if(C=!1,A(O),!v)if(n(c)!==null)v=!0,P||(P=!0,U());else{var K=n(f);K!==null&&te(B,K.startTime-O)}}var P=!1,R=-1,M=5,I=-1;function G(){return E?!0:!(t.unstable_now()-I<M)}function J(){if(E=!1,P){var O=t.unstable_now();I=O;var K=!0;try{e:{v=!1,C&&(C=!1,T(R),R=-1),b=!0;var Y=g;try{t:{for(A(O),m=n(c);m!==null&&!(m.expirationTime>O&&G());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,g=m.priorityLevel;var j=Z(m.expirationTime<=O);if(O=t.unstable_now(),typeof j=="function"){m.callback=j,A(O),K=!0;break t}m===n(c)&&r(c),A(O)}else r(c);m=n(c)}if(m!==null)K=!0;else{var L=n(f);L!==null&&te(B,L.startTime-O),K=!1}}break e}finally{m=null,g=Y,b=!1}K=void 0}}finally{K?U():P=!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(O,K){R=D(function(){O(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(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(O){switch(g){case 1:case 2:case 3:var K=3;break;default:K=g}var Y=g;g=K;try{return O()}finally{g=Y}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(O,K){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var Y=g;g=O;try{return K()}finally{g=Y}},t.unstable_scheduleCallback=function(O,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,O){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,O={id:h++,callback:K,priorityLevel:O,startTime:Y,expirationTime:j,sortIndex:-1},Y>Z?(O.sortIndex=Y,e(f,O),n(c)===null&&O===n(f)&&(C?(T(R),R=-1):C=!0,te(B,Y-Z))):(O.sortIndex=j,e(c,O),v||b||(v=!0,P||(P=!0,U()))),O},t.unstable_shouldYield=G,t.unstable_wrapCallback=function(O){var K=g;return function(){var Y=g;g=K;try{return O.apply(this,arguments)}finally{g=Y}}}})(H4)),H4}var HE;function ZN(){return HE||(HE=1,j4.exports=JN()),j4.exports}var V4={exports:{}},an={};var VE;function eP(){if(VE)return an;VE=1;var t=Vc();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 s(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 an.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,an.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 s(c,f,null,h)},an.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()}},an.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))},an.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},an.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})}},an.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)},an.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})}},an.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)},an.requestFormReset=function(c){r.d.r(c)},an.unstable_batchedUpdates=function(c,f){return c(f)},an.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},an.useFormStatus=function(){return a.H.useHostTransitionStatus()},an.version="19.2.4",an}var UE;function Ok(){if(UE)return V4.exports;UE=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(),V4.exports=eP(),V4.exports}var qE;function tP(){if(qE)return Au;qE=1;var t=ZN(),e=Vc(),n=Ok();function r(o){var l="https://react.dev/errors/"+o;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 #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(s(o)!==o)throw Error(r(188))}function f(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,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),o;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,N=y.child;N;){if(N===d){S=!0,d=y,p=x;break}if(N===p){S=!0,p=y,d=x;break}N=N.sibling}if(!S){for(N=x.child;N;){if(N===d){S=!0,d=x,p=y;break}if(N===p){S=!0,p=x,d=y;break}N=N.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?o:l}function h(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=h(o),l!==null)return l;o=o.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"),T=Symbol.for("react.consumer"),$=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function U(o){return o===null||typeof o!="object"?null:(o=J&&o[J]||o["@@iterator"],typeof o=="function"?o:null)}var ie=Symbol.for("react.client.reference");function F(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===ie?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case D:return"Profiler";case E:return"StrictMode";case B:return"Suspense";case P:return"SuspenseList";case I:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case v:return"Portal";case $:return o.displayName||"Context";case T:return(o._context.displayName||"Context")+".Consumer";case A:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case R:return l=o.displayName||null,l!==null?l:F(o.type)||"Memo";case M:l=o._payload,o=o._init;try{return F(o(l))}catch{}}return null}var te=Array.isArray,O=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(o){return{current:o}}function V(o){0>j||(o.current=Z[j],Z[j]=null,j--)}function ne(o,l){j++,Z[j]=o.current,o.current=l}var le=L(null),ue=L(null),fe=L(null),Ee=L(null);function Ve(o,l){switch(ne(fe,l),ne(ue,o),ne(le,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?aE(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=aE(l),o=lE(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}V(le),ne(le,o)}function Se(){V(le),V(ue),V(fe)}function Dn(o){o.memoizedState!==null&&ne(Ee,o);var l=le.current,d=lE(l,o.type);l!==d&&(ne(ue,o),ne(le,d))}function sn(o){ue.current===o&&(V(le),V(ue)),Ee.current===o&&(V(Ee),ku._currentValue=Y)}var pn,gr;function Kt(o){if(pn===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pn=l&&l[1]||"",gr=-1<d.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+pn+o+gr}var Js=!1;function Ie(o,l){if(!o||Js)return"";Js=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var X=ee}Reflect.construct(o,[],oe)}else{try{oe.call()}catch(ee){X=ee}o.call(oe.prototype)}}else{try{throw Error()}catch(ee){X=ee}(oe=o())&&typeof oe.catch=="function"&&oe.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],N=x[1];if(S&&N){var z=S.split(`
4
+ `),Q=N.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 o.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",o.displayName)),re}while(1<=p&&0<=y);break}}}finally{Js=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?Kt(d):""}function Oi(o,l){switch(o.tag){case 26:case 27:case 5:return Kt(o.type);case 16:return Kt("Lazy");case 13:return o.child!==l&&l!==null?Kt("Suspense Fallback"):Kt("Suspense");case 19:return Kt("SuspenseList");case 0:case 15:return Ie(o.type,!1);case 11:return Ie(o.type.render,!1);case 1:return Ie(o.type,!0);case 31:return Kt("Activity");default:return""}}function Wr(o){try{var l="",d=null;do l+=Oi(o,d),d=o,o=o.return;while(o);return l}catch(p){return`
7
+ Error generating stack: `+p.message+`
8
+ `+p.stack}}var Zs=Object.prototype.hasOwnProperty,br=t.unstable_scheduleCallback,Ol=t.unstable_cancelCallback,ad=t.unstable_shouldYield,$m=t.unstable_requestPaint,on=t.unstable_now,it=t.unstable_getCurrentPriorityLevel,qt=t.unstable_ImmediatePriority,Mr=t.unstable_UserBlockingPriority,fa=t.unstable_NormalPriority,B8=t.unstable_LowPriority,_1=t.unstable_IdlePriority,M8=t.log,R8=t.unstable_setDisableYieldValue,Ll=null,In=null;function Li(o){if(typeof M8=="function"&&R8(o),In&&typeof In.setStrictMode=="function")try{In.setStrictMode(Ll,o)}catch{}}var Fn=Math.clz32?Math.clz32:O8,N8=Math.log,P8=Math.LN2;function O8(o){return o>>>=0,o===0?32:31-(N8(o)/P8|0)|0}var ld=256,ud=262144,cd=4194304;function eo(o){var l=o&42;if(l!==0)return l;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function dd(o,l,d){var p=o.pendingLanes;if(p===0)return 0;var y=0,x=o.suspendedLanes,S=o.pingedLanes;o=o.warmLanes;var N=p&134217727;return N!==0?(p=N&~x,p!==0?y=eo(p):(S&=N,S!==0?y=eo(S):d||(d=N&~o,d!==0&&(y=eo(d))))):(N=p&~x,N!==0?y=eo(N):S!==0?y=eo(S):d||(d=p&~o,d!==0&&(y=eo(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 zl(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function L8(o,l){switch(o){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 j1(){var o=cd;return cd<<=1,(cd&62914560)===0&&(cd=4194304),o}function wm(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Il(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function z8(o,l,d,p,y,x){var S=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var N=o.entanglements,z=o.expirationTimes,Q=o.hiddenUpdates;for(d=S&~d;0<d;){var re=31-Fn(d),oe=1<<re;N[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&=~oe}p!==0&&H1(o,p,0),x!==0&&y===0&&o.tag!==0&&(o.suspendedLanes|=x&~(S&~l))}function H1(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var p=31-Fn(l);o.entangledLanes|=l,o.entanglements[p]=o.entanglements[p]|1073741824|d&261930}function V1(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var p=31-Fn(d),y=1<<p;y&l|o[p]&l&&(o[p]|=l),d&=~y}}function U1(o,l){var d=l&-l;return d=(d&42)!==0?1:Tm(d),(d&(o.suspendedLanes|l))!==0?0:d}function Tm(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Am(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function q1(){var o=K.p;return o!==0?o:(o=window.event,o===void 0?32:ME(o.type))}function G1(o,l){var d=K.p;try{return K.p=o,l()}finally{K.p=d}}var zi=Math.random().toString(36).slice(2),Gt="__reactFiber$"+zi,kn="__reactProps$"+zi,ha="__reactContainer$"+zi,Bm="__reactEvents$"+zi,I8="__reactListeners$"+zi,F8="__reactHandles$"+zi,W1="__reactResources$"+zi,Fl="__reactMarker$"+zi;function Mm(o){delete o[Gt],delete o[kn],delete o[Bm],delete o[I8],delete o[F8]}function pa(o){var l=o[Gt];if(l)return l;for(var d=o.parentNode;d;){if(l=d[ha]||d[Gt]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=mE(o);o!==null;){if(d=o[Gt])return d;o=mE(o)}return l}o=d,d=o.parentNode}return null}function ma(o){if(o=o[Gt]||o[ha]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function Kl(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function ga(o){var l=o[W1];return l||(l=o[W1]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function _t(o){o[Fl]=!0}var Q1=new Set,Y1={};function to(o,l){ba(o,l),ba(o+"Capture",l)}function ba(o,l){for(Y1[o]=l,o=0;o<l.length;o++)Q1.add(l[o])}var K8=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]*$"),X1={},J1={};function _8(o){return Zs.call(J1,o)?!0:Zs.call(X1,o)?!1:K8.test(o)?J1[o]=!0:(X1[o]=!0,!1)}function fd(o,l,d){if(_8(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function hd(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function Qr(o,l,d,p){if(p===null)o.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+p)}}function Xn(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Z1(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function j8(o,l,d){var p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,x=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return y.call(this)},set:function(S){d=""+S,x.call(this,S)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(S){d=""+S},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Rm(o){if(!o._valueTracker){var l=Z1(o)?"checked":"value";o._valueTracker=j8(o,l,""+o[l])}}function ev(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return o&&(p=Z1(o)?o.checked?"true":"false":o.value),o=p,o!==d?(l.setValue(o),!0):!1}function pd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var H8=/[\n"\\]/g;function Jn(o){return o.replace(H8,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Nm(o,l,d,p,y,x,S,N){o.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?o.type=S:o.removeAttribute("type"),l!=null?S==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Xn(l)):o.value!==""+Xn(l)&&(o.value=""+Xn(l)):S!=="submit"&&S!=="reset"||o.removeAttribute("value"),l!=null?Pm(o,S,Xn(l)):d!=null?Pm(o,S,Xn(d)):p!=null&&o.removeAttribute("value"),y==null&&x!=null&&(o.defaultChecked=!!x),y!=null&&(o.checked=y&&typeof y!="function"&&typeof y!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.name=""+Xn(N):o.removeAttribute("name")}function tv(o,l,d,p,y,x,S,N){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(o.type=x),l!=null||d!=null){if(!(x!=="submit"&&x!=="reset"||l!=null)){Rm(o);return}d=d!=null?""+Xn(d):"",l=l!=null?""+Xn(l):d,N||l===o.value||(o.value=l),o.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,o.checked=N?o.checked:!!p,o.defaultChecked=!!p,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(o.name=S),Rm(o)}function Pm(o,l,d){l==="number"&&pd(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function ya(o,l,d,p){if(o=o.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<o.length;d++)y=l.hasOwnProperty("$"+o[d].value),o[d].selected!==y&&(o[d].selected=y),y&&p&&(o[d].defaultSelected=!0)}else{for(d=""+Xn(d),l=null,y=0;y<o.length;y++){if(o[y].value===d){o[y].selected=!0,p&&(o[y].defaultSelected=!0);return}l!==null||o[y].disabled||(l=o[y])}l!==null&&(l.selected=!0)}}function nv(o,l,d){if(l!=null&&(l=""+Xn(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+Xn(d):""}function rv(o,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=Xn(l),o.defaultValue=d,p=o.textContent,p===d&&p!==""&&p!==null&&(o.value=p),Rm(o)}function va(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var V8=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 iv(o,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":p?o.setProperty(l,d):typeof d!="number"||d===0||V8.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function sv(o,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?o.setProperty(p,""):p==="float"?o.cssFloat="":o[p]="");for(var y in l)p=l[y],l.hasOwnProperty(y)&&d[y]!==p&&iv(o,y,p)}else for(var x in l)l.hasOwnProperty(x)&&iv(o,x,l[x])}function Om(o){if(o.indexOf("-")===-1)return!1;switch(o){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 U8=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"]]),q8=/^[\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 md(o){return q8.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function Yr(){}var Lm=null;function zm(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var xa=null,Ca=null;function ov(o){var l=ma(o);if(l&&(o=l.stateNode)){var d=o[kn]||null;e:switch(o=l.stateNode,l.type){case"input":if(Nm(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Jn(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==o&&p.form===o.form){var y=p[kn]||null;if(!y)throw Error(r(90));Nm(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===o.form&&ev(p)}break e;case"textarea":nv(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&ya(o,!!d.multiple,l,!1)}}}var Im=!1;function av(o,l,d){if(Im)return o(l,d);Im=!0;try{var p=o(l);return p}finally{if(Im=!1,(xa!==null||Ca!==null)&&(nf(),xa&&(l=xa,o=Ca,Ca=xa=null,ov(l),o)))for(l=0;l<o.length;l++)ov(o[l])}}function _l(o,l){var d=o.stateNode;if(d===null)return null;var p=d[kn]||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)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)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"),Fm=!1;if(Xr)try{var jl={};Object.defineProperty(jl,"passive",{get:function(){Fm=!0}}),window.addEventListener("test",jl,jl),window.removeEventListener("test",jl,jl)}catch{Fm=!1}var Ii=null,Km=null,gd=null;function lv(){if(gd)return gd;var o,l=Km,d=l.length,p,y="value"in Ii?Ii.value:Ii.textContent,x=y.length;for(o=0;o<d&&l[o]===y[o];o++);var S=d-o;for(p=1;p<=S&&l[d-p]===y[x-p];p++);return gd=y.slice(o,1<p?1-p:void 0)}function bd(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function yd(){return!0}function uv(){return!1}function Sn(o){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 N in o)o.hasOwnProperty(N)&&(d=o[N],this[N]=d?d(x):x[N]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?yd:uv,this.isPropagationStopped=uv,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=yd)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=yd)},persist:function(){},isPersistent:yd}),l}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vd=Sn(no),Hl=m({},no,{view:0,detail:0}),G8=Sn(Hl),_m,jm,Vl,xd=m({},Hl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vm,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Vl&&(Vl&&o.type==="mousemove"?(_m=o.screenX-Vl.screenX,jm=o.screenY-Vl.screenY):jm=_m=0,Vl=o),_m)},movementY:function(o){return"movementY"in o?o.movementY:jm}}),cv=Sn(xd),W8=m({},xd,{dataTransfer:0}),Q8=Sn(W8),Y8=m({},Hl,{relatedTarget:0}),Hm=Sn(Y8),X8=m({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),J8=Sn(X8),Z8=m({},no,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),eR=Sn(Z8),tR=m({},no,{data:0}),dv=Sn(tR),nR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rR={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"},iR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sR(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=iR[o])?!!l[o]:!1}function Vm(){return sR}var oR=m({},Hl,{key:function(o){if(o.key){var l=nR[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=bd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?rR[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vm,charCode:function(o){return o.type==="keypress"?bd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?bd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),aR=Sn(oR),lR=m({},xd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fv=Sn(lR),uR=m({},Hl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vm}),cR=Sn(uR),dR=m({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),fR=Sn(dR),hR=m({},xd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),pR=Sn(hR),mR=m({},no,{newState:0,oldState:0}),gR=Sn(mR),bR=[9,13,27,32],Um=Xr&&"CompositionEvent"in window,Ul=null;Xr&&"documentMode"in document&&(Ul=document.documentMode);var yR=Xr&&"TextEvent"in window&&!Ul,hv=Xr&&(!Um||Ul&&8<Ul&&11>=Ul),pv=" ",mv=!1;function gv(o,l){switch(o){case"keyup":return bR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bv(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ea=!1;function vR(o,l){switch(o){case"compositionend":return bv(l);case"keypress":return l.which!==32?null:(mv=!0,pv);case"textInput":return o=l.data,o===pv&&mv?null:o;default:return null}}function xR(o,l){if(Ea)return o==="compositionend"||!Um&&gv(o,l)?(o=lv(),gd=Km=Ii=null,Ea=!1,o):null;switch(o){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 hv&&l.locale!=="ko"?null:l.data;default:return null}}var CR={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 yv(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!CR[o.type]:l==="textarea"}function vv(o,l,d,p){xa?Ca?Ca.push(p):Ca=[p]:xa=p,l=cf(l,"onChange"),0<l.length&&(d=new vd("onChange","change",null,d,p),o.push({event:d,listeners:l}))}var ql=null,Gl=null;function ER(o){tE(o,0)}function Cd(o){var l=Kl(o);if(ev(l))return o}function xv(o,l){if(o==="change")return l}var Cv=!1;if(Xr){var qm;if(Xr){var Gm="oninput"in document;if(!Gm){var Ev=document.createElement("div");Ev.setAttribute("oninput","return;"),Gm=typeof Ev.oninput=="function"}qm=Gm}else qm=!1;Cv=qm&&(!document.documentMode||9<document.documentMode)}function Dv(){ql&&(ql.detachEvent("onpropertychange",kv),Gl=ql=null)}function kv(o){if(o.propertyName==="value"&&Cd(Gl)){var l=[];vv(l,Gl,o,zm(o)),av(ER,l)}}function DR(o,l,d){o==="focusin"?(Dv(),ql=l,Gl=d,ql.attachEvent("onpropertychange",kv)):o==="focusout"&&Dv()}function kR(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Cd(Gl)}function SR(o,l){if(o==="click")return Cd(l)}function $R(o,l){if(o==="input"||o==="change")return Cd(l)}function wR(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Kn=typeof Object.is=="function"?Object.is:wR;function Wl(o,l){if(Kn(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var y=d[p];if(!Zs.call(l,y)||!Kn(o[y],l[y]))return!1}return!0}function Sv(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function $v(o,l){var d=Sv(o);o=0;for(var p;d;){if(d.nodeType===3){if(p=o+d.textContent.length,o<=l&&p>=l)return{node:d,offset:l-o};o=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Sv(d)}}function wv(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?wv(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Tv(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=pd(o.document);l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=pd(o.document)}return l}function Wm(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var TR=Xr&&"documentMode"in document&&11>=document.documentMode,Da=null,Qm=null,Ql=null,Ym=!1;function Av(o,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Ym||Da==null||Da!==pd(p)||(p=Da,"selectionStart"in p&&Wm(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}),Ql&&Wl(Ql,p)||(Ql=p,p=cf(Qm,"onSelect"),0<p.length&&(l=new vd("onSelect","select",null,l,d),o.push({event:l,listeners:p}),l.target=Da)))}function ro(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var ka={animationend:ro("Animation","AnimationEnd"),animationiteration:ro("Animation","AnimationIteration"),animationstart:ro("Animation","AnimationStart"),transitionrun:ro("Transition","TransitionRun"),transitionstart:ro("Transition","TransitionStart"),transitioncancel:ro("Transition","TransitionCancel"),transitionend:ro("Transition","TransitionEnd")},Xm={},Bv={};Xr&&(Bv=document.createElement("div").style,"AnimationEvent"in window||(delete ka.animationend.animation,delete ka.animationiteration.animation,delete ka.animationstart.animation),"TransitionEvent"in window||delete ka.transitionend.transition);function io(o){if(Xm[o])return Xm[o];if(!ka[o])return o;var l=ka[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in Bv)return Xm[o]=l[d];return o}var Mv=io("animationend"),Rv=io("animationiteration"),Nv=io("animationstart"),AR=io("transitionrun"),BR=io("transitionstart"),MR=io("transitioncancel"),Pv=io("transitionend"),Ov=new Map,Jm="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(" ");Jm.push("scrollEnd");function yr(o,l){Ov.set(o,l),to(l,[o])}var Ed=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},Zn=[],Sa=0,Zm=0;function Dd(){for(var o=Sa,l=Zm=Sa=0;l<o;){var d=Zn[l];Zn[l++]=null;var p=Zn[l];Zn[l++]=null;var y=Zn[l];Zn[l++]=null;var x=Zn[l];if(Zn[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&&Lv(d,y,x)}}function kd(o,l,d,p){Zn[Sa++]=o,Zn[Sa++]=l,Zn[Sa++]=d,Zn[Sa++]=p,Zm|=p,o.lanes|=p,o=o.alternate,o!==null&&(o.lanes|=p)}function eg(o,l,d,p){return kd(o,l,d,p),Sd(o)}function so(o,l){return kd(o,null,null,l),Sd(o)}function Lv(o,l,d){o.lanes|=d;var p=o.alternate;p!==null&&(p.lanes|=d);for(var y=!1,x=o.return;x!==null;)x.childLanes|=d,p=x.alternate,p!==null&&(p.childLanes|=d),x.tag===22&&(o=x.stateNode,o===null||o._visibility&1||(y=!0)),o=x,x=x.return;return o.tag===3?(x=o.stateNode,y&&l!==null&&(y=31-Fn(d),o=x.hiddenUpdates,p=o[y],p===null?o[y]=[l]:p.push(l),l.lane=d|536870912),x):null}function Sd(o){if(50<bu)throw bu=0,u4=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var $a={};function RR(o,l,d,p){this.tag=o,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 _n(o,l,d,p){return new RR(o,l,d,p)}function tg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Jr(o,l){var d=o.alternate;return d===null?(d=_n(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function zv(o,l){o.flags&=65011714;var d=o.alternate;return d===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function $d(o,l,d,p,y,x){var S=0;if(p=o,typeof o=="function")tg(o)&&(S=1);else if(typeof o=="string")S=zN(o,d,le.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case I:return o=_n(31,d,l,y),o.elementType=I,o.lanes=x,o;case C:return oo(d.children,y,x,l);case E:S=8,y|=24;break;case D:return o=_n(12,d,l,y|2),o.elementType=D,o.lanes=x,o;case B:return o=_n(13,d,l,y),o.elementType=B,o.lanes=x,o;case P:return o=_n(19,d,l,y),o.elementType=P,o.lanes=x,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case $:S=10;break e;case T:S=9;break e;case A:S=11;break e;case R:S=14;break e;case M:S=16,p=null;break e}S=29,d=Error(r(130,o===null?"null":typeof o,"")),p=null}return l=_n(S,d,l,y),l.elementType=o,l.type=p,l.lanes=x,l}function oo(o,l,d,p){return o=_n(7,o,p,l),o.lanes=d,o}function ng(o,l,d){return o=_n(6,o,null,l),o.lanes=d,o}function Iv(o){var l=_n(18,null,null,0);return l.stateNode=o,l}function rg(o,l,d){return l=_n(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var Fv=new WeakMap;function er(o,l){if(typeof o=="object"&&o!==null){var d=Fv.get(o);return d!==void 0?d:(l={value:o,source:l,stack:Wr(l)},Fv.set(o,l),l)}return{value:o,source:l,stack:Wr(l)}}var wa=[],Ta=0,wd=null,Yl=0,tr=[],nr=0,Fi=null,Rr=1,Nr="";function Zr(o,l){wa[Ta++]=Yl,wa[Ta++]=wd,wd=o,Yl=l}function Kv(o,l,d){tr[nr++]=Rr,tr[nr++]=Nr,tr[nr++]=Fi,Fi=o;var p=Rr;o=Nr;var y=32-Fn(p)-1;p&=~(1<<y),d+=1;var x=32-Fn(l)+y;if(30<x){var S=y-y%5;x=(p&(1<<S)-1).toString(32),p>>=S,y-=S,Rr=1<<32-Fn(l)+y|d<<y|p,Nr=x+o}else Rr=1<<x|d<<y|p,Nr=o}function ig(o){o.return!==null&&(Zr(o,1),Kv(o,1,0))}function sg(o){for(;o===wd;)wd=wa[--Ta],wa[Ta]=null,Yl=wa[--Ta],wa[Ta]=null;for(;o===Fi;)Fi=tr[--nr],tr[nr]=null,Nr=tr[--nr],tr[nr]=null,Rr=tr[--nr],tr[nr]=null}function _v(o,l){tr[nr++]=Rr,tr[nr++]=Nr,tr[nr++]=Fi,Rr=l.id,Nr=l.overflow,Fi=o}var Wt=null,lt=null,je=!1,Ki=null,rr=!1,og=Error(r(519));function _i(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xl(er(l,o)),og}function jv(o){var l=o.stateNode,d=o.type,p=o.memoizedProps;switch(l[Gt]=o,l[kn]=p,d){case"dialog":Oe("cancel",l),Oe("close",l);break;case"iframe":case"object":case"embed":Oe("load",l);break;case"video":case"audio":for(d=0;d<vu.length;d++)Oe(vu[d],l);break;case"source":Oe("error",l);break;case"img":case"image":case"link":Oe("error",l),Oe("load",l);break;case"details":Oe("toggle",l);break;case"input":Oe("invalid",l),tv(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Oe("invalid",l);break;case"textarea":Oe("invalid",l),rv(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||sE(l.textContent,d)?(p.popover!=null&&(Oe("beforetoggle",l),Oe("toggle",l)),p.onScroll!=null&&Oe("scroll",l),p.onScrollEnd!=null&&Oe("scrollend",l),p.onClick!=null&&(l.onclick=Yr),l=!0):l=!1,l||_i(o,!0)}function Hv(o){for(Wt=o.return;Wt;)switch(Wt.tag){case 5:case 31:case 13:rr=!1;return;case 27:case 3:rr=!0;return;default:Wt=Wt.return}}function Aa(o){if(o!==Wt)return!1;if(!je)return Hv(o),je=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||k4(o.type,o.memoizedProps)),d=!d),d&&lt&&_i(o),Hv(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));lt=pE(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));lt=pE(o)}else l===27?(l=lt,ts(o.type)?(o=A4,A4=null,lt=o):lt=l):lt=Wt?sr(o.stateNode.nextSibling):null;return!0}function ao(){lt=Wt=null,je=!1}function ag(){var o=Ki;return o!==null&&(An===null?An=o:An.push.apply(An,o),Ki=null),o}function Xl(o){Ki===null?Ki=[o]:Ki.push(o)}var lg=L(null),lo=null,ei=null;function ji(o,l,d){ne(lg,l._currentValue),l._currentValue=d}function ti(o){o._currentValue=lg.current,V(lg)}function ug(o,l,d){for(;o!==null;){var p=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),o===d)break;o=o.return}}function cg(o,l,d,p){var y=o.child;for(y!==null&&(y.return=o);y!==null;){var x=y.dependencies;if(x!==null){var S=y.child;x=x.firstContext;e:for(;x!==null;){var N=x;x=y;for(var z=0;z<l.length;z++)if(N.context===l[z]){x.lanes|=d,N=x.alternate,N!==null&&(N.lanes|=d),ug(x.return,d,o),p||(S=null);break e}x=N.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),ug(S,d,o),S=null}else S=y.child;if(S!==null)S.return=y;else for(S=y;S!==null;){if(S===o){S=null;break}if(y=S.sibling,y!==null){y.return=S.return,S=y;break}S=S.return}y=S}}function Ba(o,l,d,p){o=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 N=y.type;Kn(y.pendingProps.value,S.value)||(o!==null?o.push(N):o=[N])}}else if(y===Ee.current){if(S=y.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(o!==null?o.push(ku):o=[ku])}y=y.return}o!==null&&cg(l,o,d,p),l.flags|=262144}function Td(o){for(o=o.firstContext;o!==null;){if(!Kn(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function uo(o){lo=o,ei=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Qt(o){return Vv(lo,o)}function Ad(o,l){return lo===null&&uo(o),Vv(o,l)}function Vv(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},ei===null){if(o===null)throw Error(r(308));ei=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else ei=ei.next=l;return d}var NR=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,p){o.push(p)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},PR=t.unstable_scheduleCallback,OR=t.unstable_NormalPriority,Dt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dg(){return{controller:new NR,data:new Map,refCount:0}}function Jl(o){o.refCount--,o.refCount===0&&PR(OR,function(){o.controller.abort()})}var Zl=null,fg=0,Ma=0,Ra=null;function LR(o,l){if(Zl===null){var d=Zl=[];fg=0,Ma=m4(),Ra={status:"pending",value:void 0,then:function(p){d.push(p)}}}return fg++,l.then(Uv,Uv),l}function Uv(){if(--fg===0&&Zl!==null){Ra!==null&&(Ra.status="fulfilled");var o=Zl;Zl=null,Ma=0,Ra=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function zR(o,l){var d=[],p={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return o.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 qv=O.S;O.S=function(o,l){AC=on(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&LR(o,l),qv!==null&&qv(o,l)};var co=L(null);function hg(){var o=co.current;return o!==null?o:nt.pooledCache}function Bd(o,l){l===null?ne(co,co.current):ne(co,l.pool)}function Gv(){var o=hg();return o===null?null:{parent:Dt._currentValue,pool:o}}var Na=Error(r(460)),pg=Error(r(474)),Md=Error(r(542)),Rd={then:function(){}};function Wv(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Qv(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(Yr,Yr),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,Xv(o),o;default:if(typeof l.status=="string")l.then(Yr,Yr);else{if(o=nt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.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 o=l.reason,Xv(o),o}throw ho=l,Na}}function fo(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ho=d,Na):d}}var ho=null;function Yv(){if(ho===null)throw Error(r(459));var o=ho;return ho=null,o}function Xv(o){if(o===Na||o===Md)throw Error(r(483))}var Pa=null,eu=0;function Nd(o){var l=eu;return eu+=1,Pa===null&&(Pa=[]),Qv(Pa,o,l)}function tu(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Pd(o,l){throw l.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function Jv(o){function l(q,_){if(o){var W=q.deletions;W===null?(q.deletions=[_],q.flags|=16):W.push(_)}}function d(q,_){if(!o)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,o?(W=q.alternate,W!==null?(W=W.index,W<_?(q.flags|=67108866,_):W):(q.flags|=67108866,_)):(q.flags|=1048576,_)}function S(q){return o&&q.alternate===null&&(q.flags|=67108866),q}function N(q,_,W,se){return _===null||_.tag!==6?(_=ng(W,q.mode,se),_.return=q,_):(_=y(_,W),_.return=q,_)}function z(q,_,W,se){var xe=W.type;return xe===C?re(q,_,W.props.children,se,W.key):_!==null&&(_.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&fo(xe)===_.type)?(_=y(_,W.props),tu(_,W),_.return=q,_):(_=$d(W.type,W.key,W.props,null,q.mode,se),tu(_,W),_.return=q,_)}function Q(q,_,W,se){return _===null||_.tag!==4||_.stateNode.containerInfo!==W.containerInfo||_.stateNode.implementation!==W.implementation?(_=rg(W,q.mode,se),_.return=q,_):(_=y(_,W.children||[]),_.return=q,_)}function re(q,_,W,se,xe){return _===null||_.tag!==7?(_=oo(W,q.mode,se,xe),_.return=q,_):(_=y(_,W),_.return=q,_)}function oe(q,_,W){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=ng(""+_,q.mode,W),_.return=q,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case b:return W=$d(_.type,_.key,_.props,null,q.mode,W),tu(W,_),W.return=q,W;case v:return _=rg(_,q.mode,W),_.return=q,_;case M:return _=fo(_),oe(q,_,W)}if(te(_)||U(_))return _=oo(_,q.mode,W,null),_.return=q,_;if(typeof _.then=="function")return oe(q,Nd(_),W);if(_.$$typeof===$)return oe(q,Ad(q,_),W);Pd(q,_)}return null}function X(q,_,W,se){var xe=_!==null?_.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return xe!==null?null:N(q,_,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return W.key===xe?z(q,_,W,se):null;case v:return W.key===xe?Q(q,_,W,se):null;case M:return W=fo(W),X(q,_,W,se)}if(te(W)||U(W))return xe!==null?null:re(q,_,W,se,null);if(typeof W.then=="function")return X(q,_,Nd(W),se);if(W.$$typeof===$)return X(q,_,Ad(q,W),se);Pd(q,W)}return null}function ee(q,_,W,se,xe){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return q=q.get(W)||null,N(_,q,""+se,xe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case b:return q=q.get(se.key===null?W:se.key)||null,z(_,q,se,xe);case v:return q=q.get(se.key===null?W:se.key)||null,Q(_,q,se,xe);case M:return se=fo(se),ee(q,_,W,se,xe)}if(te(se)||U(se))return q=q.get(W)||null,re(_,q,se,xe,null);if(typeof se.then=="function")return ee(q,_,W,Nd(se),xe);if(se.$$typeof===$)return ee(q,_,W,Ad(_,se),xe);Pd(_,se)}return null}function ge(q,_,W,se){for(var xe=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],se);if(qe===null){ye===null&&(ye=Ke);break}o&&ye&&qe.alternate===null&&l(q,ye),_=x(qe,_,Be),Ue===null?xe=qe:Ue.sibling=qe,Ue=qe,ye=Ke}if(Be===W.length)return d(q,ye),je&&Zr(q,Be),xe;if(ye===null){for(;Be<W.length;Be++)ye=oe(q,W[Be],se),ye!==null&&(_=x(ye,_,Be),Ue===null?xe=ye:Ue.sibling=ye,Ue=ye);return je&&Zr(q,Be),xe}for(ye=p(ye);Be<W.length;Be++)Ke=ee(ye,q,Be,W[Be],se),Ke!==null&&(o&&Ke.alternate!==null&&ye.delete(Ke.key===null?Be:Ke.key),_=x(Ke,_,Be),Ue===null?xe=Ke:Ue.sibling=Ke,Ue=Ke);return o&&ye.forEach(function(as){return l(q,as)}),je&&Zr(q,Be),xe}function De(q,_,W,se){if(W==null)throw Error(r(151));for(var xe=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 as=X(q,ye,qe.value,se);if(as===null){ye===null&&(ye=Ke);break}o&&ye&&as.alternate===null&&l(q,ye),_=x(as,_,Be),Ue===null?xe=as:Ue.sibling=as,Ue=as,ye=Ke}if(qe.done)return d(q,ye),je&&Zr(q,Be),xe;if(ye===null){for(;!qe.done;Be++,qe=W.next())qe=oe(q,qe.value,se),qe!==null&&(_=x(qe,_,Be),Ue===null?xe=qe:Ue.sibling=qe,Ue=qe);return je&&Zr(q,Be),xe}for(ye=p(ye);!qe.done;Be++,qe=W.next())qe=ee(ye,q,Be,qe.value,se),qe!==null&&(o&&qe.alternate!==null&&ye.delete(qe.key===null?Be:qe.key),_=x(qe,_,Be),Ue===null?xe=qe:Ue.sibling=qe,Ue=qe);return o&&ye.forEach(function(WN){return l(q,WN)}),je&&Zr(q,Be),xe}function tt(q,_,W,se){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 xe=W.key;_!==null;){if(_.key===xe){if(xe=W.type,xe===C){if(_.tag===7){d(q,_.sibling),se=y(_,W.props.children),se.return=q,q=se;break e}}else if(_.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===M&&fo(xe)===_.type){d(q,_.sibling),se=y(_,W.props),tu(se,W),se.return=q,q=se;break e}d(q,_);break}else l(q,_);_=_.sibling}W.type===C?(se=oo(W.props.children,q.mode,se,W.key),se.return=q,q=se):(se=$d(W.type,W.key,W.props,null,q.mode,se),tu(se,W),se.return=q,q=se)}return S(q);case v:e:{for(xe=W.key;_!==null;){if(_.key===xe)if(_.tag===4&&_.stateNode.containerInfo===W.containerInfo&&_.stateNode.implementation===W.implementation){d(q,_.sibling),se=y(_,W.children||[]),se.return=q,q=se;break e}else{d(q,_);break}else l(q,_);_=_.sibling}se=rg(W,q.mode,se),se.return=q,q=se}return S(q);case M:return W=fo(W),tt(q,_,W,se)}if(te(W))return ge(q,_,W,se);if(U(W)){if(xe=U(W),typeof xe!="function")throw Error(r(150));return W=xe.call(W),De(q,_,W,se)}if(typeof W.then=="function")return tt(q,_,Nd(W),se);if(W.$$typeof===$)return tt(q,_,Ad(q,W),se);Pd(q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,_!==null&&_.tag===6?(d(q,_.sibling),se=y(_,W),se.return=q,q=se):(d(q,_),se=ng(W,q.mode,se),se.return=q,q=se),S(q)):d(q,_)}return function(q,_,W,se){try{eu=0;var xe=tt(q,_,W,se);return Pa=null,xe}catch(ye){if(ye===Na||ye===Md)throw ye;var Ue=_n(29,ye,null,q.mode);return Ue.lanes=se,Ue.return=q,Ue}}}var po=Jv(!0),Zv=Jv(!1),Hi=!1;function mg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gg(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Vi(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ui(o,l,d){var p=o.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=Sd(o),Lv(o,null,d),l}return kd(o,p,l,d),Sd(o)}function nu(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=o.pendingLanes,d|=p,l.lanes=d,V1(o,d)}}function bg(o,l){var d=o.updateQueue,p=o.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},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var yg=!1;function ru(){if(yg){var o=Ra;if(o!==null)throw o}}function iu(o,l,d,p){yg=!1;var y=o.updateQueue;Hi=!1;var x=y.firstBaseUpdate,S=y.lastBaseUpdate,N=y.shared.pending;if(N!==null){y.shared.pending=null;var z=N,Q=z.next;z.next=null,S===null?x=Q:S.next=Q,S=z;var re=o.alternate;re!==null&&(re=re.updateQueue,N=re.lastBaseUpdate,N!==S&&(N===null?re.firstBaseUpdate=Q:N.next=Q,re.lastBaseUpdate=z))}if(x!==null){var oe=y.baseState;S=0,re=Q=z=null,N=x;do{var X=N.lane&-536870913,ee=X!==N.lane;if(ee?(Fe&X)===X:(p&X)===X){X!==0&&X===Ma&&(yg=!0),re!==null&&(re=re.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ge=o,De=N;X=l;var tt=d;switch(De.tag){case 1:if(ge=De.payload,typeof ge=="function"){oe=ge.call(tt,oe,X);break e}oe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=De.payload,X=typeof ge=="function"?ge.call(tt,oe,X):ge,X==null)break e;oe=m({},oe,X);break e;case 2:Hi=!0}}X=N.callback,X!==null&&(o.flags|=64,ee&&(o.flags|=8192),ee=y.callbacks,ee===null?y.callbacks=[X]:ee.push(X))}else ee={lane:X,tag:N.tag,payload:N.payload,callback:N.callback,next:null},re===null?(Q=re=ee,z=oe):re=re.next=ee,S|=X;if(N=N.next,N===null){if(N=y.shared.pending,N===null)break;ee=N,N=ee.next,ee.next=null,y.lastBaseUpdate=ee,y.shared.pending=null}}while(!0);re===null&&(z=oe),y.baseState=z,y.firstBaseUpdate=Q,y.lastBaseUpdate=re,x===null&&(y.shared.lanes=0),Yi|=S,o.lanes=S,o.memoizedState=oe}}function ex(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function tx(o,l){var d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)ex(d[o],l)}var Oa=L(null),Od=L(0);function nx(o,l){o=ci,ne(Od,o),ne(Oa,l),ci=o|l.baseLanes}function vg(){ne(Od,ci),ne(Oa,Oa.current)}function xg(){ci=Od.current,V(Oa),V(Od)}var jn=L(null),ir=null;function qi(o){var l=o.alternate;ne(vt,vt.current&1),ne(jn,o),ir===null&&(l===null||Oa.current!==null||l.memoizedState!==null)&&(ir=o)}function Cg(o){ne(vt,vt.current),ne(jn,o),ir===null&&(ir=o)}function rx(o){o.tag===22?(ne(vt,vt.current),ne(jn,o),ir===null&&(ir=o)):Gi()}function Gi(){ne(vt,vt.current),ne(jn,jn.current)}function Hn(o){V(jn),ir===o&&(ir=null),V(vt)}var vt=L(0);function Ld(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||w4(d)||T4(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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ni=0,Ae=null,Ze=null,kt=null,zd=!1,La=!1,mo=!1,Id=0,su=0,za=null,IR=0;function mt(){throw Error(r(321))}function Eg(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!Kn(o[d],l[d]))return!1;return!0}function Dg(o,l,d,p,y,x){return ni=x,Ae=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,O.H=o===null||o.memoizedState===null?Kx:Ig,mo=!1,x=d(p,y),mo=!1,La&&(x=sx(l,d,p,y)),ix(o),x}function ix(o){O.H=lu;var l=Ze!==null&&Ze.next!==null;if(ni=0,kt=Ze=Ae=null,zd=!1,su=0,za=null,l)throw Error(r(300));o===null||St||(o=o.dependencies,o!==null&&Td(o)&&(St=!0))}function sx(o,l,d,p){Ae=o;var y=0;do{if(La&&(za=null),su=0,La=!1,25<=y)throw Error(r(301));if(y+=1,kt=Ze=null,o.updateQueue!=null){var x=o.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}O.H=_x,x=l(d,p)}while(La);return x}function FR(){var o=O.H,l=o.useState()[0];return l=typeof l.then=="function"?ou(l):l,o=o.useState()[0],(Ze!==null?Ze.memoizedState:null)!==o&&(Ae.flags|=1024),l}function kg(){var o=Id!==0;return Id=0,o}function Sg(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function $g(o){if(zd){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}zd=!1}ni=0,kt=Ze=Ae=null,La=!1,su=Id=0,za=null}function mn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?Ae.memoizedState=kt=o:kt=kt.next=o,kt}function xt(){if(Ze===null){var o=Ae.alternate;o=o!==null?o.memoizedState:null}else o=Ze.next;var l=kt===null?Ae.memoizedState:kt.next;if(l!==null)kt=l,Ze=o;else{if(o===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));Ze=o,o={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},kt===null?Ae.memoizedState=kt=o:kt=kt.next=o}return kt}function Fd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ou(o){var l=su;return su+=1,za===null&&(za=[]),o=Qv(za,o,l),l=Ae,(kt===null?l.memoizedState:kt.next)===null&&(l=l.alternate,O.H=l===null||l.memoizedState===null?Kx:Ig),o}function Kd(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return ou(o);if(o.$$typeof===$)return Qt(o)}throw Error(r(438,String(o)))}function wg(o){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=Fd(),Ae.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),p=0;p<o;p++)d[p]=G;return l.index++,d}function ri(o,l){return typeof l=="function"?l(o):l}function _d(o){var l=xt();return Tg(l,Ze,o)}function Tg(o,l,d){var p=o.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=o.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=o.baseState,y===null)o.memoizedState=x;else{l=y.next;var N=S=null,z=null,Q=l,re=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Fe&oe)===oe:(ni&oe)===oe){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}),oe===Ma&&(re=!0);else if((ni&X)===X){Q=Q.next,X===Ma&&(re=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(N=z=oe,S=x):z=z.next=oe,Ae.lanes|=X,Yi|=X;oe=Q.action,mo&&d(x,oe),x=Q.hasEagerState?Q.eagerState:d(x,oe)}else X={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(N=z=X,S=x):z=z.next=X,Ae.lanes|=oe,Yi|=oe;Q=Q.next}while(Q!==null&&Q!==l);if(z===null?S=x:z.next=N,!Kn(x,o.memoizedState)&&(St=!0,re&&(d=Ra,d!==null)))throw d;o.memoizedState=x,o.baseState=S,o.baseQueue=z,p.lastRenderedState=x}return y===null&&(p.lanes=0),[o.memoizedState,p.dispatch]}function Ag(o){var l=xt(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var p=d.dispatch,y=d.pending,x=l.memoizedState;if(y!==null){d.pending=null;var S=y=y.next;do x=o(x,S.action),S=S.next;while(S!==y);Kn(x,l.memoizedState)||(St=!0),l.memoizedState=x,l.baseQueue===null&&(l.baseState=x),d.lastRenderedState=x}return[x,p]}function ox(o,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=!Kn((Ze||y).memoizedState,d);if(S&&(y.memoizedState=d,St=!0),y=y.queue,Rg(ux.bind(null,p,y,o),[o]),y.getSnapshot!==l||S||kt!==null&&kt.memoizedState.tag&1){if(p.flags|=2048,Ia(9,{destroy:void 0},lx.bind(null,p,y,d,l),null),nt===null)throw Error(r(349));x||(ni&127)!==0||ax(p,l,d)}return d}function ax(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=Ae.updateQueue,l===null?(l=Fd(),Ae.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function lx(o,l,d,p){l.value=d,l.getSnapshot=p,cx(l)&&dx(o)}function ux(o,l,d){return d(function(){cx(l)&&dx(o)})}function cx(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!Kn(o,d)}catch{return!0}}function dx(o){var l=so(o,2);l!==null&&Bn(l,o,2)}function Bg(o){var l=mn();if(typeof o=="function"){var d=o;if(o=d(),mo){Li(!0);try{d()}finally{Li(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ri,lastRenderedState:o},l}function fx(o,l,d,p){return o.baseState=d,Tg(o,Ze,typeof p=="function"?p:ri)}function KR(o,l,d,p,y){if(Vd(o))throw Error(r(485));if(o=l.action,o!==null){var x={payload:y,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){x.listeners.push(S)}};O.T!==null?d(!0):x.isTransition=!1,p(x),d=l.pending,d===null?(x.next=l.pending=x,hx(l,x)):(x.next=d.next,l.pending=d.next=x)}}function hx(o,l){var d=l.action,p=l.payload,y=o.state;if(l.isTransition){var x=O.T,S={};O.T=S;try{var N=d(y,p),z=O.S;z!==null&&z(S,N),px(o,l,N)}catch(Q){Mg(o,l,Q)}finally{x!==null&&S.types!==null&&(x.types=S.types),O.T=x}}else try{x=d(y,p),px(o,l,x)}catch(Q){Mg(o,l,Q)}}function px(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){mx(o,l,p)},function(p){return Mg(o,l,p)}):mx(o,l,d)}function mx(o,l,d){l.status="fulfilled",l.value=d,gx(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,hx(o,d)))}function Mg(o,l,d){var p=o.pending;if(o.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,gx(l),l=l.next;while(l!==p)}o.action=null}function gx(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function bx(o,l){return l}function yx(o,l){if(je){var d=nt.formState;if(d!==null){e:{var p=Ae;if(je){if(lt){t:{for(var y=lt,x=rr;y.nodeType!==8;){if(!x){y=null;break t}if(y=sr(y.nextSibling),y===null){y=null;break t}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){lt=sr(y.nextSibling),p=y.data==="F!";break e}}_i(p)}p=!1}p&&(l=d[0])}}return d=mn(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bx,lastRenderedState:l},d.queue=p,d=zx.bind(null,Ae,p),p.dispatch=d,p=Bg(!1),x=zg.bind(null,Ae,!1,p.queue),p=mn(),y={state:l,dispatch:null,action:o,pending:null},p.queue=y,d=KR.bind(null,Ae,y,x,d),y.dispatch=d,p.memoizedState=o,[l,d,!1]}function vx(o){var l=xt();return xx(l,Ze,o)}function xx(o,l,d){if(l=Tg(o,l,bx)[0],o=_d(ri)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ou(l)}catch(S){throw S===Na?Md:S}else p=l;l=xt();var y=l.queue,x=y.dispatch;return d!==l.memoizedState&&(Ae.flags|=2048,Ia(9,{destroy:void 0},_R.bind(null,y,d),null)),[p,x,o]}function _R(o,l){o.action=l}function Cx(o){var l=xt(),d=Ze;if(d!==null)return xx(l,d,o);xt(),l=l.memoizedState,d=xt();var p=d.queue.dispatch;return d.memoizedState=o,[l,p,!1]}function Ia(o,l,d,p){return o={tag:o,create:d,deps:p,inst:l,next:null},l=Ae.updateQueue,l===null&&(l=Fd(),Ae.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(p=d.next,d.next=o,o.next=p,l.lastEffect=o),o}function Ex(){return xt().memoizedState}function jd(o,l,d,p){var y=mn();Ae.flags|=o,y.memoizedState=Ia(1|l,{destroy:void 0},d,p===void 0?null:p)}function Hd(o,l,d,p){var y=xt();p=p===void 0?null:p;var x=y.memoizedState.inst;Ze!==null&&p!==null&&Eg(p,Ze.memoizedState.deps)?y.memoizedState=Ia(l,x,d,p):(Ae.flags|=o,y.memoizedState=Ia(1|l,x,d,p))}function Dx(o,l){jd(8390656,8,o,l)}function Rg(o,l){Hd(2048,8,o,l)}function jR(o){Ae.flags|=4;var l=Ae.updateQueue;if(l===null)l=Fd(),Ae.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function kx(o){var l=xt().memoizedState;return jR({ref:l,nextImpl:o}),function(){if((Ge&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function Sx(o,l){return Hd(4,2,o,l)}function $x(o,l){return Hd(4,4,o,l)}function wx(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function Tx(o,l,d){d=d!=null?d.concat([o]):null,Hd(4,4,wx.bind(null,l,o),d)}function Ng(){}function Ax(o,l){var d=xt();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&Eg(l,p[1])?p[0]:(d.memoizedState=[o,l],o)}function Bx(o,l){var d=xt();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&Eg(l,p[1]))return p[0];if(p=o(),mo){Li(!0);try{o()}finally{Li(!1)}}return d.memoizedState=[p,l],p}function Pg(o,l,d){return d===void 0||(ni&1073741824)!==0&&(Fe&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=MC(),Ae.lanes|=o,Yi|=o,d)}function Mx(o,l,d,p){return Kn(d,l)?d:Oa.current!==null?(o=Pg(o,d,p),Kn(o,l)||(St=!0),o):(ni&42)===0||(ni&1073741824)!==0&&(Fe&261930)===0?(St=!0,o.memoizedState=d):(o=MC(),Ae.lanes|=o,Yi|=o,l)}function Rx(o,l,d,p,y){var x=K.p;K.p=x!==0&&8>x?x:8;var S=O.T,N={};O.T=N,zg(o,!1,l,d);try{var z=y(),Q=O.S;if(Q!==null&&Q(N,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=zR(z,p);au(o,l,re,qn(o))}else au(o,l,p,qn(o))}catch(oe){au(o,l,{then:function(){},status:"rejected",reason:oe},qn())}finally{K.p=x,S!==null&&N.types!==null&&(S.types=N.types),O.T=S}}function HR(){}function Og(o,l,d,p){if(o.tag!==5)throw Error(r(476));var y=Nx(o).queue;Rx(o,y,l,Y,d===null?HR:function(){return Px(o),d(p)})}function Nx(o){var l=o.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},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function Px(o){var l=Nx(o);l.next===null&&(l=o.alternate.memoizedState),au(o,l.next.queue,{},qn())}function Lg(){return Qt(ku)}function Ox(){return xt().memoizedState}function Lx(){return xt().memoizedState}function VR(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=qn();o=Vi(d);var p=Ui(l,o,d);p!==null&&(Bn(p,l,d),nu(p,l,d)),l={cache:dg()},o.payload=l;return}l=l.return}}function UR(o,l,d){var p=qn();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Vd(o)?Ix(l,d):(d=eg(o,l,d,p),d!==null&&(Bn(d,o,p),Fx(d,l,p)))}function zx(o,l,d){var p=qn();au(o,l,d,p)}function au(o,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Vd(o))Ix(l,y);else{var x=o.alternate;if(o.lanes===0&&(x===null||x.lanes===0)&&(x=l.lastRenderedReducer,x!==null))try{var S=l.lastRenderedState,N=x(S,d);if(y.hasEagerState=!0,y.eagerState=N,Kn(N,S))return kd(o,l,y,0),nt===null&&Dd(),!1}catch{}if(d=eg(o,l,y,p),d!==null)return Bn(d,o,p),Fx(d,l,p),!0}return!1}function zg(o,l,d,p){if(p={lane:2,revertLane:m4(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Vd(o)){if(l)throw Error(r(479))}else l=eg(o,d,p,2),l!==null&&Bn(l,o,2)}function Vd(o){var l=o.alternate;return o===Ae||l!==null&&l===Ae}function Ix(o,l){La=zd=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function Fx(o,l,d){if((d&4194048)!==0){var p=l.lanes;p&=o.pendingLanes,d|=p,l.lanes=d,V1(o,d)}}var lu={readContext:Qt,use:Kd,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};lu.useEffectEvent=mt;var Kx={readContext:Qt,use:Kd,useCallback:function(o,l){return mn().memoizedState=[o,l===void 0?null:l],o},useContext:Qt,useEffect:Dx,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,jd(4194308,4,wx.bind(null,l,o),d)},useLayoutEffect:function(o,l){return jd(4194308,4,o,l)},useInsertionEffect:function(o,l){jd(4,2,o,l)},useMemo:function(o,l){var d=mn();l=l===void 0?null:l;var p=o();if(mo){Li(!0);try{o()}finally{Li(!1)}}return d.memoizedState=[p,l],p},useReducer:function(o,l,d){var p=mn();if(d!==void 0){var y=d(l);if(mo){Li(!0);try{d(l)}finally{Li(!1)}}}else y=l;return p.memoizedState=p.baseState=y,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:y},p.queue=o,o=o.dispatch=UR.bind(null,Ae,o),[p.memoizedState,o]},useRef:function(o){var l=mn();return o={current:o},l.memoizedState=o},useState:function(o){o=Bg(o);var l=o.queue,d=zx.bind(null,Ae,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:Ng,useDeferredValue:function(o,l){var d=mn();return Pg(d,o,l)},useTransition:function(){var o=Bg(!1);return o=Rx.bind(null,Ae,o.queue,!0,!1),mn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var p=Ae,y=mn();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||ax(p,l,d)}y.memoizedState=d;var x={value:d,getSnapshot:l};return y.queue=x,Dx(ux.bind(null,p,x,o),[o]),p.flags|=2048,Ia(9,{destroy:void 0},lx.bind(null,p,x,d,l),null),d},useId:function(){var o=mn(),l=nt.identifierPrefix;if(je){var d=Nr,p=Rr;d=(p&~(1<<32-Fn(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Id++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=IR++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Lg,useFormState:yx,useActionState:yx,useOptimistic:function(o){var l=mn();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=zg.bind(null,Ae,!0,d),d.dispatch=l,[o,l]},useMemoCache:wg,useCacheRefresh:function(){return mn().memoizedState=VR.bind(null,Ae)},useEffectEvent:function(o){var l=mn(),d={impl:o};return l.memoizedState=d,function(){if((Ge&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Ig={readContext:Qt,use:Kd,useCallback:Ax,useContext:Qt,useEffect:Rg,useImperativeHandle:Tx,useInsertionEffect:Sx,useLayoutEffect:$x,useMemo:Bx,useReducer:_d,useRef:Ex,useState:function(){return _d(ri)},useDebugValue:Ng,useDeferredValue:function(o,l){var d=xt();return Mx(d,Ze.memoizedState,o,l)},useTransition:function(){var o=_d(ri)[0],l=xt().memoizedState;return[typeof o=="boolean"?o:ou(o),l]},useSyncExternalStore:ox,useId:Ox,useHostTransitionStatus:Lg,useFormState:vx,useActionState:vx,useOptimistic:function(o,l){var d=xt();return fx(d,Ze,o,l)},useMemoCache:wg,useCacheRefresh:Lx};Ig.useEffectEvent=kx;var _x={readContext:Qt,use:Kd,useCallback:Ax,useContext:Qt,useEffect:Rg,useImperativeHandle:Tx,useInsertionEffect:Sx,useLayoutEffect:$x,useMemo:Bx,useReducer:Ag,useRef:Ex,useState:function(){return Ag(ri)},useDebugValue:Ng,useDeferredValue:function(o,l){var d=xt();return Ze===null?Pg(d,o,l):Mx(d,Ze.memoizedState,o,l)},useTransition:function(){var o=Ag(ri)[0],l=xt().memoizedState;return[typeof o=="boolean"?o:ou(o),l]},useSyncExternalStore:ox,useId:Ox,useHostTransitionStatus:Lg,useFormState:Cx,useActionState:Cx,useOptimistic:function(o,l){var d=xt();return Ze!==null?fx(d,Ze,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:wg,useCacheRefresh:Lx};_x.useEffectEvent=kx;function Fg(o,l,d,p){l=o.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Kg={enqueueSetState:function(o,l,d){o=o._reactInternals;var p=qn(),y=Vi(p);y.payload=l,d!=null&&(y.callback=d),l=Ui(o,y,p),l!==null&&(Bn(l,o,p),nu(l,o,p))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var p=qn(),y=Vi(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=Ui(o,y,p),l!==null&&(Bn(l,o,p),nu(l,o,p))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=qn(),p=Vi(d);p.tag=2,l!=null&&(p.callback=l),l=Ui(o,p,d),l!==null&&(Bn(l,o,d),nu(l,o,d))}};function jx(o,l,d,p,y,x,S){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,x,S):l.prototype&&l.prototype.isPureReactComponent?!Wl(d,p)||!Wl(y,x):!0}function Hx(o,l,d,p){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==o&&Kg.enqueueReplaceState(l,l.state,null)}function go(o,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(o=o.defaultProps){d===l&&(d=m({},d));for(var y in o)d[y]===void 0&&(d[y]=o[y])}return d}function Vx(o){Ed(o)}function Ux(o){console.error(o)}function qx(o){Ed(o)}function Ud(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function Gx(o,l,d){try{var p=o.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function _g(o,l,d){return d=Vi(d),d.tag=3,d.payload={element:null},d.callback=function(){Ud(o,l)},d}function Wx(o){return o=Vi(o),o.tag=3,o}function Qx(o,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var x=p.value;o.payload=function(){return y(x)},o.callback=function(){Gx(l,d,p)}}var S=d.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(o.callback=function(){Gx(l,d,p),typeof y!="function"&&(Xi===null?Xi=new Set([this]):Xi.add(this));var N=p.stack;this.componentDidCatch(p.value,{componentStack:N!==null?N:""})})}function qR(o,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Ba(l,d,y,!0),d=jn.current,d!==null){switch(d.tag){case 31:case 13:return ir===null?rf():d.alternate===null&&gt===0&&(gt=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===Rd?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),f4(o,p,y)),!1;case 22:return d.flags|=65536,p===Rd?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)),f4(o,p,y)),!1}throw Error(r(435,d.tag))}return f4(o,p,y),rf(),!1}if(je)return l=jn.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==og&&(o=Error(r(422),{cause:p}),Xl(er(o,d)))):(p!==og&&(l=Error(r(423),{cause:p}),Xl(er(l,d))),o=o.current.alternate,o.flags|=65536,y&=-y,o.lanes|=y,p=er(p,d),y=_g(o.stateNode,p,y),bg(o,y),gt!==4&&(gt=2)),!1;var x=Error(r(520),{cause:p});if(x=er(x,d),gu===null?gu=[x]:gu.push(x),gt!==4&&(gt=2),l===null)return!0;p=er(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=y&-y,d.lanes|=o,o=_g(d.stateNode,p,o),bg(d,o),!1;case 1:if(l=d.type,x=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Xi===null||!Xi.has(x))))return d.flags|=65536,y&=-y,d.lanes|=y,y=Wx(y),Qx(y,o,d,p),bg(d,y),!1}d=d.return}while(d!==null);return!1}var jg=Error(r(461)),St=!1;function Yt(o,l,d,p){l.child=o===null?Zv(l,null,d,p):po(l,o.child,d,p)}function Yx(o,l,d,p,y){d=d.render;var x=l.ref;if("ref"in p){var S={};for(var N in p)N!=="ref"&&(S[N]=p[N])}else S=p;return uo(l),p=Dg(o,l,d,S,x,y),N=kg(),o!==null&&!St?(Sg(o,l,y),ii(o,l,y)):(je&&N&&ig(l),l.flags|=1,Yt(o,l,p,y),l.child)}function Xx(o,l,d,p,y){if(o===null){var x=d.type;return typeof x=="function"&&!tg(x)&&x.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=x,Jx(o,l,x,p,y)):(o=$d(d.type,null,p,l,l.mode,y),o.ref=l.ref,o.return=l,l.child=o)}if(x=o.child,!Yg(o,y)){var S=x.memoizedProps;if(d=d.compare,d=d!==null?d:Wl,d(S,p)&&o.ref===l.ref)return ii(o,l,y)}return l.flags|=1,o=Jr(x,p),o.ref=l.ref,o.return=l,l.child=o}function Jx(o,l,d,p,y){if(o!==null){var x=o.memoizedProps;if(Wl(x,p)&&o.ref===l.ref)if(St=!1,l.pendingProps=p=x,Yg(o,y))(o.flags&131072)!==0&&(St=!0);else return l.lanes=o.lanes,ii(o,l,y)}return Hg(o,l,d,p,y)}function Zx(o,l,d,p){var y=p.children,x=o!==null?o.memoizedState:null;if(o===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,o!==null){for(p=l.child=o.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~x}else p=0,l.child=null;return eC(o,l,x,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&Bd(l,x!==null?x.cachePool:null),x!==null?nx(l,x):vg(),rx(l);else return p=l.lanes=536870912,eC(o,l,x!==null?x.baseLanes|d:d,d,p)}else x!==null?(Bd(l,x.cachePool),nx(l,x),Gi(),l.memoizedState=null):(o!==null&&Bd(l,null),vg(),Gi());return Yt(o,l,y,d),l.child}function uu(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function eC(o,l,d,p,y){var x=hg();return x=x===null?null:{parent:Dt._currentValue,pool:x},l.memoizedState={baseLanes:d,cachePool:x},o!==null&&Bd(l,null),vg(),rx(l),o!==null&&Ba(o,l,p,!0),l.childLanes=y,null}function qd(o,l){return l=Wd({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function tC(o,l,d){return po(l,o.child,null,d),o=qd(l,l.pendingProps),o.flags|=2,Hn(l),l.memoizedState=null,o}function GR(o,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(je){if(p.mode==="hidden")return o=qd(l,p),l.lanes=536870912,uu(null,o);if(Cg(l),(o=lt)?(o=hE(o,rr),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Fi!==null?{id:Rr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},d=Iv(o),d.return=l,l.child=d,Wt=l,lt=null)):o=null,o===null)throw _i(l);return l.lanes=536870912,null}return qd(l,p)}var x=o.memoizedState;if(x!==null){var S=x.dehydrated;if(Cg(l),y)if(l.flags&256)l.flags&=-257,l=tC(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(St||Ba(o,l,d,!1),y=(d&o.childLanes)!==0,St||y){if(p=nt,p!==null&&(S=U1(p,d),S!==0&&S!==x.retryLane))throw x.retryLane=S,so(o,S),Bn(p,o,S),jg;rf(),l=tC(o,l,d)}else o=x.treeContext,lt=sr(S.nextSibling),Wt=l,je=!0,Ki=null,rr=!1,o!==null&&_v(l,o),l=qd(l,p),l.flags|=4096;return l}return o=Jr(o.child,{mode:p.mode,children:p.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Gd(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function Hg(o,l,d,p,y){return uo(l),d=Dg(o,l,d,p,void 0,y),p=kg(),o!==null&&!St?(Sg(o,l,y),ii(o,l,y)):(je&&p&&ig(l),l.flags|=1,Yt(o,l,d,y),l.child)}function nC(o,l,d,p,y,x){return uo(l),l.updateQueue=null,d=sx(l,p,d,y),ix(o),p=kg(),o!==null&&!St?(Sg(o,l,x),ii(o,l,x)):(je&&p&&ig(l),l.flags|=1,Yt(o,l,d,x),l.child)}function rC(o,l,d,p,y){if(uo(l),l.stateNode===null){var x=$a,S=d.contextType;typeof S=="object"&&S!==null&&(x=Qt(S)),x=new d(p,x),l.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=Kg,l.stateNode=x,x._reactInternals=l,x=l.stateNode,x.props=p,x.state=l.memoizedState,x.refs={},mg(l),S=d.contextType,x.context=typeof S=="object"&&S!==null?Qt(S):$a,x.state=l.memoizedState,S=d.getDerivedStateFromProps,typeof S=="function"&&(Fg(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&&Kg.enqueueReplaceState(x,x.state,null),iu(l,p,x,y),ru(),x.state=l.memoizedState),typeof x.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(o===null){x=l.stateNode;var N=l.memoizedProps,z=go(d,N);x.props=z;var Q=x.context,re=d.contextType;S=$a,typeof re=="object"&&re!==null&&(S=Qt(re));var oe=d.getDerivedStateFromProps;re=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function",N=l.pendingProps!==N,re||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(N||Q!==S)&&Hx(l,x,p,S),Hi=!1;var X=l.memoizedState;x.state=X,iu(l,p,x,y),ru(),Q=l.memoizedState,N||X!==Q||Hi?(typeof oe=="function"&&(Fg(l,d,oe,p),Q=l.memoizedState),(z=Hi||jx(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,gg(o,l),S=l.memoizedProps,re=go(d,S),x.props=re,oe=l.pendingProps,X=x.context,Q=d.contextType,z=$a,typeof Q=="object"&&Q!==null&&(z=Qt(Q)),N=d.getDerivedStateFromProps,(Q=typeof N=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(S!==oe||X!==z)&&Hx(l,x,p,z),Hi=!1,X=l.memoizedState,x.state=X,iu(l,p,x,y),ru();var ee=l.memoizedState;S!==oe||X!==ee||Hi||o!==null&&o.dependencies!==null&&Td(o.dependencies)?(typeof N=="function"&&(Fg(l,d,N,p),ee=l.memoizedState),(re=Hi||jx(l,d,re,p,X,ee,z)||o!==null&&o.dependencies!==null&&Td(o.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===o.memoizedProps&&X===o.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||S===o.memoizedProps&&X===o.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===o.memoizedProps&&X===o.memoizedState||(l.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||S===o.memoizedProps&&X===o.memoizedState||(l.flags|=1024),p=!1)}return x=p,Gd(o,l),p=(l.flags&128)!==0,x||p?(x=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:x.render(),l.flags|=1,o!==null&&p?(l.child=po(l,o.child,null,y),l.child=po(l,null,d,y)):Yt(o,l,d,y),l.memoizedState=x.state,o=l.child):o=ii(o,l,y),o}function iC(o,l,d,p){return ao(),l.flags|=256,Yt(o,l,d,p),l.child}var Vg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ug(o){return{baseLanes:o,cachePool:Gv()}}function qg(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=Un),o}function sC(o,l,d){var p=l.pendingProps,y=!1,x=(l.flags&128)!==0,S;if((S=x)||(S=o!==null&&o.memoizedState===null?!1:(vt.current&2)!==0),S&&(y=!0,l.flags&=-129),S=(l.flags&32)!==0,l.flags&=-33,o===null){if(je){if(y?qi(l):Gi(),(o=lt)?(o=hE(o,rr),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Fi!==null?{id:Rr,overflow:Nr}:null,retryLane:536870912,hydrationErrors:null},d=Iv(o),d.return=l,l.child=d,Wt=l,lt=null)):o=null,o===null)throw _i(l);return T4(o)?l.lanes=32:l.lanes=536870912,null}var N=p.children;return p=p.fallback,y?(Gi(),y=l.mode,N=Wd({mode:"hidden",children:N},y),p=oo(p,y,d,null),N.return=l,p.return=l,N.sibling=p,l.child=N,p=l.child,p.memoizedState=Ug(d),p.childLanes=qg(o,S,d),l.memoizedState=Vg,uu(null,p)):(qi(l),Gg(l,N))}var z=o.memoizedState;if(z!==null&&(N=z.dehydrated,N!==null)){if(x)l.flags&256?(qi(l),l.flags&=-257,l=Wg(o,l,d)):l.memoizedState!==null?(Gi(),l.child=o.child,l.flags|=128,l=null):(Gi(),N=p.fallback,y=l.mode,p=Wd({mode:"visible",children:p.children},y),N=oo(N,y,d,null),N.flags|=2,p.return=l,N.return=l,p.sibling=N,l.child=p,po(l,o.child,null,d),p=l.child,p.memoizedState=Ug(d),p.childLanes=qg(o,S,d),l.memoizedState=Vg,l=uu(null,p));else if(qi(l),T4(N)){if(S=N.nextSibling&&N.nextSibling.dataset,S)var Q=S.dgst;S=Q,p=Error(r(419)),p.stack="",p.digest=S,Xl({value:p,source:null,stack:null}),l=Wg(o,l,d)}else if(St||Ba(o,l,d,!1),S=(d&o.childLanes)!==0,St||S){if(S=nt,S!==null&&(p=U1(S,d),p!==0&&p!==z.retryLane))throw z.retryLane=p,so(o,p),Bn(S,o,p),jg;w4(N)||rf(),l=Wg(o,l,d)}else w4(N)?(l.flags|=192,l.child=o.child,l=null):(o=z.treeContext,lt=sr(N.nextSibling),Wt=l,je=!0,Ki=null,rr=!1,o!==null&&_v(l,o),l=Gg(l,p.children),l.flags|=4096);return l}return y?(Gi(),N=p.fallback,y=l.mode,z=o.child,Q=z.sibling,p=Jr(z,{mode:"hidden",children:p.children}),p.subtreeFlags=z.subtreeFlags&65011712,Q!==null?N=Jr(Q,N):(N=oo(N,y,d,null),N.flags|=2),N.return=l,p.return=l,p.sibling=N,l.child=p,uu(null,p),p=l.child,N=o.child.memoizedState,N===null?N=Ug(d):(y=N.cachePool,y!==null?(z=Dt._currentValue,y=y.parent!==z?{parent:z,pool:z}:y):y=Gv(),N={baseLanes:N.baseLanes|d,cachePool:y}),p.memoizedState=N,p.childLanes=qg(o,S,d),l.memoizedState=Vg,uu(o.child,p)):(qi(l),d=o.child,o=d.sibling,d=Jr(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,o!==null&&(S=l.deletions,S===null?(l.deletions=[o],l.flags|=16):S.push(o)),l.child=d,l.memoizedState=null,d)}function Gg(o,l){return l=Wd({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Wd(o,l){return o=_n(22,o,null,l),o.lanes=0,o}function Wg(o,l,d){return po(l,o.child,null,d),o=Gg(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function oC(o,l,d){o.lanes|=l;var p=o.alternate;p!==null&&(p.lanes|=l),ug(o.return,l,d)}function Qg(o,l,d,p,y,x){var S=o.memoizedState;S===null?o.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 aC(o,l,d){var p=l.pendingProps,y=p.revealOrder,x=p.tail;p=p.children;var S=vt.current,N=(S&2)!==0;if(N?(S=S&1|2,l.flags|=128):S&=1,ne(vt,S),Yt(o,l,p,d),p=je?Yl:0,!N&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&oC(o,d,l);else if(o.tag===19)oC(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)o=d.alternate,o!==null&&Ld(o)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),Qg(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(o=y.alternate,o!==null&&Ld(o)===null){l.child=y;break}o=y.sibling,y.sibling=d,d=y,y=o}Qg(l,!0,d,null,x,p);break;case"together":Qg(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function ii(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),Yi|=l.lanes,(d&l.childLanes)===0)if(o!==null){if(Ba(o,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Jr(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Jr(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function Yg(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Td(o)))}function WR(o,l,d){switch(l.tag){case 3:Ve(l,l.stateNode.containerInfo),ji(l,Dt,o.memoizedState.cache),ao();break;case 27:case 5:Dn(l);break;case 4:Ve(l,l.stateNode.containerInfo);break;case 10:ji(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,Cg(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(qi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?sC(o,l,d):(qi(l),o=ii(o,l,d),o!==null?o.sibling:null);qi(l);break;case 19:var y=(o.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Ba(o,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return aC(o,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,Zx(o,l,d,l.pendingProps);case 24:ji(l,Dt,o.memoizedState.cache)}return ii(o,l,d)}function lC(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)St=!0;else{if(!Yg(o,d)&&(l.flags&128)===0)return St=!1,WR(o,l,d);St=(o.flags&131072)!==0}else St=!1,je&&(l.flags&1048576)!==0&&Kv(l,Yl,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(o=fo(l.elementType),l.type=o,typeof o=="function")tg(o)?(p=go(o,p),l.tag=1,l=rC(null,l,o,p,d)):(l.tag=0,l=Hg(null,l,o,p,d));else{if(o!=null){var y=o.$$typeof;if(y===A){l.tag=11,l=Yx(null,l,o,p,d);break e}else if(y===R){l.tag=14,l=Xx(null,l,o,p,d);break e}}throw l=F(o)||o,Error(r(306,l,""))}}return l;case 0:return Hg(o,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=go(p,l.pendingProps),rC(o,l,p,y,d);case 3:e:{if(Ve(l,l.stateNode.containerInfo),o===null)throw Error(r(387));p=l.pendingProps;var x=l.memoizedState;y=x.element,gg(o,l),iu(l,p,null,d);var S=l.memoizedState;if(p=S.cache,ji(l,Dt,p),p!==x.cache&&cg(l,[Dt],d,!0),ru(),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=iC(o,l,p,d);break e}else if(p!==y){y=er(Error(r(424)),l),Xl(y),l=iC(o,l,p,d);break e}else for(o=l.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,lt=sr(o.firstChild),Wt=l,je=!0,Ki=null,rr=!0,d=Zv(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(ao(),p===y){l=ii(o,l,d);break e}Yt(o,l,p,d)}l=l.child}return l;case 26:return Gd(o,l),o===null?(d=vE(l.type,null,l.pendingProps,null))?l.memoizedState=d:je||(d=l.type,o=l.pendingProps,p=df(fe.current).createElement(d),p[Gt]=l,p[kn]=o,Xt(p,d,o),_t(p),l.stateNode=p):l.memoizedState=vE(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return Dn(l),o===null&&je&&(p=l.stateNode=gE(l.type,l.pendingProps,fe.current),Wt=l,rr=!0,y=lt,ts(l.type)?(A4=y,lt=sr(p.firstChild)):lt=y),Yt(o,l,l.pendingProps.children,d),Gd(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&je&&((y=p=lt)&&(p=kN(p,l.type,l.pendingProps,rr),p!==null?(l.stateNode=p,Wt=l,lt=sr(p.firstChild),rr=!1,y=!0):y=!1),y||_i(l)),Dn(l),y=l.type,x=l.pendingProps,S=o!==null?o.memoizedProps:null,p=x.children,k4(y,x)?p=null:S!==null&&k4(y,S)&&(l.flags|=32),l.memoizedState!==null&&(y=Dg(o,l,FR,null,null,d),ku._currentValue=y),Gd(o,l),Yt(o,l,p,d),l.child;case 6:return o===null&&je&&((o=d=lt)&&(d=SN(d,l.pendingProps,rr),d!==null?(l.stateNode=d,Wt=l,lt=null,o=!0):o=!1),o||_i(l)),null;case 13:return sC(o,l,d);case 4:return Ve(l,l.stateNode.containerInfo),p=l.pendingProps,o===null?l.child=po(l,null,p,d):Yt(o,l,p,d),l.child;case 11:return Yx(o,l,l.type,l.pendingProps,d);case 7:return Yt(o,l,l.pendingProps,d),l.child;case 8:return Yt(o,l,l.pendingProps.children,d),l.child;case 12:return Yt(o,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,ji(l,l.type,p.value),Yt(o,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,uo(l),y=Qt(y),p=p(y),l.flags|=1,Yt(o,l,p,d),l.child;case 14:return Xx(o,l,l.type,l.pendingProps,d);case 15:return Jx(o,l,l.type,l.pendingProps,d);case 19:return aC(o,l,d);case 31:return GR(o,l,d);case 22:return Zx(o,l,d,l.pendingProps);case 24:return uo(l),p=Qt(Dt),o===null?(y=hg(),y===null&&(y=nt,x=dg(),y.pooledCache=x,x.refCount++,x!==null&&(y.pooledCacheLanes|=d),y=x),l.memoizedState={parent:p,cache:y},mg(l),ji(l,Dt,y)):((o.lanes&d)!==0&&(gg(o,l),iu(l,null,null,d),ru()),y=o.memoizedState,x=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),ji(l,Dt,p)):(p=x.cache,ji(l,Dt,p),p!==y.cache&&cg(l,[Dt],d,!0))),Yt(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function si(o){o.flags|=4}function Xg(o,l,d,p,y){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(y&335544128)===y)if(o.stateNode.complete)o.flags|=8192;else if(OC())o.flags|=8192;else throw ho=Rd,pg}else o.flags&=-16777217}function uC(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!kE(l))if(OC())o.flags|=8192;else throw ho=Rd,pg}function Qd(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?j1():536870912,o.lanes|=l,ja|=l)}function cu(o,l){if(!je)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function ut(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,p=0;if(l)for(var y=o.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=p,o.childLanes=d,l}function QR(o,l,d){var p=l.pendingProps;switch(sg(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,o!==null&&(p=o.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ti(Dt),Se(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(Aa(l)?si(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ag())),ut(l),null;case 26:var y=l.type,x=l.memoizedState;return o===null?(si(l),x!==null?(ut(l),uC(l,x)):(ut(l),Xg(l,y,null,p,d))):x?x!==o.memoizedState?(si(l),ut(l),uC(l,x)):(ut(l),l.flags&=-16777217):(o=o.memoizedProps,o!==p&&si(l),ut(l),Xg(l,y,o,p,d)),null;case 27:if(sn(l),d=fe.current,y=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&si(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ut(l),null}o=le.current,Aa(l)?jv(l):(o=gE(y,p,d),l.stateNode=o,si(l))}return ut(l),null;case 5:if(sn(l),y=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&si(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return ut(l),null}if(x=le.current,Aa(l))jv(l);else{var S=df(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[Gt]=l,x[kn]=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(Xt(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&&si(l)}}return ut(l),Xg(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==p&&si(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(o=fe.current,Aa(l)){if(o=l.stateNode,d=l.memoizedProps,p=null,y=Wt,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}o[Gt]=l,o=!!(o.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||sE(o.nodeValue,d)),o||_i(l,!0)}else o=df(o).createTextNode(p),o[Gt]=l,l.stateNode=o}return ut(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(p=Aa(l),d!==null){if(o===null){if(!p)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Gt]=l}else ao(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ut(l),o=!1}else d=ag(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?(Hn(l),l):(Hn(l),null);if((l.flags&128)!==0)throw Error(r(558))}return ut(l),null;case 13:if(p=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(y=Aa(l),p!==null&&p.dehydrated!==null){if(o===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Gt]=l}else ao(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ut(l),y=!1}else y=ag(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Hn(l),l):(Hn(l),null)}return Hn(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,o=o!==null&&o.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!==o&&d&&(l.child.flags|=8192),Qd(l,l.updateQueue),ut(l),null);case 4:return Se(),o===null&&v4(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)cu(p,!1);else{if(gt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(x=Ld(o),x!==null){for(l.flags|=128,cu(p,!1),o=x.updateQueue,l.updateQueue=o,Qd(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)zv(d,o),d=d.sibling;return ne(vt,vt.current&1|2),je&&Zr(l,p.treeForkCount),l.child}o=o.sibling}p.tail!==null&&on()>ef&&(l.flags|=128,y=!0,cu(p,!1),l.lanes=4194304)}else{if(!y)if(o=Ld(x),o!==null){if(l.flags|=128,y=!0,o=o.updateQueue,l.updateQueue=o,Qd(l,o),cu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!je)return ut(l),null}else 2*on()-p.renderingStartTime>ef&&d!==536870912&&(l.flags|=128,y=!0,cu(p,!1),l.lanes=4194304);p.isBackwards?(x.sibling=l.child,l.child=x):(o=p.last,o!==null?o.sibling=x:l.child=x,p.last=x)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=on(),o.sibling=null,d=vt.current,ne(vt,y?d&1|2:d&1),je&&Zr(l,p.treeForkCount),o):(ut(l),null);case 22:case 23:return Hn(l),xg(),p=l.memoizedState!==null,o!==null?o.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&&Qd(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),o!==null&&V(co),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),ti(Dt),ut(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function YR(o,l){switch(sg(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return ti(Dt),Se(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return sn(l),null;case 31:if(l.memoizedState!==null){if(Hn(l),l.alternate===null)throw Error(r(340));ao()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(Hn(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ao()}return o=l.flags,o&65536?(l.flags=o&-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 Hn(l),xg(),o!==null&&V(co),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return ti(Dt),null;case 25:return null;default:return null}}function cC(o,l){switch(sg(l),l.tag){case 3:ti(Dt),Se();break;case 26:case 27:case 5:sn(l);break;case 4:Se();break;case 31:l.memoizedState!==null&&Hn(l);break;case 13:Hn(l);break;case 19:V(vt);break;case 10:ti(l.type);break;case 22:case 23:Hn(l),xg(),o!==null&&V(co);break;case 24:ti(Dt)}}function du(o,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&o)===o){p=void 0;var x=d.create,S=d.inst;p=x(),S.destroy=p}d=d.next}while(d!==y)}}catch(N){Ye(l,l.return,N)}}function Wi(o,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&o)===o){var S=p.inst,N=S.destroy;if(N!==void 0){S.destroy=void 0,y=l;var z=d,Q=N;try{Q()}catch(re){Ye(y,z,re)}}}p=p.next}while(p!==x)}}catch(re){Ye(l,l.return,re)}}function dC(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{tx(l,d)}catch(p){Ye(o,o.return,p)}}}function fC(o,l,d){d.props=go(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(p){Ye(o,l,p)}}function fu(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var p=o.stateNode;break;case 30:p=o.stateNode;break;default:p=o.stateNode}typeof d=="function"?o.refCleanup=d(p):d.current=p}}catch(y){Ye(o,l,y)}}function Pr(o,l){var d=o.ref,p=o.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){Ye(o,l,y)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Ye(o,l,y)}else d.current=null}function hC(o){var l=o.type,d=o.memoizedProps,p=o.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(o,o.return,y)}}function Jg(o,l,d){try{var p=o.stateNode;yN(p,o.type,d,l),p[kn]=l}catch(y){Ye(o,o.return,y)}}function pC(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ts(o.type)||o.tag===4}function Zg(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||pC(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ts(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function e4(o,l,d){var p=o.tag;if(p===5||p===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Yr));else if(p!==4&&(p===27&&ts(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(e4(o,l,d),o=o.sibling;o!==null;)e4(o,l,d),o=o.sibling}function Yd(o,l,d){var p=o.tag;if(p===5||p===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(p!==4&&(p===27&&ts(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Yd(o,l,d),o=o.sibling;o!==null;)Yd(o,l,d),o=o.sibling}function mC(o){var l=o.stateNode,d=o.memoizedProps;try{for(var p=o.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);Xt(l,p,d),l[Gt]=o,l[kn]=d}catch(x){Ye(o,o.return,x)}}var oi=!1,$t=!1,t4=!1,gC=typeof WeakSet=="function"?WeakSet:Set,jt=null;function XR(o,l){if(o=o.containerInfo,E4=yf,o=Tv(o),Wm(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.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,N=-1,z=-1,Q=0,re=0,oe=o,X=null;t:for(;;){for(var ee;oe!==d||y!==0&&oe.nodeType!==3||(N=S+y),oe!==x||p!==0&&oe.nodeType!==3||(z=S+p),oe.nodeType===3&&(S+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)X=oe,oe=ee;for(;;){if(oe===o)break t;if(X===d&&++Q===y&&(N=S),X===x&&++re===p&&(z=S),(ee=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=ee}d=N===-1||z===-1?null:{start:N,end:z}}else d=null}d=d||{start:0,end:0}}else d=null;for(D4={focusedElem:o,selectionRange:d},yf=!1,jt=l;jt!==null;)if(l=jt,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,jt=o;else for(;jt!==null;){switch(l=jt,x=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(d=0;d<o.length;d++)y=o[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&x!==null){o=void 0,d=l,y=x.memoizedProps,x=x.memoizedState,p=d.stateNode;try{var ge=go(d.type,y);o=p.getSnapshotBeforeUpdate(ge,x),p.__reactInternalSnapshotBeforeUpdate=o}catch(De){Ye(d,d.return,De)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)$4(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":$4(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=l.sibling,o!==null){o.return=l.return,jt=o;break}jt=l.return}}function bC(o,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:li(o,d),p&4&&du(5,d);break;case 1:if(li(o,d),p&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(S){Ye(d,d.return,S)}else{var y=go(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(y,l,o.__reactInternalSnapshotBeforeUpdate)}catch(S){Ye(d,d.return,S)}}p&64&&dC(d),p&512&&fu(d,d.return);break;case 3:if(li(o,d),p&64&&(o=d.updateQueue,o!==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{tx(o,l)}catch(S){Ye(d,d.return,S)}}break;case 27:l===null&&p&4&&mC(d);case 26:case 5:li(o,d),l===null&&p&4&&hC(d),p&512&&fu(d,d.return);break;case 12:li(o,d);break;case 31:li(o,d),p&4&&xC(o,d);break;case 13:li(o,d),p&4&&CC(o,d),p&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=oN.bind(null,d),$N(o,d))));break;case 22:if(p=d.memoizedState!==null||oi,!p){l=l!==null&&l.memoizedState!==null||$t,y=oi;var x=$t;oi=p,($t=l)&&!x?ui(o,d,(d.subtreeFlags&8772)!==0):li(o,d),oi=y,$t=x}break;case 30:break;default:li(o,d)}}function yC(o){var l=o.alternate;l!==null&&(o.alternate=null,yC(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&Mm(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var dt=null,$n=!1;function ai(o,l,d){for(d=d.child;d!==null;)vC(o,l,d),d=d.sibling}function vC(o,l,d){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Ll,d)}catch{}switch(d.tag){case 26:$t||Pr(d,l),ai(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:$t||Pr(d,l);var p=dt,y=$n;ts(d.type)&&(dt=d.stateNode,$n=!1),ai(o,l,d),Cu(d.stateNode),dt=p,$n=y;break;case 5:$t||Pr(d,l);case 6:if(p=dt,y=$n,dt=null,ai(o,l,d),dt=p,$n=y,dt!==null)if($n)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&&($n?(o=dt,dE(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),Ya(o)):dE(dt,d.stateNode));break;case 4:p=dt,y=$n,dt=d.stateNode.containerInfo,$n=!0,ai(o,l,d),dt=p,$n=y;break;case 0:case 11:case 14:case 15:Wi(2,d,l),$t||Wi(4,d,l),ai(o,l,d);break;case 1:$t||(Pr(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&fC(d,l,p)),ai(o,l,d);break;case 21:ai(o,l,d);break;case 22:$t=(p=$t)||d.memoizedState!==null,ai(o,l,d),$t=p;break;default:ai(o,l,d)}}function xC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Ya(o)}catch(d){Ye(l,l.return,d)}}}function CC(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Ya(o)}catch(d){Ye(l,l.return,d)}}function JR(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new gC),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new gC),l;default:throw Error(r(435,o.tag))}}function Xd(o,l){var d=JR(o);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=aN.bind(null,o,p);p.then(y,y)}})}function wn(o,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],x=o,S=l,N=S;e:for(;N!==null;){switch(N.tag){case 27:if(ts(N.type)){dt=N.stateNode,$n=!1;break e}break;case 5:dt=N.stateNode,$n=!1;break e;case 3:case 4:dt=N.stateNode.containerInfo,$n=!0;break e}N=N.return}if(dt===null)throw Error(r(160));vC(x,S,y),dt=null,$n=!1,x=y.alternate,x!==null&&(x.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)EC(l,o),l=l.sibling}var vr=null;function EC(o,l){var d=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:wn(l,o),Tn(o),p&4&&(Wi(3,o,o.return),du(3,o),Wi(5,o,o.return));break;case 1:wn(l,o),Tn(o),p&512&&($t||d===null||Pr(d,d.return)),p&64&&oi&&(o=o.updateQueue,o!==null&&(p=o.callbacks,p!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var y=vr;if(wn(l,o),Tn(o),p&512&&($t||d===null||Pr(d,d.return)),p&4){var x=d!==null?d.memoizedState:null;if(p=o.memoizedState,d===null)if(p===null)if(o.stateNode===null){e:{p=o.type,d=o.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":x=y.getElementsByTagName("title")[0],(!x||x[Fl]||x[Gt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(p),y.head.insertBefore(x,y.querySelector("head > title"))),Xt(x,p,d),x[Gt]=o,_t(x),p=x;break e;case"link":var S=EE("link","href",y).get(p+(d.href||""));if(S){for(var N=0;N<S.length;N++)if(x=S[N],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(N,1);break t}}x=y.createElement(p),Xt(x,p,d),y.head.appendChild(x);break;case"meta":if(S=EE("meta","content",y).get(p+(d.content||""))){for(N=0;N<S.length;N++)if(x=S[N],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(N,1);break t}}x=y.createElement(p),Xt(x,p,d),y.head.appendChild(x);break;default:throw Error(r(468,p))}x[Gt]=o,_t(x),p=x}o.stateNode=p}else DE(y,o.type,o.stateNode);else o.stateNode=CE(y,p,o.memoizedProps);else x!==p?(x===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):x.count--,p===null?DE(y,o.type,o.stateNode):CE(y,p,o.memoizedProps)):p===null&&o.stateNode!==null&&Jg(o,o.memoizedProps,d.memoizedProps)}break;case 27:wn(l,o),Tn(o),p&512&&($t||d===null||Pr(d,d.return)),d!==null&&p&4&&Jg(o,o.memoizedProps,d.memoizedProps);break;case 5:if(wn(l,o),Tn(o),p&512&&($t||d===null||Pr(d,d.return)),o.flags&32){y=o.stateNode;try{va(y,"")}catch(ge){Ye(o,o.return,ge)}}p&4&&o.stateNode!=null&&(y=o.memoizedProps,Jg(o,y,d!==null?d.memoizedProps:y)),p&1024&&(t4=!0);break;case 6:if(wn(l,o),Tn(o),p&4){if(o.stateNode===null)throw Error(r(162));p=o.memoizedProps,d=o.stateNode;try{d.nodeValue=p}catch(ge){Ye(o,o.return,ge)}}break;case 3:if(pf=null,y=vr,vr=ff(l.containerInfo),wn(l,o),vr=y,Tn(o),p&4&&d!==null&&d.memoizedState.isDehydrated)try{Ya(l.containerInfo)}catch(ge){Ye(o,o.return,ge)}t4&&(t4=!1,DC(o));break;case 4:p=vr,vr=ff(o.stateNode.containerInfo),wn(l,o),Tn(o),vr=p;break;case 12:wn(l,o),Tn(o);break;case 31:wn(l,o),Tn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Xd(o,p)));break;case 13:wn(l,o),Tn(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Zd=on()),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Xd(o,p)));break;case 22:y=o.memoizedState!==null;var z=d!==null&&d.memoizedState!==null,Q=oi,re=$t;if(oi=Q||y,$t=re||z,wn(l,o),$t=re,oi=Q,Tn(o),p&8192)e:for(l=o.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||z||oi||$t||bo(o)),d=null,l=o;;){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{N=z.stateNode;var oe=z.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.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?fE(ee,!0):fE(z.stateNode,!1)}catch(ge){Ye(z,z.return,ge)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=o.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,Xd(o,d))));break;case 19:wn(l,o),Tn(o),p&4&&(p=o.updateQueue,p!==null&&(o.updateQueue=null,Xd(o,p)));break;case 30:break;case 21:break;default:wn(l,o),Tn(o)}}function Tn(o){var l=o.flags;if(l&2){try{for(var d,p=o.return;p!==null;){if(pC(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,x=Zg(o);Yd(o,x,y);break;case 5:var S=d.stateNode;d.flags&32&&(va(S,""),d.flags&=-33);var N=Zg(o);Yd(o,N,S);break;case 3:case 4:var z=d.stateNode.containerInfo,Q=Zg(o);e4(o,Q,z);break;default:throw Error(r(161))}}catch(re){Ye(o,o.return,re)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function DC(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;DC(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function li(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)bC(o,l.alternate,l),l=l.sibling}function bo(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:Wi(4,l,l.return),bo(l);break;case 1:Pr(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&fC(l,l.return,d),bo(l);break;case 27:Cu(l.stateNode);case 26:case 5:Pr(l,l.return),bo(l);break;case 22:l.memoizedState===null&&bo(l);break;case 30:bo(l);break;default:bo(l)}o=o.sibling}}function ui(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=o,x=l,S=x.flags;switch(x.tag){case 0:case 11:case 15:ui(y,x,d),du(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 N=p.stateNode;try{var z=y.shared.hiddenCallbacks;if(z!==null)for(y.shared.hiddenCallbacks=null,y=0;y<z.length;y++)ex(z[y],N)}catch(Q){Ye(p,p.return,Q)}}d&&S&64&&dC(x),fu(x,x.return);break;case 27:mC(x);case 26:case 5:ui(y,x,d),d&&p===null&&S&4&&hC(x),fu(x,x.return);break;case 12:ui(y,x,d);break;case 31:ui(y,x,d),d&&S&4&&xC(y,x);break;case 13:ui(y,x,d),d&&S&4&&CC(y,x);break;case 22:x.memoizedState===null&&ui(y,x,d),fu(x,x.return);break;case 30:break;default:ui(y,x,d)}l=l.sibling}}function n4(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&Jl(d))}function r4(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Jl(o))}function xr(o,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)kC(o,l,d,p),l=l.sibling}function kC(o,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:xr(o,l,d,p),y&2048&&du(9,l);break;case 1:xr(o,l,d,p);break;case 3:xr(o,l,d,p),y&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Jl(o)));break;case 12:if(y&2048){xr(o,l,d,p),o=l.stateNode;try{var x=l.memoizedProps,S=x.id,N=x.onPostCommit;typeof N=="function"&&N(S,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(z){Ye(l,l.return,z)}}else xr(o,l,d,p);break;case 31:xr(o,l,d,p);break;case 13:xr(o,l,d,p);break;case 23:break;case 22:x=l.stateNode,S=l.alternate,l.memoizedState!==null?x._visibility&2?xr(o,l,d,p):hu(o,l):x._visibility&2?xr(o,l,d,p):(x._visibility|=2,Fa(o,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&n4(S,l);break;case 24:xr(o,l,d,p),y&2048&&r4(l.alternate,l);break;default:xr(o,l,d,p)}}function Fa(o,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var x=o,S=l,N=d,z=p,Q=S.flags;switch(S.tag){case 0:case 11:case 15:Fa(x,S,N,z,y),du(8,S);break;case 23:break;case 22:var re=S.stateNode;S.memoizedState!==null?re._visibility&2?Fa(x,S,N,z,y):hu(x,S):(re._visibility|=2,Fa(x,S,N,z,y)),y&&Q&2048&&n4(S.alternate,S);break;case 24:Fa(x,S,N,z,y),y&&Q&2048&&r4(S.alternate,S);break;default:Fa(x,S,N,z,y)}l=l.sibling}}function hu(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,p=l,y=p.flags;switch(p.tag){case 22:hu(d,p),y&2048&&n4(p.alternate,p);break;case 24:hu(d,p),y&2048&&r4(p.alternate,p);break;default:hu(d,p)}l=l.sibling}}var pu=8192;function Ka(o,l,d){if(o.subtreeFlags&pu)for(o=o.child;o!==null;)SC(o,l,d),o=o.sibling}function SC(o,l,d){switch(o.tag){case 26:Ka(o,l,d),o.flags&pu&&o.memoizedState!==null&&IN(d,vr,o.memoizedState,o.memoizedProps);break;case 5:Ka(o,l,d);break;case 3:case 4:var p=vr;vr=ff(o.stateNode.containerInfo),Ka(o,l,d),vr=p;break;case 22:o.memoizedState===null&&(p=o.alternate,p!==null&&p.memoizedState!==null?(p=pu,pu=16777216,Ka(o,l,d),pu=p):Ka(o,l,d));break;default:Ka(o,l,d)}}function $C(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function mu(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];jt=p,TC(p,o)}$C(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)wC(o),o=o.sibling}function wC(o){switch(o.tag){case 0:case 11:case 15:mu(o),o.flags&2048&&Wi(9,o,o.return);break;case 3:mu(o);break;case 12:mu(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Jd(o)):mu(o);break;default:mu(o)}}function Jd(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];jt=p,TC(p,o)}$C(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:Wi(8,l,l.return),Jd(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Jd(l));break;default:Jd(l)}o=o.sibling}}function TC(o,l){for(;jt!==null;){var d=jt;switch(d.tag){case 0:case 11:case 15:Wi(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:Jl(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,jt=p;else e:for(d=o;jt!==null;){p=jt;var y=p.sibling,x=p.return;if(yC(p),p===d){jt=null;break e}if(y!==null){y.return=x,jt=y;break e}jt=x}}}var ZR={getCacheForType:function(o){var l=Qt(Dt),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return Qt(Dt).controller.signal}},eN=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Pe=null,Fe=0,Qe=0,Vn=null,Qi=!1,_a=!1,i4=!1,ci=0,gt=0,Yi=0,yo=0,s4=0,Un=0,ja=0,gu=null,An=null,o4=!1,Zd=0,AC=0,ef=1/0,tf=null,Xi=null,Ot=0,Ji=null,Ha=null,di=0,a4=0,l4=null,BC=null,bu=0,u4=null;function qn(){return(Ge&2)!==0&&Fe!==0?Fe&-Fe:O.T!==null?m4():q1()}function MC(){if(Un===0)if((Fe&536870912)===0||je){var o=ud;ud<<=1,(ud&3932160)===0&&(ud=262144),Un=o}else Un=536870912;return o=jn.current,o!==null&&(o.flags|=32),Un}function Bn(o,l,d){(o===nt&&(Qe===2||Qe===9)||o.cancelPendingCommit!==null)&&(Va(o,0),Zi(o,Fe,Un,!1)),Il(o,d),((Ge&2)===0||o!==nt)&&(o===nt&&((Ge&2)===0&&(yo|=d),gt===4&&Zi(o,Fe,Un,!1)),Or(o))}function RC(o,l,d){if((Ge&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&o.expiredLanes)===0||zl(o,l),y=p?rN(o,l):d4(o,l,!0),x=p;do{if(y===0){_a&&!p&&Zi(o,l,0,!1);break}else{if(d=o.current.alternate,x&&!tN(d)){y=d4(o,l,!1),x=!1;continue}if(y===2){if(x=l,o.errorRecoveryDisabledLanes&x)var S=0;else S=o.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){l=S;e:{var N=o;y=gu;var z=N.current.memoizedState.isDehydrated;if(z&&(Va(N,S).flags|=256),S=d4(N,S,!1),S!==2){if(i4&&!z){N.errorRecoveryDisabledLanes|=x,yo|=x,y=4;break e}x=An,An=y,x!==null&&(An===null?An=x:An.push.apply(An,x))}y=S}if(x=!1,y!==2)continue}}if(y===1){Va(o,0),Zi(o,l,0,!0);break}e:{switch(p=o,x=y,x){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:Zi(p,l,Un,!Qi);break e;case 2:An=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Zd+300-on(),10<y)){if(Zi(p,l,Un,!Qi),dd(p,0,!0)!==0)break e;di=l,p.timeoutHandle=uE(NC.bind(null,p,d,An,tf,o4,l,Un,yo,ja,Qi,x,"Throttled",-0,0),y);break e}NC(p,d,An,tf,o4,l,Un,yo,ja,Qi,x,null,-0,0)}}break}while(!0);Or(o)}function NC(o,l,d,p,y,x,S,N,z,Q,re,oe,X,ee){if(o.timeoutHandle=-1,oe=l.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yr},SC(l,x,oe);var ge=(x&62914560)===x?Zd-on():(x&4194048)===x?AC-on():0;if(ge=FN(oe,ge),ge!==null){di=x,o.cancelPendingCommit=ge(_C.bind(null,o,l,x,d,p,y,S,N,z,re,oe,null,X,ee)),Zi(o,x,S,!Q);return}}_C(o,l,x,d,p,y,S,N,z)}function tN(o){for(var l=o;;){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(!Kn(x(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Zi(o,l,d,p){l&=~s4,l&=~yo,o.suspendedLanes|=l,o.pingedLanes&=~l,p&&(o.warmLanes|=l),p=o.expirationTimes;for(var y=l;0<y;){var x=31-Fn(y),S=1<<x;p[x]=-1,y&=~S}d!==0&&H1(o,d,l)}function nf(){return(Ge&6)===0?(yu(0),!1):!0}function c4(){if(Pe!==null){if(Qe===0)var o=Pe.return;else o=Pe,ei=lo=null,$g(o),Pa=null,eu=0,o=Pe;for(;o!==null;)cC(o.alternate,o),o=o.return;Pe=null}}function Va(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,CN(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),di=0,c4(),nt=o,Pe=d=Jr(o.current,null),Fe=l,Qe=0,Vn=null,Qi=!1,_a=zl(o,l),i4=!1,ja=Un=s4=yo=Yi=gt=0,An=gu=null,o4=!1,(l&8)!==0&&(l|=l&32);var p=o.entangledLanes;if(p!==0)for(o=o.entanglements,p&=l;0<p;){var y=31-Fn(p),x=1<<y;l|=o[y],p&=~x}return ci=l,Dd(),d}function PC(o,l){Ae=null,O.H=lu,l===Na||l===Md?(l=Yv(),Qe=3):l===pg?(l=Yv(),Qe=4):Qe=l===jg?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Vn=l,Pe===null&&(gt=1,Ud(o,er(l,o.current)))}function OC(){var o=jn.current;return o===null?!0:(Fe&4194048)===Fe?ir===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?o===ir:!1}function LC(){var o=O.H;return O.H=lu,o===null?lu:o}function zC(){var o=O.A;return O.A=ZR,o}function rf(){gt=4,Qi||(Fe&4194048)!==Fe&&jn.current!==null||(_a=!0),(Yi&134217727)===0&&(yo&134217727)===0||nt===null||Zi(nt,Fe,Un,!1)}function d4(o,l,d){var p=Ge;Ge|=2;var y=LC(),x=zC();(nt!==o||Fe!==l)&&(tf=null,Va(o,l)),l=!1;var S=gt;e:do try{if(Qe!==0&&Pe!==null){var N=Pe,z=Vn;switch(Qe){case 8:c4(),S=6;break e;case 3:case 2:case 9:case 6:jn.current===null&&(l=!0);var Q=Qe;if(Qe=0,Vn=null,Ua(o,N,z,Q),d&&_a){S=0;break e}break;default:Q=Qe,Qe=0,Vn=null,Ua(o,N,z,Q)}}nN(),S=gt;break}catch(re){PC(o,re)}while(!0);return l&&o.shellSuspendCounter++,ei=lo=null,Ge=p,O.H=y,O.A=x,Pe===null&&(nt=null,Fe=0,Dd()),S}function nN(){for(;Pe!==null;)IC(Pe)}function rN(o,l){var d=Ge;Ge|=2;var p=LC(),y=zC();nt!==o||Fe!==l?(tf=null,ef=on()+500,Va(o,l)):_a=zl(o,l);e:do try{if(Qe!==0&&Pe!==null){l=Pe;var x=Vn;t:switch(Qe){case 1:Qe=0,Vn=null,Ua(o,l,x,1);break;case 2:case 9:if(Wv(x)){Qe=0,Vn=null,FC(l);break}l=function(){Qe!==2&&Qe!==9||nt!==o||(Qe=7),Or(o)},x.then(l,l);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Wv(x)?(Qe=0,Vn=null,FC(l)):(Qe=0,Vn=null,Ua(o,l,x,7));break;case 5:var S=null;switch(Pe.tag){case 26:S=Pe.memoizedState;case 5:case 27:var N=Pe;if(S?kE(S):N.stateNode.complete){Qe=0,Vn=null;var z=N.sibling;if(z!==null)Pe=z;else{var Q=N.return;Q!==null?(Pe=Q,sf(Q)):Pe=null}break t}}Qe=0,Vn=null,Ua(o,l,x,5);break;case 6:Qe=0,Vn=null,Ua(o,l,x,6);break;case 8:c4(),gt=6;break e;default:throw Error(r(462))}}iN();break}catch(re){PC(o,re)}while(!0);return ei=lo=null,O.H=p,O.A=y,Ge=d,Pe!==null?0:(nt=null,Fe=0,Dd(),gt)}function iN(){for(;Pe!==null&&!ad();)IC(Pe)}function IC(o){var l=lC(o.alternate,o,ci);o.memoizedProps=o.pendingProps,l===null?sf(o):Pe=l}function FC(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=nC(d,l,l.pendingProps,l.type,void 0,Fe);break;case 11:l=nC(d,l,l.pendingProps,l.type.render,l.ref,Fe);break;case 5:$g(l);default:cC(d,l),l=Pe=zv(l,ci),l=lC(d,l,ci)}o.memoizedProps=o.pendingProps,l===null?sf(o):Pe=l}function Ua(o,l,d,p){ei=lo=null,$g(l),Pa=null,eu=0;var y=l.return;try{if(qR(o,y,l,d,Fe)){gt=1,Ud(o,er(d,o.current)),Pe=null;return}}catch(x){if(y!==null)throw Pe=y,x;gt=1,Ud(o,er(d,o.current)),Pe=null;return}l.flags&32768?(je||p===1?o=!0:_a||(Fe&536870912)!==0?o=!1:(Qi=o=!0,(p===2||p===9||p===3||p===6)&&(p=jn.current,p!==null&&p.tag===13&&(p.flags|=16384))),KC(l,o)):sf(l)}function sf(o){var l=o;do{if((l.flags&32768)!==0){KC(l,Qi);return}o=l.return;var d=QR(l.alternate,l,ci);if(d!==null){Pe=d;return}if(l=l.sibling,l!==null){Pe=l;return}Pe=l=o}while(l!==null);gt===0&&(gt=5)}function KC(o,l){do{var d=YR(o.alternate,o);if(d!==null){d.flags&=32767,Pe=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){Pe=o;return}Pe=o=d}while(o!==null);gt=6,Pe=null}function _C(o,l,d,p,y,x,S,N,z){o.cancelPendingCommit=null;do of();while(Ot!==0);if((Ge&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(x=l.lanes|l.childLanes,x|=Zm,z8(o,d,x,S,N,z),o===nt&&(Pe=nt=null,Fe=0),Ha=l,Ji=o,di=d,a4=x,l4=y,BC=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,lN(fa,function(){return qC(),null})):(o.callbackNode=null,o.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=O.T,O.T=null,y=K.p,K.p=2,S=Ge,Ge|=4;try{XR(o,l,d)}finally{Ge=S,K.p=y,O.T=p}}Ot=1,jC(),HC(),VC()}}function jC(){if(Ot===1){Ot=0;var o=Ji,l=Ha,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=O.T,O.T=null;var p=K.p;K.p=2;var y=Ge;Ge|=4;try{EC(l,o);var x=D4,S=Tv(o.containerInfo),N=x.focusedElem,z=x.selectionRange;if(S!==N&&N&&N.ownerDocument&&wv(N.ownerDocument.documentElement,N)){if(z!==null&&Wm(N)){var Q=z.start,re=z.end;if(re===void 0&&(re=Q),"selectionStart"in N)N.selectionStart=Q,N.selectionEnd=Math.min(re,N.value.length);else{var oe=N.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var ee=X.getSelection(),ge=N.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=$v(N,De),_=$v(N,tt);if(q&&_&&(ee.rangeCount!==1||ee.anchorNode!==q.node||ee.anchorOffset!==q.offset||ee.focusNode!==_.node||ee.focusOffset!==_.offset)){var W=oe.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(oe=[],ee=N;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var se=oe[N];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}yf=!!E4,D4=E4=null}finally{Ge=y,K.p=p,O.T=d}}o.current=l,Ot=2}}function HC(){if(Ot===2){Ot=0;var o=Ji,l=Ha,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=O.T,O.T=null;var p=K.p;K.p=2;var y=Ge;Ge|=4;try{bC(o,l.alternate,l)}finally{Ge=y,K.p=p,O.T=d}}Ot=3}}function VC(){if(Ot===4||Ot===3){Ot=0,$m();var o=Ji,l=Ha,d=di,p=BC;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Ot=5:(Ot=0,Ha=Ji=null,UC(o,o.pendingLanes));var y=o.pendingLanes;if(y===0&&(Xi=null),Am(d),l=l.stateNode,In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Ll,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=O.T,y=K.p,K.p=2,O.T=null;try{for(var x=o.onRecoverableError,S=0;S<p.length;S++){var N=p[S];x(N.value,{componentStack:N.stack})}}finally{O.T=l,K.p=y}}(di&3)!==0&&of(),Or(o),y=o.pendingLanes,(d&261930)!==0&&(y&42)!==0?o===u4?bu++:(bu=0,u4=o):bu=0,yu(0)}}function UC(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Jl(l)))}function of(){return jC(),HC(),VC(),qC()}function qC(){if(Ot!==5)return!1;var o=Ji,l=a4;a4=0;var d=Am(di),p=O.T,y=K.p;try{K.p=32>d?32:d,O.T=null,d=l4,l4=null;var x=Ji,S=di;if(Ot=0,Ha=Ji=null,di=0,(Ge&6)!==0)throw Error(r(331));var N=Ge;if(Ge|=4,wC(x.current),kC(x,x.current,S,d),Ge=N,yu(0,!1),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Ll,x)}catch{}return!0}finally{K.p=y,O.T=p,UC(o,l)}}function GC(o,l,d){l=er(d,l),l=_g(o.stateNode,l,2),o=Ui(o,l,2),o!==null&&(Il(o,2),Or(o))}function Ye(o,l,d){if(o.tag===3)GC(o,o,d);else for(;l!==null;){if(l.tag===3){GC(l,o,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Xi===null||!Xi.has(p))){o=er(d,o),d=Wx(2),p=Ui(l,d,2),p!==null&&(Qx(d,p,l,o),Il(p,2),Or(p));break}}l=l.return}}function f4(o,l,d){var p=o.pingCache;if(p===null){p=o.pingCache=new eN;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)||(i4=!0,y.add(d),o=sN.bind(null,o,l,d),l.then(o,o))}function sN(o,l,d){var p=o.pingCache;p!==null&&p.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,nt===o&&(Fe&d)===d&&(gt===4||gt===3&&(Fe&62914560)===Fe&&300>on()-Zd?(Ge&2)===0&&Va(o,0):s4|=d,ja===Fe&&(ja=0)),Or(o)}function WC(o,l){l===0&&(l=j1()),o=so(o,l),o!==null&&(Il(o,l),Or(o))}function oN(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),WC(o,d)}function aN(o,l){var d=0;switch(o.tag){case 31:case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(d=y.retryLane);break;case 19:p=o.stateNode;break;case 22:p=o.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),WC(o,d)}function lN(o,l){return br(o,l)}var af=null,qa=null,h4=!1,lf=!1,p4=!1,es=0;function Or(o){o!==qa&&o.next===null&&(qa===null?af=qa=o:qa=qa.next=o),lf=!0,h4||(h4=!0,cN())}function yu(o,l){if(!p4&&lf){p4=!0;do for(var d=!1,p=af;p!==null;){if(o!==0){var y=p.pendingLanes;if(y===0)var x=0;else{var S=p.suspendedLanes,N=p.pingedLanes;x=(1<<31-Fn(42|o)+1)-1,x&=y&~(S&~N),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(d=!0,JC(p,x))}else x=Fe,x=dd(p,p===nt?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(x&3)===0||zl(p,x)||(d=!0,JC(p,x));p=p.next}while(d);p4=!1}}function uN(){QC()}function QC(){lf=h4=!1;var o=0;es!==0&&xN()&&(o=es);for(var l=on(),d=null,p=af;p!==null;){var y=p.next,x=YC(p,l);x===0?(p.next=null,d===null?af=y:d.next=y,y===null&&(qa=d)):(d=p,(o!==0||(x&3)!==0)&&(lf=!0)),p=y}Ot!==0&&Ot!==5||yu(o),es!==0&&(es=0)}function YC(o,l){for(var d=o.suspendedLanes,p=o.pingedLanes,y=o.expirationTimes,x=o.pendingLanes&-62914561;0<x;){var S=31-Fn(x),N=1<<S,z=y[S];z===-1?((N&d)===0||(N&p)!==0)&&(y[S]=L8(N,l)):z<=l&&(o.expiredLanes|=N),x&=~N}if(l=nt,d=Fe,d=dd(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p=o.callbackNode,d===0||o===l&&(Qe===2||Qe===9)||o.cancelPendingCommit!==null)return p!==null&&p!==null&&Ol(p),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||zl(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(p!==null&&Ol(p),Am(d)){case 2:case 8:d=Mr;break;case 32:d=fa;break;case 268435456:d=_1;break;default:d=fa}return p=XC.bind(null,o),d=br(d,p),o.callbackPriority=l,o.callbackNode=d,l}return p!==null&&p!==null&&Ol(p),o.callbackPriority=2,o.callbackNode=null,2}function XC(o,l){if(Ot!==0&&Ot!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(of()&&o.callbackNode!==d)return null;var p=Fe;return p=dd(o,o===nt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p===0?null:(RC(o,p,l),YC(o,on()),o.callbackNode!=null&&o.callbackNode===d?XC.bind(null,o):null)}function JC(o,l){if(of())return null;RC(o,l,!0)}function cN(){EN(function(){(Ge&6)!==0?br(qt,uN):QC()})}function m4(){if(es===0){var o=Ma;o===0&&(o=ld,ld<<=1,(ld&261888)===0&&(ld=256)),es=o}return es}function ZC(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:md(""+o)}function eE(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function dN(o,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var x=ZC((y[kn]||null).action),S=p.submitter;S&&(l=(l=S[kn]||null)?ZC(l.formAction):S.getAttribute("formAction"),l!==null&&(x=l,S=null));var N=new vd("action","action",null,p,y);o.push({event:N,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(es!==0){var z=S?eE(y,S):new FormData(y);Og(d,{pending:!0,data:z,method:y.method,action:x},null,z)}}else typeof x=="function"&&(N.preventDefault(),z=S?eE(y,S):new FormData(y),Og(d,{pending:!0,data:z,method:y.method,action:x},x,z))},currentTarget:y}]})}}for(var g4=0;g4<Jm.length;g4++){var b4=Jm[g4],fN=b4.toLowerCase(),hN=b4[0].toUpperCase()+b4.slice(1);yr(fN,"on"+hN)}yr(Mv,"onAnimationEnd"),yr(Rv,"onAnimationIteration"),yr(Nv,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(AR,"onTransitionRun"),yr(BR,"onTransitionStart"),yr(MR,"onTransitionCancel"),yr(Pv,"onTransitionEnd"),ba("onMouseEnter",["mouseout","mouseover"]),ba("onMouseLeave",["mouseout","mouseover"]),ba("onPointerEnter",["pointerout","pointerover"]),ba("onPointerLeave",["pointerout","pointerover"]),to("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),to("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),to("onBeforeInput",["compositionend","keypress","textInput","paste"]),to("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),to("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),to("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vu="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(" "),pN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vu));function tE(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var p=o[d],y=p.event;p=p.listeners;e:{var x=void 0;if(l)for(var S=p.length-1;0<=S;S--){var N=p[S],z=N.instance,Q=N.currentTarget;if(N=N.listener,z!==x&&y.isPropagationStopped())break e;x=N,y.currentTarget=Q;try{x(y)}catch(re){Ed(re)}y.currentTarget=null,x=z}else for(S=0;S<p.length;S++){if(N=p[S],z=N.instance,Q=N.currentTarget,N=N.listener,z!==x&&y.isPropagationStopped())break e;x=N,y.currentTarget=Q;try{x(y)}catch(re){Ed(re)}y.currentTarget=null,x=z}}}}function Oe(o,l){var d=l[Bm];d===void 0&&(d=l[Bm]=new Set);var p=o+"__bubble";d.has(p)||(nE(l,o,2,!1),d.add(p))}function y4(o,l,d){var p=0;l&&(p|=4),nE(d,o,p,l)}var uf="_reactListening"+Math.random().toString(36).slice(2);function v4(o){if(!o[uf]){o[uf]=!0,Q1.forEach(function(d){d!=="selectionchange"&&(pN.has(d)||y4(d,!1,o),y4(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[uf]||(l[uf]=!0,y4("selectionchange",!1,l))}}function nE(o,l,d,p){switch(ME(l)){case 2:var y=jN;break;case 8:y=HN;break;default:y=P4}d=y.bind(null,l,d,o),y=void 0,!Fm||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),p?y!==void 0?o.addEventListener(l,d,{capture:!0,passive:y}):o.addEventListener(l,d,!0):y!==void 0?o.addEventListener(l,d,{passive:y}):o.addEventListener(l,d,!1)}function x4(o,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 N=p.stateNode.containerInfo;if(N===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(;N!==null;){if(S=pa(N),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){p=x=S;continue e}N=N.parentNode}}p=p.return}av(function(){var Q=x,re=zm(d),oe=[];e:{var X=Ov.get(o);if(X!==void 0){var ee=vd,ge=o;switch(o){case"keypress":if(bd(d)===0)break e;case"keydown":case"keyup":ee=aR;break;case"focusin":ge="focus",ee=Hm;break;case"focusout":ge="blur",ee=Hm;break;case"beforeblur":case"afterblur":ee=Hm;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=cv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Q8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=cR;break;case Mv:case Rv:case Nv:ee=J8;break;case Pv:ee=fR;break;case"scroll":case"scrollend":ee=G8;break;case"wheel":ee=pR;break;case"copy":case"cut":case"paste":ee=eR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=fv;break;case"toggle":case"beforetoggle":ee=gR}var De=(l&4)!==0,tt=!De&&(o==="scroll"||o==="scrollend"),q=De?X!==null?X+"Capture":null:X;De=[];for(var _=Q,W;_!==null;){var se=_;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||q===null||(se=_l(_,q),se!=null&&De.push(xu(_,se,W))),tt)break;_=_.return}0<De.length&&(X=new ee(X,ge,null,d,re),oe.push({event:X,listeners:De}))}}if((l&7)===0){e:{if(X=o==="mouseover"||o==="pointerover",ee=o==="mouseout"||o==="pointerout",X&&d!==Lm&&(ge=d.relatedTarget||d.fromElement)&&(pa(ge)||ge[ha]))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?pa(ge):null,ge!==null&&(tt=s(ge),De=ge.tag,ge!==tt||De!==5&&De!==27&&De!==6)&&(ge=null)):(ee=null,ge=Q),ee!==ge)){if(De=cv,se="onMouseLeave",q="onMouseEnter",_="mouse",(o==="pointerout"||o==="pointerover")&&(De=fv,se="onPointerLeave",q="onPointerEnter",_="pointer"),tt=ee==null?X:Kl(ee),W=ge==null?X:Kl(ge),X=new De(se,_+"leave",ee,d,re),X.target=tt,X.relatedTarget=W,se=null,pa(re)===Q&&(De=new De(q,_+"enter",ge,d,re),De.target=W,De.relatedTarget=tt,se=De),tt=se,ee&&ge)t:{for(De=mN,q=ee,_=ge,W=0,se=q;se;se=De(se))W++;se=0;for(var xe=_;xe;xe=De(xe))se++;for(;0<W-se;)q=De(q),W--;for(;0<se-W;)_=De(_),se--;for(;W--;){if(q===_||_!==null&&q===_.alternate){De=q;break t}q=De(q),_=De(_)}De=null}else De=null;ee!==null&&rE(oe,X,ee,De,!1),ge!==null&&tt!==null&&rE(oe,tt,ge,De,!0)}}e:{if(X=Q?Kl(Q):window,ee=X.nodeName&&X.nodeName.toLowerCase(),ee==="select"||ee==="input"&&X.type==="file")var Ue=xv;else if(yv(X))if(Cv)Ue=$R;else{Ue=kR;var ye=DR}else ee=X.nodeName,!ee||ee.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Om(Q.elementType)&&(Ue=xv):Ue=SR;if(Ue&&(Ue=Ue(o,Q))){vv(oe,Ue,d,re);break e}ye&&ye(o,X,Q),o==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&Pm(X,"number",X.value)}switch(ye=Q?Kl(Q):window,o){case"focusin":(yv(ye)||ye.contentEditable==="true")&&(Da=ye,Qm=Q,Ql=null);break;case"focusout":Ql=Qm=Da=null;break;case"mousedown":Ym=!0;break;case"contextmenu":case"mouseup":case"dragend":Ym=!1,Av(oe,d,re);break;case"selectionchange":if(TR)break;case"keydown":case"keyup":Av(oe,d,re)}var Be;if(Um)e:{switch(o){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ea?gv(o,d)&&(Ke="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ke="onCompositionStart");Ke&&(hv&&d.locale!=="ko"&&(Ea||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ea&&(Be=lv()):(Ii=re,Km="value"in Ii?Ii.value:Ii.textContent,Ea=!0)),ye=cf(Q,Ke),0<ye.length&&(Ke=new dv(Ke,o,null,d,re),oe.push({event:Ke,listeners:ye}),Be?Ke.data=Be:(Be=bv(d),Be!==null&&(Ke.data=Be)))),(Be=yR?vR(o,d):xR(o,d))&&(Ke=cf(Q,"onBeforeInput"),0<Ke.length&&(ye=new dv("onBeforeInput","beforeinput",null,d,re),oe.push({event:ye,listeners:Ke}),ye.data=Be)),dN(oe,o,Q,d,re)}tE(oe,l)})}function xu(o,l,d){return{instance:o,listener:l,currentTarget:d}}function cf(o,l){for(var d=l+"Capture",p=[];o!==null;){var y=o,x=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||x===null||(y=_l(o,d),y!=null&&p.unshift(xu(o,y,x)),y=_l(o,l),y!=null&&p.push(xu(o,y,x))),o.tag===3)return p;o=o.return}return[]}function mN(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function rE(o,l,d,p,y){for(var x=l._reactName,S=[];d!==null&&d!==p;){var N=d,z=N.alternate,Q=N.stateNode;if(N=N.tag,z!==null&&z===p)break;N!==5&&N!==26&&N!==27||Q===null||(z=Q,y?(Q=_l(d,x),Q!=null&&S.unshift(xu(d,Q,z))):y||(Q=_l(d,x),Q!=null&&S.push(xu(d,Q,z)))),d=d.return}S.length!==0&&o.push({event:l,listeners:S})}var gN=/\r\n?/g,bN=/\u0000|\uFFFD/g;function iE(o){return(typeof o=="string"?o:""+o).replace(gN,`
9
+ `).replace(bN,"")}function sE(o,l){return l=iE(l),iE(o)===l}function et(o,l,d,p,y,x){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||va(o,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&va(o,""+p);break;case"className":hd(o,"class",p);break;case"tabIndex":hd(o,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":hd(o,d,p);break;case"style":sv(o,p,x);break;case"data":if(l!=="object"){hd(o,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(d);break}p=md(""+p),o.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){o.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(o,l,"name",y.name,y,null),et(o,l,"formEncType",y.formEncType,y,null),et(o,l,"formMethod",y.formMethod,y,null),et(o,l,"formTarget",y.formTarget,y,null)):(et(o,l,"encType",y.encType,y,null),et(o,l,"method",y.method,y,null),et(o,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(d);break}p=md(""+p),o.setAttribute(d,p);break;case"onClick":p!=null&&(o.onclick=Yr);break;case"onScroll":p!=null&&Oe("scroll",o);break;case"onScrollEnd":p!=null&&Oe("scrollend",o);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));o.innerHTML=d}}break;case"multiple":o.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":o.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"){o.removeAttribute("xlink:href");break}d=md(""+p),o.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"?o.setAttribute(d,""+p):o.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"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":p===!0?o.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(d,p):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?o.setAttribute(d,p):o.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?o.removeAttribute(d):o.setAttribute(d,p);break;case"popover":Oe("beforetoggle",o),Oe("toggle",o),fd(o,"popover",p);break;case"xlinkActuate":Qr(o,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Qr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Qr(o,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Qr(o,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Qr(o,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Qr(o,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Qr(o,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Qr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Qr(o,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":fd(o,"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=U8.get(d)||d,fd(o,d,p))}}function C4(o,l,d,p,y,x){switch(d){case"style":sv(o,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));o.innerHTML=d}}break;case"children":typeof p=="string"?va(o,p):(typeof p=="number"||typeof p=="bigint")&&va(o,""+p);break;case"onScroll":p!=null&&Oe("scroll",o);break;case"onScrollEnd":p!=null&&Oe("scrollend",o);break;case"onClick":p!=null&&(o.onclick=Yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Y1.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=o[kn]||null,x=x!=null?x[d]:null,typeof x=="function"&&o.removeEventListener(l,x,y),typeof p=="function")){typeof x!="function"&&x!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,p,y);break e}d in o?o[d]=p:p===!0?o.setAttribute(d,""):fd(o,d,p)}}}function Xt(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",o),Oe("load",o);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(o,l,x,S,d,null)}}y&&et(o,l,"srcSet",d.srcSet,d,null),p&&et(o,l,"src",d.src,d,null);return;case"input":Oe("invalid",o);var N=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":N=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,l));break;default:et(o,l,p,re,d,null)}}tv(o,x,N,z,Q,S,y,!1);return;case"select":Oe("invalid",o),p=S=x=null;for(y in d)if(d.hasOwnProperty(y)&&(N=d[y],N!=null))switch(y){case"value":x=N;break;case"defaultValue":S=N;break;case"multiple":p=N;default:et(o,l,y,N,d,null)}l=x,d=S,o.multiple=!!p,l!=null?ya(o,!!p,l,!1):d!=null&&ya(o,!!p,d,!0);return;case"textarea":Oe("invalid",o),x=y=p=null;for(S in d)if(d.hasOwnProperty(S)&&(N=d[S],N!=null))switch(S){case"value":p=N;break;case"defaultValue":y=N;break;case"children":x=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:et(o,l,S,N,d,null)}rv(o,p,y,x);return;case"option":for(z in d)d.hasOwnProperty(z)&&(p=d[z],p!=null)&&(z==="selected"?o.selected=p&&typeof p!="function"&&typeof p!="symbol":et(o,l,z,p,d,null));return;case"dialog":Oe("beforetoggle",o),Oe("toggle",o),Oe("cancel",o),Oe("close",o);break;case"iframe":case"object":Oe("load",o);break;case"video":case"audio":for(p=0;p<vu.length;p++)Oe(vu[p],o);break;case"image":Oe("error",o),Oe("load",o);break;case"details":Oe("toggle",o);break;case"embed":case"source":case"link":Oe("error",o),Oe("load",o);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(o,l,Q,p,d,null)}return;default:if(Om(l)){for(re in d)d.hasOwnProperty(re)&&(p=d[re],p!==void 0&&C4(o,l,re,p,d,void 0));return}}for(N in d)d.hasOwnProperty(N)&&(p=d[N],p!=null&&et(o,l,N,p,d,null))}function yN(o,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,N=null,z=null,Q=null,re=null;for(ee in d){var oe=d[ee];if(d.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":z=oe;default:p.hasOwnProperty(ee)||et(o,l,ee,null,p,oe)}}for(var X in p){var ee=p[X];if(oe=d[X],p.hasOwnProperty(X)&&(ee!=null||oe!=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":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,l));break;default:ee!==oe&&et(o,l,X,ee,p,oe)}}Nm(o,S,N,z,Q,re,x,y);return;case"select":ee=S=N=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(o,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":N=x;break;case"multiple":S=x;default:x!==z&&et(o,l,y,x,p,z)}l=N,d=S,p=ee,X!=null?ya(o,!!d,X,!1):!!p!=!!d&&(l!=null?ya(o,!!d,l,!0):ya(o,!!d,d?[]:"",!1));return;case"textarea":ee=X=null;for(N in d)if(y=d[N],d.hasOwnProperty(N)&&y!=null&&!p.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:et(o,l,N,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(o,l,S,y,p,x)}nv(o,X,ee);return;case"option":for(var ge in d)X=d[ge],d.hasOwnProperty(ge)&&X!=null&&!p.hasOwnProperty(ge)&&(ge==="selected"?o.selected=!1:et(o,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"?o.selected=X&&typeof X!="function"&&typeof X!="symbol":et(o,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(o,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(o,l,Q,X,p,ee)}return;default:if(Om(l)){for(var tt in d)X=d[tt],d.hasOwnProperty(tt)&&X!==void 0&&!p.hasOwnProperty(tt)&&C4(o,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||C4(o,l,re,X,p,ee);return}}for(var q in d)X=d[q],d.hasOwnProperty(q)&&X!=null&&!p.hasOwnProperty(q)&&et(o,l,q,null,p,X);for(oe in p)X=p[oe],ee=d[oe],!p.hasOwnProperty(oe)||X===ee||X==null&&ee==null||et(o,l,oe,X,p,ee)}function oE(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vN(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var y=d[p],x=y.transferSize,S=y.initiatorType,N=y.duration;if(x&&N&&oE(S)){for(S=0,N=y.responseEnd,p+=1;p<d.length;p++){var z=d[p],Q=z.startTime;if(Q>N)break;var re=z.transferSize,oe=z.initiatorType;re&&oE(oe)&&(z=z.responseEnd,S+=re*(z<N?1:(N-Q)/(z-Q)))}if(--p,l+=8*(x+S)/(y.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var E4=null,D4=null;function df(o){return o.nodeType===9?o:o.ownerDocument}function aE(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function lE(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function k4(o,l){return o==="textarea"||o==="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 S4=null;function xN(){var o=window.event;return o&&o.type==="popstate"?o===S4?!1:(S4=o,!0):(S4=null,!1)}var uE=typeof setTimeout=="function"?setTimeout:void 0,CN=typeof clearTimeout=="function"?clearTimeout:void 0,cE=typeof Promise=="function"?Promise:void 0,EN=typeof queueMicrotask=="function"?queueMicrotask:typeof cE<"u"?function(o){return cE.resolve(null).then(o).catch(DN)}:uE;function DN(o){setTimeout(function(){throw o})}function ts(o){return o==="head"}function dE(o,l){var d=l,p=0;do{var y=d.nextSibling;if(o.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(p===0){o.removeChild(y),Ya(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")Cu(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,Cu(d);for(var x=d.firstChild;x;){var S=x.nextSibling,N=x.nodeName;x[Fl]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&x.rel.toLowerCase()==="stylesheet"||d.removeChild(x),x=S}}else d==="body"&&Cu(o.ownerDocument.body);d=y}while(d);Ya(l)}function fE(o,l){var d=o;o=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(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=p}while(d)}function $4(o){var l=o.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":$4(d),Mm(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function kN(o,l,d,p){for(;o.nodeType===1;){var y=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(p){if(!o[Fl])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(x=o.getAttribute("rel"),x==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(x!==y.rel||o.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||o.getAttribute("title")!==(y.title==null?null:y.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(x=o.getAttribute("src"),(x!==(y.src==null?null:y.src)||o.getAttribute("type")!==(y.type==null?null:y.type)||o.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&x&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var x=y.name==null?null:""+y.name;if(y.type==="hidden"&&o.getAttribute("name")===x)return o}else return o;if(o=sr(o.nextSibling),o===null)break}return null}function SN(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=sr(o.nextSibling),o===null))return null;return o}function hE(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=sr(o.nextSibling),o===null))return null;return o}function w4(o){return o.data==="$?"||o.data==="$~"}function T4(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function $N(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),o._reactRetry=p}}function sr(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var A4=null;function pE(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return sr(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function mE(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function gE(o,l,d){switch(l=df(d),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Cu(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Mm(o)}var or=new Map,bE=new Set;function ff(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var fi=K.d;K.d={f:wN,r:TN,D:AN,C:BN,L:MN,m:RN,X:PN,S:NN,M:ON};function wN(){var o=fi.f(),l=nf();return o||l}function TN(o){var l=ma(o);l!==null&&l.tag===5&&l.type==="form"?Px(l):fi.r(o)}var Ga=typeof document>"u"?null:document;function yE(o,l,d){var p=Ga;if(p&&typeof l=="string"&&l){var y=Jn(l);y='link[rel="'+o+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),bE.has(y)||(bE.add(y),o={rel:o,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),Xt(l,"link",o),_t(l),p.head.appendChild(l)))}}function AN(o){fi.D(o),yE("dns-prefetch",o,null)}function BN(o,l){fi.C(o,l),yE("preconnect",o,l)}function MN(o,l,d){fi.L(o,l,d);var p=Ga;if(p&&o&&l){var y='link[rel="preload"][as="'+Jn(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Jn(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Jn(d.imageSizes)+'"]')):y+='[href="'+Jn(o)+'"]';var x=y;switch(l){case"style":x=Wa(o);break;case"script":x=Qa(o)}or.has(x)||(o=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),or.set(x,o),p.querySelector(y)!==null||l==="style"&&p.querySelector(Eu(x))||l==="script"&&p.querySelector(Du(x))||(l=p.createElement("link"),Xt(l,"link",o),_t(l),p.head.appendChild(l)))}}function RN(o,l){fi.m(o,l);var d=Ga;if(d&&o){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Jn(p)+'"][href="'+Jn(o)+'"]',x=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Qa(o)}if(!or.has(x)&&(o=m({rel:"modulepreload",href:o},l),or.set(x,o),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Du(x)))return}p=d.createElement("link"),Xt(p,"link",o),_t(p),d.head.appendChild(p)}}}function NN(o,l,d){fi.S(o,l,d);var p=Ga;if(p&&o){var y=ga(p).hoistableStyles,x=Wa(o);l=l||"default";var S=y.get(x);if(!S){var N={loading:0,preload:null};if(S=p.querySelector(Eu(x)))N.loading=5;else{o=m({rel:"stylesheet",href:o,"data-precedence":l},d),(d=or.get(x))&&B4(o,d);var z=S=p.createElement("link");_t(z),Xt(z,"link",o),z._p=new Promise(function(Q,re){z.onload=Q,z.onerror=re}),z.addEventListener("load",function(){N.loading|=1}),z.addEventListener("error",function(){N.loading|=2}),N.loading|=4,hf(S,l,p)}S={type:"stylesheet",instance:S,count:1,state:N},y.set(x,S)}}}function PN(o,l){fi.X(o,l);var d=Ga;if(d&&o){var p=ga(d).hoistableScripts,y=Qa(o),x=p.get(y);x||(x=d.querySelector(Du(y)),x||(o=m({src:o,async:!0},l),(l=or.get(y))&&M4(o,l),x=d.createElement("script"),_t(x),Xt(x,"link",o),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(y,x))}}function ON(o,l){fi.M(o,l);var d=Ga;if(d&&o){var p=ga(d).hoistableScripts,y=Qa(o),x=p.get(y);x||(x=d.querySelector(Du(y)),x||(o=m({src:o,async:!0,type:"module"},l),(l=or.get(y))&&M4(o,l),x=d.createElement("script"),_t(x),Xt(x,"link",o),d.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},p.set(y,x))}}function vE(o,l,d,p){var y=(y=fe.current)?ff(y):null;if(!y)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Wa(d.href),d=ga(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"){o=Wa(d.href);var x=ga(y).hoistableStyles,S=x.get(o);if(S||(y=y.ownerDocument||y,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(o,S),(x=y.querySelector(Eu(o)))&&!x._p&&(S.instance=x,S.state.loading=5),or.has(o)||(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(o,d),x||LN(y,o,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=Qa(d),d=ga(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,o))}}function Wa(o){return'href="'+Jn(o)+'"'}function Eu(o){return'link[rel="stylesheet"]['+o+"]"}function xE(o){return m({},o,{"data-precedence":o.precedence,precedence:null})}function LN(o,l,d,p){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=o.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Xt(l,"link",d),_t(l),o.head.appendChild(l))}function Qa(o){return'[src="'+Jn(o)+'"]'}function Du(o){return"script[async]"+o}function CE(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=o.querySelector('style[data-href~="'+Jn(d.href)+'"]');if(p)return l.instance=p,_t(p),p;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(o.ownerDocument||o).createElement("style"),_t(p),Xt(p,"style",y),hf(p,d.precedence,o),l.instance=p;case"stylesheet":y=Wa(d.href);var x=o.querySelector(Eu(y));if(x)return l.state.loading|=4,l.instance=x,_t(x),x;p=xE(d),(y=or.get(y))&&B4(p,y),x=(o.ownerDocument||o).createElement("link"),_t(x);var S=x;return S._p=new Promise(function(N,z){S.onload=N,S.onerror=z}),Xt(x,"link",p),l.state.loading|=4,hf(x,d.precedence,o),l.instance=x;case"script":return x=Qa(d.src),(y=o.querySelector(Du(x)))?(l.instance=y,_t(y),y):(p=d,(y=or.get(x))&&(p=m({},d),M4(p,y)),o=o.ownerDocument||o,y=o.createElement("script"),_t(y),Xt(y,"link",p),o.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,hf(p,d.precedence,o));return l.instance}function hf(o,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 N=p[S];if(N.dataset.precedence===l)x=N;else if(x!==y)break}x?x.parentNode.insertBefore(o,x.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function B4(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function M4(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var pf=null;function EE(o,l,d){if(pf===null){var p=new Map,y=pf=new Map;y.set(d,p)}else y=pf,p=y.get(d),p||(p=new Map,y.set(d,p));if(p.has(o))return p;for(p.set(o,null),d=d.getElementsByTagName(o),y=0;y<d.length;y++){var x=d[y];if(!(x[Fl]||x[Gt]||o==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var S=x.getAttribute(l)||"";S=o+S;var N=p.get(S);N?N.push(x):p.set(S,[x])}}return p}function DE(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function zN(o,l,d){if(d===1||l.itemProp!=null)return!1;switch(o){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"?(o=l.disabled,typeof l.precedence=="string"&&o==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 kE(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function IN(o,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=Wa(p.href),x=l.querySelector(Eu(y));if(x){l=x._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=mf.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=x,_t(x);return}x=l.ownerDocument||l,p=xE(p),(y=or.get(y))&&B4(p,y),x=x.createElement("link"),_t(x);var S=x;S._p=new Promise(function(N,z){S.onload=N,S.onerror=z}),Xt(x,"link",p),d.instance=x}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=mf.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var R4=0;function FN(o,l){return o.stylesheets&&o.count===0&&bf(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var p=setTimeout(function(){if(o.stylesheets&&bf(o,o.stylesheets),o.unsuspend){var x=o.unsuspend;o.unsuspend=null,x()}},6e4+l);0<o.imgBytes&&R4===0&&(R4=62500*vN());var y=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&bf(o,o.stylesheets),o.unsuspend)){var x=o.unsuspend;o.unsuspend=null,x()}},(o.imgBytes>R4?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function mf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var gf=null;function bf(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,gf=new Map,l.forEach(KN,o),gf=null,mf.call(o))}function KN(o,l){if(!(l.state.loading&4)){var d=gf.get(o);if(d)var p=d.get(null);else{d=new Map,gf.set(o,d);for(var y=o.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=mf.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),x?x.parentNode.insertBefore(y,x.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(y,o.firstChild)),l.state.loading|=4}}var ku={$$typeof:$,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function _N(o,l,d,p,y,x,S,N,z){this.tag=1,this.containerInfo=o,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=wm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wm(0),this.hiddenUpdates=wm(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 SE(o,l,d,p,y,x,S,N,z,Q,re,oe){return o=new _N(o,l,d,S,z,Q,re,oe,N),l=1,x===!0&&(l|=24),x=_n(3,null,null,l),o.current=x,x.stateNode=o,l=dg(),l.refCount++,o.pooledCache=l,l.refCount++,x.memoizedState={element:p,isDehydrated:d,cache:l},mg(x),o}function $E(o){return o?(o=$a,o):$a}function wE(o,l,d,p,y,x){y=$E(y),p.context===null?p.context=y:p.pendingContext=y,p=Vi(l),p.payload={element:d},x=x===void 0?null:x,x!==null&&(p.callback=x),d=Ui(o,p,l),d!==null&&(Bn(d,o,l),nu(d,o,l))}function TE(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function N4(o,l){TE(o,l),(o=o.alternate)&&TE(o,l)}function AE(o){if(o.tag===13||o.tag===31){var l=so(o,67108864);l!==null&&Bn(l,o,67108864),N4(o,67108864)}}function BE(o){if(o.tag===13||o.tag===31){var l=qn();l=Tm(l);var d=so(o,l);d!==null&&Bn(d,o,l),N4(o,l)}}var yf=!0;function jN(o,l,d,p){var y=O.T;O.T=null;var x=K.p;try{K.p=2,P4(o,l,d,p)}finally{K.p=x,O.T=y}}function HN(o,l,d,p){var y=O.T;O.T=null;var x=K.p;try{K.p=8,P4(o,l,d,p)}finally{K.p=x,O.T=y}}function P4(o,l,d,p){if(yf){var y=O4(p);if(y===null)x4(o,l,p,vf,d),RE(o,p);else if(UN(y,o,l,d,p))p.stopPropagation();else if(RE(o,p),l&4&&-1<VN.indexOf(o)){for(;y!==null;){var x=ma(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var S=eo(x.pendingLanes);if(S!==0){var N=x;for(N.pendingLanes|=2,N.entangledLanes|=2;S;){var z=1<<31-Fn(S);N.entanglements[1]|=z,S&=~z}Or(x),(Ge&6)===0&&(ef=on()+500,yu(0))}}break;case 31:case 13:N=so(x,2),N!==null&&Bn(N,x,2),nf(),N4(x,2)}if(x=O4(p),x===null&&x4(o,l,p,vf,d),x===y)break;y=x}y!==null&&p.stopPropagation()}else x4(o,l,p,null,d)}}function O4(o){return o=zm(o),L4(o)}var vf=null;function L4(o){if(vf=null,o=pa(o),o!==null){var l=s(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=a(l),o!==null)return o;o=null}else if(d===31){if(o=u(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return vf=o,null}function ME(o){switch(o){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 qt:return 2;case Mr:return 8;case fa:case B8:return 32;case _1:return 268435456;default:return 32}default:return 32}}var z4=!1,ns=null,rs=null,is=null,Su=new Map,$u=new Map,ss=[],VN="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 RE(o,l){switch(o){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":rs=null;break;case"mouseover":case"mouseout":is=null;break;case"pointerover":case"pointerout":Su.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":$u.delete(l.pointerId)}}function wu(o,l,d,p,y,x){return o===null||o.nativeEvent!==x?(o={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:x,targetContainers:[y]},l!==null&&(l=ma(l),l!==null&&AE(l)),o):(o.eventSystemFlags|=p,l=o.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),o)}function UN(o,l,d,p,y){switch(l){case"focusin":return ns=wu(ns,o,l,d,p,y),!0;case"dragenter":return rs=wu(rs,o,l,d,p,y),!0;case"mouseover":return is=wu(is,o,l,d,p,y),!0;case"pointerover":var x=y.pointerId;return Su.set(x,wu(Su.get(x)||null,o,l,d,p,y)),!0;case"gotpointercapture":return x=y.pointerId,$u.set(x,wu($u.get(x)||null,o,l,d,p,y)),!0}return!1}function NE(o){var l=pa(o.target);if(l!==null){var d=s(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){o.blockedOn=l,G1(o.priority,function(){BE(d)});return}}else if(l===31){if(l=u(d),l!==null){o.blockedOn=l,G1(o.priority,function(){BE(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function xf(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=O4(o.nativeEvent);if(d===null){d=o.nativeEvent;var p=new d.constructor(d.type,d);Lm=p,d.target.dispatchEvent(p),Lm=null}else return l=ma(d),l!==null&&AE(l),o.blockedOn=d,!1;l.shift()}return!0}function PE(o,l,d){xf(o)&&d.delete(l)}function qN(){z4=!1,ns!==null&&xf(ns)&&(ns=null),rs!==null&&xf(rs)&&(rs=null),is!==null&&xf(is)&&(is=null),Su.forEach(PE),$u.forEach(PE)}function Cf(o,l){o.blockedOn===l&&(o.blockedOn=null,z4||(z4=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qN)))}var Ef=null;function OE(o){Ef!==o&&(Ef=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ef===o&&(Ef=null);for(var l=0;l<o.length;l+=3){var d=o[l],p=o[l+1],y=o[l+2];if(typeof p!="function"){if(L4(p||d)===null)continue;break}var x=ma(d);x!==null&&(o.splice(l,3),l-=3,Og(x,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function Ya(o){function l(z){return Cf(z,o)}ns!==null&&Cf(ns,o),rs!==null&&Cf(rs,o),is!==null&&Cf(is,o),Su.forEach(l),$u.forEach(l);for(var d=0;d<ss.length;d++){var p=ss[d];p.blockedOn===o&&(p.blockedOn=null)}for(;0<ss.length&&(d=ss[0],d.blockedOn===null);)NE(d),d.blockedOn===null&&ss.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],x=d[p+1],S=y[kn]||null;if(typeof x=="function")S||OE(d);else if(S){var N=null;if(x&&x.hasAttribute("formAction")){if(y=x,S=x[kn]||null)N=S.formAction;else if(L4(y)!==null)continue}else N=S.action;typeof N=="function"?d[p+1]=N:(d.splice(p,3),p-=3),OE(d)}}}function LE(){function o(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",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function I4(o){this._internalRoot=o}Df.prototype.render=I4.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=qn();wE(d,p,o,l,null,null)},Df.prototype.unmount=I4.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;wE(o.current,2,null,o,null,null),nf(),l[ha]=null}};function Df(o){this._internalRoot=o}Df.prototype.unstable_scheduleHydration=function(o){if(o){var l=q1();o={blockedOn:null,target:o,priority:l};for(var d=0;d<ss.length&&l!==0&&l<ss[d].priority;d++);ss.splice(d,0,o),d===0&&NE(o)}};var zE=e.version;if(zE!=="19.2.4")throw Error(r(527,zE,"19.2.4"));K.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(l),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var GN={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kf.isDisabled&&kf.supportsFiber)try{Ll=kf.inject(GN),In=kf}catch{}}return Au.createRoot=function(o,l){if(!i(o))throw Error(r(299));var d=!1,p="",y=Vx,x=Ux,S=qx;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=SE(o,1,!1,null,null,d,p,null,y,x,S,LE),o[ha]=l.current,v4(o),new I4(l)},Au.hydrateRoot=function(o,l,d){if(!i(o))throw Error(r(299));var p=!1,y="",x=Vx,S=Ux,N=qx,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&&(N=d.onRecoverableError),d.formState!==void 0&&(z=d.formState)),l=SE(o,1,!0,l,d??null,p,y,z,x,S,N,LE),l.context=$E(null),d=l.current,p=qn(),p=Tm(p),y=Vi(p),y.callback=null,Ui(d,y,p),d=p,l.current.lanes=d,Il(l,d),Or(l),o[ha]=l.current,v4(o),new Df(l)},Au.version="19.2.4",Au}var GE;function nP(){if(GE)return _4.exports;GE=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(),_4.exports=tP(),_4.exports}var rP=nP(),Uc=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(){}},iP=class extends Uc{#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"}},My=new iP,sP={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},oP=class{#e=sP;#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)}},$o=new oP;function aP(t){setTimeout(t,0)}var lP=typeof window>"u"||"Deno"in globalThis;function Rn(){}function uP(t,e){return typeof t=="function"?t(e):t}function rb(t){return typeof t=="number"&&t>=0&&t!==1/0}function Lk(t,e){return Math.max(t+(e||0)-Date.now(),0)}function ks(t,e){return typeof t=="function"?t(e):t}function Gn(t,e){return typeof t=="function"?t(e):t}function WE(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:u}=t;if(a){if(r){if(e.queryHash!==Ry(a,e.options))return!1}else if(!ml(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||s&&!s(e))}function QE(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(vc(e.options.mutationKey)!==vc(s))return!1}else if(!ml(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Ry(t,e){return(e?.queryKeyHashFn||vc)(t)}function vc(t){return JSON.stringify(t,(e,n)=>sb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ml(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(!ml(t[r],e[r]))return!1;return!0}const n=Object.keys(e);for(const r of n)if(!ml(t[r],e[r]))return!1;return!0}return!1}var cP=Object.prototype.hasOwnProperty;function zk(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=YE(t)&&YE(e);if(!r&&!(sb(t)&&sb(e)))return e;const s=(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<s:cP.call(t,m))&&f++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){c[m]=b;continue}const v=zk(g,b,n+1);c[m]=v,v===g&&f++}return s===u&&f===s?t:c}function ib(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 YE(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function sb(t){if(!XE(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!XE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function XE(t){return Object.prototype.toString.call(t)==="[object Object]"}function dP(t){return new Promise(e=>{$o.setTimeout(e,t)})}function ob(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?zk(t,e):e}function fP(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function hP(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Ny=Symbol();function Ik(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Ny?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Fk(t,e){return typeof t=="function"?t(...e):!!t}function pP(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 xc=(()=>{let t=()=>lP;return{isServer(){return t()},setIsServer(e){t=e}}})();function ab(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});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 mP=aP;function gP(){let t=[],e=0,n=u=>{u()},r=u=>{u()},i=mP;const s=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)=>{s(()=>{u(...c)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Zt=gP(),bP=class extends Uc{#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}},Eh=new bP;function yP(t){return Math.min(1e3*2**t,3e4)}function Kk(t){return(t??"online")==="online"?Eh.isOnline():!0}var lb=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function _k(t){let e=!1,n=0,r;const i=ab(),s=()=>i.status!=="pending",a=C=>{if(!s()){const E=new lb(C);g(E),t.onCancel?.(E)}},u=()=>{e=!0},c=()=>{e=!1},f=()=>My.isFocused()&&(t.networkMode==="always"||Eh.isOnline())&&t.canRun(),h=()=>Kk(t.networkMode)&&t.canRun(),m=C=>{s()||(r?.(),i.resolve(C))},g=C=>{s()||(r?.(),i.reject(C))},b=()=>new Promise(C=>{r=E=>{(s()||f())&&C(E)},t.onPause?.()}).then(()=>{r=void 0,s()||t.onContinue?.()}),v=()=>{if(s())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(s())return;const T=t.retry??(xc.isServer()?0:3),$=t.retryDelay??yP,A=typeof $=="function"?$(n,D):$,B=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,D);if(e||!B){g(D);return}n++,t.onFail?.(n,D),dP(A).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 jk=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rb(this.gcTime)&&(this.#e=$o.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(xc.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&($o.clearTimeout(this.#e),this.#e=void 0)}};function vP(t){return{onFetch:(e,n)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let h=!1;const m=v=>{pP(v,()=>e.signal,()=>h=!0)},g=Ik(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 T=(()=>{const P={client:e.client,queryKey:e.queryKey,pageParam:C,direction:E?"backward":"forward",meta:e.options.meta};return m(P),P})(),$=await g(T),{maxPages:A}=e.options,B=E?hP:fP;return{pages:B(v.pages,$,A),pageParams:B(v.pageParams,C,A)}};if(i&&s.length){const v=i==="backward",C=v?xP:JE,E={pages:s,pageParams:a},D=C(r,E);u=await b(E,D,v)}else{const v=t??s.length;do{const C=c===0?a[0]??r.initialPageParam:JE(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 JE(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 xP(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var CP=class extends jk{#e;#t;#n;#r;#s;#i;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#r=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=e2(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=e2(this.options);e.data!==void 0&&(this.setState(ZE(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=ob(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(Rn).catch(Rn):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=>Gn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ny||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ks(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:!Lk(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.#o||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.#o=!0,n.signal)})},i=()=>{const c=Ik(this.options,e),h=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#o=!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.#s,state:this.state,fetchFn:i};return r(c),c})();(this.#e==="infinite"?vP(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=_k({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof lb&&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 lb){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,...Hk(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...ZE(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),Zt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function Hk(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kk(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ZE(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function e2(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 EP=class extends Uc{constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.#a=ab(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#i;#a;#o;#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),t2(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ub(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ub(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 Gn(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&&!ib(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&n2(this.#t,n,this.options,e)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Gn(this.options.enabled,this.#t)!==Gn(e.enabled,this.#t)||ks(this.options.staleTime,this.#t)!==ks(e.staleTime,this.#t))&&this.#g();const i=this.#b();r&&(this.#t!==n||Gn(this.options.enabled,this.#t)!==Gn(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 kP(this,n)&&(this.#r=n,this.#i=this.options,this.#s=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(Rn)),e}#g(){this.#x();const t=ks(this.options.staleTime,this.#t);if(xc.isServer()||this.#r.isStale||!rb(t))return;const n=Lk(this.#r.dataUpdatedAt,t)+1;this.#d=$o.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,!(xc.isServer()||Gn(this.options.enabled,this.#t)===!1||!rb(this.#u)||this.#u===0)&&(this.#f=$o.setInterval(()=>{(this.options.refetchIntervalInBackground||My.isFocused())&&this.#h()},this.#u))}#v(){this.#g(),this.#y(this.#b())}#x(){this.#d!==void 0&&($o.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#f!==void 0&&($o.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const n=this.#t,r=this.options,i=this.#r,s=this.#s,a=this.#i,c=t!==n?t.state:this.#n,{state:f}=t;let h={...f},m=!1,g;if(e._optimisticResults){const M=this.hasListeners(),I=!M&&t2(t,e),G=M&&n2(t,n,e,r);(I||G)&&(h={...h,...Hk(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 M;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(M=i.data,E=!0):M=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,M!==void 0&&(C="success",g=ob(i?.data,M,e),m=!0)}if(e.select&&g!==void 0&&!E)if(i&&g===s?.data&&e.select===this.#c)g=this.#l;else try{this.#c=e.select,g=e.select(g),g=ob(i?.data,g,e),this.#l=g,this.#o=null}catch(M){this.#o=M}this.#o&&(b=this.#o,g=this.#l,v=Date.now(),C="error");const D=h.fetchStatus==="fetching",T=C==="pending",$=C==="error",A=T&&D,B=g!==void 0,R={status:C,fetchStatus:h.fetchStatus,isPending:T,isSuccess:C==="success",isError:$,isInitialLoading:A,isLoading:A,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&&!T,isLoadingError:$&&!B,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:$&&B,isStale:Py(t,e),refetch:this.refetch,promise:this.#a,isEnabled:Gn(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=R.data!==void 0,I=R.status==="error"&&!M,G=ie=>{I?ie.reject(R.error):M&&ie.resolve(R.data)},J=()=>{const ie=this.#a=R.promise=ab();G(ie)},U=this.#a;switch(U.status){case"pending":t.queryHash===n.queryHash&&G(U);break;case"fulfilled":(I||R.data!==U.value)&&J();break;case"rejected":(!I||R.error!==U.reason)&&J();break}}return R}updateResult(){const t=this.#r,e=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#i=this.options,this.#s.data!==void 0&&(this.#p=this.#t),ib(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 s=new Set(i??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(a=>{const u=a;return this.#r[u]!==t[u]&&s.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){Zt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function DP(t,e){return Gn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Gn(e.retryOnMount,t)===!1)}function t2(t,e){return DP(t,e)||t.state.data!==void 0&&ub(t,e,e.refetchOnMount)}function ub(t,e,n){if(Gn(e.enabled,t)!==!1&&ks(e.staleTime,t)!=="static"){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&Py(t,e)}return!1}function n2(t,e,n,r){return(t!==e||Gn(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Py(t,n)}function Py(t,e){return Gn(e.enabled,t)!==!1&&t.isStaleByTime(ks(e.staleTime,t))}function kP(t,e){return!ib(t.getCurrentResult(),e)}var SP=class extends jk{#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||$P(),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.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_k({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#s({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#s({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.#s({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.#s({type:"pending",context:a,variables:t,isPaused:i})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,t,this.state.context,this,n),await this.options.onSuccess?.(s,t,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,t,this.state.context,n),this.#s({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#s({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#s(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),Zt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function $P(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wP=class extends Uc{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 SP({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=Sf(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=Sf(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=Sf(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=Sf(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Zt.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=>QE(e,n))}findAll(t={}){return this.getAll().filter(e=>QE(t,e))}notify(t){Zt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return Zt.batch(()=>Promise.all(t.map(e=>e.continue().catch(Rn))))}};function Sf(t){return t.options.scope?.id}var TP=class extends Uc{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){const r=e.queryKey,i=e.queryHash??Ry(r,e);let s=this.get(i);return s||(s=new CP({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(s)),s}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(){Zt.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=>WE(e,n))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(n=>WE(t,n)):e}notify(t){Zt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Zt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},AP=class{#e;#t;#n;#r;#s;#i;#a;#o;constructor(t={}){this.#e=t.queryCache||new TP,this.#t=t.mutationCache||new wP,this.#n=t.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=My.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Eh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=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(ks(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}),s=this.#e.get(r.queryHash)?.state.data,a=uP(e,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Zt.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;Zt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=this.#e;return Zt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Zt.batch(()=>this.#e.findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(Rn).catch(Rn)}invalidateQueries(t,e={}){return Zt.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=Zt.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Rn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Rn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=this.#e.build(this,e);return n.isStaleByTime(ks(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Rn).catch(Rn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Rn).catch(Rn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Eh.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(vc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],n={};return e.forEach(r=>{ml(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#s.set(vc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#s.values()],n={};return e.forEach(r=>{ml(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=Ry(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===Ny&&(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()}},Vk=k.createContext(void 0),_p=t=>{const e=k.useContext(Vk);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},BP=({client:t,children:e})=>(k.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(Vk.Provider,{value:t,children:e})),Uk=k.createContext(!1),MP=()=>k.useContext(Uk);Uk.Provider;function RP(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var NP=k.createContext(RP()),PP=()=>k.useContext(NP),OP=(t,e,n)=>{const r=n?.state.error&&typeof t.throwOnError=="function"?Fk(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},LP=t=>{k.useEffect(()=>{t.clearReset()},[t])},zP=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||Fk(n,[t.error,r])),IP=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))}},FP=(t,e)=>t.isLoading&&t.isFetching&&!e,KP=(t,e)=>t?.suspense&&e.isPending,r2=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function _P(t,e,n){const r=MP(),i=PP(),s=_p(),a=s.defaultQueryOptions(t);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=s.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,IP(a),OP(a,i,u),LP(i);const f=!s.getQueryCache().get(a.queryHash),[h]=k.useState(()=>new e(s,a)),m=h.getOptimisticResult(a),g=!r&&c;if(k.useSyncExternalStore(k.useCallback(b=>{const v=g?h.subscribe(Zt.batchCalls(b)):Rn;return h.updateResult(),v},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),k.useEffect(()=>{h.setOptions(a)},[a,h]),KP(a,m))throw r2(a,h,i);if(zP({result:m,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw m.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!xc.isServer()&&FP(m,r)&&(f?r2(a,h,i):u?.promise)?.catch(Rn).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function jp(t,e){return _P(t,EP)}var ju=typeof window<"u"?k.useLayoutEffect:k.useEffect;function U4(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 jP(t,e,n={},r={}){k.useEffect(()=>{if(!t.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([s])=>{e(s)},n);return i.observe(t.current),()=>{i.disconnect()}},[e,n,r.disabled,t])}function HP(t){const e=k.useRef(null);return k.useImperativeHandle(t,()=>e.current,[]),e}const qk=!1;function Cc(t){return t[t.length-1]}function VP(t){return typeof t=="function"}function wo(t,e){return VP(t)?t(e):t}const Gk=Object.prototype.hasOwnProperty,i2=Object.prototype.propertyIsEnumerable;function Wk(t){for(const e in t)if(Gk.call(t,e))return!0;return!1}const UP=()=>Object.create(null),vo=(t,e)=>To(t,e,UP);function To(t,e,n=()=>({}),r=0){if(t===e)return t;if(r>500)return e;const i=e,s=a2(t)&&a2(i);if(!s&&!(Dh(t)&&Dh(i)))return i;const a=s?t:s2(t);if(!a)return i;const u=s?i:s2(i);if(!u)return i;const c=a.length,f=u.length,h=s?new Array(f):n();let m=0;for(let g=0;g<f;g++){const b=s?g:u[g],v=t[b],C=i[b];if(v===C){h[b]=v,(s?g<c:Gk.call(t,b))&&m++;continue}if(v===null||C===null||typeof v!="object"||typeof C!="object"){h[b]=C;continue}const E=To(v,C,n,r+1);h[b]=E,E===v&&m++}return c===f&&m===c?t:h}function s2(t){const e=Object.getOwnPropertyNames(t);for(const i of e)if(!i2.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(!i2.call(t,i))return!1;r.push(i)}return r}function Dh(t){if(!o2(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!o2(n)||!n.hasOwnProperty("isPrototypeOf"))}function o2(t){return Object.prototype.toString.call(t)==="[object Object]"}function a2(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Fo(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(!Fo(t[r],e[r],n))return!1;return!0}if(Dh(t)&&Dh(e)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in e)if((!r||e[a]!==void 0)&&!Fo(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 s=0;for(const a in e)if((!r||e[a]!==void 0)&&(s++,s>i||!Fo(t[a],e[a],n)))return!1;return i===s}return!1}function gl(t){let e,n;const r=new Promise((i,s)=>{e=i,n=s});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 Ec(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}const qP=/[\x00-\x1f\x7f"<>`{}]/g;function GP(t){return t.replace(qP,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function l2(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 GP(e)}const WP=["http:","https:","mailto:","tel:"];function kh(t,e){if(!t)return!1;try{const n=new URL(t);return!e.has(n.protocol)}catch{return!1}}function Bu(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+=l2(t.slice(n,i.index))+i[0],n=e.lastIndex;r=r+l2(n?t.slice(n):t);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function QP(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function YP(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 Dc(t){const e=new Map;let n,r;const i=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=e.get(s);if(a)return i(a),a.value},set(s,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(s);if(u)u.value=a,i(u);else{const c={key:s,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),e.set(s,c)}},clear(){e.clear(),n=void 0,r=void 0}}}const ys=4,Qk=5;function XP(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 Yk(t,e,n=new Uint16Array(6)){const r=t.indexOf("/",e),i=r===-1?t.length:r,s=t.substring(e,i);if(!s||!s.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=i,n[4]=i,n[5]=i,n;if(s==="$"){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(s.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=XP(s);if(a){const[u,c]=a,f=s.charCodeAt(u+1);if(f===45){if(u+2<s.length&&s.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 Hp(t,e,n,r,i,s,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=Yk(c,u,e);let v;const C=u,E=b[5];switch(u=E+1,s++,b[0]){case 0:{const D=c.substring(b[2],b[3]);if(h){const T=i.static?.get(D);if(T)v=T;else{i.static??=new Map;const $=Ao(n.fullPath??n.from);$.parent=i,$.depth=s,v=$,i.static.set(D,$)}}else{const T=D.toLowerCase(),$=i.staticInsensitive?.get(T);if($)v=$;else{i.staticInsensitive??=new Map;const A=Ao(n.fullPath??n.from);A.parent=i,A.depth=s,v=A,i.staticInsensitive.set(T,A)}}break}case 1:{const D=c.substring(C,b[1]),T=c.substring(b[4],E),$=h&&!!(D||T),A=D?$?D:D.toLowerCase():void 0,B=T?$?T:T.toLowerCase():void 0,P=!m&&i.dynamic?.find(R=>!R.parse&&R.caseSensitive===$&&R.prefix===A&&R.suffix===B);if(P)v=P;else{const R=G4(1,n.fullPath??n.from,$,A,B);v=R,R.depth=s,R.parent=i,i.dynamic??=[],i.dynamic.push(R)}break}case 3:{const D=c.substring(C,b[1]),T=c.substring(b[4],E),$=h&&!!(D||T),A=D?$?D:D.toLowerCase():void 0,B=T?$?T:T.toLowerCase():void 0,P=!m&&i.optional?.find(R=>!R.parse&&R.caseSensitive===$&&R.prefix===A&&R.suffix===B);if(P)v=P;else{const R=G4(3,n.fullPath??n.from,$,A,B);v=R,R.parent=i,R.depth=s,i.optional??=[],i.optional.push(R)}break}case 2:{const D=c.substring(C,b[1]),T=c.substring(b[4],E),$=h&&!!(D||T),A=D?$?D:D.toLowerCase():void 0,B=T?$?T:T.toLowerCase():void 0,P=G4(2,n.fullPath??n.from,$,A,B);v=P,P.parent=i,P.depth=s,i.wildcard??=[],i.wildcard.push(P)}}i=v}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=Ao(n.fullPath??n.from);b.kind=Qk,b.parent=i,s++,b.depth=s,i.pathless??=[],i.pathless.push(b),i=b}const g=(n.path||!n.children)&&!n.isRoot;if(g&&c.endsWith("/")){const b=Ao(n.fullPath??n.from);b.kind=ys,b.parent=i,s++,b.depth=s,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)Hp(t,e,c,u,i,s,a)}function q4(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 ds(t){if(t.pathless)for(const e of t.pathless)ds(e);if(t.static)for(const e of t.static.values())ds(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())ds(e);if(t.dynamic?.length){t.dynamic.sort(q4);for(const e of t.dynamic)ds(e)}if(t.optional?.length){t.optional.sort(q4);for(const e of t.optional)ds(e)}if(t.wildcard?.length){t.wildcard.sort(q4);for(const e of t.wildcard)ds(e)}}function Ao(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 G4(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 JP(t,e){const n=Ao("/"),r=new Uint16Array(6);for(const i of t)Hp(!1,r,i,1,n,0);ds(n),e.masksTree=n,e.flatCache=Dc(1e3)}function ZP(t,e){t||="/";const n=e.flatCache.get(t);if(n)return n;const r=Oy(t,e.masksTree);return e.flatCache.set(t,r),r}function eO(t,e,n,r,i){t||="/",r||="/";const s=e?`case\0${t}`:t;let a=i.singleCache.get(s);return a||(a=Ao("/"),Hp(e,new Uint16Array(6),{from:t},1,a,0),i.singleCache.set(s,a)),Oy(r,a,n)}function tO(t,e,n=!1){const r=n?t:`nofuzz\0${t}`,i=e.matchCache.get(r);if(i!==void 0)return i;t||="/";let s;try{s=Oy(t,e.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=Jk(s.route)),e.matchCache.set(r,s),s}function nO(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function rO(t,e=!1,n){const r=Ao(t.fullPath),i=new Uint16Array(6),s={},a={};let u=0;return Hp(e,i,t,1,r,0,c=>{if(n?.(c,u),c.id in s&&ki(),s[c.id]=c,u!==0&&c.path){const f=nO(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),ds(r),{processedTree:{segmentTree:r,singleCache:Dc(1e3),matchCache:Dc(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function Oy(t,e,n=!1){const r=t.split("/"),i=sO(t,r,e,n);if(!i)return null;const[s]=Xk(t,r,i);return{route:i.node.route,rawParams:s}}function Xk(t,e,n){const r=iO(n.node);let i=null;const s=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===ys)break;if(h.kind===Qk){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);s[E]=decodeURIComponent(D)}else{const C=b.substring(1);s[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&&(s[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);s["*"]=C,s._splat=C;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:u,path:c,segment:f}]}function Jk(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function iO(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function sO(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};const i=!Cc(e),s=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:T,rawParams:$}=h;if(m.kind===2&&m.route&&!wf(f,h))continue;if(m.parse){if(!u2(t,e,h))continue;$=h.rawParams,T=h.extract}r&&m.route&&m.kind!==ys&&wf(c,h)&&(c=h);const A=g===a;if(A&&(m.route&&(!s||m.kind===ys||m.kind===2)&&wf(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const B=A?void 0:e[g];let P;if(A&&m.index){const R={node:m.index,index:g,skipped:b,depth:v+1,statics:C,dynamics:E,optionals:D,extract:T,rawParams:$};let M=!0;if(m.index.parse&&(u2(t,e,R)||(M=!1)),M){if(!E&&!D&&!b&&oO(C,a))return R;wf(f,R)&&(f=R)}}if(m.wildcard)for(let R=m.wildcard.length-1;R>=0;R--){const M=m.wildcard[R],{prefix:I,suffix:G}=M;if(!(I&&(A||!(M.caseSensitive?B:P??=B.toLowerCase()).startsWith(I)))){if(G){if(A)continue;const J=e.slice(g).join("/").slice(-G.length);if((M.caseSensitive?J:J.toLowerCase())!==G)continue}u.push({node:M,index:a,skipped:b,depth:v+1,statics:C,dynamics:E,optionals:D,extract:T,rawParams:$})}}if(m.optional){const R=b|1<<v,M=v+1;for(let I=m.optional.length-1;I>=0;I--){const G=m.optional[I];u.push({node:G,index:g,skipped:R,depth:M,statics:C,dynamics:E,optionals:D,extract:T,rawParams:$})}if(!A)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?B:P??=B.toLowerCase();if(J&&!ie.startsWith(J)||U&&!ie.endsWith(U))continue}u.push({node:G,index:g+1,skipped:b,depth:M,statics:C,dynamics:E,optionals:D+$f(a,g),extract:T,rawParams:$})}}if(!A&&m.dynamic&&B)for(let R=m.dynamic.length-1;R>=0;R--){const M=m.dynamic[R],{prefix:I,suffix:G}=M;if(I||G){const J=M.caseSensitive?B:P??=B.toLowerCase();if(I&&!J.startsWith(I)||G&&!J.endsWith(G))continue}u.push({node:M,index:g+1,skipped:b,depth:v+1,statics:C,dynamics:E+$f(a,g),optionals:D,extract:T,rawParams:$})}if(!A&&m.staticInsensitive){const R=m.staticInsensitive.get(P??=B.toLowerCase());R&&u.push({node:R,index:g+1,skipped:b,depth:v+1,statics:C+$f(a,g),dynamics:E,optionals:D,extract:T,rawParams:$})}if(!A&&m.static){const R=m.static.get(B);R&&u.push({node:R,index:g+1,skipped:b,depth:v+1,statics:C+$f(a,g),dynamics:E,optionals:D,extract:T,rawParams:$})}if(m.pathless){const R=v+1;for(let M=m.pathless.length-1;M>=0;M--){const I=m.pathless[M];u.push({node:I,index:g,skipped:b,depth:R,statics:C,dynamics:E,optionals:D,extract:T,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 $f(t,e){return 2**(t-e-1)}function oO(t,e){return t===2**(e-1)-1}function u2(t,e,n){let r,i;try{[r,i]=Xk(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 wf(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===ys)>(t.node.kind===ys)||e.node.kind===ys==(t.node.kind===ys)&&e.depth>t.depth))):!0}function oh(t){return Ly(t.filter(e=>e!==void 0).join("/"))}function Ly(t){return t.replace(/\/{2,}/g,"/")}function Zk(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 eS(t){return Ci(Zk(t))}function Sh(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function aO(t,e,n){return Sh(t,n)===Sh(e,n)}function lO({base:t,to:e,trailingSlash:n="never",cache:r}){const i=e.startsWith("/"),s=!i&&e===".";let a;if(r){a=i?e:s?t:t+"\0"+e;const f=r.get(a);if(f)return f}let u;if(s)u=t.split("/");else if(i)u=e.split("/");else{for(u=t.split("/");u.length>1&&Cc(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&&(Cc(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=Ly(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function uO(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,s=>e.get(s)??s)}function W4(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=>d2(i,n)).join("/"):d2(r,n)}function c2({path:t,params:e,decoder:n,...r}){let i=!1;const s=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:s,isMissingParams:i};const a=t.length;let u=0,c,f="";for(;u<a;){const h=u;c=Yk(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;s._splat=b,s["*"]=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=W4("_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),s[b]=e[b];const v=t.substring(h,c[1]),C=t.substring(c[4],m),E=W4(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;s[b]=v;const C=t.substring(h,c[1]),E=t.substring(c[4],m),D=W4(b,e,n)??"";f+="/"+C+D+E;continue}}return t.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:i}}function d2(t,e){const n=encodeURIComponent(t);return e?.(n)??n}function tS(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function cn(t){return t?.isNotFound===!0}function cO(){try{return sessionStorage}catch{return}}const dO="tsr-scroll-restoration-v1_3",nS=cO();function fO(){try{return JSON.parse(nS?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function hO(){try{nS?.setItem(dO,JSON.stringify(nl))}catch{}}const nl=fO(),f2="data-scroll-restoration-id",pO=t=>t.state.__TSR_key||t.href;function mO(t){const e=t.getAttribute(f2);if(e)return`[${f2}="${e}"]`;let n="",r=t,i;for(;i=r.parentNode;){let s=1,a=r;for(;a=a.previousElementSibling;)s++;const u=`${r.localName}:nth-child(${s})`;n=n?`${u} > ${n}`:u,r=i}return n}let Tf=!1;const ah="window";function cb(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function h2(t){const e=new Set;for(const n of t){if(n===ah)continue;const r=cb(n);r&&e.add(r)}return e}function gO(t,e){const n=t.options.scrollRestoration,r=t._scroll;n&&(r.restoring=!0);const i=t.options.getScrollRestorationKey||pO,s=new Set,a=u=>{const c=nl[u]||={};for(const f of s)f===document?c[ah]={scrollX,scrollY}:f.isConnected&&(c[mO(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Tf=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{Tf||s.add(u.target)},!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(i(u.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{a(i(t.stores.resolvedLocation.get()??t.stores.location.get())),hO()})),!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(s.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=nl[v];if(C){let E=nl[b];for(const D in C){if(D===ah){if(h)continue}else{const T=cb(D);if(!T||h&&f&&(g??=h2(f),g.has(T)))continue}E||(E=nl[b]={}),E[D]??=C[D]}}}Tf=!0;try{const C=u.toLocation.hash,E=u.toLocation.state.__hashScrollIntoViewOptions??!0;let D=!1;if(h){!C&&f&&(g??=h2(f));const T=C&&E&&m,$=r.restoring?nl[b]:void 0;if($)for(const A in $){const{scrollX:B,scrollY:P}=$[A];if(A===ah){if(T)continue;scrollTo({top:P,left:B,behavior:c}),D=!0}else{const R=cb(A);R&&(R.scrollLeft=B,R.scrollTop=P,g?.delete(R))}}if(!C){const A={top:0,left:0,behavior:c};if(D||scrollTo(A),g)for(const B of g)B.scrollTo(A)}}!D&&C&&E&&document.getElementById(C)?.scrollIntoView(E)}finally{Tf=!1}}))}function bO(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 Q4(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function yO(t){const e=new URLSearchParams(t),n=Object.create(null);for(const[r,i]of e.entries()){const s=n[r];s==null?n[r]=Q4(i):Array.isArray(s)?s.push(Q4(i)):n[r]=[s,Q4(i)]}return n}const vO=CO(JSON.parse),xO=EO(JSON.stringify,JSON.parse);function CO(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=yO(e);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=t(i)}catch{}}return n}}function EO(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 s=bO(i,r);return s?`?${s}`:""}}const Ko="__root__";function rS(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 Ln(t){return t instanceof Response&&!!t.options}function DO(t){return{input:({url:e})=>{for(const n of t)e=db(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=iS(t[n],e);return e}}}function kO(t){const e=eS(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:s})=>{const a=t.caseSensitive?s.pathname:s.pathname.toLowerCase();return a===r?s.pathname="/":a.startsWith(i)&&(s.pathname=s.pathname.slice(n.length)),s},output:({url:s})=>(s.pathname=oh(["/",e,s.pathname]),s)}}function db(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 iS(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 SO(t,e){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:s}=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([]),T=n([]),$=n([]),A=r(()=>Y4(a,D.get())),B=r(()=>Y4(u,T.get())),P=r(()=>Y4(c,$.get())),R=r(()=>D.get()[0]),M=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:A.get(),location:b.get(),resolvedLocation:v.get(),statusCode:C.get(),redirect:E.get()})),J=Dc(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:T,cachedIds:$,matches:A,pendingMatches:B,cachedMatches:P,firstId:R,hasPending:M,matchRouteDeps:I,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:G,getRouteMatchStore:U,setMatches:F,setPending:te,setCached:O};F(t.matches),s?.(ie);function F(K){X4(K,a,D,n,i)}function te(K){X4(K,u,T,n,i)}function O(K){X4(K,c,$,n,i)}return ie}function Y4(t,e){const n=[];for(const r of e){const i=t.get(r);i&&n.push(i.get())}return n}function X4(t,e,n,r,i){const s=t.map(u=>u.id),a=new Set(s);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)}YP(n.get(),s)||n.set(s)})}const fb=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},$O=t=>t.stores.matchesId.get().some(e=>t.stores.matchStores.get(e)?.get()._forcePending),Vp=(t,e)=>!!(t.preload&&!t.router.stores.matchStores.has(e)),_o=(t,e,n=!0)=>{const r={...t.router.options.context??{}},i=n?e:e-1;for(let s=0;s<=i;s++){const a=t.matches[s];if(!a)continue;const u=t.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},p2=(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 s=n?t.matches.findIndex(a=>a.routeId===n):t.firstBadMatchIndex??t.matches.length-1;s<0&&(s=i);for(let a=s;a>=0;a--){const u=t.matches[a];if(t.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?s:i},vs=(t,e,n)=>{if(!(!Ln(n)&&!cn(n)))throw Ln(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:Ln(n)?"redirected":cn(n)?"notFound":r.status==="pending"?"success":r.status,context:_o(t,e.index),isFetching:!1,error:n})),cn(n)&&!n.routeId&&(n.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()),Ln(n)&&(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n))),n},sS=(t,e)=>{const n=t.router.getMatch(e);return!!(!n||n._nonReactive.dehydrated)},m2=(t,e,n)=>{const r=_o(t,n);t.updateMatch(e,i=>({...i,context:r}))},Mu=(t,e,n)=>{const{id:r,routeId:i}=t.matches[e],s=t.router.looseRoutesById[i];if(n instanceof Promise)throw n;t.firstBadMatchIndex??=e,vs(t,t.router.getMatch(r),n);try{s.options.onError?.(n)}catch(a){n=a,vs(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&&!Ln(n)&&!cn(n)&&(t.serialError??=n)},oS=(t,e,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Vp(t,e)&&(n.options.loader||n.options.beforeLoad||lS(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??t.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{fb(t)},i);r._nonReactive.pendingTimeout=s}},wO=(t,e,n)=>{const r=t.router.getMatch(e);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;oS(t,e,n,r);const i=()=>{const s=t.router.getMatch(e);s.preload&&(s.status==="redirected"||s.status==="notFound")&&vs(t,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},TO=(t,e,n,r)=>{const i=t.router.getMatch(e);let s=i._nonReactive.loadPromise;i._nonReactive.loadPromise=gl(()=>{s?.resolve(),s=void 0});const{paramsError:a,searchError:u}=i;a&&Mu(t,n,a),u&&Mu(t,n,u),oS(t,e,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,t.updateMatch(e,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:c})))},m=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,A=>({...A,isFetching:!1}))};if(!r.options.beforeLoad){t.router.batch(()=>{h(),m()});return}i._nonReactive.beforeLoadPromise=gl();const g={..._o(t,n,!1),...i.__routeContext},{search:b,params:v,cause:C}=i,E=Vp(t,e),D={search:b,abortController:c,params:v,preload:E,context:g,location:t.location,navigate:A=>t.router.navigate({...A,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:E?"preload":C,matches:t.matches,routeId:r.id,...t.router.options.additionalContext},T=A=>{if(A===void 0){t.router.batch(()=>{h(),m()});return}(Ln(A)||cn(A))&&(h(),Mu(t,n,A)),t.router.batch(()=>{h(),t.updateMatch(e,B=>({...B,__beforeLoadContext:A})),m()})};let $;try{if($=r.options.beforeLoad(D),Ec($))return h(),$.catch(A=>{Mu(t,n,A)}).then(T)}catch(A){h(),Mu(t,n,A)}T($)},AO=(t,e)=>{const{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r],s=()=>u(),a=()=>TO(t,n,e,i),u=()=>{if(sS(t,n))return;const c=wO(t,n,i);return Ec(c)?c.then(a):a()};return s()},BO=(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(([s,a,u])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:u,scripts:a,styles:s?.styles}))},aS=(t,e,n,r,i)=>{const s=e[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=t.router.getMatch(n),h=_o(t,r),m=Vp(t,n);return{params:a,deps:u,preload:!!m,parentMatchPromise:s,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}},g2=async(t,e,n,r,i)=>{try{const s=t.router.getMatch(n);try{(!(qk??t.router.isServer)||s.ssr===!0)&&kc(i);const a=i.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(aS(t,e,n,r,i)),f=!!u&&Ec(c);if((f||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&t.updateMatch(n,m=>({...m,isFetching:"loader"})),u){const m=f?await c:c;vs(t,t.router.getMatch(n),m),m!==void 0&&t.updateMatch(n,g=>({...g,loaderData:m}))}i._lazyPromise&&await i._lazyPromise;const h=s._nonReactive.minPendingPromise;h&&await h,i._componentsPromise&&await i._componentsPromise,t.updateMatch(n,m=>({...m,error:void 0,context:_o(t,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}t.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:_o(t,r)}));return}const c=s._nonReactive.minPendingPromise;c&&await c,cn(a)&&await i.options.notFoundComponent?.preload?.(),vs(t,t.router.getMatch(n),a);try{i.options.onError?.(a)}catch(f){u=f,vs(t,t.router.getMatch(n),f)}!Ln(u)&&!cn(u)&&await kc(i,["errorComponent"]),t.updateMatch(n,f=>({...f,error:u,context:_o(t,r),status:"error",isFetching:!1}))}}catch(s){const a=t.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),vs(t,a,s)}},MO=async(t,e,n)=>{async function r(b,v,C,E,D){const T=Date.now()-v.updatedAt,$=b?D.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:D.options.staleTime??t.router.options.defaultStaleTime??0,A=D.options.shouldReload,B=typeof A=="function"?A(aS(t,e,i,n,D)):A,{status:P,invalid:R}=E,M=T>=$&&(!!t.forceStaleReload||E.cause==="enter"||C!==void 0&&C!==E.id);a=P==="success"&&(R||(B??M)),b&&D.options.preload===!1||(a&&!t.sync&&h?(u=!0,(async()=>{try{await g2(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){Ln(I)&&await t.router.navigate(I.options)}})()):P!=="success"||a?await g2(t,e,i,n,D):m2(t,i,n))}const{id:i,routeId:s}=t.matches[n];let a=!1,u=!1;const c=t.router.looseRoutesById[s],f=c.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(sS(t,i)){if(!t.router.getMatch(i))return t.matches[n];m2(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===s?v:t.router.stores.matches.get().find(D=>D.routeId===s)?.id,E=Vp(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),T=D._nonReactive.error||D.error;T&&vs(t,D,T),D.status==="pending"&&await r(E,b,C,D,c)}else{const D=E&&!t.router.stores.matchStores.has(i),T=t.router.getMatch(i);T._nonReactive.loaderPromise=gl(),D!==T.preload&&t.updateMatch(i,$=>({...$,preload:D})),await r(E,b,C,T,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 b2(t){const e=t,n=[];$O(e.router)&&fb(e);let r;for(let g=0;g<e.matches.length;g++){try{const b=AO(e,g);Ec(b)&&await b}catch(b){if(Ln(b))throw b;if(cn(b))r=b;else if(!e.preload)throw b;break}if(e.serialError||e.firstBadMatchIndex!=null)break}const i=e.firstBadMatchIndex??e.matches.length,s=r&&!e.preload?p2(e,r):void 0,a=r&&e.preload?0:s!==void 0?Math.min(s+1,i):i;let u,c;for(let g=0;g<a;g++)n.push(MO(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(Ln(v))throw v;cn(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=p2(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 kc(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 kc(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=BO(e,b,C);if(E){const D=await E;e.updateMatch(b,T=>({...T,...D}))}}catch(E){console.error(`Error executing head for route ${v}:`,E)}}const m=fb(e);if(Ec(m)&&await m,f)throw f;if(e.serialError&&!e.preload&&!e.onReady)throw e.serialError;return e.matches}function y2(t,e){const n=e.map(r=>t.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function kc(t,e=lh){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(r=>{const{id:i,...s}=r.options;Object.assign(t.options,s),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const n=()=>t._componentsLoaded?void 0:e===lh?(()=>{if(t._componentsPromise===void 0){const r=y2(t,lh);r?t._componentsPromise=r.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():y2(t,e);return t._lazyPromise?t._lazyPromise.then(n):n()}function lS(t){for(const e of lh)if(t.options[e]?.preload)return!0;return!1}const lh=["component","errorComponent","pendingComponent","notFoundComponent"];var Ss="__TSR_index",v2="popstate",x2="beforeunload";function RO(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()},s=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=$h(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[Ss];u=C2(f+1,u),s({task:()=>{t.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=e.state[Ss];u=C2(f,u),s({task:()=>{t.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{s({task:()=>{t.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{s({task:()=>{t.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{t.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[Ss]!==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 C2(t,e){e||(e={});const n=zy();return{...e,key:n,__TSR_key:n,[Ss]:t}}function NO(t){const e=typeof document<"u"?window:void 0,n=e.history.pushState,r=e.history.replaceState;let i=[];const s=()=>i,a=M=>i=M,u=(M=>M),c=(()=>$h(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const M=zy();e.history.replaceState({[Ss]:0,key:M,__TSR_key:M},"")}let f=c(),h,m=!1,g=!1,b=!1,v=!1;const C=()=>f;let E,D;const T=()=>{E&&(R._ignoreSubscribers=!0,(E.isPush?e.history.pushState:e.history.replaceState)(E.state,"",E.href),R._ignoreSubscribers=!1,E=void 0,D=void 0,h=void 0)},$=(M,I,G)=>{const J=u(I);D||(h=f),f=$h(I,G),E={href:J,state:G,isPush:E?.isPush||M==="push"},D||(D=Promise.resolve().then(()=>T()))},A=M=>{f=c(),R.notify({type:M})},B=async()=>{if(g){g=!1;return}const M=c(),I=M.state[Ss]-f.state[Ss],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=s();if(typeof document<"u"&&te.length){for(const O of te)if(await O.blockerFn({currentLocation:f,nextLocation:M,action:ie})){g=!0,e.history.go(1),R.notify(F);return}}}f=c(),R.notify(F)},P=M=>{if(v){v=!1;return}let I=!1;const G=s();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 M.preventDefault(),M.returnValue=""},R=RO({getLocation:C,getLength:()=>e.history.length,pushState:(M,I)=>$("push",M,I),replaceState:(M,I)=>$("replace",M,I),back:M=>(M&&(b=!0),v=!0,e.history.back()),forward:M=>{M&&(b=!0),v=!0,e.history.forward()},go:M=>{m=!0,e.history.go(M)},createHref:M=>u(M),flush:T,destroy:()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(x2,P,{capture:!0}),e.removeEventListener(v2,B)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(x2,P,{capture:!0}),e.addEventListener(v2,B),e.history.pushState=function(...M){const I=n.apply(e.history,M);return R._ignoreSubscribers||A("PUSH"),I},e.history.replaceState=function(...M){const I=r.apply(e.history,M);return R._ignoreSubscribers||A("REPLACE"),I},R}function PO(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function $h(t,e){const n=PO(t),r=n.indexOf("#"),i=n.indexOf("?"),s=zy();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||{[Ss]:0,key:s,__TSR_key:s}}}function zy(){return(Math.random()+1).toString(36).substring(7)}function ll(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 OO=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??"/",s=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=uO(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=NO()),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=Dc(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=SO(zO(this.latestLocation),h),gO(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(s||i!==c||a!==f){this.basepath=c;const h=[],m=eS(c);m&&m!=="/"&&h.push(kO({basepath:c})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:DO(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=rO(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&JP(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),T=this.options.stringifySearch(D);return{href:c+T+h,publicHref:c+T+h,pathname:Bu(c).path,external:!1,searchStr:T,search:vo(r?.search,D),hash:Bu(h.slice(1)).path,state:To(r?.state,g)}}const b=new URL(m,this.origin),v=db(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:Bu(v.pathname).path,external:!!this.rewrite&&v.origin!==this.origin,searchStr:E,search:vo(r?.search,C),hash:Bu(v.hash.slice(1)).path,state:To(r?.state,g)}},s=i(n),{__tempLocation:a,__tempKey:u}=s.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>lO({base:n,to:r.includes("//")?Ly(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=>IO({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=(s={})=>{const a=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);s.from;const c=s.unsafeRelative==="path"?a.pathname:s.from??u.fullPath,f=s.to?`${s.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=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?m:Object.assign(m,wo(s.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&&Wk(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:Bu(c2({path:b,params:v,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let T=h;if(n._includeValidateSearch&&this.options.search?.strict){const J={};E.forEach(U=>{if(U.options.validateSearch)try{Object.assign(J,uh(U.options.validateSearch,{...J,...T}))}catch{}}),T=J}T=FO({search:T,dest:s,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),T=vo(h,T);const $=this.options.stringifySearch(T),A=s.hash===!0?a.hash:s.hash?wo(s.hash,a.hash):void 0,B=A?`#${A}`:"";let P=s.state===!0?a.state:s.state?wo(s.state,a.state):{};P=To(a.state,P);const R=`${D}${$}${B}`;let M,I,G=!1;if(this.rewrite){const J=new URL(R,this.origin),U=iS(this.rewrite,J);M=J.href.replace(J.origin,""),U.origin!==this.origin?(I=U.href,G=!0):I=U.pathname+U.search+U.hash}else M=QP(R),I=M;return{publicHref:I,href:M,pathname:D,search:T,searchStr:$,state:P,hash:A??"",external:G,unmaskOnReload:s.unmaskOnReload}},i=(s={},a)=>{const u=r(s);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=ZP(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,wo(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 s;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{i.state[m]=this.latestLocation.state[m]});const h=Fo(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=gl(()=>{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,s=i.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this._scroll.next=i.resetScroll??!0,this.history.subscribers.size||this.load(s?{action:{type:s}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:s,ignoreBlocker:a,href:u,...c}={})=>{if(u){const m=this.history.location.state.__TSR_index,g=$h(u,{__TSR_index:n?m:m+1}),b=new URL(g.pathname,this.origin);c.to=db(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:s,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:s,...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,s=s??f.publicHref}const c=!u&&s?s:i;if(kh(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(s=>s.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,s,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=ll(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await b2({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,T=this.stores.matches.get();g=D?T.filter(B=>!this.stores.pendingMatchStores.has(B.id)):null;const $=new Set;for(const B of this.stores.pendingMatchStores.values())B.routeId&&$.add(B.routeId);const A=new Set;for(const B of this.stores.matchStores.values())B.routeId&&A.add(B.routeId);b=D?T.filter(B=>!$.has(B.routeId)):null,v=D?E.filter(B=>!A.has(B.routeId)):null,C=D?E.filter(B=>A.has(B.routeId)):T,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(B=>B.status!=="error"&&B.status!=="notFound"&&B.status!=="redirected")]),this.clearExpiredCache())});for(const[E,D]of[[b,"onLeave"],[v,"onEnter"],[C,"onStay"]])if(E)for(const T of E)this.looseRoutesById[T.routeId].options[D]?.(T)})})}})}catch(h){Ln(h)?(i=h,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):cn(h)&&(s=h);const m=i?i.status:s?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 s=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(ll(s,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 s=this.stores.matchStores.get(n);if(s){s.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),s=this.getParsedLocationHref(i);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const s=i.pathname+i.search+i.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&kh(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 s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const a=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=kc,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...s,...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 b2({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{s.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(Ln(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});cn(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},s=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=eO(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Fo(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Fo(a.search,s.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??xO,parseSearch:t.parseSearch??vO,protocolAllowlist:t.protocolAllowlist??WP}),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=Jk(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:s}=n,a=!1;(r?r.path!=="/"&&i["**"]:Ci(t.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:a=!0);const u=a?_O(this.options.notFoundMode,s):void 0,c=new Array(s.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<s.length;h++){const m=s[h],g=c[h-1];let b,v,C;{const U=g?.search??t.search,ie=g?._strictSearch??void 0;try{const F=uh(m.options.validateSearch,{...U})??void 0;b={...U,...F},v={...ie,...F},C=void 0}catch(F){let te=F;if(F instanceof wh||(te=new wh(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:T,usedParams:$}=c2({path:m.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),A=m.id+T+D,B=this.getMatch(A),P=f.get(m.id),R=B?._strictParams??$;let M;if(!B)try{E2(m,R)}catch(U){if(cn(U)||Ln(U)?M=U:M=new LO(U.message,{cause:U}),e?.throwOnError)throw M}Object.assign(i,R);const I=P?"stay":"enter";let G;if(B)G={...B,cause:I,params:P?.params??i,_strictParams:R,search:vo(P?P.search:B.search,b),_strictSearch:v};else{const U=m.options.loader||m.options.beforeLoad||m.lazyFn||lS(m)?"pending":"success";G={id:A,ssr:m.options.ssr,index:h,routeId:m.id,params:P?.params??i,_strictParams:R,pathname:T,updatedAt:Date.now(),search:P?vo(P.search,b):b,_strictSearch:v,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:gl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:P?To(P.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?vo(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:T=>this.navigate({...T,_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=Cc(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),s=Cc(r),a={...t.search};for(const m of r)try{Object.assign(a,uh(m.options.validateSearch,a))}catch{}const u=e&&this.stores.matchStores.get(e)?.get(),c=u&&u.routeId===s.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{E2(g,m)}catch{}f=m}const h={matchedRoutes:r,fullPath:s.fullPath,search:a,params:f};return this.lightweightCache.set(t,[e,h]),h}},wh=class extends Error{},LO=class extends Error{};function zO(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function uh(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new wh("Async validation not supported");if(n.issues)throw new wh(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 IO({pathname:t,routesById:e,processedTree:n}){const r=Object.create(null),i=Ci(t);let s;const a=tO(i,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[e.__root__],routeParams:r,foundRoute:s}}function FO({search:t,dest:e,destRoutes:n,_includeValidateSearch:r}){return KO(n)(t,e,r??!1)}function KO(t){let e,n;const r=[];for(const s of t){const a=s.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=uh(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=(s,a,u)=>{if(s>=r.length){if(!e.search)return{};if(e.search===!0)return a;const f=wo(e.search,a);return u&&(u.explicit=f),f}const c=(f,h)=>{if(h){const m=u||{};return{search:i(s+1,f,m),meta:m}}return i(s+1,f,u)};return r[s]({search:a,next:c,meta:u})};return function(a,u,c){return e=u,n=c,i(0,a)}}function _O(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 Ko}function E2(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 jO="Error preloading route! ☝️";var uS=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=Ko:this.parentRoute||ki();let i=r?Ko:n?.path;i&&i!=="/"&&(i=Zk(i));const s=n?.id||i;let a=r?Ko:oh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=oh(["/",a]));const u=a==="__root__"?"/":oh([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=>rS({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.")}},HO=class{constructor({id:t}){this.notFound=e=>tS({routeId:this.id,...e}),this.redirect=e=>rS({from:this.id,...e}),this.id=t}},VO=class extends uS{constructor(t){super(t)}};function Iy(t){const e=t.errorComponent??Fy;return w.jsx(UO,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:r})=>n?k.createElement(e,{error:n,reset:r}):t.children})}var UO=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 Fy({error:t}){const[e,n]=k.useState(!1);return w.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[w.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),w.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"})]}),w.jsx("div",{style:{height:".25rem"}}),e?w.jsx("div",{children:w.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?w.jsx("code",{children:t.message}):null})}):null]})}function qO({children:t,fallback:e=null}){return cS()?w.jsx(H.Fragment,{children:t}):w.jsx(H.Fragment,{children:e})}function cS(){return H.useSyncExternalStore(GO,()=>!0,()=>!1)}function GO(){return()=>{}}var dS=k.createContext(null);function vn(t){return k.useContext(dS)}var Up=k.createContext(void 0),WO=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 QO({update:t,notify:e,unwatched:n}){return{link:r,unlink:i,propagate:s,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 s(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 T=f.nextDep;if(T!==void 0){f=T;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 YO(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 hb=[];let ch=0;const{link:D2,unlink:XO,propagate:JO,checkDirty:fS,shallowPropagate:k2}=QO({update(t){return t._update()},notify(t){hb[pb++]=t,t.flags&=~ft.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=ft.Mutable|ft.Dirty,Th(t))}});let Af=0,pb=0,jr,mb=0;function hS(t){try{++mb,t()}finally{--mb||pS()}}function Th(t){const e=t.depsTail;let n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=XO(n,t)}function pS(){if(!(mb>0)){for(;Af<pb;){const t=hb[Af];hb[Af++]=void 0,t.notify()}Af=0,pb=0}}function S2(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 jr!==void 0&&D2(i,jr,ch),i._snapshot},subscribe(s){const a=YO(s),u={current:!1},c=ZO(()=>{i.get(),u.current?a.next?.(i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(s){const a=jr,u=e?.compare??Object.is;if(n)jr=i,++ch,i.depsTail=void 0;else if(s===void 0)return!1;n&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const c=i._snapshot,f=typeof s=="function"?s(c):s===void 0&&n?r(c):s;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{jr=a,n&&(i.flags&=~ft.RecursedCheck),Th(i)}}};return n?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const s=i.flags;if(s&ft.Dirty||s&ft.Pending&&fS(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&k2(a)}}else s&ft.Pending&&(i.flags=s&~ft.Pending);return jr!==void 0&&D2(i,jr,ch),i._snapshot}):i.set=function(s){if(i._update(s)){const a=i.subs;a!==void 0&&(JO(a),k2(a),pS())}},i}function ZO(t){const e=()=>{const r=jr;jr=n,++ch,n.depsTail=void 0,n.flags=ft.Watching|ft.RecursedCheck;try{return t()}finally{jr=r,n.flags&=~ft.RecursedCheck,Th(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&&fS(this.deps,this)?e():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,Th(this)}};return e(),n}var J4={exports:{}},Z4={},e0={exports:{}},t0={};var $2;function eL(){if($2)return t0;$2=1;var t=Vc();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,s=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 s(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 t0.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,t0}var w2;function mS(){return w2||(w2=1,e0.exports=eL()),e0.exports}var T2;function tL(){if(T2)return Z4;T2=1;var t=Vc(),e=mS();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,s=t.useRef,a=t.useEffect,u=t.useMemo,c=t.useDebugValue;return Z4.useSyncExternalStoreWithSelector=function(f,h,m,g,b){var v=s(null);if(v.current===null){var C={hasValue:!1,value:null};v.current=C}else C=v.current;v=u(function(){function D(P){if(!T){if(T=!0,$=P,P=g(P),b!==void 0&&C.hasValue){var R=C.value;if(b(R,P))return A=R}return A=P}if(R=A,r($,P))return R;var M=g(P);return b!==void 0&&b(R,M)?($=P,R):($=P,A=M)}var T=!1,$,A,B=m===void 0?null:m;return[function(){return D(h())},B===null?void 0:function(){return D(B())}]},[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},Z4}var A2;function nL(){return A2||(A2=1,J4.exports=tL()),J4.exports}var gS=nL();function rL(t,e){return t===e}function xn(t,e,n=rL){const r=k.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:u}=t.subscribe(a);return u},[t]),i=k.useCallback(()=>t?.get(),[t]);return gS.useSyncExternalStoreWithSelector(r,i,i,e,n)}var n0={get(){},subscribe(){return{unsubscribe(){}}}};function iL(t,e){const n=k.useRef();return r=>{const i=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=To(n.current,i):i}}function Ks(t){const e=vn(),n=k.useContext(t.from?WO:Up),r=t.from?e.stores.getRouteMatchStore(t.from):e.stores.matchStores.get(n),i=iL(t,e),s=xn(r??n0,a=>a?i(a):n0);if(s!==n0)return s;(t.shouldThrow??!0)&&ki()}function Ky(t){return Ks({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function _y(t){const{select:e,...n}=t;return Ks({...n,select:r=>e?e(r.loaderDeps):r.loaderDeps})}function jy(t){return Ks({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 qc(t){return Ks({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function ra(t){const e=vn();return k.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}function Hy(t){return Ks({...t,select:e=>t.select?t.select(e.context):e.context})}var Tl=Ok();const bS=Pk(Tl);function sL(t,e){const n=vn(),r=HP(e),{activeProps:i,inactiveProps:s,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:T,style:$,className:A,onClick:B,onBlur:P,onFocus:R,onMouseEnter:M,onMouseLeave:I,onTouchStart:G,ignoreBlocker:J,params:U,search:ie,hash:F,state:te,mask:O,reloadDocument:K,unsafeRelative:Y,from:Z,_fromLocation:j,...L}=t,V=cS(),ne=k.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),le=xn(n.stores.location,it=>it,(it,qt)=>it.href===qt.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(()=>dL(fe,Ee,n.history,T),[T,Ee,fe,n.history]),Se=k.useMemo(()=>{if(Ve?.external)return kh(Ve.href,n.protocolAllowlist)?void 0:Ve.href;if(!fL(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),kh(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Ve,n.protocolAllowlist]),Dn=k.useMemo(()=>{if(Se)return!1;if(a?.exact){if(!aO(le.pathname,ue.pathname,n.basepath))return!1}else{const it=Sh(le.pathname,n.basepath),qt=Sh(ue.pathname,n.basepath);if(!(it.startsWith(qt)&&(it.length===qt.length||it[qt.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Fo(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]),sn=Dn?wo(i,{})??oL:r0,pn=Dn?r0:wo(s,{})??r0,gr=[A,sn.className,pn.className].filter(Boolean).join(" "),Kt=($||sn.style||pn.style)&&{...$,...sn.style,...pn.style},[Js,Ie]=k.useState(!1),Oi=k.useRef(!1),Wr=t.reloadDocument||Se?!1:c??n.options.defaultPreload,Zs=f??n.options.defaultPreloadDelay??0,br=k.useCallback(()=>{n.preloadRoute({...ne,_builtLocation:ue}).catch(it=>{console.warn(it),console.warn(jO)})},[n,ne,ue]);jP(r,k.useCallback(it=>{it?.isIntersecting&&br()},[br]),cL,{disabled:!!T||Wr!=="viewport"}),k.useEffect(()=>{Oi.current||!T&&Wr==="render"&&(br(),Oi.current=!0)},[T,br,Wr]);const Ol=it=>{const qt=it.currentTarget.getAttribute("target"),Mr=D!==void 0?D:qt;if(!T&&!hL(it)&&!it.defaultPrevented&&(!Mr||Mr==="_self")&&it.button===0){it.preventDefault(),Tl.flushSync(()=>{Ie(!0)});const fa=n.subscribe("onResolved",()=>{fa(),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},...T&&{disabled:T},...$&&{style:$},...A&&{className:A},...B&&{onClick:B},...P&&{onBlur:P},...R&&{onFocus:R},...M&&{onMouseEnter:M},...I&&{onMouseLeave:I},...G&&{onTouchStart:G}};const ad=it=>{if(T||Wr!=="intent")return;if(!Zs){br();return}const qt=it.currentTarget;if(Ru.has(qt))return;const Mr=setTimeout(()=>{Ru.delete(qt),br()},Zs);Ru.set(qt,Mr)},$m=it=>{T||Wr!=="intent"||br()},on=it=>{if(T||!Wr||!Zs)return;const qt=it.currentTarget,Mr=Ru.get(qt);Mr&&(clearTimeout(Mr),Ru.delete(qt))};return{...L,...sn,...pn,href:Ve?.href,ref:r,onClick:Xa([B,Ol]),onBlur:Xa([P,on]),onFocus:Xa([R,ad]),onMouseEnter:Xa([M,ad]),onMouseLeave:Xa([I,on]),onTouchStart:Xa([G,$m]),disabled:!!T,target:D,...Kt&&{style:Kt},...gr&&{className:gr},...T&&aL,...Dn&&lL,...V&&Js&&uL}}var r0={},oL={className:"active"},aL={role:"link","aria-disabled":!0},lL={"data-status":"active","aria-current":"page"},uL={"data-transitioning":"transitioning"},Ru=new WeakMap,cL={rootMargin:"100px"},Xa=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}};function dL(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}function fL(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var Vy=k.forwardRef((t,e)=>{const{_asChild:n,...r}=t,{type:i,...s}=sL(r,e),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=s;return k.createElement("a",c,a)}return k.createElement(n,s,a)});function hL(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function pL(t){return new mL({id:t})}var mL=class extends HO{constructor({id:t}){super({id:t}),this.useMatch=e=>Ks({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Hy({...e,from:this.id}),this.useSearch=e=>qc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>jy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_y({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Ky({...e,from:this.id,strict:!1}),this.useNavigate=()=>ra({from:vn().routesById[this.id].fullPath}),this.notFound=e=>tS({routeId:this.id,...e}),this.Link=H.forwardRef((e,n)=>{const r=vn().routesById[this.id].fullPath;return w.jsx(Vy,{ref:n,from:r,...e})})}},gL=class extends uS{constructor(t){super(t),this.useMatch=e=>Ks({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Hy({...e,from:this.id}),this.useSearch=e=>qc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>jy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_y({...e,from:this.id}),this.useLoaderData=e=>Ky({...e,from:this.id}),this.useNavigate=()=>ra({from:this.fullPath}),this.Link=H.forwardRef((e,n)=>w.jsx(Vy,{ref:n,from:this.fullPath,...e}))}};function yS(t){return new gL(t)}var bL=class extends VO{constructor(t){super(t),this.useMatch=e=>Ks({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Hy({...e,from:this.id}),this.useSearch=e=>qc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>jy({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>_y({...e,from:this.id}),this.useLoaderData=e=>Ky({...e,from:this.id}),this.useNavigate=()=>ra({from:this.fullPath}),this.Link=H.forwardRef((e,n)=>w.jsx(Vy,{ref:n,from:this.fullPath,...e}))}};function yL(t){return new bL(t)}function vL(t){const e=vn(),n=`not-found-${xn(e.stores.location,r=>r.pathname)}-${xn(e.stores.status,r=>r)}`;return w.jsx(Iy,{getResetKey:()=>n,onCatch:(r,i)=>{if(cn(r))t.onCatch?.(r,i);else throw r},errorComponent:({error:r})=>{if(cn(r))return t.fallback?.(r);throw r},children:t.children})}function xL(){return w.jsx("p",{children:"Not Found"})}function rl(t){return w.jsx(w.Fragment,{children:t.children})}function vS(t,e,n){return e.options.notFoundComponent?w.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?w.jsx(t.options.defaultNotFoundComponent,{...n}):w.jsx(xL,{})}function CL(t){return null}function EL(){return CL(vn()),null}var DL=(t,e)=>t.routeId===e.routeId&&t._displayPending===e._displayPending,kL=(t,e)=>t[0]===e[0]&&t[1]===e[1],xS=k.memo(function({matchId:e}){const n=vn(),r=n.stores.matchStores.get(e);r||ki();const i=xn(n.stores.loadedAt,a=>a),s=xn(r,a=>a,DL);return w.jsx(SL,{router:n,matchId:e,resetKey:i,matchState:k.useMemo(()=>{const a=s.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:u}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function SL({router:t,matchId:e,resetKey:n,matchState:r}){const i=t.routesById[r.routeId],s=i.options.pendingComponent??t.options.defaultPendingComponent,a=s?w.jsx(s,{}):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??s??(i.options.errorComponent?.preload||h))?k.Suspense:rl,g=u?Iy:rl,b=f?vL:rl;return w.jsxs(i.isRoot?i.options.shellComponent??rl:rl,{children:[w.jsx(Up.Provider,{value:e,children:w.jsx(m,{fallback:a,children:w.jsx(g,{getResetKey:()=>n,errorComponent:u||Fy,onCatch:(v,C)=>{if(cn(v))throw v.routeId??=r.routeId,v;c?.(v,C)},children:w.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?w.jsx(qO,{fallback:a,children:w.jsx(B2,{matchId:e})}):w.jsx(B2,{matchId:e})})})})}),r.parentRouteId===Ko?w.jsxs(w.Fragment,{children:[w.jsx($L,{}),t.options.scrollRestoration&&qk?w.jsx(EL,{}):null]}):null]})}function $L(){const t=vn(),e=k.useRef();return ju(()=>{const n=t.stores.resolvedLocation.get(),r=e.current;n&&(!r||r.href!==n.href)&&t.emit({type:"onRendered",...ll(t.stores.location.get(),r??n)}),e.current=n},[xn(t.stores.resolvedLocation,n=>n?.state.__TSR_key),t]),null}var B2=k.memo(function({matchId:e}){const n=vn(),r=(h,m)=>n.getMatch(h.id)?._nonReactive[m]??h._nonReactive[m],i=n.stores.matchStores.get(e);i||ki();const s=xn(i,h=>h),a=s.routeId,u=n.routesById[a],c=k.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return h?JSON.stringify(h):void 0},[a,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=k.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?w.jsx(h,{},c):w.jsx(CS,{})},[c,u.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const m=n.getMatch(s.id);if(m&&!m._nonReactive.minPendingPromise){const g=gl();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r(s,"loadPromise")}if(s.status==="notFound")return cn(s.error)||ki(),vS(n,u,s.error);if(s.status==="redirected")throw Ln(s.error)||ki(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),CS=k.memo(function(){const e=vn(),n=k.useContext(Up);let r,i=!1,s;{const f=n?e.stores.matchStores.get(n):void 0;[r,i]=xn(f,h=>[h?.routeId,h?.globalNotFound??!1],kL),s=xn(e.stores.matchesId,h=>h[h.findIndex(m=>m===n)+1])}const a=r?e.routesById[r]:void 0,u=e.options.defaultPendingComponent?w.jsx(e.options.defaultPendingComponent,{}):null;if(i)return a||ki(),vS(e,a,void 0);if(!s)return null;const c=w.jsx(xS,{matchId:s});return r===Ko?w.jsx(k.Suspense,{fallback:u,children:c}):c});function wL(){const t=vn(),e=k.useRef({router:t,mounted:!1}),[n,r]=k.useState(!1),i=xn(t.stores.isLoading,m=>m),s=xn(t.stores.hasPending,m=>m),a=U4(i),u=i||n||s,c=U4(u),f=i||s,h=U4(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]),ju(()=>{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]),ju(()=>{a&&!i&&t.emit({type:"onLoad",...ll(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,i]),ju(()=>{h&&!f&&t.emit({type:"onBeforeRouteMount",...ll(t.stores.location.get(),t.stores.resolvedLocation.get())})},[f,h,t]),ju(()=>{if(c&&!u){const m=ll(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...m}),hS(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[u,c,t]),null}function TL(){const t=vn(),e=t.routesById[Ko].options.pendingComponent??t.options.defaultPendingComponent,n=e?w.jsx(e,{}):null,r=w.jsxs(typeof document<"u"&&t.ssr?rl:k.Suspense,{fallback:n,children:[w.jsx(wL,{}),w.jsx(AL,{})]});return t.options.InnerWrap?w.jsx(t.options.InnerWrap,{children:r}):r}function AL(){const t=vn(),e=xn(t.stores.firstId,i=>i),n=xn(t.stores.loadedAt,i=>i),r=e?w.jsx(xS,{matchId:e}):null;return w.jsx(Up.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:w.jsx(Iy,{getResetKey:()=>n,errorComponent:Fy,onCatch:void 0,children:r})})}function ES(){const t=vn();return xn(t.stores.matchRouteDeps,e=>e),k.useCallback(e=>{const{pending:n,caseSensitive:r,fuzzy:i,includeSearch:s,...a}=e;return t.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:s})},[t])}var BL=t=>({createMutableStore:S2,createReadonlyStore:S2,batch:hS}),ML=t=>new RL(t),RL=class extends OO{constructor(t){super(t,BL)}};function NL({router:t,children:e,...n}){Wk(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const r=w.jsx(dS.Provider,{value:t,children:e});return t.options.Wrap?w.jsx(t.options.Wrap,{children:r}):r}function PL({router:t,...e}){return w.jsx(NL,{router:t,...e,children:w.jsx(TL,{})})}function _s(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const Le=typeof document<"u"?H.useLayoutEffect:()=>{},DS={prefix:String(Math.round(Math.random()*1e10)),current:0},kS=H.createContext(DS),OL=H.createContext(!1);let i0=new WeakMap;function LL(t=!1){let e=k.useContext(kS),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=i0.get(r);i==null?i0.set(r,{id:e.current,state:r.memoizedState}):r.memoizedState!==i.state&&(e.current=i.id,i0.delete(r))}n.current=++e.current}return n.current}function zL(t){let e=k.useContext(kS),n=LL(!!t),r=`react-aria${e.prefix}`;return t||`${r}-${n}`}function IL(t){let e=H.useId(),[n]=k.useState(js()),r=n?"react-aria":`react-aria${DS.prefix}`;return t||`${r}-${e}`}const FL=typeof H.useId=="function"?IL:zL;function KL(){return!1}function _L(){return!0}function jL(t){return()=>{}}function js(){return typeof H.useSyncExternalStore=="function"?H.useSyncExternalStore(jL,KL,_L):k.useContext(OL)}function HL(t){let[e,n]=k.useState(t),r=k.useRef(e),i=k.useRef(null),s=k.useRef(()=>{if(!i.current)return;let u=i.current.next();if(u.done){i.current=null;return}r.current===u.value?s.current():n(u.value)});Le(()=>{r.current=e,i.current&&s.current()});let a=k.useCallback(u=>{i.current=u(r.current),s.current()},[s]);return[e,a]}let VL=!!(typeof window<"u"&&window.document&&window.document.createElement),ul=new Map,Hu;typeof FinalizationRegistry<"u"&&(Hu=new FinalizationRegistry(t=>{ul.delete(t)}));function rn(t){let[e,n]=k.useState(t),r=k.useRef(null),i=FL(e),s=k.useRef(null);if(Hu&&Hu.register(s,i),VL){const a=ul.get(i);a&&!a.includes(r)?a.push(r):ul.set(i,[r])}return Le(()=>{let a=i;return()=>{Hu&&Hu.unregister(s),ul.delete(a)}},[i]),k.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function UL(t,e){if(t===e)return t;let n=ul.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=ul.get(e);return r?(r.forEach(i=>i.current=t),t):e}function jo(t=[]){let e=rn(),[n,r]=HL(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 Gc(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(i=>{const s=M2(i,e);return n||=typeof s=="function",s});if(n)return()=>{r.forEach((i,s)=>{typeof i=="function"?i():M2(t[s],null)})}}}function M2(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function SS(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=SS(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Uy(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=SS(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 s=e[i],a=r[i];typeof s=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=_s(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?e[i]=Uy(s,a):i==="id"&&s&&a?e.id=UL(s,a):i==="ref"&&s&&a?e.ref=Gc(s,a):e[i]=a!==void 0?a:s}}return e}function Hs(t){const e=k.useRef(null),n=k.useRef(void 0),r=k.useCallback(i=>{if(typeof t=="function"){const s=t,a=s(i);return()=>{typeof a=="function"?a():s(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 xs=Symbol("default");function Br({values:t,children:e}){for(let[n,r]of t)e=H.createElement(n.Provider,{value:r},e);return e}function Pt(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:s,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:s}):r==null?m=s:m=r,{className:f??i,style:h||a?{...a,...h}:void 0,children:m??s,"data-rac":"",render:c?g=>c(g,u):void 0}},[e,n,r,i,s,a,u,c])}function Sc(t,e){return n=>e(typeof t=="function"?t(n):t,n)}function Al(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||xs;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(a=>`"${a}"`)),s=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${s} Valid slot names are ${i}.`)}return n.slots[r]}return n}function Et(t,e,n){let r=Al(n,t.slot)||{},{ref:i,...s}=r,a=Hs(k.useMemo(()=>Gc(e,i),[e,i])),u=we(s,t);return"style"in s&&s.style&&"style"in t&&t.style&&(typeof s.style=="function"||typeof t.style=="function"?u.style=c=>{let f=typeof s.style=="function"?s.style(c):s.style,h={...c.defaultStyle,...f},m=typeof t.style=="function"?t.style({...c,defaultStyle:h}):t.style;return{...h,...m}}:u.style={...s.style,...t.style}),[u,a]}function $S(t=!0){let[e,n]=k.useState(t),r=k.useRef(!1),i=k.useCallback(s=>{r.current=!0,n(!!s)},[]);return Le(()=>{r.current||n(!1)},[]),[i,e]}function wS(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}function qL(t,e,n){let{render:r,...i}=e,s=k.useRef(null),a=k.useMemo(()=>Gc(n,s),[n,s]);Le(()=>{},[t,r]);let u={...i,ref:a};return r?r(u,void 0):H.createElement(t,u)}const R2={},at=new Proxy({},{get(t,e){if(typeof e!="string")return;let n=R2[e];return n||(n=k.forwardRef(qL.bind(null,e)),R2[e]=n),n}}),TS="react-aria-clear-focus",gb="react-aria-focus",ze=t=>t?.ownerDocument??document,dn=t=>t&&"window"in t&&t.window===t?t:ze(t).defaultView||window;function GL(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function WL(t){return GL(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let QL=!1;function xi(){return QL}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:WL(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 bl(t){if(!t)return!1;let e=t.getRootNode(),n=dn(t);if(!(e instanceof n.Document||e instanceof n.ShadowRoot))return!1;let r=e.activeElement;return r!=null&&t.contains(r)}function qy(t){let e=AS(ze(t));e!==t&&(e&&bb(e,t),t&&Ah(t,e))}function bb(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function Ah(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function AS(t){let e=_e(t),n=e?.getAttribute("aria-activedescendant");return n&&t.getElementById(n)||e}function Ar(t){if(YL())t.focus({preventScroll:!0});else{let e=XL(t);t.focus(),JL(e)}}let Bf=null;function YL(){if(Bf==null){Bf=!1;try{document.createElement("div").focus({get preventScroll(){return Bf=!0,!0}})}catch{}}return Bf}function XL(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 JL(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}const ZL=typeof Element<"u"&&"checkVisibility"in Element.prototype;function ez(t){const e=dn(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:s}=dn(t);let{display:a,visibility:u}=s(t);i=a!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function tz(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 Gy(t,e){return ZL?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&ez(t)&&tz(t,e)&&(!t.parentElement||Gy(t.parentElement,t))}const Wy=["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"],nz=Wy.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Wy.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const rz=Wy.join(':not([hidden]):not([tabindex="-1"]),');function BS(t,e){return t.matches(nz)&&!MS(t)&&(e?.skipVisibilityCheck||Gy(t))}function Bh(t){return t.matches(rz)&&Gy(t)&&!MS(t)}function MS(t){let e=t;for(;e!=null;){if(e instanceof dn(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function Qy(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function RS(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function NS(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,s=a=>{if(e.current.isFocused=!1,i.disabled){let u=Qy(a);t?.(u)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",s,{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 Mh=!1;function iz(t){for(;t&&!BS(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=dn(t),n=e.document.activeElement;if(!n||n===t)return;Mh=!0;let r=!1,i=h=>{(de(h)===n||r)&&h.stopImmediatePropagation()},s=h=>{(de(h)===n||r)&&(h.stopImmediatePropagation(),!t&&!r&&(r=!0,Ar(n),c()))},a=h=>{(de(h)===t||r)&&h.stopImmediatePropagation()},u=h=>{(de(h)===t||r)&&(h.stopImmediatePropagation(),r||(r=!0,Ar(n),c()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",s,!0),e.addEventListener("focusin",u,!0),e.addEventListener("focus",a,!0);let c=()=>{cancelAnimationFrame(f),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",s,!0),e.removeEventListener("focusin",u,!0),e.removeEventListener("focus",a,!0),Mh=!1,r=!1},f=requestAnimationFrame(c);return c}function qp(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 Yy(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Mi(t){let e=null;return()=>(e==null&&(e=t()),e)}const Ms=Mi(function(){return Yy(/^Mac/i)}),sz=Mi(function(){return Yy(/^iPhone/i)}),Xy=Mi(function(){return Yy(/^iPad/i)||Ms()&&navigator.maxTouchPoints>1}),Ai=Mi(function(){return sz()||Xy()}),oz=Mi(function(){return Ms()||Ai()}),Jy=Mi(function(){return qp(/AppleWebKit/i)&&!PS()}),PS=Mi(function(){return qp(/Chrome/i)}),Gp=Mi(function(){return qp(/Android/i)}),az=Mi(function(){return qp(/Firefox/i)});function Wp(t){return t.pointerType===""&&t.isTrusted?!0:Gp()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Zy(t){return!Gp()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const OS=k.createContext({isNative:!0,open:uz,useHref:t=>t});function lz(t){let{children:e,navigate:n,useHref:r}=t,i=k.useMemo(()=>({isNative:!1,open:(s,a,u,c)=>{zS(s,f=>{LS(f,a)?n(u,c):qr(f,a)})},useHref:r||(s=>s)}),[n,r]);return H.createElement(OS.Provider,{value:i},e)}function Bl(){return k.useContext(OS)}function LS(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:s,shiftKey:a}=e;az()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(Ms()?r=!0:i=!0);let u=Jy()&&Ms()&&!Xy()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:i,altKey:s,shiftKey:a}):new MouseEvent("click",{metaKey:r,ctrlKey:i,altKey:s,shiftKey:a,detail:1,bubbles:!0,cancelable:!0});qr.isOpening=n,Ar(t),t.dispatchEvent(u),qr.isOpening=!1}qr.isOpening=!1;function zS(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 uz(t,e){zS(t,n=>qr(n,e))}function cz(t){const n=Bl().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 IS(t){const n=Bl().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 FS(t,e,n,r){!e.isNative&&t.currentTarget instanceof HTMLAnchorElement&&t.currentTarget.href&&!t.isDefaultPrevented()&&LS(t.currentTarget,t)&&n&&(t.preventDefault(),e.open(t.currentTarget,t,n,r))}let Bi=null,Ml="keyboard";const $c=new Set;let tc=new Map,Yo=!1,yb=!1;const dz={Tab:!0,Escape:!0};function Qp(t,e){for(let n of $c)n(t,e)}function fz(t){return!(t.metaKey||!Ms()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Rh(t){Yo=!0,!qr.isOpening&&fz(t)&&(Bi="keyboard",Ml="keyboard",Qp("keyboard",t))}function cl(t){Bi="pointer",Ml="pointerType"in t?t.pointerType:"mouse",(t.type==="mousedown"||t.type==="pointerdown")&&(Yo=!0,Qp("pointer",t))}function KS(t){!qr.isOpening&&Wp(t)&&(Yo=!0,Bi="virtual",Ml="virtual")}function _S(t){let e=dn(de(t)),n=ze(de(t));de(t)===e||de(t)===n||Mh||!t.isTrusted||(!Yo&&!yb&&(Bi="virtual",Ml="virtual",Qp("virtual",t)),Yo=!1,yb=!1)}function jS(){Mh||(Yo=!1,yb=!0)}function Nh(t){if(typeof window>"u"||typeof document>"u")return;const e=dn(t),n=ze(t);if(tc.get(e))return;let r=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){Yo=!0,r.apply(this,arguments)}}),n.addEventListener("keydown",Rh,!0),n.addEventListener("keyup",Rh,!0),n.addEventListener("click",KS,!0),e.addEventListener("focus",_S,!0),e.addEventListener("blur",jS,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",cl,!0),n.addEventListener("pointermove",cl,!0),n.addEventListener("pointerup",cl,!0)),e.addEventListener("beforeunload",()=>{HS(t)},{once:!0}),tc.set(e,{focus:r})}const HS=(t,e)=>{const n=dn(t),r=ze(t);e&&r.removeEventListener("DOMContentLoaded",e),tc.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:tc.get(n).focus}),r.removeEventListener("keydown",Rh,!0),r.removeEventListener("keyup",Rh,!0),r.removeEventListener("click",KS,!0),n.removeEventListener("focus",_S,!0),n.removeEventListener("blur",jS,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",cl,!0),r.removeEventListener("pointermove",cl,!0),r.removeEventListener("pointerup",cl,!0)),tc.delete(n))};function hz(t){const e=ze(t);let n;return e.readyState!=="loading"?Nh(t):(n=()=>{Nh(t)},e.addEventListener("DOMContentLoaded",n)),()=>HS(t,n)}typeof document<"u"&&hz();function yl(){return Bi!=="pointer"}function Xo(){return Bi}function Bo(t){Bi=t,Ml=t==="pointer"?"mouse":t,Qp(t,null)}function pz(){return Ml}function VS(){Nh();let[t,e]=k.useState(Bi);return k.useEffect(()=>{let n=()=>{e(Bi)};return $c.add(n),()=>{$c.delete(n)}},[]),js()?null:t}const mz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gz(t,e,n){let r=n?de(n):void 0,i=ze(r),s=dn(r);const a=typeof s<"u"?s.HTMLInputElement:HTMLInputElement,u=typeof s<"u"?s.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof s<"u"?s.HTMLElement:HTMLElement,f=typeof s<"u"?s.KeyboardEvent:KeyboardEvent;let h=_e(i);return t=t||h instanceof a&&!mz.has(h.type)||h instanceof u||h instanceof c&&h.isContentEditable,!(t&&e==="keyboard"&&n instanceof f&&!dz[n.key])}function bz(t,e,n){Nh(),k.useEffect(()=>{if(n?.enabled===!1)return;let r=(i,s)=>{gz(!!n?.isTextInput,i,s)&&t(yl())};return $c.add(r),()=>{$c.delete(r)}},e)}var US={};US={collectionLabel:"مقترحات"};var qS={};qS={collectionLabel:"Предложения"};var GS={};GS={collectionLabel:"Návrhy"};var WS={};WS={collectionLabel:"Forslag"};var QS={};QS={collectionLabel:"Empfehlungen"};var YS={};YS={collectionLabel:"Προτάσεις"};var XS={};XS={collectionLabel:"Suggestions"};var JS={};JS={collectionLabel:"Sugerencias"};var ZS={};ZS={collectionLabel:"Soovitused"};var e$={};e$={collectionLabel:"Ehdotukset"};var t$={};t$={collectionLabel:"Suggestions"};var n$={};n$={collectionLabel:"הצעות"};var r$={};r$={collectionLabel:"Prijedlozi"};var i$={};i$={collectionLabel:"Javaslatok"};var s$={};s$={collectionLabel:"Suggerimenti"};var o$={};o$={collectionLabel:"候補"};var a$={};a$={collectionLabel:"제안"};var l$={};l$={collectionLabel:"Pasiūlymai"};var u$={};u$={collectionLabel:"Ieteikumi"};var c$={};c$={collectionLabel:"Forslag"};var d$={};d$={collectionLabel:"Suggesties"};var f$={};f$={collectionLabel:"Sugestie"};var h$={};h$={collectionLabel:"Sugestões"};var p$={};p$={collectionLabel:"Sugestões"};var m$={};m$={collectionLabel:"Sugestii"};var g$={};g$={collectionLabel:"Предложения"};var b$={};b$={collectionLabel:"Návrhy"};var y$={};y$={collectionLabel:"Predlogi"};var v$={};v$={collectionLabel:"Predlozi"};var x$={};x$={collectionLabel:"Förslag"};var C$={};C$={collectionLabel:"Öneriler"};var E$={};E$={collectionLabel:"Пропозиції"};var D$={};D$={collectionLabel:"建议"};var k$={};k$={collectionLabel:"建議"};var S$={};S$={"ar-AE":US,"bg-BG":qS,"cs-CZ":GS,"da-DK":WS,"de-DE":QS,"el-GR":YS,"en-US":XS,"es-ES":JS,"et-EE":ZS,"fi-FI":e$,"fr-FR":t$,"he-IL":n$,"hr-HR":r$,"hu-HU":i$,"it-IT":s$,"ja-JP":o$,"ko-KR":a$,"lt-LT":l$,"lv-LV":u$,"nb-NO":c$,"nl-NL":d$,"pl-PL":f$,"pt-BR":h$,"pt-PT":p$,"ro-RO":m$,"ru-RU":g$,"sk-SK":b$,"sl-SI":y$,"sr-SP":v$,"sv-SE":x$,"tr-TR":C$,"uk-UA":E$,"zh-CN":D$,"zh-TW":k$};function Do(t){return Ms()?t.metaKey:t.ctrlKey}const yz=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function nc(t){return t instanceof HTMLInputElement&&!yz.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}const vz=H.useInsertionEffect??Le;function Bt(t){const e=k.useRef(null);return vz(()=>{e.current=t},[t]),k.useCallback((...n)=>{const r=e.current;return r?.(...n)},[])}function Vu(t,e,n,r){let i=Bt(n),s=n==null;k.useEffect(()=>{if(s||!t.current)return;let a=t.current;return a.addEventListener(e,i,r),()=>{a.removeEventListener(e,i,r)}},[t,e,r,s])}function e3(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=rn(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 xz=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Cz=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Ez(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 xz.has(n.script)}let e=t.split("-")[0];return Cz.has(e)}const $$=Symbol.for("react-aria.i18n.locale");function w$(){let t=typeof window<"u"&&window[$$]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Ez(t)?"rtl":"ltr"}}let vb=w$(),Uu=new Set;function N2(){vb=w$();for(let t of Uu)t(vb)}function Dz(){let t=js(),[e,n]=k.useState(vb);return k.useEffect(()=>(Uu.size===0&&window.addEventListener("languagechange",N2),Uu.add(n),()=>{Uu.delete(n),Uu.size===0&&window.removeEventListener("languagechange",N2)}),[]),t?{locale:typeof window<"u"&&window[$$]||"en-US",direction:"ltr"}:e}const kz=H.createContext(null);function Ri(){let t=Dz();return k.useContext(kz)||t}const Sz=Symbol.for("react-aria.i18n.locale"),$z=Symbol.for("react-aria.i18n.strings");let Mf;class Yp{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=wz(e,this.strings,this.defaultLocale),this.strings[e]=n),n}static getGlobalDictionaryForPackage(e){if(typeof window>"u")return null;let n=window[Sz];if(Mf===void 0){let i=window[$z];if(!i)return null;Mf={};for(let s in i)Mf[s]=new Yp({[n]:i[s]},n)}let r=Mf?.[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 wz(t,e,n="en-US"){if(e[t])return e[t];let r=Tz(t);if(e[r])return e[r];for(let i in e)if(i.startsWith(r+"-"))return e[i];return e[n]}function Tz(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}const P2=new Map,O2=new Map;class Az{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 s=this.locale+":"+r,a=P2.get(s);a||(a=new Intl.PluralRules(this.locale,{type:r}),P2.set(s,a));let u=a.select(e);return i=n[u]||n.other,typeof i=="function"?i():i}number(e){let n=O2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),O2.set(this.locale,n)),n.format(e)}select(e,n){let r=e[n]||e.other;return typeof r=="function"?r():r}}const L2=new WeakMap;function Bz(t){let e=L2.get(t);return e||(e=new Yp(t),L2.set(t,e)),e}function Mz(t,e){return e&&Yp.getGlobalDictionaryForPackage(e)||Bz(t)}function mr(t,e){let{locale:n}=Ri(),r=Mz(t,e);return k.useMemo(()=>new Az(n,r),[n,r])}function Rz(t){return t&&t.__esModule?t.default:t}function Nz(t,e){let{inputRef:n,collectionRef:r,filter:i,disableAutoFocusFirst:s=!1,disableVirtualFocus:a=!1}=t,u=rn(),c=k.useRef(void 0),f=k.useRef(!1),h=k.useRef(null),m=Xo()==="virtual"&&(Ai()||Gp()),[g,b]=k.useState(!m&&!a),[v,C]=k.useState(!1),[E,D]=k.useState(!1);k.useEffect(()=>()=>clearTimeout(c.current),[]);let T=Bt(V=>{!V.isTrusted&&g&&n.current&&_e(ze(n.current))!==n.current&&pz()!=="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)}),[$,A]=k.useState(null),B=k.useCallback(V=>{A(V),V!=null?(V.getAttribute("tabindex")!=null&&b(!1),C(!0)):C(!1)},[]);Le(()=>($?.addEventListener("focusin",T),()=>{$?.removeEventListener("focusin",T)}),[$]);let P=Hs(k.useMemo(()=>Gc(r,B),[r,B])),R=k.useCallback(()=>{if(!r.current){D(!0);return}f.current=!0,r.current?.dispatchEvent(new CustomEvent(gb,{cancelable:!0,bubbles:!0,detail:{focusStrategy:"first"}}))},[r]),M=k.useCallback(V=>{D(!1),qy(_e()),h.current=null,e.setFocusedNodeId(null);let ne=new CustomEvent(TS,{cancelable:!0,bubbles:!0,detail:{clearFocusKey:V}});clearTimeout(c.current),f.current=!1,r.current?.dispatchEvent(ne)},[r,e]),I=k.useRef("");Vu(n,"beforeinput",V=>{let{inputType:ne}=V;I.current=ne});let G=V=>{(I.current==="insertText"||I.current==="insertCompositionText"||I.current==="insertFromComposition")&&!s?R():I.current&&(I.current.includes("insert")||I.current.includes("delete")||I.current.includes("history"))&&(M(!0),AS(document)===n.current&&Ah(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(Do(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(gb,{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":M();break;case"Enter":ne!=null&&document.getElementById(ne)?.dispatchEvent(new PointerEvent("click",V.nativeEvent));break}else V.preventDefault()},ie=Bt(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=mr(Rz(S$),"@react-aria/autocomplete"),te=e3({id:u,"aria-label":F.format("collectionLabel")}),O=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&&bb(ne,V.relatedTarget)},Y=V=>{if(!V.isTrusted)return;if(h.current?document.getElementById(h.current):null){let le=de(V);queueMicrotask(()=>{bb(le,r.current),Ah(r.current,le)})}},Z=V=>{V.button!==0||V.pointerType==="touch"||h.current==null||n.current==null||de(V)===n.current&&M()},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:P,filter:i!=null?O:void 0}}const Pz=typeof document<"u"?H.useInsertionEffect??H.useLayoutEffect:()=>{};function Vs(t,e,n){let[r,i]=k.useState(t||e),s=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;Pz(()=>{s.current=c});let[,f]=k.useReducer(()=>({}),{}),h=k.useCallback((m,...g)=>{let b=typeof m=="function"?m(s.current):m;Object.is(s.current,b)||(s.current=b,i(b),f(),n?.(b,...g))},[n]);return[c,h]}function Oz(t){let{onInputChange:e,inputValue:n,defaultInputValue:r=""}=t,i=f=>{e&&e(f)},[s,a]=k.useState(null),[u,c]=Vs(n,r,i);return{inputValue:u,setInputValue:c,focusedNodeId:s,setFocusedNodeId:a}}const Lz=k.createContext(null),zz=k.createContext(null),wc=k.createContext(null),Xp=k.createContext(null);function Iz(t){let e=Al(Lz,t.slot);t=we(e,t);let{filter:n,disableAutoFocusFirst:r}=t,i=Oz(t),s=k.useRef(null),a=k.useRef(null),{inputProps:u,collectionProps:c,collectionRef:f,filter:h}=Nz({...wS(t),filter:n,disableAutoFocusFirst:r,inputRef:s,collectionRef:a},i);return H.createElement(Br,{values:[[zz,i],[Xp,{...u,ref:s}],[wc,{...c,filter:h,ref:f}]]},t.children)}class ia{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 T$ extends ia{filter(e,n,r){let[i,s]=A$(e,n,this.firstChildKey,r),a=this.clone();return a.firstChildKey=i,a.lastChildKey=s,a}}const P1=class P1 extends ia{};P1.type="header";let xb=P1;const O1=class O1 extends ia{};O1.type="loader";let Ph=O1;const L1=class L1 extends T${filter(e,n,r){if(r(this.textValue,this)){let i=this.clone();return n.addDescendants(i,e),i}return null}};L1.type="item";let Oh=L1;const z1=class z1 extends T${filter(e,n,r){let i=super.filter(e,n,r);if(i&&i.lastChildKey!==null){let s=e.getItem(i.lastChildKey);if(s&&s.type!=="header")return i}return null}};z1.type="section";let Cb=z1;class Fz{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]=A$(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 A$(t,e,n,r){if(n==null)return[null,null];let i=null,s=null,a=t.getItem(n);for(;a!=null;){let u=a.filter(t,e,r);u!=null&&(u.nextKey=null,s&&(u.prevKey=s.key,s.nextKey=u.key),i==null&&(i=u),e.addNode(u),s=u),a=a.nextKey!=null?t.getItem(a.nextKey):null}if(s&&s.type==="separator"){let u=s.prevKey;e.removeNode(s.key),u!=null?(s=e.getItem(u),s.nextKey=null):s=null}return[i?.key??null,s?.key??null]}class B${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 dl extends B${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 dl?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 dl?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,s){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=s,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,s=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),s&&e.ownerDocument.markDirty(s),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Kz extends B${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 dl(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 dl&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof dl?(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 M$(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:s=[]}=t,a=k.useMemo(()=>{},[e]),u=k.useMemo(()=>new WeakMap,[...s,a]);return k.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let f of n){let h=_z(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 _z(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let gs=new Map,Eb=new Set;function z2(){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 s=gs.get(i);s||(s=new Set,gs.set(i,s),i.addEventListener("transitioncancel",n,{once:!0})),s.add(r.propertyName)},n=r=>{let i=de(r);if(!t(r)||!i)return;let s=gs.get(i);if(s&&(s.delete(r.propertyName),s.size===0&&(i.removeEventListener("transitioncancel",n),gs.delete(i)),gs.size===0)){for(let a of Eb)a();Eb.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?z2():document.addEventListener("DOMContentLoaded",z2));function jz(){for(const[t]of gs)"isConnected"in t&&!t.isConnected&&gs.delete(t)}function R$(t){requestAnimationFrame(()=>{jz(),gs.size===0?t():Eb.add(t)})}function gn(t){if(!t.isConnected)return;const e=ze(t);if(Xo()==="virtual"){let n=_e(e);R$(()=>{const r=_e(e);(r===n||r===e.body)&&t.isConnected&&Ar(t)})}else Ar(t)}function N$(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const s=k.useCallback(c=>{if(de(c)===c.currentTarget)return r&&r(c),i&&i(!1),!0},[r,i]),a=NS(s),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)?s:void 0}}}function I2(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 P$(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:I2(t.onKeyDown),onKeyUp:I2(t.onKeyUp)}}}function t3(t,e){Le(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let Db=H.createContext(null);function Hz(t){let e=k.useContext(Db)||{};t3(e,t);let{ref:n,...r}=e;return r}function Jp(t,e){let{focusProps:n}=N$(t),{keyboardProps:r}=P$(t),i=we(n,r),s=Hz(e),a=t.isDisabled?{}:s,u=k.useRef(t.autoFocus);k.useEffect(()=>{u.current&&e.current&&gn(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 Lh=k.createContext(!1);function Vz(t){if(k.useContext(Lh))return H.createElement(H.Fragment,null,t.children);let n=H.createElement(Lh.Provider,{value:!0},t.children);return H.createElement("template",null,n)}function Zp(t){let e=(n,r)=>k.useContext(Lh)?null:t(n,r);return e.displayName=t.displayName||t.name,k.forwardRef(e)}function O$(){return k.useContext(Lh)}var n3=mS();const L$=k.createContext(!1),Tc=k.createContext(null);function r3(t){if(k.useContext(Tc))return t.content;let{collection:n,document:r}=Wz(t.createCollection);return H.createElement(H.Fragment,null,H.createElement(Vz,null,H.createElement(Tc.Provider,{value:r},t.content)),H.createElement(Uz,{render:t.children,collection:n}))}function Uz({collection:t,render:e}){return e(t)}function qz(t,e,n){let r=js(),i=k.useRef(r);i.current=r;let s=k.useCallback(()=>i.current?n():e(),[e,n]);return n3.useSyncExternalStore(t,s)}const Gz=typeof H.useSyncExternalStore=="function"?H.useSyncExternalStore:qz;function Wz(t){let[e]=k.useState(()=>new Kz(t?.()||new Fz)),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:Gz(n,r,i),document:e}}const kb=k.createContext(null);function Qz(t){var n;return n=class extends ia{},n.type=t,n}function z$(t,e,n,r,i,s){typeof t=="string"&&(t=Qz(t));let a=k.useCallback(c=>{c?.setProps(e,n,t,r,s)},[e,n,r,s,t]),u=k.useContext(kb);if(u){let c=u.ownerDocument.nodesByProps.get(e);return c||(c=u.ownerDocument.createElement(t.type),c.setProps(e,n,t,r,s),u.appendChild(c),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,c)),i?H.createElement(kb.Provider,{value:c},i):null}return H.createElement(t.type,{ref:a},i)}function sa(t,e){let n=({node:i})=>e(i.props,i.props.ref,i),r=k.forwardRef((i,s)=>{let a=k.useContext(Db);if(!k.useContext(L$)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(i,s)}return z$(t,i,s,"children"in i?i.children:null,null,c=>H.createElement(Db.Provider,{value:a},H.createElement(n,{node:c})))});return r.displayName=e.name,r}function Yz(t,e,n=I$){let r=({node:s})=>e(s.props,s.props.ref,s),i=k.forwardRef((s,a)=>{let u=n(s);return z$(t,s,a,null,u,c=>H.createElement(r,{node:c}))??H.createElement(H.Fragment,null)});return i.displayName=e.name,i}function I$(t){return M$({...t,addIdAndValue:!0})}const F2=k.createContext(null);function em(t){let e=k.useContext(F2),n=(e?.dependencies||[]).concat(t.dependencies),r=t.idScope??e?.idScope,i=I$({...t,idScope:r,dependencies:n});return k.useContext(Tc)&&(i=H.createElement(Xz,null,i)),e=k.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),H.createElement(F2.Provider,{value:e},i)}function Xz({children:t}){let e=k.useContext(Tc),n=k.useMemo(()=>H.createElement(Tc.Provider,{value:null},H.createElement(L$.Provider,{value:!0},t)),[t]);return js()?H.createElement(kb.Provider,{value:e},n):Tl.createPortal(n,e)}const Jz=k.createContext(null),F$={CollectionRoot({collection:t,renderDropIndicator:e}){return K2(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return K2(t,e,n)}};function K2(t,e,n){return M$({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,Zz(t,r,n))}})}function Zz(t,e,n){let r=e.key,i=t.getKeyAfter(r),s=i!=null?t.getItem(i):null;for(;s!=null&&s.type!=="item";)i=t.getKeyAfter(s.key),s=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"&&(!s||c.parentKey!==s.parentKey&&s.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 Rs=k.createContext(F$);function eI(t){return k.useMemo(()=>t!=null?new Set([t]):null,[t])}const tI=new Set(["id"]),nI=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),rI=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),iI=new Set(["dir","lang","hidden","inert","translate"]),_2=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"]),sI=/^(data-.*)$/;function Je(t,e={}){let{labelable:n,isLink:r,global:i,events:s=i,propNames:a}=e,u={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(tI.has(c)||n&&nI.has(c)||r&&rI.has(c)||i&&iI.has(c)||s&&(_2.has(c)||c.endsWith("Capture")&&_2.has(c.slice(0,-7)))||a?.has(c)||sI.test(c))&&(u[c]=t[c]);return u}let al="default",Sb="",dh=new WeakMap;function oI(t){if(Ai()){if(al==="default"){const e=ze(t);Sb=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}al="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";dh.set(t,t.style[e]),t.style[e]="none"}}function j2(t){if(Ai()){if(al!=="disabled")return;al="restoring",setTimeout(()=>{R$(()=>{if(al==="restoring"){const e=ze(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Sb||""),Sb="",al="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&dh.has(t)){let e=dh.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),dh.delete(t)}}function H2(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let s0=new WeakMap;function K$(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return H2(e);if(s0.has(e))return s0.get(e);let n=e.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof dn(n).HTMLMetaElement&&(n.nonce||n.content)||H2(e)||void 0;return r!==void 0&&s0.set(e,r),r}const Ac=H.createContext({register:()=>{}});Ac.displayName="PressResponderContext";function Wc(){let t=k.useRef(new Map),e=k.useCallback((i,s,a,u)=>{let c=u?.once?(...f)=>{t.current.delete(a),a(...f)}:a;t.current.set(a,{type:s,eventTarget:i,fn:c,options:u}),i.addEventListener(s,c,u)},[]),n=k.useCallback((i,s,a,u)=>{let c=t.current.get(a)?.fn||a;i.removeEventListener(s,c,u),t.current.delete(a)},[]),r=k.useCallback(()=>{t.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return k.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function aI(t){let e=k.useContext(Ac);if(e){let{register:n,ref:r,...i}=e;t=we(i,t),n()}return t3(e,t.ref),t}class Rf{#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 V2=Symbol("linkClicked"),U2="react-aria-pressable-style",q2="data-react-aria-pressable";function Qc(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,onClick:a,isDisabled:u,isPressed:c,preventFocusOnPress:f,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:m,ref:g,...b}=aI(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:T}=Wc(),$=k.useCallback((F,te)=>{let O=E.current;if(u||O.didFirePressStart)return!1;let K=!0;if(O.isTriggeringEvent=!0,r){let Y=new Rf("pressstart",te,F);r(Y),K=Y.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,C(!0),K},[u,r,n]),A=k.useCallback((F,te,O=!0)=>{let K=E.current;if(!K.didFirePressStart)return!1;K.didFirePressStart=!1,K.isTriggeringEvent=!0;let Y=!0;if(i){let Z=new Rf("pressend",te,F);i(Z),Y=Z.shouldStopPropagation}if(n&&n(!1),C(!1),e&&O&&!u){let Z=new Rf("press",te,F);e(Z),Y&&=Z.shouldStopPropagation}return K.isTriggeringEvent=!1,Y},[u,i,n,e]),B=Bt(A),P=k.useCallback((F,te)=>{let O=E.current;if(u)return!1;if(s){O.isTriggeringEvent=!0;let K=new Rf("pressup",te,F);return s(K),O.isTriggeringEvent=!1,K.shouldStopPropagation}return!0},[u,s]),R=Bt(P),M=k.useCallback(F=>{let te=E.current;if(te.isPressed&&te.target){te.didFirePressStart&&te.pointerType!=null&&A(xo(te.target,F),te.pointerType,!1),te.isPressed=!1,te.isOverTarget=!1,te.activePointerId=null,te.pointerType=null,T(),m||j2(te.target);for(let O of te.disposables)O();te.disposables=[]}},[m,T,A]),I=Bt(M);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&&M(F)},[h,M]),J=k.useCallback(F=>{u||a?.(F)},[u,a]),U=k.useCallback((F,te)=>{if(!u&&a){let O=new MouseEvent("click",F);RS(O,te),a(Qy(O))}},[u,a]),ie=k.useMemo(()=>{let F=E.current,te={onKeyDown(K){if(o0(K.nativeEvent,K.currentTarget)&&$e(K.currentTarget,de(K))){G2(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=>{o0(L,Z)&&!L.repeat&&$e(Z,de(L))&&F.target&&R(xo(F.target,L),"keyboard")};D(ze(K.currentTarget),"keyup",_s(j,O),!0),Y&&K.stopPropagation(),K.metaKey&&Ms()&&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"||Wp(K.nativeEvent))){let Z=$(K,"virtual"),j=R(K,"virtual"),L=B(K,"virtual");J(K),Y=Z&&j&&L}else if(F.isPressed&&F.pointerType!=="keyboard"){let Z=F.pointerType||K.nativeEvent.pointerType||"virtual",j=R(xo(K.currentTarget,K),Z),L=B(xo(K.currentTarget,K),Z,!0);Y=j&&L,F.isOverTarget=!1,J(K),I(K)}F.ignoreEmulatedMouseEvents=!1,Y&&K.stopPropagation()}}},O=K=>{if(F.isPressed&&F.target&&o0(K,F.target)){G2(de(K),K.key)&&K.preventDefault();let Y=de(K),Z=$e(F.target,Y);B(xo(F.target,K),"keyboard",Z),Z&&U(K,F.target),T(),K.key!=="Enter"&&i3(F.target)&&$e(F.target,Y)&&!K[V2]&&(K[V2]=!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(Zy(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||oI(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=iz(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&&R(Z,F.pointerType||Z.pointerType)},te.onPointerEnter=Z=>{Z.pointerId===F.activePointerId&&F.target&&!F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!0,$(xo(F.target,Z),F.pointerType))},te.onPointerLeave=Z=>{Z.pointerId===F.activePointerId&&F.target&&F.isOverTarget&&F.pointerType!=null&&(F.isOverTarget=!1,B(xo(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):(Ar(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,T,m,G,$,J,U]);return k.useEffect(()=>{if(!g)return;const F=ze(g.current);if(!F||!F.head||F.getElementById(U2))return;const te=F.createElement("style");te.id=U2;let O=K$(F);O&&(te.nonce=O),te.textContent=`
10
+ @layer {
11
+ [${q2}] {
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||j2(F.target??void 0);for(let te of F.disposables)te();F.disposables=[]}},[m]),{isPressed:c||v,pressProps:we(b,ie,{[q2]:!0})}}function i3(t){return t.tagName==="A"&&t.hasAttribute("href")}function o0(t,e){const{key:n,code:r}=t,i=e,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof dn(i).HTMLInputElement&&!_$(i,n)||i instanceof dn(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&i3(i))&&n!=="Enter")}function xo(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 lI(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!i3(t)}function G2(t,e){return t instanceof HTMLInputElement?!_$(t,e):lI(t)}const uI=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function _$(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":uI.has(t.type)}function cI(t,e){let{elementType:n="a",onPress:r,onPressStart:i,onPressEnd:s,onClick:a,isDisabled:u,...c}=t,f={};n!=="a"&&(f={role:"link",tabIndex:u?void 0:0});let{focusableProps:h}=Jp(t,e),{pressProps:m,isPressed:g}=Qc({onPress:r,onPressStart:i,onPressEnd:s,onClick:a,isDisabled:u,ref:e}),b=Je(c,{labelable:!0}),v=we(h,m),C=Bl(),E=IS(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),FS(D,C,t.href,t.routerOptions)}})}}function s3(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,s=k.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:u}=Wc(),c=k.useCallback(m=>{$e(m.currentTarget,de(m))&&s.current.isFocusWithin&&!$e(m.currentTarget,m.relatedTarget)&&(s.current.isFocusWithin=!1,u(),n&&n(m),i&&i(!1))},[n,i,s,u]),f=NS(c),h=k.useCallback(m=>{if(!$e(m.currentTarget,de(m)))return;let g=de(m);const b=ze(g),v=_e(b);if(!s.current.isFocusWithin&&v===g){r&&r(m),i&&i(!0),s.current.isFocusWithin=!0,f(m);let C=m.currentTarget;a(b,"focus",E=>{let D=de(E);if(s.current.isFocusWithin&&!$e(C,D)){let T=new b.defaultView.FocusEvent("blur",{relatedTarget:D});RS(T,C);let $=Qy(T);c($)}},{capture:!0})}},[r,i,f,a,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:h,onBlur:c}}}function Ns(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=k.useRef({isFocused:!1,isFocusVisible:e||yl()}),[s,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=yl(),a(b),f()},[f]);bz(b=>{i.current.isFocusVisible=b,f()},[n,s],{enabled:s,isTextInput:n});let{focusProps:m}=N$({isDisabled:r,onFocusChange:h}),{focusWithinProps:g}=s3({isDisabled:!r,onFocusWithinChange:h});return{isFocused:s,isFocusVisible:u,focusProps:r?g:m}}let $b=!1,Nf=0;function dI(){$b=!0,setTimeout(()=>{$b=!1},500)}function W2(t){t.pointerType==="touch"&&dI()}function fI(){let t=ze(null);if(!(typeof t>"u"))return Nf===0&&typeof PointerEvent<"u"&&t.addEventListener("pointerup",W2),Nf++,()=>{Nf--,!(Nf>0)&&typeof PointerEvent<"u"&&t.removeEventListener("pointerup",W2)}}function Us(t){let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,isDisabled:i}=t,[s,a]=k.useState(!1),u=k.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;k.useEffect(fI,[]);let{addGlobalListener:c,removeAllGlobalListeners:f}=Wc(),{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",T=>{u.isHovered&&u.target&&!$e(u.target,de(T))&&b(T,T.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=>{$b&&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:s}}const j$=k.createContext(null),hI=k.forwardRef(function(e,n){[e,n]=Et(e,n,j$);let r=e.href&&!e.isDisabled?"a":"span",{linkProps:i,isPressed:s}=cI({...e,elementType:r},n),a=at[r],{hoverProps:u,isHovered:c}=Us(e),{focusProps:f,isFocused:h,isFocusVisible:m}=Ns(),g=Pt({...e,defaultClassName:"react-aria-Link",values:{isCurrent:!!e["aria-current"],isDisabled:e.isDisabled||!1,isPressed:s,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":s||void 0,"data-focus-visible":m||void 0,"data-current":!!e["aria-current"]||void 0,"data-disabled":e.isDisabled||void 0},g.children)});var H$={};H$={breadcrumbs:"عناصر الواجهة"};var V$={};V$={breadcrumbs:"Трохи хляб"};var U$={};U$={breadcrumbs:"Popis cesty"};var q$={};q$={breadcrumbs:"Brødkrummer"};var G$={};G$={breadcrumbs:"Breadcrumbs"};var W$={};W$={breadcrumbs:"Πλοηγήσεις breadcrumb"};var Q$={};Q$={breadcrumbs:"Breadcrumbs"};var Y$={};Y$={breadcrumbs:"Migas de pan"};var X$={};X$={breadcrumbs:"Lingiread"};var J$={};J$={breadcrumbs:"Navigointilinkit"};var Z$={};Z$={breadcrumbs:"Chemin de navigation"};var ew={};ew={breadcrumbs:"שבילי ניווט"};var tw={};tw={breadcrumbs:"Navigacijski putovi"};var nw={};nw={breadcrumbs:"Morzsamenü"};var rw={};rw={breadcrumbs:"Breadcrumb"};var iw={};iw={breadcrumbs:"パンくずリスト"};var sw={};sw={breadcrumbs:"탐색 표시"};var ow={};ow={breadcrumbs:"Naršymo kelias"};var aw={};aw={breadcrumbs:"Atpakaļceļi"};var lw={};lw={breadcrumbs:"Navigasjonsstier"};var uw={};uw={breadcrumbs:"Broodkruimels"};var cw={};cw={breadcrumbs:"Struktura nawigacyjna"};var dw={};dw={breadcrumbs:"Caminho detalhado"};var fw={};fw={breadcrumbs:"Categorias"};var hw={};hw={breadcrumbs:"Miez de pâine"};var pw={};pw={breadcrumbs:"Навигация"};var mw={};mw={breadcrumbs:"Navigačné prvky Breadcrumbs"};var gw={};gw={breadcrumbs:"Drobtine"};var bw={};bw={breadcrumbs:"Putanje navigacije"};var yw={};yw={breadcrumbs:"Sökvägar"};var vw={};vw={breadcrumbs:"İçerik haritaları"};var xw={};xw={breadcrumbs:"Навігаційна стежка"};var Cw={};Cw={breadcrumbs:"导航栏"};var Ew={};Ew={breadcrumbs:"導覽列"};var Dw={};Dw={"ar-AE":H$,"bg-BG":V$,"cs-CZ":U$,"da-DK":q$,"de-DE":G$,"el-GR":W$,"en-US":Q$,"es-ES":Y$,"et-EE":X$,"fi-FI":J$,"fr-FR":Z$,"he-IL":ew,"hr-HR":tw,"hu-HU":nw,"it-IT":rw,"ja-JP":iw,"ko-KR":sw,"lt-LT":ow,"lv-LV":aw,"nb-NO":lw,"nl-NL":uw,"pl-PL":cw,"pt-BR":dw,"pt-PT":fw,"ro-RO":hw,"ru-RU":pw,"sk-SK":mw,"sl-SI":gw,"sr-SP":bw,"sv-SE":yw,"tr-TR":vw,"uk-UA":xw,"zh-CN":Cw,"zh-TW":Ew};function pI(t){return t&&t.__esModule?t.default:t}function mI(t){let{"aria-label":e,...n}=t,r=mr(pI(Dw),"@react-aria/breadcrumbs");return{navProps:{...Je(n,{labelable:!0}),"aria-label":e||r.format("breadcrumbs")}}}const wb=k.createContext(null),gI=k.forwardRef(function(e,n){[e,n]=Et(e,n,wb);let{CollectionRoot:r}=k.useContext(Rs),{navProps:i}=mI(e),s=Je(e,{global:!0,labelable:!0});return H.createElement(r3,{content:H.createElement(em,e)},a=>H.createElement(at.ol,{render:e.render,ref:n,...we(s,i),slot:e.slot||void 0,style:e.style,className:e.className??"react-aria-Breadcrumbs"},H.createElement(wb.Provider,{value:e},H.createElement(r,{collection:a}))))}),I1=class I1 extends ia{};I1.type="item";let Tb=I1;const bI=sa(Tb,function(e,n,r){let i=r.nextKey==null,{isDisabled:s,onAction:a}=Al(wb),u={"aria-current":i?"page":null,isDisabled:s||i,onPress:()=>a?.(r.key)},c=Pt({...r.props,children:r.rendered,values:{isDisabled:s||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":s||i||void 0,"data-current":i||void 0},H.createElement(j$.Provider,{value:u},c.children))}),o3=k.createContext({}),yI=Zp(function(e,n){[e,n]=Et(e,n,o3);let{elementType:r="label",...i}=e,s=at[r];return H.createElement(s,{className:"react-aria-Label",...i,ref:n})});function vI(t){let{id:e,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:s="label"}=t;e=rn(e);let a=rn(),u={};n&&(r=r?`${a} ${r}`:a,u={id:a,htmlFor:s==="label"?e:void 0});let c=e3({id:e,"aria-label":i,"aria-labelledby":r});return{labelProps:u,fieldProps:c}}function Ab(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const xI=k.createContext(null),kw=7e3;let Ja=null;function Mo(t,e="assertive",n=kw){Ja?Ja.announce(t,e,n):(Ja=new CI,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?Ja.announce(t,e,n):setTimeout(()=>{Ja?.isAttached()&&Ja?.announce(t,e,n)},100))}class CI{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=kw){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 Sw(t,e){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,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:T}=Qc({onPressStart:s,onPressEnd:a,onPressChange:c,onPress:i,onPressUp:u,onClick:m,isDisabled:r,preventFocusOnPress:f,ref:e}),{focusableProps:$}=Jp(t,e);h&&($.tabIndex=r?-1:$.tabIndex);let A=we($,D,Je(t,{labelable:!0}));return{isPressed:T,buttonProps:we(E,A,{"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 tm=k.createContext({}),$w=Zp(function(e,n){[e,n]=Et(e,n,tm);let r=e,{isPending:i}=r,{buttonProps:s,isPressed:a}=Sw(e,n);s=DI(s,i);let{focusProps:u,isFocused:c,isFocusVisible:f}=Ns(e),{hoverProps:h,isHovered:m}=Us({...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=Pt({...e,values:g,defaultClassName:"react-aria-Button"}),v=rn(s.id),C=rn(),E=s["aria-labelledby"];i&&(E?E=`${E} ${C}`:s["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)&&Mo($,"assertive"),D.current=i},[i,c,E,v]);let T=Je(e,{global:!0});return delete T.onClick,H.createElement(at.button,{...we(T,b,s,u,h),type:s.type==="submit"&&i?"button":s.type,id:v,ref:n,"aria-labelledby":E,slot:e.slot||void 0,"aria-disabled":i?"true":s["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(xI.Provider,{value:{id:C}},b.children))}),EI=/Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;function DI(t,e){if(e){for(const n in t)n.startsWith("on")&&!EI.test(n)&&(t[n]=void 0);t.href=void 0,t.target=void 0}return t}const ww=k.createContext({}),kI=k.forwardRef(function(e,n){[e,n]=Et(e,n,ww);let{children:r,level:i=3,className:s,...a}=e,u=at[`h${i}`];return H.createElement(u,{...a,ref:n,className:s??"react-aria-Heading"},r)}),a3=k.createContext({});function SI(t,e){const n=k.useRef(!0),r=k.useRef(null);let i=Bt(t);k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),k.useEffect(()=>{let s=r.current;n.current?n.current=!1:(!s||e.some((a,u)=>!Object.is(a,s[u])))&&i(),r.current=e},e)}function Ps(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 Vr(t,e){let n=t;for(Ps(n,e)&&(n=n.parentElement);n&&!Ps(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function a0(t,e){let n=[],r=document.scrollingElement||document.documentElement;for(;t&&(Ps(t,e)&&n.push(t),t!==r);)t=t.parentElement;return n}function fh(t,e,n={}){let{block:r="nearest",inline:i="nearest"}=n;if(t===e)return;let s=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,T=parseFloat(f.scrollMarginBottom)||0,$=parseFloat(f.scrollMarginLeft)||0,A=parseFloat(f.scrollMarginRight)||0,B=parseFloat(h.scrollPaddingTop)||0,P=parseFloat(h.scrollPaddingBottom)||0,R=parseFloat(h.scrollPaddingLeft)||0,M=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+T,te=u.left-$,O=u.right+A,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)+B,V=v-(g?0:G)-P-j,ne=C+(g?0:J)+R,le=E-(g?0:U)-M;h.direction==="rtl"&&!Ai()?ne+=Z:le-=Z;let ue=ie<L||F>V,fe=te<ne||O>le;if(ue&&r==="start")s+=ie-L;else if(ue&&r==="center")s+=(ie+F)/2-(L+V)/2;else if(ue&&r==="end")s+=F-V;else if(ue&&r==="nearest"){let Ee=ie-L,Ve=F-V;s+=Math.abs(Ee)<=Math.abs(Ve)?Ee:Ve}if(fe&&i==="start")a+=te-ne;else if(fe&&i==="center")a+=(te+O)/2-(ne+le)/2;else if(fe&&i==="end")a+=O-le;else if(fe&&i==="nearest"){let Ee=te-ne,Ve=O-le;a+=Math.abs(Ee)<=Math.abs(Ve)?Ee:Ve}t.scrollTo({left:a,top:s})}function fs(t,e={}){let{containingElement:n}=e;if(t&&t.isConnected){let r=document.scrollingElement||document.documentElement;if(window.getComputedStyle(r).overflow==="hidden"){let{left:s,top:a}=t.getBoundingClientRect(),u=a0(t,!0);for(let h of u)fh(h,t);let{left:c,top:f}=t.getBoundingClientRect();if(Math.abs(s-c)>1||Math.abs(a-f)>1){u=n?a0(n,!0):[];for(let h of u)fh(h,n,{block:"center",inline:"center"});for(let h of a0(t,!0))fh(h,t)}}else{let{left:s,top:a}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:u,top:c}=t.getBoundingClientRect();(Math.abs(s-u)>1||Math.abs(a-c)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let $I=0;const l0=new Map;function Yc(t){let[e,n]=k.useState();return Le(()=>{if(!t)return;let r=l0.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${$I++}`;n(i);let s=document.createElement("div");s.id=i,s.style.display="none",s.textContent=t,document.body.appendChild(s),r={refCount:0,element:s},l0.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),l0.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const Q2={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 nm(t={}){let{style:e,isFocusable:n}=t,[r,i]=k.useState(!1),{focusWithinProps:s}=s3({isDisabled:!n,onFocusWithinChange:u=>i(u)}),a=k.useMemo(()=>r?e:e?{...Q2,...e}:Q2,[r]);return{visuallyHiddenProps:{...s,style:a}}}function wI(t){let{children:e,elementType:n="div",isFocusable:r,style:i,...s}=t,{visuallyHiddenProps:a}=nm(t);return H.createElement(n,we(s,a),e)}const TI=k.createContext(null),Tw={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},Aw={...Tw,customError:!0,valid:!1},Nu={isInvalid:!1,validationDetails:Tw,validationErrors:[]},AI=k.createContext({}),Y2="__reactAriaFormValidationState";function BI(t){if(t[Y2]){let{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=t[Y2];return{realtimeValidation:e,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return MI(t)}function MI(t){let{isInvalid:e,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:u="aria"}=t;n&&(e||=n==="invalid");let c=e!==void 0?{isInvalid:e,validationErrors:[],validationDetails:Aw}:null,f=k.useMemo(()=>{if(!a||i==null)return null;let G=RI(a,i);return X2(G)},[a,i]);s?.validationDetails.valid&&(s=void 0);let h=k.useContext(AI),m=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(G=>Bb(h[G])):Bb(h[r]):[],[h,r]),[g,b]=k.useState(h),[v,C]=k.useState(!1);h!==g&&(b(h),C(!1));let E=k.useMemo(()=>X2(v?[]:m),[v,m]),D=k.useRef(Nu),[T,$]=k.useState(Nu),A=k.useRef(Nu),B=()=>{if(!P)return;R(!1);let G=f||s||D.current;u0(G,A.current)||(A.current=G,$(G))},[P,R]=k.useState(!1);return k.useEffect(B),{realtimeValidation:c||E||f||s||Nu,displayValidation:u==="native"?c||E||T:c||E||f||s||T,updateValidation(G){u==="aria"&&!u0(T,G)?$(G):D.current=G},resetValidation(){let G=Nu;u0(G,A.current)||(A.current=G,$(G)),u==="native"&&R(!1),C(!0)},commitValidation(){u==="native"&&R(!0),C(!0)}}}function Bb(t){return t?Array.isArray(t)?t:[t]:[]}function RI(t,e){if(typeof t=="function"){let n=t(e);if(n&&typeof n!="boolean")return Bb(n)}return[]}function X2(t){return t.length?{isInvalid:!0,validationErrors:t,validationDetails:Aw}:null}function u0(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 NI=k.createContext(null);function PI(t){let{description:e,errorMessage:n,isInvalid:r,validationState:i}=t,{labelProps:s,fieldProps:a}=vI(t),u=jo([!!e,!!n,r,i]),c=jo([!!e,!!n,r,i]);return a=we(a,{"aria-describedby":[u,c,t["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:s,fieldProps:a,descriptionProps:{id:u},errorMessageProps:{id:c}}}function OI(t,e,n){let r=Bt(i=>{n&&!i.defaultPrevented&&n(e)});k.useEffect(()=>{let i=t?.current?.form;return i?.addEventListener("reset",r),()=>{i?.removeEventListener("reset",r)}},[t])}function LI(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(II(n.current))}});let s=k.useRef(!1),a=Bt(()=>{s.current||e.resetValidation()}),u=Bt(f=>{e.displayValidation.isInvalid||e.commitValidation();let h=n?.current?.form;!f.defaultPrevented&&n&&h&&FI(h)===n.current&&(i?i():n.current?.focus(),Bo("keyboard")),f.preventDefault()}),c=Bt(()=>{e.commitValidation()});k.useEffect(()=>{let f=n?.current;if(!f)return;let h=f.form,m=h?.reset;return h&&(h.reset=()=>{s.current=!window.event||window.event.type==="message"&&de(window.event)instanceof MessagePort,m?.call(h),s.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 zI(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 II(t){return{isInvalid:!t.validity.valid,validationDetails:zI(t),validationErrors:t.validationMessage?[t.validationMessage]:[]}}function FI(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 KI(t={}){let{isReadOnly:e}=t,[n,r]=Vs(t.isSelected,t.defaultSelected||!1,t.onChange),[i]=k.useState(n);function s(u){e||r(u)}function a(){e||r(!n)}return{isSelected:n,defaultSelected:t.defaultSelected??i,setSelected:s,toggle:a}}const _I=k.createContext(null),jI=k.createContext(null),Bw=k.createContext({}),HI=k.forwardRef(function(e,n){[e,n]=Et(e,n,Bw);let{isDisabled:r,isInvalid:i,isReadOnly:s,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}=Us({onHoverStart:a,onHoverChange:u,onHoverEnd:c,isDisabled:r}),{isFocused:g,isFocusVisible:b,focusProps:v}=Ns({within:!0}),C=Pt({...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":s||void 0},C.children)}),Mw=k.createContext({});let VI=t=>{let{onHoverStart:e,onHoverChange:n,onHoverEnd:r,...i}=t;return i};const Rw=Zp(function(e,n){[e,n]=Et(e,n,Mw);let{hoverProps:r,isHovered:i}=Us({...e,isDisabled:e.disabled}),{isFocused:s,isFocusVisible:a,focusProps:u}=Ns({isTextInput:!0,autoFocus:e.autoFocus}),c=!!e["aria-invalid"]&&e["aria-invalid"]!=="false",f=Pt({...e,values:{isHovered:i,isFocused:s,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:c},defaultClassName:"react-aria-Input"});return H.createElement(at.input,{...we(VI(e),u,r),...f,ref:n,"data-focused":s||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 UI(t,e){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:u="aria"}=t,[c,f]=Vs(t.value,t.defaultValue||"",t.onChange),{focusableProps:h}=Jp(t,e),m=BI({...t,value:c}),{isInvalid:g,validationErrors:b,validationDetails:v}=m.displayValidation,{labelProps:C,fieldProps:E,descriptionProps:D,errorMessageProps:T}=PI({...t,isInvalid:g,errorMessage:t.errorMessage||b}),$=Je(t,{labelable:!0});const A={type:a,pattern:t.pattern};let[B]=k.useState(c);return OI(e,t.defaultValue??B,f),LI(t,m,e),{labelProps:C,inputProps:we($,n==="input"?A:void 0,{disabled:r,readOnly:s,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:P=>f(de(P).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:T,isInvalid:g,validationErrors:b,validationDetails:v}}const rm=k.createContext({}),Nw=k.createContext(null),Pw=k.forwardRef(function(e,n){let{render:r}=k.useContext(Nw);return H.createElement(H.Fragment,null,r(e,n))});function qI(t,e){let n=t?.renderDropIndicator,r=t?.isVirtualDragging?.(),i=k.useCallback(s=>{if(r||e?.isDropTarget(s))return n?n(s):H.createElement(Pw,{target:s})},[e?.target,r,n]);return t?.useDropIndicator?i:void 0}function GI(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 s=n.collection.getKeyAfter(i),a=null;if(s!=null){let u=n.collection.getItem(i)?.level??0;for(;s!=null;){let c=n.collection.getItem(s);if(!c)break;if(c.type!=="item"){s=n.collection.getKeyAfter(s);continue}if((c.level??0)<=u)break;a=s,s=n.collection.getKeyAfter(s)}}i=s??a??i}return k.useMemo(()=>new Set([r,i].filter(s=>s!=null)),[r,i])}const Ow=k.createContext({}),WI=sa(xb,function(e,n){return[e,n]=Et(e,n,Ow),H.createElement(at.header,{className:"react-aria-Header",...e,ref:n},e.children)}),QI=k.createContext(null);function l3(t){let e=k.useRef({});return H.createElement(QI.Provider,{value:e},t.children)}const u3=k.createContext({isSelected:!1});function YI(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 Lw=k.createContext({}),F1=class F1 extends ia{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}};F1.type="separator";let Mb=F1;const XI=sa(Mb,function(e,n){[e,n]=Et(e,n,Lw);let{elementType:r,orientation:i,style:s,className:a,slot:u,...c}=e,f=r||"hr";f==="hr"&&i==="vertical"&&(f="div");let h=at[f],{separatorProps:m}=YI({...c,elementType:r,orientation:i}),g=Je(e,{global:!0});return H.createElement(h,{render:e.render,...we(g,m),style:s,className:a??"react-aria-Separator",ref:n,slot:u||void 0})});class JI{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 s=n.shadowRoot;if(s){const a=this._doc.createTreeWalker(s,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 s=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),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 s=this.lastChild();return s&&(this.currentNode=s),s}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 zw(t,e,n,r){return xi()?new JI(t,e,n,r):t.createTreeWalker(e,n,r)}const J2=H.createContext(null),Rb="react-aria-focus-scope-restore";let st=null;function c3(t){let{children:e,contain:n,restoreFocus:r,autoFocus:i}=t,s=k.useRef(null),a=k.useRef(null),u=k.useRef([]),{parentNode:c}=k.useContext(J2)||{},f=k.useMemo(()=>new Pb({scopeRef:u}),[u]);Le(()=>{let g=c||wt.root;if(wt.getTreeNode(g.scopeRef)&&st&&!zh(st,g.scopeRef)){let b=wt.getTreeNode(st);b&&(g=b)}g.addChild(f),wt.addNode(f)},[f,c]),Le(()=>{let g=wt.getTreeNode(u);g&&(g.contain=!!n)},[n]),Le(()=>{let g=s.current?.nextSibling,b=[],v=C=>C.stopPropagation();for(;g&&g!==a.current;)b.push(g),g.addEventListener(Rb,v),g=g.nextSibling;return u.current=b,()=>{for(let C of b)C.removeEventListener(Rb,v)}},[e]),sF(u,r,n),nF(u,n),oF(u,r,n),iF(u,i),k.useEffect(()=>{const g=_e(ze(u.current?u.current[0]:void 0));let b=null;if(pr(g,u.current)){for(let v of wt.traverse())v.scopeRef&&pr(g,v.scopeRef.current)&&(b=v);b===wt.getTreeNode(u)&&(st=b.scopeRef)}},[u]),Le(()=>()=>{let g=wt.getTreeNode(u)?.parent?.scopeRef??null;(u===st||zh(u,st))&&(!g||wt.getTreeNode(g))&&(st=g),wt.removeTreeNode(u)},[u]);let h=k.useMemo(()=>ZI(u),[]),m=k.useMemo(()=>({focusManager:h,parentNode:f}),[f,h]);return H.createElement(J2.Provider,{value:m},H.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),e,H.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function ZI(t){return{focusNext(e={}){let n=t.current,{from:r,tabbable:i,wrap:s,accept:a}=e,u=r||_e(ze(n[0]??void 0)),c=n[0].previousElementSibling,f=Ro(n),h=un(f,{tabbable:i,accept:a},n);h.currentNode=pr(u,n)?u:c;let m=h.nextNode();return!m&&s&&(h.currentNode=c,m=h.nextNode()),m&&On(m,!0),m},focusPrevious(e={}){let n=t.current,{from:r,tabbable:i,wrap:s,accept:a}=e,u=r||_e(ze(n[0]??void 0)),c=n[n.length-1].nextElementSibling,f=Ro(n),h=un(f,{tabbable:i,accept:a},n);h.currentNode=pr(u,n)?u:c;let m=h.previousNode();return!m&&s&&(h.currentNode=c,m=h.previousNode()),m&&On(m,!0),m},focusFirst(e={}){let n=t.current,{tabbable:r,accept:i}=e,s=Ro(n),a=un(s,{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,s=Ro(n),a=un(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let u=a.previousNode();return u&&On(u,!0),u}}}function Ro(t){return t[0].parentElement}function qu(t){let e=wt.getTreeNode(st);for(;e&&e.scopeRef!==t;){if(e.contain)return!1;e=e.parent}return!0}function eF(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=dn(t);return e instanceof n.RadioNodeList?Array.from(e).filter(r=>r instanceof n.HTMLInputElement):e instanceof n.HTMLInputElement?[e]:[]}function tF(t){if(t.checked)return!0;const e=eF(t);return e.length>0&&!e.some(n=>n.checked)}function nF(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 s=ze(i?i[0]:void 0);let a=f=>{if(f.key!=="Tab"||f.altKey||f.ctrlKey||f.metaKey||!qu(t)||f.isComposing)return;let h=_e(s),m=t.current;if(!m||!pr(h,m))return;let g=Ro(m),b=un(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 dn(v).HTMLInputElement&&v.select())},u=f=>{(!st||zh(st,t))&&pr(de(f),t.current)?(st=t,n.current=de(f)):qu(t)&&!Cs(de(f),t)?n.current?n.current.focus():st&&st.current&&Nb(st.current):qu(t)&&(n.current=de(f))},c=f=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let h=Xo(),m=(h==="virtual"||h===null)&&Gp()&&PS(),g=_e(s);if(!m&&g&&qu(t)&&!Cs(g,t)){st=t;let b=de(f);b&&b.isConnected?(n.current=b,n.current?.focus()):st.current&&Nb(st.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",u,!1),i?.forEach(f=>f.addEventListener("focusin",u,!1)),i?.forEach(f=>f.addEventListener("focusout",c,!1)),()=>{s.removeEventListener("keydown",a,!1),s.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 Iw(t){return Cs(t)}function pr(t,e){return!t||!e?!1:e.some(n=>$e(n,t))}function Cs(t,e=null){if(t instanceof Element&&t.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of wt.traverse(wt.getTreeNode(e)))if(n&&pr(t,n.current))return!0;return!1}function rF(t){return Cs(t,st)}function zh(t,e){let n=wt.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{gn(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Fw(t,e=!0){let n=t[0].previousElementSibling,r=Ro(t),i=un(r,{tabbable:e},t);i.currentNode=n;let s=i.nextNode();return e&&!s&&(r=Ro(t),i=un(r,{tabbable:!1},t),i.currentNode=n,s=i.nextNode()),s}function Nb(t,e=!0){On(Fw(t,e))}function iF(t,e){const n=H.useRef(e);k.useEffect(()=>{if(n.current){st=t;const r=ze(t.current?t.current[0]:void 0);!pr(_e(r),st.current)&&t.current&&Nb(t.current)}n.current=!1},[t])}function sF(t,e,n){Le(()=>{if(e||n)return;let r=t.current;const i=ze(r?r[0]:void 0);let s=a=>{let u=de(a);pr(u,t.current)?st=t:Iw(u)||(st=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[t,e,n])}function Z2(t){let e=wt.getTreeNode(st);for(;e&&e.scopeRef!==t;){if(e.nodeToRestore)return!1;e=e.parent}return e?.scopeRef===t}function oF(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 s=ze(i?i[0]:void 0);if(!e||n)return;let a=()=>{(!st||zh(st,t))&&pr(_e(s),t.current)&&(st=t)};return s.addEventListener("focusin",a,!1),i?.forEach(u=>u.addEventListener("focusin",a,!1)),()=>{s.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 s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!qu(t)||a.isComposing)return;let u=i.activeElement;if(!Cs(u,t)||!Z2(t))return;let c=wt.getTreeNode(t);if(!c)return;let f=c.nodeToRestore,h=un(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||!Cs(m,t))&&f){h.currentNode=f;do m=a.shiftKey?h.previousNode():h.nextNode();while(Cs(m,t));a.preventDefault(),a.stopPropagation(),m?On(m,!0):Iw(f)?On(f,!0):u.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[t,e,n]),Le(()=>{const i=ze(t.current?t.current[0]:void 0);if(!e)return;let s=wt.getTreeNode(t);if(s)return s.nodeToRestore=r.current??void 0,()=>{let a=wt.getTreeNode(t);if(!a)return;let u=a.nodeToRestore,c=_e(i);if(e&&u&&(c&&Cs(c,t)||c===i.body&&Z2(t))){let f=wt.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let h=f.getTreeNode(t);for(;h;){if(h.nodeToRestore&&h.nodeToRestore.isConnected){e5(h.nodeToRestore);return}h=h.parent}for(h=f.getTreeNode(t);h;){if(h.scopeRef&&h.scopeRef.current&&wt.getTreeNode(h.scopeRef)){let m=Fw(h.scopeRef.current,!0);e5(m);return}h=h.parent}}})}}},[t,e])}function e5(t){t.dispatchEvent(new CustomEvent(Rb,{bubbles:!0,cancelable:!0}))&&On(t)}function un(t,e,n){let r=e?.tabbable?Bh:BS,i=t?.nodeType===Node.ELEMENT_NODE?t:null,s=ze(i),a=zw(s,t||s,NodeFilter.SHOW_ELEMENT,{acceptNode(u){return $e(e?.from,u)||e?.tabbable&&u.tagName==="INPUT"&&u.getAttribute("type")==="radio"&&(!tF(u)||a.currentNode.tagName==="INPUT"&&a.currentNode.type==="radio"&&a.currentNode.name===u.name)?NodeFilter.FILTER_REJECT:r(u)&&(!n||pr(u,n))&&(!e?.accept||e.accept(u))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(a.currentNode=e.from),a}function aF(t,e={}){return{focusNext(n={}){let r=t.current;if(!r)return null;let{from:i,tabbable:s=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(ze(r)),f=un(r,{tabbable:s,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:s=e.tabbable,wrap:a=e.wrap,accept:u=e.accept}=n,c=i||_e(ze(r)),f=un(r,{tabbable:s,accept:u});if($e(r,c))f.currentNode=c;else{let m=c0(f);return m&&On(m,!0),m??null}let h=f.previousNode();if(!h&&a){f.currentNode=r;let m=c0(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:s=e.accept}=n,u=un(r,{tabbable:i,accept:s}).nextNode();return u&&On(u,!0),u},focusLast(n=e){let r=t.current;if(!r)return null;let{tabbable:i=e.tabbable,accept:s=e.accept}=n,a=un(r,{tabbable:i,accept:s}),u=c0(a);return u&&On(u,!0),u??null}}}function c0(t){let e,n;do n=t.lastChild(),n&&(e=n);while(n);return e}class d3{constructor(){this.fastMap=new Map,this.root=new Pb({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 s=new Pb({scopeRef:e});i.addChild(s),s.parent=i,this.fastMap.set(e,s),r&&(s.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 s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&pr(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),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 d3;for(let n of this.traverse())e.addTreeNode(n.scopeRef,n.parent?.scopeRef??null,n.nodeToRestore);return e}}class Pb{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 wt=new d3;function Ob(t){return oz()?t.altKey:t.ctrlKey}function Ho(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 Kw=new WeakMap;function lF(t){let e=rn();return Kw.set(t,e),e}function uF(t){return Kw.get(t)}const t5=1e3;function cF(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=k.useRef({search:"",timeout:void 0}),s=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=""},t5)}},a=u=>{let c=dF(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=""},t5)}};return k.useEffect(()=>{let u=i.current.timeout;return()=>{clearTimeout(u)}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?s:void 0,onKeyDown:e.getKeyForSearch?a:void 0}}}function dF(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function n5(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,s)=>!Object.is(i,r[s])))&&t(),r.current=e},e)}function fF(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!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}=Ri(),D=Bl(),T=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current||!$e(r.current,de(O)))return;const K=(Y,Z)=>{if(Y!=null){if(e.isLink(Y)&&v==="selection"&&f&&!Ob(O)){Tl.flushSync(()=>{e.setFocusedKey(Y,Z)});let j=Ho(r,Y),L=e.getItemProps(Y);j&&D.open(j,O,L.href,L.routerOptions);return}if(e.setFocusedKey(Y,Z),e.isLink(Y)&&v==="override")return;O.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(Y):f&&!Ob(O)&&e.replaceSelection(Y)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){let Y=e.focusedKey!=null?n.getKeyBelow?.(e.focusedKey):n.getFirstKey?.();Y==null&&s&&(Y=n.getFirstKey?.(e.focusedKey)),Y!=null&&(O.preventDefault(),K(Y))}break;case"ArrowUp":if(n.getKeyAbove){let Y=e.focusedKey!=null?n.getKeyAbove?.(e.focusedKey):n.getLastKey?.();Y==null&&s&&(Y=n.getLastKey?.(e.focusedKey)),Y!=null&&(O.preventDefault(),K(Y))}break;case"ArrowLeft":if(n.getKeyLeftOf){let Y=e.focusedKey!=null?n.getKeyLeftOf?.(e.focusedKey):n.getFirstKey?.();Y==null&&s&&(Y=E==="rtl"?n.getFirstKey?.(e.focusedKey):n.getLastKey?.(e.focusedKey)),Y!=null&&(O.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&&s&&(Y=E==="rtl"?n.getLastKey?.(e.focusedKey):n.getFirstKey?.(e.focusedKey)),Y!=null&&(O.preventDefault(),K(Y,E==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(e.focusedKey===null&&O.shiftKey)return;O.preventDefault();let Y=n.getFirstKey(e.focusedKey,Do(O));e.setFocusedKey(Y),Y!=null&&(Do(O)&&O.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(Y):f&&e.replaceSelection(Y))}break;case"End":if(n.getLastKey){if(e.focusedKey===null&&O.shiftKey)return;O.preventDefault();let Y=n.getLastKey(e.focusedKey,Do(O));e.setFocusedKey(Y),Y!=null&&(Do(O)&&O.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&&(O.preventDefault(),K(Y))}break;case"PageUp":if(n.getKeyPageAbove&&e.focusedKey!=null){let Y=n.getKeyPageAbove(e.focusedKey);Y!=null&&(O.preventDefault(),K(Y))}break;case"a":Do(O)&&e.selectionMode==="multiple"&&u!==!0&&(O.preventDefault(),e.selectAll());break;case"Escape":c==="clearSelection"&&!a&&e.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),e.clearSelection());break;case"Tab":if(!g){if(O.shiftKey)r.current.focus();else{let Y=un(r.current,{tabbable:!0}),Z,j;do j=Y.lastChild(),j&&(Z=j);while(j);let L=_e();Z&&(!bl(Z)||L&&!Bh(L))&&Ar(Z)}break}}},$=k.useRef({top:0,left:0});Vu(b,"scroll",()=>{$.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let A=O=>{if(e.isFocused){$e(O.currentTarget,de(O))||e.setFocused(!1);return}if(!$e(O.currentTarget,de(O)))return;let K=Xo();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=O.relatedTarget;Z&&O.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=Ho(r,e.focusedKey);Z instanceof HTMLElement&&(!bl(Z)&&!m&&Ar(Z),(K==="keyboard"||C&&K==="virtual")&&fs(Z,{containingElement:r.current}))}},B=O=>{$e(O.currentTarget,O.relatedTarget)||e.setFocused(!1)},P=k.useRef(!1);Vu(r,gb,m?O=>{let{detail:K}=O;O.stopPropagation(),e.setFocused(!0),K?.focusStrategy==="first"&&(P.current=!0)}:void 0);let R=n.getFirstKey?.()??null;n5(()=>{if(P.current)if(R==null){let O=_e();qy(r.current),Ah(O,null),e.collection.size>0&&(P.current=!1)}else e.setFocusedKey(R),P.current=!1},[R,e.collection.size]),n5(()=>{e.collection.size>0&&(P.current=!1)},[e.focusedKey]),Vu(r,TS,m?O=>{O.stopPropagation(),e.setFocused(!1),O.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const M=k.useRef(i),I=k.useRef(!1);k.useEffect(()=>{if(M.current){let O=null;i==="first"&&(O=n.getFirstKey?.()??null),i==="last"&&(O=n.getLastKey?.()??null);let K=e.selectedKeys;if(K.size){for(let Y of K)if(e.canSelectItem(Y)){O=Y;break}}e.setFocused(!0),e.setFocusedKey(O),O==null&&!m&&r.current&&gn(r.current),e.collection.size>0&&(M.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 O=Xo(),K=Ho(r,e.focusedKey);if(!(K instanceof HTMLElement))return;(O==="keyboard"||I.current)&&(J.current&&cancelAnimationFrame(J.current),J.current=requestAnimationFrame(()=>{b.current&&(fh(b.current,K),O!=="virtual"&&fs(K,{containingElement:r.current}))}))}!m&&e.isFocused&&e.focusedKey==null&&G.current!=null&&r.current&&gn(r.current),G.current=e.focusedKey,I.current=!1}),k.useEffect(()=>()=>{J.current&&cancelAnimationFrame(J.current)},[]),Vu(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),e.setFocused(!0)});let U={onKeyDown:T,onFocus:A,onBlur:B,onMouseDown(O){b.current===de(O)&&O.preventDefault()}},{typeSelectProps:ie}=cF({keyboardDelegate:n,selectionManager:e});h||(U=we(ie,U));let F;m||(F=e.focusedKey==null?0:-1);let te=lF(e.collection);return{collectionProps:we(U,{tabIndex:F,"data-collection":te})}}class r5{constructor(e){this.ref=e}getItemRect(e){let n=this.ref.current;if(!n)return null;let r=e!=null?Ho(this.ref,e):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left-n.clientLeft+n.scrollLeft,y:s.top-i.top-n.clientTop+n.scrollTop,width:s.width,height:s.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 _w{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 r5(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 r5(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 s=this.collection.getItem(i);if(s?.type==="item"&&(r||!this.isDisabled(s)))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,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&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=Ho(this.ref,e);if(n!=null){let s=Ho(this.ref,n);return!r||!s?!1:r.getBoundingClientRect().top>s.getBoundingClientRect().top}let i=this.getPreviousKey(e);if(i!=null){let s=Ho(this.ref,i);return!r||!s?!1:s.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&&!Ps(n))return this.getFirstKey();let s=e;if(this.orientation==="horizontal"){let a=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>a&&s!=null;)s=this.getKeyAbove(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}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&&s!=null;)s=this.getKeyAbove(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}return s??(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&&!Ps(n))return this.getLastKey();let s=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&&s!=null;)s=this.getKeyBelow(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}else{let a=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<a&&s!=null;)s=this.getKeyBelow(s),r=s==null?null:this.layoutDelegate.getItemRect(s)}return s??(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 s=r.getItem(i);if(!s)return null;let a=s.textValue.slice(0,e.length);if(s.textValue&&this.collator.compare(a,e)===0)return i;i=this.getNextKey(i)}return null}}let d0=new Map;function f3(t){let{locale:e}=Ri(),n=e+(t?Object.entries(t).sort((i,s)=>i[0]<s[0]?-1:1).join():"");if(d0.has(n))return d0.get(n);let r=new Intl.Collator(e,t);return d0.set(n,r),r}function jw(t){let{selectionManager:e,collection:n,disabledKeys:r,ref:i,keyboardDelegate:s,layoutDelegate:a,orientation:u}=t,c=f3({usage:"search",sensitivity:"base"}),f=e.disabledBehavior,h=k.useMemo(()=>s||new _w({collection:n,disabledKeys:r,disabledBehavior:f,ref:i,collator:c,layoutDelegate:a,orientation:u}),[s,a,n,r,i,c,f,u]),{collectionProps:m}=fF({...t,ref:i,selectionManager:e,keyboardDelegate:h});return{listProps:m}}const hF=500;function Hw(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:s=hF,accessibilityDescription:a}=t;const u=k.useRef(void 0);let{addGlobalListener:c,removeGlobalListener:f}=Wc(),{pressProps:h}=Qc({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&&Ar(g.target),i&&i({...g,type:"longpress"}),u.current=void 0},s),g.pointerType==="touch")){let b=C=>{C.preventDefault()},v=dn(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=Yc(i&&!e?a:void 0);return{longPressProps:we(h,m)}}function Vw(t){let{id:e,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:s,shouldUseVirtualFocus:a,focus:u,isDisabled:c,onAction:f,allowsDifferentPressOrigin:h,linkBehavior:m="action"}=t,g=Bl();e=rn(e);let b=j=>{if(j.pointerType==="keyboard"&&Ob(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&&(Do(j)||j.pointerType==="touch"||j.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};k.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(a?qy(i.current):u?u():_e()!==i.current&&i.current&&gn(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",T=!c&&n.canSelectItem(r)&&!C&&!E,$=(f||D)&&!c,A=$&&(n.selectionBehavior==="replace"?!T:!T||n.isEmpty),B=$&&T&&n.selectionBehavior==="replace",P=A||B,R=k.useRef(null),M=P&&T,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(s?(ie.onPressStart=j=>{R.current=j.pointerType,I.current=M,j.pointerType==="keyboard"&&(!P||s5(j.key))&&b(j)},h?(ie.onPressUp=A?void 0:j=>{j.pointerType==="mouse"&&T&&b(j)},ie.onPress=A?U:j=>{j.pointerType!=="keyboard"&&j.pointerType!=="mouse"&&T&&b(j)}):ie.onPress=j=>{if(A||B&&j.pointerType!=="mouse"){if(j.pointerType==="keyboard"&&!i5(j.key))return;U(j)}else j.pointerType!=="keyboard"&&T&&b(j)}):(ie.onPressStart=j=>{R.current=j.pointerType,I.current=M,G.current=A,T&&(j.pointerType==="mouse"&&!A||j.pointerType==="keyboard"&&(!$||s5(j.key)))&&b(j)},ie.onPress=j=>{(j.pointerType==="touch"||j.pointerType==="pen"||j.pointerType==="virtual"||j.pointerType==="keyboard"&&P&&i5(j.key)||j.pointerType==="mouse"&&G.current)&&(P?U(j):T&&b(j))}),v["data-collection"]=uF(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]=_s(ie[j],J[j]));let{pressProps:F,isPressed:te}=Qc(ie),O=B?j=>{R.current==="mouse"&&(j.stopPropagation(),j.preventDefault(),U(j))}:void 0,{longPressProps:K}=Hw({isDisabled:!M,onLongPress(j){j.pointerType==="touch"&&(b(j),n.setSelectionBehavior("toggle"))}}),Y=j=>{R.current==="touch"&&I.current&&j.preventDefault()},Z=m!=="none"&&n.isLink(r)?j=>{qr.isOpening||j.preventDefault()}:void 0;return{itemProps:we(v,T||A||a&&!c?F:{},M?K:{},{onDoubleClick:O,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:T,hasAction:P}}function i5(t){return t==="Enter"}function s5(t){return t===" "}function Uw(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function pF(t){return mF(t)}function mF(t,e){for(let n of t)return n}function f0(t,e,n){if(e.parentKey===n.parentKey)return e.index-n.index;let r=[...o5(t,e),e],i=[...o5(t,n),n],s=r.slice(0,i.length).findIndex((a,u)=>a!==i[u]);return s!==-1?(e=r[s],n=i[s],e.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===e)>=0,-1)}function o5(t,e){let n=[],r=e;for(;r?.parentKey!=null;)r=t.getItem(r.parentKey),r&&n.unshift(r);return n}const a5=new WeakMap;function gF(t){let e=a5.get(t);if(e!=null)return e;let n=0,r=i=>{for(let s of i)s.type==="section"?r(Uw(s,t)):s.type==="item"&&n++};return r(t),a5.set(t,n),n}function qw(t){const e=k.version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}class l5{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,s=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")&&s++,r=u,r.nextKey=void 0;this._size=s,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 Er extends Set{constructor(e,n,r){super(e),e instanceof Er?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function bF(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function h3(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="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(()=>u5(t.selectedKeys),[t.selectedKeys]),g=k.useMemo(()=>u5(t.defaultSelectedKeys,new Er),[t.defaultSelectedKeys]),[b,v]=Vs(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 T=k.useRef(i);return k.useEffect(()=>{i!==T.current&&(D(i),T.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($,A="first"){c.current=$,f.current=A,h($)},selectedKeys:b,setSelectedKeys($){(r||!bF($,b))&&v($)},disabledKeys:C,disabledBehavior:s}}function u5(t,e){return t?t==="all"?"all":new Er(t):e}class Xc{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&&f0(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&&f0(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 Er([n],n,n);else{let i=this.state.selectedKeys,s=i.anchorKey??n;r=new Er(i,s,n);for(let a of this.getKeyRange(s,i.currentKey??n))r.delete(a);for(let a of this.getKeyRange(n,s))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?f0(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 s=this.collection.getItem(i);if(s&&(s.type==="item"||s.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 Er(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 Er([n],n,n):new Er;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Er;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 s=e.getItem(i);s?.type==="item"&&n.push(i),s?.hasChildNodes&&(this.allowsCellSelection||s.type!=="item")&&r(pF(Uw(s,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 Er)}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 Xc(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class yF{build(e,n){return this.context=n,c5(()=>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 s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];H.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let u=this.getFullNode({element:a,index:s},{});for(let c of u)s++,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 s=n.value;if(s!=null){let a=s.key??s.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 s=e.element;if(!s&&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}s=n.renderer(e.value)}if(H.isValidElement(s)){let c=s.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let g=s.type;throw new Error(`Unknown element <${g}> in collection.`)}let f=c.getCollectionNode(s.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(s,e,n,r));let C=[...this.getFullNode({...g,key:b,index:h,wrapper:vF(e.wrapper,g.wrapper)},this.getChildState(n,g),r?`${r}${s.key}`:s.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 <${h0(E.type)}> in <${h0(i?.type??"unknown parent type")}>. Only <${h0(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:c5(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 c5(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 vF(t,e){if(t&&e)return n=>t(e(n));if(t)return t;if(e)return e}function h0(t){return t[0].toUpperCase()+t.slice(1)}function Gw(t,e,n){let r=k.useMemo(()=>new yF,[]),{children:i,items:s,collection:a}=t;return k.useMemo(()=>{if(a)return a;let c=r.build({children:i,items:s},n);return e(c)},[r,i,s,a,n,e])}function xF(t){let{filter:e,layoutDelegate:n}=t,r=h3(t),i=k.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),s=k.useCallback(f=>e?new l5(e(f)):new l5(f),[e]),a=k.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=Gw(t,s,a),c=k.useMemo(()=>new Xc(u,r,{layoutDelegate:n}),[u,r,n]);return Ww(u,c),{collection:u,disabledKeys:i,selectionManager:c}}function CF(t,e){let n=k.useMemo(()=>e?t.collection.filter(e):t.collection,[t.collection,e]),r=t.selectionManager.withCollection(n);return Ww(n,r),{collection:n,selectionManager:r,disabledKeys:t.disabledKeys}}function Ww(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 s=t.getItem(r);if(s&&s.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 s=t.getItem(r);if(s&&s.type==="item"&&!e.isDisabled(r)){i=r;break}r=n.current.getKeyBefore(r)}e.setFocusedKey(i)}n.current=t},[t,e])}function Qw(t,e){let{collection:n,onLoadMore:r,scrollOffset:i=1}=t,s=k.useRef(null),a=Bt(u=>{for(let c of u)c.isIntersecting&&r&&r()});Le(()=>(e.current&&(s.current=new IntersectionObserver(a,{root:Vr(e?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),s.current.observe(e.current)),()=>{s.current&&s.current.disconnect()}),[n,e,i])}const Bc=k.createContext(null);sa(Ph,function(e,n,r){let i=k.useContext(Bc),{isLoading:s,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]);Qw(h,f);let m=Pt({...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:qw(!0)},H.createElement("div",{"data-testid":"loadMoreSentinel",ref:f,style:{position:"absolute",height:1,width:1}})),s&&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 EF=k.createContext({placement:"bottom"}),DF=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function d5(t){return t.dataset.liveAnnouncer==="true"||t.dataset.reactAriaTopLayer!==void 0}let Pu=new WeakMap,Mn=[];function p3(t,e){let n=dn(t?.[0]),r=e instanceof n.Element?{root:e}:e,i=r?.root??document.body,s=r?.shouldUseInert&&DF,a=new Set(t),u=new Set,c=E=>s&&E instanceof n.HTMLElement?E.inert:E.getAttribute("aria-hidden")==="true",f=(E,D)=>{s&&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 T=D.getRootNode();"shadowRoot"in T&&h.add(T.shadowRoot),D=T.parentNode}}let m=E=>{for(let A of E.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))a.add(A);let D=A=>{if(u.has(A)||a.has(A)||A.parentElement&&u.has(A.parentElement)&&A.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let B of a)if($e(A,B))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},T=zw(ze(E),E,NodeFilter.SHOW_ELEMENT,{acceptNode:D}),$=D(E);if($===NodeFilter.FILTER_ACCEPT&&g(E),$!==NodeFilter.FILTER_REJECT){let A=T.nextNode();for(;A!=null;)g(A),A=T.nextNode()}},g=E=>{let D=Pu.get(E)??0;c(E)&&D===0||(D===0&&f(E,!0),u.add(E),Pu.set(E,D+1))};Mn.length&&Mn[Mn.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(T=>$e(T,D.target)))for(let T of D.addedNodes)(T instanceof HTMLElement||T instanceof SVGElement)&&d5(T)?a.add(T):T instanceof Element&&m(T);if(xi()){for(let T of h)if(!T.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(T=>{for(let $ of T)if($.type==="childList"){if($.target.isConnected&&![...a,...u].some(A=>$e(A,$.target)))for(let A of $.addedNodes)(A instanceof HTMLElement||A instanceof SVGElement)&&d5(A)?a.add(A):A instanceof Element&&m(A);if(xi()){for(let A of h)if(!A.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 Mn.push(C),()=>{if(b.disconnect(),xi())for(let E of v)E.disconnect();for(let E of u){let D=Pu.get(E);D!=null&&(D===1?(f(E,!1),Pu.delete(E)):Pu.set(E,D-1))}C===Mn[Mn.length-1]?(Mn.pop(),Mn.length&&Mn[Mn.length-1].observe()):Mn.splice(Mn.indexOf(C),1)}}function kF(t){let e=Mn[Mn.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const cr={top:"top",bottom:"top",left:"left",right:"left"},Ih={top:"bottom",bottom:"top",left:"right",right:"left"},SF={top:"left",left:"top"},Lb={top:"height",left:"width"},Yw={width:"totalWidth",height:"totalHeight"},Pf={};let $F=()=>typeof document<"u"?window.visualViewport:null;function f5(t,e){let n=0,r=0,i=0,s=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,s=h.clientHeight,n=e?.width??i,r=e?.height??s,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}=Mc(t,!1)),c.top=t.scrollTop,c.left=t.scrollLeft,i=n,s=r;return Jy()&&(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:s,scroll:c,top:a,left:u}}function wF(t){return{top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}}function h5(t,e,n,r,i,s,a){let u=i.scroll[t]??0,c=r[Lb[t]],f=a[t]+r.scroll[cr[t]]+s,h=a[t]+r.scroll[cr[t]]+c-s,m=e-u+r.scroll[cr[t]]+a[t]-r[cr[t]],g=e-u+n+r.scroll[cr[t]]+a[t]-r[cr[t]];return m<f?f-m:g>h?Math.max(h-g,f-m):0}function TF(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 p5(t){if(Pf[t])return Pf[t];let[e,n]=t.split(" "),r=cr[e]||"right",i=SF[r];cr[n]||(n="center");let s=Lb[r],a=Lb[i];return Pf[t]={placement:e,crossPlacement:n,axis:r,crossAxis:i,size:s,crossSize:a},Pf[t]}function p0(t,e,n,r,i,s,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]+=s;const T=t[v]-n[E]+c+f,$=t[v]+t[E]-c-f;if(D[v]=Ab(D[v],T,$),m===b){let A=u?h[C]:h[Yw[C]];D[Ih[b]]=Math.floor(A-t[b]+i)}else D[b]=Math.floor(t[b]+t[C]+i);return D}function AF(t,e,n,r,i,s,a,u,c,f,h){let m=(t.top!=null?t.top:c[Yw.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)+s)):Math.max(0,m+a-b.top-((i.top??0)+(i.bottom??0)+s))}function m5(t,e,n,r,i,s,a,u){let{placement:c,axis:f,size:h}=s;return c===f?Math.max(0,n[f]-(a.scroll[f]??0)-(t[f]+(u?e[f]:0))-(r[f]??0)-r[Ih[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[Ih[f]]-i)}function BF(t,e,n,r,i,s,a,u,c,f,h,m,g,b,v,C,E,D){let T=p5(t),{size:$,crossAxis:A,crossSize:B,placement:P,crossPlacement:R}=T,M=p0(e,u,n,T,h,m,f,g,v,C,c),I=h,G=m5(u,f,e,i,s+h,T,c,E);if(a&&n[$]>G){let ue=p5(`${Ih[P]} ${R}`),fe=p0(e,u,n,ue,h,m,f,g,v,C,c);m5(u,f,e,i,s+h,ue,c,E)>G&&(T=ue,M=fe,I=h)}let J="bottom";T.axis==="top"?T.placement==="top"?J="top":T.placement==="bottom"&&(J="bottom"):T.crossAxis==="top"&&(T.crossPlacement==="top"?J="bottom":T.crossPlacement==="bottom"&&(J="top"));let U=h5(A,M[A],n[B],u,c,s,f);M[A]+=U;let ie=AF(M,u,f,g,i,s,n.height,J,c,E,D);b&&b<ie&&(ie=b),n.height=Math.min(n.height,ie),M=p0(e,u,n,T,I,m,f,g,v,C,c),U=h5(A,M[A],n[B],u,c,s,f),M[A]+=U;let F={},te=e[A]-M[A]-i[cr[A]],O=te+.5*e[B];const K=v/2+C,Y=cr[A]==="left"?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),Z=n[B]-Y-v/2-C,j=e[A]+v/2-(M[A]+i[cr[A]]),L=e[A]+e[B]-v/2-(M[A]+i[cr[A]]),V=Ab(O,j,L);F[A]=Ab(V,K,Z),{placement:P,crossPlacement:R}=T,v?te=F[A]:R==="right"?te+=e[B]:R==="center"&&(te+=e[B]/2);let ne=P==="left"||P==="top"?n[$]:0,le={x:P==="top"||P==="bottom"?te:ne,y:P==="left"||P==="right"?te:ne};return{position:M,maxHeight:ie,arrowOffsetLeft:F.left,arrowOffsetTop:F.top,placement:P,triggerAnchorPoint:le}}function MF(t){let{placement:e,targetNode:n,overlayNode:r,scrollNode:i,padding:s,shouldFlip:a,boundaryElement:u,offset:c,crossOffset:f,maxHeight:h,arrowSize:m=0,arrowBoundaryOffset:g=0,targetRect:b}=t,v=$F(),C=r instanceof HTMLElement?RF(r):document.documentElement,E=C===document.documentElement;const D=window.getComputedStyle(C).position;let T=!!D&&D!=="static",$=E?Mc(n,!1,b):g5(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 A=Mc(r,!0),B=TF(r);A.width+=(B.left??0)+(B.right??0),A.height+=(B.top??0)+(B.bottom??0);let P=wF(i),R=f5(u,v),M=f5(C,v),I;if((u.tagName==="BODY"||u.tagName==="HTML")&&!E){let J=im(C,!1);I={top:-(J.top-R.top),left:-(J.left-R.left),width:0,height:0}}else(u.tagName==="BODY"||u.tagName==="HTML")&&E?I={top:0,left:0,width:0,height:0}:I=g5(u,C,!1);let G=$e(u,C);return BF(e,$,A,P,B,s,a,R,M,I,c,f,T,h,m,g,G,v)}function im(t,e){let{top:n,left:r,width:i,height:s}=t.getBoundingClientRect();return e&&t instanceof t.ownerDocument.defaultView.HTMLElement&&(i=t.offsetWidth,s=t.offsetHeight),{top:n,left:r,width:i,height:s}}function Mc(t,e,n){let{top:r,left:i,width:s,height:a}=n||im(t,e),{scrollTop:u,scrollLeft:c,clientTop:f,clientLeft:h}=document.documentElement;return{top:r+u-f,left:i+c-h,width:s,height:a}}function g5(t,e,n,r){let i=window.getComputedStyle(t),s;if(i.position==="fixed")s=r||im(t,n);else{s=Mc(t,n,r);let a=Mc(e,n),u=window.getComputedStyle(e);a.top+=(parseInt(u.borderTopWidth,10)||0)-e.scrollTop,a.left+=(parseInt(u.borderLeftWidth,10)||0)-e.scrollLeft,s.top-=a.top,s.left-=a.left}return s.top-=parseInt(i.marginTop,10)||0,s.left-=parseInt(i.marginLeft,10)||0,s}function RF(t){let e=t.offsetParent;if(e&&e===document.body&&window.getComputedStyle(e).position==="static"&&!b5(e)&&(e=document.documentElement),e==null)for(e=t.parentElement;e&&!b5(e);)e=e.parentElement;return e||document.documentElement}function b5(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 Xw=new WeakMap;function NF(t){let{triggerRef:e,isOpen:n,onClose:r}=t;k.useEffect(()=>{if(!n||r===null)return;let i=s=>{let a=de(s);if(!e.current||a instanceof Node&&!$e(a,e.current)||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement)return;let u=r||Xw.get(e.current);u&&u()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,e])}function PF(){return typeof window.ResizeObserver<"u"}function zb(t){const{ref:e,box:n,onResize:r}=t;let i=Bt(r);k.useEffect(()=>{let s=e?.current;if(s)if(PF()){const a=new window.ResizeObserver(u=>{u.length&&i()});return a.observe(s,{box:n}),()=>{s&&a.unobserve(s)}}else return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)}},[e,n])}let Co=typeof document<"u"?window.visualViewport:null;function OF(t){let{direction:e}=Ri(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:s,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:T}=t,[$,A]=k.useState(null),B=[b,u,i.current,r.current,s?.current,a.current,c,f,h,m,g,v,e,E,D,n],P=k.useRef(Co?.scale);k.useEffect(()=>{v&&(P.current=Co?.scale)},[v]);let R=k.useCallback(()=>{if(b===!1||!v||!i.current||!r.current||!h||Co?.scale!==P.current)return;let G=null;if(a.current&&bl(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=MF({placement:zF(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??(s?.current?im(s.current,!0).width:0),arrowBoundaryOffset:D,targetRect:T?.(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(),O=F[G.type]-te[G.type];a.current.scrollTop+=O-G.offset}A(U)},B);Le(R,B),LF(R),zb({ref:i,onResize:R}),zb({ref:r,onResize:R});let M=k.useRef(!1);Le(()=>{let G,J=()=>{M.current=!0,clearTimeout(G),G=setTimeout(()=>{M.current=!1},500),R()},U=()=>{M.current&&J()};return Co?.addEventListener("resize",J),Co?.addEventListener("scroll",U),()=>{Co?.removeEventListener("resize",J),Co?.removeEventListener("scroll",U)}},[R]);let I=k.useCallback(()=>{M.current||C?.()},[C,M]);return NF({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:R}}function LF(t){Le(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t])}function zF(t,e){return e==="rtl"?t.replace("start","right").replace("end","left"):t.replace("start","left").replace("end","right")}function IF(t){let{ref:e,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=t,s=k.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Bt(c=>{n&&y5(c,e)&&(i&&i(c),s.current.isPointerDown=!0)}),u=Bt(c=>{n&&n(c)});k.useEffect(()=>{let c=s.current;if(r)return;const f=e.current,h=ze(f);if(typeof PointerEvent<"u"){let m=g=>{c.isPointerDown&&y5(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 y5(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 Lr=[];function Jw(t,e){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:s=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:u}=t,c=k.useRef(void 0);k.useEffect(()=>{if(i&&!Lr.includes(e))return Lr.push(e),()=>{let v=Lr.indexOf(e);v>=0&&Lr.splice(v,1)}},[i,e]);let f=()=>{Lr[Lr.length-1]===e&&n&&n()},h=v=>{const C=Lr[Lr.length-1];c.current=C,(!u||u(de(v)))&&C===e&&v.stopPropagation()},m=v=>{(!u||u(de(v)))&&(Lr[Lr.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())};IF({ref:e,onInteractOutside:s&&i?m:void 0,onInteractOutsideStart:h});let{focusWithinProps:b}=s3({isDisabled:!r,onBlurWithin:v=>{!v.relatedTarget||rF(v.relatedTarget)||(!u||u(v.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:g,...b},underlayProps:{}}}const rc=typeof document<"u"&&window.visualViewport;let Of=0,m0;function Zw(t={}){let{isDisabled:e}=t;Le(()=>{if(!e)return Of++,Of===1&&(Ai()?m0=KF():m0=FF()),()=>{Of--,Of===0&&m0()}},[e])}function FF(){let t=window.innerWidth-document.documentElement.clientWidth;return _s(t>0&&("scrollbarGutter"in document.documentElement.style?hh(document.documentElement,"scrollbarGutter","stable"):hh(document.documentElement,"paddingRight",`${t}px`)),hh(document.documentElement,"overflow","hidden"))}function KF(){let t=hh(document.documentElement,"overflow","hidden"),e,n=!1,r=h=>{let m=de(h);e=Ps(m)?m:Vr(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"),s=K$();s&&(i.nonce=s),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&&nc(g)?(g.focus({preventScroll:!0}),v5(g,nc(m))):g||m.parentElement?.closest("[tabindex]")?.focus({preventScroll:!0})},c=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(h){let m=_e(),g=m!=null&&nc(m);c.call(this,{...h,preventScroll:!0}),(!h||!h.preventScroll)&&v5(this,g)};let f=_s(g0(document,"touchstart",r,{passive:!1,capture:!0}),g0(document,"touchmove",a,{passive:!1,capture:!0}),g0(document,"blur",u,!0));return()=>{t(),f(),i.remove(),HTMLElement.prototype.focus=c}}function hh(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function g0(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function v5(t,e){e||!rc?x5(t):rc.addEventListener("resize",()=>x5(t),{once:!0})}function x5(t){let e=document.scrollingElement||document.documentElement,n=t;for(;n&&n!==e;){let r=Vr(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect(),s=n.getBoundingClientRect();if(s.top<i.top||s.bottom>i.top+n.clientHeight){let a=i.bottom;rc&&(a=Math.min(a,rc.offsetTop+rc.height));let u=s.top-i.top-((a-i.top)/2-s.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+u)),behavior:"smooth"})}}n=r.parentElement}}function _F(t,e){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:s,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u,...c}=t,f=c.trigger==="SubmenuTrigger",{overlayProps:h,underlayProps:m}=Jw({isOpen:e.isOpen,onClose:e.close,shouldCloseOnBlur:!0,isDismissable:!s||f,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:u},i??r),{overlayProps:g,arrowProps:b,placement:v,triggerAnchorPoint:C}=OF({...c,targetRef:n,overlayRef:r,isOpen:e.isOpen,onClose:s&&!f?e.close:null});return Zw({isDisabled:s||!e.isOpen}),k.useEffect(()=>{if(e.isOpen&&r.current)return s?kF(i?.current??r.current):p3([i?.current??r.current],{shouldUseInert:!0})},[s,e.isOpen,r,i]),{popoverProps:we(h,g),arrowProps:b,underlayProps:m,placement:v,triggerAnchorPoint:C}}var e6={};e6={dismiss:"تجاهل"};var t6={};t6={dismiss:"Отхвърляне"};var n6={};n6={dismiss:"Odstranit"};var r6={};r6={dismiss:"Luk"};var i6={};i6={dismiss:"Schließen"};var s6={};s6={dismiss:"Απόρριψη"};var o6={};o6={dismiss:"Dismiss"};var a6={};a6={dismiss:"Descartar"};var l6={};l6={dismiss:"Lõpeta"};var u6={};u6={dismiss:"Hylkää"};var c6={};c6={dismiss:"Rejeter"};var d6={};d6={dismiss:"התעלם"};var f6={};f6={dismiss:"Odbaci"};var h6={};h6={dismiss:"Elutasítás"};var p6={};p6={dismiss:"Ignora"};var m6={};m6={dismiss:"閉じる"};var g6={};g6={dismiss:"무시"};var b6={};b6={dismiss:"Atmesti"};var y6={};y6={dismiss:"Nerādīt"};var v6={};v6={dismiss:"Lukk"};var x6={};x6={dismiss:"Negeren"};var C6={};C6={dismiss:"Zignoruj"};var E6={};E6={dismiss:"Descartar"};var D6={};D6={dismiss:"Dispensar"};var k6={};k6={dismiss:"Revocare"};var S6={};S6={dismiss:"Пропустить"};var $6={};$6={dismiss:"Zrušiť"};var w6={};w6={dismiss:"Opusti"};var T6={};T6={dismiss:"Odbaci"};var A6={};A6={dismiss:"Avvisa"};var B6={};B6={dismiss:"Kapat"};var M6={};M6={dismiss:"Скасувати"};var R6={};R6={dismiss:"取消"};var N6={};N6={dismiss:"關閉"};var P6={};P6={"ar-AE":e6,"bg-BG":t6,"cs-CZ":n6,"da-DK":r6,"de-DE":i6,"el-GR":s6,"en-US":o6,"es-ES":a6,"et-EE":l6,"fi-FI":u6,"fr-FR":c6,"he-IL":d6,"hr-HR":f6,"hu-HU":h6,"it-IT":p6,"ja-JP":m6,"ko-KR":g6,"lt-LT":b6,"lv-LV":y6,"nb-NO":v6,"nl-NL":x6,"pl-PL":C6,"pt-BR":E6,"pt-PT":D6,"ro-RO":k6,"ru-RU":S6,"sk-SK":$6,"sl-SI":w6,"sr-SP":T6,"sv-SE":A6,"tr-TR":B6,"uk-UA":M6,"zh-CN":R6,"zh-TW":N6};function jF(t){return t&&t.__esModule?t.default:t}function Ib(t){let{onDismiss:e,...n}=t,r=mr(jF(P6),"@react-aria/overlays"),i=e3(n,r.format("dismiss")),s=()=>{e&&e()};return H.createElement(wI,null,H.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}const O6=H.forwardRef(({children:t,...e},n)=>{let r=k.useRef(!1),i=k.useContext(Ac),s=we(i||{},{...e,register(){r.current=!0,i&&i.register()}});return s.ref=Hs(n||i?.ref),t3(i,s.ref),k.useEffect(()=>{r.current||(r.current=!0)},[]),H.createElement(Ac.Provider,{value:s},t)});function HF({children:t}){let e=k.useMemo(()=>({register:()=>{}}),[]);return H.createElement(Ac.Provider,{value:e},t)}const VF=k.createContext({});function UF(){return k.useContext(VF)??{}}const L6=H.createContext(null);function Fb(t){let e=js(),{portalContainer:n=e?null:document.body,isExiting:r}=t,[i,s]=k.useState(!1),a=k.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:u}=UF();if(!t.portalContainer&&u&&(n=u()),!n)return null;let c=t.children;return t.disableFocusManagement||(c=H.createElement(c3,{restoreFocus:!0,contain:(t.shouldContainFocus||i)&&!r},c)),c=H.createElement(L6.Provider,{value:a},H.createElement(HF,null,c)),bS.createPortal(c,n)}function z6(){let e=k.useContext(L6)?.setContain;Le(()=>{e?.(!0)},[e])}function m3(t){let[e,n]=Vs(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=k.useCallback(()=>{n(!0)},[n]),i=k.useCallback(()=>{n(!1)},[n]),s=k.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:i,toggle:s}}function g3(t,e=!0){let[n,r]=k.useState(!0),i=n&&e;return Le(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let s of t.current.getAnimations())s instanceof CSSTransition&&s.cancel()},[t,i]),I6(t,i,k.useCallback(()=>r(!1),[])),i}function Kb(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 I6(t,i,k.useCallback(()=>{r(s=>s==="exiting"?"closed":s)},[])),i}function I6(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(s=>s.finished)).then(()=>{i||Tl.flushSync(()=>{n()})}),()=>{i=!0}}},[t,e,n])}const b3=k.createContext(null),C5=k.createContext(null),y3=k.forwardRef(function(e,n){[e,n]=Et(e,n,b3);let r=k.useContext(oa),i=m3(e),s=e.isOpen!=null||e.defaultOpen!=null||!r?i:r,a=Kb(n,s.isOpen)||e.isExiting||!1,u=O$(),{direction:c}=Ri();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 s&&!s.isOpen&&!a?null:H.createElement(qF,{...e,triggerRef:e.triggerRef,state:s,popoverRef:n,isExiting:a,dir:c})});function qF({state:t,isExiting:e,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let s=k.useRef(null),a=k.useRef(null),u=k.useContext(C5),c=u&&i.trigger==="SubmenuTrigger",{popoverProps:f,underlayProps:h,arrowProps:m,placement:g,triggerAnchorPoint:b}=_F({...i,offset:i.offset??8,arrowRef:s,groupRef:c?u:a},t),v=i.popoverRef,C=g3(v,!!g)||i.isEntering||!1,E=Pt({...i,defaultClassName:"react-aria-Popover",values:{trigger:i.trigger||null,placement:g,isEntering:C,isExiting:e}}),D=!i.isNonModal||i.trigger==="SubmenuTrigger",[T,$]=k.useState(!1);Le(()=>{v.current&&$(D&&!v.current.querySelector("[role=dialog]"))},[v,D]),k.useEffect(()=>{T&&(i.trigger!=="SubmenuTrigger"||Xo()!=="pointer")&&v.current&&!bl(v.current)&&gn(v.current)},[T,v,i.trigger]);let A=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]),[B,P]=k.useState(null),R=k.useCallback(()=>{i.triggerRef.current&&P(i.triggerRef.current.getBoundingClientRect().width+"px")},[i.triggerRef]);Le(R,[R]),zb({ref:E.style?.["--trigger-width"]?void 0:i.triggerRef,onResize:R});let M={...f.style,"--trigger-anchor-point":b?`${b.x}px ${b.y}px`:void 0,...E.style,"--trigger-width":E.style?.["--trigger-width"]||B},I=H.createElement(at.div,{...we(Je(i,{global:!0}),f),...E,role:T?"dialog":void 0,tabIndex:T?-1:void 0,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],ref:v,slot:i.slot||void 0,style:M,dir:i.dir,"data-trigger":i.trigger,"data-placement":g,"data-entering":C||void 0,"data-exiting":e||void 0},!i.isNonModal&&H.createElement(Ib,{onDismiss:t.close}),H.createElement(EF.Provider,{value:{...m,placement:g,ref:s}},A),H.createElement(Ib,{onDismiss:t.close}));return c?H.createElement(Fb,{...i,shouldContainFocus:T,isExiting:e,portalContainer:n??u?.current??void 0},I):H.createElement(Fb,{...i,shouldContainFocus:T,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(C5.Provider,{value:a},I)))}const GF=k.createContext({});var F6={};F6={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var K6={};K6={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var _6={};_6={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var j6={};j6={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var H6={};H6={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var V6={};V6={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var U6={};U6={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var q6={};q6={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var G6={};G6={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var W6={};W6={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Q6={};Q6={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Y6={};Y6={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var X6={};X6={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var J6={};J6={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Z6={};Z6={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var eT={};eT={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var tT={};tT={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var nT={};nT={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var rT={};rT={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var iT={};iT={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var sT={};sT={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var oT={};oT={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var aT={};aT={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var lT={};lT={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var uT={};uT={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var cT={};cT={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var dT={};dT={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var fT={};fT={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var hT={};hT={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var pT={};pT={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var mT={};mT={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var gT={};gT={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var bT={};bT={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var yT={};yT={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var vT={};vT={"ar-AE":F6,"bg-BG":K6,"cs-CZ":_6,"da-DK":j6,"de-DE":H6,"el-GR":V6,"en-US":U6,"es-ES":q6,"et-EE":G6,"fi-FI":W6,"fr-FR":Q6,"he-IL":Y6,"hr-HR":X6,"hu-HU":J6,"it-IT":Z6,"ja-JP":eT,"ko-KR":tT,"lt-LT":nT,"lv-LV":rT,"nb-NO":iT,"nl-NL":sT,"pl-PL":oT,"pt-BR":aT,"pt-PT":lT,"ro-RO":uT,"ru-RU":cT,"sk-SK":dT,"sl-SI":fT,"sr-SP":hT,"sv-SE":pT,"tr-TR":mT,"uk-UA":gT,"zh-CN":bT,"zh-TW":yT};function xT(t,e,n){let{type:r}=t,{isOpen:i}=e;k.useEffect(()=>{n&&n.current&&Xw.set(n.current,e.close)});let s;r==="menu"?s=!0:r==="listbox"&&(s="listbox");let a=rn();return{triggerProps:{"aria-haspopup":s,"aria-expanded":i,"aria-controls":i?a:void 0,onPress:e.toggle},overlayProps:{id:a}}}function WF(t){return t&&t.__esModule?t.default:t}function QF(t,e,n){let{type:r="menu",isDisabled:i,trigger:s="press"}=t,a=rn(),{triggerProps:u,overlayProps:c}=xT({type:r},e,n),f=b=>{if(!i&&!(s==="longPress"&&!b.altKey)&&n&&n.current)switch(b.key){case"Enter":case" ":if(s==="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=mr(WF(vT),"@react-aria/menu"),{longPressProps:m}=Hw({isDisabled:i||s!=="longPress",accessibilityDescription:h.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),g={preventFocusOnPress:!0,onPressStart(b){b.pointerType!=="touch"&&b.pointerType!=="keyboard"&&!i&&(Ar(b.target),e.open(b.pointerType==="virtual"?"first":null))},onPress(b){b.pointerType==="touch"&&!i&&(Ar(b.target),e.toggle())}};return delete u.onPress,{menuTriggerProps:{...u,...s==="press"?g:m,id:a,onKeyDown:f},menuProps:{...c,"aria-labelledby":a,autoFocus:e.focusStrategy||!0,onClose:e.close}}}const CT=new WeakMap;function YF(t,e,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:s,...a}=t;!t["aria-label"]&&t["aria-labelledby"];let u=Je(t,{labelable:!0}),{listProps:c}=jw({...a,ref:n,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return CT.set(e,{onClose:t.onClose,onAction:t.onAction,shouldUseVirtualFocus:t.shouldUseVirtualFocus}),{menuProps:we(u,{onKeyDown:i,onKeyUp:s},{role:"menu",...c,onKeyDown:f=>{(f.key!=="Escape"||t.shouldUseVirtualFocus)&&c.onKeyDown?.(f)}})}}function XF(t,e,n){let{id:r,key:i,closeOnSelect:s,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:T,onKeyUp:$,onFocus:A,onFocusChange:B,onBlur:P,selectionManager:R=e.selectionManager}=t,M=!!c,I=M&&t["aria-expanded"]==="true",G=t.isDisabled??R.isDisabled(i),J=t.isSelected??R.isSelected(i),U=CT.get(e),ie=e.collection.getItem(i),F=t.onClose||U.onClose,te=Bl(),O=()=>{if(!M&&(ie?.props?.onAction?ie.props.onAction():t.onAction&&t.onAction(i),U.onAction)){let Ie=U.onAction;Ie(i,ie?.value)}},K="menuitem";M||(R.selectionMode==="single"?K="menuitemradio":R.selectionMode==="multiple"&&(K="menuitemcheckbox"));let Y=jo(),Z=jo(),j=jo(),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(R.selectionMode!=="none"&&!M&&(L["aria-checked"]=J),u){let Ie=Number(ie?.index);L["aria-posinset"]=Number.isNaN(Ie)?void 0:Ie+1,L["aria-setsize"]=gF(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),O(),FS(Ie,te,ie.props.href,ie?.props.routerOptions);let Oi=le.current?.pointerType==="keyboard"?le.current?.key==="Enter"||R.selectionMode==="none"||R.isLink(i):R.selectionMode!=="multiple"||R.isLink(i);Oi=a??s??Oi,F&&!M&&Oi&&F(),le.current=null},{itemProps:Ee,isFocused:Ve}=Vw({id:r,selectionManager:R,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:U.shouldUseVirtualFocus}),{pressProps:Se,isPressed:Dn}=Qc({onPressStart:f,onPress:m,onPressUp:ue,onPressChange:ne,onPressEnd:b,isDisabled:G}),{hoverProps:sn}=Us({isDisabled:G,onHoverStart(Ie){!yl()&&!(I&&c)&&(R.setFocused(!0),R.setFocusedKey(i)),C?.(Ie)},onHoverChange:E,onHoverEnd:D}),{keyboardProps:pn}=P$({onKeyDown:Ie=>{if(Ie.repeat){Ie.continuePropagation();return}switch(Ie.key){case" ":le.current={pointerType:"keyboard",key:" "},de(Ie).click(),Bo("keyboard");break;case"Enter":le.current={pointerType:"keyboard",key:"Enter"},de(Ie).tagName!=="A"&&de(Ie).click(),Bo("keyboard");break;default:M||Ie.continuePropagation(),T?.(Ie);break}},onKeyUp:$}),{focusableProps:gr}=Jp({onBlur:P,onFocus:A,onFocusChange:B},n),Kt=Je(ie?.props);delete Kt.id;let Js=IS(ie?.props);return{menuItemProps:{...L,...we(Kt,Js,M?{onFocus:Ee.onFocus,"data-collection":Ee["data-collection"],"data-key":Ee["data-key"]}:Ee,Se,sn,pn,gr,U.shouldUseVirtualFocus||M?{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&&R.isFocused&&yl()&&!I,isSelected:J,isPressed:Dn,isDisabled:G}}function JF(t){let{heading:e,"aria-label":n}=t,r=rn();return{itemProps:{role:"presentation"},headingProps:e?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":e?r:void 0}}}function v3(t){let e=m3(t),[n,r]=k.useState(null),[i,s]=k.useState([]),a=()=>{s([]),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)=>{s(m=>h>m.length?m:[...m.slice(0,h),f])},closeSubmenu:(f,h)=>{s(m=>m[h]===f?m.slice(0,h):m)}}}class ZF{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,s=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=s++),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 eK(t){let{onExpandedChange:e}=t,[n,r]=Vs(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),i=h3(t),s=k.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),a=Gw(t,k.useCallback(c=>new ZF(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:s,toggleKey:c=>{r(tK(n,c))},setExpandedKeys:r,selectionManager:new Xc(a,i)}}function tK(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const ET=k.createContext(null),x3=k.createContext(null),Fh=k.createContext(null),Kh=k.createContext(null);function DT(t){let e=v3(t),n=k.useRef(null),{menuTriggerProps:r,menuProps:i}=QF({...t,type:"menu"},e,n),s=k.useRef(null);return O$()?null:H.createElement(Br,{values:[[ET,{...i,ref:s}],[oa,e],[Fh,e],[b3,{trigger:"MenuTrigger",triggerRef:n,scrollRef:s,placement:"bottom start","aria-labelledby":i["aria-labelledby"]}]]},H.createElement(O6,{...r,ref:n,isPressed:e.isOpen},t.children))}const nK=k.createContext(null),K1=class K1 extends ia{filter(e,n,r){let i=e.getItem(this.firstChildKey);if(i&&r(i.textValue,this)){let s=this.clone();return n.addDescendants(s,e),s}return null}};K1.type="submenutrigger";let E5=K1;const kT=k.forwardRef(function(e,n){return[e,n]=Et(e,n,ET),H.createElement(r3,{content:H.createElement(em,e)},r=>H.createElement(rK,{props:e,collection:r,menuRef:n}))});function rK({props:t,collection:e,menuRef:n}){[t,n]=Et(t,n,wc);let{filter:r,...i}=t,s=k.useMemo(()=>r?e.filter(r):e,[e,r]),a=eK({...t,collection:s,children:void 0}),u=k.useContext(Fh),{isVirtualized:c,CollectionRoot:f}=k.useContext(Rs),{menuProps:h}=YF({...t,isVirtualized:c,onClose:t.onClose||u?.close},a,n),m=Pt({...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(c3,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(Br,{values:[[x3,a],[Lw,{elementType:"div"}],[Jz,{name:"MenuSection",render:ST}],[nK,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[Rc,{shouldCloseOnSelect:t.shouldCloseOnSelect}],[wc,null],[Xp,null],[Kh,a.selectionManager],[Fh,u??v3({})]]},H.createElement(l3,null,H.createElement(f,{collection:a.collection,persistedKeys:eI(a.selectionManager.focusedKey),scrollRef:n}))),g))}class iK extends Xc{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 ST(t,e,n,r="react-aria-MenuSection"){let i=k.useContext(x3),{CollectionBranch:s}=k.useContext(Rs),[a,u]=$S(),{headingProps:c,groupProps:f}=JF({heading:u,"aria-label":n.props["aria-label"]??void 0}),h=Pt({...t,id:void 0,children:void 0,defaultClassName:r,className:n.props?.className,style:n.props?.style,values:void 0}),m=k.useContext(Kh),g=h3(t),b=t.selectionMode!=null?new iK(m,g):m,v=Al(Rc)?.shouldCloseOnSelect,C=Je(t,{global:!0});return delete C.id,H.createElement(at.section,{...we(C,h,f),ref:e},H.createElement(Br,{values:[[Ow,{...c,ref:a}],[Kh,b],[Rc,{shouldCloseOnSelect:t.shouldCloseOnSelect??v}]]},H.createElement(s,{collection:i.collection,parent:n})))}const sK=Yz(Cb,ST),Rc=k.createContext(null),$T=sa(Oh,function(e,n,r){[e,n]=Et(e,n,Rc);let i=Al(Rc)?.id,s=k.useContext(x3),a=Hs(n),u=k.useContext(Kh),{isVirtualized:c}=k.useContext(Rs),{menuItemProps:f,labelProps:h,descriptionProps:m,keyboardShortcutProps:g,...b}=XF({...e,id:i,key:r.key,selectionManager:u,isVirtualized:c},s,a),{hoverProps:v,isHovered:C}=Us({isDisabled:b.isDisabled}),E=Pt({...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,T=Je(e,{global:!0});return delete T.id,delete T.onClick,H.createElement(D,{...we(T,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(Br,{values:[[a3,{slots:{[xs]:h,label:h,description:m}}],[GF,g],[u3,{isSelected:b.isSelected}]]},E.children))});function oK(t,e){let{role:n="dialog"}=t,r=jo();r=t["aria-label"]?void 0:r;let i=k.useRef(!1);return k.useEffect(()=>{if(e.current&&!bl(e.current)){gn(e.current);let s=setTimeout(()=>{(_e()===e.current||_e()===document.body)&&(i.current=!0,e.current&&(e.current.blur(),gn(e.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[e]),z6(),k.useRef(!1),k.useEffect(()=>{}),{dialogProps:{...Je(t,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}const wT=k.createContext(null),oa=k.createContext(null);function aK(t){let e=v3(t),n=k.useRef(null),{triggerProps:r,overlayProps:i}=xT({type:"dialog"},e,n);return r.id=rn(),i["aria-labelledby"]=r.id,H.createElement(Br,{values:[[oa,e],[Fh,e],[wT,i],[b3,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"]}]]},H.createElement(O6,{...r,ref:n,isPressed:e.isOpen},t.children))}const lK=k.forwardRef(function(e,n){let r=e["aria-labelledby"];[e,n]=Et(e,n,wT);let{dialogProps:i,titleProps:s}=oK({...e,"aria-labelledby":r},n),a=k.useContext(oa);!i["aria-label"]&&!i["aria-labelledby"]&&e["aria-labelledby"]&&(i["aria-labelledby"]=e["aria-labelledby"]);let u=Pt({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(Br,{values:[[ww,{slots:{[xs]:{},title:{...s,level:2}}}],[tm,{slots:{[xs]:{},close:{onPress:()=>a?.close()}}}]]},u.children))});function uK(t){let e=f3({usage:"search",...t}),n=k.useCallback((s,a)=>a.length===0?!0:(s=s.normalize("NFC"),a=a.normalize("NFC"),e.compare(s.slice(0,a.length),a)===0),[e]),r=k.useCallback((s,a)=>a.length===0?!0:(s=s.normalize("NFC"),a=a.normalize("NFC"),e.compare(s.slice(-a.length),a)===0),[e]),i=k.useCallback((s,a)=>{if(a.length===0)return!0;s=s.normalize("NFC"),a=a.normalize("NFC");let u=0,c=a.length;for(;u+c<=s.length;u++){let f=s.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 Tt=(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 TT={...Tt,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},AT=BT(TT);AT[7]="all";const ic={none:"cancel",link:"link",copy:"copy",move:"move"},b0=BT(ic);function BT(t){let e={};for(let n in t)e[t[n]]=n;return e}const cK=new Set(["text/plain","text/uri-list","text/html"]),_h="application/vnd.react-aria.items+json",jh="application/octet-stream",C3=new WeakMap,MT=Symbol();function dK(t){let{id:e}=C3.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function fK(t){let{ref:e}=C3.get(t)||{};if(!e)throw new Error("Droppable item outside a droppable collection");return e}function Vo(t){let e=new Set;for(let n of t)for(let r of Object.keys(n))e.add(r);return e}function RT(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 E3(){return RT(VS())}function NT(){return RT(Xo())}function hK(t,e){let n=new Map,r=!1,i=[];for(let s of e){let a=Object.keys(s);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=s[c];u[c]=h,f.push(h)}i.push(u)}for(let[s,a]of n)if(cK.has(s)){let u=a.join(`
21
+ `);t.items.add(u,s)}else t.items.add(a[0],s);if(r){let s=JSON.stringify(i);t.items.add(s,_h)}}class Lf{constructor(e){this.types=new Set;let n=!1;for(let r of e.items)r.type!==_h&&(r.kind==="file"&&(n=!0),r.type?this.types.add(r.type):this.types.add(jh));this.includesUnknownTypes=!n&&e.types.includes("Files")}has(e){if(Array.isArray(e))return e.some(n=>this.has(n));if(this.includesUnknownTypes||e===MT&&this.types.has(jh)||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 pK(t){let e=[];if(!t)return e;let n=!1;if(t.types.includes(_h))try{let r=t.getData(_h),i=JSON.parse(r);for(let s of i)e.push({kind:"text",types:new Set(Object.keys(s)),getText:a=>Promise.resolve(s[a])});n=!0}catch{}if(!n){let r=new Map;for(let i of t.items)if(i.kind==="string")r.set(i.type||jh,t.getData(i.type));else if(i.kind==="file")if(typeof i.webkitGetAsEntry=="function"){let s=i.webkitGetAsEntry();if(!s)continue;s.isFile?e.push(_b(i.getAsFile())):s.isDirectory&&e.push(PT(s))}else e.push(_b(i.getAsFile()));r.size>0&&e.push({kind:"text",types:new Set(r.keys()),getText:i=>Promise.resolve(r.get(i))})}return e}function mK(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 _b(t){if(!t)throw new Error("No file provided");return{kind:"file",type:t.type||jh,name:t.name,getText:()=>mK(t),getFile:()=>Promise.resolve(t)}}function PT(t){return{kind:"directory",name:t.name,getEntries:()=>gK(t)}}async function*gK(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 bK(r);yield _b(i)}else r.isDirectory&&(yield PT(r))}while(n.length>0)}function bK(t){return new Promise((e,n)=>t.file(e,n))}let zt={draggingKeys:new Set};function yK(t){zt.draggingCollectionRef=t}function vK(t){zt.draggingKeys=t}function Za(t){zt.dropCollectionRef=t}function OT(){zt={draggingKeys:new Set}}function xK(t){zt=t}function Hr(t){let{draggingCollectionRef:e,dropCollectionRef:n}=zt;return e?.current!=null&&e.current===(t?.current||n?.current)}let ph;function Hh(t){ph=t}let jb=Tt.none;function y0(t){jb=t}let Hb=new Map,sc=new Map,Sr=null,Vh=new Set;function LT(t){return Hb.set(t.element,t),Sr?.updateValidDropTargets(),()=>{Hb.delete(t.element),Sr?.updateValidDropTargets()}}function CK(t){return sc.set(t.element,t),()=>{sc.delete(t.element)}}function EK(t,e){if(Sr)throw new Error("Cannot begin dragging while already dragging");Sr=new wK(t,e),requestAnimationFrame(()=>{Sr&&(Sr.setup(),NT()==="keyboard"&&Sr.next())});for(let n of Vh)n()}function D3(){let[t,e]=k.useState(Sr);return k.useEffect(()=>{let n=()=>e(Sr);return Vh.add(n),()=>{Vh.delete(n)}},[]),t}function DK(){return!!Sr}function kK(){Sr=null;for(let t of Vh)t()}const D5=["pointerdown","pointermove","pointerenter","pointerleave","pointerover","pointerout","pointerup","mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","touchstart","touchmove","touchend","focusin","focusout"],SK=["pointerup","mouseup","touchend"],$K={keyboard:"dragStartedKeyboard",touch:"dragStartedTouch",virtual:"dragStartedVirtual"};class wK{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 D5)document.addEventListener(e,this.cancelEvent,!0);this.mutationObserver=new MutationObserver(()=>this.updateValidDropTargets()),this.updateValidDropTargets(),Mo(this.stringFormatter.format($K[NT()]))}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 D5)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 s=sc.get(r);i&&this.setCurrentDropTarget(i,s)}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),Wp(e)||this.isVirtualClick){let n=sc.values(),r=de(e),i=[...n].find(u=>u.element===r||$e(u.activateButtonRef?.current,r)),s=this.validDropTargets.find(u=>$e(u.element,r)),a=i?.activateButtonRef?.current??s?.activateButtonRef?.current;if($e(a,r)&&s){this.activate(s,i);return}if(de(e)===this.dragTarget.element){this.cancel();return}s&&(this.setCurrentDropTarget(s,i),this.drop(i))}}onPointerDown(e){this.cancelEvent(e),this.isVirtualClick=Zy(e)}cancelEvent(e){let n=de(e);(e.type==="focusin"||e.type==="focusout")&&(n===this.dragTarget?.element||n===this.getCurrentActivateButton())||(SK.includes(e.type)||e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}updateValidDropTargets(){if(!this.mutationObserver)return;if(this.mutationObserver.disconnect(),this.restoreAriaHidden&&this.restoreAriaHidden(),this.validDropTargets=TK(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=Vo(this.dragTarget.items),n=[...sc.values()].filter(i=>typeof i.getDropOperation=="function"?i.getDropOperation(e,this.dragTarget.allowedDropOperations)!=="cancel":!0),r=this.validDropTargets.filter(i=>!n.some(s=>$e(i.element,s.element)));this.restoreAriaHidden=p3([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&&Mo(r,"polite"),this.initialFocused=!0}}end(){if(this.teardown(),kK(),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})),Mo(this.stringFormatter.format("dropCanceled"))}drop(e){if(!this.currentDropTarget){this.cancel();return}if(typeof e?.getDropOperation=="function"){let n=Vo(this.dragTarget.items);this.dropOperation=e.getDropOperation(n,this.dragTarget.allowedDropOperations)}else if(typeof this.currentDropTarget.getDropOperation=="function"){let n=Vo(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:s=>Promise.resolve(i[s])})),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(),Mo(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 TK(t){let e=Vo(t.items);return[...Hb.values()].filter(n=>n.element.closest('[aria-hidden="true"], [inert]')?!1:typeof n.getDropOperation=="function"?n.getDropOperation(e,t.allowedDropOperations)!=="cancel":!0)}var zT={};zT={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 IT={};IT={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 FT={};FT={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 KT={};KT={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 _T={};_T={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 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={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 VT={};VT={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 UT={};UT={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 qT={};qT={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 GT={};GT={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 WT={};WT={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 QT={};QT={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 YT={};YT={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 XT={};XT={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 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 キーを押してドロップするか、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 ZT={};ZT={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 eA={};eA={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 tA={};tA={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 nA={};nA={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 rA={};rA={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 iA={};iA={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 sA={};sA={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 oA={};oA={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 aA={};aA={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 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:"Начато перетаскивание. Нажмите клавишу 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 uA={};uA={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 cA={};cA={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 dA={};dA={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 fA={};fA={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 hA={};hA={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 pA={};pA={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 mA={};mA={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 gA={};gA={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 Jc={};Jc={"ar-AE":zT,"bg-BG":IT,"cs-CZ":FT,"da-DK":KT,"de-DE":_T,"el-GR":jT,"en-US":HT,"es-ES":VT,"et-EE":UT,"fi-FI":qT,"fr-FR":GT,"he-IL":WT,"hr-HR":QT,"hu-HU":YT,"it-IT":XT,"ja-JP":JT,"ko-KR":ZT,"lt-LT":eA,"lv-LV":tA,"nb-NO":nA,"nl-NL":rA,"pl-PL":iA,"pt-BR":sA,"pt-PT":oA,"ro-RO":aA,"ru-RU":lA,"sk-SK":uA,"sl-SI":cA,"sr-SP":dA,"sv-SE":fA,"tr-TR":hA,"uk-UA":pA,"zh-CN":mA,"zh-TW":gA};function AK(t){return t&&t.__esModule?t.default:t}const BK={keyboard:"dropDescriptionKeyboard",touch:"dropDescriptionTouch",virtual:"dropDescriptionVirtual"};function bA(){let t=mr(AK(Jc),"@react-aria/dnd"),e=E3(),n=D3();return{dropProps:{...Yc(n?t.format(BK[e]):""),onClick:()=>{}}}}const MK=800;function RK(t){let{hasDropButton:e,isDisabled:n}=t,[r,i]=k.useState(!1),s=k.useRef({x:0,y:0,dragOverElements:new Set,dropEffect:"none",allowedOperations:Tt.all,dropActivateTimer:void 0}).current,a=$=>{if(i(!0),typeof t.onDropEnter=="function"){let A=$.currentTarget.getBoundingClientRect();t.onDropEnter({type:"dropenter",x:$.clientX-A.x,y:$.clientY-A.y})}},u=$=>{if(i(!1),typeof t.onDropExit=="function"){let A=$.currentTarget.getBoundingClientRect();t.onDropExit({type:"dropexit",x:$.clientX-A.x,y:$.clientY-A.y})}},c=$=>{$.preventDefault(),$.stopPropagation();let A=k5($);if($.clientX===s.x&&$.clientY===s.y&&A===s.allowedOperations){$.dataTransfer.dropEffect=s.dropEffect;return}s.x=$.clientX,s.y=$.clientY;let B=s.dropEffect;if(A!==s.allowedOperations){let P=v0(A),R=P[0];if(typeof t.getDropOperation=="function"){let M=new Lf($.dataTransfer);R=zf(A,t.getDropOperation(M,P))}s.dropEffect=b0[R]||"none"}if(typeof t.getDropOperationForPoint=="function"){let P=new Lf($.dataTransfer),R=$.currentTarget.getBoundingClientRect(),M=zf(A,t.getDropOperationForPoint(P,v0(A),s.x-R.x,s.y-R.y));s.dropEffect=b0[M]||"none"}if(s.allowedOperations=A,$.dataTransfer.dropEffect=s.dropEffect,s.dropEffect==="none"&&B!=="none"?u($):s.dropEffect!=="none"&&B==="none"&&a($),typeof t.onDropMove=="function"&&s.dropEffect!=="none"){let P=$.currentTarget.getBoundingClientRect();t.onDropMove({type:"dropmove",x:s.x-P.x,y:s.y-P.y})}if(clearTimeout(s.dropActivateTimer),t.onDropActivate&&typeof t.onDropActivate=="function"&&s.dropEffect!=="none"){let P=t.onDropActivate,R=$.currentTarget.getBoundingClientRect();s.dropActivateTimer=setTimeout(()=>{P({type:"dropactivate",x:s.x-R.x,y:s.y-R.y})},MK)}},f=$=>{if($.preventDefault(),$.stopPropagation(),s.dragOverElements.add(de($)),s.dragOverElements.size>1)return;let A=k5($),B=v0(A),P=B[0];if(typeof t.getDropOperation=="function"){let R=new Lf($.dataTransfer);P=zf(A,t.getDropOperation(R,B))}if(typeof t.getDropOperationForPoint=="function"){let R=new Lf($.dataTransfer),M=$.currentTarget.getBoundingClientRect();P=zf(A,t.getDropOperationForPoint(R,B,$.clientX-M.x,$.clientY-M.y))}s.x=$.clientX,s.y=$.clientY,s.allowedOperations=A,s.dropEffect=b0[P]||"none",$.dataTransfer.dropEffect=s.dropEffect,P!=="cancel"&&a($)},h=$=>{$.preventDefault(),$.stopPropagation();let A=de($);if(s.dragOverElements.delete(A),A===$.currentTarget)for(let B of s.dragOverElements)$e($.currentTarget,B)||s.dragOverElements.delete(B);s.dragOverElements.size>0||(s.dropEffect!=="none"&&u($),clearTimeout(s.dropActivateTimer))},m=$=>{if($.preventDefault(),$.stopPropagation(),Hh(s.dropEffect),typeof t.onDrop=="function"){let B=ic[s.dropEffect],P=pK($.dataTransfer),R=$.currentTarget.getBoundingClientRect(),M={type:"drop",x:$.clientX-R.x,y:$.clientY-R.y,items:P,dropOperation:B};t.onDrop(M)}let A={...zt};s.dragOverElements.clear(),u($),clearTimeout(s.dropActivateTimer),A.draggingCollectionRef==null?Hh(void 0):xK(A)},g=Bt($=>{typeof t.onDropEnter=="function"&&t.onDropEnter($)}),b=Bt($=>{typeof t.onDropExit=="function"&&t.onDropExit($)}),v=Bt($=>{typeof t.onDropActivate=="function"&&t.onDropActivate($)}),C=Bt($=>{typeof t.onDrop=="function"&&t.onDrop($)}),E=Bt(($,A)=>t.getDropOperation?t.getDropOperation($,A):A[0]),{ref:D}=t;Le(()=>{if(!(n||!D.current))return LT({element:D.current,getDropOperation:E,onDropEnter($){i(!0),g($)},onDropExit($){i(!1),b($)},onDrop:C,onDropActivate:v})},[n,D]);let{dropProps:T}=bA();return n?{dropProps:{},dropButtonProps:{isDisabled:!0},isDropTarget:!1}:{dropProps:{...!e&&T,onDragEnter:f,onDragOver:c,onDragLeave:h,onDrop:m},dropButtonProps:{...e&&T},isDropTarget:r}}function k5(t){let e=TT[t.dataTransfer.effectAllowed];jb&&(e&=jb);let n=Tt.none;return Ms()?(t.altKey&&(n|=Tt.copy),t.ctrlKey&&!Xy()&&(n|=Tt.link),t.metaKey&&(n|=Tt.move)):(t.altKey&&(n|=Tt.link),t.shiftKey&&(n|=Tt.move),t.ctrlKey&&(n|=Tt.copy)),n?e&n:e}function v0(t){let e=[];return t&Tt.move&&e.push("move"),t&Tt.copy&&e.push("copy"),t&Tt.link&&e.push("link"),e}function zf(t,e){let n=Tt[e];return t&n?e:"cancel"}const k3=new WeakMap;function Vb(t,e){let{id:n}=k3.get(t)??{};if(!n)throw new Error("Unknown list");return`${n}-${NK(e)}`}function NK(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}var yA={};yA={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 xA={};xA={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 CA={};CA={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 EA={};EA={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 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=>`${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 SA={};SA={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 $A={};$A={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 wA={};wA={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 TA={};TA={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 AA={};AA={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 BA={};BA={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 MA={};MA={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 RA={};RA={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 NA={};NA={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=>`${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 OA={};OA={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 LA={};LA={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 zA={};zA={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 IA={};IA={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 FA={};FA={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 KA={};KA={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 _A={};_A={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 jA={};jA={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 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=>`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 UA={};UA={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 qA={};qA={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 GA={};GA={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 WA={};WA={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 QA={};QA={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}。`,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 XA={};XA={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 sm={};sm={"ar-AE":yA,"bg-BG":vA,"cs-CZ":xA,"da-DK":CA,"de-DE":EA,"el-GR":DA,"en-US":kA,"es-ES":SA,"et-EE":$A,"fi-FI":wA,"fr-FR":TA,"he-IL":AA,"hr-HR":BA,"hu-HU":MA,"it-IT":RA,"ja-JP":NA,"ko-KR":PA,"lt-LT":OA,"lv-LV":LA,"nb-NO":zA,"nl-NL":IA,"pl-PL":FA,"pt-BR":KA,"pt-PT":_A,"ro-RO":jA,"ru-RU":HA,"sk-SK":VA,"sl-SI":UA,"sr-SP":qA,"sv-SE":GA,"tr-TR":WA,"uk-UA":QA,"zh-CN":YA,"zh-TW":XA};function PK(t){return t&&t.__esModule?t.default:t}function OK(t,e){let{getRowText:n=u=>e.collection.getTextValue?.(u)??e.collection.getItem(u)?.textValue}=t,r=mr(PK(sm),"@react-aria/grid"),i=e.selectionManager.rawSelection,s=k.useRef(i),a=k.useCallback(()=>{if(!e.selectionManager.isFocused||i===s.current){s.current=i;return}let u=S5(i,s.current),c=S5(s.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||s.current==="all"||s.current?.size>1)&&h.push(i==="all"?r.format("selectedAll"):r.format("selectedCount",{count:i.size})),h.length>0&&Mo(h.join(" ")),s.current=i},[i,e.selectionManager.selectedKeys,e.selectionManager.isFocused,e.selectionManager.selectionBehavior,e.selectionManager.selectionMode,e.collection,n,r]);SI(()=>{if(e.selectionManager.isFocused)a();else{let u=requestAnimationFrame(a);return()=>cancelAnimationFrame(u)}},[i,e.selectionManager.isFocused])}function S5(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 LK(t,e){let n=e?.isDisabled,[r,i]=k.useState(!1);return Le(()=>{if(t?.current&&!n){let s=()=>{if(t.current){let u=un(t.current,{tabbable:!0});i(!!u.nextNode())}};s();let a=new MutationObserver(s);return a.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{a.disconnect()}}}),n?!1:r}function zK(t){return t&&t.__esModule?t.default:t}function IK(t){let e=mr(zK(sm),"@react-aria/grid"),n=VS(),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 Yc(i)}function FK(t,e,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:s,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}=jw({selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:s,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=rn(t.id);k3.set(e,{id:b,onAction:a,linkBehavior:c,keyboardNavigationBehavior:f,shouldSelectOnPressUp:m});let v=IK({selectionManager:e.selectionManager,hasItemActions:!!a}),C=LK(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),OK({},e),{gridProps:D}}const $5={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function KK(t,e,n){let{node:r,isVirtualized:i}=t,{direction:s}=Ri(),{onAction:a,linkBehavior:u,keyboardNavigationBehavior:c,shouldSelectOnPressUp:f}=k3.get(e),h=jo(),m=k.useRef(null),g=()=>{n.current!==null&&(m.current!=null&&r.key!==m.current||!bl(n.current))&&gn(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 O=e.collection.getItem(r.parentKey);if(O){let K=_K(O,e.collection);F=[...K].filter(Y=>Y.type==="item").length,te>0&&K[0].type!=="item"&&(te-=1)}}else F=[...e.collection].filter(O=>O.level===0&&O.type==="item").length;b={"aria-expanded":ie,"aria-level":r.level+1,"aria-posinset":te+1,"aria-setsize":F}}let{itemProps:E,...D}=Vw({selectionManager:e.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:t.shouldSelectOnPressUp||f,onAction:a||r.props?.onAction?_s(r.props?.onAction,a?()=>a(r.key):void 0):void 0,focus:g,linkBehavior:u}),T=U=>{let ie=_e();if(!$e(U.currentTarget,de(U))||!n.current||!ie)return;let F=un(n.current);if(F.currentNode=ie,!w5(U,e,r,v,s,ie,n.current))switch(U.key){case"ArrowLeft":if(c==="arrow"){let te=s==="rtl"?F.nextNode():F.previousNode();if(te)U.preventDefault(),U.stopPropagation(),gn(te),fs(te,{containingElement:Vr(n.current)});else if(U.preventDefault(),U.stopPropagation(),s==="rtl")gn(n.current),fs(n.current,{containingElement:Vr(n.current)});else{F.currentNode=n.current;let O=T5(F);O&&(gn(O),fs(O,{containingElement:Vr(n.current)}))}}break;case"ArrowRight":if(c==="arrow"){let te=s==="rtl"?F.previousNode():F.nextNode();if(te)U.preventDefault(),U.stopPropagation(),gn(te),fs(te,{containingElement:Vr(n.current)});else if(U.preventDefault(),U.stopPropagation(),s==="ltr")gn(n.current),fs(n.current,{containingElement:Vr(n.current)});else{F.currentNode=n.current;let O=T5(F);O&&(gn(O),fs(O,{containingElement:Vr(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){yl()||e.selectionManager.setFocusedKey(r.key);return}},A=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(w5(U,e,r,v,s,ie,n.current))return}switch(U.key){case"Tab":if(c==="tab"){let F=un(n.current,{tabbable:!0});F.currentNode=ie,(U.shiftKey?F.previousNode():F.nextNode())&&U.stopPropagation()}}}},B=cz(r.props),P=D.hasAction?B:{},R=we(E,P,{role:"row",onKeyDownCapture:c==="arrow"?T: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)?`${Vb(e,r.key)} ${h}`:void 0,id:Vb(e,r.key)}),M=R.onKeyDown;R.onKeyDown=U=>{A(U),U.isPropagationStopped()||M?.(U)};let I=R.onPointerDown;R.onPointerDown=U=>{let ie=de(U);if(ie&&ie!==n.current&&Bh(ie)){U.stopPropagation();return}I?.(U)};let G=R.onMouseDown;if(R.onMouseDown=U=>{let ie=de(U);if(ie&&ie!==n.current&&Bh(ie)){U.stopPropagation();return}G?.(U)},i){let{collection:U}=e,ie=[...U];R["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(R,b)},gridCellProps:J,descriptionProps:{id:h},...D}}function w5(t,e,n,r,i,s,a){if(!("expandedKeys"in e)||s!==a)return!1;if(t.key===$5.expand[i]&&e.selectionManager.focusedKey===n.key&&r&&!e.expandedKeys.has(n.key))return e.toggleKey(n.key),t.stopPropagation(),!0;if(t.key===$5.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 T5(t){let e=null,n=null;do n=t.lastChild(),n&&(e=n);while(n);return e}function _K(t,e){let n=e.getChildren?.(t.key),r=n?Array.from(n):[],i=r.length>0?r[0]:null,s=[];for(;i;)s.push(i),i=i.nextKey!=null?e.getItem(i.nextKey):null;return s}function jK(t){return t&&t.__esModule?t.default:t}function HK(t,e){let{key:n}=t,r=e.selectionManager,i=rn(),s=!e.selectionManager.canSelectItem(n),a=e.selectionManager.isSelected(n),u=()=>r.toggleSelection(n);const c=mr(jK(sm),"@react-aria/grid");return{checkboxProps:{id:i,"aria-label":c.format("select"),isSelected:a,isDisabled:s,onChange:u}}}function VK(t,e){let{key:n}=t;const{checkboxProps:r}=HK(t,e);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${Vb(e,n)}`}}}const UK=k.createContext(null),qK=k.forwardRef(function(e,n){return[e,n]=Et(e,n,UK),H.createElement(r3,{content:H.createElement(em,e)},r=>H.createElement(GK,{props:e,collection:r,gridListRef:n}))});function GK({props:t,collection:e,gridListRef:n}){[t,n]=Et(t,n,wc);let{shouldUseVirtualFocus:r,filter:i,disallowTypeAhead:s,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(Rs),E=xF({...u,collection:e,children:void 0,layoutDelegate:v}),D=CF(E,i),T=f3({usage:"search",sensitivity:"base"}),{disabledBehavior:$,disabledKeys:A}=D.selectionManager,{direction:B}=Ri(),P=k.useMemo(()=>new _w({collection:D.collection,collator:T,ref:n,disabledKeys:A,disabledBehavior:$,layoutDelegate:v,layout:h,orientation:m,direction:B}),[D.collection,n,h,m,A,$,v,T,B]),{gridProps:R}=FK({...u,keyboardDelegate:P,keyboardNavigationBehavior:h==="grid"?"tab":f,isVirtualized:b,shouldSelectOnPressUp:t.shouldSelectOnPressUp,disallowTypeAhead:s,UNSTABLE_focusOnEntry:a},D,n),M=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,O=k.useRef(null);if(I&&c){J=c.useDraggableCollectionState({collection:D.collection,selectionManager:M,preview:c.renderDragPreview?O:void 0}),c.useDraggableCollection({},J,n);let fe=c.DragPreview;te=c.renderDragPreview?H.createElement(fe,{ref:O},c.renderDragPreview):null}if(G&&c){U=c.useDroppableCollectionState({collection:D.collection,selectionManager:M});let fe=c.dropTargetDelegate||C||new c.ListDropTargetDelegate(e,n,{layout:h,direction:B,orientation:m});ie=c.useDroppableCollection({keyboardDelegate:P,dropTargetDelegate:fe},U,n),F=U.isDropTarget({type:"root"})}let{focusProps:K,isFocused:Y,isFocusVisible:Z}=Ns(),j=D.collection.size===0,L={isDropTarget:F,orientation:m,isEmpty:j,isFocused:Y,isFocusVisible:Z,layout:h,state:D},V=Pt({...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(c3,null,H.createElement(at.div,{...we(ue,V,R,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(Br,{values:[[Bc,D],[rm,{dragAndDropHooks:c,dragState:J,dropState:U}],[Nw,{render:QK}]]},G&&H.createElement(JK,null),H.createElement(l3,null,H.createElement(g,{collection:D.collection,scrollRef:n,persistedKeys:GI(M,c,U),renderDropIndicator:qI(c,U)}))),ne,te))}const WK=sa(Oh,function(e,n,r){let i=k.useContext(Bc),{dragAndDropHooks:s,dragState:a,dropState:u}=k.useContext(rm),c=Hs(n),{isVirtualized:f}=k.useContext(Rs),h=a&&!(a.isDisabled||a.selectionManager.isDisabled(r.key)),{rowProps:m,gridCellProps:g,descriptionProps:b,...v}=KK({node:r,shouldSelectOnPressUp:!!a,isVirtualized:f},i,c),{hoverProps:C,isHovered:E}=Us({isDisabled:!v.allowsSelection&&!v.hasAction&&!h,onHoverStart:r.props.onHoverStart,onHoverChange:r.props.onHoverChange,onHoverEnd:r.props.onHoverEnd}),{isFocusVisible:D,focusProps:T}=Ns(),{isFocusVisible:$,focusProps:A}=Ns({within:!0}),{checkboxProps:B}=VK({key:r.key},i),P=i.selectionManager.disabledBehavior==="all"&&v.isDisabled?{isDisabled:!0}:{},R=null;a&&s&&(R=s.useDraggableItem({key:r.key,hasDragButton:!0},a));let M=null,I=k.useRef(null),{visuallyHiddenProps:G}=nm();u&&s&&(M=s.useDropIndicator({target:{type:"item",key:r.key,dropPosition:"on"}},u,I));let J=a&&a.isDragging(r.key),U=Pt({...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:M?.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,M&&!M.isHidden&&H.createElement("div",{role:"row",style:{position:"absolute"}},H.createElement("div",{role:"gridcell"},H.createElement("div",{role:"button",...G,...M?.dropIndicatorProps,ref:I}))),H.createElement(at.div,{...we(F,U,m,T,A,C,R?.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":M?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode},H.createElement("div",{...g,style:{display:"contents"}},H.createElement(Br,{values:[[_I,{slots:{[xs]:{},selection:B}}],[jI,{slots:{[xs]:{},selection:B}}],[tm,{slots:{[xs]:P,drag:{...R?.dragButtonProps,ref:ie,style:{pointerEvents:"none"}}}}],[a3,{slots:{[xs]:{},description:b}}],[Rs,F$],[Bc,null],[wc,null],[Xp,null],[u3,{isSelected:v.isSelected}]]},U.children))))});function QK(t,e){e=Hs(e);let{dragAndDropHooks:n,dropState:r}=k.useContext(rm),i=k.useRef(null),{dropIndicatorProps:s,isHidden:a,isDropTarget:u}=n.useDropIndicator(t,r,i);return a?null:H.createElement(XK,{...t,dropIndicatorProps:s,isDropTarget:u,buttonRef:i,ref:e})}function YK(t,e){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,...s}=t,{visuallyHiddenProps:a}=nm(),u=Pt({...s,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 XK=k.forwardRef(YK);function JK(){let{dragAndDropHooks:t,dropState:e}=k.useContext(rm),n=k.useRef(null),{dropIndicatorProps:r}=t.useDropIndicator({target:{type:"root"}},e,n),i=e.isDropTarget({type:"root"}),{visuallyHiddenProps:s}=nm();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",...s,...r,ref:n})))}sa(Ph,function(e,n,r){let i=k.useContext(Bc),{isVirtualized:s}=k.useContext(Rs),{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]);Qw(m,h);let g=Pt({...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:qw(!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":s?1:void 0,role:"gridcell"},g.children)))});function ZK(t,e,n){let{overlayProps:r,underlayProps:i}=Jw({...t,isOpen:e.isOpen,onClose:e.close},n);return Zw({isDisabled:!e.isOpen}),z6(),k.useEffect(()=>{if(e.isOpen&&n.current)return p3([n.current],{shouldUseInert:!0})},[e.isOpen,n]),{modalProps:we(r),underlayProps:i}}let Nn=typeof document<"u"&&window.visualViewport;function e_(){let t=js(),[e,n]=k.useState(()=>t?{width:0,height:0}:x0());return k.useEffect(()=>{let r=u=>{n(c=>u.width===c.width&&u.height===c.height?c:u)},i=()=>{Nn&&Nn.scale>1||r(x0())},s,a=u=>{Nn&&Nn.scale>1||nc(de(u))&&(s=requestAnimationFrame(()=>{let c=_e();(!c||!nc(c))&&r({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}))};return r(x0()),Ai()&&window.addEventListener("blur",a,!0),Nn?Nn.addEventListener("resize",i):window.addEventListener("resize",i),()=>{cancelAnimationFrame(s),Ai()&&window.removeEventListener("blur",a,!0),Nn?Nn.removeEventListener("resize",i):window.removeEventListener("resize",i)}},[]),e}function x0(){return{width:Nn?Math.min(Nn.width*Nn.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:Nn?Nn.height*Nn.scale:document.documentElement.clientHeight}}const t_=k.createContext(null),S3=k.createContext(null),n_=k.forwardRef(function(e,n){if(k.useContext(S3))return H.createElement(A5,{...e,modalRef:n},e.children);let{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:a,defaultOpen:u,onOpenChange:c,children:f,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b,...v}=e;return H.createElement(JA,{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:a,defaultOpen:u,onOpenChange:c,isEntering:h,isExiting:m,UNSTABLE_portalContainer:g,shouldCloseOnInteractOutside:b},H.createElement(A5,{...v,modalRef:n},f))});function r_(t,e){[t,e]=Et(t,e,t_);let n=k.useContext(oa),r=m3(t),i=t.isOpen!=null||t.defaultOpen!=null||!n?r:n,s=Hs(e),a=k.useRef(null),u=Kb(s,i.isOpen),c=Kb(a,i.isOpen),f=u||c||t.isExiting||!1,h=js();return!i.isOpen&&!f||h?null:H.createElement(i_,{...t,state:i,isExiting:f,overlayRef:s,modalRef:a})}const JA=k.forwardRef(r_);function i_({UNSTABLE_portalContainer:t,...e}){let n=e.modalRef,{state:r}=e,{modalProps:i,underlayProps:s}=ZK(e,r,n),a=g3(e.overlayRef)||e.isEntering||!1,u=Pt({...e,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:e.isExiting,state:r}}),c=e_(),f,h;if(typeof document<"u"){let g=Ps(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(Fb,{isExiting:e.isExiting,portalContainer:t},H.createElement(at.div,{...we(Je(e,{global:!0}),s),...u,style:m,ref:e.overlayRef,"data-entering":a||void 0,"data-exiting":e.isExiting||void 0},H.createElement(Br,{values:[[S3,{modalProps:i,modalRef:n,isExiting:e.isExiting,isDismissable:e.isDismissable}],[oa,r]]},u.children)))}function A5(t){let{modalProps:e,modalRef:n,isExiting:r,isDismissable:i}=k.useContext(S3),s=k.useContext(oa),a=k.useMemo(()=>Gc(t.modalRef,n),[t.modalRef,n]),u=Hs(a),c=g3(u),f=Pt({...t,defaultClassName:"react-aria-Modal",values:{isEntering:c,isExiting:r,state:s}});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(Ib,{onDismiss:s.close}),f.children)}var ZA={};ZA={"Clear search":"مسح البحث"};var eB={};eB={"Clear search":"Изчистване на търсене"};var tB={};tB={"Clear search":"Vymazat hledání"};var nB={};nB={"Clear search":"Ryd søgning"};var rB={};rB={"Clear search":"Suche zurücksetzen"};var iB={};iB={"Clear search":"Απαλοιφή αναζήτησης"};var sB={};sB={"Clear search":"Clear search"};var oB={};oB={"Clear search":"Borrar búsqueda"};var aB={};aB={"Clear search":"Tühjenda otsing"};var lB={};lB={"Clear search":"Tyhjennä haku"};var uB={};uB={"Clear search":"Effacer la recherche"};var cB={};cB={"Clear search":"נקה חיפוש"};var dB={};dB={"Clear search":"Obriši pretragu"};var fB={};fB={"Clear search":"Keresés törlése"};var hB={};hB={"Clear search":"Cancella ricerca"};var pB={};pB={"Clear search":"検索をクリア"};var mB={};mB={"Clear search":"검색 지우기"};var gB={};gB={"Clear search":"Išvalyti iešką"};var bB={};bB={"Clear search":"Notīrīt meklēšanu"};var yB={};yB={"Clear search":"Tøm søk"};var vB={};vB={"Clear search":"Zoekactie wissen"};var xB={};xB={"Clear search":"Wyczyść zawartość wyszukiwania"};var CB={};CB={"Clear search":"Limpar pesquisa"};var EB={};EB={"Clear search":"Limpar pesquisa"};var DB={};DB={"Clear search":"Ştergeţi căutarea"};var kB={};kB={"Clear search":"Очистить поиск"};var SB={};SB={"Clear search":"Vymazať vyhľadávanie"};var $B={};$B={"Clear search":"Počisti iskanje"};var wB={};wB={"Clear search":"Obriši pretragu"};var TB={};TB={"Clear search":"Rensa sökning"};var AB={};AB={"Clear search":"Aramayı temizle"};var BB={};BB={"Clear search":"Очистити пошук"};var MB={};MB={"Clear search":"清除搜索"};var RB={};RB={"Clear search":"清除搜尋條件"};var NB={};NB={"ar-AE":ZA,"bg-BG":eB,"cs-CZ":tB,"da-DK":nB,"de-DE":rB,"el-GR":iB,"en-US":sB,"es-ES":oB,"et-EE":aB,"fi-FI":lB,"fr-FR":uB,"he-IL":cB,"hr-HR":dB,"hu-HU":fB,"it-IT":hB,"ja-JP":pB,"ko-KR":mB,"lt-LT":gB,"lv-LV":bB,"nb-NO":yB,"nl-NL":vB,"pl-PL":xB,"pt-BR":CB,"pt-PT":EB,"ro-RO":DB,"ru-RU":kB,"sk-SK":SB,"sl-SI":$B,"sr-SP":wB,"sv-SE":TB,"tr-TR":AB,"uk-UA":BB,"zh-CN":MB,"zh-TW":RB};function s_(t){return t&&t.__esModule?t.default:t}function o_(t,e,n){let r=mr(s_(NB),"@react-aria/searchfield"),{isDisabled:i,isReadOnly:s,onSubmit:a,onClear:u,type:c="search"}=t,f=D=>{const T=D.key;T==="Enter"&&(i||s)&&D.preventDefault(),!(i||s)&&(T==="Enter"&&a&&(D.preventDefault(),a(e.value)),T==="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}=UI({...t,value:e.value,onChange:e.setValue,onKeyDown:s?t.onKeyDown:_s(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||s,onPress:h,onPressStart:m},descriptionProps:v,errorMessageProps:C,...E}}function a_(t){let[e,n]=Vs(B5(t.value),B5(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function B5(t){if(t!=null)return t.toString()}const l_=k.createContext(null),u_=Zp(function(e,n){[e,n]=Et(e,n,l_);let{validationBehavior:r}=Al(NI)||{},i=e.validationBehavior??r??"native",s=k.useRef(null);[e,s]=Et(e,s,Xp);let[a,u]=$S(!e["aria-label"]&&!e["aria-labelledby"]),c=a_({...e,validationBehavior:i}),{labelProps:f,inputProps:h,clearButtonProps:m,descriptionProps:g,errorMessageProps:b,...v}=o_({...wS(e),label:u,validationBehavior:i},c,s),C=Pt({...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(Br,{values:[[o3,{...f,ref:a}],[Mw,{...h,ref:s}],[tm,m],[a3,{slots:{description:g,errorMessage:b}}],[Bw,{isInvalid:v.isInvalid,isDisabled:e.isDisabled||!1}],[TI,v]]},C.children))});function PB(t,e,n){const{isSelected:r}=e,{isPressed:i,buttonProps:s}=Sw({...t,onPress:_s(e.toggle,t.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:t.isDisabled||!1,buttonProps:we(s,{"aria-pressed":r})}}function c_(t,e){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=t;let[s,a]=k.useState(!1);Le(()=>{a(!!(e.current&&e.current.parentElement?.closest('[role="toolbar"]')))});const{direction:u}=Ri(),c=u==="rtl"&&i==="horizontal";let f=aF(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:s?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:s?void 0:h,onFocusCapture:s?void 0:b,onBlurCapture:s?void 0:g}}}function d_(t,e,n){let{isDisabled:r}=t,{toolbarProps:i}=c_(t,n);return{groupProps:{...i,role:e.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function f_(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:s,isDisabled:a,buttonProps:u}=PB({...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:s,isDisabled:a,buttonProps:u}}function h_(t){let{selectionMode:e="single",disallowEmptySelection:n,isDisabled:r=!1}=t,[i,s]=Vs(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:s,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]),s(u)},setSelected(a,u){u!==i.has(a)&&this.toggleKey(a)}}}const p_=k.createContext({}),OB=k.createContext(null),m_=k.forwardRef(function(e,n){[e,n]=Et(e,n,p_);let r=h_(e),{groupProps:i}=d_(e,r,n),s=Pt({...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,s,i),ref:n,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},H.createElement(OB.Provider,{value:r},H.createElement(l3,null,s.children)))}),g_=k.createContext({}),b_=k.forwardRef(function(e,n){[e,n]=Et(e,n,g_);let r=k.useContext(OB),i=KI(r&&e.id!=null?{isSelected:r.selectedKeys.has(e.id),onChange(E){r.setSelected(e.id,E)}}:e),{buttonProps:s,isPressed:a,isSelected:u,isDisabled:c}=r&&e.id!=null?f_({...e,id:e.id},r,n):PB({...e,id:e.id!=null?String(e.id):void 0},i,n),{focusProps:f,isFocused:h,isFocusVisible:m}=Ns(e),{hoverProps:g,isHovered:b}=Us({...e,isDisabled:c}),v=Pt({...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,s,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(u3.Provider,{value:{isSelected:u}},v.children))});function y_(t,e,n,r,i=!1,s=!1){switch(r){case"left":return i?C0(t,e,n,s,"left"):E0(t,e,n,s,"left");case"right":return i?E0(t,e,n,s,"right"):C0(t,e,n,s,"right");case"up":return E0(t,e,n,s);case"down":return C0(t,e,n,s)}}function C0(t,e,n,r=!1,i=null){if(!n)return{type:"root"};if(n.type==="root"){let s=t.getFirstKey?.()??null;return s!=null?{type:"item",key:s,dropPosition:"before"}:null}if(n.type==="item"){let s=null;i?s=i==="right"?t.getKeyRightOf?.(n.key,{includeDisabled:!0}):t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):s=t.getKeyBelow?.(n.key,{includeDisabled:!0});let a=$3(e,n.key,u=>e.getKeyAfter(u));if(s!=null&&s!==a)return{type:"item",key:s,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=s!=null?e.getItem(s):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 E0(t,e,n,r=!1,i=null){if(!n||r&&n.type==="root"){let s=null,a=t.getLastKey?.();for(;a!=null;){let u=e.getItem(a);if(u?.type!=="item")break;s=a,a=u?.parentKey}return s!=null?{type:"item",key:s,dropPosition:"after"}:null}if(n.type==="item"){let s=null;i?s=i==="left"?t.getKeyLeftOf?.(n.key,{includeDisabled:!0}):t.getKeyRightOf?.(n.key,{includeDisabled:!0}):s=t.getKeyAbove?.(n.key,{includeDisabled:!0});let a=$3(e,n.key,u=>e.getKeyBefore(u));if(s!=null&&s!==a)return{type:"item",key:s,dropPosition:n.dropPosition};switch(n.dropPosition){case"before":{let u=e.getItem(n.key);if(u&&u.prevKey!=null){let c=M5(e,u.prevKey);if(c)return c}return s!=null?{type:"item",key:s,dropPosition:"on"}:{type:"root"}}case"on":return{type:"item",key:n.key,dropPosition:"before"};case"after":{let u=M5(e,n.key);return u||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function M5(t,e){let n=t.getItem(e),r=$3(t,e,s=>t.getKeyAfter(s)),i=r!=null?t.getItem(r):null;if(n&&i&&i.level>n.level){let s=null;if("lastChildKey"in n)for(s=n.lastChildKey!=null?t.getItem(n.lastChildKey):null;s&&s.type!=="item"&&s.prevKey!=null;)s=t.getItem(s.prevKey);else s=Array.from(n.childNodes).findLast(a=>a.type==="item")||null;if(s)return{type:"item",key:s.key,dropPosition:"after"}}return null}function $3(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 If=20;function v_(t){let e=k.useRef(null),n=k.useRef(!0),r=k.useRef(!0);k.useEffect(()=>{if(t.current){e.current=Ps(t.current)?t.current:Vr(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 s=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(s))},[e,i]);return{move(a,u){if(!Jy()||Ai()||!e.current)return;let c=e.current.getBoundingClientRect(),f=If,h=If,m=c.height-If,g=c.width-If;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(s))):this.stop()},stop(){i.timer&&(cancelAnimationFrame(i.timer),i.timer=void 0)}}}function x_(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:T="all",shouldAcceptItemDrop:$}=r.props,{draggingKeys:A}=zt,B=Hr(n),{target:P,dropOperation:R,items:M}=g,I=M;(T!=="all"||$)&&(I=M.filter(G=>{let J;return G.kind==="directory"?J=new Set([MT]):J=G.kind==="file"?new Set([G.type]):G.types,T==="all"||T.some(U=>J.has(U))?P.type==="item"&&P.dropPosition==="on"&&$?$(P,J):!0:!1})),I.length>0&&(P.type==="root"&&v&&await v({items:I,dropOperation:R}),P.type==="item"&&(P.dropPosition==="on"&&C&&await C({items:I,dropOperation:R,isInternal:B,target:P}),D&&B&&await D({keys:A,dropOperation:R,target:P}),P.dropPosition!=="on"&&(!B&&b&&await b({items:I,dropOperation:R,target:P}),B&&E&&await E({keys:A,dropOperation:R,target:P}))))},[r,n]),s=v_(n),{dropProps:a}=RK({ref:n,onDropEnter(){r.nextTarget!=null&&e.setTarget(r.nextTarget)},onDropMove(g){r.nextTarget!=null&&e.setTarget(r.nextTarget),s.move(g.x,g.y)},getDropOperationForPoint(g,b,v,C){let{draggingKeys:E,dropCollectionRef:D}=zt,T=Hr(n),$=B=>e.getDropOperation({target:B,types:g,allowedOperations:b,isInternal:T,draggingKeys:E})!=="cancel",A=t.dropTargetDelegate.getDropTargetFromPoint(v,C,$);if(!A)return r.dropOperation="cancel",r.nextTarget=null,"cancel";if(r.dropOperation=e.getDropOperation({target:A,types:g,allowedOperations:b,isInternal:T,draggingKeys:E}),r.dropOperation==="cancel"){let B={type:"root"},P=e.getDropOperation({target:B,types:g,allowedOperations:b,isInternal:T,draggingKeys:E});P!=="cancel"&&(A=B,r.dropOperation=P)}return A&&r.dropOperation!=="cancel"&&n?.current!==D?.current&&Za(n),r.nextTarget=r.dropOperation==="cancel"?null:A,r.dropOperation},onDropExit(){Za(void 0),e.setTarget(null),s.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){Za(n),e.target&&f(g,e.target);let{draggingCollectionRef:b}=zt;b==null&&OT()}}),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:T}=u.current;if(g.collection.size>v.size&&g.selectionManager.isSelectionEqual(C)){let $=new Set,A=g.collection.getFirstKey();for(;A!=null;){let B=g.collection.getItem(A);B?.type==="item"&&!v.getItem(B.key)&&$.add(B.key),B?.hasChildNodes&&g.collection.getItem(B.lastChildKey)?.type==="item"?A=B.firstChildKey:A=g.collection.getKeyAfter(A)}if(g.selectionManager.setSelectedKeys($),g.selectionManager.focusedKey===E){let B=$.keys().next().value;if(B!=null){let P=g.collection.getItem(B),R=u.current.target,M=g.collection.expandedKeys?g.collection.expandedKeys.has(P?.parentKey):!1;P&&(P?.type==="cell"||R.type==="item"&&R.dropPosition==="on"&&!M)&&(B=P.parentKey),B!=null&&g.selectionManager.setFocusedKey(B),g.selectionManager.selectionMode==="none"&&Bo("keyboard")}}}else E!=null&&g.selectionManager.focusedKey===E&&D&&b.type==="item"&&b.dropPosition!=="on"&&T.has(g.collection.getItem(E)?.parentKey)?(g.selectionManager.setFocusedKey(g.collection.getItem(E)?.parentKey??null),Bo("keyboard")):g.selectionManager.focusedKey===E&&b.type==="item"&&b.dropPosition==="on"&&g.collection.getItem(b.key)!=null?(g.selectionManager.setFocusedKey(b.key),Bo("keyboard")):g.selectionManager.focusedKey!=null&&!g.selectionManager.isSelected(g.selectionManager.focusedKey)&&Bo("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:zt.draggingKeys,isInternal:Hr(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}=Ri();k.useEffect(()=>{if(!n.current)return;let g=(C,E=!0,D="down")=>y_(r.props.keyboardDelegate,r.state.collection,C,D,h==="rtl",E),b=(C,E=!0)=>g(C,E,"up"),v=(C,E,D,T,$=!0)=>{let A=0,B,{draggingKeys:P}=zt,R=Hr(n);do{let M=T(C,$);if(!M)return null;C=M,B=r.state.getDropOperation({target:M,types:E,allowedOperations:D,isInternal:R,draggingKeys:P}),C.type==="root"&&A++}while(B==="cancel"&&!r.state.isDropTarget(C)&&A<2);return B==="cancel"?null:C};return LT({element:n.current,preventFocusOnDrop:!0,getDropOperation(C,E){if(r.state.target){let{draggingKeys:T}=zt,$=Hr(n);return r.state.getDropOperation({target:r.state.target,types:C,allowedOperations:E,isInternal:$,draggingKeys:T})}return v(null,C,E,g)?"move":"cancel"},onDropEnter(C,E){let D=Vo(E.items),T=r.state.selectionManager,$=null;Za(n);let A=T.focusedKey,B="after",P=A!=null?r.state.collection.getItem(A):null;if(P?.type==="cell"&&(A=P.parentKey),A!=null&&T.isSelected(A)&&(T.selectedKeys.size>1&&T.firstSelectedKey===A?B="before":A=T.lastSelectedKey),A!=null){$={type:"item",key:A,dropPosition:B};let{draggingKeys:R}=zt,M=Hr(n);r.state.getDropOperation({target:$,types:D,allowedOperations:E.allowedDropOperations,isInternal:M,draggingKeys:R})==="cancel"&&($=v($,D,E.allowedDropOperations,g,!1)??v($,D,E.allowedDropOperations,b,!1))}$||($=v(null,D,E.allowedDropOperations,g)),r.state.setTarget($)},onDropExit(){Za(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){Za(n),r.state.target&&f(C,E||r.state.target)},onKeyDown(C,E){let{keyboardDelegate:D}=r.props,T=Vo(E.items);switch(C.key){case"ArrowDown":if(D.getKeyBelow){let $=v(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"down"));r.state.setTarget($)}break;case"ArrowUp":if(D.getKeyAbove){let $=v(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"up"));r.state.setTarget($)}break;case"ArrowLeft":if(D.getKeyLeftOf){let $=v(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"left"));r.state.setTarget($)}break;case"ArrowRight":if(D.getKeyRightOf){let $=v(r.state.target,T,E.allowedDropOperations,(A,B)=>g(A,B,"right"));r.state.setTarget($)}break;case"Home":if(D.getFirstKey){let $=v(null,T,E.allowedDropOperations,g);r.state.setTarget($)}break;case"End":if(D.getLastKey){let $=v(null,T,E.allowedDropOperations,b);r.state.setTarget($)}break;case"PageDown":if(D.getKeyPageBelow){let $=r.state.target;if(!$)$=v(null,T,E.allowedDropOperations,g);else{let A=D.getFirstKey?.();$.type==="item"&&(A=$.key);let B=null;A!=null&&(B=D.getKeyPageBelow(A));let P=$.type==="item"?$.dropPosition:"after";if((B==null||$.type==="item"&&$.key===D.getLastKey?.())&&(B=D.getLastKey?.()??null,P="after"),B==null)break;$={type:"item",key:B,dropPosition:P};let{draggingCollectionRef:R,draggingKeys:M}=zt,I=R?.current===n?.current;r.state.getDropOperation({target:$,types:T,allowedOperations:E.allowedDropOperations,isInternal:I,draggingKeys:M})==="cancel"&&($=v($,T,E.allowedDropOperations,g,!1)??v($,T,E.allowedDropOperations,b,!1))}r.state.setTarget($??r.state.target)}break;case"PageUp":{if(!D.getKeyPageAbove)break;let $=r.state.target;if(!$)$=v(null,T,E.allowedDropOperations,b);else if($.type==="item"){if($.key===D.getFirstKey?.())$={type:"root"};else{let R=D.getKeyPageAbove($.key),M=$.dropPosition;if(R==null&&(R=D.getFirstKey?.(),M="before"),R==null)break;$={type:"item",key:R,dropPosition:M}}let{draggingKeys:A}=zt,B=Hr(n);r.state.getDropOperation({target:$,types:T,allowedOperations:E.allowedDropOperations,isInternal:B,draggingKeys:A})==="cancel"&&($=v($,T,E.allowedDropOperations,b,!1)??v($,T,E.allowedDropOperations,g,!1))}r.state.setTarget($??r.state.target);break}}r.props.onKeyDown?.(C)}})},[r,n,f,h]);let m=rn();return C3.set(e,{id:m,ref:n}),{collectionProps:we(a,{id:m,"aria-describedby":null})}}function LB(t,e,n){let{dropProps:r}=bA(),i=fK(e);k.useEffect(()=>{if(n.current)return CK({element:n.current,target:t.target,getDropOperation(h,m){let{draggingKeys:g}=zt,b=Hr(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 s=D3(),{draggingKeys:a}=zt,u=Hr(i),c=s&&e.getDropOperation({target:t.target,types:Vo(s.dragTarget.items),allowedOperations:s.dragTarget.allowedDropOperations,isInternal:u,draggingKeys:a})!=="cancel",f=e.isDropTarget(t.target);return k.useEffect(()=>{s&&f&&n.current&&n.current.focus()},[f,s,n]),{dropProps:{...r,"aria-hidden":!s||c?void 0:"true"},isDropTarget:f}}function C_(t){return t&&t.__esModule?t.default:t}function E_(t,e,n){let{target:r}=t,{collection:i}=e,s=mr(C_(Jc),"@react-aria/dnd"),a=D3(),{dropProps:u}=LB(t,e,n),c=rn(),f=v=>v==null?"":i.getTextValue?.(v)??i.getItem(v)?.textValue??"",h="",m;if(r.type==="root")h=s.format("dropOnRoot"),m=`${c} ${dK(e)}`;else if(r.dropPosition==="on")h=s.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=s.format("insertBetween",{beforeItemText:f(v),afterItemText:f(C)}):v!=null?h=s.format("insertAfter",{itemText:f(v)}):C!=null&&(h=s.format("insertBefore",{itemText:f(C)}))}let g=e.isDropTarget(r),b=a?u["aria-hidden"]:"true";return{dropIndicatorProps:{...u,id:c,"aria-roledescription":s.format("dropIndicator"),"aria-label":h,"aria-labelledby":m,"aria-hidden":b,tabIndex:-1},isDropTarget:g,isHidden:!g&&!!b}}function D_(t){return t&&t.__esModule?t.default:t}const R5={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function k_(t){let{hasDragButton:e,isDisabled:n}=t,r=mr(D_(Jc),"@react-aria/dnd"),i=k.useRef({options:t,x:0,y:0}).current;i.options=t;let s=k.useRef(null),[a,u]=k.useState(!1),c=B=>{s.current=B,u(!!B)},{addGlobalListener:f,removeAllGlobalListeners:h}=Wc(),m=k.useRef(null),g=B=>{if(B.defaultPrevented)return;if(B.stopPropagation(),m.current==="virtual"){B.preventDefault(),E(de(B)),m.current=null;return}typeof t.onDragStart=="function"&&t.onDragStart({type:"dragstart",x:B.clientX,y:B.clientY});let P=t.getItems();B.dataTransfer.clearData?.(),hK(B.dataTransfer,P);let R=Tt.all;if(typeof t.getAllowedDropOperations=="function"){let G=t.getAllowedDropOperations();R=Tt.none;for(let J of G)R|=Tt[J]||Tt.none}y0(R);let M=AT[R]||"none";B.dataTransfer.effectAllowed=M==="cancel"?"none":M,typeof t.preview?.current=="function"&&t.preview.current(P,(G,J,U)=>{if(!G)return;let ie=G.getBoundingClientRect(),F=B.currentTarget.getBoundingClientRect(),te=B.clientX-F.x,O=B.clientY-F.y;(te>ie.width||O>ie.height)&&(te=ie.width/2,O=ie.height/2);let K=te,Y=O;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`,B.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=B.clientX,i.y=B.clientY;let I=de(B);requestAnimationFrame(()=>{c(I)})},b=B=>{B.stopPropagation(),!(B.clientX===i.x&&B.clientY===i.y)&&(typeof t.onDragMove=="function"&&t.onDragMove({type:"dragmove",x:B.clientX,y:B.clientY}),i.x=B.clientX,i.y=B.clientY)},v=B=>{if(B.stopPropagation(),typeof t.onDragEnd=="function"){let P={type:"dragend",x:B.clientX,y:B.clientY,dropOperation:ic[B.dataTransfer.dropEffect]};ph&&(P.dropOperation=ic[ph]),t.onDragEnd(P)}c(null),h(),y0(Tt.none),Hh(void 0)};k.useEffect(()=>()=>{if(s.current&&(!s.current.isConnected||parseInt(k.version,10)<17)){if(typeof i.options.onDragEnd=="function"){let B={type:"dragend",x:0,y:0,dropOperation:ic[ph||"none"]};i.options.onDragEnd(B)}c(null),y0(Tt.none),Hh(void 0)}},[i]);let C=B=>{B.pointerType!=="keyboard"&&B.pointerType!=="virtual"||E(B.target)},E=B=>{if(typeof i.options.onDragStart=="function"){let P=B.getBoundingClientRect();i.options.onDragStart({type:"dragstart",x:P.x+P.width/2,y:P.y+P.height/2})}EK({element:B,items:i.options.getItems(),allowedDropOperations:typeof i.options.getAllowedDropOperations=="function"?i.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(P){c(null),typeof i.options.onDragEnd=="function"&&i.options.onDragEnd(P)}},r),c(B)},D=E3(),T=a?R5[D].end:R5[D].start,$=Yc(r.format(T)),A={};return e||(A={...$,onPointerDown(B){if(m.current=Zy(B.nativeEvent)?"virtual":B.pointerType,B.width<1&&B.height<1)m.current="virtual";else{let P=B.currentTarget.getBoundingClientRect(),R=B.clientX-P.x,M=B.clientY-P.y,I=P.width/2,G=P.height/2;Math.abs(R-I)<=.5&&Math.abs(M-G)<=.5?m.current="virtual":m.current=B.pointerType}},onKeyDownCapture(B){de(B)===B.currentTarget&&B.key==="Enter"&&(B.preventDefault(),B.stopPropagation())},onKeyUpCapture(B){de(B)===B.currentTarget&&B.key==="Enter"&&(B.preventDefault(),B.stopPropagation(),E(de(B)))},onClick(B){(Wp(B.nativeEvent)||m.current==="virtual")&&(B.preventDefault(),B.stopPropagation(),E(de(B)))}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:!1}:{dragProps:{...A,draggable:"true",onDragStart:g,onDrag:b,onDragEnd:v},dragButtonProps:{...$,onPress:C},isDragging:a}}function S_(t){return t&&t.__esModule?t.default:t}const $_={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function w_(t,e){let n=mr(S_(Jc),"@react-aria/dnd"),r=e.isDisabled||e.selectionManager.isDisabled(t.key),{dragProps:i,dragButtonProps:s}=k_({getItems(){return e.getItems(t.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:t.hasDragButton,onDragStart(b){e.startDrag(t.key,b),vK(e.draggingKeys)},onDragMove(b){e.moveDrag(b)},onDragEnd(b){let{dropOperation:v}=b,C=v==="cancel"?!1:Hr();e.endDrag({...b,keys:e.draggingKeys,isInternal:C}),OT()}}),a=e.collection.getItem(t.key),u=e.getKeysForDrag(t.key).size,c=u>1&&e.selectionManager.isSelected(t.key),f,h,m=E3();if(!t.hasDragButton&&e.selectionManager.selectionMode!=="none"){let b=$_[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=Yc(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:{...s,isDisabled:r,"aria-label":f}}}function T_(t,e,n){let{draggingCollectionRef:r}=zt;e.draggingKeys.size>0&&r?.current!==n.current&&yK(n)}const A_=H.forwardRef(function(e,n){let r=e.children,[i,s]=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,Tl.flushSync(()=>{s(m)}),f(a.current,g,b),u.current=requestAnimationFrame(()=>{s(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 B_(t){let{getItems:e,isDisabled:n,collection:r,selectionManager:i,onDragStart:s,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 T=!1,$=D.parentKey;for(;$!=null;){if(i.selectedKeys.has($)){T=!0;break}let A=r.getItem($);$=A?A.parentKey:null}T||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 T=r.getItem(D)?.value;T!=null&&E.push(T)}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 s=="function"&&s({...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 M_(t){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:r,onRootDrop:i,onItemDrop:s,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 A=f.getItem($.key);return A&&A.prevKey!=null?{type:"item",key:A.prevKey,dropPosition:"after"}:null}else if($.dropPosition==="after"){let A=f.getItem($.key);return A&&A.nextKey!=null?{type:"item",key:A.nextKey,dropPosition:"before"}:null}return null},T=k.useCallback($=>{let{target:A,types:B,allowedOperations:P,isInternal:R,draggingKeys:M}=$;if(n||!A)return"cancel";if(e==="all"||e.some(I=>B.has(I))){let I=r&&A.type==="item"&&!R&&(A.dropPosition==="before"||A.dropPosition==="after"),G=a&&A.type==="item"&&R&&(A.dropPosition==="before"||A.dropPosition==="after")&&R_(f,A,M),J=A.type!=="item"||A.dropPosition!=="on"||!c||c(A,B),U=u&&A.type==="item"&&R&&J,ie=i&&A.type==="root"&&!R,F=s&&A.type==="item"&&A.dropPosition==="on"&&!(R&&A.key!=null&&M.has(A.key))&&J;if(b||I||G||U||ie||F)return g?g(A,B,P):P[0]}return"cancel"},[n,f,e,g,r,i,s,c,a,u,b]);return{collection:f,selectionManager:h,isDisabled:n,target:v,setTarget($){if(this.isDropTarget($))return;let A=E.current;A&&typeof t.onDropExit=="function"&&t.onDropExit({type:"dropexit",x:0,y:0,target:A}),$&&typeof m=="function"&&m({type:"dropenter",x:0,y:0,target:$}),E.current=$??null,C($??null)},isDropTarget($){let A=E.current;return!A||!$?!1:D0($,A)?!0:$?.type==="item"&&A?.type==="item"&&$.key!==A.key&&$.dropPosition!==A.dropPosition&&$.dropPosition!=="on"&&A.dropPosition!=="on"?D0(D($),A)||D0($,D(A)):!1},getDropOperation($){let{target:A,isInternal:B,draggingKeys:P}=$;if(B&&A.type==="item"&&P.size>0){if(P.has(A.key)&&A.dropPosition==="on")return"cancel";let R=A.key;for(;R!=null;){let I=f.getItem(R)?.parentKey;if(I!=null&&P.has(I))return"cancel";R=I??null}}return T($)}}}function D0(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 R_(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 N_{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(),s=this.orientation==="horizontal"?e:n,a=this.orientation==="horizontal"?n:e;s+=this.getPrimaryStart(i),a+=this.getSecondaryStart(i);let u=this.layout==="stack"?s: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),A=v[$],B=b.get(String(A.key));if(!B)break;let P=B.getBoundingClientRect(),R=M=>{M?C=$+1:E=$};if(s<this.getPrimaryStart(P))R(c);else if(s>this.getPrimaryEnd(P))R(!c);else if(a<this.getSecondaryStart(P))R(f);else if(a>this.getSecondaryEnd(P))R(!f);else{let M={type:"item",key:A.key,dropPosition:"on"};if(r(M))u<=this.getFlowStart(P)+5&&r({...M,dropPosition:"before"})?M.dropPosition=h?"after":"before":u>=this.getFlowEnd(P)-5&&r({...M,dropPosition:"after"})&&(M.dropPosition=h?"before":"after");else{let I=this.getFlowStart(P)+this.getFlowSize(P)/2;u<=I&&r({...M,dropPosition:"before"})?M.dropPosition=h?"after":"before":u>=I&&r({...M,dropPosition:"after"})&&(M.dropPosition=h?"before":"after")}return M}}let D=v[Math.min(C,v.length-1)];return i=b.get(String(D.key))?.getBoundingClientRect(),i&&(s<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 P_(t){return{dragAndDropHooks:k.useMemo(()=>{let{onDrop:n,onInsert:r,onItemDrop:i,onReorder:s,onMove:a,onRootDrop:u,getItems:c,renderDragPreview:f,renderDropIndicator:h,dropTargetDelegate:m}=t,g=!!c,b=!!(n||r||i||s||a||u),v={};return g&&(v.useDraggableCollectionState=function(E){return B_({...E,...t})},v.useDraggableCollection=T_,v.useDraggableItem=w_,v.DragPreview=A_,v.renderDragPreview=f,v.isVirtualDragging=DK),b&&(v.useDroppableCollectionState=function(E){return M_({...E,...t})},v.useDroppableItem=LB,v.useDroppableCollection=function(E,D,T){return x_({...E,...t},D,T)},v.useDropIndicator=E_,v.renderDropIndicator=h,v.dropTargetDelegate=m,v.ListDropTargetDelegate=N_),v},[t])}}function O_(t,e){const n=t&&t!=="/"?t.replace(/\/+$/,""):"";return!n||e===n||e.startsWith(`${n}/`)||e.startsWith(`${n}?`)?e:`${n}${e}`}const L_=new AP({defaultOptions:{queries:{staleTime:5e3,retry:1,refetchOnWindowFocus:!0}}});function z_({router:t}){return w.jsx(BP,{client:L_,children:w.jsx(lz,{navigate:e=>t.history.push(O_(t.basepath,e)),children:w.jsx(PL,{router:t})})})}const Os=["backlog","todo","in_progress","done","canceled"],Si={backlog:"Backlog",todo:"Todo",in_progress:"In Progress",done:"Done",canceled:"Canceled"};let zB="/api";class I_ extends Error{status;reason;constructor(e,n,r){super(n),this.name="ApiError",this.status=e,this.reason=r}}async function Ni(t,e){const n=await fetch(`${zB}${t}`,{headers:e?.body?{"Content-Type":"application/json"}:void 0,...e}),r=await n.json().catch(()=>({}));if(!n.ok)throw new I_(n.status,r.error??`${n.status}`,r.reason??null);return r}let F_=()=>new URLSearchParams(location.search).get("board");function K_(t){const e=new EventSource(`${zB}/events`);return e.onmessage=n=>{try{const r=JSON.parse(n.data);t(r.board)}catch{t(void 0)}},()=>e.close()}let __=K_;function j_(t){return __(t)}function IB(){return F_()}function qs(t){const e=IB();return e?`${t}${t.includes("?")?"&":"?"}board=${encodeURIComponent(e)}`:t}function H_(t){return Ni(qs("/tasks"),{method:"POST",body:JSON.stringify(t)})}function FB(t,e){return Ni(qs(`/tasks/${t}`),{method:"PATCH",body:JSON.stringify(e)})}function V_(t){return Ni(qs(`/tasks/${t}`),{method:"DELETE"})}function U_(t){return Ni(qs(`/tasks/${t}`))}function q_(t,e){return Ni(qs(`/tasks/${t}/comments`),{method:"POST",body:JSON.stringify({body:e})})}function G_(t,e){return Ni(qs(`/tasks/${t}/comments/${e}`),{method:"DELETE"})}function W_(){return jp({queryKey:["boards"],queryFn:()=>Ni("/boards").then(t=>t.boards)})}function Q_(t){return jp({queryKey:["project",t],queryFn:()=>Ni(qs("/project"))})}function Y_(t){return jp({queryKey:["tasks",t],queryFn:()=>Ni(qs("/tasks")).then(e=>e.tasks)})}function X_(t,e){return jp({queryKey:["task",t,e],queryFn:()=>U_(e),enabled:Number.isFinite(e)})}const N5=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,P5=Uy,Rl=(t,e)=>n=>{var r;if(e?.variants==null)return P5(t,n?.class,n?.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(f=>{const h=n?.[f],m=s?.[f];if(h===null)return null;const g=N5(h)||N5(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({...s,...u}[C]):{...s,...u}[C]===E})?[...f,m,g]:f},[]);return P5(t,a,c,n?.class,n?.className)},J_=(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}),KB=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Uh="-",O5=[],ej="arbitrary..",tj=t=>{const e=rj(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return nj(a);const u=a.split(Uh),c=u[0]===""&&u.length>1?1:0;return _B(u,c,e)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?J_(f,c):c:f||O5}return n[a]||O5}}},_B=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],s=n.nextPart.get(i);if(s){const f=_B(t,e+1,s);if(f)return f}const a=n.validators;if(a===null)return;const u=e===0?t.join(Uh):t.slice(e).join(Uh),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},nj=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?ej+r:void 0})(),rj=t=>{const{theme:e,classGroups:n}=t;return ij(n,e)},ij=(t,e)=>{const n=KB();for(const r in t){const i=t[r];w3(i,n,r,e)}return n},w3=(t,e,n,r)=>{const i=t.length;for(let s=0;s<i;s++){const a=t[s];sj(a,e,n,r)}},sj=(t,e,n,r)=>{if(typeof t=="string"){oj(t,e,n);return}if(typeof t=="function"){aj(t,e,n,r);return}lj(t,e,n,r)},oj=(t,e,n)=>{const r=t===""?e:jB(e,t);r.classGroupId=n},aj=(t,e,n,r)=>{if(uj(t)){w3(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Z_(n,t))},lj=(t,e,n,r)=>{const i=Object.entries(t),s=i.length;for(let a=0;a<s;a++){const[u,c]=i[a];w3(c,jB(e,u),n,r)}},jB=(t,e)=>{let n=t;const r=e.split(Uh),i=r.length;for(let s=0;s<i;s++){const a=r[s];let u=n.nextPart.get(a);u||(u=KB(),n.nextPart.set(a,u)),n=u}return n},uj=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,cj=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Ub="!",L5=":",dj=[],z5=(t,e,n,r,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),fj=t=>{const{prefix:e,experimentalParseClassName:n}=t;let r=i=>{const s=[];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===L5){s.push(i.slice(c,C)),c=C+1;continue}if(E==="/"){f=C;continue}}E==="["?a++:E==="]"?a--:E==="("?u++:E===")"&&u--}const m=s.length===0?i:i.slice(c);let g=m,b=!1;m.endsWith(Ub)?(g=m.slice(0,-1),b=!0):m.startsWith(Ub)&&(g=m.slice(1),b=!0);const v=f&&f>c?f-c:void 0;return z5(s,b,g,v)};if(e){const i=e+L5,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):z5(dj,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},hj=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],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}},pj=t=>({cache:cj(t.cacheSize),parseClassName:fj(t),sortModifiers:hj(t),postfixLookupClassGroupIds:mj(t),...tj(t)}),mj=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},gj=/\s+/,bj=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=e,u=[],c=t.trim().split(gj);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,T;if(D){const R=C.substring(0,E);T=r(R);const M=T&&a[T]?r(C):void 0;M&&M!==T&&(T=M,D=!1)}else T=r(C);if(!T){if(!D){f=m+(f.length>0?" "+f:f);continue}if(T=r(C),!T){f=m+(f.length>0?" "+f:f);continue}D=!1}const $=b.length===0?"":b.length===1?b[0]:s(b).join(":"),A=v?$+Ub:$,B=A+T;if(u.indexOf(B)>-1)continue;u.push(B);const P=i(T,D);for(let R=0;R<P.length;++R){const M=P[R];u.push(A+M)}f=m+(f.length>0?" "+f:f)}return f},yj=(...t)=>{let e=0,n,r,i="";for(;e<t.length;)(n=t[e++])&&(r=HB(n))&&(i&&(i+=" "),i+=r);return i},HB=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=HB(t[r]))&&(n&&(n+=" "),n+=e);return n},vj=(t,...e)=>{let n,r,i,s;const a=c=>{const f=e.reduce((h,m)=>m(h),t());return n=pj(f),r=n.cache.get,i=n.cache.set,s=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=bj(c,n);return i(c,h),h};return s=a,(...c)=>s(yj(...c))},xj=[],Lt=t=>{const e=n=>n[t]||xj;return e.isThemeGetter=!0,e},VB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,UB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ej=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dj=/\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$/,kj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$j=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ls=t=>Cj.test(t),Ne=t=>!!t&&!Number.isNaN(Number(t)),zr=t=>!!t&&Number.isInteger(Number(t)),k0=t=>t.endsWith("%")&&Ne(t.slice(0,-1)),hi=t=>Ej.test(t),qB=()=>!0,wj=t=>Dj.test(t)&&!kj.test(t),T3=()=>!1,Tj=t=>Sj.test(t),Aj=t=>$j.test(t),Bj=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)),Rj=t=>Gs(t,QB,T3),pe=t=>VB.test(t),Eo=t=>Gs(t,YB,wj),I5=t=>Gs(t,Kj,Ne),Nj=t=>Gs(t,JB,qB),Pj=t=>Gs(t,XB,T3),F5=t=>Gs(t,GB,T3),Oj=t=>Gs(t,WB,Aj),Ff=t=>Gs(t,ZB,Tj),me=t=>UB.test(t),Ou=t=>aa(t,YB),Lj=t=>aa(t,XB),K5=t=>aa(t,GB),zj=t=>aa(t,QB),Ij=t=>aa(t,WB),Kf=t=>aa(t,ZB,!0),Fj=t=>aa(t,JB,!0),Gs=(t,e,n)=>{const r=VB.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},aa=(t,e,n=!1)=>{const r=UB.exec(t);return r?r[1]?e(r[1]):n:!1},GB=t=>t==="position"||t==="percentage",WB=t=>t==="image"||t==="url",QB=t=>t==="length"||t==="size"||t==="bg-size",YB=t=>t==="length",Kj=t=>t==="number",XB=t=>t==="family-name",JB=t=>t==="number"||t==="weight",ZB=t=>t==="shadow",_j=()=>{const t=Lt("color"),e=Lt("font"),n=Lt("text"),r=Lt("font-weight"),i=Lt("tracking"),s=Lt("leading"),a=Lt("breakpoint"),u=Lt("container"),c=Lt("spacing"),f=Lt("radius"),h=Lt("shadow"),m=Lt("inset-shadow"),g=Lt("text-shadow"),b=Lt("drop-shadow"),v=Lt("blur"),C=Lt("perspective"),E=Lt("aspect"),D=Lt("ease"),T=Lt("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...A(),me,pe],P=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],M=()=>[me,pe,c],I=()=>[ls,"full","auto",...M()],G=()=>[zr,"none","subgrid",me,pe],J=()=>["auto",{span:["full",zr,me,pe]},zr,me,pe],U=()=>[zr,"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"],O=()=>["auto",...M()],K=()=>[ls,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],Y=()=>[ls,"screen","full","dvw","lvw","svw","min","max","fit",...M()],Z=()=>[ls,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],j=()=>[t,me,pe],L=()=>[...A(),K5,F5,{position:[me,pe]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",zj,Rj,{size:[me,pe]}],le=()=>[k0,Ou,Eo],ue=()=>["","none","full",f,me,pe],fe=()=>["",Ne,Ou,Eo],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=()=>[Ne,k0,K5,F5],Dn=()=>["","none",v,me,pe],sn=()=>["none",Ne,me,pe],pn=()=>["none",Ne,me,pe],gr=()=>[Ne,me,pe],Kt=()=>[ls,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hi],breakpoint:[hi],color:[qB],container:[hi],"drop-shadow":[hi],ease:["in","out","in-out"],font:[Bj],"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",Ne],text:[hi],"text-shadow":[hi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ls,pe,me,E]}],container:["container"],"container-type":[{"@container":["","normal","size",me,pe]}],"container-named":[Mj],columns:[{columns:[Ne,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:B()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],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:[zr,"auto",me,pe]}],basis:[{basis:[ls,"full","auto",u,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,ls,"auto","initial","none",pe]}],grow:[{grow:["",Ne,me,pe]}],shrink:[{shrink:["",Ne,me,pe]}],order:[{order:[zr,"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:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"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:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"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,Ou,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fj,Nj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",k0,pe]}],"font-family":[{font:[Lj,Pj,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":[Ne,"none",me,I5]}],leading:[{leading:[s,...M()]}],"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:[Ne,"from-font","auto",me,Eo]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Ne,"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:M()}],"tab-size":[{tab:[zr,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"]},zr,me,pe],radial:["",me,pe],conic:[zr,me,pe]},Ij,Oj]}],"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":[Ne,me,pe]}],"outline-w":[{outline:["",Ne,Ou,Eo]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",h,Kf,Ff]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",m,Kf,Ff]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Ne,Eo]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",g,Kf,Ff]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Ne,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":[Ne]}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"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:Dn()}],brightness:[{brightness:[Ne,me,pe]}],contrast:[{contrast:[Ne,me,pe]}],"drop-shadow":[{"drop-shadow":["","none",b,Kf,Ff]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Ne,me,pe]}],"hue-rotate":[{"hue-rotate":[Ne,me,pe]}],invert:[{invert:["",Ne,me,pe]}],saturate:[{saturate:[Ne,me,pe]}],sepia:[{sepia:["",Ne,me,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,pe]}],"backdrop-blur":[{"backdrop-blur":Dn()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,me,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,me,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,me,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,me,pe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,me,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,me,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,me,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,me,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"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:[Ne,"initial",me,pe]}],ease:[{ease:["linear","initial",D,me,pe]}],delay:[{delay:[Ne,me,pe]}],animate:[{animate:["none",T,me,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,me,pe]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:sn()}],"rotate-x":[{"rotate-x":sn()}],"rotate-y":[{"rotate-y":sn()}],"rotate-z":[{"rotate-z":sn()}],scale:[{scale:pn()}],"scale-x":[{"scale-x":pn()}],"scale-y":[{"scale-y":pn()}],"scale-z":[{"scale-z":pn()}],"scale-3d":["scale-3d"],skew:[{skew:gr()}],"skew-x":[{"skew-x":gr()}],"skew-y":[{"skew-y":gr()}],transform:[{transform:[me,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Kt()}],"translate-x":[{"translate-x":Kt()}],"translate-y":[{"translate-y":Kt()}],"translate-z":[{"translate-z":Kt()}],"translate-none":["translate-none"],zoom:[{zoom:[zr,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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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:[Ne,Ou,Eo,I5]}],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"]}},jj=vj(_j);function ve(...t){return jj(Uy(t))}const eM=Rl("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 Mt({className:t,variant:e="default",size:n="default",...r}){return w.jsx($w,{"data-slot":"button","data-variant":e,"data-size":n,className:ve(eM({variant:e,size:n,className:t})),...r})}function Hj({className:t,variant:e="default",size:n="default",...r}){return w.jsx(hI,{"data-slot":"button","data-variant":e,"data-size":n,className:ve(eM({variant:e,size:n,className:t})),...r})}const tM=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();const Vj=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Uj=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase());const _5=t=>{const e=Uj(t);return e.charAt(0).toUpperCase()+e.slice(1)};var S0={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 qj=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},Gj=k.createContext({}),Wj=()=>k.useContext(Gj),Qj=k.forwardRef(({color:t,size:e,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...u},c)=>{const{size:f=24,strokeWidth:h=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:b=""}=Wj()??{},v=r??m?Number(n??h)*24/Number(e??f):n??h;return k.createElement("svg",{ref:c,...S0,width:e??f??S0.width,height:e??f??S0.height,stroke:t??g,strokeWidth:v,className:tM("lucide",b,i),...!s&&!qj(u)&&{"aria-hidden":"true"},...u},[...a.map(([C,E])=>k.createElement(C,E)),...Array.isArray(s)?s:[s]])});const Ut=(t,e)=>{const n=k.forwardRef(({className:r,...i},s)=>k.createElement(Qj,{ref:s,iconNode:e,className:tM(`lucide-${Vj(_5(t))}`,`lucide-${t}`,r),...i}));return n.displayName=_5(t),n};const Yj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A3=Ut("check",Yj);const Xj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jj=Ut("chevron-down",Xj);const Zj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],eH=Ut("chevron-right",Zj);const tH=[["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"}]],nH=Ut("columns-3",tH);const rH=[["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"}]],qb=Ut("diamond",rH);const iH=[["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"}]],sH=Ut("ellipsis",iH);const oH=[["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"}]],aH=Ut("grip-vertical",oH);const lH=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],uH=Ut("house",lH);const cH=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],dH=Ut("list-filter",cH);const fH=[["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"}]],hH=Ut("list",fH);const pH=[["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"}]],mH=Ut("message-square-plus",pH);const gH=[["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"}]],bH=Ut("message-square",gH);const yH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],nM=Ut("plus",yH);const vH=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xH=Ut("search",vH);const CH=[["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"}]],EH=Ut("sliders-horizontal",CH);const DH=[["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"}]],qh=Ut("tag",DH);const kH=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],vl=Ut("user-round",kH);const SH=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],B3=Ut("x",SH);function $H({className:t,...e}){return w.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:ve("min-w-0",t),...e})}function wH({className:t,...e}){return w.jsx(gI,{"data-slot":"breadcrumb-list",className:ve("flex min-w-0 flex-nowrap items-center text-sm text-muted-foreground",t),...e})}function j5({className:t,children:e,separatorClassName:n,...r}){return w.jsx(bI,{"data-slot":"breadcrumb-item",className:ve("inline-flex min-w-0 items-center",t),...r,children:Sc(e,(i,{isCurrent:s})=>w.jsxs(w.Fragment,{children:[i,!s&&w.jsx("span",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:ve("mx-2 shrink-0 [&>svg]:size-3.5",n),children:w.jsx(eH,{})})]}))})}function TH({className:t,...e}){return w.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:ve("truncate font-normal text-foreground",t),...e})}function rM({className:t,variant:e="outline",size:n="default",...r}){return w.jsx(Mt,{slot:"close","data-slot":"dialog-close",variant:e,size:n,className:ve(t),...r})}function AH({className:t,children:e,...n}){return w.jsx(JA,{"data-slot":"dialog-overlay",className:ve("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 BH({className:t,children:e,showCloseButton:n=!0,isDismissable:r=!0,...i}){return w.jsx(AH,{isDismissable:r,...i,children:w.jsx(n_,{"data-slot":"dialog-content",className:ve("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:w.jsxs(lK,{"data-slot":"dialog",className:"[display:inherit] [gap:inherit] outline-none",children:[e,n&&w.jsxs(rM,{variant:"ghost",className:"absolute top-4 right-4 bg-secondary",size:"icon-sm",children:[w.jsx(B3,{}),w.jsx("span",{className:"sr-only",children:"Close"})]})]})})})}function MH({className:t,...e}){return w.jsx(kI,{slot:"title","data-slot":"dialog-title",className:ve("font-heading text-base leading-none font-medium",t),...e})}function iM({className:t,type:e,...n}){return w.jsx(Rw,{type:e,"data-slot":"input",className:Sc(t,r=>ve("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 RH({className:t,...e}){return w.jsx(HI,{"data-slot":"input-group",className:ve("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 NH=Rl("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 PH({className:t,align:e="inline-start",...n}){return w.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:ve(NH({align:e}),t),onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}function M3({className:t,dir:e,style:n,...r}){const{contains:i}=uK({sensitivity:"base"});return w.jsx("div",{"data-slot":"command",dir:e,className:ve("flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground",t),style:n,children:w.jsx(Iz,{...r,filter:r.filter||i,children:r.children})})}function R3({...t}){return w.jsx(DT,{"data-slot":"command-popover-trigger",...t})}function N3({className:t,placement:e="bottom start",offset:n=4,crossOffset:r=0,...i}){return w.jsx(y3,{"data-slot":"command-popover",placement:e,offset:n,crossOffset:r,className:ve("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 P3({className:t,flush:e=!1,...n}){return w.jsx(u_,{autoFocus:!0,"aria-label":n.placeholder||"Search","data-slot":"command-input-wrapper",className:e?"border-b border-border/60":"p-1 pb-0",children:w.jsxs(RH,{className:e?"h-10 rounded-none bg-transparent":"h-9 bg-input/50",children:[w.jsx(Rw,{...n,"data-slot":"command-input",className:ve("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-search-cancel-button]:hidden",t)}),w.jsx(PH,{children:w.jsx(xH,{className:"size-4 shrink-0 opacity-50"})})]})})}function O3({className:t,...e}){return w.jsx(kT,{...e,"data-slot":"command-list",className:ve("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",t)})}function Gh({className:t,children:e,items:n,heading:r,...i}){return w.jsxs(sK,{"data-slot":"command-group",className:ve("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&&w.jsx(WI,{"cmdk-group-heading":"",children:r}),w.jsx(em,{items:n,children:e})]})}function OH({className:t,...e}){return w.jsx(XI,{"data-slot":"command-separator",className:ve("my-1.5 h-px bg-border/50",t),...e})}function oc({className:t,children:e,textValue:n,...r}){return w.jsx($T,{...r,"data-slot":"command-item",className:ve("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:Sc(e,i=>w.jsxs(w.Fragment,{children:[i,w.jsx(A3,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-selected/command-item:opacity-100"})]}))})}const sM=k.createContext(null);function Ws(){const t=k.useContext(sM);if(!t)throw new Error("useTasksContext must be used inside the app shell");return t}function LH(){const{project:t,boards:e,board:n,tasks:r}=Ws(),s=ES()({to:"/task/$number"}),a=s?Number(s.number):null,u=a!=null?r.find(h=>h.number===a):null,c=n&&n!==e[0]?.id?`/?board=${encodeURIComponent(n)}`:"/",f=e.find(h=>h.id===n)?.prefix??t?.prefix;return w.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[w.jsx(Hj,{href:c,variant:"ghost",size:"icon-sm","aria-label":"Board home",className:"text-muted-foreground",children:w.jsx(uH,{})}),w.jsx($H,{children:w.jsxs(wH,{children:[w.jsx(j5,{children:w.jsx(zH,{})}),s&&w.jsx(j5,{children:w.jsx(TH,{children:u?.title??(f?`${f}-${a}`:`#${a}`)})})]})})]})}function zH(){const{project:t,boards:e,board:n,switchBoard:r}=Ws(),[i,s]=k.useState(!1),a=e.find(f=>f.id===n)?.name??t?.name??"…",u=new Map;for(const f of e)u.set(f.name,(u.get(f.name)??0)+1);const c=f=>(u.get(f.name)??0)>1?`${f.name} — ${f.id}`:f.name;return w.jsxs(R3,{isOpen:i,onOpenChange:s,children:[w.jsx(Mt,{variant:"ghost",size:"sm","aria-label":"Switch board",className:"-mx-1.5 h-7 min-w-0 shrink rounded-md px-1.5 font-medium text-foreground",children:w.jsx("span",{className:"truncate",children:a})}),w.jsx(N3,{className:"w-60",children:w.jsxs(M3,{children:[w.jsx(P3,{flush:!0,placeholder:"Switch board"}),w.jsx(O3,{selectionMode:"single",selectedKeys:n?[n]:[],onAction:f=>{s(!1),r(String(f))},children:w.jsx(Gh,{children:e.map(f=>w.jsx(oc,{id:f.id,textValue:c(f),children:c(f)},f.id))})})]})})]})}const IH={backlog:"text-muted-foreground/60",todo:"text-muted-foreground",in_progress:"text-foreground/80",done:"text-foreground/80",canceled:"text-muted-foreground/60"};function Ls({status:t,className:e}){const n={viewBox:"0 0 14 14",className:ve("size-3.5 shrink-0",IH[t],e),"aria-hidden":!0};switch(t){case"backlog":return w.jsx("svg",{...n,children:w.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeDasharray:"2.5 2.2"})});case"todo":return w.jsx("svg",{...n,children:w.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})});case"in_progress":return w.jsxs("svg",{...n,children:[w.jsx("circle",{cx:"7",cy:"7",r:"5.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),w.jsx("path",{d:"M7 3.4 A3.6 3.6 0 0 1 7 10.6 Z",fill:"currentColor"})]});case"done":return w.jsxs("svg",{...n,children:[w.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),w.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 w.jsxs("svg",{...n,children:[w.jsx("circle",{cx:"7",cy:"7",r:"6.2",fill:"currentColor"}),w.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 oM({className:t}){return w.jsxs("span",{title:"Needs a human","aria-label":"Needs a human",className:ve("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:[w.jsx(vl,{className:"size-3","aria-hidden":!0}),"Human"]})}function mh({className:t,htmlFor:e,slot:n,...r}){const i=w.jsx(yI,{"data-slot":"label",className:ve("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?w.jsx(o3.Provider,{value:null,children:i}):i}function aM({children:t,...e}){return w.jsx(aK,{"data-slot":"popover-trigger",...e,children:t})}function lM({className:t,placement:e="bottom",offset:n=4,crossOffset:r=0,...i}){return w.jsx(y3,{"data-slot":"popover-content",placement:e,offset:n,crossOffset:r,className:ve("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 FH=Rl("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"}}),uM=k.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function KH({className:t,variant:e,size:n,spacing:r=2,orientation:i="horizontal",children:s,...a}){return w.jsx(m_,{"data-slot":"toggle-group","data-variant":e,"data-size":n,"data-spacing":r,orientation:i,style:{"--gap":`calc(var(--spacing) * ${r})`},className:ve("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:w.jsx(uM.Provider,{value:{variant:e,size:n,spacing:r,orientation:i},children:s})})}function H5({className:t,children:e,variant:n="default",size:r="default",...i}){const s=k.useContext(uM);return w.jsx(b_,{"data-slot":"toggle-group-item","data-variant":s.variant||n,"data-size":s.size||r,"data-spacing":s.spacing,className:ve("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",FH({variant:s.variant||n,size:s.size||r}),t),...i,children:e})}function _H(){const{settings:t,setSettings:e}=Ws();return w.jsxs(aM,{children:[w.jsx(Mt,{variant:"ghost",size:"icon-sm","aria-label":"Display options",children:w.jsx(EH,{})}),w.jsxs(lM,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[w.jsxs(KH,{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:[w.jsxs(H5,{id:"list",className:"flex-1",children:[w.jsx(hH,{"data-icon":"inline-start"}),"List"]}),w.jsxs(H5,{id:"board",className:"flex-1",children:[w.jsx(nH,{"data-icon":"inline-start"}),"Board"]})]}),t.view==="board"&&w.jsxs("div",{className:"flex flex-col gap-1",children:[w.jsx(mh,{className:"px-1 pb-1 text-xs text-muted-foreground",children:"Columns"}),Os.map(n=>{const r=t.boardColumns.includes(n);return w.jsxs(Mt,{variant:"ghost",size:"sm","aria-pressed":r,onPress:()=>e({...t,boardColumns:Os.filter(i=>i===n?!r:t.boardColumns.includes(i))}),className:"w-full justify-start gap-2 font-normal",children:[w.jsx(Ls,{status:n}),Si[n],w.jsx(A3,{"data-icon":"inline-end",className:r?"ml-auto":"ml-auto opacity-0"})]},n)})]})]})]})}const jH=Rl("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 HH({className:t,orientation:e,...n}){return w.jsx("div",{role:"group","data-slot":"button-group","data-orientation":e,className:ve(jH({orientation:e}),t),...n})}function V5({className:t,render:e,...n}){if(e){const r={"data-slot":"button-group-text",className:ve("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 w.jsx("div",{"data-slot":"button-group-text",className:ve("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 $0="__none__",U5="__create__";function Ur({label:t,options:e,value:n,onChange:r,mode:i,placeholder:s,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(),T=a&&D.length>0&&!E.some(P=>P.toLowerCase()===D.toLowerCase());function $(P){const R=String(P);if(R===U5){r(i==="single"?[D]:[...n,D]),C(""),i==="single"&&A();return}if(R===$0){r([]),A();return}if(i==="single"){r([R]),A();return}r(n.includes(R)?n.filter(M=>M!==R):[...n,R])}function A(){b(!1),C("")}const B=u?.(n)??w.jsx("span",{className:"truncate",children:n.length>0?n.join(", "):s});return w.jsxs(R3,{isOpen:g,onOpenChange:P=>P?b(!0):A(),children:[w.jsxs(Mt,{variant:f,size:c,"aria-label":t,className:ve("justify-between gap-1.5 font-normal",m),children:[B,h&&w.jsx(Jj,{className:"text-muted-foreground"})]}),w.jsx(N3,{className:"w-60",children:w.jsxs(M3,{inputValue:v,onInputChange:C,children:[w.jsx(P3,{flush:!0,placeholder:`Search ${t.toLowerCase()}`}),w.jsxs(O3,{selectionMode:i,selectedKeys:i==="single"?[n[0]??$0]:n,onAction:$,disallowEmptySelection:i==="single",renderEmptyState:()=>T?null:w.jsx("p",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"Nothing here yet"}),children:[w.jsxs(Gh,{children:[i==="single"?w.jsx(oc,{id:$0,textValue:s,children:s}):null,E.map(P=>w.jsx(oc,{id:P,textValue:P,children:P},P))]}),T?w.jsx(OH,{}):null,T?w.jsx(Gh,{children:w.jsxs(oc,{id:U5,textValue:v,children:[w.jsx(nM,{}),w.jsx("span",{className:"truncate",children:D})]})}):null]})]})})]})}const cM={statuses:[],tags:[],milestone:null,needsHuman:!1};function VH(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 dM(t){return t.statuses.length>0||t.tags.length>0||t.milestone!==null||t.needsHuman}function om(t){return[...new Set(t.flatMap(e=>e.tags))].sort()}function am(t){return[...new Set(t.map(e=>e.milestone).filter(e=>!!e))].sort()}function UH(){const{tasks:t,filters:e,setFilters:n}=Ws();return w.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2",children:[e.statuses.length>0&&w.jsx(_f,{icon:w.jsx(Ls,{status:e.statuses[0],className:"size-3.5"}),name:"Status",operator:e.statuses.length>1?"is any of":"is",onRemove:()=>n({...e,statuses:[]}),children:w.jsx(Ur,{label:"Status",mode:"multiple",allowCreate:!1,options:[...Os],value:e.statuses,onChange:r=>n({...e,statuses:r}),placeholder:"Status",renderValue:r=>w.jsx("span",{className:"truncate",children:r.map(i=>Si[i]).join(", ")}),size:"sm",className:"max-w-56 border-l-0 font-normal"})}),e.tags.length>0&&w.jsx(_f,{icon:w.jsx(qh,{className:"size-3.5"}),name:"Tag",operator:e.tags.length>1?"is any of":"is",onRemove:()=>n({...e,tags:[]}),children:w.jsx(Ur,{label:"Tags",mode:"multiple",allowCreate:!1,options:om(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&&w.jsx(_f,{name:"Milestone",operator:"is",onRemove:()=>n({...e,milestone:null}),children:w.jsx(Ur,{label:"Milestone",mode:"single",allowCreate:!1,options:am(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&&w.jsx(_f,{icon:w.jsx(vl,{className:"size-3.5"}),name:"Needs a human",onRemove:()=>n({...e,needsHuman:!1})}),w.jsx(Mt,{size:"sm",variant:"ghost",onPress:()=>n(cM),children:"Clear"})]})}function _f({icon:t,name:e,operator:n,onRemove:r,children:i}){return w.jsxs(HH,{children:[w.jsxs(V5,{className:"h-8 gap-1.5 bg-transparent text-sm font-normal",children:[t,e]}),n&&w.jsx(V5,{className:"h-8 border-l-0 bg-transparent text-sm font-normal text-muted-foreground",children:n}),i,w.jsx(Mt,{variant:"outline",size:"icon-sm","aria-label":`Remove ${e.toLowerCase()} filter`,onPress:r,className:"border-l-0 text-muted-foreground",children:w.jsx(B3,{})})]})}function qH(){const{tasks:t,filters:e,setFilters:n}=Ws(),r=dM(e);return w.jsxs(aM,{children:[w.jsxs(Mt,{variant:"ghost",size:"icon-sm","aria-label":"Filter",className:"relative",children:[w.jsx(dH,{}),r&&w.jsx("span",{className:"absolute top-1 right-1 size-1.5 rounded-full bg-primary"})]}),w.jsxs(lM,{placement:"bottom end",className:"w-64 gap-3 p-3",children:[w.jsxs("div",{className:"grid gap-1.5",children:[w.jsx(mh,{className:"px-1 text-xs text-muted-foreground",children:"Status"}),w.jsx(Ur,{label:"Status",mode:"multiple",allowCreate:!1,options:[...Os],value:e.statuses,onChange:i=>n({...e,statuses:i}),placeholder:"Any status",renderValue:i=>w.jsx("span",{className:"truncate",children:i.length===0?"Any status":i.map(s=>Si[s]).join(", ")}),className:"w-full"})]}),w.jsxs("div",{className:"grid gap-1.5",children:[w.jsx(mh,{className:"px-1 text-xs text-muted-foreground",children:"Tags"}),w.jsx(Ur,{label:"Tags",mode:"multiple",allowCreate:!1,options:om(t),value:e.tags,onChange:i=>n({...e,tags:i}),placeholder:"Any tag",className:"w-full"})]}),w.jsxs("div",{className:"grid gap-1.5",children:[w.jsx(mh,{className:"px-1 text-xs text-muted-foreground",children:"Milestone"}),w.jsx(Ur,{label:"Milestone",mode:"single",allowCreate:!1,options:am(t),value:e.milestone?[e.milestone]:[],onChange:i=>n({...e,milestone:i[0]??null}),placeholder:"Any milestone",className:"w-full"})]}),w.jsxs(Mt,{size:"sm",variant:e.needsHuman?"secondary":"outline","aria-pressed":e.needsHuman,onPress:()=>n({...e,needsHuman:!e.needsHuman}),className:ve("justify-start font-normal",e.needsHuman&&"text-amber-700 dark:text-amber-400"),children:[w.jsx(vl,{"data-icon":"inline-start"}),"Needs a human"]})]})]})}function Jt(t){this.content=t}Jt.prototype={constructor:Jt,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),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new Jt(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Jt(n)},addToStart:function(t,e){return new Jt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Jt(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new Jt(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=Jt.from(t),t.size?new Jt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Jt.from(t),t.size?new Jt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Jt.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}};Jt.from=function(t){if(t instanceof Jt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Jt(e)};function fM(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),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){let a=i.text,u=s.text,c=0;for(;a[c]==u[c];c++)n++;return c&&c<a.length&&c<u.length&&mM(a.charCodeAt(c-1))&&pM(a.charCodeAt(c))&&n--,n}if(i.content.size||s.content.size){let a=fM(i.content,s.content,n+1);if(a!=null)return a}n+=i.nodeSize}}function hM(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let a=t.child(--i),u=e.child(--s),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&&mM(f.charCodeAt(m-1))&&pM(f.charCodeAt(m))&&(n++,r++),{a:n,b:r}}if(a.content.size||u.content.size){let f=hM(a.content,u.content,n-1,r-1);if(f)return f}n-=c,r-=c}}function pM(t){return t>=56320&&t<57344}function mM(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,s){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,s||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 s="",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:s+=r),s+=f},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);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 s=0,a=0;a<n;s++){let u=this.content[s],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(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new ae(i,s)}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 fM(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return hM(this,e,n,r)}findIndex(e){if(e==0)return jf(0,e);if(e==this.size)return jf(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),s=r+i.nodeSize;if(s>=e)return s==e?jf(n+1,s):jf(n,r);r=s}}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 s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}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 w0={index:0,offset:0};function jf(t,e){return w0.index=t,w0.offset=e,w0}function Wh(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(!Wh(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Wh(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let rt=class Gb{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}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&&Wh(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 Gb.none;if(e instanceof Gb)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};rt.none=[];class Nc 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=bM(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(gM(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 s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new he(e,r,i)}}he.empty=new he(ae.empty,0,0);function gM(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:a,offset:u}=t.findIndex(n);if(i==e||s.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,s.copy(gM(s.content,e-i-1,n-i-1)))}function bM(t,e,n,r,i,s){let{index:a,offset:u}=t.findIndex(e),c=t.maybeChild(a);if(u==e||c.isText)return s&&r<=0&&i<=0&&!s.canReplace(a,a,n)?null:t.cut(0,e).append(n).append(t.cut(e));let f=bM(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 GH(t,e,n){if(n.openStart>t.depth)throw new Nc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Nc("Inconsistent open depths");return yM(t,e,n,0)}function yM(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let a=yM(t,e,n,r+1);return s.copy(s.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 qo(a,u.cut(0,t.parentOffset).append(n.content).append(u.cut(e.parentOffset)))}else{let{start:a,end:u}=WH(n,t);return qo(s,xM(t,a,u,e,r))}else return qo(s,Qh(t,e,r))}function vM(t,e){if(!e.type.compatibleContent(t.type))throw new Nc("Cannot join "+e.type.name+" onto "+t.type.name)}function Wb(t,e,n){let r=t.node(n);return vM(r,e.node(n)),r}function Uo(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 ac(t,e,n,r){let i=(e||t).node(n),s=0,a=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(Uo(t.nodeAfter,r),s++));for(let u=s;u<a;u++)Uo(i.child(u),r);e&&e.depth==n&&e.textOffset&&Uo(e.nodeBefore,r)}function qo(t,e){if(!t.type.validContent(e))throw new Nc("Invalid content for node "+t.type.name);return t.copy(e)}function xM(t,e,n,r,i){let s=t.depth>i&&Wb(t,e,i+1),a=r.depth>i&&Wb(n,r,i+1),u=[];return ac(null,t,i,u),s&&a&&e.index(i)==n.index(i)?(vM(s,a),Uo(qo(s,xM(t,e,n,r,i+1)),u)):(s&&Uo(qo(s,Qh(t,e,i+1)),u),ac(e,n,i,u),a&&Uo(qo(a,Qh(n,r,i+1)),u)),ac(r,null,i,u),new ae(u)}function Qh(t,e,n){let r=[];if(ac(null,t,n,r),t.depth>n){let i=Wb(t,e,n+1);Uo(qo(i,Qh(t,e,n+1)),r)}return ac(e,null,n,r),new ae(r)}function WH(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(ae.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Pc{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 s=0;s<e;s++)i+=r.child(s).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 s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!i||!s[a].isInSet(i.marks))&&(s=s[a--].removeFromSet(s));return s}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 s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].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 Yh(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,s=n;for(let a=e;;){let{index:u,offset:c}=a.content.findIndex(s),f=s-c;if(r.push(a,u,i+c),!f||(a=a.child(u),a.isText))break;s=f-1,i+=c+1}return new Pc(n,r,s)}static resolveCached(e,n){let r=q5.get(e);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==n)return a}else q5.set(e,r=new QH);let i=r.elts[r.i]=Pc.resolve(e,n);return r.i=(r.i+1)%YH,i}}class QH{constructor(){this.elts=[],this.i=0}}const YH=12,q5=new WeakMap;class Yh{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 XH=Object.create(null);let $s=class Qb{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&&Wh(this.attrs,n||e.defaultAttrs||XH)&&rt.sameSet(this.marks,r||rt.none)}copy(e=null){return e==this.content?this:new Qb(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Qb(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),s=this.resolve(n),a=r?0:i.sharedDepth(n),u=i.start(a),f=i.node(a).content.cut(i.pos-u,s.pos-u);return new he(f,i.depth-a,s.depth-a)}replace(e,n,r){return GH(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 Pc.resolveCached(this,e)}resolveNoCache(e){return Pc.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.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()+")"),CM(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,s=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,i,s),u=a&&a.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let c=i;c<s;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 s=this.contentMatchAt(e).matchType(r),a=s&&s.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),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};$s.prototype.text=void 0;class Xh extends $s{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):CM(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 Xh(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Xh(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 CM(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Jo{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new JH(e,n);if(r.next==null)return Jo.empty;let i=EM(r);r.next&&r.err("Unexpected trailing text");let s=sV(iV(i));return oV(s,r),s}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 s=n;i&&s<r;s++)i=i.matchType(e.child(s).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 s(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=s(m,u.concat(h));if(g)return g}}return null}return s(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(),s=i.match;if(s.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<s.next.length;a++){let{type:u,next:c}=s.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 s=i+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return s}).join(`
22
+ `)}}Jo.empty=new Jo(!0);class JH{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 EM(t){let e=[];do e.push(ZH(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ZH(t){let e=[];do e.push(eV(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function eV(t){let e=rV(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=tV(t,e);else break;return e}function G5(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function tV(t,e){let n=G5(t),r=n;return t.eat(",")&&(t.next!="}"?r=G5(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function nV(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let a=n[s];a.isInGroup(e)&&i.push(a)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function rV(t){if(t.eat("(")){let e=EM(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=nV(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 iV(t){let e=[[]];return i(s(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 s(a,u){if(a.type=="choice")return a.exprs.reduce((c,f)=>c.concat(s(f,u)),[]);if(a.type=="seq")for(let c=0;;c++){let f=s(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(s(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return i(s(a.expr,u),c),i(s(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(u)].concat(s(a.expr,u));if(a.type=="range"){let c=u;for(let f=0;f<a.min;f++){let h=n();i(s(a.expr,c),h),c=h}if(a.max==-1)i(s(a.expr,c),c);else for(let f=a.min;f<a.max;f++){let h=n();r(c,h),i(s(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 DM(t,e){return e-t}function W5(t,e){let n=[];return r(e),n.sort(DM);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let a=0;a<s.length;a++){let{term:u,to:c}=s[a];!u&&n.indexOf(c)==-1&&r(c)}}}function sV(t){let e=Object.create(null);return n(W5(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]);W5(t,c).forEach(h=>{f||i.push([u,f=[]]),f.indexOf(h)==-1&&f.push(h)})})});let s=e[r.join(",")]=new Jo(r.indexOf(t.length-1)>-1);for(let a=0;a<i.length;a++){let u=i[a][1].sort(DM);s.next.push({type:i[a][0],next:e[u.join(",")]||n(u)})}return s}}function oV(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,a=[];for(let u=0;u<i.next.length;u++){let{type:c,next:f}=i.next[u];a.push(c.name),s&&!(c.isText||c.hasRequiredAttrs())&&(s=!1),r.indexOf(f)==-1&&r.push(f)}s&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function kM(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 SM(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function $M(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 wM(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new lV(t,r,e[r]);return n}let Q5=class TM{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=wM(e,r.attrs),this.defaultAttrs=kM(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==Jo.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:SM(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $s(this,this.computeAttrs(e),ae.from(n),rt.setFrom(r))}createChecked(e=null,n,r){return n=ae.from(n),this.checkContent(n),new $s(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),s=i&&i.fillBefore(ae.empty,!0);return s?new $s(this,e,n.append(s),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){$M(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((s,a)=>r[s]=new TM(s,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 s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function aV(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class lV{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?aV(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class lm{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=wM(e,i.attrs),this.excluded=null;let s=kM(this.attrs);this.instance=s?new rt(this,s):null}create(e=null){return!e&&this.instance?this.instance:new rt(this,SM(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,a)=>r[s]=new lm(s,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){$M(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class AM{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=Jt.from(e.nodes),n.marks=Jt.from(e.marks||{}),this.nodes=Q5.compile(this.spec.nodes,this),this.marks=lm.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 s=this.nodes[i],a=s.spec.content||"",u=s.spec.marks;if(s.contentMatch=r[a]||(r[a]=Jo.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=u=="_"?null:u?Y5(this,u.split(" ")):u==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:Y5(this,a.split(" "))}this.nodeFromJSON=i=>$s.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 Q5){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 Xh(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 Y5(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],a=s;if(s)n.push(s);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 uV(t){return t.tag!=null}function cV(t){return t.style!=null}class $i{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(uV(i))this.tags.push(i);else if(cV(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new J5(this,n,!1);return r.addAll(e,rt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new J5(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 s=this.tags[i];if(hV(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(e);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let a=this.styles[s],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 s=i.priority==null?50:i.priority,a=0;for(;a<n.length;a++){let u=n[a];if((u.priority==null?50:u.priority)<s)break}n.splice(a,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(a=>{r(a=Z5(a)),a.mark||a.ignore||a.clearMark||(a.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(a=>{r(a=Z5(a)),a.node||a.ignore||a.mark||(a.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $i(e,$i.schemaRules(e)))}}const BM={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},dV={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},MM={ol:!0,ul:!0},Oc=1,Yb=2,lc=4;function X5(t,e,n){return e!=null?(e?Oc:0)|(e==="full"?Yb:0):t&&t.whitespace=="pre"?Oc|Yb:n&~lc}class Hf{constructor(e,n,r,i,s,a){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=rt.none,this.match=s||(a&lc?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&Oc)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.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&&!BM.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class J5{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,a=X5(null,n.preserveWhitespace,0)|(r?lc:0);i?s=new Hf(i.type,i.attrs,rt.none,!0,n.topMatch||i.type.contentMatch,a):r?s=new Hf(null,null,rt.none,!0,null,a):s=new Hf(e.schema.topNodeType,null,rt.none,!0,null,a),this.nodes=[s],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,s=i.options&Yb?"full":this.localPreserveWS||(i.options&Oc)>0,{schema:a}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="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,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),u;MM.hasOwnProperty(a)&&this.parser.normalizeLists&&fV(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(u=this.parser.matchTag(e,this,r));e:if(c?c.ignore:dV.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(BM.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),f=!0,s.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(s),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 s=this.parser.matchedStyles[i],a=r.getPropertyValue(s);if(a)for(let u=void 0;;){let c=this.parser.matchStyle(s,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 s,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&&(s=!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)}s&&this.sync(u)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let a=r?e.childNodes[r]:e.firstChild,u=i==null?null:e.childNodes[i];a!=u;a=a.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(a,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;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,s=c,!f.length))break;if(c.solid){if(r)break;u+=2}}if(!i)return null;this.sync(s);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 s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let a=rt.none;for(let u of i.concat(e.marks))(s.type?s.type.allowsMarkType(u.type):eD(u.type,e.type))&&(a=u.addToSet(a));return s.content.push(e.mark(a)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let u=X5(e,s,a.options);a.options&lc&&a.content.length==0&&(u|=lc);let c=rt.none;return r=r.filter(f=>(a.type?a.type.allowsMarkType(f.type):eD(f.type,e))?(c=f.addToSet(c),!1):!0),this.nodes.push(new Hf(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|=Oc)}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),s=-(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>=s;c--)if(a(u-1,c))return!0;return!1}else{let h=c>0||c==0&&i?this.nodes[c].type:r&&c>=s?r.node(c-s).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 fV(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&MM.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function hV(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Z5(t){let e={};for(let n in t)e[n]=t[n];return e}function eD(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],a=u=>{s.push(u);for(let c=0;c<u.edgeCount;c++){let{type:f,next:h}=u.edge(c);if(f==e||s.indexOf(h)<0&&a(h))return!0}};if(a(i.contentMatch))return!0}}class la{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Vf(n).createDocumentFragment());let i=r,s=[];return e.forEach(a=>{if(s.length||a.marks.length){let u=0,c=0;for(;u<s.length&&c<a.marks.length;){let f=a.marks[c];if(!this.marks[f.type.name]){c++;continue}if(!f.eq(s[u][0])||f.type.spec.spanning===!1)break;u++,c++}for(;u<s.length;)i=s.pop()[1];for(;c<a.marks.length;){let f=a.marks[c++],h=this.serializeMark(f,a.isInline,n);h&&(s.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 Vf(n).createTextNode(e.text);let{dom:r,contentDOM:i}=gh(Vf(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 s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&gh(Vf(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return typeof n=="string"?{dom:e.createTextNode(n)}:gh(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new la(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=tD(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return tD(e.marks)}}function tD(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Vf(t){return t.document||window.document}const nD=new WeakMap;function pV(t){let e=nD.get(t);return e===void 0&&nD.set(t,e=mV(t)),e}function mV(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 gh(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=pV(r))&&s.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}=gh(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 RM=65535,NM=Math.pow(2,16);function gV(t,e){return t+e*NM}function rD(t){return t&RM}function bV(t){return(t-(t&RM))/NM}const PM=1,OM=2,bh=4,LM=8;class Xb{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&LM)>0}get deletedBefore(){return(this.delInfo&(PM|bh))>0}get deletedAfter(){return(this.delInfo&(OM|bh))>0}get deletedAcross(){return(this.delInfo&bh)>0}}class Wn{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Wn.empty)return Wn.empty}recover(e){let n=0,r=rD(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+bV(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,s=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+s],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:gV(u/3,e-c),C=e==c?OM:e==m?PM:bh;return(n<0?e!=c:e!=m)&&(C|=LM),new Xb(b,C,v)}i+=h-f}return r?e+i:new Xb(e+i,0,null)}touches(e,n){let r=0,i=rD(n),s=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+s],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,s=0;i<this.ranges.length;i+=3){let a=this.ranges[i],u=a-(this.inverted?s:0),c=a+(this.inverted?0:s),f=this.ranges[i+n],h=this.ranges[i+r];e(u,u+f,c,c+h),s+=h-f}}invert(){return new Wn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Wn.empty:new Wn(e<0?[0,-e,0]:[0,0,e])}}Wn.empty=new Wn([]);class Lc{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 Lc(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 Lc;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 s=this.from;s<this.to;s++){let a=this._maps[s],u=a.mapResult(e,n);if(u.recover!=null){let c=this.getMirror(s);if(c!=null&&c>s&&c<this.to){s=c,e=this._maps[c].recover(u.recover);continue}}i|=u.delInfo,e=u.pos}return r?e:new Xb(e,i,null)}}const T0=Object.create(null);class hn{getMap(){return Wn.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=T0[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 T0)throw new RangeError("Duplicate use of step JSON ID "+e);return T0[e]=n,n.prototype.jsonID=e,n}}class Rt{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Rt(e,null)}static fail(e){return new Rt(null,e)}static fromReplace(e,n,r,i){try{return Rt.ok(e.replace(n,r,i))}catch(s){if(s instanceof Nc)return Rt.fail(s.message);throw s}}}function L3(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(L3(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return ae.fromArray(r)}class Es extends hn{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)),s=new he(L3(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 Rt.fromReplace(e,this.from,this.to,s)}invert(){return new wr(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 Es(n.pos,r.pos,this.mark)}merge(e){return e instanceof Es&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Es(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 Es(n.from,n.to,e.markFromJSON(n.mark))}}hn.jsonID("addMark",Es);class wr extends hn{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(L3(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Rt.fromReplace(e,this.from,this.to,r)}invert(){return new Es(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 wr(n.pos,r.pos,this.mark)}merge(e){return e instanceof wr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wr(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 wr(n.from,n.to,e.markFromJSON(n.mark))}}hn.jsonID("removeMark",wr);class Ds extends hn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Rt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Rt.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 Ds(this.pos,n.marks[i]);return new Ds(this.pos,this.mark)}}return new Zo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Ds(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 Ds(n.pos,e.markFromJSON(n.mark))}}hn.jsonID("addNodeMark",Ds);class Zo extends hn{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Rt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Rt.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 Ds(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Zo(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 Zo(n.pos,e.markFromJSON(n.mark))}}hn.jsonID("removeNodeMark",Zo);class At extends hn{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Jb(e,this.from,this.to)?Rt.fail("Structure replace would overwrite content"):Rt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Wn([this.from,this.to-this.from,this.slice.size])}invert(e){return new At(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&&At.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new At(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof At)||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 At(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 At(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 At(n.from,n.to,he.fromJSON(e,n.slice),!!n.structure)}}At.MAP_BIAS=1;hn.jsonID("replace",At);class Ht extends hn{constructor(e,n,r,i,s,a,u=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=a,this.structure=u}apply(e){if(this.structure&&(Jb(e,this.from,this.gapFrom)||Jb(e,this.gapTo,this.to)))return Rt.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Rt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Rt.fromReplace(e,this.from,this.to,r):Rt.fail("Content does not fit in gap")}getMap(){return new Wn([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 Ht(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),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Ht(n.pos,r.pos,i,s,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 Ht(n.from,n.to,n.gapFrom,n.gapTo,he.fromJSON(e,n.slice),n.insert,!!n.structure)}}hn.jsonID("replaceAround",Ht);function Jb(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let a=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}}return!1}function yV(t,e,n,r){let i=[],s=[],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 wr(g,b,m[C])));u&&u.to==g?u.to=b:s.push(u=new Es(g,b,r))}}),i.forEach(c=>t.step(c)),s.forEach(c=>t.step(c))}function vV(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(a,u)=>{if(!a.isInline)return;s++;let c=null;if(r instanceof lm){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==s-1&&m.eq(i[b].style)&&(g=v)}g?(g.to=f,g.step=s):i.push({style:m,from:Math.max(u,e),to:f,step:s})}}}),i.forEach(a=>t.step(new wr(a.from,a.to,a.style)))}function z3(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),a=[],u=e+1;for(let c=0;c<s.childCount;c++){let f=s.child(c),h=u+f.nodeSize,m=r.matchType(f.type);if(!m)a.push(new At(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 wr(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 At(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 xV(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Nl(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let a=t.$from.node(r),u=t.$from.index(r)+i,c=t.$to.indexAfter(r)-s;if(r<t.depth&&a.canReplace(u,c,n))return r;if(r==0||a.type.spec.isolating||!xV(a,u,c))break;u&&(i=1),c<a.childCount&&(s=1)}return null}function CV(t,e,n){let{$from:r,$to:i,depth:s}=e,a=r.before(s+1),u=i.after(s+1),c=a,f=u,h=ae.empty,m=0;for(let v=s,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=s,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 Ht(c,f,a,u,new he(h.append(g),m,b),h.size-m,!0))}function I3(t,e,n=null,r=t){let i=EV(t,e),s=i&&DV(r,e);return s?i.map(iD).concat({type:e,attrs:n}).concat(s.map(iD)):null}function iD(t){return{type:t,attrs:null}}function EV(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let a=s.length?s[0]:e;return n.canReplaceWith(r,i,a)?s:null}function DV(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),a=e.contentMatch.findWrapping(s.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 kV(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,s=e.end;t.step(new Ht(i,s,i,s,new he(r,0,0),n.length,!0))}function SV(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=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)&&$V(t.doc,t.mapping.slice(s).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&&IM(t,a,u,s),z3(t,t.mapping.slice(s).map(u,1),r,void 0,f===null);let h=t.mapping.slice(s),m=h.map(u,1),g=h.map(u+a.nodeSize,1);return t.step(new Ht(m,g,m+1,g-1,new he(ae.from(r.create(c,null,a.marks)),0,0),1,!0)),f===!0&&zM(t,a,u,s),!1}})}function zM(t,e,n,r){e.forEach((i,s)=>{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+s+a.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function IM(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let a=t.mapping.slice(r).map(n+1+s);t.replaceWith(a,a+1,e.type.schema.text(`
25
+ `))}})}function $V(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function wV(t,e,n,r,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(r,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Ht(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new he(ae.from(a),0,0),1,!0))}function wi(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,a=r&&r[r.length-1]||i.parent;if(s<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>s;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(s),c=r&&r[0];return i.node(s).canReplaceWith(u,u,c?c.type:i.node(s+1).type)}function TV(t,e,n=1,r){let i=t.doc.resolve(e),s=ae.empty,a=ae.empty;for(let u=i.depth,c=i.depth-n,f=n-1;u>c;u--,f--){s=ae.from(i.node(u).copy(s));let h=r&&r[f];a=ae.from(h?h.type.create(h.attrs,a):i.node(u).copy(a))}t.step(new At(e,e,new he(s.append(a),n,n),!0))}function Qs(t,e){let n=t.resolve(e),r=n.index();return FM(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function AV(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 s=e.child(i),a=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(a),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function FM(t,e){return!!(t&&e&&!t.isLeaf&&AV(t,e))}function um(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let s,a,u=r.index(i);if(i==r.depth?(s=r.nodeBefore,a=r.nodeAfter):n>0?(s=r.node(i+1),u++,a=r.node(i).maybeChild(u)):(s=r.node(i).maybeChild(u-1),a=r.node(i+1)),s&&!s.isTextblock&&FM(s,a)&&r.node(i).canReplace(u,u+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function BV(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),a=s.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);IM(t,h.node(),h.before(),u)}a.inlineContent&&z3(t,e+n-1,a,s.node().contentMatchAt(s.index()),r==null);let c=t.mapping.slice(u),f=c.map(e-n);if(t.step(new At(f,c.map(e+n,-1),he.empty,!0)),r===!0){let h=t.doc.resolve(f);zM(t,h.node(),h.before(),t.steps.length)}return t}function MV(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 s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function KM(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)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(s==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 cm(t,e,n=e,r=he.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),s=t.resolve(n);return _M(i,s,r)?new At(e,n,r):new RV(i,s,r).fit()}function _M(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class RV{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 s=e.node(i);this.frontier.push({type:s.type,match:s.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 s=this.placed,a=r.depth,u=i.depth;for(;a&&u&&s.childCount==1;)s=s.firstChild.content,a--,u--;let c=new he(s,a,u);return e>-1?new Ht(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new At(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 s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=A0(this.unplaced.content,r-1).firstChild,i=s.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)):s&&c.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:u,parent:s,inject:m};if(n==2&&a&&(h=f.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:u,parent:s,wrap:h};if(s&&f.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=A0(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=A0(e,n);if(i.childCount<=1&&n>0){let s=e.size-n<=n+i.size;this.unplaced=new he(Gu(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new he(Gu(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let C=0;C<s.length;C++)this.openFrontierNode(s[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(jM(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=Wu(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(Gu(a.content,e-1,1),e-1,b<0?a.openEnd:e-1):new he(Gu(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||!B0(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],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),a=B0(e,n,i,r,s);if(a){for(let u=n-1;u>=0;u--){let{match:c,type:f}=this.frontier[u],h=B0(e,u,f,c,!0);if(!h||h.childCount)continue e}return{depth:n,fit:a,move:s?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=Wu(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Wu(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=Wu(this.placed,this.frontier.length,n))}}function Gu(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Gu(t.firstChild.content,e-1,n)))}function Wu(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Wu(t.lastChild.content,e-1,n)))}function A0(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function jM(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,jM(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 B0(t,e,n,r,i){let s=t.node(e),a=i?t.indexAfter(e):t.index(e);if(a==s.childCount&&!n.compatibleContent(s.type))return null;let u=r.fillBefore(s.content,!0,a);return u&&!NV(n,s.content,a)?u:null}function NV(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function PV(t){return t.spec.defining||t.spec.definingForContent}function OV(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(_M(i,s,r))return t.step(new At(e,n,r));let a=VM(i,s);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=PV(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 T=i.node(E-1),$=i.index(E-1);if(T.canReplaceWith($,$,v.type,v.marks))return t.replace(i.before(E),D?s.after(E):n,new he(HM(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=s.after(b))}}function HM(t,e,n,r,i){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(HM(s.content,e+1,n,r,s)))}if(e>r){let s=i.contentMatchAt(0),a=s.fillBefore(t).append(t);t=a.append(s.matchFragment(a).fillBefore(ae.empty,!0))}return t}function LV(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=MV(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new he(ae.from(r),0,0))}function zV(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 s=VM(r,i);for(let a=0;a<s.length;a++){let u=s[a],c=a==s.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 VM(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let s=t.start(i);if(s<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;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&n.push(i)}return n}class fl extends hn{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 Rt.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Rt.fromReplace(e,this.pos,this.pos+1,new he(ae.from(i),0,n.isLeaf?0:1))}getMap(){return Wn.empty}invert(e){return new fl(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 fl(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 fl(n.pos,n.attr,n.value)}}hn.jsonID("attr",fl);class zc extends hn{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 Rt.ok(r)}getMap(){return Wn.empty}invert(e){return new zc(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 zc(n.attr,n.value)}}hn.jsonID("docAttr",zc);let xl=class extends Error{};xl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};xl.prototype=Object.create(Error.prototype);xl.prototype.constructor=xl;xl.prototype.name="TransformError";class UM{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Lc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new xl(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((s,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=cm(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 OV(this,e,n,r),this}replaceRangeWith(e,n,r){return LV(this,e,n,r),this}deleteRange(e,n){return zV(this,e,n),this}lift(e,n){return CV(this,e,n),this}join(e,n=1){return BV(this,e,n),this}wrap(e,n){return kV(this,e,n),this}setBlockType(e,n=e,r,i=null){return SV(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return wV(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new fl(e,n,r)),this}setDocAttribute(e,n){return this.step(new zc(e,n)),this}addNodeMark(e,n){return this.step(new Ds(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 Zo(e,n));else{let i=r.marks,s,a=[];for(;s=n.isInSet(i);)a.push(new Zo(e,s)),i=s.removeFromSet(i);for(let u=a.length-1;u>=0;u--)this.step(a[u])}return this}split(e,n=1,r){return TV(this,e,n,r),this}addMark(e,n,r){return yV(this,e,n,r),this}removeMark(e,n,r){return vV(this,e,n,r),this}clearIncompatible(e,n,r){return z3(this,e,n,r),this}}const M0=Object.create(null);class Me{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new IV(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 s=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(s);e.replaceRange(h.map(c.pos),h.map(f.pos),u?he.empty:n),u==0&&aD(e,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:u}=i[s],c=e.mapping.slice(r),f=c.map(a.pos),h=c.map(u.pos);s?e.deleteRange(f,h):(e.replaceRangeWith(f,h,n),aD(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new ke(e):il(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let s=e.depth-1;s>=0;s--){let a=n<0?il(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):il(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(a)return a}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Qn(e.node(0))}static atStart(e){return il(e,e,0,0,1)||new Qn(e)}static atEnd(e){return il(e,e,e.content.size,e.childCount,-1)||new Qn(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=M0[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 M0)throw new RangeError("Duplicate use of selection JSON ID "+e);return M0[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}Me.prototype.visible=!0;class IV{constructor(e,n){this.$from=e,this.$to=n}}let sD=!1;function oD(t){!sD&&!t.parent.inlineContent&&(sD=!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){oD(e),oD(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 dm(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 s=Me.findFrom(n,r,!0)||Me.findFrom(n,-r,!0);if(s)n=s.$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 dm{constructor(e,n){this.anchor=e,this.head=n}map(e){return new dm(e.map(this.anchor),e.map(this.head))}resolve(e){return ke.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ce 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),s=e.resolve(i);return r?Me.near(s):new Ce(s)}content(){return new he(ae.from(this.node),0,0)}eq(e){return e instanceof Ce&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new F3(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ce(e.resolve(n.anchor))}static create(e,n){return new Ce(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ce.prototype.visible=!1;Me.jsonID("node",Ce);class F3{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new dm(r,r):new F3(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Ce.isSelectable(r)?new Ce(n):Me.near(n)}}class Qn 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 Qn(e)}map(e){return new Qn(e)}eq(e){return e instanceof Qn}getBookmark(){return FV}}Me.jsonID("all",Qn);const FV={map(){return this},resolve(t){return new Qn(t)}};function il(t,e,n,r,i,s=!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(!s&&Ce.isSelectable(u))return Ce.create(t,n-(i<0?u.nodeSize:0))}else{let c=il(t,u,n+i,i<0?u.childCount:0,i,s);if(c)return c}n+=u.nodeSize*i}return null}function aD(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof At||i instanceof Ht))return;let s=t.mapping.maps[r],a;s.forEach((u,c,f,h)=>{a==null&&(a=h)}),t.setSelection(Me.near(t.doc.resolve(a),n))}const lD=1,Uf=2,uD=4;class KV extends UM{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|lD)&~Uf,this.storedMarks=null,this}get selectionSet(){return(this.updated&lD)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Uf,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&Uf)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Uf,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 s=this.storedMarks;if(!s){let a=this.doc.resolve(n);s=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,s)),!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|=uD,this}get scrolledIntoView(){return(this.updated&uD)>0}}function cD(t,e){return!e||!t?t:t.bind(e)}class Qu{constructor(e,n,r){this.name=e,this.init=cD(n.init,r),this.apply=cD(n.apply,r)}}const _V=[new Qu("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Qu("selection",{init(t,e){return t.selection||Me.atStart(e.doc)},apply(t){return t.selection}}),new Qu("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Qu("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class R0{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=_V.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 Qu(r.key,r.spec.state,r))})}}class No{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 s=!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),s=!0}i&&(i[a]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new No(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new KV(this)}static create(e){let n=new R0(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new No(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 R0(this.schema,e.plugins),r=n.fields,i=new No(n);for(let s=0;s<r.length;s++){let a=r[s].name;i[a]=this.hasOwnProperty(a)?this[a]:r[s].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],s=i.spec.state;s&&s.toJSON&&(n[r]=s.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 R0(e.schema,e.plugins),s=new No(i);return i.fields.forEach(a=>{if(a.name=="doc")s.doc=$s.fromJSON(e.schema,n.doc);else if(a.name=="selection")s.selection=Me.fromJSON(s.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(s.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)){s[a.name]=f.fromJSON.call(c,e,n[u],s);return}}s[a.name]=a.init(e,s)}}),s}}function qM(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=qM(i,e,{})),n[r]=i}return n}class ht{constructor(e){this.spec=e,this.props={},e.props&&qM(e.props,this,this.props),this.key=e.key?e.key.key:GM("plugin")}getState(e){return e[this.key]}}const N0=Object.create(null);function GM(t){return t in N0?t+"$"+ ++N0[t]:(N0[t]=0,t+"$")}class Ft{constructor(e="key"){this.key=GM(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const WM=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function QM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const YM=(t,e,n)=>{let r=QM(t,n);if(!r)return!1;let i=K3(r);if(!i){let a=r.blockRange(),u=a&&Nl(a);return u==null?!1:(e&&e(t.tr.lift(a,u).scrollIntoView()),!0)}let s=i.nodeBefore;if(s9(t,i,e,-1))return!0;if(r.parent.content.size==0&&(Cl(s,"end")||Ce.isSelectable(s)))for(let a=r.depth;;a--){let u=cm(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(Cl(s,"end")?Me.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):Ce.create(c.doc,i.pos-s.nodeSize)),e(c.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},jV=(t,e,n)=>{let r=QM(t,n);if(!r)return!1;let i=K3(r);return i?XM(t,i,e):!1},HV=(t,e,n)=>{let r=ZM(t,n);if(!r)return!1;let i=_3(r);return i?XM(t,i,e):!1};function XM(t,e,n){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){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=cm(t.doc,s,c,he.empty);if(!f||f.from!=s||f instanceof At&&f.slice.size>=c-s)return!1;if(n){let h=t.tr.step(f);h.setSelection(ke.create(h.doc,s)),n(h.scrollIntoView())}return!0}function Cl(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 JM=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=K3(r)}let a=s&&s.nodeBefore;return!a||!Ce.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ce.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function K3(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 ZM(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const e9=(t,e,n)=>{let r=ZM(t,n);if(!r)return!1;let i=_3(r);if(!i)return!1;let s=i.nodeAfter;if(s9(t,i,e,1))return!0;if(r.parent.content.size==0&&(Cl(s,"start")||Ce.isSelectable(s))){let a=cm(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(Cl(s,"start")?Me.findFrom(u.doc.resolve(u.mapping.map(i.pos)),1):Ce.create(u.doc,u.mapping.map(i.pos))),e(u.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},t9=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=_3(r)}let a=s&&s.nodeAfter;return!a||!Ce.isSelectable(a)?!1:(e&&e(t.tr.setSelection(Ce.create(t.doc,s.pos)).scrollIntoView()),!0)};function _3(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 VV=(t,e)=>{let n=t.selection,r=n instanceof Ce,i;if(r){if(n.node.isTextblock||!Qs(t.doc,n.from))return!1;i=n.from}else if(i=um(t.doc,n.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);r&&s.setSelection(Ce.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},UV=(t,e)=>{let n=t.selection,r;if(n instanceof Ce){if(n.node.isTextblock||!Qs(t.doc,n.to))return!1;r=n.to}else if(r=um(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},qV=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),s=i&&Nl(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},n9=(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 j3(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 GV=(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),s=n.indexAfter(-1),a=j3(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,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},r9=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof Qn||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=j3(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,u=t.tr.insert(a,s.createAndFill());u.setSelection(ke.create(u.doc,a+1)),e(u.scrollIntoView())}return!0},i9=(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 s=n.before();if(wi(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Nl(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function WV(t){return(e,n)=>{if(e.selection instanceof Ce&&e.selection.node.isBlock){let{$from:b}=e.selection;return!b.parentOffset||!wi(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 Qn)&&r.deleteSelection();let{$from:i}=r.selection,s=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=j3(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=wi(r.doc,m,a.length,a);if(g||(a[0]=c?{type:c}:null,g=wi(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(s),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 QV=WV(),YV=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),e&&e(t.tr.setSelection(Ce.create(t.doc,i))),!0)};function XV(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Qs(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function s9(t,e,n,r){let i=e.nodeBefore,s=e.nodeAfter,a,u,c=i.type.spec.isolating||s.type.spec.isolating;if(!c&&XV(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(s.type))&&u.matchType(a[0]||s.type).validEnd){if(n){let b=e.pos+s.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 Ht(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&&Qs(C.doc,E.pos)&&C.join(E.pos),n(C.scrollIntoView())}return!0}let h=s.type.spec.isolating||r>0&&c?null:Me.findFrom(e,1),m=h&&h.$from.blockRange(h.$to),g=m&&Nl(m);if(g!=null&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(f&&Cl(s,"start",!0)&&Cl(i,"end")){let b=i,v=[];for(;v.push(b),!b.isTextblock;)b=b.lastChild;let C=s,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 T=t.tr.step(new Ht(e.pos-v.length,e.pos+s.nodeSize,e.pos+E,e.pos+s.nodeSize-E,new he(D,v.length,0),0,!0));n(T.scrollIntoView())}return!0}}return!1}function o9(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(e.tr.setSelection(ke.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const JV=o9(-1),ZV=o9(1);function eU(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s),u=a&&I3(a,t,e);return u?(r&&r(n.tr.wrap(a,u).scrollIntoView()),!0):!1}}function dD(t,e=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:a},$to:{pos:u}}=n.selection.ranges[s];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 s=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:u},$to:{pos:c}}=n.selection.ranges[a];s.setBlockType(u,c,t,e)}r(s.scrollIntoView())}return!0}}function H3(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}H3(WM,YM,JM);H3(WM,e9,t9);H3(n9,r9,i9,QV);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function tU(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,a=i.blockRange(s);if(!a)return!1;let u=r?n.tr:null;return nU(u,a,t,e)?(r&&r(u.scrollIntoView()),!0):!1}}function nU(t,e,n,r=null){let i=!1,s=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);s=new Yh(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new Yh(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let u=I3(s,n,r,e);return u?(t&&rU(t,e,u,i,n),!0):!1}function rU(t,e,n,r,i){let s=ae.empty;for(let h=n.length-1;h>=0;h--)s=ae.from(n[h].type.create(n[h].attrs,s));t.step(new Ht(e.start-(r?2:0),e.end,e.start,e.end,new he(s,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&&wi(t.doc,c,u)&&(t.split(c,u),c+=2*u),c+=f.child(h).nodeSize;return t}function iU(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?sU(e,n,t,s):oU(e,n,s):!0:!1}}function sU(t,e,n,r){let i=t.tr,s=r.end,a=r.$to.end(r.depth);s<a&&(i.step(new Ht(s-1,a,s,a,new he(ae.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Yh(i.doc.resolve(r.$from.pos),i.doc.resolve(a),r.depth));const u=Nl(r);if(u==null)return!1;i.lift(r,u);let c=i.doc.resolve(i.mapping.map(s,-1)-1);return Qs(i.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&i.join(c.pos),e(i.scrollIntoView()),!0}function oU(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 s=r.doc.resolve(n.start),a=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let u=n.startIndex==0,c=n.endIndex==i.childCount,f=s.node(-1),h=s.index(-1);if(!f.canReplace(h+(u?0:1),h+1,a.content.append(c?ae.empty:ae.from(i))))return!1;let m=s.pos,g=m+a.nodeSize;return r.step(new Ht(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 aU(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,f=>f.childCount>0&&f.firstChild.type==t);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let u=s.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=s.start,b=s.end;n(e.tr.step(new Ht(g-(f?3:1),b,g,b,m,1,!0)).scrollIntoView())}return!0}}const en=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},El=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Zb=null;const vi=function(t,e,n){let r=Zb||(Zb=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},lU=function(){Zb=null},ea=function(t,e,n,r){return n&&(fD(t,e,n,r,-1)||fD(t,e,n,r,1))},uU=/^(img|br|input|textarea|hr)$/i;function fD(t,e,n,r,i){for(var s;;){if(t==n&&e==r)return!0;if(e==(i<0?0:dr(t))){let a=t.parentNode;if(!a||a.nodeType!=1||Zc(t)||uU.test(t.nodeName)||t.contentEditable=="false")return!1;e=en(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(!((s=a.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=a,e=i<0?dr(t):0}else return!1}}function dr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function cU(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=dr(t)}else if(t.parentNode&&!Zc(t))e=en(t),t=t.parentNode;else return null}}function dU(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&&!Zc(t))e=en(t)+1,t=t.parentNode;else return null}}function fU(t,e,n){for(let r=e==0,i=e==dr(t);r||i;){if(t==n)return!0;let s=en(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,i=i&&s==dr(t)}}function Zc(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 fm=function(t){return t.focusNode&&ea(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ko(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function hU(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pU(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(dr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(dr(r.startContainer),r.startOffset)}}}const Gr=typeof navigator<"u"?navigator:null,hD=typeof document<"u"?document:null,Ys=Gr&&Gr.userAgent||"",ey=/Edge\/(\d+)/.exec(Ys),a9=/MSIE \d/.exec(Ys),ty=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ys),zn=!!(a9||ty||ey),ws=a9?document.documentMode:ty?+ty[1]:ey?+ey[1]:0,fr=!zn&&/gecko\/(\d+)/i.test(Ys);fr&&+(/Firefox\/(\d+)/.exec(Ys)||[0,0])[1];const ny=!zn&&/Chrome\/(\d+)/.exec(Ys),nn=!!ny,l9=ny?+ny[1]:0,fn=!zn&&!!Gr&&/Apple Computer/.test(Gr.vendor),Dl=fn&&(/Mobile\/\w+/.test(Ys)||!!Gr&&Gr.maxTouchPoints>2),ur=Dl||(Gr?/Mac/.test(Gr.platform):!1),u9=Gr?/Win/.test(Gr.platform):!1,Ei=/Android \d/.test(Ys),ed=!!hD&&"webkitFontSmoothing"in hD.documentElement.style,mU=ed?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function gU(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 bU(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 pD(t,e,n){if(!ry(e)&&e.left==0)return;let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let a=n||t.dom;a;){if(a.nodeType!=1){a=El(a);continue}let u=a,c=u==s.body,f=c?gU(s):bU(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)s.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:El(a)}}function yU(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,a=n+1;a<Math.min(innerHeight,e.bottom);a+=5){let u=t.root.elementFromPoint(s,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:c9(t.dom)}}function c9(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=El(r));return e}function vU({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;d9(n,r==0?0:r-e)}function d9(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:s}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let el=null;function xU(t){if(t.setActive)return t.setActive();if(el)return t.focus(el);let e=c9(t);t.focus(el==null?{get preventScroll(){return el={preventScroll:!0},!0}}:void 0),el||(el=!1,d9(e,0))}function f9(t,e){let n,r=2e8,i,s=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&&(s=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)&&(s=m+1)}}return!n&&c&&(n=c,i=f,r=0),n&&n.nodeType==3?CU(n,i):!n||r&&n.nodeType==1?{node:t,offset:s}:f9(n,i)}function CU(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let s=0;s<n;s++){r.setEnd(t,s+1),r.setStart(t,s);let a=cs(r,1);if(a.top!=a.bottom&&V3(e,a)){i={node:t,offset:s+(e.left>=(a.left+a.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function V3(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function EU(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function DU(t,e,n){let{node:r,offset:i}=f9(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();s=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return t.docView.posFromDOM(r,i,s)}function kU(t,e,n,r){let i=-1;for(let s=e,a=!1;s!=t.dom;){let u=t.docView.nearestDesc(s,!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;s=u.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function h9(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)),s=i;;){let a=t.childNodes[s];if(a.nodeType==1){let u=a.getClientRects();for(let c=0;c<u.length;c++){let f=u[c];if(V3(e,f))return h9(a,e,f)}}if((s=(s+1)%r)==i)break}return t}function SU(t,e){let n=t.dom.ownerDocument,r,i=0,s=pU(n,e.left,e.top);s&&({node:r,offset:i}=s);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(!V3(e,f)||(a=h9(t.dom,e,f),!a))return null}if(fn)for(let f=a;r&&f;f=El(f))f.draggable&&(r=void 0);if(a=EU(a,e),r){if(fr&&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;ed&&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=kU(t,r,i,e))}u==null&&(u=DU(t,a,e));let c=t.docView.nearestDesc(a,!0);return{pos:u,inside:c?c.posAtStart-c.border:-1}}function ry(t){return t.top<t.bottom||t.left<t.right}function cs(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(ry(r))return r}return Array.prototype.find.call(n,ry)||t.getBoundingClientRect()}const $U=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function p9(t,e,n){let{node:r,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),a=ed||fr;if(r.nodeType==3)if(a&&($U.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let c=cs(vi(r,i,i),n);if(fr&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let f=cs(vi(r,i-1,i-1),-1);if(f.top==c.top){let h=cs(vi(r,i,i+1),-1);if(h.top!=c.top)return Lu(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++,Lu(cs(vi(r,c,f),h),h<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==dr(r))){let c=r.childNodes[i-1];if(c.nodeType==1)return P0(c.getBoundingClientRect(),!1)}if(s==null&&i<dr(r)){let c=r.childNodes[i];if(c.nodeType==1)return P0(c.getBoundingClientRect(),!0)}return P0(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==dr(r))){let c=r.childNodes[i-1],f=c.nodeType==3?vi(c,dr(c)-(a?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(f)return Lu(cs(f,1),!1)}if(s==null&&i<dr(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 Lu(cs(f,-1),!0)}return Lu(cs(r.nodeType==3?vi(r):r,-n),n>=0)}function Lu(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 P0(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 m9(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 wU(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return m9(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let u=t.docView.nearestDesc(s,!0);if(!u)break;if(u.node.isBlock){s=u.contentDOM||u.dom;break}s=u.dom.parentNode}let a=p9(t,i.pos,1);for(let u=s.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 TU=/[\u0590-\u08ac]/;function AU(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,a=i==r.parent.content.size,u=t.domSelection();return u?!TU.test(r.parent.textContent)||!u.modify?n=="left"||n=="backward"?s:a:m9(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 mD=null,gD=null,bD=!1;function BU(t,e,n){return mD==e&&gD==n?bD:(mD=e,gD=n,bD=n=="up"||n=="down"?wU(t,e,n):AU(t,e,n))}const hr=0,yD=1,Po=2,Tr=3;class td{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=hr,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 s,a;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>en(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 s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.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 s=this.getDesc(i),a;if(s&&(!n||s.node))if(r&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return s}}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 s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==e&&s!=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<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let a=this.children[r],u=s+a.size;if(u>e||a instanceof b9){i=e-s;break}s=u}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof g9&&s.side>=0;r--);if(n<=0){let s,a=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,a=!1);return s&&n&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?en(s.dom)+1:0}}else{let s,a=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?en(s.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,s=-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=en(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)){s=en(m.dom);break}n+=m.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=f}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}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 s=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(s>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((fr||fn)&&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:en(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(fr&&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&&fn)&&ea(u.node,u.offset,h.anchorNode,h.anchorOffset)&&ea(c.node,c.offset,h.focusNode,h.focusOffset))return;let g=!1;if((f.extend||e==n)&&!(m&&fr)){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 s=this.children[i],a=r+s.size;if(r==a?e<=a&&n>=r:e<a&&n>r){let u=r+s.border,c=a-s.border;if(e>=u&&n<=c){this.dirty=e==r||n==a?Po:yD,e==u&&n==c&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Tr:s.markDirty(e-u,n-u);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Po:Tr}r=a}this.dirty=Po}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?Po:yD;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class g9 extends td{constructor(e,n,r,i){let s,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!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,s=this}matchesWidget(e){return this.dirty==hr&&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 MU extends td{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 Ts extends td{constructor(e,n,r,i,s){super(e,[],r,i),this.mark=n,this.spec=s}static create(e,n,r,i){let s=i.nodeViews[n.type.name],a=s&&s(n,i,r);return(!a||!a.dom)&&(a=la.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Ts(e,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&Tr||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Tr&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=hr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=hr}}slice(e,n,r){let i=Ts.create(this.parent,this.mark,!0,r),s=this.children,a=this.size;n<a&&(s=sy(s,n,a,r)),e>0&&(s=sy(s,0,e,r));for(let u=0;u<s.length;u++)s[u].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class As extends td{constructor(e,n,r,i,s,a,u){super(e,[],s,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=u}static create(e,n,r,i,s,a){let u=s.nodeViews[n.type.name],c,f=u&&u(n,s,()=>{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}=la.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=x9(h,r,n),f?c=new RU(e,n,r,i,h,m||null,g,f):n.isText?new hm(e,n,r,i,h,g):new As(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==hr&&e.eq(this.node)&&Jh(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,s=e.composing?this.localCompositionInfo(e,n):null,a=s&&s.pos>-1?s:null,u=s&&s.pos<0,c=new PU(this,a&&a.node,e);zU(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(s.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==Po)&&(a&&this.protectLocalComposition(e,a),y9(this.contentDOM,this.children,e),Dl&&IU(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 s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,u=FU(this.node.content,a,r-n,i-n);return u<0?null:{node:s,pos:u,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new MU(this,s,n,i);e.input.compositionNodes.push(a),this.children=sy(this.children,r,r+i.length,e,a)}update(e,n,r,i){return this.dirty==Tr||!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=hr}updateOuterDeco(e){if(Jh(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=v9(this.dom,this.nodeDOM,iy(this.outerDeco,this.node,n),iy(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 vD(t,e,n,r,i){x9(r,e,t);let s=new As(void 0,t,e,n,r,r,r);return s.contentDOM&&s.updateChildren(i,0),s}class hm extends As{constructor(e,n,r,i,s,a){super(e,n,r,i,s,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==Tr||this.dirty!=hr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=hr||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=hr,!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),s=document.createTextNode(i.text);return new hm(this.parent,i,this.outerDeco,this.innerDeco,s,s)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Tr)}get domAtom(){return!1}isText(e){return this.node.text==e}}class b9 extends td{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==hr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class RU extends As{constructor(e,n,r,i,s,a,u,c){super(e,n,r,i,s,a,u),this.spec=c}update(e,n,r,i){if(this.dirty==Tr)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,i),s}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 y9(t,e,n){let r=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let a=e[s],u=a.dom;if(u.parentNode==t){for(;u!=r;)r=xD(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(u,r);if(a instanceof Ts){let c=r?r.previousSibling:t.lastChild;y9(a.contentDOM,a.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=xD(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const uc=function(t){t&&(this.nodeName=t)};uc.prototype=Object.create(null);const Oo=[new uc];function iy(t,e,n){if(t.length==0)return Oo;let r=n?Oo[0]:new uc,i=[r];for(let s=0;s<t.length;s++){let a=t[s].type.attrs;if(a){a.nodeName&&i.push(r=new uc(a.nodeName));for(let u in a){let c=a[u];c!=null&&(n&&i.length==1&&i.push(r=new uc(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 v9(t,e,n,r){if(n==Oo&&r==Oo)return e;let i=e;for(let s=0;s<r.length;s++){let a=r[s],u=n[s];if(s){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=Oo[0]),i=c}NU(i,u||Oo[0],a)}return i}function NU(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 s=0;s<r.length;s++)i.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&t.classList.add(i[s]);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 x9(t,e,n){return v9(t,t,Oo,iy(e,n,t.nodeType!=1))}function Jh(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 xD(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class PU{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=OU(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 s=0,a=this.stack.length>>1,u=Math.min(a,e.length);for(;s<u&&(s==a-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<a;)this.destroyRest(),this.top.dirty=hr,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 Ts&&h.dirty!=Tr&&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=Ts.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 s=-1,a;if(i>=this.preMatch.index&&(a=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&a.matchesNode(e,n,r))s=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)){s=u;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,s){let a=this.top.children[i];return a.dirty==Tr&&a.dom==a.contentDOM&&(a.dirty=Po),a.update(e,n,r,s)?(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,s,a){for(let u=this.index;u<this.top.children.length;u++){let c=this.top.children[u];if(c instanceof As){let f=this.preMatch.matched.get(c);if(f!=null&&f!=s)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!=Tr&&Jh(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=Po,m.updateChildren(i,a+1),m.dirty=hr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,s,a){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Jh(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let u=As.create(this.top,n,r,i,s,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,s){let a=As.create(this.top,e,n,r,i,s);a.contentDOM&&a.updateChildren(i,s+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 s=new g9(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Ts;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof hm)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((fn||nn)&&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 b9(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 OU(t,e){let n=e,r=n.children.length,i=t.childCount,s=new Map,a=[];e:for(;i>0;){let u;for(;;)if(r){let f=n.children[r-1];if(f instanceof Ts)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,s.set(u,i),a.push(u)}}return{index:i,matched:s,matches:a.reverse()}}function LU(t,e){return t.type.side-e.type.side}function zU(t,e,n,r){let i=e.locals(t),s=0;if(i.length==0){for(let f=0;f<t.childCount;f++){let h=t.child(f);r(h,i,e.forChild(s,h),f),s+=h.nodeSize}return}let a=0,u=[],c=null;for(let f=0;;){let h,m;for(;a<i.length&&i[a].to==s;){let E=i[a++];E.widget&&(h?(m||(m=[h])).push(E):h=E)}if(h)if(m){m.sort(LU);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<=s&&u.splice(E--,1);for(;a<i.length&&i[a].from<=s&&i[a].to>s;)u.push(i[a++]);let v=s+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-s),g=g.cut(0,E-s),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(s,g),b),s=v}}function IU(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 FU(t,e,n,r){for(let i=0,s=0;i<t.childCount&&s<=r;){let a=t.child(i++),u=s;if(s+=a.nodeSize,!a.isText)continue;let c=a.text;for(;i<t.childCount;){let f=t.child(i++);if(s+=f.nodeSize,!f.isText)break;c+=f.text}if(s>=n){if(s>=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 sy(t,e,n,r,i){let s=[];for(let a=0,u=0;a<t.length;a++){let c=t[a],f=u,h=u+=c.size;f>=n||h<=e?s.push(c):(f<e&&s.push(c.slice(0,e-f,r)),i&&(s.push(i),i=void 0),h>n&&s.push(c.slice(n-f,c.size,r)))}return s}function U3(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=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(fm(n)){for(c=a;i&&!i.node;)i=i.parent;let m=i.node;if(i&&m.isAtom&&Ce.isSelectable(m)&&i.parent&&!(m.isInline&&fU(n.focusNode,n.focusOffset,i.dom))){let g=i.posBefore;f=new Ce(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&&!s?1:-1;f=q3(t,h,u,m)}return f}function C9(t){return t.editable?t.hasFocus():D9(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Ti(t,e=!1){let n=t.state.selection;if(E9(t,n),!C9(t))return;let r=t.input.mouseDown;if(!e&&nn&&r){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&ea(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)&&r.delaySelUpdate()){t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)_U(t);else{let{anchor:i,head:s}=n,a,u;CD&&!(n instanceof ke)&&(n.$from.parent.inlineContent||(a=ED(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(u=ED(t,n.to))),t.docView.setSelection(i,s,t,e),CD&&(a&&DD(a),u&&DD(u)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&KU(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const CD=fn||nn&&l9<63;function ED(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(fn&&i&&i.contentEditable=="false")return O0(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return O0(i);if(s)return O0(s)}}function O0(t){return t.contentEditable="true",fn&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function DD(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function KU(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(()=>{(!C9(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function _U(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,en(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&zn&&ws<=11&&(n.disabled=!0,n.disabled=!1)}function E9(t,e){if(e instanceof Ce){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(kD(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else kD(t)}function kD(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function q3(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||ke.between(e,n,r)}function SD(t){return t.editable&&!t.hasFocus()?!1:D9(t)}function D9(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 jU(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ea(e.node,e.offset,n.anchorNode,n.anchorOffset)}function oy(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&Me.findFrom(s,e)}function hs(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function $D(t,e,n){let r=t.state.selection;if(r instanceof ke)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return hs(t,new ke(r.$anchor,a))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=oy(t.state,e);return i&&i instanceof Ce?hs(t,i):!1}else if(!(ur&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,a;if(!s||s.isText)return!1;let u=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(a=t.docView.descAt(u))&&!a.contentDOM?Ce.isSelectable(s)?hs(t,new Ce(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):ed?hs(t,new ke(t.state.doc.resolve(e<0?u:u+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ce&&r.node.isInline)return hs(t,new ke(e>0?r.$to:r.$from));{let i=oy(t.state,e);return i?hs(t,i):!1}}}function Zh(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function cc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function tl(t,e){return e<0?HU(t):VU(t)}function HU(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,s,a=!1;for(fr&&n.nodeType==1&&r<Zh(n)&&cc(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let u=n.childNodes[r-1];if(cc(u,-1))i=n,s=--r;else if(u.nodeType==3)n=u,r=n.nodeValue.length;else break}}else{if(k9(n))break;{let u=n.previousSibling;for(;u&&cc(u,-1);)i=n.parentNode,s=en(u),u=u.previousSibling;if(u)n=u,r=Zh(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?ay(t,n,r):i&&ay(t,i,s)}function VU(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=Zh(n),s,a;for(;;)if(r<i){if(n.nodeType!=1)break;let u=n.childNodes[r];if(cc(u,1))s=n,a=++r;else break}else{if(k9(n))break;{let u=n.nextSibling;for(;u&&cc(u,1);)s=u.parentNode,a=en(u)+1,u=u.nextSibling;if(u)n=u,r=0,i=Zh(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}s&&ay(t,s,a)}function k9(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function UU(t,e){for(;t&&e==t.childNodes.length&&!Zc(t);)e=en(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 qU(t,e){for(;t&&!e&&!Zc(t);)e=en(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 ay(t,e,n){if(e.nodeType!=3){let s,a;(a=UU(e,n))?(e=a,n=0):(s=qU(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(fm(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Ti(t)},50)}function wD(t,e){let n=t.state.doc.resolve(e);if(!(nn||u9)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),a=(s.top+s.bottom)/2;if(a>i.top&&a<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function TD(t,e,n){let r=t.state.selection;if(r instanceof ke&&!r.empty||n.indexOf("s")>-1||ur&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let a=oy(t.state,e);if(a&&a instanceof Ce)return hs(t,a)}if(!i.parent.inlineContent){let a=e<0?i:s,u=r instanceof Qn?Me.near(a,e):Me.findFrom(a,e);return u?hs(t,u):!1}return!1}function AD(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 s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let a=t.state.tr;return e<0?a.delete(n.pos-s.nodeSize,n.pos):a.delete(n.pos,n.pos+s.nodeSize),t.dispatch(a),!0}return!1}function BD(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function GU(t){if(!fn||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;BD(t,r,"true"),setTimeout(()=>BD(t,r,"false"),20)}return!1}function WU(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function QU(t,e){let n=e.keyCode,r=WU(e);if(n==8||ur&&n==72&&r=="c")return AD(t,-1)||tl(t,-1);if(n==46&&!e.shiftKey||ur&&n==68&&r=="c")return AD(t,1)||tl(t,1);if(n==13||n==27)return!0;if(n==37||ur&&n==66&&r=="c"){let i=n==37?wD(t,t.state.selection.from)=="ltr"?-1:1:-1;return $D(t,i,r)||tl(t,i)}else if(n==39||ur&&n==70&&r=="c"){let i=n==39?wD(t,t.state.selection.from)=="ltr"?1:-1:1;return $D(t,i,r)||tl(t,i)}else{if(n==38||ur&&n==80&&r=="c")return TD(t,-1,r)||tl(t,-1);if(n==40||ur&&n==78&&r=="c")return GU(t)||TD(t,1,r)||tl(t,1);if(r==(ur?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function G3(t,e){t.someProp("transformCopied",b=>{e=b(e,t)});let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;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")||la.fromSchema(t.state.schema),u=B9(),c=u.createElement("div");c.appendChild(a.serializeFragment(r,{document:u}));let f=c.firstChild,h,m=0;for(;f&&f.nodeType==1&&(h=A9[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} ${s}${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 S9(t,e,n,r,i){let s=i.parent.type.spec.code,a,u;if(!n&&!e)return null;let c=!!e&&(r||s||!n);if(c){if(t.someProp("transformPastedText",g=>{e=g(e,s||r,t)}),s)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=la.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=ZU(n),ed&&eq(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")||$i.fromSchema(t.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||h),context:i,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!YU.test(g.parentNode.nodeName)?{ignore:!0}:null}})),h)u=tq(MD(u,+h[1],+h[2]),h[4]);else if(u=he.maxOpen(XU(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=MD(u,m,g)}return t.someProp("transformPasted",m=>{u=m(u,t,c)}),u}const YU=/^(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 XU(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)),s,a=[];if(t.forEach(u=>{if(!a)return;let c=i.findWrapping(u.type),f;if(!c)return a=null;if(f=a.length&&s.length&&w9(c,s,u,a[a.length-1],0))a[a.length-1]=f;else{a.length&&(a[a.length-1]=T9(a[a.length-1],s.length));let h=$9(u,c);a.push(h),i=i.matchType(h.type),s=c}}),a)return ae.from(a)}return t}function $9(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ae.from(t));return t}function w9(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=w9(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(ae.from($9(n,t,i+1))))}}function T9(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,T9(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ae.empty,!0);return t.copy(n.append(r))}function ly(t,e,n,r,i,s){let a=e<0?t.firstChild:t.lastChild,u=a.content;return t.childCount>1&&(s=0),i<r-1&&(u=ly(u,e,n,r,i+1,s)),i>=n&&(u=e<0?a.contentMatchAt(0).fillBefore(u,s<=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 MD(t,e,n){return e<t.openStart&&(t=new he(ly(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new he(ly(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const A9={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 B9(){return document.implementation.createHTMLDocument("title")}let L0=null;function JU(t){let e=window.trustedTypes;return e?(L0||(L0=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),L0.createHTML(t)):t}function ZU(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=B9(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&A9[i[1].toLowerCase()])&&(t=s.map(a=>"<"+a+">").join("")+t+s.map(a=>"</"+a+">").reverse().join("")),r.innerHTML=JU(t),s)for(let a=0;a<s.length;a++)r=r.querySelector(s[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 eq(t){let e=t.querySelectorAll(nn?"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 tq(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:s,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)),s++,a++}return new he(i,s,a)}const Cn={},En={},nq={touchstart:!0,touchmove:!0};class rq{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 iq(t){for(let e in Cn){let n=Cn[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{oq(t,r)&&!W3(t,r)&&(t.editable||!(r.type in En))&&n(t,r)},nq[e]?{passive:!0}:void 0)}fn&&t.dom.addEventListener("input",()=>null),uy(t)}function Di(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function sq(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 uy(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>W3(t,r))})}function W3(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function oq(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 aq(t,e){!W3(t,e)&&Cn[e.type]&&(t.editable||!(e.type in En))&&Cn[e.type](t,e)}En.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!P9(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ei&&nn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Dl&&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,ko(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||QU(t,n)?n.preventDefault():Di(t,"key")};En.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};En.keypress=(t,e)=>{let n=e;if(P9(t)||!n.charCode||n.ctrlKey&&!n.altKey||ur&&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),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",a=>a(t,r.$from.pos,r.$to.pos,i,s))&&t.dispatch(s()),n.preventDefault()}};function nd(t){return{left:t.clientX,top:t.clientY}}function lq(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Q3(t,e,n,r,i){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let a=s.depth+1;a>0;a--)if(t.someProp(e,u=>a>s.depth?u(t,n,s.nodeAfter,s.before(a),i,!0):u(t,n,s.node(a),s.before(a),i,!1)))return!0;return!1}function rd(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 uq(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Ce.isSelectable(r)?(rd(t,new Ce(n)),!0):!1}function cq(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof Ce&&(r=n.node);let s=t.state.doc.resolve(e);for(let a=s.depth+1;a>0;a--){let u=a>s.depth?s.nodeAfter:s.node(a);if(Ce.isSelectable(u)){r&&n.$from.depth>0&&a>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(a);break}}return i!=null?(rd(t,Ce.create(t.state.doc,i)),!0):!1}function dq(t,e,n,r,i){return Q3(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(i?cq(t,n):uq(t,n))}function fq(t,e,n,r){return Q3(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function hq(t,e,n,r){return Q3(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||pq(t,n,r)}function pq(t,e,n){if(n.button!=0)return!1;let r=M9(t,e,!0),i=t.state.doc;return r?(rd(t,r),r instanceof ke&&i.eq(t.state.doc)&&(t.input.mouseDown=new gq(t,r)),!0):!1}function M9(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 s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s),u=i.before(s);if(a.inlineContent)return ke.create(r,u+1,u+1+a.content.size);if(n&&Ce.isSelectable(a))return Ce.create(r,u)}return null}function Y3(t){return ep(t)}const R9=ur?"metaKey":"ctrlKey";Cn.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Y3(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&lq(n,t.input.lastClick)&&!n[R9]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let a=t.posAtCoords(nd(n));a&&(s=="singleClick"?t.input.mouseDown=new mq(t,a,n,!!r):(s=="doubleClick"?fq:hq)(t,a.pos,a.inside,n)?n.preventDefault():Di(t,"pointer"))};class N9{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 mq extends N9{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[R9],this.allowDefault=r.shiftKey;let s,a;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),a=n.inside;else{let h=e.state.doc.resolve(n.pos);s=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&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||f instanceof Ce&&f.from<=a&&f.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&fr&&!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||Ti(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(nd(e))),this.updateAllowDefault(e),this.allowDefault||!n?Di(this.view,"pointer"):dq(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||fn&&this.mightDrag&&!this.mightDrag.node.isAtom||nn&&!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)?(rd(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 gq extends N9{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(nd(e)),r=n&&M9(this.view,n.inside,!1);if(!r)return;let{doc:i}=this.view.state,s=this.startSelection,[a,u]=r.from<s.from?[s.to,r.from]:[s.from,r.to];rd(this.view,ke.create(i,a,u))}}Cn.touchstart=t=>{t.input.lastTouch=Date.now(),Y3(t),Di(t,"pointer")};Cn.touchmove=t=>{t.input.lastTouch=Date.now(),Di(t,"pointer")};Cn.contextmenu=t=>Y3(t);function P9(t,e){return t.composing?!0:fn&&Math.abs(Date.now()-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const bq=Ei?5e3:-1;En.compositionstart=En.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)||nn&&u9&&yq(t)))t.markCursor=t.state.storedMarks||n.marks(),ep(t,!0),t.markCursor=null;else if(ep(t,!e.selection.empty),fr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let a=s<0?i.lastChild:i.childNodes[s-1];if(!a)break;if(a.nodeType==3){let u=t.domSelection();u&&u.collapse(a,a.nodeValue.length);break}else i=a,s=-1}}t.input.composing=!0}O9(t,bq)};function yq(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"}En.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++,O9(t,20))};function O9(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ep(t),e))}function L9(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function vq(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=cU(e.focusNode,e.focusOffset),r=dU(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;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 ep(t,e=!1){if(!(Ei&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),L9(t),e||t.docView&&t.docView.dirty){let n=U3(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 xq(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 Ic=zn&&ws<15||Dl&&mU<604;Cn.copy=En.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let s=Ic?null:n.clipboardData,a=r.content(),{dom:u,text:c}=G3(t,a);s?(n.preventDefault(),s.clearData(),s.setData("text/html",u.innerHTML),s.setData("text/plain",c)):xq(t,u),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Cq(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Eq(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?Fc(t,r.value,null,i,e):Fc(t,r.textContent,r.innerHTML,i,e)},50)}function Fc(t,e,n,r,i){let s=S9(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,i,s||he.empty)))return!0;if(!s)return!1;let a=Cq(s),u=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(u.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function z9(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," "):""}En.paste=(t,e)=>{let n=e;if(t.composing&&!Ei)return;let r=Ic?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Fc(t,z9(r),r.getData("text/html"),i,n)?n.preventDefault():Eq(t,n)};class I9{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Dq=ur?"altKey":"ctrlKey";function F9(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[Dq]}Cn.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(nd(n)),a;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof Ce?i.to-1:i.to))){if(r&&r.mightDrag)a=Ce.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=Ce.create(t.state.doc,m.posBefore))}}let u=(a||t.state.selection).content(),{dom:c,text:f,slice:h}=G3(t,u);(!n.dataTransfer.files.length||!nn||l9>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ic?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ic||n.dataTransfer.setData("text/plain",f),t.dragging=new I9(h,F9(t,n),a)};Cn.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};En.dragover=En.dragenter=(t,e)=>e.preventDefault();En.drop=(t,e)=>{try{kq(t,e,t.dragging)}finally{t.dragging=null}};function kq(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(nd(e));if(!r)return;let i=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",b=>{s=b(s,t,!1)}):s=S9(t,z9(e.dataTransfer),Ic?null:e.dataTransfer.getData("text/html"),!1,i);let a=!!(n&&F9(t,e));if(t.someProp("handleDrop",b=>b(t,e,s||he.empty,a))){e.preventDefault();return}if(!s)return;e.preventDefault();let u=s?KM(t.state.doc,i.pos,s):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=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,m=c.doc;if(h?c.replaceRangeWith(f,f,s.content.firstChild):c.replaceRange(f,f,s),c.doc.eq(m))return;let g=c.doc.resolve(f);if(h&&Ce.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ce(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(q3(t,g,c.doc.resolve(b)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}Cn.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())&&Ti(t)},20))};Cn.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)};Cn.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",s=>s(t,ko(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 En)Cn[t]=En[t];function Kc(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 tp{constructor(e,n){this.toDOM=e,this.spec=n||Go,this.side=this.spec.side||0}map(e,n,r,i){let{pos:s,deleted:a}=e.mapResult(n.from+i,this.side<0?-1:1);return a?null:new bn(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof tp&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Kc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Bs{constructor(e,n){this.attrs=e,this.spec=n||Go}map(e,n,r,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,a=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=a?null:new bn(s,a,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Bs&&Kc(this.attrs,e.attrs)&&Kc(this.spec,e.spec)}static is(e){return e.type instanceof Bs}destroy(){}}class X3{constructor(e,n){this.attrs=e,this.spec=n||Go}map(e,n,r,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let a=e.mapResult(n.to+i,-1);return a.deleted||a.pos<=s.pos?null:new bn(s.pos-r,a.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(r)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof X3&&Kc(this.attrs,e.attrs)&&Kc(this.spec,e.spec)}destroy(){}}class bn{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new bn(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 bn(e,e,new tp(n,r))}static inline(e,n,r,i){return new bn(e,n,new Bs(r,i))}static node(e,n,r,i){return new bn(e,n,new X3(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bs}get widget(){return this.type instanceof tp}}const sl=[],Go={};class ot{constructor(e,n){this.local=e.length?e:sl,this.children=n.length?n:sl}static create(e,n){return n.length?np(n,e,0,Go):ln}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,s){for(let a=0;a<this.local.length;a++){let u=this.local[a];u.from<=n&&u.to>=e&&(!s||s(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,s)}}map(e,n,r){return this==ln||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Go)}mapInner(e,n,r,i,s){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):s.onRemove&&s.onRemove(this.local[u].spec)}return this.children.length?Sq(this.children,a||[],e,n,r,i,s):a?new ot(a.sort(Wo),sl):ln}add(e,n){return n.length?this==ln?ot.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,s=0;e.forEach((u,c)=>{let f=c+r,h;if(h=_9(n,u,f)){for(i||(i=this.children.slice());s<i.length&&i[s]<c;)s+=3;i[s]==c?i[s+2]=i[s+2].addInner(u,h,f+1):i.splice(s,0,c,c+u.nodeSize,np(h,u,f+1,Go)),s+=3}});let a=K9(s?j9(n):n,-r);for(let u=0;u<a.length;u++)a[u].type.valid(e,a[u])||a.splice(u--,1);return new ot(a.length?this.local.concat(a).sort(Wo):this.local,i||this.children)}remove(e){return e.length==0||this==ln?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let a,u=r[s]+n,c=r[s+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[s+2].removeInner(a,u+1);f!=ln?r[s+2]=f:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,a;s<e.length;s++)if(a=e[s])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 ot(i,r):ln}forChild(e,n){if(this==ln)return this;if(n.isLeaf)return ot.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 s=e+1,a=s+n.content.size;for(let u=0;u<this.local.length;u++){let c=this.local[u];if(c.from<a&&c.to>s&&c.type instanceof Bs){let f=Math.max(s,c.from)-s,h=Math.min(a,c.to)-s;f<h&&(i||(i=[])).push(c.copy(f,h))}}if(i){let u=new ot(i.sort(Wo),sl);return r?new bs([u,r]):u}return r||ln}eq(e){if(this==e)return!0;if(!(e instanceof ot)||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 J3(this.localsInner(e))}localsInner(e){if(this==ln)return sl;if(e.inlineContent||!this.local.some(Bs.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Bs||n.push(this.local[r]);return n}forEachSet(e){e(this)}}ot.empty=new ot([],[]);ot.removeOverlap=J3;const ln=ot.empty;class bs{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Go));return bs.from(r)}forChild(e,n){if(n.isLeaf)return ot.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=ln&&(s instanceof bs?r=r.concat(s.members):r.push(s))}return bs.from(r)}eq(e){if(!(e instanceof bs)||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 s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let a=0;a<s.length;a++)n.push(s[a])}}return n?J3(r?n:n.sort(Wo)):sl}static from(e){switch(e.length){case 0:return ln;case 1:return e[0];default:return new bs(e.every(n=>n instanceof ot)?e:e.reduce((n,r)=>n.concat(r instanceof ot?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Sq(t,e,n,r,i,s,a){let u=t.slice();for(let f=0,h=s;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 T=u[D+1];if(T<0||g>T+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]+s),m=h-i;if(m<0||m>=r.content.size){c=!0;continue}let g=n.map(t[f+1]+s,-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]+s+1,a);D!=ln?(u[f]=m,u[f+1]=b,u[f+2]=D):(u[f+1]=-2,c=!0)}else c=!0}if(c){let f=$q(u,t,e,n,i,s,a),h=np(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 ot(e.sort(Wo),u)}function K9(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 bn(i.from+e,i.to+e,i.type))}return n}function $q(t,e,n,r,i,s,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]+s+1);return n}function _9(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let s=0,a;s<t.length;s++)(a=t[s])&&a.from>n&&a.to<r&&((i||(i=[])).push(a),t[s]=null);return i}function j9(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function np(t,e,n,r){let i=[],s=!1;e.forEach((u,c)=>{let f=_9(t,u,c+n);if(f){s=!0;let h=np(f,u,n+c+1,r);h!=ln&&i.push(c,c+u.nodeSize,h)}});let a=K9(s?j9(t):t,-n).sort(Wo);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 ot(a,i):ln}function Wo(t,e){return t.from-e.from||t.to-e.to}function J3(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 s=e[i];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),RD(e,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),RD(e,i,r.copy(s.from,r.to)));break}}}return e}function RD(t,e,n){for(;e<t.length&&Wo(n,t[e])>0;)e++;t.splice(e,0,n)}function z0(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ln&&e.push(r)}),t.cursorWrapper&&e.push(ot.create(t.state.doc,[t.cursorWrapper.deco])),bs.from(e)}const wq={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Tq=zn&&ws<=11;class Aq{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 Bq{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Aq,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]);zn&&ws<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():fn&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Tq&&(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,wq)),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(SD(this.view)){if(this.suppressingSelectionUpdates)return Ti(this.view);if(zn&&ws<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ea(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 s=e.focusNode;s;s=El(s))n.add(s);for(let s=e.anchorNode;s;s=El(s))if(n.has(s)){r=s;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)&&SD(e)&&!this.ignoreSelectionChange(r),s=-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&&(s=s<0?m.from:Math.min(m.from,s),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||nn&&(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(fr&&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||Nq(e,m)!=b)&&g.remove()}}}let f=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&fm(r)&&(f=U3(e))&&f.eq(Me.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ti(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,a),Mq(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Pq(e,c)),this.handleDOMChange(s,a,u,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ti(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,s=e.nextSibling;if(zn&&ws<=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)&&(s=g)}let a=i&&i.parentNode==e.target?en(i)+1:0,u=r.localPosFromDOM(e.target,a,-1),c=s&&s.parentNode==e.target?en(s):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 ND=new WeakMap,PD=!1;function Mq(t){if(!ND.has(t)&&(ND.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=fr,PD)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."),PD=!0}}function OD(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return ea(a.node,a.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function Rq(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return OD(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?OD(t,n):null}function Nq(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 Pq(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let s of e)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let a=s.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(s,u.firstChild),r==s&&t.domSelection().collapse(s,i)}else s.parentNode.removeChild(s)}}function Oq(t,e,n,r){let{node:i,fromOffset:s,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}],fm(f)||h.push({node:f.focusNode,offset:f.focusOffset})),nn&&t.input.lastKeyCode===8)for(let D=a;D>s;D--){let T=i.childNodes[D-1],$=T.pmViewDesc;if(T.nodeName=="BR"&&!$){a=D;break}if(!$||$.size)break}let g=t.state.doc,b=t.someProp("domParser")||$i.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:s,to:a,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:h,ruleFromNode:Lq(r),context:v});if(h&&h[0].pos!=null){let D=h[0].pos,T=h[1]&&h[1].pos;T==null&&(T=D),C={anchor:D+u,head:T+u}}return{doc:E,sel:C,from:u,to:c}}const Lq=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if(e.nodeName=="BR"&&e.parentNode){if(fn&&/^(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||fn&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},zq=/^(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 Iq(t,e,n,r,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let R=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,M=U3(t,R);if(M&&!t.state.selection.eq(M)){if(nn&&Ei&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",G=>G(t,ko(13,"Enter"))))return;let I=t.state.tr.setSelection(M);R=="pointer"?I.setMeta("pointer",!0):R=="key"&&I.scrollIntoView(),s&&I.setMeta("composition",s),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=Oq(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=_q(m.content,f.doc.content,f.from,g,b);if(v&&t.input.domChangeCount++,(Dl&&t.input.lastIOSEnter>Date.now()-225||Ei)&&i.some(R=>R.nodeType==1&&!zq.test(R.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",R=>R(t,ko(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 R=LD(t,t.state.doc,f.sel);if(R&&!R.eq(t.state.selection)){let M=t.state.tr.setSelection(R);s&&M.setMeta("composition",s),t.dispatch(M)}}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)),zn&&ws<=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),T=C.sameParent(E)&&C.parent.inlineContent&&D.end()>=v.endA;if((Dl&&t.input.lastIOSEnter>Date.now()-225&&(!T||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!T&&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",R=>R(t,ko(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&Kq(h,v.start,v.endA,C,E)&&t.someProp("handleKeyDown",R=>R(t,ko(8,"Backspace")))){Ei&&nn&&t.domObserver.suppressSelectionUpdates();return}nn&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),Ei&&!T&&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(R){return R(t,ko(13,"Enter"))})},20));let $=v.start,A=v.endA,B=R=>{let M=R||t.state.tr.replace($,A,f.doc.slice(v.start-f.from,v.endB-f.from));if(f.sel){let I=LD(t,M.doc,f.sel);I&&!(nn&&t.composing&&I.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(I.head==$||I.head==M.mapping.map(A)-1)||zn&&I.empty&&I.head==$)&&M.setSelection(I)}return s&&M.setMeta("composition",s),M.scrollIntoView()},P;if(T)if(C.pos==E.pos){zn&&ws<=11&&C.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ti(t),20));let R=B(t.state.tr.delete($,A)),M=h.resolve(v.start).marksAcross(h.resolve(v.endA));M&&R.ensureMarks(M),t.dispatch(R)}else if(v.endA==v.endB&&(P=Fq(C.parent.content.cut(C.parentOffset,E.parentOffset),D.parent.content.cut(D.parentOffset,v.endA-D.start())))){let R=B(t.state.tr);P.type=="add"?R.addMark($,A,P.mark):R.removeMark($,A,P.mark),t.dispatch(R)}else if(C.parent.child(C.index()).isText&&C.index()==E.index()-(E.textOffset?0:1)){let R=C.parent.textBetween(C.parentOffset,E.parentOffset),M=()=>B(t.state.tr.insertText(R,$,A));t.someProp("handleTextInput",I=>I(t,$,A,R,M))||t.dispatch(M())}else t.dispatch(B());else t.dispatch(B())}function LD(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:q3(t,e.resolve(n.anchor),e.resolve(n.head))}function Fq(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,s=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++)s=n[h].removeFromSet(s);if(i.length==1&&s.length==0)u=i[0],a="add",c=h=>h.mark(u.addToSet(h.marks));else if(i.length==0&&s.length==1)u=s[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 Kq(t,e,n,r,i){if(n-e<=i.pos-r.pos||I0(r,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let u=s.nodeAfter;return u!=null&&n==e+u.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=t.resolve(I0(s,!0,!0));return!a.parent.isTextblock||a.pos>n||I0(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function I0(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 s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function _q(t,e,n,r,i){let s=t.findDiffStart(e,n),a=n+t.size,u=n+e.size;if(s==null)return null;let{a:c,b:f}=t.findDiffEnd(e,a,u);if(i=="end"){let h=Math.max(0,s-Math.min(c,f));r-=c+h-s}if(c<s&&a<u){let h=r<=s&&r>=c?s-r:0;s-=h,f=s+(f-c),c=s}else if(f<s){let h=r<=s&&r>=f?s-r:0;s-=h,c=s+(c-f),f=s}return{start:s,endA:c,endB:f}}class H9{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 rq,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(_D),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=FD(this),ID(this),this.nodeViews=KD(this),this.docView=vD(this.state.doc,zD(this),z0(this),this.dom,this),this.domObserver=new Bq(this,(r,i,s,a)=>Iq(this,r,i,s,a)),this.domObserver.start(),iq(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&&uy(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(_D),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,s=!1,a=!1;e.storedMarks&&this.composing&&(L9(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=KD(this);Hq(b,this.nodeViews)&&(this.nodeViews=b,s=!0)}(u||n.handleDOMEvents!=this._props.handleDOMEvents)&&uy(this),this.editable=FD(this),ID(this);let c=z0(this),f=zD(this),h=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",m=s||!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&&yU(this);if(a){this.domObserver.stop();let b=m&&(zn||nn)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&jq(i.selection,e.selection);if(m){let C=nn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=vq(this)),(s||!this.docView.update(e.doc,f,c,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=vD(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())&&jU(this)&&v.delaySelUpdate())?Ti(this,b):(E9(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&&vU(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 Ce){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&pD(this,n.getBoundingClientRect(),e)}else pD(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 s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&s<this.state.doc.content.size&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new I9(e.slice,e.move,i<0?void 0:Ce.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 s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let u=s[a].props[e];if(u!=null&&(i=n?n(u):u))return i}}hasFocus(){if(zn){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&&xU(this.dom),Ti(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 SU(this,e)}coordsAtPos(e,n=1){return p9(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 BU(this,n||this.state,e)}pasteHTML(e,n){return Fc(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Fc(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return G3(this,e)}destroy(){this.docView&&(sq(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],z0(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,lU())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return aq(this,e)}domSelectionRange(){let e=this.domSelection();return e?fn&&this.root.nodeType===11&&hU(this.dom.ownerDocument)==this.dom&&Rq(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}H9.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function zD(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"),[bn.node(0,t.state.doc.content.size,e)]}function ID(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:bn.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function FD(t){return!t.someProp("editable",e=>e(t.state)===!1)}function jq(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 KD(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 Hq(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 _D(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 zs={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:"'"},rp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Vq=typeof navigator<"u"&&/Mac/.test(navigator.platform),Uq=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var tn=0;tn<10;tn++)zs[48+tn]=zs[96+tn]=String(tn);for(var tn=1;tn<=24;tn++)zs[tn+111]="F"+tn;for(var tn=65;tn<=90;tn++)zs[tn]=String.fromCharCode(tn+32),rp[tn]=String.fromCharCode(tn);for(var F0 in zs)rp.hasOwnProperty(F0)||(rp[F0]=zs[F0]);function qq(t){var e=Vq&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Uq&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?rp:zs)[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 Gq=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Wq=typeof navigator<"u"&&/Win/.test(navigator.platform);function Qq(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,s,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))s=!0;else if(/^mod$/i.test(c))Gq?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),s&&(n="Shift-"+n),n}function Yq(t){let e=Object.create(null);for(let n in t)e[Qq(n)]=t[n];return e}function K0(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 Xq(t){return new ht({props:{handleKeyDown:V9(t)}})}function V9(t){let e=Yq(t);return function(n,r){let i=qq(r),s,a=e[K0(i,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let u=e[K0(i,r,!1)];if(u&&u(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(Wq&&r.ctrlKey&&r.altKey)&&(s=zs[r.keyCode])&&s!=i){let u=e[K0(s,r)];if(u&&u(n.state,n.dispatch,n))return!0}}return!1}}var Jq=Object.defineProperty,Z3=(t,e)=>{for(var n in e)Jq(t,n,{get:e[n],enumerable:!0})};function pm(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=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 s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var mm=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,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...f)=>{const h=u(...f)(s);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:s}=r,a=[],u=!!t,c=t||i.tr,f=()=>(!u&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.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,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([u,c])=>[u,(...f)=>c(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,a={tr:t,editor:r,view:s,state:pm({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}},Cr={};Z3(Cr,{blur:()=>Zq,clearContent:()=>eG,clearNodes:()=>tG,command:()=>nG,createParagraphNear:()=>rG,cut:()=>iG,deleteCurrentNode:()=>sG,deleteNode:()=>oG,deleteRange:()=>aG,deleteSelection:()=>cG,enter:()=>dG,exitCode:()=>fG,extendMarkRange:()=>hG,first:()=>pG,focus:()=>gG,forEach:()=>bG,insertContent:()=>yG,insertContentAt:()=>xG,insertDefaultBlock:()=>CG,joinBackward:()=>kG,joinDown:()=>DG,joinForward:()=>SG,joinItemBackward:()=>$G,joinItemForward:()=>wG,joinTextblockBackward:()=>TG,joinTextblockForward:()=>AG,joinUp:()=>EG,keyboardShortcut:()=>MG,lift:()=>RG,liftEmptyBlock:()=>NG,liftListItem:()=>PG,newlineInCode:()=>OG,resetAttributes:()=>LG,scrollIntoView:()=>zG,selectAll:()=>IG,selectNodeBackward:()=>FG,selectNodeForward:()=>KG,selectParentNode:()=>_G,selectTextblockEnd:()=>jG,selectTextblockStart:()=>HG,setContent:()=>VG,setMark:()=>cW,setMeta:()=>dW,setNode:()=>fW,setNodeSelection:()=>hW,setTextDirection:()=>pW,setTextSelection:()=>mW,sinkListItem:()=>gW,splitBlock:()=>bW,splitListItem:()=>yW,toggleList:()=>xW,toggleMark:()=>CW,toggleNode:()=>EW,toggleWrap:()=>DW,undoInputRule:()=>kW,unsetAllMarks:()=>SW,unsetMark:()=>$W,unsetTextDirection:()=>wW,updateAttributes:()=>TW,wrapIn:()=>AW,wrapInList:()=>BW});var Zq=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),eG=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),tG=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:a})=>{t.doc.nodesBetween(s.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=Nl(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},nG=t=>e=>t(e),rG=()=>({state:t,dispatch:e})=>r9(t,e),iG=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const a=r.mapping.map(e);return r.insert(a,s.content),r.setSelection(new ke(r.doc.resolve(Math.max(a-1,0)))),!0},sG=()=>({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 s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const u=i.before(s),c=i.after(s);t.delete(u,c).scrollIntoView()}return!0}return!1};function Nt(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 oG=t=>({tr:e,state:n,dispatch:r})=>{const i=Nt(t,n.schema),s=e.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===i){if(r){const c=s.before(a),f=s.after(a);e.delete(c,f).scrollIntoView()}return!0}return!1},aG=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},lG=t=>t.content?/^text(\*|\+)/.test(t.content):!1,jD=(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 lG(r)?n==="left"?t.start()-1:t.end()+1:t.pos},uG=(t,e,n)=>{const r=jD(t,n,"left"),i=jD(e,n,"right");return{from:r,to:i}},cG=()=>({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(s=>{const a=n.mapping.slice(i),u=n.doc.resolve(a.map(s.$from.pos)),c=n.doc.resolve(a.map(s.$to.pos)),{from:f,to:h}=uG(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},dG=()=>({commands:t})=>t.keyboardShortcut("Enter"),fG=()=>({state:t,dispatch:e})=>GV(t,e);function e1(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function ip(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:e1(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function U9(t,e,n={}){return t.find(r=>r.type===e&&ip(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function HD(t,e,n={}){return!!U9(t,e,n)}function t1(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(!U9([...r.node.marks],e,n))return;let s=r.index,a=t.start()+r.offset,u=s+1,c=a+r.node.nodeSize;for(;s>0&&HD([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;u<t.parent.childCount&&HD([...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 hG=(t,e)=>({tr:n,state:r,dispatch:i})=>{const s=Pi(t,r.schema),{doc:a,selection:u}=n,{$from:c,from:f,to:h}=u;if(i){const m=t1(c,s,e);if(m&&m.from<=f&&m.to>=h){const g=ke.create(a,m.from,m.to);n.setSelection(g)}}return!0},pG=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 q9(t){return t instanceof ke}function Lo(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function cy(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,s=r.to;return e==="all"?ke.create(t,Lo(0,i,s),Lo(t.content.size,i,s)):ke.create(t,Lo(e,i,s),Lo(e,i,s))}function VD(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function sp(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function mG(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var gG=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const a=()=>{(sp()||VD())&&r.dom.focus(),mG()&&!sp()&&!VD()&&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(s&&t===null&&!q9(n.state.selection))return a(),!0;const u=cy(i.doc,t)||n.state.selection,c=n.state.selection.eq(u);return s&&(c||i.setSelection(u),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},bG=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),yG=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),G9=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&&G9(r)}return t};function Yu(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 G9(n)}function kl(t,e,n){if(t instanceof $s||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(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),kl("",e,n)}if(i){if(n.errorOnInvalidContent){let a=!1,u="";const c=new AM({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?$i.fromSchema(c).parseSlice(Yu(t),n.parseOptions):$i.fromSchema(c).parse(Yu(t),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${u}`)})}const s=$i.fromSchema(e);return n.slice?s.parseSlice(Yu(t),n.parseOptions).content:s.parse(Yu(t),n.parseOptions)}return kl("",e,n)}function W9(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof At||i instanceof Ht))return;const s=t.mapping.maps[r];let a=0;s.forEach((u,c,f,h)=>{a===0&&(a=h)}),t.setSelection(Me.near(t.doc.resolve(a),n))}var vG=t=>!("type"in t),xG=(t,e,n)=>({tr:r,dispatch:i,editor:s})=>{var a;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let u;const c=E=>{s.emit("contentError",{editor:s,error:E,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},f={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{kl(e,s.schema,{parseOptions:f,errorOnInvalidContent:!0})}catch(E){c(E)}try{u=kl(e,s.schema,{parseOptions:f,errorOnInvalidContent:(a=n.errorOnInvalidContent)!=null?a:s.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((vG(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(),T=E.parentOffset===0,$=D.isText||D.isTextblock,A=D.content.size>0;T&&$&&A&&b&&(h=Math.max(0,h-1)),r.replaceWith(h,m,C)}n.updateSelection&&W9(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 Q9(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 CG=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{pos:i,attrs:s,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=Q9(c.parent.contentMatchAt(c.index()));if(!f)return!1;const h=Object.keys(f.spec.attrs||{}),m=s?Object.fromEntries(Object.entries(s).filter(([b])=>h.includes(b))):{};let g;if(a){const b=kl(a,r.schema);g=f.createAndFill(m,b)}else g=f.createAndFill(m);return g?(n&&(e.insert(c.pos,g),u&&W9(e,e.steps.length-1,-1)),!0):!1},EG=()=>({state:t,dispatch:e})=>VV(t,e),DG=()=>({state:t,dispatch:e})=>UV(t,e),kG=()=>({state:t,dispatch:e})=>YM(t,e),SG=()=>({state:t,dispatch:e})=>e9(t,e),$G=()=>({state:t,dispatch:e,tr:n})=>{try{const r=um(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},wG=()=>({state:t,dispatch:e,tr:n})=>{try{const r=um(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},TG=()=>({state:t,dispatch:e})=>jV(t,e),AG=()=>({state:t,dispatch:e})=>HV(t,e);function Y9(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function BG(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,s,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))s=!0;else if(/^mod$/i.test(c))sp()||Y9()?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}`),s&&(n=`Shift-${n}`),n}var MG=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const s=BG(t).split(/-(?!$)/),a=s.find(f=>!["Alt","Ctrl","Meta","Shift"].includes(f)),u=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.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 Is(t,e,n={}){const{from:r,to:i,empty:s}=t.selection,a=e?Nt(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=>ip(m.node.attrs,n,{strict:!1}));return s?!!f.length:f.reduce((m,g)=>m+g.to-g.from,0)>=c}var RG=(t,e={})=>({state:n,dispatch:r})=>{const i=Nt(t,n.schema);return Is(n,i,e)?qV(n,r):!1},NG=()=>({state:t,dispatch:e})=>i9(t,e),PG=t=>({state:e,dispatch:n})=>{const r=Nt(t,e.schema);return iU(r)(e,n)},OG=()=>({state:t,dispatch:e})=>n9(t,e);function gm(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function UD(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 LG=(t,e)=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const u=gm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(s=Nt(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)=>{s&&s===h.type&&(c=!0,i&&n.setNodeMarkup(m,void 0,UD(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(UD(g.attrs,e))))})})}),c},zG=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),IG=()=>({tr:t,dispatch:e})=>{if(e){const n=new Qn(t.doc);t.setSelection(n)}return!0},FG=()=>({state:t,dispatch:e})=>JM(t,e),KG=()=>({state:t,dispatch:e})=>t9(t,e),_G=()=>({state:t,dispatch:e})=>YV(t,e),jG=()=>({state:t,dispatch:e})=>ZV(t,e),HG=()=>({state:t,dispatch:e})=>JV(t,e);function dy(t,e,n={},r={}){return kl(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var VG=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:a,commands:u})=>{const{doc:c}=s;if(r.preserveWhitespace!=="full"){const f=dy(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return a&&s.replaceWith(0,c.content.size,f).setMeta("preventUpdate",!n),!0}return a&&s.setMeta("preventUpdate",!n),u.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function X9(t,e){const n=Pi(e,t.schema),{from:r,to:i,empty:s}=t.selection,a=[];s?(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 J9(t,e){const n=new UM(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function UG(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function qG(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 bm(t){return e=>qG(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 ym(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=be(e,"addExtensions",n);return r?[e,...ym(r())]:e}).flat(10)}function n1(t,e){const n=la.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Z9(t){return typeof t=="function"}function We(t,e=void 0,...n){return Z9(t)?e?t.bind(e)(...n):t(...n):t}function GG(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Sl(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 e7(t){const e=[],{nodeExtensions:n,markExtensions:r}=Sl(t),i=[...n,...r],s={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:{...s,...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={...s,...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 WG(t){const e=[];let n="",r=!1,i=!1,s=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==="("){s+=1,n+=c;continue}if(c===")"&&s>0){s-=1,n+=c;continue}if(c===";"&&s===0){e.push(n),n="";continue}}n+=c}return n&&e.push(n),e}function qD(t){const e=[],n=WG(t||""),r=n.length;for(let i=0;i<r;i+=1){const s=n[i],a=s.indexOf(":");if(a===-1)continue;const u=s.slice(0,a).trim(),c=s.slice(a+1).trim();u&&c&&e.push([u,c])}return e}function It(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const u=s?String(s).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([...qD(r[i]),...qD(s)]);r[i]=Array.from(u.entries()).map(([c,f])=>`${c}: ${f}`).join("; ")}else r[i]=s}),r},{})}function _c(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)=>It(n,r),{})}function QG(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function GD(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((s,a)=>{const u=a.attribute.parseHTML?a.attribute.parseHTML(n):QG(n.getAttribute(a.name));return u==null?s:{...s,[a.name]:u}},{});return{...r,...i}}}}function WD(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&GG(n)?!1:n!=null))}function QD(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 t7(t,e){var n;const r=e7(t),{nodeExtensions:i,markExtensions:s}=Sl(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,T)=>{const $=be(T,"extendNodeSchema",m);return{...D,...$?$(f):{}}},{}),b=WD({...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(QD))}),v=We(be(f,"parseHTML",m));v&&(b.parseDOM=v.map(D=>GD(D,h)));const C=be(f,"renderHTML",m);C&&(b.toDOM=D=>C({node:D,HTMLAttributes:_c(D,h)}));const E=be(f,"renderText",m);return E&&(b.toText=E),[f.name,b]})),c=Object.fromEntries(s.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 T=be(D,"extendMarkSchema",m);return{...E,...T?T(f):{}}},{}),b=WD({...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(QD))}),v=We(be(f,"parseHTML",m));v&&(b.parseDOM=v.map(E=>GD(E,h)));const C=be(f,"renderHTML",m);return C&&(b.toDOM=E=>C({mark:E,HTMLAttributes:_c(E,h)})),[f.name,b]}));return new AM({topNode:a,nodes:u,marks:c})}function YG(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function hl(t){return t.sort((n,r)=>{const i=be(n,"priority")||100,s=be(r,"priority")||100;return i>s?-1:i<s?1:0})}function r1(t){const e=hl(ym(t)),n=YG(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 n7(t,e){const n=r1(t);return t7(n,e)}function XG(t,e){const n=n7(e),r=Yu(t);return $i.fromSchema(n).parse(r).toJSON()}function r7(t,e,n){const{from:r,to:i}=e,{blockSeparator:s=`
31
+
32
+ `,textSerializers:a={}}=n||{};let u="";return t.nodesBetween(r,i,(c,f,h,m)=>{var g;c.isBlock&&f>r&&(u+=s);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 JG(t,e){const n={from:0,to:t.content.size};return r7(t,n,e)}function i7(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function ZG(t,e){const n=Nt(e,t.schema),{from:r,to:i}=t.selection,s=[];t.doc.nodesBetween(r,i,u=>{s.push(u)});const a=s.reverse().find(u=>u.type.name===n.name);return a?{...a.attrs}:{}}function s7(t,e){const n=gm(typeof e=="string"?e:e.name,t.schema);return n==="node"?ZG(t,e):n==="mark"?X9(t,e):{}}function eW(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 tW(t){const e=eW(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,a)=>a!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function i1(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,s)=>{const a=[];if(i.ranges.length)i.forEach((u,c)=>{a.push({from:u,to:c})});else{const{from:u,to:c}=n[s];if(u===void 0||c===void 0)return;a.push({from:u,to:c})}a.forEach(({from:u,to:c})=>{const f=e.slice(s).map(u,-1),h=e.slice(s).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}})})}),tW(r)}function s1(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const s=n.resolve(t),a=t1(s,i.type);a&&r.push({mark:i,...a})}):n.nodesBetween(t,e,(i,s)=>{!i||i?.nodeSize===void 0||r.push(...i.marks.map(a=>({from:s,to:s+i.nodeSize,mark:a})))}),r}var nW=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let s=r,a=null;for(;s>0&&a===null;){const u=i.node(s);u?.type.name===e?a=u:s-=1}return[a,s]};function zu(t,e){return e.nodes[t]||e.marks[t]||null}function yh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var rW=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,s,a,u)=>{var c,f;const h=((f=(c=i.type.spec).toText)==null?void 0:f.call(c,{node:i,pos:s,parent:a,index:u}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?h:h.slice(0,Math.max(0,r-s))}),n};function fy(t,e,n={}){const{empty:r,ranges:i}=t.selection,s=e?Pi(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(m=>s?s.name===m.type.name:!0).find(m=>ip(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(s&&C.inlineContent&&!C.type.allowsMarkType(s))return!1;if(!C.isText&&!C.marks.length)return;const D=Math.max(b,E),T=Math.min(v,E+C.nodeSize),$=T-D;a+=$,u.push(...C.marks.map(A=>({mark:A,from:D,to:T})))})}),a===0)return!1;const c=u.filter(m=>s?s.name===m.mark.type.name:!0).filter(m=>ip(m.mark.attrs,n,{strict:!1})).reduce((m,g)=>m+g.to-g.from,0),f=u.filter(m=>s?m.mark.type!==s&&m.mark.type.excludes(s):!0).reduce((m,g)=>m+g.to-g.from,0);return(c>0?c+f:c)>=a}function iW(t,e,n={}){if(!e)return Is(t,null,n)||fy(t,null,n);const r=gm(e,t.schema);return r==="node"?Is(t,e,n):r==="mark"?fy(t,e,n):!1}var sW=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const s=bm(u=>u.type.name===e)(t.selection);if(!s)return!1;const a=t.doc.resolve(s.pos+1);return i.pos+1===a.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},oW=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function YD(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function _0(t,e){const{nodeExtensions:n}=Sl(e),r=n.find(a=>a.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=We(be(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function id(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(s=>{i!==!1&&(id(s,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function o7(t){return t instanceof Ce}var a7=class l7{constructor(e){this.position=e}static fromJSON(e){return new l7(e.position)}toJSON(){return{position:this.position}}};function aW(t,e){const n=e.mapping.mapResult(t.position);return{position:new a7(n.pos),mapResult:n}}function lW(t){return new a7(t)}function uW(t,e,n){var r;const{selection:i}=e;let s=null;if(q9(i)&&(s=i.$cursor),s){const u=(r=t.storedMarks)!=null?r:s.marks();return s.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 cW=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:a,ranges:u}=s,c=Pi(t,r.schema);if(i)if(a){const f=X9(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 uW(r,n,c)},dW=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),fW=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const s=Nt(t,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:u})=>dD(s,{...a,...e})(n)?!0:u.clearNodes()).command(({state:u})=>dD(s,{...a,...e})(u,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},hW=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=Lo(t,0,r.content.size),s=Ce.create(r,i);e.setSelection(s)}return!0},pW=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=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=s.from,u=s.to),i&&n.doc.nodesBetween(a,u,(c,f)=>{c.isText||n.setNodeMarkup(f,void 0,{...c.attrs,dir:t})}),!0},mW=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,a=ke.atStart(r).from,u=ke.atEnd(r).to,c=Lo(i,a,u),f=Lo(s,a,u),h=ke.create(r,c,f);e.setSelection(h)}return!0},gW=t=>({state:e,dispatch:n})=>{const r=Nt(t,e.schema);return aU(r)(e,n)};function XD(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 bW=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:u,$to:c}=s,f=i.extensionManager.attributes,h=yh(f,u.node().type.name,u.node().attrs);if(s instanceof Ce&&s.node.isBlock)return!u.parentOffset||!wi(a,u.pos)?!1:(r&&(t&&XD(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:Q9(u.node(-1).contentMatchAt(u.indexAfter(-1)));let b=m&&g?[{type:g,attrs:h}]:void 0,v=wi(e.doc,e.mapping.map(u.pos),1,b);if(!b&&!v&&wi(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&&(s 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&&XD(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return v},yW=(t,e={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var a;const u=Nt(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=s.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 T=c.index(-1)?1:c.index(-2)?2:3;for(let M=c.depth-T;M>=c.depth-3;M-=1)D=ae.from(c.node(M).copy(D));const $=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,A={...yh(g,c.node().type.name,c.node().attrs),...e},B=((a=u.contentMatch.defaultType)==null?void 0:a.createAndFill(A))||void 0;D=D.append(ae.from(u.createAndFill(null,B)||void 0));const P=c.before(c.depth-(T-1));n.replace(P,c.after(-$),new he(D,4-T,0));let R=-1;n.doc.nodesBetween(P,n.doc.content.size,(M,I)=>{if(R>-1)return!1;M.isTextblock&&M.content.size===0&&(R=I+1)}),R>-1&&n.setSelection(ke.near(n.doc.resolve(R))),n.scrollIntoView()}return!0}const b=f.pos===c.end()?m.contentMatchAt(0).defaultType:null,v={...yh(g,m.type.name,m.attrs),...e},C={...yh(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(!wi(n.doc,c.pos,2))return!1;if(i){const{selection:D,storedMarks:T}=r,{splittableMarks:$}=s.extensionManager,A=T||D.$to.parentOffset&&D.$from.marks();if(n.split(c.pos,2,E).scrollIntoView(),!A||!i)return!0;const B=A.filter(P=>$.includes(P.type.name));n.ensureMarks(B)}return!0};function JD(t){return!t||t==="1"?null:t}function u7(t,e){return JD(t)===JD(e)}var j0=(t,e)=>{const n=bm(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&&Qs(t.doc,n.pos))||!u7(n.node.attrs.type,i?.attrs.type)||t.join(n.pos),!0},H0=(t,e)=>{const n=bm(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&&Qs(t.doc,r))||!u7(n.node.attrs.type,i?.attrs.type)||t.join(r),!0};function vW(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 xW=(t,e,n,r={})=>({editor:i,tr:s,state:a,dispatch:u,chain:c,commands:f,can:h})=>{const{extensions:m,splittableMarks:g}=i.extensionManager,b=Nt(t,a.schema),v=Nt(e,a.schema),{selection:C,storedMarks:E}=a,{$from:D,$to:T}=C,$=D.blockRange(T),A=E||C.$to.parentOffset&&C.$from.marks();if(!$)return!1;const B=bm(ie=>_0(ie.type.name,m))(C),P=C.from===0&&C.to===a.doc.content.size,R=a.doc.content.content,M=R.length===1?R[0]:null,I=P&&M&&_0(M.type.name,m)?{node:M,pos:0}:null,G=B??I,J=!!B&&$.depth>=1&&$.depth-B.depth<=1,U=!!I;if((J||U)&&G){if(G.node.type===b)return P&&U?c().command(({tr:ie,dispatch:F})=>{const te=vW(ie);return te?(ie.setSelection(te),F&&F(ie),!0):!1}).liftListItem(v).run():f.liftListItem(v);if(_0(G.node.type.name,m)&&b.validContent(G.node.content))return c().command(()=>(s.setNodeMarkup(G.pos,b),!0)).command(()=>j0(s,b)).command(()=>H0(s,b)).run()}return!n||!A||!u?c().command(()=>h().wrapInList(b,r)?!0:f.clearNodes()).wrapInList(b,r).command(()=>j0(s,b)).command(()=>H0(s,b)).run():c().command(()=>{const ie=h().wrapInList(b,r),F=A.filter(te=>g.includes(te.type.name));return s.ensureMarks(F),ie?!0:f.clearNodes()}).wrapInList(b,r).command(()=>j0(s,b)).command(()=>H0(s,b)).run()},CW=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,a=Pi(t,r.schema);return fy(r,a,e)?i.unsetMark(a,{extendEmptyMarkRange:s}):i.setMark(a,e)},EW=(t,e,n={})=>({state:r,commands:i})=>{const s=Nt(t,r.schema),a=Nt(e,r.schema),u=Is(r,s,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),u?i.setNode(a,c):i.setNode(s,{...c,...n})},DW=(t,e={})=>({state:n,commands:r})=>{const i=Nt(t,n.schema);return Is(n,i,e)?r.lift(i):r.wrapIn(i,e)},kW=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(t))){if(e){const a=t.tr,u=s.transform;for(let c=u.steps.length-1;c>=0;c-=1)a.step(u.steps[c].invert(u.docs[c]));if(s.text){const c=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,t.schema.text(s.text,c))}else a.delete(s.from,s.to)}return!0}}return!1},SW=(t={})=>({tr:e,dispatch:n,editor:r})=>{const{ignoreClearable:i=!1}=t,{selection:s}=e,{empty:a,ranges:u}=s;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},$W=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var s;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=(s=f.marks().find(E=>E.type===c))==null?void 0:s.attrs,C=t1(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},wW=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=i.from,a=i.to),r&&e.doc.nodesBetween(s,a,(u,c)=>{if(u.isText)return;const f={...u.attrs};delete f.dir,e.setNodeMarkup(c,void 0,f)}),!0},TW=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let s=null,a=null;const u=gm(typeof t=="string"?t:t.name,r.schema);if(!u)return!1;u==="node"&&(s=Nt(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)=>{s&&s===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&&s&&s===E.type&&(c=!0,v=Math.max(D,h),C=Math.min(D+E.nodeSize,m),g=D,b=E),D>=h&&D<=m&&(s&&s===E.type&&(c=!0,i&&n.setNodeMarkup(D,void 0,{...E.attrs,...e})),a&&E.marks.length&&E.marks.forEach(T=>{if(a===T.type&&(c=!0,i)){const $=Math.max(D,h),A=Math.min(D+E.nodeSize,m);n.addMark($,A,a.create({...T.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},AW=(t,e={})=>({state:n,dispatch:r})=>{const i=Nt(t,n.schema);return eU(i,e)(n,r)},BW=(t,e={})=>({state:n,dispatch:r})=>{const i=Nt(t,n.schema);return tU(i,e)(n,r)},MW=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 $l(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 RW(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Ce){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}function NW(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 ZD(t){return t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&")}function PW(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function OW(t){return typeof t=="number"}function LW(t){return Object.prototype.toString.call(t).slice(8,-1)}function qf(t){return LW(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}var zW={};Z3(zW,{createAtomBlockMarkdownSpec:()=>IW,createBlockMarkdownSpec:()=>FW,createInlineMarkdownSpec:()=>jW,parseAttributes:()=>o1,parseIndentedBlocks:()=>hy,renderNestedMarkdownContent:()=>l1,serializeAttributes:()=>a1});function o1(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 s=r.match(/(?:^|\s)#([\w-]+)/);s&&(e.id=s[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 a1(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 IW(t){const{nodeName:e,name:n,parseAttributes:r=o1,serializeAttributes:i=a1,defaultAttributes:s={},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={...s,...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(T=>!(T 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 FW(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=o1,serializeAttributes:s=a1,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,T=""]=E,$=i(T);let A=1;const B=D.length;let P="";const R=/^:::([\w-]*)(\s.*)?/gm,M=m.slice(B);for(R.lastIndex=0;;){const I=R.exec(M);if(I===null)break;const G=I.index,J=I[1];if(!((v=I[2])!=null&&v.endsWith(":::"))){if(J)A+=1;else if(A-=1,A===0){const U=M.slice(0,G);P=U.trim();const ie=m.slice(0,B+G+I[0].length);let F=[];if(P)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(P);return{type:e,raw:ie,attributes:$,content:P,tokens:F}}}}}},renderMarkdown:(m,g)=>{const b=h(m.attrs||{}),v=s(b),C=v?` {${v}}`:"",E=g.renderChildren(m.content||[],`
33
+
34
+ `);return`:::${f}${C}
35
+
36
+ ${E}
37
+
38
+ :::`}}}function KW(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,s,a]=r;e[i]=s||a,r=n.exec(t)}return e}function _W(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function jW(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=KW,serializeAttributes:s=_W,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="",T="";if(u){const[,A]=E;T=A}else{const[,A,B]=E;T=A,D=B||""}const $=i(T.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=s(v),E=C?` ${C}`:"";return u?`[${f}${E}]`:`[${f}${E}]${b}[/${f}]`}}}function hy(t,e,n){var r,i,s,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 B=u[h];if(B.trim()===""){const R=u.slice(h+1).findIndex(G=>G.trim()!=="");if(R===-1)break;if((((i=(r=u[h+1+R].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>C){D.push(B),f=`${f}${B}
42
+ `,h+=1;continue}else break}if((((a=(s=B.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:a.length)||0)>C)D.push(B),f=`${f}${B}
43
+ `,h+=1;else break}let T;const $=D.slice(1);if($.length>0){const B=$.map(P=>P.slice(C+m)).join(`
44
+ `);B.trim()&&(e.customNestedParser?T=e.customNestedParser(B):T=n.blockTokens(B))}const A=e.createToken(v,T);c.push(A)}if(c.length!==0)return{items:c,raw:f}}function l1(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[s,...a]=t.content,u=e.renderChildren([s]);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 ek(t){return typeof t.type=="string"?t.type:t.type.name}function HW(t,e){if(t.length!==e.length)return!1;const n=Array.from({length:e.length},()=>!1);return t.every(r=>{const i=ek(r),s=e.findIndex((a,u)=>!n[u]&&i===ek(a)&&$l(r.attrs,a.attrs));return s===-1?!1:(n[s]=!0,!0)})}function c7(t,e){const n={...t};return qf(t)&&qf(e)&&Object.keys(e).forEach(r=>{qf(e[r])&&qf(t[r])?n[r]=c7(t[r],e[r]):n[r]=e[r]}),n}function VW(t,e,n={}){const{state:r}=e,{doc:i,tr:s}=r,a=t;i.descendants((u,c)=>{const f=s.mapping.map(c),h=s.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});s.removeMark(f,h,t.type),s.addMark(f,h,b)}}),s.docChanged&&e.view.dispatch(s)}var sd=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},UW=(t,e)=>{if(e1(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 Gf(t){var e;const{editor:n,from:r,to:i,text:s,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=rW(f)+s;return a.forEach(g=>{if(h)return;const b=UW(m,g.find);if(!b)return;const v=b[0].length-s.length;if(v>0){const P=f.parentOffset-v;if(P<0||f.parent.textBetween(P,f.parentOffset)!==b[0].slice(0,v))return}const C=c.state.tr,E=pm({state:c.state,transaction:C}),D={from:r-(b[0].length-s.length),to:i},{commands:T,chain:$,can:A}=new mm({editor:n,state:E});g.handler({state:E,range:D,match:b,commands:T,chain:$,can:A})===null||!C.steps.length||(g.undoable&&C.setMeta(u,{transform:C,from:r,to:i,text:s}),c.dispatch(C),h=!0)}),h}function qW(t){const{editor:e,rules:n}=t,r=new ht({state:{init(){return null},apply(i,s,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=n1(ae.from(h),a.schema);const{from:m}=c,g=m+h.length;Gf({editor:e,from:m,to:g,text:h,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,a,u){return Gf({editor:e,from:s,to:a,text:u,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&Gf({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:a}=i.state.selection;return a?Gf({editor:e,from:a.pos,to:a.pos,text:`
50
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var u1=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:()=>c7(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}},ua=class d7 extends u1{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new d7(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)}},f7=class{constructor(t){this.find=t.find,this.handler=t.handler}},GW=(t,e,n)=>{if(e1(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function WW(t){const{editor:e,state:n,from:r,to:i,rule:s,pasteEvent:a,dropEvent:u}=t,{commands:c,chain:f,can:h}=new mm({editor:e,state:n}),m=[];return n.doc.nodesBetween(r,i,(b,v)=>{var C,E,D,T,$;if((E=(C=b.type)==null?void 0:C.spec)!=null&&E.code||!(b.isText||b.isTextblock||b.isInline))return;const A=($=(T=(D=b.content)==null?void 0:D.size)!=null?T:b.nodeSize)!=null?$:0,B=Math.max(r,v),P=Math.min(i,v+A);if(B>=P)return;const R=b.isText?b.text||"":b.textBetween(B-v,P-v,void 0,"");GW(R,s.find,a).forEach(I=>{if(I.index===void 0)return;const G=B+I.index+1,J=G+I[0].length,U={from:n.tr.mapping.map(G),to:n.tr.mapping.map(J)},ie=s.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 Wf=null,QW=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function YW(t){const{editor:e,rules:n}=t;let r=null,i=!1,s=!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=pm({state:h,transaction:C});if(!(!WW({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&&(Wf=e)},b=()=>{Wf&&(Wf=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(s=r===m.dom.parentElement,u=g,!s){const b=Wf;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"&&!s,D=v.getMeta("applyPasteRules"),T=!!D;if(!C&&!E&&!T)return;if(T){let{text:B}=D;typeof B=="string"?B=B:B=n1(ae.from(B),b.schema);const{from:P}=D,R=P+B.length,M=QW(B);return c({rule:h,state:b,from:P,to:{b:R},pasteEvt:M})}const $=g.doc.content.findDiffStart(b.doc.content),A=g.doc.content.findDiffEnd(b.doc.content);if(!(!OW($)||!A||$===A.b))return c({rule:h,state:b,from:$,to:A,pasteEvt:a})}}))}var vm=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=r1(t),this.schema=t7(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:zu(e.name,this.schema)},r=be(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return hl([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:zu(r.name,this.schema)},s=[],a=be(r,"addKeyboardShortcuts",i);let u={};if(r.type==="mark"&&be(r,"exitable",i)&&(u.ArrowRight=()=>ua.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=Xq(u);s.push(c);const f=be(r,"addInputRules",i);if(YD(r,t.options.enableInputRules)&&f){const g=f();if(g&&g.length){const b=qW({editor:t,rules:g}),v=Array.isArray(b)?b:[b];s.push(...v)}}const h=be(r,"addPasteRules",i);if(YD(r,t.options.enablePasteRules)&&h){const g=h();if(g&&g.length){const b=YW({editor:t,rules:g});s.push(...b)}}const m=be(r,"addProseMirrorPlugins",i);if(m){const g=m();s.push(...g)}return s})}get attributes(){return e7(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Sl(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:Nt(n.name,this.schema)},s=be(n,"addNodeView",i);if(!s)return[];const a=s();if(!a)return[];const u=(c,f,h,m,g)=>{const b=_c(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 hl([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:zu(i.name,this.schema)},a=be(i,"dispatchTransaction",s);return a?u=>{a.call(s,{transaction:u,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return hl([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:zu(i.name,this.schema)},a=be(i,"transformPastedHTML",s);return a?(u,c)=>{const f=r(u,c);return a.call(s,f)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=Sl(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)},s=be(n,"addMarkView",i);if(!s)return[];const a=(u,c,f)=>{const h=_c(u,r);return s()({mark:u,view:c,inline:f,editor:t,extension:n,HTMLAttributes:h,updateAttributes:m=>{VW(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:zu(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 s=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);s&&this.editor.on("beforeCreate",s),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)})}};vm.resolve=r1;vm.sort=hl;vm.flatten=ym;var XW={};Z3(XW,{ClipboardTextSerializer:()=>p7,Commands:()=>m7,Delete:()=>g7,Drop:()=>b7,Editable:()=>y7,FocusEvents:()=>x7,Keymap:()=>C7,Paste:()=>E7,Tabindex:()=>D7,TextDirection:()=>k7,focusEventsPluginKey:()=>v7});var pt=class h7 extends u1{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new h7(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},p7=pt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ht({key:new Ft("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,s=i7(n),{blockSeparator:a}=this.options,u={...a!==void 0?{blockSeparator:a}:{},textSerializers:s};return[...i.ranges].sort((f,h)=>f.$from.pos-h.$from.pos).map(({$from:f,$to:h})=>r7(r,{from:f.pos,to:h.pos},u)).join(a??`
51
+
52
+ `)}}})]}}),m7=pt.create({name:"commands",addCommands(){return{...Cr}}}),g7=pt.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const s=()=>{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=J9(t.before,[t,...e]);i1(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 wr){const D=g.slice(v).map(b.from,-1),T=g.slice(v).map(b.to),$=g.invert().map(D,-1),A=g.invert().map(T),B=D>0?(C=h.doc.nodeAt(D-1))==null?void 0:C.marks.some(R=>R.eq(b.mark)):!1,P=(E=h.doc.nodeAt(T))==null?void 0:E.marks.some(R=>R.eq(b.mark));this.editor.emit("delete",{type:"mark",mark:b.mark,from:b.from,to:b.to,deletedRange:{from:$,to:A},newRange:{from:D,to:T},partial:!!(P||B),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(s,0):s()}}),b7=pt.create({name:"drop",addProseMirrorPlugins(){return[new ht({key:new Ft("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),y7=pt.create({name:"editable",addProseMirrorPlugins(){return[new ht({key:new Ft("editable"),props:{editable:()=>this.editor.options.editable}})]}}),v7=new Ft("focusEvents"),x7=pt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ht({key:v7,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}}}})]}}),C7=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},s={...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 sp()||Y9()?s:i},addProseMirrorPlugins(){return[new ht({key:new Ft("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:s,from:a,to:u}=e.selection,c=Me.atStart(e.doc).from,f=Me.atEnd(e.doc).to;if(s||!(a===c&&u===f)||!id(n.doc))return;const g=n.tr,b=pm({state:n,transaction:g}),{commands:v}=new mm({editor:this.editor,state:b});if(v.clearNodes(),!!g.steps.length)return g}})]}}),E7=pt.create({name:"paste",addProseMirrorPlugins(){return[new ht({key:new Ft("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),D7=pt.create({name:"tabindex",addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new ht({key:new Ft("tabindex"),props:{attributes:()=>{var t;return!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:(t=this.options.value)!=null?t:"0"}}}})]}}),k7=pt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Sl(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 Ft("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),JW=class Xu{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 Xu(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 Xu(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 Xu(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,a=n.isInline,u=this.pos+r+(s?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 Xu(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 s=i.node.attrs,a=Object.keys(n);for(let u=0;u<a.length;u+=1){const c=a[u];if(s[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 s=Object.keys(n);return this.children.forEach(a=>{r&&i.length>0||(a.node.type.name===e&&s.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)}},ZW=`.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
+ }`,eQ=class extends MW{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:aW,createMappablePosition:lW},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=cy(e,this.options.autofocus);this.editorState=No.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=NW(ZW,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=Z9(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 s=typeof i=="string"?`${i}$`:i.key;n=n.filter(a=>!a.key.startsWith(s))}),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 s=[...this.options.enableCoreExtensions?[y7,p7.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),m7,x7,C7,D7.configure({value:(r=(n=this.options.coreExtensionOptions)==null?void 0:n.tabindex)==null?void 0:r.value}),b7,E7,g7,k7.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 vm(s,this)}createCommandManager(){this.commandManager=new mm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=dy(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=dy(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=No.create({doc:n,schema:this.schema,selection:cy(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,s=e.transformPastedHTML,a=this.extensionManager.transformPastedHTML(s);this.editorView=new H9(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),s=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)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return s7(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return iW(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return n1(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
123
+
124
+ `,textSerializers:n={}}=t||{};return JG(this.state.doc,{blockSeparator:e,textSerializers:{...i7(this.schema),...n}})}get isEmpty(){return id(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 JW(e,this,!1,n)}get $doc(){return this.$pos(0)}};function ta(t){return new sd({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:s}=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(s1(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&&s.delete(h,n.to),f>n.from&&s.delete(n.from+c,f);const g=n.from+c+a.length;s.addMark(n.from+c,g,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function tQ(t){return new sd({find:t.find,handler:({state:e,range:n,match:r})=>{const i=We(t.getAttributes,void 0,r)||{},{tr:s}=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];s.insertText(m,a+r[0].length-1),s.replaceWith(h,u,c)}else if(r[0]){const f=t.type.isInline?a:a-1;s.insert(f,t.type.create(i)).delete(s.mapping.map(a),s.mapping.map(u))}s.scrollIntoView()},undoable:t.undoable})}function py(t){return new sd({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),s=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,s)},undoable:t.undoable})}function wl(t){return new sd({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const s=We(t.getAttributes,void 0,r)||{},a=e.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),f=c&&I3(c,t.type,s);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,s).run()}const h=a.doc.resolve(n.from-1).nodeBefore;h&&h.type===t.type&&Qs(a.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,h))&&a.join(n.from-1)},undoable:t.undoable})}var Yn=class S7 extends u1{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new S7(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Fs(t){return new f7({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const s=We(t.getAttributes,void 0,r,i);if(s===!1||s===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(s1(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(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||a.removeStoredMark(t.type)}}})}var nQ=Object.defineProperty,rQ=(t,e)=>{for(var n in e)nQ(t,n,{get:e[n],enumerable:!0})},iQ="listItem",tk="textStyle",nk=/^\s*([-+*])\s$/,$7=Yn.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",It(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(iQ,this.editor.getAttributes(tk)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=wl({find:nk,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=wl({find:nk,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(tk),editor:this.editor})),[t]}}),sQ=(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 s=-1;for(let b=i.depth;b>0;b-=1)if(i.node(b).type.name===e){s=b;break}if(s<0)return null;const a=i.node(s),u=i.index(s);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:s,nestedList:m,nestedListPos:i.after(),insertPos:i.after(s),items:g}},oQ=(t,e,n,r)=>{const i=sQ(t,n,r);if(!i)return!1;const{selection:s}=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(s.map(h.doc,h.mapping)),e&&e(h),!0},aQ=(t,e,n)=>oQ(t.state,t.view.dispatch,e,n),w7=(t,e)=>pt.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>aQ(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),T7=[[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"]],Qf="abcdefghijklmnopqrstuvwxyz",lQ="[a-zA-Z]{1,2}",A7=String.raw`\d+|[ivxlcdmIVXLCDM]+|${lQ}`;function xm(t){let e=t,n="";for(const[r,i]of T7)for(;e>=r;)n+=i,e-=r;return n}function c1(t){return xm(t).toUpperCase()}function B7(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let i=!1;for(const[s,a]of T7)if(e.startsWith(a,n)){r+=s,n+=a.length,i=!0;break}if(!i)return 0}return r}function uQ(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=B7(t);return e<=0?!1:(t===t.toLowerCase()?xm(e):c1(e))===t}function cQ(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 op(t){if(t<=26)return Qf[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?Qf[n]:Qf[e]+Qf[n]}function Cm(t){if(!(!t||/^\d+$/.test(t))){if(uQ(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 d1(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=Cm(t);if(e==="i"||e==="I")return B7(t);if(e==="a"||e==="A"){const r=cQ(t);return r>0?r:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function dQ(t,e){if(t==="numeric")return String(e);switch(t){case"a":return op(e);case"A":return op(e).toUpperCase();case"i":return xm(e);case"I":return c1(e);default:return String(e)}}function fQ(t){var e;if(t.length===0)return!1;const n=(e=Cm(t[0]))!=null?e:"numeric",r=d1(t[0]);if(r<1)return!1;for(let i=0;i<t.length;i++){const s=dQ(n,r+i);if(t[i]!==s)return!1}return!0}function hQ(t){return{type:Cm(t),start:d1(t)}}function pQ(t){const{type:e,start:n}=hQ(t),r={};return e&&(r.type=e),n!==1&&(r.start=n),r}function mQ(t,e,n=". "){const r=e+1;if(!t||t==="1")return`${r}${n}`;switch(t){case"a":return`${op(r)}${n}`;case"A":return`${op(r).toUpperCase()}${n}`;case"i":return`${xm(r)}${n}`;case"I":return`${c1(r)}${n}`;default:return`${r}${n}`}}function gQ(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 bQ(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}var M7=Yn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",It(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(gQ(t))return{type:"listItem",content:[{type:"paragraph",content:bQ(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)=>l1(t,e,r=>{var i,s,a,u;if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){const c=((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1,f=(u=(a=r.meta)==null?void 0:a.parentAttrs)==null?void 0:u.type,h=c-1+(r.index||0);return mQ(f,h,". ")}return"- "},n),addExtensions(){return[w7(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)}}}),yQ={};rQ(yQ,{findListItemPos:()=>Em,getNextListDepth:()=>f1,handleBackspace:()=>my,handleDelete:()=>gy,hasListBefore:()=>R7,hasListItemAfter:()=>vQ,hasListItemBefore:()=>xQ,listItemHasSubList:()=>CQ,nextListIsDeeper:()=>N7,nextListIsHigher:()=>P7});var Em=(t,e)=>{const{$from:n}=e.selection,r=Nt(t,e.schema);let i=null,s=n.depth,a=n.pos,u=null;for(;s>0&&u===null;)i=n.node(s),i.type===r?u=s:(s-=1,a-=1);return u===null?null:{$pos:e.doc.resolve(a),depth:u}},f1=(t,e)=>{const n=Em(t,e);if(!n)return!1;const[,r]=nW(e,t,n.$pos.pos+4);return r},R7=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),s=t.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},my=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Is(t.state,e)&&R7(t.state,e,n)){const{$anchor:r}=t.state.selection,i=t.state.doc.resolve(r.before()-1),s=[];i.node().descendants((c,f)=>{c.type.name===e&&s.push({node:c,pos:f})});const a=s.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!Is(t.state,e)||!oW(t.state)?!1:t.chain().liftListItem(e).run()},N7=(t,e)=>{const n=f1(t,e),r=Em(t,e);return!r||!n?!1:n>r.depth},P7=(t,e)=>{const n=f1(t,e),r=Em(t,e);return!r||!n?!1:n<r.depth},gy=(t,e)=>{if(!Is(t.state,e)||!sW(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:N7(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():P7(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},vQ=(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)},xQ=(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)},CQ=(t,e,n)=>{if(!n)return!1;const r=Nt(t,e.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},O7=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&&gy(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&&gy(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&&my(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&&my(t,n,r)&&(e=!0)}),e}}}}),by=new RegExp(`^(\\s*)(${A7})([.)])\\s+(.*)$`),EQ=/^\s/,Ju={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function DQ(t){return by.test(t.trimStart())}function kQ(t){const e=t.trimStart();return Ju.bulletItem.test(e)||DQ(e)||Ju.heading.test(e)||Ju.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||Ju.codeFence.test(e)}function SQ(t){return Object.values(Ju).some(e=>e.test(t))}function $Q(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&&kQ(i)){r=!0,n.push(i);return}e.push(i)}),{paragraphLines:e,blockLines:n}}function wQ(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],s=i.match(by);if(!s)break;const[,a,u,c,f]=s,h=a.length,m=parseInt(u,10),g=isNaN(m)?Cm(u):void 0,b=isNaN(m)?d1(u):m,v=[f];let C=n+1;const E=[i];let D=!1;for(;C<t.length;){const T=t[C];if(T.match(by))break;if(T.trim()==="")E.push(T),v.push(""),D=!0,C+=1;else if(T.match(EQ)){const A=T.length-T.trimStart().length,B=h+u.length+1;E.push(T),v.push(T.slice(Math.min(A,B))),C+=1}else{if(D||SQ(T))break;E.push(T),v.push(T),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 TQ=new RegExp(`^(${A7})([.)])\\s+(.+)$`);function AQ(t){const e=t.split(`
128
+ `).filter(s=>s.trim().length>0);if(e.length===0)return null;const n=[];for(const s of e){const a=s.trim().match(TQ);if(!a)return null;n.push({marker:a[1],content:a[3]})}const r=n.map(s=>s.marker);return fQ(r)?{type:"orderedList",attrs:pQ(n[0].marker),content:n.map(s=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:s.content}]}]}))}:null}function L7(t,e,n){const r=[];let i=0;for(;i<t.length;){const s=t[i];if(s.indent===e){const{paragraphLines:a,blockLines:u}=$Q(s.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=L7(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:s.raw,tokens:f}),i=m}else i+=1}return r}function BQ(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 s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var MQ="listItem",rk="textStyle",ik=/^(\d+)\.\s$/;function sk(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 z7=Yn.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=sk(n);if(i)return i}const r=t.querySelector("li");if(r){const i=r.getAttribute("style");if(i){const s=sk(i);if(s)return s}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,type:n,...r}=t,i=It(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?BQ(t.items,e):[],s={};return n!==1&&(s.start=n),r&&(s.type=r),Object.keys(s).length>0?{type:"orderedList",attrs:s,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 s=t.split(`
133
+ `),[a,u]=wQ(s);if(a.length===0)return;const c=L7(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:s.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(MQ,this.editor.getAttributes(rk)).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 s=(r=e.clipboardData)==null?void 0:r.getData("text/plain");if(!s)return!1;const a=AQ(s);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=wl({find:ik,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=wl({find:ik,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(rk)}),joinPredicate:t,editor:this.editor})),[e]}}),RQ=/^\s*(\[([( |x])?\])\s$/,I7=Yn.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",It(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 l1(t,e,i)},addExtensions(){return this.options.nested?[w7(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"),s=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),s.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,s.append(u,a),i.append(s,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=_c(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[wl({find:RQ,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),F7=Yn.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",It(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=s=>{const a=hy(s,{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=s.slice(a.raw.length);return c.trim()?[u,...n.blockTokens(c)]:[u]}return n.blockTokens(s)},i=hy(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,a)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.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($7.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(M7.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(O7.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(z7.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(I7.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(F7.configure(this.options.taskList)),t}});function NQ(t={}){return new ht({view(e){return new PQ(e,t)}})}class PQ{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 s=a=>{this[i](a)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}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,s=i.getBoundingClientRect(),a=s.width/i.offsetWidth,u=s.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,s=typeof i=="function"?i(this.editorView,n,e):i;if(!n||s)return null;let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let u=KM(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 h1(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!OQ(e)||!LQ(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,s=null;for(let a=e.depth;;a--){let u=e.node(a);if(n>0?e.indexAfter(a)<u.childCount:e.index(a)>0){s=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?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!Ce.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=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 h1{constructor(e){this.pos=e}map(e){return new h1(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yt.valid(n)?new yt(n):Me.near(n)}}function K7(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function OQ(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||K7(i.type))return!0;if(i.inlineContent)return!1}}return!0}function LQ(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||K7(i.type))return!0;if(i.inlineContent)return!1}}return!0}function zQ(){return new ht({props:{decorations:_Q,createSelectionBetween(t,e,n){return e.pos==n.pos&&yt.valid(n)?new yt(n):null},handleClick:FQ,handleKeyDown:IQ,handleDOMEvents:{beforeinput:KQ}}})}const IQ=V9({ArrowLeft:Yf("horiz",-1),ArrowRight:Yf("horiz",1),ArrowUp:Yf("vert",-1),ArrowDown:Yf("vert",1)});function Yf(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let a=r.selection,u=e>0?a.$to:a.$from,c=a.empty;if(a instanceof ke){if(!s.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 FQ(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&&Ce.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yt(r))),!0)}function KQ(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 s=t.state.tr.replace(n.pos,n.pos,new he(i,0,0));return s.setSelection(ke.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function _Q(t){if(!(t.selection instanceof yt))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ot.create(t.doc,[bn.widget(t.selection.head,e,{key:"gapcursor"})])}var ap=200,Vt=function(){};Vt.prototype.append=function(e){return e.length?(e=Vt.from(e),!this.length&&e||e.length<ap&&this.leafAppend(e)||this.length<ap&&e.leafPrepend(this)||this.appendInner(e)):this};Vt.prototype.prepend=function(e){return e.length?Vt.from(e).append(this):this};Vt.prototype.appendInner=function(e){return new jQ(this,e)};Vt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Vt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Vt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Vt.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)};Vt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i};Vt.from=function(e){return e instanceof Vt?e:e&&e.length?new _7(e):Vt.empty};var _7=(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,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,u){for(var c=s;c<a;c++)if(i(this.values[c],u+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,u){for(var c=s-1;c>=a;c--)if(i(this.values[c],u+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ap)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ap)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})(Vt);Vt.empty=new _7([]);var jQ=(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,s,a){var u=this.left.length;if(i<u&&this.left.forEachInner(r,i,Math.min(s,u),a)===!1||s>u&&this.right.forEachInner(r,Math.max(i-u,0),Math.min(this.length,s)-u,a+u)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var u=this.left.length;if(i>u&&this.right.forEachInvertedInner(r,i-u,Math.max(s,u)-u,a+u)===!1||s<u&&this.left.forEachInvertedInner(r,Math.min(i,u),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},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})(Vt);const HQ=500;class $r{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,s;n&&(i=this.remapping(r,this.items.length),s=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),s=i.maps.length),s--,h.push(m);return}if(i){h.push(new Fr(m.map));let b=m.step.map(i.slice(s)),v;b&&a.maybeStep(b).doc&&(v=a.mapping.maps[a.mapping.maps.length-1],f.push(new Fr(v,void 0,void 0,f.length+h.length))),s--,v&&i.appendMap(v,s)}else a.maybeStep(m.step);if(m.selection)return u=i?m.selection.map(i.slice(s)):m.selection,c=new $r(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 s=[],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 Fr(e.mapping.maps[h],m,n),b;(b=c&&c.merge(g))&&(g=b,h?s.pop():u=u.slice(0,u.length-1)),s.push(g),n&&(a++,n=void 0),i||(c=g)}let f=a-r.depth;return f>UQ&&(u=VQ(u,f),a-=f),new $r(u.append(s),a)}remapping(e,n){let r=new Lc;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-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 $r(this.items.append(e.map(n=>new Fr(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=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=s.getMirror(--c);if(b==null)return;a=Math.min(a,b);let v=s.maps[b];if(g.step){let C=e.steps[b].invert(e.docs[b]),E=g.selection&&g.selection.map(s.slice(c+1,b));E&&u++,r.push(new Fr(v,C,E))}else r.push(new Fr(v))},i);let f=[];for(let g=n;g<a;g++)f.push(new Fr(s.maps[g]));let h=this.items.slice(0,i).append(f).append(r),m=new $r(h,u);return m.emptyItemCount()>HQ&&(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=[],s=0;return this.items.forEach((a,u)=>{if(u>=e)i.push(a),a.selection&&s++;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&&s++;let m=new Fr(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 $r(Vt.from(i.reverse()),s)}}$r.empty=new $r(Vt.empty,0);function VQ(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Fr{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 Fr(n.getMap().invert(),n,this.selection)}}}class ps{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const UQ=20;function qQ(t,e,n,r){let i=n.getMeta(Qo),s;if(i)return i.historyState;n.getMeta(QQ)&&(t=new ps(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Qo))return a.getMeta(Qo).redo?new ps(t.done.addTransform(n,void 0,r,vh(e)),t.undone,ok(n.mapping.maps),t.prevTime,t.prevComposition):new ps(t.done,t.undone.addTransform(n,void 0,r,vh(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||!GQ(n,t.prevRanges)),f=a?V0(t.prevRanges,n.mapping):ok(n.mapping.maps);return new ps(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,vh(e)),$r.empty,f,n.time,u??t.prevComposition)}else return(s=n.getMeta("rebased"))?new ps(t.done.rebased(n,s),t.undone.rebased(n,s),V0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ps(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),V0(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function GQ(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function ok(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function V0(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function WQ(t,e,n){let r=vh(e),i=Qo.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),u=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),c=new ps(n?u:s.remaining,n?s.remaining:u,null,0,-1);return s.transform.setSelection(a).setMeta(Qo,{redo:n,historyState:c})}let U0=!1,ak=null;function vh(t){let e=t.plugins;if(ak!=e){U0=!1,ak=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){U0=!0;break}}return U0}const Qo=new Ft("history"),QQ=new Ft("closeHistory");function YQ(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ht({key:Qo,state:{init(){return new ps($r.empty,$r.empty,null,0,-1)},apply(e,n,r){return qQ(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?H7:r=="historyRedo"?V7:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function j7(t,e){return(n,r)=>{let i=Qo.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=WQ(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const H7=j7(!1,!0),V7=j7(!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 Ft("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit,s=this.options.autoTrim;if(i==null||i===0||s===!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}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const u=e.selection.$head.pos,c=s-r,f=u-c,h=u;return e.deleteRange(f,h),!(this.storage.characters({node:e.doc})>r)}})]}});var XQ=pt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[NQ(this.options)]}});pt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ht({key:new Ft("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return ot.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";s.push(bn.node(f,f+c.nodeSize,{class:this.options.className}))}),ot.create(t,s)}}})]}});var JQ=pt.create({name:"gapCursor",addProseMirrorPlugins(){return[zQ()]},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}}}),U7="placeholder",lk=new Ft("tiptap__placeholder");function q7(t){const{editor:e,placeholder:n,dataAttribute:r,pos:i,node:s,isEmptyDoc:a,hasAnchor:u,classes:{emptyNode:c,emptyEditor:f}}=t,h=[c];return a&&h.push(f),bn.node(i,i+s.nodeSize,{class:h.join(" "),[r]:typeof n=="function"?n({editor:e,node:s,pos:i,hasAnchor:u}):n})}function G7(t,e){return typeof t=="function"?t(e):t}function W7({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:s,to:a}){const{anchor:u}=i,c=[],f=t.isEmpty;return r.nodesBetween(s,a,(h,m)=>{const g=u>=m&&u<=m+h.nodeSize,b=!h.isLeaf&&id(h);return h.type.isTextblock&&(g||!e.showOnlyCurrent)&&b&&c.push(q7({editor:t,isEmptyDoc:f,dataAttribute:n,hasAnchor:g,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:G7(e.emptyNodeClass,{editor:t,node:h,pos:m,hasAnchor:g})},node:h,pos:m})),e.includeChildren}),c}function Q7({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&&id(m)){const b=a>=g&&a<=g+m.nodeSize;u.push(q7({editor:t,isEmptyDoc:c,dataAttribute:n,hasAnchor:b,placeholder:e.placeholder,classes:{emptyEditor:e.emptyEditorClass,emptyNode:G7(e.emptyNodeClass,{editor:t,node:m,pos:g,hasAnchor:b})},node:m,pos:g}))}}else u.push(...W7({editor:t,options:e,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return ot.create(r,u)}function dc(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),s=r.node(1);return{from:i,to:i+s.nodeSize}}function fc(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function ZQ(t,e,n){const r=[];return t.forEach((i,s)=>{const a=s,u=a+i.nodeSize,c=a+1,f=u+1;c<n&&f>e&&r.push({from:a,to:u})}),r}function eY(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],s=e[r];s.from<=i.to?i.to=Math.max(i.to,s.to):n.push({...s})}return n}function tY(t,e){const n=ZQ(t,e.from,e.to);return n.push(fc(t,dc(t,e.from))),e.to>e.from?n.push(fc(t,dc(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(fc(t,dc(t,Math.min(e.from+1,t.content.size)))),n}function nY(t,e,n){const r=[];if(t.docChanged){const i=i1(t);for(const s of i)r.push(...tY(n.doc,s.newRange))}return t.selectionSet&&(r.push(fc(n.doc,dc(n.doc,t.mapping.map(e.selection.anchor)))),r.push(fc(n.doc,dc(n.doc,n.selection.anchor)))),eY(r)}function rY(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 iY({decorations:t,ranges:e,editor:n,options:r,dataAttribute:i,doc:s,selection:a}){let u=t;for(const c of e){const{from:f,to:h}=rY(c.from,c.to,s),m=u.find(f,h).filter(b=>b.from>=f&&b.to<=h);m.length&&(u=u.remove(m));const g=W7({editor:n,options:r,dataAttribute:i,doc:s,selection:a,from:f,to:h});g.length&&(u=u.add(s,g))}return u}function sY({editor:t,options:e,dataAttribute:n}){return{init(r,i){const s=Q7({editor:t,options:e,dataAttribute:n,doc:i.doc,selection:i.selection});return s??ot.empty},apply(r,i,s,a){if(!r.docChanged&&!r.selectionSet)return i;const u=i.map(r.mapping,r.doc),c=nY(r,s,a);return iY({decorations:u,ranges:c,editor:t,options:e,dataAttribute:n,doc:a.doc,selection:a.selection})}}}function oY(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function aY({editor:t,options:e}){const n=e.dataAttribute?`data-${oY(e.dataAttribute)}`:`data-${U7}`,r=e.showOnlyCurrent&&!e.includeChildren;return new ht({key:lk,...r?{}:{state:sY({editor:t,options:e,dataAttribute:n})},props:{decorations:r?({doc:i,selection:s})=>Q7({editor:t,options:e,dataAttribute:n,doc:i,selection:s}):i=>{var s;return e.showOnlyWhenEditable&&!t.isEditable?ot.empty:(s=lk.getState(i))!=null?s:ot.empty}}})}var lY=pt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:U7,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[aY({editor:this.editor,options:this.options})]}});function yy(t,e){return!t.selection.empty&&!o7(t.selection)&&e.isEditable}function uY(t,e){return yy(t,e)&&!e.isFocused&&!e.view.dragging}function cY(){var t;(t=window.getSelection())==null||t.removeAllRanges()}function dY(t){t.focus()}pt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ht({key:new Ft("selection"),props:{decorations(n){return uY(n,t)?ot.create(n.doc,[bn.inline(n.selection.from,n.selection.to,{class:e.className})]):null},handleDOMEvents:{blur(n){return yy(n.state,t)&&cY(),!1},focus(n){return yy(n.state,t)&&requestAnimationFrame(()=>{!t.isDestroyed&&n.hasFocus()&&dY(n)}),!1}}}})]}});var fY="skipTrailingNode";function uk({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var hY=pt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ft(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,s,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(fY))&&h)return c.insert(m,g.create())},state:{init:(i,s)=>{const a=s.tr.doc.lastChild;return!uk({node:a,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const a=i.doc.lastChild;return!uk({node:a,types:r})}}})]}}),pY=pt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>H7(t,e),redo:()=>({state:t,dispatch:e})=>V7(t,e)}},addProseMirrorPlugins(){return[YQ(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 p1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ca=p1();function Y7(t){ca=t}var So={exec:()=>null};function He(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(yn.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}var mY=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),yn={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)}}>`)},gY=/^(?:[ \t]*(?:\n|$))+/,bY=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yY=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,od=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vY=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,m1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,X7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,J7=He(X7).replace(/bull/g,m1).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(),xY=He(X7).replace(/bull/g,m1).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(),g1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,CY=/^[^\n]+/,b1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,EY=He(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",b1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),DY=He(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,m1).getRegex(),Dm="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",y1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kY=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",y1).replace("tag",Dm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Z7=He(g1).replace("hr",od).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",Dm).getRegex(),SY=He(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Z7).getRegex(),v1={blockquote:SY,code:bY,def:EY,fences:yY,heading:vY,hr:od,html:kY,lheading:J7,list:DY,newline:gY,paragraph:Z7,table:So,text:CY},ck=He("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",od).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",Dm).getRegex(),$Y={...v1,lheading:xY,table:ck,paragraph:He(g1).replace("hr",od).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ck).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",Dm).getRegex()},wY={...v1,html:He(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",y1).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:So,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:He(g1).replace("hr",od).replace("heading",` *#{1,6} *[^
136
+ ]`).replace("lheading",J7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},TY=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,AY=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,e8=/^( {2,}|\\)\n(?!\s*$)/,BY=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pl=/[\p{P}\p{S}]/u,km=/[\s\p{P}\p{S}]/u,x1=/[^\s\p{P}\p{S}]/u,MY=He(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,km).getRegex(),t8=/(?!~)[\p{P}\p{S}]/u,RY=/(?!~)[\s\p{P}\p{S}]/u,NY=/(?:[^\s\p{P}\p{S}]|~)/u,PY=He(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",mY?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),n8=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,OY=He(n8,"u").replace(/punct/g,Pl).getRegex(),LY=He(n8,"u").replace(/punct/g,t8).getRegex(),r8="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zY=He(r8,"gu").replace(/notPunctSpace/g,x1).replace(/punctSpace/g,km).replace(/punct/g,Pl).getRegex(),IY=He(r8,"gu").replace(/notPunctSpace/g,NY).replace(/punctSpace/g,RY).replace(/punct/g,t8).getRegex(),FY=He("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,x1).replace(/punctSpace/g,km).replace(/punct/g,Pl).getRegex(),KY=He(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Pl).getRegex(),_Y="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",jY=He(_Y,"gu").replace(/notPunctSpace/g,x1).replace(/punctSpace/g,km).replace(/punct/g,Pl).getRegex(),HY=He(/\\(punct)/,"gu").replace(/punct/g,Pl).getRegex(),VY=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(),UY=He(y1).replace("(?:-->|$)","-->").getRegex(),qY=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",UY).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,GY=He(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",lp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),i8=He(/^!?\[(label)\]\[(ref)\]/).replace("label",lp).replace("ref",b1).getRegex(),s8=He(/^!?\[(ref)\](?:\[\])?/).replace("ref",b1).getRegex(),WY=He("reflink|nolink(?!\\()","g").replace("reflink",i8).replace("nolink",s8).getRegex(),dk=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,C1={_backpedal:So,anyPunctuation:HY,autolink:VY,blockSkip:PY,br:e8,code:AY,del:So,delLDelim:So,delRDelim:So,emStrongLDelim:OY,emStrongRDelimAst:zY,emStrongRDelimUnd:FY,escape:TY,link:GY,nolink:s8,punctuation:MY,reflink:i8,reflinkSearch:WY,tag:qY,text:BY,url:So},QY={...C1,link:He(/^!?\[(label)\]\((.*?)\)/).replace("label",lp).getRegex(),reflink:He(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lp).getRegex()},vy={...C1,emStrongRDelimAst:IY,emStrongLDelim:LY,delLDelim:KY,delRDelim:jY,url:He(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dk).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",dk).getRegex()},YY={...vy,br:He(e8).replace("{2,}","*").getRegex(),text:He(vy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Xf={normal:v1,gfm:$Y,pedantic:wY},Iu={normal:C1,gfm:vy,breaks:YY,pedantic:QY},XY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fk=t=>XY[t];function Ir(t,e){if(e){if(yn.escapeTest.test(t))return t.replace(yn.escapeReplace,fk)}else if(yn.escapeTestNoEncode.test(t))return t.replace(yn.escapeReplaceNoEncode,fk);return t}function hk(t){try{t=encodeURI(t).replace(yn.percentDecode,"%")}catch{return null}return t}function pk(t,e){let n=t.replace(yn.findPipe,(s,a,u)=>{let c=!1,f=a;for(;--f>=0&&u[f]==="\\";)c=!c;return c?"|":" |"}),r=n.split(yn.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(yn.slashPipe,"|");return r}function Fu(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 JY(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 ZY(t,e=0){let n=e,r="";for(let i of t)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function mk(t,e,n,r,i){let s=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:s,title:a,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,c}function eX(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let i=r[1];return e.split(`
137
+ `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[u]=a;return u.length>=i.length?s.slice(i.length):s}).join(`
138
+ `)}var up=class{options;rules;lexer;constructor(t){this.options=t||ca}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:Fu(n,`
139
+ `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=eX(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=Fu(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:Fu(e[0],`
140
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Fu(e[0],`
141
+ `).split(`
142
+ `),r="",i="",s=[];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,s,!0),this.lexer.state.top=m,n.length===0)break;let g=s.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);s[s.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);s[s.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(s.at(-1).raw.length).split(`
151
+ `);continue}}return{type:"blockquote",raw:r,tokens:s,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 s=this.rules.other.listItemRegex(n),a=!1;for(;t;){let c=!1,f="",h="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let m=ZY(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),T=this.rules.other.headingBeginRegex(v),$=this.rules.other.htmlBeginRegex(v),A=this.rules.other.blockquoteBeginRegex(v);for(;t;){let B=t.split(`
155
+ `,1)[0],P;if(g=B,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),D.test(g)||T.test(g)||$.test(g)||A.test(g)||C.test(g)||E.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=v||!g.trim())h+=`
156
+ `+P.slice(v);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||D.test(m)||T.test(m)||E.test(m))break;h+=`
157
+ `+g}b=!g.trim(),f+=B+`
158
+ `,t=t.substring(B.length+1),m=P.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=pk(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
159
+ `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<n.length;a++)s.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(pk(a,s.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[c]})));return s}}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 s=Fu(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=JY(e[2],"()");if(s===-2)return;if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(r);s&&(r=s[1],i=s[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)),mk(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 s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return mk(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,s,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(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(a=[...s].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,s,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(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s||(a=[...s].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}}}},Dr=class xy{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ca,this.options.tokenizer=this.options.tokenizer||new up,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:yn,block:Xf.normal,inline:Iu.normal};this.options.pedantic?(n.block=Xf.pedantic,n.inline=Iu.pedantic):this.options.gfm&&(n.block=Xf.gfm,this.options.breaks?n.inline=Iu.breaks:n.inline=Iu.gfm),this.tokenizer.rules=n}static get rules(){return{block:Xf,inline:Iu}}static lex(e,n){return new xy(n).lex(e)}static lexInline(e,n){return new xy(n).inlineTokens(e)}lex(e){e=e.replace(yn.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(yn.tabCharGlobal," ").replace(yn.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 s=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&&(s=e.substring(0,a+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){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=s.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 s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-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}},cp=class{options;parser;constructor(t){this.options=t||ca}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(yn.notSpaceStart)?.[0],i=t.replace(yn.endingNewline,"")+`
175
+ `;return r?'<pre><code class="language-'+Ir(r)+'">'+(n?i:Ir(i,!0))+`</code></pre>
176
+ `:"<pre><code>"+(n?i:Ir(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",s=e&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
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 s=t.rows[i];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[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>${Ir(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=hk(t);if(i===null)return r;t=i;let s='<a href="'+t+'"';return e&&(s+=' title="'+Ir(e)+'"'),s+=">"+r+"</a>",s}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=hk(t);if(i===null)return Ir(n);t=i;let s=`<img src="${t}" alt="${Ir(n)}"`;return e&&(s+=` title="${Ir(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ir(t.text)}},E1=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}},kr=class Cy{options;renderer;textRenderer;constructor(e){this.options=e||ca,this.options.renderer=this.options.renderer||new cp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new E1}static parse(e,n){return new Cy(n).parse(e)}static parseInline(e,n){return new Cy(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 s=i;switch(s.type){case"space":{n+=this.renderer.space(s);break}case"hr":{n+=this.renderer.hr(s);break}case"heading":{n+=this.renderer.heading(s);break}case"code":{n+=this.renderer.code(s);break}case"table":{n+=this.renderer.table(s);break}case"blockquote":{n+=this.renderer.blockquote(s);break}case"list":{n+=this.renderer.list(s);break}case"checkbox":{n+=this.renderer.checkbox(s);break}case"html":{n+=this.renderer.html(s);break}case"def":{n+=this.renderer.def(s);break}case"paragraph":{n+=this.renderer.paragraph(s);break}case"text":{n+=this.renderer.text(s);break}default:{let a='Token with "'+s.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 s=e[i];if(this.options.extensions?.renderers?.[s.type]){let u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){r+=u||"";continue}}let a=s;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}},Zu=class{options;block;constructor(t){this.options=t||ca}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?Dr.lex:Dr.lexInline}provideParser(t=this.block){return t?kr.parse:kr.parseInline}},tX=class{defaults=p1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=kr;Renderer=cp;TextRenderer=E1;Lexer=Dr;Tokenizer=up;Hooks=Zu;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 s of i.header)n=n.concat(this.walkTokens(s.tokens,e));for(let s of i.rows)for(let a of s)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(s=>{let a=i[s].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 s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let u=i.renderer.apply(this,a);return u===!1&&(u=s.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 s=e[i.level];s?s.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 cp(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,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 up(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,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 Zu;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,u=n.hooks[a],c=i[a];Zu.passThroughHooks.has(s)?i[a]=f=>{if(this.defaults.async&&Zu.passThroughHooksRespectAsync.has(s))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,s=n.walkTokens;r.walkTokens=function(a){let u=[];return u.push(s.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 Dr.lex(t,e??this.defaults)}parser(t,e){return kr.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return s(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 s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(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?Dr.lex:Dr.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?kr.parse:kr.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(t):t?Dr.lex:Dr.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?kr.parse:kr.parseInline)(a,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(a){return s(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>"+Ir(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},na=new tX;function Xe(t,e){return na.parse(t,e)}Xe.options=Xe.setOptions=function(t){return na.setOptions(t),Xe.defaults=na.defaults,Y7(Xe.defaults),Xe};Xe.getDefaults=p1;Xe.defaults=ca;Xe.use=function(...t){return na.use(...t),Xe.defaults=na.defaults,Y7(Xe.defaults),Xe};Xe.walkTokens=function(t,e){return na.walkTokens(t,e)};Xe.parseInline=na.parseInline;Xe.Parser=kr;Xe.parser=kr.parse;Xe.Renderer=cp;Xe.TextRenderer=E1;Xe.Lexer=Dr;Xe.lexer=Dr.lex;Xe.Tokenizer=up;Xe.Hooks=Zu;Xe.parse=Xe;Xe.options;Xe.setOptions;Xe.use;Xe.walkTokens;Xe.parseInline;kr.parse;Dr.lex;var nX=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function rX(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(nX);return i?[{...e,raw:(e.raw||"").slice(0,-i[0].length)},{type:"space",raw:i[0]}]:[e]})}function iX(t,e){const r=e.split(`
194
+ `).flatMap(i=>[i,""]).map(i=>`${t}${i}`).join(`
195
+ `);return r.slice(0,r.length-1)}function sX(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&&$l(a.attrs,i.attrs))||n.push(r)}),n}function oX(t,e){const n=[];return Array.from(e.entries()).forEach(([r,i])=>{const s=t.get(r);(!s||!$l(s.attrs,i.attrs))&&n.push({type:r,mark:i})}),n}function aX(t,e,n,r){const i=!n,s=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||s||a)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([c,f])=>{n.marks.find(m=>m.type===c&&$l(m.attrs,f.attrs))||u.push(c)}):(i||s)&&u.push(...Array.from(t.keys()).reverse())),u}function lX(t,e){let n="";return Array.from(t.keys()).reverse().forEach(r=>{const i=t.get(r),s=e(r,i);s&&(n=s+n)}),t.clear(),n}function uX(t,e,n){let r="";return Array.from(t.entries()).forEach(([i,s])=>{const a=n(i,s);a&&(r+=a),e.set(i,s)}),r}function q0(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 Jf(t,e){return typeof t!="string"?"json":e}var cX=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"]),dX=/<\/?([a-zA-Z][\w-]*)/g;function fX(t){const e=[];let n;for(;(n=dX.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function hX(t){const e=t.toLowerCase();return e.includes("-")?!1:!cX.has(e)}function pX(t,e){return fX(t).some(r=>hX(r)?!e.has(r):!1)}var mX=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,s;this.markedInstance=(e=t?.marked)!=null?e:Xe,this.indentStyle=(r=(n=t?.indentation)==null?void 0:n.style)!=null?r:"space",this.indentSize=(s=(i=t?.indentation)==null?void 0:i.size)!=null?s: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,hl(ym(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 s=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:s,nodeName:i,parseMarkdown:a,renderMarkdown:u,isIndenting:h,htmlReopen:m,tokenizer:c};if(s&&a){const b=this.registry.get(s)||[];b.push(g),this.registry.set(s,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,s=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?s(this.lexer):s(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(/&nbsp;/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?rX(t):t,r=n.reduce((a,u,c)=>(u.type!=="space"&&a.push(c),a),[]);let i=-1,s=0;return n.flatMap((a,u)=>{for(var c;s<r.length&&r[s]<u;)i=r[s],s+=1;if(e&&a.type==="space"){const h=(c=r[s])!=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 s=Math.max(r-(e===-1||n===-1?0:1),0);return Array.from({length:s},()=>({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(s=>{if(!s.parseMarkdown)return!1;const a=s.parseMarkdown(t,r),u=this.normalizeParseResult(a);return u&&(!Array.isArray(u)||u.length>0)?(this.lastParseResult=u,!0):!1})&&this.lastParseResult){const s=this.lastParseResult;return this.lastParseResult=null,s}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(u=>q0(u).isTask),n=t.items.some(u=>!q0(u).isTask);if(!e||!n||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const r=[];let i=[],s=null;for(let u=0;u<t.items.length;u+=1){const c=t.items[u],{isTask:f,checked:h,indentLevel:m}=q0(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 T=[];if(C.length>1&&C.slice(1).join(`
198
+ `).trim()){const A=C.slice(1),B=A.filter(P=>P.trim());if(B.length>0){const P=Math.min(...B.map(I=>I.length-I.trimStart().length)),M=A.map(I=>I.trim()?I.slice(P):"").join(`
199
+ `).trim();M&&(T=this.markedInstance.lexer(`${M}
200
+ `))}}g={type:"taskItem",raw:"",mainContent:D,indentLevel:m,checked:h??!1,text:D,tokens:this.tokenizeInline(D),nestedTokens:T}}const b=f?"taskList":"list";s!==b?(i.length>0&&r.push({type:s,items:i}),i=[g],s=b):i.push(g)}i.length>0&&r.push({type:s,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 s=i.parseMarkdown(t,n),a=this.normalizeParseResult(s);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 s=[];for(let a=0;a<t.length;a+=1){const u=t[a];if(u.type==="text")s.push({type:"text",text:ZD(u.text||"")});else if(u.type==="escape")s.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 T=t[D],$=((i=(r=T.raw)!=null?r:T.text)!=null?i:"").toString();if(E.push($),T.type==="html"&&v.test($)){C=D;break}}if(C!==-1){const D=E.join(""),T={type:"html",raw:D,text:D,block:!1},$=this.parseHTMLToken(T);if($){const A=this.normalizeParseResult($);Array.isArray(A)?s.push(...A):A&&s.push(A)}a=C;continue}}const m=this.parseHTMLToken(u);if(m){const g=this.normalizeParseResult(m);Array.isArray(g)?s.push(...g):g&&s.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);s.push(...m)}else{const m=this.normalizeParseResult(h);Array.isArray(m)?s.push(...m):m&&s.push(m)}}else u.tokens&&s.push(...this.parseInlineTokens(u.tokens))}}for(let a=s.length-1;a>0;a-=1){const u=s[a],c=s[a-1];if(u.type==="text"&&c.type==="text"){const f=u.marks||[],h=c.marks||[];HW(f,h)&&(c.text=(c.text||"")+(u.text||""),s.splice(a,1))}}return s}applyMarkToContent(t,e,n){return e.map(r=>{if(r.type==="text"){const i=r.marks||[],s=n?{type:t,attrs:n}:{type:t};return{...r,marks:[...i,s]}}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:ZD(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=XG(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 pX(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=n7(this.baseExtensions),n=r=>{const i=r?.parseDOM;Array.isArray(i)&&i.forEach(s=>{if(typeof s?.tag=="string"){const a=s.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(PW(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,r=0,i={}){var s;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:iX},f={index:n,level:r,parentType:e?.type,previousNode:u,meta:{parentAttrs:e?.attrs,...i}};return((s=a.renderMarkdown)==null?void 0:s.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=[],s=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(B=>[B.type,B])),b=this.getMarksToOpenForSerialization(s,g,h),v=sX(g,h),C=v.filter(B=>s.has(B)),E=C.length>0&&b.length>0;let D="";if(v.length>0&&!E){const B=m.match(/(\s+)$/);B&&(D=B[1],m=m.slice(0,-D.length))}E||v.slice().reverse().forEach(B=>{if(!s.has(B))return;const P=g.get(B),R=this.getMarkClosing(B,P,u.get(B));R&&(m+=R),s.has(B)&&(s.delete(B),u.delete(B))});let T="";if(b.length>0){const B=m.match(/^(\s+)/);B&&(T=B[1],m=m.slice(T.length))}b.forEach(({type:B,mark:P})=>{const R=a.has(B)?"html":"markdown",M=this.getMarkOpening(B,P,R);M&&(m=M+m),u.set(B,R),a.delete(B)}),E||b.slice().reverse().forEach(({type:B,mark:P})=>{s.set(B,P)}),m=T+m;let $;if(E){const B=new Set((h?.marks||[]).map(M=>M.type));b.forEach(({type:M})=>{B.has(M)&&this.getHtmlReopenTags(M)&&a.add(M)});const P=Array.from(s.keys()),R=C.slice().sort((M,I)=>P.indexOf(I)-P.indexOf(M));$=[...b.map(M=>M.type),...R]}else $=aX(s,g,h,this.markSetsEqual.bind(this));let A="";if($.length>0){const B=m.match(/(\s+)$/);B&&(A=B[1],m=m.slice(0,-A.length))}$.forEach(B=>{var P;const R=(P=s.get(B))!=null?P:g.get(B),M=this.getMarkClosing(B,R,u.get(B));M&&(m+=M),s.delete(B),u.delete(B)}),m+=A,m+=D,i.push(m)}else{const m=new Set((c.marks||[]).map(D=>D.type)),g=new Map,b=new Map;s.forEach((D,T)=>{var $;m.has(T)&&(g.set(T,D),b.set(T,($=u.get(T))!=null?$:"markdown"))});const v=lX(s,(D,T)=>this.getMarkClosing(D,T,u.get(D)));u.clear();const C=this.renderNodeToMarkdown(c,e,f,r),E=c.type==="hardBreak"?"":uX(g,s,(D,T)=>{var $;const A=($=b.get(D))!=null?$:"markdown";return u.set(D,A),this.getMarkOpening(D,T,A)});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),s=i.length>0?i[0]:void 0;if(!s||!s.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=s.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),s=i.length>0?i[0]:void 0;if(!s||!s.renderMarkdown)return"";const a="__TIPTAP_MARKDOWN_PLACEHOLDER__",u={type:t,attrs:e.attrs||{},content:[{type:"text",text:a}]};try{const c=s.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&&$l(r.attrs,i.attrs)})}getMarksToOpenForSerialization(t,e,n){const r=oX(t,e);if(r.length<=1)return r;const i=n?.marks||[],s=(f,h)=>i.some(m=>m.type===f&&$l(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=>!s(f.type,f.mark.attrs)).sort(a),c=r.filter(f=>s(f.type,f.mark.attrs)).sort(a);return[...u,...c]}},gk=mX,gX=pt.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType||Jf(t,e?.contentType)!=="markdown"||!this.editor.markdown)return Cr.setContent(t,e);const r=this.editor.markdown.parse(t);return Cr.setContent(r,e)},insertContent:(t,e)=>{if(!e?.contentType||Jf(t,e?.contentType)!=="markdown"||!this.editor.markdown)return Cr.insertContent(t,e);const r=this.editor.markdown.parse(t);return Cr.insertContent(r,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType||Jf(e,n?.contentType)!=="markdown"||!this.editor.markdown)return Cr.insertContentAt(t,e,n);const i=this.editor.markdown.parse(e);return Cr.insertContentAt(t,i,n)}}},addStorage(){return{manager:new gk({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 gk({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||Jf(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:bX,getOwnPropertySymbols:yX}=Object,{hasOwnProperty:vX}=Object.prototype;function G0(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Zf(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,a=s.get(n),u=s.get(r);if(a&&u)return a===r&&u===n;s.set(n,r),s.set(r,n);const c=t(n,r,i);return s.delete(n),s.delete(r),c}}function xX(t){return t?.[Symbol.toStringTag]}function bk(t){return bX(t).concat(yX(t))}const CX=Object.hasOwn||((t,e)=>vX.call(t,e));function da(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const EX="__v",DX="__o",kX="_owner",{getOwnPropertyDescriptor:yk,keys:vk}=Object;function SX(t,e){return t.byteLength===e.byteLength&&dp(new Uint8Array(t),new Uint8Array(e))}function $X(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 wX(t,e){return t.byteLength===e.byteLength&&dp(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function TX(t,e){return da(t.getTime(),e.getTime())}function AX(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function BX(t,e){return t===e}function xk(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let a,u,c=0;for(;(a=s.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 MX=da;function RX(t,e,n){const r=vk(t);let i=r.length;if(vk(e).length!==i)return!1;for(;i-- >0;)if(!o8(t,e,n,r[i]))return!1;return!0}function Ku(t,e,n){const r=bk(t);let i=r.length;if(bk(e).length!==i)return!1;let s,a,u;for(;i-- >0;)if(s=r[i],!o8(t,e,n,s)||(a=yk(t,s),u=yk(e,s),(a||u)&&(!a||!u||a.configurable!==u.configurable||a.enumerable!==u.enumerable||a.writable!==u.writable)))return!1;return!0}function NX(t,e){return da(t.valueOf(),e.valueOf())}function PX(t,e){return t.source===e.source&&t.flags===e.flags}function Ck(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let a,u;for(;(a=s.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 dp(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 OX(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 o8(t,e,n,r){return(r===kX||r===DX||r===EX)&&(t.$$typeof||e.$$typeof)?!0:CX(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const LX="[object ArrayBuffer]",zX="[object Arguments]",IX="[object Boolean]",FX="[object DataView]",KX="[object Date]",_X="[object Error]",jX="[object Map]",HX="[object Number]",VX="[object Object]",UX="[object RegExp]",qX="[object Set]",GX="[object String]",WX={"[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},QX="[object URL]",YX=Object.prototype.toString;function XX({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:a,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:m,areTypedArraysEqual:g,areUrlsEqual:b,unknownTagComparators:v}){return function(E,D,T){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,T):$==="function"?s(E,D,T):!1;const A=E.constructor;if(A!==D.constructor)return!1;if(A===Object)return c(E,D,T);if(Array.isArray(E))return e(E,D,T);if(A===Date)return r(E,D,T);if(A===RegExp)return h(E,D,T);if(A===Map)return a(E,D,T);if(A===Set)return m(E,D,T);const B=YX.call(E);if(B===KX)return r(E,D,T);if(B===UX)return h(E,D,T);if(B===jX)return a(E,D,T);if(B===qX)return m(E,D,T);if(B===VX)return typeof E.then!="function"&&typeof D.then!="function"&&c(E,D,T);if(B===QX)return b(E,D,T);if(B===_X)return i(E,D,T);if(B===zX)return c(E,D,T);if(WX[B])return g(E,D,T);if(B===LX)return t(E,D,T);if(B===FX)return n(E,D,T);if(B===IX||B===HX||B===GX)return f(E,D,T);if(v){let P=v[B];if(!P){const R=xX(E);R&&(P=v[R])}if(P)return P(E,D,T)}return!1}}function JX({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:SX,areArraysEqual:n?Ku:$X,areDataViewsEqual:wX,areDatesEqual:TX,areErrorsEqual:AX,areFunctionsEqual:BX,areMapsEqual:n?G0(xk,Ku):xk,areNumbersEqual:MX,areObjectsEqual:n?Ku:RX,arePrimitiveWrappersEqual:NX,areRegExpsEqual:PX,areSetsEqual:n?G0(Ck,Ku):Ck,areTypedArraysEqual:n?G0(dp,Ku):dp,areUrlsEqual:OX,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=Zf(r.areArraysEqual),s=Zf(r.areMapsEqual),a=Zf(r.areObjectsEqual),u=Zf(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:u})}return r}function ZX(t){return function(e,n,r,i,s,a,u){return t(e,n,u)}}function eJ({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 s={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,c){return e(u,c,s)}}const tJ=Xs();Xs({strict:!0});Xs({circular:!0});Xs({circular:!0,strict:!0});Xs({createInternalComparator:()=>da});Xs({strict:!0,createInternalComparator:()=>da});Xs({circular:!0,createInternalComparator:()=>da});Xs({circular:!0,createInternalComparator:()=>da,strict:!0});function Xs(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=JX(t),a=XX(s),u=n?n(a):ZX(a);return eJ({circular:e,comparator:a,createState:r,equals:u,strict:i})}var nJ=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},rJ=({contentComponent:t})=>{const e=n3.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return w.jsx(w.Fragment,{children:Object.values(e)})};function iJ(){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,s){e={...e,[i]:bS.createPortal(s.reactElement,s.element,i)},r()},removeRenderer(i){const s={...e};delete s[i],e=s,r()}}}var sJ=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=iJ(),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 w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:nJ(e,this.editorContentRef),...n}),t?.contentComponent&&w.jsx(rJ,{contentComponent:t.contentComponent})]})}},oJ=k.forwardRef((t,e)=>{const n=H.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return H.createElement(sJ,{key:n,innerRef:e,...t})}),a8=H.memo(oJ),aJ=typeof window<"u"?k.useLayoutEffect:k.useEffect,lJ=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(s=>s()))},r=this.editor;return r.on("transaction",n),r.on("update",n),()=>{r.off("transaction",n),r.off("update",n)}}}};function uJ(t){var e;const[n]=k.useState(()=>new lJ(t.editor)),r=gS.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:tJ);return aJ(()=>n.watch(t.editor),[t.editor,n]),k.useDebugValue(r),r}var cJ=!1,l8=typeof window>"u",dJ=l8||!!(typeof window<"u"&&window.next),fJ=class u8{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 l8?(n&&cJ&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):dJ&&e===void 0&&(n=!1),n?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)==null?void 0:s.call(i,...r)},onBlur:(...r)=>{var i,s;return(s=(i=this.options.current).onBlur)==null?void 0:s.call(i,...r)},onCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onCreate)==null?void 0:s.call(i,...r)},onDestroy:(...r)=>{var i,s;return(s=(i=this.options.current).onDestroy)==null?void 0:s.call(i,...r)},onFocus:(...r)=>{var i,s;return(s=(i=this.options.current).onFocus)==null?void 0:s.call(i,...r)},onSelectionUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)==null?void 0:s.call(i,...r)},onTransaction:(...r)=>{var i,s;return(s=(i=this.options.current).onTransaction)==null?void 0:s.call(i,...r)},onUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onUpdate)==null?void 0:s.call(i,...r)},onContentError:(...r)=>{var i,s;return(s=(i=this.options.current).onContentError)==null?void 0:s.call(i,...r)},onDrop:(...r)=>{var i,s;return(s=(i=this.options.current).onDrop)==null?void 0:s.call(i,...r)},onPaste:(...r)=>{var i,s;return(s=(i=this.options.current).onPaste)==null?void 0:s.call(i,...r)},onDelete:(...r)=>{var i,s;return(s=(i=this.options.current).onDelete)==null?void 0:s.call(i,...r)},onMount:(...r)=>{var i,s;return(s=(i=this.options.current).onMount)==null?void 0:s.call(i,...r)},onUnmount:(...r)=>{var i,s;return(s=(i=this.options.current).onUnmount)==null?void 0:s.call(i,...r)}};return new eQ(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,s)=>{var a;return i===((a=n.extensions)==null?void 0:a[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?u8.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 hJ(t={},e=[]){const n=k.useRef(t);n.current=t;const[r]=k.useState(()=>new fJ(n)),i=n3.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return k.useDebugValue(i),k.useEffect(r.onRender(e)),uJ({editor:i,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),i}var c8=k.createContext({editor:null});c8.Consumer;var pJ=k.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),mJ=()=>k.useContext(pJ);H.forwardRef((t,e)=>{const{onDragStart:n}=mJ(),r=t.as||"div";return w.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});H.createContext({markViewContentRef:()=>{}});var D1=k.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});D1.displayName="TiptapContext";var gJ=()=>k.useContext(D1);function d8({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 w.jsx(c8.Provider,{value:i,children:w.jsx(D1.Provider,{value:r,children:t})})}d8.displayName="Tiptap";function f8({...t}){const{editor:e}=gJ();return w.jsx(a8,{editor:e,...t})}f8.displayName="Tiptap.Content";Object.assign(d8,{Content:f8});var fp=(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]},bJ=(t,e)=>{var n;const{state:r,view:i}=t,{selection:s}=r;if(!s.empty)return!1;const{$from:a}=s;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},yJ=/^\s*>\s$/,vJ=Yn.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return fp("blockquote",{...It(this.options.HTMLAttributes,t),children:fp("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,s)=>{var a,u;const h=((u=(a=e.renderChild)==null?void 0:a.call(e,i,s))!=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:()=>bJ(this.editor,this.type)}},addInputRules(){return[wl({find:yJ,type:this.type})]}}),xJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,CJ=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,EJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,DJ=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,kJ=ua.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 fp("strong",{...It(this.options.HTMLAttributes,t),children:fp("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[ta({find:xJ,type:this.type}),ta({find:EJ,type:this.type})]},addPasteRules(){return[Fs({find:CJ,type:this.type}),Fs({find:DJ,type:this.type})]}}),SJ=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return!e||e.index>0&&t[e.index-1]==="`"?null:{index:e.index,text:e[0],replaceWith:e[1]}},$J=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},wJ=ua.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",It(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[ta({find:SJ,type:this.type})]},addPasteRules(){return[Fs({find:$J,type:this.type})]}}),W0=4,TJ=/^```([a-z]+)?[\s\n]$/,AJ=/^~~~([a-z]+)?[\s\n]$/,BJ=Yn.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:W0,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 s=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",It(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:W0,{state:r}=t,{selection:i}=r,{$from:s,empty:a}=i;if(s.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:W0,{state:r}=t,{selection:i}=r,{$from:s,empty:a}=i;return s.parent.type!==this.type?!1:a?t.commands.command(({tr:u})=>{var c;const{pos:f}=s,h=s.start(),m=s.end(),b=r.doc.textBetween(h,m,`
212
+ `,`
213
+ `).split(`
214
+ `);let v=0,C=0;const E=f-h;for(let P=0;P<b.length;P+=1){if(C+b[P].length>=E){v=P;break}C+=b[P].length+1}const T=((c=b[v].match(/^ */))==null?void 0:c[0])||"",$=Math.min(T.length,n);if($===0)return!0;let A=h;for(let P=0;P<v;P+=1)A+=b[P].length+1;return u.delete(A,A+$),f-A<=$&&u.setSelection(ke.create(u.doc,A)),!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 s=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
219
+
220
+ `);return!s||!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 s=r.before();return s>0?!1:t.commands.insertDefaultBlock({pos:s})},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||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[py({find:TJ,type:this.type,getAttributes:t=>({language:t[1]})}),py({find:AJ,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ht({key:new Ft("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,s=i?.mode;if(!n||!s)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:s},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}}})]}}),MJ=Yn.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
222
+
223
+ `):""}),RJ=Yn.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",It(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:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:u}=r.extensionManager,c=s||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()}}}),NJ=Yn.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]}`,It(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=>py({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),PJ=Yn.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",It(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!RW(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return o7(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,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(Ce.create(a.doc,c.pos)):a.setSelection(ke.create(a.doc,c.pos));else{const h=s.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[tQ({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),OJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,LJ=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,zJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,IJ=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,FJ=ua.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",It(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[ta({find:OJ,type:this.type}),ta({find:zJ,type:this.type})]},addPasteRules(){return[Fs({find:LJ,type:this.type}),Fs({find:IJ,type:this.type})]}});const KJ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",_J="ελ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",Ey="numeric",Dy="ascii",ky="alpha",hc="asciinumeric",ec="alphanumeric",Sy="domain",h8="emoji",jJ="scheme",HJ="slashscheme",Q0="whitespace";function VJ(t,e){return t in e||(e[t]=[]),e[t]}function zo(t,e,n){e[Ey]&&(e[hc]=!0,e[ec]=!0),e[Dy]&&(e[hc]=!0,e[ky]=!0),e[hc]&&(e[ec]=!0),e[ky]&&(e[ec]=!0),e[ec]&&(e[Sy]=!0),e[h8]&&(e[Sy]=!0);for(const r in e){const i=VJ(r,n);i.indexOf(t)<0&&i.push(t)}}function UJ(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],s=e.jr[r][1];if(s&&i.test(t))return s}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&&zo(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let a=0;a<s-1;a++)i=i.tt(t[a]);return i.tt(t[s-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 s=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,s){if(r)if(a.t&&typeof a.t=="string"){const c=Object.assign(UJ(a.t,r),n);zo(s,c,r)}else n&&zo(s,n,r);a.t=s}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),Ek=(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",$y="UWORD",p8="ASCIINUMERICAL",m8="ALPHANUMERICAL",jc="LOCALHOST",wy="TLD",Ty="UTLD",xh="SCHEME",ol="SLASH_SCHEME",k1="NUM",Ay="WS",S1="NL",pc="OPENBRACE",mc="CLOSEBRACE",hp="OPENBRACKET",pp="CLOSEBRACKET",mp="OPENPAREN",gp="CLOSEPAREN",bp="OPENANGLEBRACKET",yp="CLOSEANGLEBRACKET",vp="FULLWIDTHLEFTPAREN",xp="FULLWIDTHRIGHTPAREN",Cp="LEFTCORNERBRACKET",Ep="RIGHTCORNERBRACKET",Dp="LEFTWHITECORNERBRACKET",kp="RIGHTWHITECORNERBRACKET",Sp="FULLWIDTHLESSTHAN",$p="FULLWIDTHGREATERTHAN",wp="AMPERSAND",Tp="APOSTROPHE",Ap="ASTERISK",ms="AT",Bp="BACKSLASH",Mp="BACKTICK",Rp="CARET",Io="COLON",$1="COMMA",Np="DOLLAR",Kr="DOT",Pp="EQUALS",w1="EXCLAMATION",lr="HYPHEN",gc="PERCENT",Op="PIPE",Lp="PLUS",zp="POUND",bc="QUERY",T1="QUOTE",g8="FULLWIDTHMIDDLEDOT",A1="SEMI",_r="SLASH",yc="TILDE",Ip="UNDERSCORE",b8="EMOJI",Fp="SYM";var y8=Object.freeze({__proto__:null,ALPHANUMERICAL:m8,AMPERSAND:wp,APOSTROPHE:Tp,ASCIINUMERICAL:p8,ASTERISK:Ap,AT:ms,BACKSLASH:Bp,BACKTICK:Mp,CARET:Rp,CLOSEANGLEBRACKET:yp,CLOSEBRACE:mc,CLOSEBRACKET:pp,CLOSEPAREN:gp,COLON:Io,COMMA:$1,DOLLAR:Np,DOT:Kr,EMOJI:b8,EQUALS:Pp,EXCLAMATION:w1,FULLWIDTHGREATERTHAN:$p,FULLWIDTHLEFTPAREN:vp,FULLWIDTHLESSTHAN:Sp,FULLWIDTHMIDDLEDOT:g8,FULLWIDTHRIGHTPAREN:xp,HYPHEN:lr,LEFTCORNERBRACKET:Cp,LEFTWHITECORNERBRACKET:Dp,LOCALHOST:jc,NL:S1,NUM:k1,OPENANGLEBRACKET:bp,OPENBRACE:pc,OPENBRACKET:hp,OPENPAREN:mp,PERCENT:gc,PIPE:Op,PLUS:Lp,POUND:zp,QUERY:bc,QUOTE:T1,RIGHTCORNERBRACKET:Ep,RIGHTWHITECORNERBRACKET:kp,SCHEME:xh,SEMI:A1,SLASH:_r,SLASH_SCHEME:ol,SYM:Fp,TILDE:yc,TLD:wy,UNDERSCORE:Ip,UTLD:Ty,UWORD:$y,WORD:yi,WS:Ay});const mi=/[a-z]/,_u=new RegExp("\\p{L}","u"),Y0=new RegExp("\\p{Emoji}","u"),gi=/\d/,X0=/\s/,Dk="\r",J0=`
226
+ `,qJ="️",GJ="‍",Z0="";let eh=null,th=null;function WJ(t=[]){const e={};Pn.groups=e;const n=new Pn;eh==null&&(eh=kk(KJ)),th==null&&(th=kk(_J)),ce(n,"'",Tp),ce(n,"{",pc),ce(n,"}",mc),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,"『",Dp),ce(n,"』",kp),ce(n,"<",Sp),ce(n,">",$p),ce(n,"&",wp),ce(n,"*",Ap),ce(n,"@",ms),ce(n,"`",Mp),ce(n,"^",Rp),ce(n,":",Io),ce(n,",",$1),ce(n,"$",Np),ce(n,".",Kr),ce(n,"=",Pp),ce(n,"!",w1),ce(n,"-",lr),ce(n,"%",gc),ce(n,"|",Op),ce(n,"+",Lp),ce(n,"#",zp),ce(n,"?",bc),ce(n,'"',T1),ce(n,"/",_r),ce(n,";",A1),ce(n,"~",yc),ce(n,"_",Ip),ce(n,"\\",Bp),ce(n,"・",g8);const r=bt(n,gi,k1,{[Ey]:!0});bt(r,gi,r);const i=bt(r,mi,p8,{[hc]:!0}),s=bt(r,_u,m8,{[ec]:!0}),a=bt(n,mi,yi,{[Dy]:!0});bt(a,gi,i),bt(a,mi,a),bt(i,gi,i),bt(i,mi,i);const u=bt(n,_u,$y,{[ky]:!0});bt(u,mi),bt(u,gi,s),bt(u,_u,u),bt(s,gi,s),bt(s,mi),bt(s,_u,s);const c=ce(n,J0,S1,{[Q0]:!0}),f=ce(n,Dk,Ay,{[Q0]:!0}),h=bt(n,X0,Ay,{[Q0]:!0});ce(n,Z0,h),ce(f,J0,c),ce(f,Z0,h),bt(f,X0,h),ce(h,Dk),ce(h,J0),bt(h,X0,h),ce(h,Z0,h);const m=bt(n,Y0,b8,{[h8]:!0});ce(m,"#"),bt(m,Y0,m),ce(m,qJ,m);const g=ce(m,GJ);ce(g,"#"),bt(g,Y0,m);const b=[[mi,a],[gi,i]],v=[[mi,null],[_u,u],[gi,s]];for(let C=0;C<eh.length;C++)us(n,eh[C],wy,yi,b);for(let C=0;C<th.length;C++)us(n,th[C],Ty,$y,v);zo(wy,{tld:!0,ascii:!0},e),zo(Ty,{utld:!0,alpha:!0},e),us(n,"file",xh,yi,b),us(n,"mailto",xh,yi,b),us(n,"http",ol,yi,b),us(n,"https",ol,yi,b),us(n,"ftp",ol,yi,b),us(n,"ftps",ol,yi,b),zo(xh,{scheme:!0,ascii:!0},e),zo(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],T=t[C][1]?{[jJ]:!0}:{[HJ]:!0};E.indexOf("-")>=0?T[Sy]=!0:mi.test(E)?gi.test(E)?T[hc]=!0:T[Dy]=!0:T[Ey]=!0,Ek(n,E,E,T)}return Ek(n,"localhost",jc,{ascii:!0}),n.jd=new Pn(Fp),{start:n,tokens:Object.assign({groups:e},y8)}}function v8(t,e){const n=QJ(e.replace(/[A-Z]/g,u=>u.toLowerCase())),r=n.length,i=[];let s=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,s+=n[a].length,a++;s-=m,a-=g,f-=m,i.push({t:h.t,v:e.slice(s-f,s),s:s-f,e:s})}return i}function QJ(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,a=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function us(t,e,n,r,i){let s;const a=e.length;for(let u=0;u<a-1;u++){const c=e[u];t.j[c]?s=t.j[c]:(s=new Pn(r),s.jr=i.slice(),t.j[c]=s),t=s}return s=new Pn(n),s.jr=i.slice(),t.j[e[a-1]]=s,s}function kk(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+s),10);a>0;a--)n.pop();r+=s}else n.push(t[r]),r++}return e}const Hc={defaultProtocol:"http",events:null,format:Sk,formatHref:Sk,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function B1(t,e=null){let n=Object.assign({},Hc);t&&(n=Object.assign(n,t instanceof B1?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}B1.prototype={o:Hc,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]:Hc[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 Sk(t){return t}function x8(t,e){this.t="token",this.v=t,this.tk=e}x8.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=Hc.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),s=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:s,eventListeners:m}}};function Sm(t,e){class n extends x8{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const YJ=Sm("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),$k=Sm("text"),XJ=Sm("nl"),nh=Sm("url",{isLink:!0,toHref(t=Hc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==jc&&t[1].t===Io}}),ar=t=>new Pn(t);function JJ({groups:t}){const e=t.domain.concat([wp,Ap,ms,Bp,Mp,Rp,Np,Pp,lr,k1,gc,Op,Lp,zp,_r,Fp,yc,Ip]),n=[Tp,Io,$1,Kr,w1,gc,bc,T1,A1,bp,yp,pc,mc,pp,hp,mp,gp,vp,xp,Cp,Ep,Dp,kp,Sp,$p],r=[wp,Tp,Ap,Bp,Mp,Rp,Np,Pp,lr,pc,mc,gc,Op,Lp,zp,bc,_r,Fp,yc,Ip],i=ar(),s=ce(i,yc);Re(s,r,s),Re(s,t.domain,s);const a=ar(),u=ar(),c=ar();Re(i,t.domain,a),Re(i,t.scheme,u),Re(i,t.slashscheme,c),Re(a,r,s),Re(a,t.domain,a);const f=ce(a,ms);ce(s,ms,f),ce(u,ms,f),ce(c,ms,f);const h=ce(s,Kr);Re(h,r,s),Re(h,t.domain,s);const m=ar();Re(f,t.domain,m),Re(m,t.domain,m);const g=ce(m,Kr);Re(g,t.domain,m);const b=ar(YJ);Re(g,t.tld,b),Re(g,t.utld,b),ce(f,jc,b);const v=ce(m,lr);ce(v,lr,v),Re(v,t.domain,m),Re(b,t.domain,m),ce(b,Kr,g),ce(b,lr,v);const C=ce(a,lr),E=ce(a,Kr);ce(C,lr,C),Re(C,t.domain,a),Re(E,r,s),Re(E,t.domain,a);const D=ar(nh);Re(E,t.tld,D),Re(E,t.utld,D),Re(D,t.domain,a),Re(D,r,s),ce(D,Kr,E),ce(D,lr,C),ce(D,ms,f);const T=ce(D,Io),$=ar(nh);Re(T,t.numeric,$);const A=ar(nh),B=ar();Re(A,e,A),Re(A,n,B),Re(B,e,A),Re(B,n,B),ce(D,_r,A),ce($,_r,A);const P=ce(u,Io),R=ce(c,Io),M=ce(R,_r),I=ce(M,_r);Re(u,t.domain,a),ce(u,Kr,E),ce(u,lr,C),Re(c,t.domain,a),ce(c,Kr,E),ce(c,lr,C),Re(P,t.domain,A),ce(P,_r,A),ce(P,bc,A),Re(I,t.domain,A),Re(I,e,A),ce(I,_r,A);const G=[[pc,mc],[hp,pp],[mp,gp],[bp,yp],[vp,xp],[Cp,Ep],[Dp,kp],[Sp,$p]];for(let J=0;J<G.length;J++){const[U,ie]=G[J],F=ce(A,U);ce(B,U,F);const te=ar(nh);Re(F,e,te);const O=ar();Re(F,n,O),ce(F,ie,A),Re(te,e,te),Re(te,n,O),Re(O,e,te),Re(O,n,O),ce(te,ie,A),ce(O,ie,A)}return ce(i,jc,D),ce(i,S1,XJ),{start:i,tokens:y8}}function ZJ(t,e,n){let r=n.length,i=0,s=[],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&&(s.push(eb($k,e,a)),a=[]),i-=g,h-=g;const b=m.t,v=n.slice(i-h,i);s.push(eb(b,e,v))}}return a.length>0&&s.push(eb($k,e,a)),s}function eb(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const eZ=typeof console<"u"&&console&&console.warn||(()=>{}),tZ="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 nZ(){return Pn.groups={},ct.scanner=null,ct.parser=null,ct.tokenQueue=[],ct.pluginQueue=[],ct.customSchemes=[],ct.initialized=!1,ct}function wk(t,e=!1){if(ct.initialized&&eZ(`linkifyjs: already initialized - will not register custom scheme "${t}" ${tZ}`),!/^[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 rZ(){ct.scanner=WJ(ct.customSchemes);for(let t=0;t<ct.tokenQueue.length;t++)ct.tokenQueue[t][1]({scanner:ct.scanner});ct.parser=JJ(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 M1(t){return ct.initialized||rZ(),ZJ(ct.parser.start,t,v8(ct.scanner.start,t))}M1.scan=v8;function C8(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 B1(n),i=M1(t),s=[];for(let a=0;a<i.length;a++){const u=i[a];u.isLink&&(!e||u.t===e)&&r.check(u)&&s.push(u.toFormattedObject(r))}return s}var R1="[\0-   ᠎ -\u2029  ]",iZ=new RegExp(R1),sZ=new RegExp(`${R1}$`),oZ=new RegExp(R1,"g");function aZ(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function lZ(t){return new ht({key:new Ft("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(f=>f.docChanged)&&!n.doc.eq(r.doc),s=e.some(f=>f.getMeta("preventAutolink"));if(!i||s)return;const{tr:a}=r,u=J9(n.doc,[...e]);if(i1(u).forEach(({newRange:f})=>{const h=UG(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(!sZ.test(b))return;m=h[0],g=r.doc.textBetween(m.pos,f.to,void 0," ")}if(m&&g){const b=g.split(iZ).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=M1(v).map(D=>D.toObject(t.defaultProtocol));if(!aZ(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=>{s1(D.from,D.to,r.doc).some(T=>T.mark.type===t.type)||a.addMark(D.from,D.to,t.type.create({href:D.href}))})}}),!!a.steps.length)return a}})}function uZ(t){return new ht({key:new Ft("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;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=s7(e.state,t.type.name),f=(i=a.href)!=null?i:c.href,h=(s=a.target)!=null?s:c.target;f&&(window.open(f,h),u=!0)}return u}}})}var cZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,dZ=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function E8(t,e){let n=0;for(let r=e-1;r>=0&&t[r]==="\\";r-=1)n+=1;return n%2===1}function fZ(t,e){let n=0,r=0;for(;r<e;){if(t[r]!=="`"){r+=1;continue}if(n===0&&E8(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 D8(t,e,n){var r,i;const[,s,a]=e;return(e.index?t[e.index-1]:void 0)==="!"||E8(t,(r=e.index)!=null?r:0)||fZ(t,(i=e.index)!=null?i:0)?!1:!!s.trim()&&n(a)}function k8(t){var e,n;const[r,i,s,,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:s,title:f||null,markdown:!0}}}function hZ(t,e){return t.index<e.index+e.text.length&&e.index<t.index+t.text.length}function S8(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 pZ(t){const e=ta({find:n=>{const r=cZ.exec(n);return!r||!D8(n,r,t.isAllowedHref)?null:k8(r)},type:t.type,getAttributes:S8});return new sd({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 mZ(t){const e=Fs({find:n=>{var r,i;const s=[];for(const u of n.matchAll(dZ))D8(n,u,t.isAllowedHref)&&s.push(k8(u));const a=((i=(r=t.findPlainUrls)==null?void 0:r.call(t,n))!=null?i:[]).filter(u=>!s.some(c=>hZ(c,u)));return[...s,...a]},type:t.type,getAttributes:S8});return new f7({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 gZ(t){return new ht({key:new Ft("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:s}=e,{selection:a}=s,{empty:u}=a;if(u)return!1;let c="";r.content.forEach(h=>{c+=h.textContent});const f=C8(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(oZ,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var bZ=ua.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"){wk(t);return}wk(t.scheme,t.optionalSlashes)})},onDestroy(){nZ()},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",It(this.options.HTMLAttributes,t),0]:["a",It(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,s;const a=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",u=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"",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?[pZ({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;C8(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?[mZ({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})]:[Fs({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(lZ({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(uZ({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(gZ({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),rh="&nbsp;",tb=" ",yZ=Yn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",It(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===rh||n[0].text===rh||n[0].raw===tb||n[0].text===tb)&&r.length===1&&r[0].type==="text"&&(r[0].text===rh||r[0].text===tb)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const s=Array.isArray(t.content)?t.content:[];if(s.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?rh:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),vZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,xZ=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,CZ=ua.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",It(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[ta({find:vZ,type:this.type})]},addPasteRules(){return[Fs({find:xZ,type:this.type})]}}),EZ=Yn.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),DZ=ua.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",It(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 s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:n.inlineTokens(s)}}},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()}}}),kZ=pt.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(kJ.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(vJ.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push($7.configure(this.options.bulletList)),this.options.code!==!1&&i.push(wJ.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(BJ.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(MJ.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(XQ.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(JQ.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(RJ.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(NJ.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(pY.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(PJ.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(FJ.configure(this.options.italic)),this.options.listItem!==!1&&i.push(M7.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(O7.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(bZ.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(z7.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(yZ.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(CZ.configure(this.options.strike)),this.options.text!==!1&&i.push(EZ.configure(this.options.text)),this.options.underline!==!1&&i.push(DZ.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(hY.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),SZ=kZ;function Ch({defaultValue:t="",editable:e=!0,placeholder:n="",ariaLabel:r,autoFocus:i=!1,className:s,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(()=>[SZ.configure({underline:!1,link:{openOnClick:!1}}),F7,I7.configure({nested:!0}),gX,lY.configure({placeholder:n}),pt.create({name:"submitKeymap",addKeyboardShortcuts(){return{"Mod-Enter":()=>h.current.onSubmit?(h.current.onSubmit(),!0):!1}}})]),b=hJ({extensions:g,content:t,contentType:"markdown",editable:e,autofocus:i,editorProps:{attributes:{class:ve("typeset min-w-0 [--typeset-size:0.875rem]",s),...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]),w.jsx(a8,{editor:b,"data-slot":"rich-text-editor"})}const pl="h-7 gap-1.5 self-start rounded-full pr-2.5 pl-1.5 font-normal";function $8({status:t,onChange:e,variant:n="ghost",className:r}){const[i,s]=k.useState(!1);return w.jsxs(R3,{isOpen:i,onOpenChange:s,children:[w.jsxs(Mt,{variant:n,size:"sm","aria-label":"Status",className:ve(pl,r),children:[w.jsx(Ls,{status:t,className:"size-3.5"}),Si[t]]}),w.jsx(N3,{className:"w-56",children:w.jsxs(M3,{children:[w.jsx(P3,{flush:!0,placeholder:"Change status"}),w.jsx(O3,{selectionMode:"single",selectedKeys:[t],onAction:a=>{s(!1),e(a)},children:w.jsx(Gh,{children:Os.map(a=>w.jsxs(oc,{id:a,textValue:Si[a],children:[w.jsx(Ls,{status:a,className:"size-3.5"}),Si[a]]},a))})})]})})]})}const ih=`${pl} self-auto`;function $Z({open:t,onOpenChange:e,onCreated:n,allTasks:r}){const{project:i}=Ws(),[s,a]=k.useState(""),[u,c]=k.useState(""),f=k.useRef(null),[h,m]=k.useState("todo"),[g,b]=k.useState(null),[v,C]=k.useState([]),[E,D]=k.useState(!1),T=()=>{const $=s.trim();$&&H_({title:$,description:u.trim(),status:h,milestone:g,tags:v,needsHuman:E}).then(()=>{a(""),c(""),f.current?.clear(),m("todo"),b(null),C([]),D(!1),e(!1),n()})};return w.jsxs(BH,{isOpen:t,onOpenChange:e,showCloseButton:!1,className:"gap-0 p-0 sm:max-w-2xl",children:[w.jsxs("div",{className:"flex items-center gap-1.5 px-4 pt-4 pb-2",children:[w.jsx("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-xs",children:i?.prefix??"…"}),w.jsx("span",{className:"text-muted-foreground",children:"›"}),w.jsx(MH,{children:"New task"}),w.jsxs(rM,{variant:"ghost",size:"icon-sm",className:"ml-auto text-muted-foreground",children:[w.jsx(B3,{}),w.jsx("span",{className:"sr-only",children:"Close"})]})]}),w.jsx("div",{className:"px-4",children:w.jsx(iM,{"aria-label":"Title",autoFocus:!0,value:s,onChange:$=>a($.target.value),onKeyDown:$=>{$.key==="Enter"&&T()},placeholder:"Task title",className:"h-auto border-transparent bg-transparent px-0 py-1 text-lg font-medium shadow-none focus-visible:border-transparent focus-visible:ring-0 md:text-lg"})}),w.jsx("div",{className:"px-4 pt-1",children:w.jsx(Ch,{ref:f,ariaLabel:"Description",defaultValue:u,onChange:c,onSubmit:T,placeholder:"Add description…",className:"min-h-24"})}),w.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 px-4 pt-3 pb-4",children:[w.jsx($8,{status:h,onChange:m,variant:"outline",className:ih}),w.jsx(Ur,{label:"Milestone",mode:"single",options:am(r),value:g?[g]:[],onChange:$=>b($[0]??null),placeholder:"Milestone",chevron:!1,className:ih,renderValue:$=>w.jsxs(w.Fragment,{children:[w.jsx(qb,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:ve("truncate",$.length===0&&"text-muted-foreground"),children:$[0]??"Milestone"})]})}),w.jsx(Ur,{label:"Tags",mode:"multiple",options:om(r),value:v,onChange:C,placeholder:"Tags",chevron:!1,className:ih,renderValue:$=>w.jsxs(w.Fragment,{children:[w.jsx(qh,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:ve("truncate",$.length===0&&"text-muted-foreground"),children:$.length>0?$.join(", "):"Tags"})]})}),w.jsxs(Mt,{variant:"outline",size:"sm","aria-pressed":E,onPress:()=>D(!E),className:ve(ih,E&&"border-amber-500/40"),children:[w.jsx(vl,{className:ve("size-3.5",E?"text-amber-500":"text-muted-foreground")}),w.jsx("span",{className:E?"text-amber-600 dark:text-amber-400":"text-muted-foreground",children:"Needs a human"})]})]}),w.jsx("div",{className:"flex justify-end border-t px-4 py-3",children:w.jsx(Mt,{size:"sm",onPress:T,isDisabled:!s.trim(),children:"Create task"})})]})}function Ct({className:t}){return w.jsx("div",{className:ve("skeleton rounded-sm",t)})}const Tk=["w-4/5","w-3/5","w-11/12","w-2/3"],Ak=[3,2,3,1,2],Bk=["w-64","w-96","w-52","w-80","w-72","w-60"];function wZ({index:t}){return w.jsxs("article",{className:"rounded-2xl bg-card p-3 shadow-xs ring-1 ring-foreground/5 dark:ring-foreground/10",children:[w.jsx(Ct,{className:"h-3 w-12"}),w.jsxs("div",{className:"mt-2.5 space-y-1.5",children:[w.jsx(Ct,{className:"h-3.5 w-full"}),w.jsx(Ct,{className:ve("h-3.5",Tk[t%Tk.length])})]}),w.jsxs("div",{className:"mt-3 flex items-center gap-1.5",children:[w.jsx(Ct,{className:"h-4 w-12 rounded-full"}),t%2===0&&w.jsx(Ct,{className:"h-4 w-16 rounded-full"}),w.jsx(Ct,{className:"ml-auto h-3 w-8"})]})]})}function TZ({visibleStatuses:t}){const e=Os.filter(n=>t.includes(n));return w.jsx("div",{"aria-hidden":!0,className:"flex flex-1 gap-3 overflow-x-auto p-4",children:e.map((n,r)=>w.jsxs("section",{className:"flex w-72 shrink-0 flex-col rounded-3xl bg-muted/50",children:[w.jsxs("header",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[w.jsx(Ls,{status:n}),w.jsx("h2",{className:"text-sm font-medium",children:Si[n]})]}),w.jsx("div",{className:"flex min-h-16 flex-1 flex-col gap-2 overflow-hidden px-2 pb-2",children:Array.from({length:Ak[r%Ak.length]}).map((i,s)=>w.jsx(wZ,{index:r+s},s))})]},n))})}function AZ(){return w.jsx("div",{"aria-hidden":!0,className:"flex min-h-0 flex-1 flex-col pt-2",children:w.jsx("div",{className:"flex-1 overflow-hidden px-2.5 pb-4",children:Array.from({length:12}).map((t,e)=>w.jsxs("div",{className:"flex h-5 items-center gap-2.5 px-6 py-2.5 box-content",children:[w.jsx(Ct,{className:"h-3 w-16 shrink-0"}),w.jsx(Ct,{className:"size-3.5 shrink-0 rounded-full"}),w.jsx(Ct,{className:ve("h-3.5 max-w-full min-w-0 shrink",Bk[e%Bk.length])}),w.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:[e%3!==1&&w.jsx(Ct,{className:"h-4 w-14 rounded-full"}),e%4===0&&w.jsx(Ct,{className:"h-4 w-10 rounded-full"}),w.jsx(Ct,{className:"h-3 w-8"})]})]},e))})})}function w8(){return w.jsx("main",{"aria-hidden":!0,className:"min-w-0 flex-1 overflow-y-auto",children:w.jsxs("div",{className:"mx-auto flex w-full max-w-6xl items-start gap-20 px-8 pt-16 pb-10",children:[w.jsxs("div",{className:"flex min-w-0 max-w-3xl flex-1 flex-col gap-6",children:[w.jsx(Ct,{className:"my-1 h-7 w-2/3"}),w.jsxs("div",{className:"flex flex-col gap-2.5",children:[w.jsx(Ct,{className:"h-3.5 w-full"}),w.jsx(Ct,{className:"h-3.5 w-11/12"}),w.jsx(Ct,{className:"h-3.5 w-3/4"}),w.jsx(Ct,{className:"h-3.5 w-1/2"})]})]}),w.jsxs("aside",{className:"flex w-64 shrink-0 flex-col gap-1.5 pt-2 max-lg:hidden",children:[w.jsx(Ct,{className:"mb-1 h-3 w-16"}),w.jsx(Ct,{className:"h-7 w-32 rounded-md"}),w.jsx(Ct,{className:"h-7 w-24 rounded-md"}),w.jsx(Ct,{className:"h-7 w-28 rounded-md"})]})]})})}function BZ({view:t,visibleStatuses:e}){return t==="board"?w.jsx(TZ,{visibleStatuses:e}):w.jsx(AZ,{})}const MZ={view:"board",boardColumns:["backlog","todo","in_progress","done"]};function Mk(t,e,n){const r=()=>{try{const u=localStorage.getItem(t);return u==null?e:n(JSON.parse(u))??e}catch{return e}},[i,s]=k.useState(()=>({key:t,value:r()}));i.key!==t&&s({key:t,value:r()});const a=u=>{s({key:t,value:u});try{localStorage.setItem(t,JSON.stringify(u))}catch{}};return[i.value,a]}function T8(t){return typeof t=="string"&&Os.includes(t)}function RZ(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(T8)}}function NZ(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(T8),tags:n.filter(s=>typeof s=="string"),milestone:r,needsHuman:i}}function PZ(){const t=ra(),e=_p(),n=qc({strict:!1}),i=ES()({to:"/"})!==!1,s=W_().data,a=s??[],u=n.board??a[0]?.id??null,c=Q_(u).data??null,f=Y_(u),h=f.data??[],[m,g]=Mk("task-ui:view",MZ,RZ),[b,v]=Mk(`task-ui:filters:${u??""}`,cM,NZ),[C,E]=k.useState(!1);k.useEffect(()=>j_(R=>{const M=IB()??void 0;(R===void 0||M===void 0||R===M)&&(e.invalidateQueries({queryKey:["tasks"]}),e.invalidateQueries({queryKey:["task"]}))}),[e]),k.useEffect(()=>{!s||!n.board||s.some(R=>R.id===n.board)||t({to:"/",search:{},replace:!0})},[s,n.board,t]);const D=R=>{R!==u&&t({to:"/",search:R===a[0]?.id?{}:{board:R}})},T=c?c.readOnly??!1:null,$=T===null||f.isPending,[A,B]=k.useState(!1);T===!1&&!A&&B(!0);const P=T===!1||T===null&&A;return w.jsxs(sM.Provider,{value:{project:c,tasks:h,boards:a,board:u,switchBoard:D,filters:b,setFilters:v,settings:m,setSettings:g,readOnly:T??!0},children:[w.jsxs("div",{className:"flex h-dvh flex-col bg-background",children:[w.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-4 border-b px-4",children:[w.jsx(LH,{}),w.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1.5",children:[i&&w.jsxs(w.Fragment,{children:[w.jsx(qH,{}),w.jsx(_H,{})]}),P&&w.jsxs(Mt,{size:"sm",className:"ml-1.5",isDisabled:$,onPress:()=>E(!0),children:[w.jsx(nM,{"data-icon":"inline-start"}),"New task"]})]})]}),i&&dM(b)&&w.jsx(UH,{}),$?i?w.jsx(BZ,{view:m.view,visibleStatuses:m.boardColumns}):w.jsx(w8,{}):w.jsx(CS,{})]}),w.jsx($Z,{open:C,onOpenChange:E,onCreated:()=>{e.invalidateQueries({queryKey:["tasks"]})},allTasks:h})]})}function OZ({error:t}){return w.jsx("div",{className:"flex min-h-[60dvh] flex-1 items-center justify-center bg-background px-6",children:w.jsxs("div",{className:"w-full max-w-sm text-center",children:[w.jsx("h1",{className:"text-lg font-medium",children:"Something went wrong"}),w.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The board hit an error it couldn’t recover from. Reloading usually clears it."}),w.jsx(Mt,{variant:"secondary",className:"mt-6",onPress:()=>location.reload(),children:"Reload"}),t instanceof Error&&t.message&&w.jsx("p",{className:"mt-4 text-xs break-words text-muted-foreground/60",children:t.message})]})})}function LZ(){return w.jsx("div",{className:"flex min-h-[60dvh] flex-1 items-center justify-center bg-background px-6",children:w.jsxs("div",{className:"w-full max-w-sm text-center",children:[w.jsx("h1",{className:"text-lg font-medium",children:"Nothing here"}),w.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"This page doesn’t exist on this board."})]})})}const Rk=Rl("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 Kp({className:t,variant:e="default",render:n,...r}){if(n){const i={"data-slot":"badge","data-variant":e,className:ve(Rk({variant:e}),t),...r};return n(i)}return w.jsx("span",{"data-slot":"badge","data-variant":e,className:ve(Rk({variant:e}),t),...r})}const nb=1024;function A8(t,e){return t!==void 0&&e!==void 0?(t+e)/2:t!==void 0?t+nb:e!==void 0?e-nb:nb}function zZ(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 By(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 IZ({tasks:t,visibleStatuses:e,onOpen:n,onMove:r,readOnly:i=!1}){const[s,a]=k.useState(null),u=k.useRef(null),c=Os.filter(m=>e.includes(m)).map(m=>({status:m,tasks:t.filter(g=>g.status===m)}));function f(m,g){const b=Array.from(m.currentTarget.closest("[data-column]").querySelectorAll("[data-card]"));let v=b.length;for(let C=0;C<b.length;C++){const E=b[C].getBoundingClientRect();if(m.clientY<E.top+E.height/2){v=C;break}}return{status:g,index:v}}function h(m,g){m.preventDefault();const b=u.current??Number(m.dataTransfer.getData("text/plain")),v=s?.status===g.status?s:f(m,g.status);if(a(null),u.current=null,!b)return;let C=v.index;const E=g.tasks.findIndex($=>$.number===b);E>=0&&C>E&&(C-=1);const D=g.tasks.filter($=>$.number!==b),T=A8(D[C-1]?.position,D[C]?.position);r(b,g.status,T)}return w.jsx("div",{className:"flex flex-1 gap-3 overflow-x-auto p-4",onDragEnd:()=>a(null),children:c.map(m=>w.jsxs("section",{"data-column":!0,className:ve("flex w-72 shrink-0 flex-col rounded-3xl bg-muted/50 transition-colors",s?.status===m.status&&"bg-muted"),onDragOver:i?void 0:g=>{g.preventDefault(),g.dataTransfer.dropEffect="move",a(f(g,m.status))},onDragLeave:g=>{g.currentTarget.contains(g.relatedTarget)||a(null)},onDrop:i?void 0:g=>h(g,m),children:[w.jsxs("header",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[w.jsx(Ls,{status:m.status}),w.jsx("h2",{className:"text-sm font-medium",children:Si[m.status]}),w.jsx("span",{className:"text-xs text-muted-foreground",children:m.tasks.length})]}),w.jsxs("div",{className:"flex min-h-16 flex-1 flex-col gap-2 overflow-y-auto px-2 pb-2",children:[m.tasks.map((g,b)=>w.jsxs("div",{children:[w.jsx(Nk,{visible:s?.status===m.status&&s.index===b}),w.jsx(FZ,{task:g,onOpen:n,draggable:!i,onDragStart:v=>{u.current=g.number,v.dataTransfer.effectAllowed="move",v.dataTransfer.setData("text/plain",String(g.number))}})]},g.number)),w.jsx(Nk,{visible:s?.status===m.status&&s.index===m.tasks.length}),m.tasks.length===0&&w.jsx("p",{className:"px-2 pt-1 text-xs text-muted-foreground/70",children:"No tasks"})]})]},m.status))})}function Nk({visible:t}){return w.jsx("div",{className:ve("mx-1 h-0.5 rounded-full bg-primary/60 opacity-0 transition-opacity",t&&"opacity-100")})}function FZ({task:t,onOpen:e,draggable:n,onDragStart:r}){return w.jsxs("article",{"data-card":!0,draggable:n,onDragStart:r,onClick:()=>e(t),className:ve("cursor-pointer rounded-2xl bg-card p-3 shadow-xs ring-1 ring-foreground/5 transition-shadow select-none hover:shadow-sm dark:ring-foreground/10",n&&"active:cursor-grabbing"),children:[w.jsxs("div",{className:"flex items-center justify-between gap-2",children:[w.jsx("span",{className:"text-xs text-muted-foreground",children:t.id}),t.needsHuman&&w.jsx(oM,{})]}),w.jsx("p",{className:"mt-1 text-sm leading-snug font-medium",children:t.title}),(t.tags.length>0||t.milestone||t.commentCount>0)&&w.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[t.tags.map(i=>w.jsx(Kp,{variant:"outline",children:i},i)),t.milestone&&w.jsx(Kp,{variant:"secondary",className:"max-w-32 truncate",children:t.milestone}),t.commentCount>0&&w.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[w.jsx(bH,{className:"size-3"}),t.commentCount]}),w.jsx("span",{className:"ml-auto text-[11px] text-muted-foreground/70",children:By(t.updatedAt)})]})]})}function KZ({className:t,...e}){return w.jsx(qK,{"data-slot":"grid-list",className:ve("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 _Z({className:t,...e}){return w.jsx(WK,{"data-slot":"grid-list-item",className:ve("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 jZ({className:t,...e}){return w.jsx(Pw,{"data-slot":"grid-list-drop-indicator",className:ve("relative z-10 h-0 w-full outline-none data-drop-target:outline-1 data-drop-target:outline-primary",t),...e})}function HZ({tasks:t,taskHref:e,onReorder:n,readOnly:r=!1}){const{dragAndDropHooks:i}=P_({getItems:s=>[...s].map(a=>({"text/plain":String(a)})),onReorder(s){const a=Number([...s.keys][0]),u=t.filter(f=>f.number!==a);let c=u.findIndex(f=>f.number===s.target.key);c<0||(s.target.dropPosition==="after"&&(c+=1),n(a,A8(u[c-1]?.position,u[c]?.position)))},renderDropIndicator:s=>w.jsx(jZ,{target:s})});return w.jsx(KZ,{"aria-label":"Tasks",items:t,dragAndDropHooks:r?void 0:i,renderEmptyState:()=>r?"No tasks on this board yet.":"No tasks yet — press New task, or `task add` in a terminal.",className:"flex-1 overflow-y-auto px-2.5 pb-4",children:s=>w.jsxs(_Z,{id:s.number,textValue:s.title,href:e(s),className:"group gap-2.5 rounded-lg border-0 px-6 py-2.5",children:[!r&&w.jsx($w,{slot:"drag","aria-label":`Reorder ${s.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:w.jsx(aH,{className:"size-3.5"})}),w.jsx("span",{className:"w-16 shrink-0 text-xs text-muted-foreground",children:s.id}),w.jsx(Ls,{status:s.status}),w.jsx("span",{className:"truncate font-medium",children:s.title}),s.needsHuman&&w.jsx(oM,{}),w.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1.5 pl-3",children:[s.tags.map(a=>w.jsx(Kp,{variant:"outline",children:a},a)),s.milestone&&w.jsx(Kp,{variant:"secondary",className:"max-w-32 truncate",children:s.milestone}),w.jsx("span",{className:"w-12 text-right text-xs text-muted-foreground",children:zZ(s.createdAt)})]})]})})}function VZ(){const{tasks:t,board:e,filters:n,settings:r,readOnly:i}=Ws(),s=ra(),a=_p(),u=qc({strict:!1}),c=VH(t,n),f=g=>{s({to:"/task/$number",params:{number:String(g.number)},search:b=>b})},h=(g,b,v)=>{a.setQueryData(["tasks",e],C=>C?.map(E=>E.number===g?{...E,status:b,position:v}:E)),FB(g,{status:b,position:v}).then(()=>a.invalidateQueries({queryKey:["tasks",e]}))},m=g=>`/task/${g.number}${u.board?`?board=${encodeURIComponent(u.board)}`:""}`;return w.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r.view==="board"?w.jsx(IZ,{tasks:c,visibleStatuses:r.boardColumns,onOpen:f,onMove:h,readOnly:i}):w.jsx("div",{className:"flex min-h-0 flex-1 flex-col pt-2",children:w.jsx(HZ,{tasks:c,taskHref:m,onReorder:(g,b)=>{const v=t.find(C=>C.number===g);v&&h(g,v.status,b)},readOnly:i})})})}function UZ({...t}){return w.jsx(DT,{"data-slot":"dropdown-menu-trigger",...t})}function qZ({"data-slot":t="dropdown-menu-content",placement:e="bottom start",offset:n=4,crossOffset:r=0,className:i,children:s,...a}){return w.jsx(y3,{"data-slot":t,placement:e,offset:n,crossOffset:r,className:ve("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:w.jsx(kT,{className:"max-h-[inherit] overflow-x-hidden overflow-y-auto outline-hidden",...a,children:s})})}const GZ=Rl("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 WZ({className:t,inset:e,variant:n="default",children:r,...i}){return w.jsx($T,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":n,textValue:typeof r=="string"?r:i.textValue,className:Sc(t,(s,{selectionMode:a})=>ve(GZ({selectionMode:a}),s)),...i,children:Sc(r,(s,{isSelected:a,selectionMode:u})=>w.jsxs(w.Fragment,{children:[u!=="none"?w.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?w.jsx(A3,{}):null}):null,s]}))})}function QZ({className:t,...e}){return w.jsx("div",{"data-slot":"empty",className:ve("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 YZ({className:t,...e}){return w.jsx("div",{"data-slot":"empty-header",className:ve("flex max-w-sm flex-col items-center gap-2",t),...e})}function XZ({className:t,...e}){return w.jsx("div",{"data-slot":"empty-title",className:ve("font-heading text-lg font-medium tracking-tight",t),...e})}function JZ({className:t,...e}){return w.jsx("div",{"data-slot":"empty-description",className:ve("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",t),...e})}const ZZ=pL("/task/$number");function eee(){const{number:t}=ZZ.useParams(),e=Number(t),{tasks:n,project:r,board:i,readOnly:s}=Ws(),a=ra(),u=_p(),c=n.find(M=>M.number===e)??null,f=X_(i,e),h=f.data?.comments??[],[m,g]=k.useState(""),b=k.useRef(null),[v,C]=k.useState(!0),[E,D]=k.useState(!1),[T,$]=k.useState(null),A=f.data?.task;if(A&&T!==e&&($(e),g(A.title),D(!1)),!Number.isFinite(e)||f.isError)return w.jsx(tee,{});if(!c)return w.jsx(w8,{});const B=()=>{u.invalidateQueries({queryKey:["tasks",i]}),u.invalidateQueries({queryKey:["task",i,e]})},P=M=>{FB(c.number,M).then(B)},R=()=>{const M=b.current?.getMarkdown().trim()??"";M&&(b.current?.clear(),C(!0),q_(c.number,M).then(B))};return w.jsx("main",{className:"min-w-0 flex-1 overflow-y-auto",children:w.jsxs("div",{className:"mx-auto flex w-full max-w-6xl items-start gap-20 px-8 pt-16 pb-10",children:[w.jsxs("div",{className:"flex min-w-0 max-w-3xl flex-1 flex-col gap-6",children:[s?w.jsx("h1",{className:"py-1 text-2xl font-semibold",children:c.title}):w.jsx(iM,{"aria-label":"Title",value:m,onChange:M=>g(M.target.value),onBlur:()=>m.trim()&&m!==c.title&&P({title:m.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"}),(!s||c.description.trim())&&w.jsx(Ch,{ariaLabel:"Description",placeholder:"Add a description…",defaultValue:c.description,editable:!s,onBlur:s?void 0:M=>P({description:M}),className:"min-h-32"},c.number),w.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[h.length>0&&w.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[h.length," comment",h.length===1?"":"s"]}),h.map(M=>w.jsxs("div",{className:"group/comment relative rounded-2xl bg-muted/60 p-4",children:[w.jsxs("p",{className:"text-xs text-muted-foreground",children:[M.author||"anonymous"," · ",By(M.createdAt)," ago"]}),w.jsx(Ch,{editable:!1,defaultValue:M.body,className:"mt-1.5"},M.id),!s&&M.author===r?.author&&w.jsxs(UZ,{children:[w.jsx(Mt,{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:w.jsx(sH,{})}),w.jsx(qZ,{placement:"bottom end",children:w.jsx(WZ,{variant:"destructive",onAction:()=>{G_(c.number,M.id).then(B)},children:"Delete"})})]})]},M.id)),s?null:h.length===0&&!E?w.jsxs(Mt,{variant:"ghost",size:"sm",onPress:()=>D(!0),className:"h-7 gap-1.5 self-start rounded-full px-2.5 font-normal text-muted-foreground",children:[w.jsx(mH,{className:"size-3.5"}),"Add comment"]}):w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx(Ch,{ref:b,ariaLabel:"Add a comment",placeholder:"Leave a comment… (⌘↵ to post)",autoFocus:E,onChange:M=>C(!M.trim()),onSubmit:R,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"}),w.jsx(Mt,{variant:"secondary",className:"self-end",onPress:R,isDisabled:v,children:"Post"})]})]})]}),w.jsxs("aside",{className:"sticky top-6 flex w-64 shrink-0 flex-col gap-6 pt-2 max-lg:hidden",children:[w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Properties"}),s?w.jsxs(sh,{children:[w.jsx(Ls,{status:c.status}),w.jsx("span",{children:Si[c.status]})]}):w.jsx($8,{status:c.status,onChange:M=>P({status:M})}),s?c.needsHuman&&w.jsxs(sh,{children:[w.jsx(vl,{className:"size-3.5 text-amber-500"}),w.jsx("span",{children:"Needs a human"})]}):w.jsxs(Mt,{variant:"ghost",size:"sm","aria-pressed":c.needsHuman,onPress:()=>P({needsHuman:!c.needsHuman}),className:pl,children:[w.jsx(vl,{className:ve("size-3.5",c.needsHuman?"text-amber-500":"text-muted-foreground")}),w.jsx("span",{className:c.needsHuman?void 0:"text-muted-foreground",children:c.needsHuman?"Needs a human":"No human needed"})]})]}),s&&c.milestone&&w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Milestone"}),w.jsxs(sh,{children:[w.jsx(qb,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:"truncate",children:c.milestone})]})]}),s&&c.tags.length>0&&w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Tags"}),w.jsxs(sh,{children:[w.jsx(qh,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:"truncate",children:c.tags.join(", ")})]})]}),!s&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Milestone"}),w.jsx(Ur,{label:"Milestone",mode:"single",options:am(n),value:c.milestone?[c.milestone]:[],onChange:M=>P({milestone:M[0]??null}),placeholder:"Set milestone",variant:"ghost",chevron:!1,className:pl,renderValue:M=>w.jsxs(w.Fragment,{children:[w.jsx(qb,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:ve("truncate",M.length===0&&"text-muted-foreground"),children:M[0]??"Set milestone"})]})})]}),w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsx("p",{className:"pb-1 text-xs font-medium text-muted-foreground",children:"Tags"}),w.jsx(Ur,{label:"Tags",mode:"multiple",options:om(n),value:c.tags,onChange:M=>P({tags:M}),placeholder:"Add tags",variant:"ghost",chevron:!1,className:pl,renderValue:M=>w.jsxs(w.Fragment,{children:[w.jsx(qh,{className:"size-3.5 text-muted-foreground"}),w.jsx("span",{className:ve("truncate",M.length===0&&"text-muted-foreground"),children:M.length>0?M.join(", "):"Add tags"})]})})]})]}),w.jsxs("div",{className:"flex flex-col gap-1.5",children:[w.jsxs("p",{className:"text-[11px] text-muted-foreground/70",children:["created ",By(c.createdAt)," ago"]}),!s&&w.jsx(Mt,{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:()=>{V_(c.number).then(()=>{u.invalidateQueries({queryKey:["tasks",i]}),a({to:"/",search:M=>M})})},children:"Delete"})]})]})]})})}function sh({children:t}){return w.jsx("div",{className:ve(pl,"flex h-7 items-center gap-1.5 px-2.5 text-sm"),children:t})}function tee(){const t=ra();return w.jsxs(QZ,{className:"flex-1",children:[w.jsxs(YZ,{children:[w.jsx(XZ,{children:"Task not found"}),w.jsx(JZ,{children:"It may have been deleted, or it lives on another board."})]}),w.jsx(Mt,{variant:"outline",size:"sm",onPress:()=>{t({to:"/",search:e=>e})},children:"Back to the board"})]})}function nee(t){const e=t.board;return e==null?{}:{board:String(e)}}const N1=yL({component:PZ,validateSearch:nee}),ree=yS({getParentRoute:()=>N1,path:"/",component:VZ}),iee=yS({getParentRoute:()=>N1,path:"/task/$number",component:eee});function see(t,e){return ML({routeTree:N1.addChildren([ree,iee]),defaultPreload:"intent",defaultErrorComponent:OZ,defaultNotFoundComponent:LZ,history:t,basepath:e})}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{document.documentElement.classList.toggle("dark",t.matches)});rP.createRoot(document.getElementById("root")).render(w.jsx(k.StrictMode,{children:w.jsx(z_,{router:see()})}));